[27342] trunk/dports/gnome/gdm

source_changes at macosforge.org source_changes at macosforge.org
Mon Jul 30 01:34:58 PDT 2007


Revision: 27342
          http://trac.macosforge.org/projects/macports/changeset/27342
Author:   rhwood at macports.org
Date:     2007-07-30 01:34:58 -0700 (Mon, 30 Jul 2007)

Log Message:
-----------
Fix dependencies
Fix startupitem
Add post-destroot phase to install sample pam authentication file
Remove old startupitem files
Remove unused patch file
Add script macports-gdm-util which can be used by a user to enable/disable authe
ntication and the startupitem for gdm

Modified Paths:
--------------
    trunk/dports/gnome/gdm/Portfile

Added Paths:
-----------
    trunk/dports/gnome/gdm/files/macports-gdm-util
    trunk/dports/gnome/gdm/files/pam.sample

Modified: trunk/dports/gnome/gdm/Portfile
===================================================================
--- trunk/dports/gnome/gdm/Portfile	2007-07-30 08:12:56 UTC (rev 27341)
+++ trunk/dports/gnome/gdm/Portfile	2007-07-30 08:34:58 UTC (rev 27342)
@@ -11,18 +11,37 @@
 long_description	\
 	The Gnome Display Manager is a re-implementation of the well \
 	known xdm program. It displays a X11-based graphical login screen. \
-	\
-	This port includes a StartupItem installed into /Library/StartupItems \
-	that can be used to run gdm automatically by inserting \
-	\"DISPLAYSERVER=-X11-\" into /etc/hostconfig.
 maintainers	rhwood openmaintainer at macports.org
 categories	gnome
 platforms	darwin 
 homepage	http://www.gnome.org/
 master_sites	gnome:sources/gdm/[strsed ${version} {/\.[0-9]*$//}]/
 checksums	md5 08555fce34d247062625c1a451a4d5a6
-depends_lib	bin:gnome-session:gnome-session \
-		port:librsvg
+depends_build	\
+	port:gzip \
+	port:p5-xml-parser \
+	port:pkgconfig \
+	port:gnome-doc-utils
+depends_lib	\
+	port:atk \
+	port:cairo \
+	port:dbus-glib \
+	port:fontconfig \
+	port:freetype \
+	port:gettext \
+	port:glib2 \
+	port:gtk2 \
+	port:howl \
+	port:libart_lgpl \
+	port:libglade2 \
+	port:libgnomecanvas \
+	port:libiconv \
+	port:libpng \
+	port:librsvg \
+	port:libxml2 \
+	port:openssl \
+	port:pango \
+	port:xrender 
 use_bzip2 	yes
 
 configure.args	--mandir=${prefix}/share/man --disable-scrollkeeper
@@ -30,8 +49,9 @@
 configure.ldflags-append	"-lresolv"
 
 startupitem.create	yes
+startupitem.name	gdm
 startupitem.init	XDG_DATA_DIRS=${prefix}/share
-startupitem.start	${prefix}/bin/gdm
+startupitem.start	${prefix}/sbin/gdm
 startupitem.stop	${prefix}/sbin/gdm-stop
 startupitem.restart	${prefix}/sbin/gdm-restart
 
@@ -47,6 +67,11 @@
 	reinplace	"s|security/pam|pam/pam|g" ${worksrcpath}/config/Makefile
 }
 
+post-destroot	{
+	xinstall -m 644 ${filespath}/pam.sample ${destroot}${prefix}/etc/gdm
+	xinstall ${filespath}/macports-gdm-util ${destroot}${prefix}/bin
+}
+
 pre-activate {
 	addgroup gdm
 	adduser gdm gid=[existsgroup gdm] realname=GNOME\ Display\ Manager

Added: trunk/dports/gnome/gdm/files/macports-gdm-util
===================================================================
--- trunk/dports/gnome/gdm/files/macports-gdm-util	                        (rev 0)
+++ trunk/dports/gnome/gdm/files/macports-gdm-util	2007-07-30 08:34:58 UTC (rev 27342)
@@ -0,0 +1,113 @@
+#!/bin/sh
+#
+# macports-gdm-util assists users in establishing the proper security settings
+# to use GDM to support nested and remote X11-based logins.
+#
+# History: verison 0.1: Initial version
+#
+
+#
+# MACPORTS_PREFIX should ideally be declared in something like
+# /opt/local/share/macports/resources/common.sh along with the functions
+# MPLink and MPUnlink and any other functions that are declared useful to
+# to share
+#
+MACPORTS_PREFIX=/opt/local
+PAM_FILE=/etc/pam.d/gdm
+
+MPLink()
+{
+	if [ -f $MACPORTS_PREFIX$1 -a ! -a $2$1 ]; then
+		ln -s $MACPORTS_PREFIX$1 $2$1
+	fi
+}
+
+MPUnlink()
+{
+	if [ -h $2$1 ]; then
+		rm $2$1
+	fi
+}
+
+MPLaunchctl()
+{
+	if [ -f /bin/launchctl ]; then
+		/bin/launchctl $1 /Library/LaunchDaemons/org.macports.$2.plist
+	fi
+}
+
+MPEnableLaunchDaemon()
+{
+	MPLaunchctl "load -w" $1
+}
+
+MPDisableLaunchDaemon()
+{
+	MPLaunchctl "unload -w" $1
+}
+
+MGUEnablePAM()
+{
+	CREDENTIALS=$MACPORTS_PREFIX/etc/gdm/pam
+	if [ ! -f $CREDENTIALS ]; then
+		cp $CREDENTIALS.sample $CREDENTIALS.conf
+	fi
+	if [ ! -a $PAM_FILE ]; then
+		ln -s $CREDENTIALS.conf $PAM_FILE
+	fi
+}
+
+MGUDisablePAM()
+{
+	MPUnlink $PAM_FILE /
+}
+
+MGUEnableService()
+{
+	MPEnableLaunchDaemon gdm
+}
+
+MGUDisableService()
+{
+	MPDisableLaunchDaemon gdm
+}
+
+MGUHelp()
+{
+	echo "macports-gdm-util helps users establish proper pam creditials for"
+	echo "GDM so that it can be used to support nested or remote logins over"
+	echo "X11."
+	echo ""
+	echo "enable-pam	link the MacPorts GDM pam creditials file to /etc/pam.d"
+	echo "disable-pam	unlink the MacPorts GDM pam creditials from /etc/pam.d"
+	echo "help		display this message"
+}
+
+if [ -z "$1" ]; then
+	echo "usage: $0 enable|disable|help [pam|startupitem]"
+	exit 1
+fi
+
+case $1 in
+	enable	)
+		case $2 in
+			pam		) MGUEnablePAM	;;
+			startupitem	) MGUEnableService	;;
+			""		) MGUEnablePAM	; MGUEnableService	;;
+		esac
+		;;
+	disable	)
+		case $2 in
+			pam		) MGUDisablePAM	;;
+			startupitem	) MGUDisableService	;;
+			""		) MGUDisablePAM	; MGUDisableService	;;
+		esac
+		;;
+	enable-pam		) MGUEnablePAM	;;
+	disable-pam		) MGUDisablePAM	;;
+	enable-startupitem	) MGUEnableService	;;
+	disable-startupitem	) MGUDisableService	;;
+	help	) MGUHelp	;;
+	*	) echo "$0: unknown argument: $1"	;;
+esac
+


Property changes on: trunk/dports/gnome/gdm/files/macports-gdm-util
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/dports/gnome/gdm/files/pam.sample
===================================================================
--- trunk/dports/gnome/gdm/files/pam.sample	                        (rev 0)
+++ trunk/dports/gnome/gdm/files/pam.sample	2007-07-30 08:34:58 UTC (rev 27342)
@@ -0,0 +1,8 @@
+# login: auth account password session
+auth       required       pam_nologin.so
+auth       sufficient     pam_securityserver.so
+auth       sufficient     pam_unix.so
+auth       required       pam_deny.so
+account    required       pam_permit.so
+password   required       pam_deny.so
+session    required       pam_uwtmp.so

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070730/2656ef51/attachment.html


More information about the macports-changes mailing list