Bug 157525 - [PATCH] audio/linux-shoutcast creates users manually
Summary: [PATCH] audio/linux-shoutcast creates users manually
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 11:50 UTC by Chris Rees
Modified: 2011-07-03 16:10 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 11:50:07 UTC
	This port uses pkg-install to create new users instead of using USERS= and GROUPS=.

Fix: - Use USERS and GROUPS

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

	Please bear in mind that files/pkg-install.in has been removed

	This port also requires a patch to GIDs, at [1].

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




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

Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/audio/linux-shoutcast/Makefile,v
retrieving revision 1.9
diff -u -r1.9 Makefile
--- Makefile	2 Sep 2010 21:17:32 -0000	1.9
+++ Makefile	1 Jun 2011 09:55:43 -0000
@@ -21,6 +21,8 @@
 NO_BUILD=	YES
 RESTRICTED=	Redistribution of the software is not allowed
 
+USERS=		${PORTNAME}
+GROUPS=		${USERS}
 USE_RC_SUBR=	shoutcast.sh
 PORTDOCS=	README.TXT
 WRKSRC=		${WRKDIR}
@@ -48,7 +50,6 @@
 .endif
 
 post-install:
-	@${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
 	@${BRANDELF} -t Linux ${PREFIX}/sbin/sc_serv
 
 .include <bsd.port.mk>
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install	31 Mar 2007 19:56:18 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,50 +0,0 @@
-#!/bin/sh
-
-if [ "$2" != "POST-INSTALL" ]; then
-	exit 0
-fi
-
-SC_GROUP=shoutcast
-SC_USER=shoutcast
-SC_SHELL=/bin/sh
-SC_HOME=/nonexistent
-PW="/usr/sbin/pw"
-
-if ! ${PW} show group ${SC_GROUP} -q >/dev/null; then
-	gid=210
-	while ${PW} show group -g ${gid} -q >/dev/null; do
-		gid=`expr ${gid} + 1`
-	done
-	if ! ${PW} add group ${SC_GROUP} -g ${gid}; then
-		e=$?
-		echo "*** Failed to add group \`${SC_GROUP}'. Please add it manually."
-		exit ${e}
-	fi
-	echo "*** Added group \`${SC_GROUP}' (id ${gid})"
-else
-	gid=`${PW} show group ${SC_GROUP} 2>/dev/null | cut -d: -f3`
-fi
-
-if ! ${PW} show user ${SC_USER} -q >/dev/null; then
-	uid=210
-	while ${PW} show user -u ${uid} -q >/dev/null; do
-		uid=`expr ${uid} + 1`
-	done
-	if ! ${PW} add user ${SC_USER} -u ${uid} -g ${gid} -d "${SC_HOME}" \
-	-c "Shoutcast sandbox" -s "${SC_SHELL}" -p "*" \
-	; then
-		e=$?
-		echo "*** Failed to add user \`${SC_USER}'. Please add it manually."
-		exit ${e}
-	fi
-	echo "*** Added user \`${SC_USER}' (id ${uid})"
-else
-	if ! ${PW} mod user ${SC_USER} -g ${gid} -d "${SC_HOME}" \
-	-c "Shoutcast sandbox" -s "${SC_SHELL}" -p "*" \
-	; then
-		e=$?
-		echo "*** Failed to update user \`${SC_USER}'."
-		exit ${e}
-	fi
-		echo "*** Updated user \`${SC_USER}'."
-fi
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-06-02 11:50:16 UTC
Responsible Changed
From-To: freebsd-ports-bugs->pgollucci

pgollucci@ wants his PRs (via the GNATS Auto Assign Tool)
Comment 2 Chris Rees freebsd_committer freebsd_triage 2011-06-22 17:49:57 UTC
Responsible Changed
From-To: pgollucci->crees
Comment 3 dfilter service freebsd_committer freebsd_triage 2011-07-03 16:06:16 UTC
crees       2011-07-03 15:06:00 UTC

  FreeBSD ports repository

  Modified files:
    audio/linux-shoutcast Makefile 
  Removed files:
    audio/linux-shoutcast pkg-install 
  Log:
  - Use USERS and GROUPS
  
  PR:             ports/157525
  Approved by:    rene (mentor)
  
  Revision  Changes    Path
  1.10      +2 -1      ports/audio/linux-shoutcast/Makefile
  1.4       +0 -50     ports/audio/linux-shoutcast/pkg-install (dead)
_______________________________________________
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 4 Chris Rees freebsd_committer freebsd_triage 2011-07-03 16:06:43 UTC
State Changed
From-To: open->closed

Committed. Thanks!