Bug 157520 - [PATCH] Fix port: audio/murmur manually creates users
Summary: [PATCH] Fix port: audio/murmur manually creates users
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: Chris Rees
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 10:00 UTC by Chris Rees
Modified: 2011-06-25 21:00 UTC (History)
1 user (show)

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 10:00:20 UTC
	<bluurgh>
	This port uses a pkg-install script to create new users
	instead of using USERS= and GROUPS=

Fix: - Use USERS and GROUPS
	- Stop automatically deleting user on deinstall; may be used by other ports

	Submitted by: Chris Rees (utisoft@gmail.com)

	This port also needs a patch to UIDs/GIDs, which is at [1]

	[1] http://www.bayofrum.net/~crees/patches/uids/audio-murmur-uids.patch




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

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/murmur/Makefile,v
retrieving revision 1.10
diff -u -r1.10 Makefile
--- Makefile	23 Mar 2011 23:59:09 -0000	1.10
+++ Makefile	1 Jun 2011 19:59:02 -0000
@@ -18,6 +18,8 @@
 BUILD_DEPENDS=	${LOCALBASE}/include/boost/function.hpp:${PORTSDIR}/devel/boost-libs
 LIB_DEPENDS=	protobuf.7:${PORTSDIR}/devel/protobuf
 
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
 USE_QT_VER=	4
 QT_COMPONENTS=	qmake_build moc_build corelib network xml sql sql-sqlite3_run
 
Index: pkg-deinstall
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/murmur/pkg-deinstall,v
retrieving revision 1.1
diff -u -r1.1 pkg-deinstall
--- pkg-deinstall	25 Feb 2011 14:08:09 -0000	1.1
+++ pkg-deinstall	1 Jun 2011 20:04:21 -0000
@@ -2,20 +2,10 @@
 # $FreeBSD: ports/audio/murmur/pkg-deinstall,v 1.1 2011/02/25 14:08:09 sylvio Exp $
 
 PATH=/bin:/usr/sbin
-USER=murmur
-GROUP=murmur
 RUNDIR=/var/run/murmur
 
 case $2 in
 	POST-DEINSTALL)
-		if pw group show ${GROUP} 2>&1 > /dev/null; then
-			echo "You should manually remove the \"${GROUP}\" group."
-		fi
-
-		if pw user show ${USER} 2>&1 > /dev/null; then
-			echo "You should manually remove the \"${USER}\" user."
-		fi
-
 		rm -Rf ${RUNDIR}
 		;;
 esac
Index: pkg-install
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/murmur/pkg-install,v
retrieving revision 1.2
diff -u -r1.2 pkg-install
--- pkg-install	25 Feb 2011 14:08:09 -0000	1.2
+++ pkg-install	1 Jun 2011 19:58:40 -0000
@@ -2,36 +2,12 @@
 # $FreeBSD: ports/audio/murmur/pkg-install,v 1.2 2011/02/25 14:08:09 sylvio Exp $
 
 PATH=/bin:/usr/sbin
-USER=murmur
-GROUP=murmur
-HOME=/nonexistent
 LOGDIR=/var/log/murmur
 RUNDIR=/var/run/murmur
 DBDIR=/var/db/murmur
 
 case $2 in
 	PRE-INSTALL)
-		if pw group show ${GROUP} 2> /dev/null; then
-		else
-			if pw groupadd ${GROUP}; then
-				echo "Added group \"${GROUP}\"."
-			else
-				echo "Adding group \"${GROUP}\" failed..."
-				exit 1
-			fi
-		fi
-
-		if pw user show ${USER} 2> /dev/null; then
-		else
-			if pw useradd ${USER} -g ${GROUP} -h - \
-				-d ${HOME} -c "Murmur"
-			then
-				echo "Added user \"${USER}\"."
-			else
-				echo "Adding user \"${USER}\" failed..."
-				exit 1
-			fi
-		fi
 
 		mkdir -m 750 ${LOGDIR} ${DBDIR} ${RUNDIR} 2> /dev/null
 		chown -R ${USER}:${GROUP} ${LOGDIR} ${DBDIR} ${RUNDIR}
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-02 10:00:32 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-02 10:00:37 UTC
Maintainer of audio/murmur,

Please note that PR ports/157520 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/157520

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

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Ayumi M 2011-06-09 22:29:30 UTC
i approve this patch. Thanks!

2011/6/2 Edwin Groothuis <edwin@freebsd.org>

> Maintainer of audio/murmur,
>
> Please note that PR ports/157520 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/157520
>
> --
> Edwin Groothuis via the GNATS Auto Assign Tool
> edwin@FreeBSD.org
>



-- 
Ayumi Mitsui http://ayu.commun.jp/ http://twitter.com/ayunyan
PGP: EE97 796C 77F6 CFC9 1FBC  C56A 318B F019 E605 D988
Comment 5 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:49:53 UTC
Responsible Changed
From-To: pgollucci->crees
Comment 6 Chris Rees freebsd_committer freebsd_triage 2011-06-22 18:01:22 UTC
Responsible Changed
From-To: crees->freebsd-ports-bugs

To pool to correct assign message
Comment 7 Chris Rees freebsd_committer freebsd_triage 2011-06-22 18:24:22 UTC
Responsible Changed
From-To: freebsd-ports-bugs->crees

Invalid autoassignment to pgollucci
Comment 8 Chris Rees freebsd_committer freebsd_triage 2011-06-25 13:48:53 UTC
State Changed
From-To: feedback->open

Maintainer has approved.
Comment 9 Chris Rees freebsd_committer freebsd_triage 2011-06-25 20:55:51 UTC
State Changed
From-To: open->closed

Committed
Comment 10 dfilter service freebsd_committer freebsd_triage 2011-06-25 20:55:51 UTC
crees       2011-06-25 19:55:42 UTC

  FreeBSD ports repository

  Modified files:
    audio/murmur         Makefile pkg-deinstall pkg-install 
  Log:
  - Use USERS and GROUPS
  - Stop automatically deleting user on deinstall; may be used by other ports
  
  PR:             ports/157520
  Submitted by:   Chris Rees (utisoft@gmail.com) (me)
  Approved by:    tabthorpe (co-mentor)
  
  Revision  Changes    Path
  1.11      +2 -0      ports/audio/murmur/Makefile
  1.2       +1 -11     ports/audio/murmur/pkg-deinstall
  1.3       +1 -25     ports/audio/murmur/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"