Date: Thu, 2 Jun 2011 18:50:06 +0100 From: Chris Rees <utisoft@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157535: [PATCH] Fix port: audio/squeezeboxserver should use USERS= and GROUPS= Message-ID: <BLU0-SMTP1686F18B249D7C97BFDFA38A97C0@phx.gbl> Resent-Message-ID: <201106021800.p52I0Jvq093160@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157535 >Category: ports >Synopsis: [PATCH] Fix port: audio/squeezeboxserver should use USERS= and 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 18:00:19 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 users instead of using USERS= and GROUPS=.talled port uses that username. >How-To-Repeat: >Fix: - Use USERS and GROUPS - Remove redundant PKGINSTALL assignment Submitted by: Chris Rees (utisoft@gmail.com) --- audio-squeezeboxserver.patch begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/audio/squeezeboxserver/Makefile,v retrieving revision 1.80 diff -u -r1.80 Makefile --- Makefile 22 Apr 2011 16:52:25 -0000 1.80 +++ Makefile 2 Jun 2011 09:57:22 -0000 @@ -50,8 +50,8 @@ # Work around a bug in p5-Package-Stash port RUN_DEPENDS+= p5-Package-DeprecationManager>=0.10:${PORTSDIR}/devel/p5-Package-DeprecationManager -PKGINSTALL= ${WRKDIR}/pkg-install - +USERS= ${SLIMUSER} +GROUPS= ${SLIMGROUP} USE_PERL5= yes .include <bsd.port.pre.mk> Index: files/pkg-install.in =================================================================== RCS file: /exports/cvsroot-freebsd/ports/audio/squeezeboxserver/files/pkg-install.in,v retrieving revision 1.10 diff -u -r1.10 pkg-install.in --- files/pkg-install.in 14 Oct 2009 22:33:31 -0000 1.10 +++ files/pkg-install.in 2 Jun 2011 09:55:33 -0000 @@ -2,11 +2,6 @@ # $FreeBSD: ports/audio/squeezeboxserver/files/pkg-install.in,v 1.10 2009/10/14 22:33:31 brooks Exp $ name=%%PORTNAME%% -u=%%SLIMUSER%% -g=%%SLIMGROUP%% -ugid=104 -homedir=/nonexistent -shell=/sbin/nologin comment="Slim Devices SlimServer/SqueezeCenter pseudo-user" slimdir="%%PREFIX%%/%%SLIMDIR%%" statedir=%%SLIMDBDIR%% @@ -23,29 +18,6 @@ serverlogline="${serverlogfile} ${u}:${g} 644 3 100 * J ${pidfile}" case $2 in -PRE-INSTALL) - if pw group show "${g}" >/dev/null 2>&1; then - echo "Using existing group \"${g}\"." - else - echo "Creating group \"${g}\", (gid: ${ugid})." - pw groupadd ${g} -g ${ugid} - if [ $? != 0 ]; then - echo "Failed to add group \"${g}\"." - exit 1 - fi - fi - if pw user show "${u}" >/dev/null 2>&1; then - echo "Using existing user \"${u}\"." - else - echo "Creating user \"${u}\", (uid: ${ugid})." - pw useradd ${u} -u ${ugid} -g ${ugid} -h - \ - -d ${homedir} -s ${shell} -c "${comment}" - if [ $? != 0 ]; then - echo "Failed to add user \"${u}\"." - exit 1 - fi - fi - ;; POST-INSTALL) if egrep -q "^${serverlogfile}\>" ${newsyslogfile}; then echo "Using existing ${newsyslogfile} entry." --- audio-squeezeboxserver.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-SMTP1686F18B249D7C97BFDFA38A97C0>