ports/157603: [PATCH] Fix port: dns/dhid should use USERS, distfile needs checking
Chris Rees
utisoft at gmail.com
Sat Jun 4 11:00:25 UTC 2011
>Number: 157603
>Category: ports
>Synopsis: [PATCH] Fix port: dns/dhid should use USERS, distfile needs checking
>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 11:00:21 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 at 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=
The distfile on the server has changed, ports@ emailed to ask if anyone is interested in maintaining -- port is unusable as-is
>How-To-Repeat:
>Fix:
- Use USERS and GROUPS
Submitted by: Chris Rees (utisoft at gmail.com)
Please bear in mind that pkg-install has been removed.
--- dns-dhid.patch begins here ---
Index: Makefile
===================================================================
RCS file: /exports/cvsroot-freebsd/ports/dns/dhid/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile 19 Apr 2010 10:43:23 -0000 1.22
+++ Makefile 2 Jun 2011 15:10:30 -0000
@@ -24,17 +24,14 @@
PORTDOCS= AUTHORS CONTRIBUTORS COPYRIGHT INSTALL README WHATSNEW
PLIST_FILES= sbin/dhid bin/genkeys etc/dhid.conf.sample
-DHID_USER= dhis
-DHID_GROUP= dhis
+USERS= dhis
+GROUPS= dhis
DHID_PID_DIR= /var/run/dhis
post-patch:
@${ECHO} "===> Patching dhid.h"
@${REINPLACE_CMD} -e "s^__PREFIX__^${PREFIX}^g" ${WRKSRC}/dhid.h
-pre-install:
- @${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/dhid ${PREFIX}/sbin
${INSTALL_PROGRAM} ${WRKSRC}/genkeys ${PREFIX}/bin
@@ -54,7 +51,6 @@
${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
.endif
- @${SETENV} ${SCRIPTS_ENV} PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
Index: pkg-install
===================================================================
RCS file: pkg-install
diff -N pkg-install
--- pkg-install 19 Feb 2005 20:42:39 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
-#! /bin/sh
-
-# $FreeBSD: ports/dns/dhid/pkg-install,v 1.1 2005/02/19 20:42:39 pav Exp $
-
-PATH=/bin:/usr/sbin
-
-case $2 in
-PRE-INSTALL)
- USER=dhis
- GROUP=${USER}
-
- 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} -g 114 -h -; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${USER}" 2>/dev/null; then
- echo "You already have a user \"${USER}\", so I will use it."
- else
- if pw useradd ${USER} -u 114 -g ${GROUP} -h - \
- -d /nonexistent -s /sbin/nologin \
- -c "DHIS Daemon"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
- ;;
-esac
--- dns-dhid.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:
More information about the freebsd-ports-bugs
mailing list