Date: Fri, 7 Aug 2009 23:39:38 -0800 (AKDT) From: Mel Flynn <mel.flynn+fbsd.ports@mailing.thruhere.net> To: FreeBSD-gnats-submit@FreeBSD.org Cc: janos.mohacsi@bsd.hu Subject: ports/137560: [PATCH] Unbreak and refine net-mgmt/flowd Message-ID: <20090808073938.CEBDF7E818@mailhub.rachie.is-a-geek.net> Resent-Message-ID: <200908080800.n7880GqW031239@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 137560 >Category: ports >Synopsis: [PATCH] Unbreak and refine net-mgmt/flowd >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Aug 08 08:00:16 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Mel Flynn >Release: FreeBSD 8.0-BETA2 i386 >Organization: >Environment: System: FreeBSD smoochies.rachie.is-a-geek.net 8.0-BETA2 FreeBSD 8.0-BETA2 #9 r195941M: Sun Aug 2 12:25:04 AKDT 2009 mel@smoochies.rachie.is-a-geek.net:/usr/obj/usr/src/sys/HPDV9000 i386 >Description: WITH_PERL and WITH_PYTHON are marked as broken, due to faulty plist. While I was in there, refined pkg-install to accept a numeric UID through shell environment / make.conf and made the output consistent. Also used SCRIPTS_ENV to do the job. Last but not least, put the perl manpage in the normal man3 directory. >How-To-Repeat: make -C ${PORTSDIR}/net-mgmt/flowd/ -DWITH_PERL build make -C ${PORTSDIR}/net-mgmt/flowd/ -DWITH_PYTHON build >Fix: --- unbreak-flowd.patch begins here --- Index: net-mgmt/flowd/Makefile =================================================================== RCS file: /home/ncvs/ports/net-mgmt/flowd/Makefile,v retrieving revision 1.14 diff -u -r1.14 Makefile --- net-mgmt/flowd/Makefile 13 Jul 2009 16:22:56 -0000 1.14 +++ net-mgmt/flowd/Makefile 8 Aug 2009 05:38:03 -0000 @@ -22,13 +22,15 @@ MAN5= flowd.conf.5 PORTDOCS= README INSTALL FLOWD_USER?= _flowd +SCRIPTS_ENV+= FLOWD_USER="${FLOWD_USER}" +.if defined(FLOWD_UID) +SCRIPTS_ENV+= FLOWD_UID="${FLOWD_UID}" +.endif .if defined(WITH_PERL) USE_PERL5= yes PLIST_SUB+= WITH_PERL="" -#MAN3PREFIX= ${PREFIX}/lib/perl5/${PERL_VERSION} -#MAN3= Flowd.3 -BROKEN= Incomplete pkg-plist +MAN3= Flowd.3 .else PLIST_SUB+= WITH_PERL="@comment " .endif @@ -36,7 +38,7 @@ .if defined(WITH_PYTHON) USE_PYTHON= yes PLIST_SUB+= WITH_PYTHON="" -BROKEN= Incomplete pkg-plist +INSTALLS_EGGINFO= yes .else PLIST_SUB+= WITH_PYTHON="@comment " .endif @@ -67,9 +69,10 @@ .if defined(WITH_PERL) cd ${WRKSRC}/Flowd-perl && \ - ${PERL} Makefile.PL && \ + ${PERL} Makefile.PL INSTALLSITEMAN3DIR=${MAN3PREFIX}/man/man3 && \ ${GMAKE} && \ - ${GMAKE} install + ${GMAKE} install; + -@${RM} -f ${SITE_PERL}/${PERL_ARCH}/perllocal.pod .endif .if defined(WITH_PYTHON) @@ -78,6 +81,6 @@ ${PYTHON_CMD} setup.py install .endif - FLOWD_USER=${FLOWD_USER} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SETENV} ${SCRIPTS_ENV} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.mk> Index: net-mgmt/flowd/pkg-install =================================================================== RCS file: /home/ncvs/ports/net-mgmt/flowd/pkg-install,v retrieving revision 1.2 diff -u -r1.2 pkg-install --- net-mgmt/flowd/pkg-install 4 Jun 2005 00:43:20 -0000 1.2 +++ net-mgmt/flowd/pkg-install 8 Aug 2009 05:44:35 -0000 @@ -20,9 +20,15 @@ shell=/nonexistent fi uhome="/var/empty" + if [ -z "${FLOWD_UID}" ]; then + uid=`${PW} usernext`; + uid=${uid%%:*} + else + uid=${FLOWD_UID} + fi if ! ${PW} show user ${USER} -q >/dev/null; then - if ! ${PW} add user ${USER} -g ${GROUP} -d "${uhome}" \ + if ! ${PW} add user ${USER} -u ${uid} -g ${GROUP} -d "${uhome}" \ -c "flowd privilege separation user" -s "${shell}" -p "*" \ ; then e=$? @@ -31,7 +37,7 @@ fi echo "*** Added user \`${USER}' (id ${uid})" else - echo "*** You already have user \`${USER}'." + echo "*** You already have user \`${USER} (id `id -u ${USER}`)'." fi } --- unbreak-flowd.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090808073938.CEBDF7E818>