Date: Thu, 2 Jun 2011 22:01:01 +0100 From: Chris Rees <utisoft@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157545: [PATCH] comms/gnokii should use GROUPS= Message-ID: <BLU0-SMTP1126B34607230EE6F41721BA97C0@phx.gbl> Resent-Message-ID: <201106022110.p52LA9EB066849@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157545 >Category: ports >Synopsis: [PATCH] comms/gnokii should use GROUPS= >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: Thu Jun 02 21:10:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Chris Rees >Release: FreeBSD 8.2-RELEASE-p1 i386 >Organization: bayofrum >Environment: System: FreeBSD zeus.bayofrum.net 8.2-RELEASE-p1 FreeBSD 8.2-RELEASE-p1 #0: Sat Apr 30 15:09:06 BST 2011 root@zeus.bayofrum.net:/usr/obj/usr/src/sys/ZEUS i386 >Description: This port uses pkg-install to create new groups instead of using GROUPS=. It also removes the group on deinstall, which could break other installed ports. >How-To-Repeat: >Fix: - Use GROUPS - Stop removing GROUPS on deinstall Submitted by: Chris Rees (utisoft@gmail.com) This PR depends on ports/157528 -- the gnokii group isn't in GIDs as of yet --- comms-gnokii.patch begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/comms/gnokii/Makefile,v retrieving revision 1.88 diff -u -r1.88 Makefile --- Makefile 26 Jan 2011 13:47:03 -0000 1.88 +++ Makefile 2 Jun 2011 11:42:06 -0000 @@ -21,6 +21,7 @@ BUILD_DEPENDS= ${SITE_PERL}/${PERL_ARCH}/XML/Parser.pm:${PORTSDIR}/textproc/p5-XML-Parser +GROUPS= ${PORTNAME} USE_BZIP2= yes USE_GMAKE= yes USE_GETTEXT= yes @@ -38,7 +39,6 @@ LIBS="-L${WRKSRC}/common -L${LOCALBASE}/lib" \ PKG_CONFIG="${LOCALBASE}/bin/pkg-config" -PKGDEINSTALL= ${PKGINSTALL} SUB_FILES+= pkg-message PORTDOCS= * MAN1= gnokii.1 sendsms.1 xgnokii.1 @@ -126,9 +126,6 @@ ${WRKSRC}/${CONFIGURE_SCRIPT} @${MV} ${WRKSRC}/Docs/man/xgnokii.1x ${WRKSRC}/Docs/man/xgnokii.1 -pre-install: - @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: ${INSTALL_DATA} ${WRKSRC}/xgnokii/xgnokii.pc ${PREFIX}/libdata/pkgconfig @${SETENV} "PKG_PREFIX=${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL Index: pkg-install =================================================================== RCS file: /exports/cvsroot-freebsd/ports/comms/gnokii/pkg-install,v retrieving revision 1.2 diff -u -r1.2 pkg-install --- pkg-install 13 Nov 2005 18:28:39 -0000 1.2 +++ pkg-install 2 Jun 2011 11:41:19 -0000 @@ -2,8 +2,6 @@ PATH=/bin:/usr/bin:/usr/sbin -GROUP=gnokii - SUIDBINS="${PKG_PREFIX}/sbin/gnokiid ${PKG_PREFIX}/sbin/mgnokiidev" BINS="${PKG_PREFIX}/bin/gnokii ${SUIDBINS}" @@ -12,30 +10,10 @@ fi case "$2" in -"PRE-INSTALL") - if pw group show "${GROUP}" 2>/dev/null; then - echo "You already have a group \"${GROUP}\", so I will use it." - else - if pw groupadd ${GROUP}; then - echo "Added group \"${GROUP}\"." - else - echo "Adding group \"${GROUP}\" failed..." - exit 1 - fi - fi - ;; - "POST-INSTALL") chgrp $GROUP $BINS chmod 750 ${BINS} chmod u+s ${SUIDBINS} ;; -"DEINSTALL") - if [ -z "`pw groupshow $GROUP 2>&1 | sed -E -e 's/^([^:]+:){3}(.*)$/\2/'`" ]; then - echo "Removing empty group \"$GROUP\"." - pw groupdel $GROUP - fi - ;; - esac --- comms-gnokii.patch ends here --- -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BLU0-SMTP1126B34607230EE6F41721BA97C0>