ports/74003: [PATCH] add xdm rc script

Jose M Rodriguez josemi at freebsd.jazztel.es
Tue Nov 16 15:30:20 UTC 2004


>Number:         74003
>Category:       ports
>Synopsis:       [PATCH] add xdm rc script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 16 15:30:19 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Jose M Rodriguez
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
RedesJM
>Environment:
System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Tue Nov 16 13:26:33 CET 2004 root at orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386


>Description:
	XFree86-4 equivalent of ports/74000
>How-To-Repeat:
>Fix:

--- patch-XFree86-4-clients begins here ---
diff -Nru /usr/ports/x11/XFree86-4-clients/Makefile x11/XFree86-4-clients/Makefile
--- /usr/ports/x11/XFree86-4-clients/Makefile	Fri Nov  5 03:47:23 2004
+++ x11/XFree86-4-clients/Makefile	Tue Nov 16 16:15:02 2004
@@ -7,7 +7,7 @@
 
 PORTNAME=	clients
 PORTVERSION=	4.4.0
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	x11
 MASTER_SITES=	${MASTER_SITE_XFREE}
 MASTER_SITE_SUBDIR= ${PORTVERSION}
@@ -26,6 +26,7 @@
 		Xcursor.1:${PORTSDIR}/x11/XFree86-4-libraries \
 		png.5:${PORTSDIR}/graphics/png \
 		Xft.2:${PORTSDIR}/x11-fonts/libXft
+USE_RC_SUBR=	yes
 
 CONFLICTS=	xorg-clients-[0-9]*
 
@@ -73,7 +74,18 @@
 	@${ECHO_MSG} "setuid.  If you want to do this, hit Ctrl-C now and use \"make WITH_SETUID_LUIT=yes\""
 .endif
 
+pre-install:
+# create an rcNG xdm.sh
+	@${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
+	    -e 's|%%X11BASE%%|${X11BASE}|g' \
+	    -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
+	    -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
+	    ${FILESDIR}/xdm.sh > ${WRKDIR}/xdm.sh
+
 post-install:
+# install an xdm.sh etc/rc.d script
+	@${INSTALL_SCRIPT} ${WRKDIR}/xdm.sh ${PREFIX}/etc/rc.d
+
 	@${LN} -sf ${X11BASE}/bin/resize-static ${X11BASE}/bin/resize
 	@${LN} -sf ${X11BASE}/bin/xterm-static ${X11BASE}/bin/xterm
 	@${LN} -sf ${X11BASE}/bin/uxterm-static ${X11BASE}/bin/uxterm
diff -Nru /usr/ports/x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile
--- /usr/ports/x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile	Thu Jan  1 01:00:00 1970
+++ x11/XFree86-4-clients/files/patch-programs::xdm::config::Imakefile	Tue Nov 16 16:13:32 2004
@@ -0,0 +1,13 @@
+--- programs/xdm/config/Imakefile.orig	Tue Nov 16 16:08:41 2004
++++ programs/xdm/config/Imakefile	Tue Nov 16 16:10:20 2004
+@@ -17,6 +17,10 @@
+ DEFAULTVT=vt7
+ #endif
+ 
++#if defined(FreeBSDArchitecture)
++DEFAULTVT=vt9
++#endif
++
+ #ifndef XdmPixmap
+ # define XdmPixmap XFree86.xpm
+ # define XdmbwPixmap XFree86bw.xpm
diff -Nru /usr/ports/x11/XFree86-4-clients/files/xdm.sh x11/XFree86-4-clients/files/xdm.sh
--- /usr/ports/x11/XFree86-4-clients/files/xdm.sh	Thu Jan  1 01:00:00 1970
+++ x11/XFree86-4-clients/files/xdm.sh	Tue Nov 16 10:51:18 2004
@@ -0,0 +1,71 @@
+#!/bin/sh
+#
+# $Id$
+#
+
+# PROVIDE: xdm
+# REQUIRE: DAEMON LOGIN syscons moused
+# KEYWORD: nojail shutdown
+
+# rcNG launch script for xdm
+#
+# Notes:
+# this scripts implements an alternate method to launch xdm
+#
+# To activate this, you must define xdm_enable="YES" in rc.conf
+# in /etc/rc.conf[.local]
+#
+# This script can:
+# - launch gdm using xdm_program="%%X11BASE%%/bin/gdm"
+# - launch kdm using xdm_program="%%LOCALBASE%%/bin/kdm"
+# - launch Xorg XDMCP client using xdm_program="%%X11BASE%%/bin/XFree86"
+#
+# You may use /etc/rc.conf.d/xdm to use more advanced launch control
+# like a start_precmd script
+
+# Basic config
+name="xdm"
+xdm_enable="NO"
+xdm_program="%%PREFIX%%/bin/xdm"
+
+. %%RC_SUBR%%
+
+rcvar=`set_rcvar`
+
+# get the config from /etc/rc.conf[.local] && /etc/rc.conf.d/xdm
+load_rc_config $name
+
+command="${xdm_program:-%%PREFIX%%/bin/xdm}"
+
+# a good ENV for a X11 App, we are in our subshell
+HOME="/root"
+PATH="/sbin:/bin:/usr/sbin:/usr/bin:%%LOCALBASE%%/sbin:%%LOCALBASE%%/bin:%%X11BASE%%/bin"
+export PATH HOME
+
+case `basename ${command}` in
+	xdm)
+		# xdm standard display manager
+		: ${required_files:=%%PREFIX%%/lib/X11/xdm/xdm-config}
+		: ${pidfile:=/var/run/xdm.pid}
+		: ${extra_commands:="reload"}
+		;;
+	gdm)
+		# gnome gdm display manager
+		: ${required_files:=${command%/bin/gdm}/etc/gdm/gdm.conf}
+		: ${pidfile:=/var/run/gdm.pid}
+		: ${procname:=${command}-binary}
+		;;
+	kdm)
+		# KDE kdm display manager
+		: ${required_files:=${command%/bin/kdm}/share/config/kdm/kdmrc}
+		: ${pidfile:=/var/run/kdm.pid}
+		# don't use start_precmd().  We have local genkdmconf.sh now
+		;;
+	XFree86)
+		# xdm login via Xorg broadcast XDMCP
+		: ${required_files:=/etc/X11/XF86Config}
+		: ${xdm_flags:=-broadcast &}
+		;;
+esac
+
+run_rc_command "$1"
diff -Nru /usr/ports/x11/XFree86-4-clients/pkg-plist x11/XFree86-4-clients/pkg-plist
--- /usr/ports/x11/XFree86-4-clients/pkg-plist	Mon Aug 23 13:02:09 2004
+++ x11/XFree86-4-clients/pkg-plist	Tue Nov 16 10:47:41 2004
@@ -118,6 +118,7 @@
 bin/xwd
 bin/xwininfo
 bin/xwud
+etc/rc.d/xdm.sh
 include/X11/bitmaps/Dashes
 include/X11/bitmaps/Down
 include/X11/bitmaps/Excl
--- patch-XFree86-4-clients ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list