Bug 157545 - [PATCH] comms/gnokii should use GROUPS=
Summary: [PATCH] comms/gnokii should use GROUPS=
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Rene Ladan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 22:10 UTC by Chris Rees
Modified: 2011-06-06 22:13 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Rees 2011-06-02 22:10:09 UTC
	

	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.

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




-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.--TfvdqtPvAK9hl3nwyHBJTEfxduBAywXoghooAMdEx42xrhNk
Content-Type: text/plain; name="comms-gnokii.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="comms-gnokii.patch"

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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-02 22:10:23 UTC
Maintainer of comms/gnokii,

Please note that PR ports/157545 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/157545

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-02 22:10:25 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2011-06-03 13:04:47 UTC
I 've looked at the patch and see no problem with this, so I approve, 
obviously once also ports/157528 has been committed.

Thank you!

-- 
Guido Falsi <mad@madpilot.net>
Comment 4 Rene Ladan freebsd_committer freebsd_triage 2011-06-03 15:04:34 UTC
Responsible Changed
From-To: freebsd-ports-bugs->rene

Grab
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-06-06 20:27:13 UTC
rene        2011-06-06 19:27:00 UTC

  FreeBSD ports repository

  Modified files:
    comms/gnokii         Makefile pkg-install 
  Log:
  Change this port to use the GROUPS variable
  
  PR:             ports/157545
  Submitted by:   Chris Rees [utisoft gmail com]
  Approved by:    maintainer
  
  Revision  Changes    Path
  1.89      +1 -4      ports/comms/gnokii/Makefile
  1.3       +0 -22     ports/comms/gnokii/pkg-install
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Rene Ladan freebsd_committer freebsd_triage 2011-06-06 22:11:59 UTC
State Changed
From-To: feedback->closed

Committed, thanks