diff options
author | Koop Mast <kwm@FreeBSD.org> | 2013-03-19 18:40:22 +0800 |
---|---|---|
committer | Koop Mast <kwm@FreeBSD.org> | 2013-03-19 18:40:22 +0800 |
commit | 2a3357182d8cb640f374f8c60b71b6c99ec43843 (patch) | |
tree | 7a5f4c1c91d14d9fcab2b30589db732cde4a3725 /x11/gdm | |
parent | 92fdeef4740a0893f904a81b5150a5e3f5604b10 (diff) | |
download | freebsd-ports-gnome-2a3357182d8cb640f374f8c60b71b6c99ec43843.tar.gz freebsd-ports-gnome-2a3357182d8cb640f374f8c60b71b6c99ec43843.tar.zst freebsd-ports-gnome-2a3357182d8cb640f374f8c60b71b6c99ec43843.zip |
Convert almost all gnome@ ports to OptionsNG, trim header, use USES=pathfix
instead of gnomehack and pet portlint.
Add conflicts with future gnome3 versions.
Reviewed by: miwi, bapt
Diffstat (limited to 'x11/gdm')
-rw-r--r-- | x11/gdm/Makefile | 48 | ||||
-rw-r--r-- | x11/gdm/distinfo | 4 | ||||
-rw-r--r-- | x11/gdm/files/gdm.in | 29 | ||||
-rw-r--r-- | x11/gdm/files/gdm.pam.in | 2 | ||||
-rw-r--r-- | x11/gdm/files/patch-daemon_gdm-session-worker.c | 54 | ||||
-rw-r--r-- | x11/gdm/pkg-plist | 10 |
6 files changed, 49 insertions, 98 deletions
diff --git a/x11/gdm/Makefile b/x11/gdm/Makefile index e5a702086f78..06c3b8a7fe1b 100644 --- a/x11/gdm/Makefile +++ b/x11/gdm/Makefile @@ -1,14 +1,10 @@ -# New ports collection makefile for: gdm2 -# Date created: 20 May 2002 -# Whom: Joe Marcus Clarke <marcus@FreeBSD.org> -# +# Created by: Joe Marcus Clarke <marcus@FreeBSD.org> # $FreeBSD$ -# $MCom: ports-stable/x11/gdm/Makefile,v 1.10 2010/07/21 13:50:45 kwm Exp $ -# +# $MCom: ports/x11/gdm/Makefile,v 1.192 2012/09/03 16:28:28 mezz Exp $ PORTNAME= gdm -PORTVERSION= 2.30.5 -PORTREVISION= 6 +PORTVERSION= 2.30.7 +PORTREVISION= 2 CATEGORIES= x11 gnome MASTER_SITES= GNOME DIST_SUBDIR= gnome2 @@ -18,21 +14,23 @@ COMMENT= GNOME 2 version of xdm display manager BUILD_DEPENDS= zenity:${PORTSDIR}/x11/zenity \ ${LOCALBASE}/libdata/pkgconfig/iso-codes.pc:${PORTSDIR}/misc/iso-codes -LIB_DEPENDS= ck-connector.0:${PORTSDIR}/sysutils/consolekit \ - polkit-gtk-1.0:${PORTSDIR}/sysutils/polkit-gnome \ +LIB_DEPENDS= ck-connector:${PORTSDIR}/sysutils/consolekit \ + polkit-gtk-1:${PORTSDIR}/sysutils/polkit-gnome \ execinfo:${PORTSDIR}/devel/libexecinfo \ - upower-glib.1:${PORTSDIR}/sysutils/upower \ - xklavier.12:${PORTSDIR}/x11/libxklavier \ - canberra-gtk.0:${PORTSDIR}/audio/libcanberra + upower-glib:${PORTSDIR}/sysutils/upower \ + xklavier:${PORTSDIR}/x11/libxklavier \ + canberra-gtk:${PORTSDIR}/audio/libcanberra RUN_DEPENDS= zenity:${PORTSDIR}/x11/zenity \ ${LOCALBASE}/libexec/gnome-settings-daemon:${PORTSDIR}/sysutils/gnome-settings-daemon \ gnome-session:${PORTSDIR}/x11/gnome-session \ ${LOCALBASE}/libdata/pkgconfig/iso-codes.pc:${PORTSDIR}/misc/iso-codes +CONFLICTS= gdm-3.[0-9]* + USERS= gdm GROUPS= gdm -USE_BZIP2= yes +USE_XZ= yes USE_GETTEXT= yes USE_LDCONFIG= yes USE_XORG= dmx dmxproto @@ -40,7 +38,8 @@ INSTALLS_ICONS= yes USE_RC_SUBR= gdm USE_GNOME_SUBR= yes USE_GMAKE= yes -USE_GNOME= gnomehack intlhack gnomehier gconf2 librsvg2 \ +USES= pathfix +USE_GNOME= intlhack gnomehier gconf2 librsvg2 \ gnomedocutils gnomeprefix gnomepanel GCONF_SCHEMAS= gdm-simple-greeter.schemas GNU_CONFIGURE= yes @@ -58,19 +57,20 @@ PKGMESSAGE= ${WRKDIR}/pkg-message GNOME_LOCALSTATEDIR= /var -OPTIONS= IPV6 "Enable IPv6 support" off \ - KEYRING "Enable GnomeKeyring/PAM integration" on +OPTIONS_DEFINE= IPV6 KEYRING +OPTIONS_DEFAULt=KEYRING +KEYRING_DESC= GnomeKeyring/PAM integration -.include <bsd.port.pre.mk> +.include <bsd.port.options.mk> -.if defined(WITHOUT_KEYRING) -SUB_LIST+= PAM_KEYRING=\# -.else -LIB_DEPENDS+= gnome-keyring.0:${PORTSDIR}/security/libgnome-keyring +.if ${PORT_OPTIONS:MKEYRING} +LIB_DEPENDS+= gnome-keyring:${PORTSDIR}/security/libgnome-keyring SUB_LIST+= PAM_KEYRING= +.else +SUB_LIST+= PAM_KEYRING=\# .endif -.if defined(WITH_IPV6) +.if ${PORT_OPTIONS:MIPV6} CONFIGURE_ARGS+= --enable-ipv6 .else CONFIGURE_ARGS+= --disable-ipv6 @@ -106,4 +106,4 @@ post-install: | /usr/bin/fmt 75 79 > ${PKGMESSAGE} @${CAT} ${PKGMESSAGE} -.include <bsd.port.post.mk> +.include <bsd.port.mk> diff --git a/x11/gdm/distinfo b/x11/gdm/distinfo index 11fd7392b7e4..1346e9a0ca65 100644 --- a/x11/gdm/distinfo +++ b/x11/gdm/distinfo @@ -1,2 +1,2 @@ -SHA256 (gnome2/gdm-2.30.5.tar.bz2) = faa1cbaecf84a7015f8bfd242200deae9b7c18bf6f7ad38335fd1503e023f92d -SIZE (gnome2/gdm-2.30.5.tar.bz2) = 2406523 +SHA256 (gnome2/gdm-2.30.7.tar.xz) = e5a098ebf0fdb5aff669dfca6e696433c4c8962c005bd13f296b7e13a60bc03b +SIZE (gnome2/gdm-2.30.7.tar.xz) = 1715056 diff --git a/x11/gdm/files/gdm.in b/x11/gdm/files/gdm.in index bdc726d08d88..9feb8801fe67 100644 --- a/x11/gdm/files/gdm.in +++ b/x11/gdm/files/gdm.in @@ -1,30 +1,26 @@ #!/bin/sh - # $FreeBSD$ -# $MCom: ports-stable/x11/gdm/files/gdm.in,v 1.5 2010/07/21 13:50:46 kwm Exp $ -# +# $MCom: ports/x11/gdm/files/gdm.in,v 1.50 2012/01/15 18:18:36 kwm Exp $ + # PROVIDE: gdm # REQUIRE: LOGIN cleanvar moused syscons dbus # # Add the following to /etc/rc.conf to start GDM at boot time: # # gdm_enable="YES" +# . /etc/rc.subr . %%GNOME_SUBR%% -export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin - -name="gdm" -rcvar=gdm_enable - -load_rc_config ${name} - -gnome_enable=${gnome_enable:-NO} gdm_enable=${gdm_enable-${gnome_enable}} gdm_preserve_base_pam_conf=${gdm_preserve_base_pam_conf-NO} gdm_lang=${gdm_lang-${LANG}} +export PATH=/bin:/sbin:/usr/bin:/usr/sbin:%%LOCALBASE%%/bin:%%LOCALBASE%%/sbin + +name="gdm" +rcvar=gdm_enable command="%%PREFIX%%/sbin/${name}" pidfile="/var/run/${name}.pid" procname="%%PREFIX%%/sbin/gdm-binary" @@ -32,14 +28,15 @@ start_cmd="gdm_start" gdm_start() { - local iter - + if ! checkyesno gdm_enable ; then + return 0 + fi echo "Starting ${name}." # make sure there is no pam configuration for gdm service in base system if ! checkyesno gdm_preserve_base_pam_conf && [ -f /etc/pam.d/gdm ]; then cp -p /etc/pam.d/gdm /etc/pam.d/gdm_disabled - unlink /etc/pam.d/gdm + rm -f /etc/pam.d/gdm fi ( iter=0 @@ -52,9 +49,6 @@ gdm_start() done iter=0 while ! %%LOCALBASE%%/bin/lshal >/dev/null 2>&1 ; do - if [ ! -x %%LOCALBASE%%/bin/lshal ]; then - err 1 "%%LOCALBASE%%/bin/lshal is not installed" - fi if [ ${iter} -eq 60 ]; then break fi @@ -64,4 +58,5 @@ gdm_start() LANG=${gdm_lang} ${command} ${gdm_flags} ) & } +load_rc_config ${name} run_rc_command "$1" diff --git a/x11/gdm/files/gdm.pam.in b/x11/gdm/files/gdm.pam.in index 52ad31672ad8..d6382bb34a69 100644 --- a/x11/gdm/files/gdm.pam.in +++ b/x11/gdm/files/gdm.pam.in @@ -1,6 +1,6 @@ # # $FreeBSD$ -# $MCom: ports-stable/x11/gdm/files/gdm.pam.in,v 1.3 2010/07/21 13:50:46 kwm Exp $ +# $MCom: ports/x11/gdm/files/gdm.pam.in,v 1.17 2011/06/02 11:58:24 kwm Exp $ # # PAM configuration for the "gdm" service # diff --git a/x11/gdm/files/patch-daemon_gdm-session-worker.c b/x11/gdm/files/patch-daemon_gdm-session-worker.c index 31baf67050ed..a15c91658554 100644 --- a/x11/gdm/files/patch-daemon_gdm-session-worker.c +++ b/x11/gdm/files/patch-daemon_gdm-session-worker.c @@ -1,5 +1,5 @@ ---- daemon/gdm-session-worker.c.orig 2010-08-11 13:40:07.000000000 -0400 -+++ daemon/gdm-session-worker.c 2011-08-13 23:37:04.000000000 -0400 +--- daemon/gdm-session-worker.c.orig 2011-06-02 09:50:17.000000000 -0500 ++++ daemon/gdm-session-worker.c 2011-06-24 17:59:50.000000000 -0500 @@ -31,6 +31,9 @@ #include <errno.h> #include <grp.h> @@ -10,7 +10,7 @@ #ifdef HAVE_LOGINDEVPERM #include <libdevinfo.h> -@@ -341,7 +344,7 @@ gdm_session_execute (const char *file, +@@ -341,7 +344,7 @@ * what to search if PATH is unset. POSIX may, dunno. */ @@ -19,50 +19,7 @@ } len = strlen (file) + 1; -@@ -1035,17 +1038,6 @@ gdm_cache_copy_file (GdmSessionWorker *w - error->message); - g_error_free (error); - } else { -- int res; -- -- res = chown (cachefilename, -- worker->priv->uid, -- worker->priv->gid); -- if (res == -1) { -- g_warning ("GdmSessionWorker: Error setting owner of cache file: %s", -- g_strerror (errno)); -- } -- -- g_chmod (cachefilename, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); - g_debug ("Copy successful"); - } - -@@ -1183,7 +1175,23 @@ gdm_session_worker_uninitialize_pam (Gdm - return; - - if (worker->priv->state >= GDM_SESSION_WORKER_STATE_SESSION_OPENED) { -- gdm_session_worker_cache_userfiles (worker); -+ pid_t pid; -+ -+ pid = fork (); -+ -+ if (pid == 0) { -+ if (setuid (worker->priv->uid) < 0) { -+ g_debug ("GdmSessionWorker: could not reset uid: %s", g_strerror (errno)); -+ _exit (1); -+ } -+ -+ gdm_session_worker_cache_userfiles (worker); -+ _exit (0); -+ } -+ -+ if (pid > 0) { -+ gdm_wait_on_pid (pid); -+ } - pam_close_session (worker->priv->pam_handle, 0); - gdm_session_auditor_report_logout (worker->priv->auditor); - -@@ -2027,15 +2035,16 @@ gdm_session_worker_start_user_session (G +@@ -2032,15 +2035,16 @@ char *cachedirname; char *home_dir; int fd; @@ -83,7 +40,7 @@ if (setsid () < 0) { g_debug ("GdmSessionWorker: could not set pid '%u' as leader of new session and process group - %s", -@@ -2043,6 +2052,26 @@ gdm_session_worker_start_user_session (G +@@ -2048,6 +2052,25 @@ _exit (2); } @@ -93,7 +50,6 @@ + g_debug ("%s: setusercontext () failed for %s. " + "Aborting.", "gdm_session_worker_start_user_session", + login ? login : "(null)"); -+ _exit (1); + } + + /* Propagate PATH environment variable from user context to child processes */ diff --git a/x11/gdm/pkg-plist b/x11/gdm/pkg-plist index acabde1043d0..80a3d947dfa9 100644 --- a/x11/gdm/pkg-plist +++ b/x11/gdm/pkg-plist @@ -10,6 +10,8 @@ etc/gdm/Xsession etc/gdm/custom.conf.default @exec [ -f %B/custom.conf ] || cp %B/%f %B/custom.conf etc/gdm/gdm.schemas +etc/gdm/home/.local/share/applications/mime-dummy-handler.desktop +etc/gdm/home/.local/share/applications/mimeapps.list etc/pam.d/gdm libdata/bonobo/servers/GNOME_FastUserSwitchApplet.server libexec/gdm-crash-logger @@ -223,6 +225,9 @@ share/pixmaps/nohost.png @dirrm etc/gdm/PostSession @dirrm etc/gdm/PostLogin @dirrm etc/gdm/Init +@dirrmtry etc/gdm/home/.local/share/applications +@dirrmtry etc/gdm/home/.local/share +@dirrmtry etc/gdm/home/.local @unexec rm -rf %D/etc/gdm/home/.gconf* @dirrmtry etc/gdm/home @dirrmtry etc/gdm @@ -230,11 +235,6 @@ share/pixmaps/nohost.png @dirrmtry etc/dm @dirrmtry share/log/gdm @dirrmtry share/log -@unexec /bin/rm -rf /var/gdm 2>/dev/null || /usr/bin/true -@unexec /bin/rm -rf /var/log/gdm 2>/dev/null || /usr/bin/true -@unexec /bin/rm -rf /var/run/gdm 2>/dev/null || /usr/bin/true -@unexec rmdir /var/cache/gdm 2>/dev/null || /usr/bin/true -@unexec rmdir /var/cache 2>/dev/null || /usr/bin/true @dirrmtry share/locale/zu/LC_MESSAGES @dirrmtry share/locale/zu @dirrmtry share/locale/zh_HK/LC_MESSAGES |