Date: Sat, 4 Jun 2011 10:07:30 +0100 From: Chris Rees <utisoft@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/157581: Fix port: irc/ircd-ru should use USERS Message-ID: <BLU0-SMTP217B234D4736825247D024A97E0@phx.gbl> Resent-Message-ID: <201106040910.p549A9O7014053@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 157581 >Category: ports >Synopsis: Fix port: irc/ircd-ru should use USERS >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: Sat Jun 04 09: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 users instead of using USERS= and GROUPS= It also tries to delete users on deinstall without prompting -- this is a problem if another installed port uses that username. >How-To-Repeat: >Fix: - Use USERS and GROUPS Submitted by: Chris Rees (utisoft@gmail.com) Please bear in mind that pkg-install has been removed. --- irc-ircd-ru.patch begins here --- Index: Makefile =================================================================== RCS file: /exports/cvsroot-freebsd/ports/irc/ircd-ru/Makefile,v retrieving revision 1.17 diff -u -r1.17 Makefile --- Makefile 19 Apr 2010 10:43:24 -0000 1.17 +++ Makefile 2 Jun 2011 19:22:51 -0000 @@ -21,6 +21,9 @@ USE_RC_SUBR= ircd WRKSRC= ${WRKDIR}/ircd-RU-${PORTVERSION}-03-rc +USERS= ircd +GROUPS= ${USERS} + VARDIR= /var PLIST_SUB= VARDIR=${VARDIR} @@ -87,9 +90,6 @@ @${ECHO_MSG} " Edit ${WRKSRC}/include/config.h for specific settings " @${ECHO_MSG} "" -pre-install: - @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: @${CHOWN} -R ircd:ircd ${VARDIR}/log/ircd-ru @${CAT} ${PKGMESSAGE} Index: pkg-install =================================================================== RCS file: pkg-install diff -N pkg-install --- pkg-install 7 Aug 2003 13:14:37 -0000 1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,68 +0,0 @@ -#!/bin/sh - -# This script is a modified copy of the pkg-install script -# from the original ircd-hybrid port. - -if [ "x$2" != "xPRE-INSTALL" ]; then - exit 0; -fi - - -if ! which -s pw ; then - cat <<EOF -Your system does not include the "pw" utility. You should upgrade -to a newer version of FreeBSD. Without "pw" this script will not -run. -EOF - exit 1 -fi - -uid=72 -user=ircd -gid=$uid -group=$user -gecos="Russian IRC daemon" -shell="/bin/sh" -home="/nonexistent" - -echo "" -if pw groupshow $group 2> /dev/null ; then - echo "You already have a group \"$group\", so I will use it." -else - if pw groupshow $gid 2> /dev/null ; then - echo "You already have a gid \"$gid\". Please create a user \"$group\"" - echo "with a default group of \"$group\"." - exit 1 - fi - echo "You need a group \"$group\"." - if which -s pw ; then - pw groupadd $group -g $gid || exit - echo "Done." - else - echo "Please create it, and try again." - if ! pw usershow $user 2> /dev/null ; then - echo "While you're at it, please create a user \"$user\"" - echo 'too, with a default group of "$group".' - fi - exit 1 - fi -fi - -if pw usershow $user 2> /dev/null ; then - echo "You already have a user \"$user\", so I will use it." -else - if pw usershow $uid 2> /dev/null ; then - echo "You already have a uid \"$uid\". Please create a user \"ircd\"" - echo "with a default group of \"$group\"." - exit 1 - fi - echo "You need a user \"$user\"." - if which -s pw; then - pw useradd $user -g $group -u $uid -h - -d $home \ - -s "$shell" -c "$gecos" || exit - echo "Done." - else - echo "Please create it, and try again." - exit 1 - fi -fi Index: pkg-plist =================================================================== RCS file: /exports/cvsroot-freebsd/ports/irc/ircd-ru/pkg-plist,v retrieving revision 1.7 diff -u -r1.7 pkg-plist --- pkg-plist 30 Dec 2006 19:49:40 -0000 1.7 +++ pkg-plist 2 Jun 2011 19:24:40 -0000 @@ -28,4 +28,4 @@ @exec chown ircd:ircd %%VARDIR%%/log/ircd-ru @unexec rmdir %%VARDIR%%/log/ircd-ru @unexec rmdir %%VARDIR%%/run/ircd-ru -@unexec (rmdir %D/etc/ircd-ru && pw user del ircd) || echo 'To completely remove this port delete user ircd, group ircd and remove etc/ircd-ru' +@unexec rmdir %D/etc/ircd-ru || echo 'To completely remove this port remove etc/ircd-ru' --- irc-ircd-ru.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-SMTP217B234D4736825247D024A97E0>