[PATCH] x11/gnome-screensaver: GnomeKeyring integration

Marcin Wisnicki mwisnicki+freebsd at gmail.com
Sat Jul 26 22:55:20 UTC 2008


>Submitter-Id:	current-users
>Originator:	Marcin Wisnicki
>Organization:	
>Confidential:	no 
>Synopsis:	[PATCH] x11/gnome-screensaver: GnomeKeyring integration
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 7.0-STABLE i386
>Environment:
System: FreeBSD ghost.pnet.one.pl 7.0-STABLE FreeBSD 7.0-STABLE #15: Fri Jul 25 18:16:53 CEST 2008
>Description:
- Optional (enabled by default) GnomeKeyring integration via PAM.
- Enable PAM by default and install pam configuration

This patch assumes that ports/125967 is commited.

Added file(s):
- files/gnome-screensaver.pam.in

Port maintainer (gnome at FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- gnome-screensaver-2.22.2_5.patch begins here ---
diff -ruN --exclude=CVS /usr/ports/x11/gnome-screensaver.orig/Makefile /usr/ports/x11/gnome-screensaver/Makefile
--- /usr/ports/x11/gnome-screensaver.orig/Makefile	2008-07-19 15:52:47.000000000 +0200
+++ /usr/ports/x11/gnome-screensaver/Makefile	2008-07-27 00:53:54.000000000 +0200
@@ -8,7 +8,7 @@
 
 PORTNAME=	gnome-screensaver
 PORTVERSION=	2.22.2
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	x11 gnome
 MASTER_SITES=	GNOME
 DIST_SUBDIR=	gnome2
@@ -34,20 +34,40 @@
 MAN1=		gnome-screensaver-command.1 gnome-screensaver-preferences.1 \
 		gnome-screensaver.1
 
-
 PLIST=	${WRKDIR}/pkg-plist
+SUB_FILES+=	gnome-screensaver.pam
 
 XSCREENSAVER_DIR=	${LOCALBASE}/share/xscreensaver/config
 SCREENSAVER_DIR=	share/applications/screensavers
 
 XSCREENSAVER_EXCLUDE=	"(popsquares.xml)"
 
-OPTIONS=	PAM "Pluggable Authentication Module support" off
+OPTIONS=	PAM "Pluggable Authentication Module support" on \
+		KEYRING "Enable GnomeKeyring/PAM integration" on
 
 .include <bsd.port.pre.mk>
 
-.if !defined(WITH_PAM)
+.if defined(WITH_PAM)
+CONFIGURE_ARGS+=	--enable-pam
+PLIST_SUB+=		PAM=""
+.if defined(WITH_KEYRING)
+SUB_LIST+=		PAM_KEYRING=
+RUN_DEPENDS+=		${LOCALBASE}/lib/pam_gnome_keyring.so:${PORTSDIR}/security/gnome-keyring
+.else
+SUB_LIST+=		PAM_KEYRING=\#
+.endif
+.else
 CONFIGURE_ARGS+=	--disable-pam
+PLIST_SUB+=		PAM="@comment "
+.if defined(WITH_KEYRING)
+.warning Option KEYRING needs PAM, but PAM is disabled.
+.endif
+.endif
+
+post-patch:
+.if defined(WITH_PAM)
+	@${REINPLACE_CMD} -e 's|/etc/pam.d|${PREFIX}/etc/pam.d|g' \
+		${WRKSRC}/src/gs-auth-pam.c
 .endif
 
 pre-install:
@@ -66,5 +86,8 @@
 		${FIND} -s ${XSCREENSAVER_DIR} -maxdepth 1 -type f -name "*.xml" | \
 			${GREP} -Ev ${XSCREENSAVER_EXCLUDE} | \
 			${XARGS} ${WRKSRC}/data/migrate-xscreensaver-config.sh
+.if defined(WITH_PAM)
+	${INSTALL_DATA} ${WRKDIR}/gnome-screensaver.pam ${PREFIX}/etc/pam.d/gnome-screensaver
+.endif
 
 .include <bsd.port.post.mk>
diff -ruN --exclude=CVS /usr/ports/x11/gnome-screensaver.orig/files/gnome-screensaver.pam.in /usr/ports/x11/gnome-screensaver/files/gnome-screensaver.pam.in
--- /usr/ports/x11/gnome-screensaver.orig/files/gnome-screensaver.pam.in	1970-01-01 01:00:00.000000000 +0100
+++ /usr/ports/x11/gnome-screensaver/files/gnome-screensaver.pam.in	2008-07-26 01:25:24.000000000 +0200
@@ -0,0 +1,3 @@
+auth		include		system
+%%PAM_KEYRING%%auth		optional	%%LOCALBASE%%/lib/pam_gnome_keyring.so
+account		include		system
diff -ruN --exclude=CVS /usr/ports/x11/gnome-screensaver.orig/pkg-plist /usr/ports/x11/gnome-screensaver/pkg-plist
--- /usr/ports/x11/gnome-screensaver.orig/pkg-plist	2008-04-03 00:03:15.000000000 +0200
+++ /usr/ports/x11/gnome-screensaver/pkg-plist	2008-07-27 00:34:42.000000000 +0200
@@ -1,6 +1,7 @@
 bin/gnome-screensaver
 bin/gnome-screensaver-command
 bin/gnome-screensaver-preferences
+%%PAM%%etc/pam.d/gnome-screensaver
 etc/xdg/menus/gnome-screensavers.menu
 libdata/pkgconfig/gnome-screensaver.pc
 libexec/gnome-screensaver-dialog
--- gnome-screensaver-2.22.2_5.patch ends here ---



More information about the freebsd-gnome mailing list