ports/182616: [patch] net/tac_plus4 add stage support

ohauer at FreeBSD.org ohauer at FreeBSD.org
Thu Oct 3 22:20:01 UTC 2013


>Number:         182616
>Category:       ports
>Synopsis:       [patch] net/tac_plus4 add stage support
>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 Oct 03 22:20:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     ohauer
>Release:        FreeBSD 8.4-RELEASE-p4 amd64
>Organization:
>Environment:

>Description:
- add stage support
- use the framework to create the tacacs user
- MAKE_JOBS_UNSAFE=yes is also required for i386

patch: http://people.freebsd.org/~ohauer/diffs/stage/stage_tinderbox.diff

>How-To-Repeat:

>Fix:
--- stage_tac_plus4.diff begins here ---
Index: tac_plus4/Makefile
===================================================================
--- tac_plus4/Makefile	(revision 329239)
+++ tac_plus4/Makefile	(working copy)
@@ -18,17 +18,11 @@
 CONFIGURE_ARGS=	--with-groupid=$$(/usr/bin/id -g tacacs 2>/dev/null || echo '559') \
 		--with-userid=$$(/usr/bin/id -u tacacs 2>/dev/null || echo '559')
 
-MAN5=		tac_plus.conf.5
-MAN8=		tac_plus.8 tac_pwd.8
+USERS=		tacacs
+GROUPS=		tacacs
 
 CONFLICTS=	ru-tac+ia-[0-9]* tac_plus-libradius-[0-9]*
-
-NO_STAGE=	yes
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "amd64"
 MAKE_JOBS_UNSAFE=	yes
-.endif
 
 # check expiration dates against 'expire' field of master.passwd file
 .if defined(TAC_EXPIRE_MASTER_PASSWD)
@@ -51,14 +45,9 @@
 		${WRKSRC}/configure
 
 post-install:
-	${INSTALL_DATA} ${FILESDIR}/tac_plus.conf.example ${PREFIX}/etc
-.if !defined(PACKAGE_BUILDING)
-	@${SETENV} PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
-.endif
-.if !defined(NOPORTDOCS)
-	@${MKDIR} ${PREFIX}/share/doc/tac_plus
-	${INSTALL_DATA} ${WRKSRC}/users_guide ${PREFIX}/share/doc/tac_plus
-	${INSTALL_SCRIPT} ${WRKSRC}/tac_convert ${PREFIX}/share/doc/tac_plus
-.endif
+	${INSTALL_DATA} ${FILESDIR}/tac_plus.conf.example ${STAGEDIR}${PREFIX}/etc
+	@${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/tac_plus
+	${INSTALL_DATA} ${WRKSRC}/users_guide ${STAGEDIR}${PREFIX}/share/doc/tac_plus
+	${INSTALL_SCRIPT} ${WRKSRC}/tac_convert ${STAGEDIR}${PREFIX}/share/doc/tac_plus
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: tac_plus4/pkg-install
===================================================================
--- tac_plus4/pkg-install	(revision 329239)
+++ tac_plus4/pkg-install	(working copy)
@@ -1,37 +0,0 @@
-#!/bin/sh
-
-case $2 in
-POST-INSTALL)
-	USER=tacacs
-	GROUP=${USER}
-	UID=559
-	GID=${UID}
-	PW=/usr/sbin/pw
-
-	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 ${GID}; 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 ${UID} -g ${GROUP} -h - \
-			-d "/nonexistent" -s /sbin/nologin -c "TACACS+ Daemon User"
-		then
-			echo "Added user \"${USER}\"."
-		else
-			echo "Adding user \"${USER}\" failed..."
-			exit 1
-		fi
-	fi
-
-	exit 0
-	;;
-esac
Index: tac_plus4/pkg-plist
===================================================================
--- tac_plus4/pkg-plist	(revision 329239)
+++ tac_plus4/pkg-plist	(working copy)
@@ -6,6 +6,9 @@
 lib/libtacacs.la
 lib/libtacacs.so
 lib/libtacacs.so.1
+man/man5/tac_plus.conf.5.gz
+man/man8/tac_plus.8.gz
+man/man8/tac_pwd.8.gz
 %%PORTDOCS%%%%DOCSDIR%%/tac_convert
 %%PORTDOCS%%%%DOCSDIR%%/users_guide
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
--- stage_tac_plus4.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list