diff options
author | Olli Hauer <ohauer@FreeBSD.org> | 2012-07-20 20:32:20 +0000 |
---|---|---|
committer | Olli Hauer <ohauer@FreeBSD.org> | 2012-07-20 20:32:20 +0000 |
commit | 8983a88800ffde4ec1dfa38e8bf845f3395e1f6c (patch) | |
tree | 63b7966915f99a902308719b47aecdd07dca2742 | |
parent | 79769610e4f258be980dbe6765c361d072a6615b (diff) | |
download | ports-8983a88800ffde4ec1dfa38e8bf845f3395e1f6c.tar.gz ports-8983a88800ffde4ec1dfa38e8bf845f3395e1f6c.zip |
- use reserverd UID/GID
- use ports-framework to create user/group
- remove pkg-(de)install
- rename patchfiles
- rename rc file ( s/.in// )
- bump PORTREVISION
with hat apache@
PR: 169953
Submitted by: Marcello Coutinho <marcellocoutinho@gmail.com>
Notes
Notes:
svn path=/head/; revision=301241
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | GIDs | 1 | ||||
-rw-r--r-- | UIDs | 1 | ||||
-rw-r--r-- | net/spread/Makefile | 14 | ||||
-rw-r--r-- | net/spread/files/patch-Makefile.in | 12 | ||||
-rw-r--r-- | net/spread/files/patch-docs__spmonitor.1 (renamed from net/spread/files/patch-docs::spmonitor.1) | 0 | ||||
-rw-r--r-- | net/spread/files/patch-docs__spread.1 (renamed from net/spread/files/patch-docs::spread.1) | 0 | ||||
-rw-r--r-- | net/spread/files/patch-perl__Spread__Spread.pm (renamed from net/spread/files/patch-perl::Spread::Spread.pm) | 0 | ||||
-rw-r--r-- | net/spread/files/patch-spread.c | 18 | ||||
-rw-r--r-- | net/spread/files/spread.in (renamed from net/spread/files/spread.sh.in) | 0 | ||||
-rw-r--r-- | net/spread/pkg-deinstall | 29 | ||||
-rw-r--r-- | net/spread/pkg-install | 51 | ||||
-rw-r--r-- | net/spread/pkg-plist | 2 | ||||
-rw-r--r-- | net/spread4/Makefile | 15 | ||||
-rw-r--r-- | net/spread4/files/patch-docs__sample.spread.conf (renamed from net/spread4/files/patch-docs-sample.spread.conf) | 0 | ||||
-rw-r--r-- | net/spread4/files/patch-docs__spmonitor.1 (renamed from net/spread4/files/patch-docs::spmonitor.1) | 0 | ||||
-rw-r--r-- | net/spread4/files/patch-docs__spread.1 (renamed from net/spread4/files/patch-docs::spread.1) | 0 | ||||
-rw-r--r-- | net/spread4/files/spread.in (renamed from net/spread4/files/spread.sh.in) | 0 | ||||
-rw-r--r-- | net/spread4/pkg-deinstall | 29 | ||||
-rw-r--r-- | net/spread4/pkg-install | 51 | ||||
-rw-r--r-- | net/spread4/pkg-plist | 2 |
21 files changed, 44 insertions, 186 deletions
@@ -10,6 +10,11 @@ in the release notes and/or placed into UPDATING. All ports committers are allowed to commit to this file. +20120820: +AUTHOR: ohauer@FreeBSD.org + * The ports net/spread and net/spread4 are using now the + reserved UID/GID 282 instead (user|group)next. + 20120715: AUTHOR: beat@FreeBSD.org @@ -129,6 +129,7 @@ frontbase:*:276: mrtg:*:279: xymon:*:280: prelude:*:281: +spread:*:282: backuppc:*:300: _sphinx:*:312: dkfilter:*:325: @@ -135,6 +135,7 @@ frontbase:*:276:276::0:0:FrontBase Daemon:/usr/local/FrontBase/Databases:/bin/sh mrtg:*:279:279::0:0:MRTG daemon:/nonexistent:/usr/sbin/nologin xymon:*:280:280::0:0:Xymon Monitor:/nonexistent:/usr/sbin/nologin prelude:*:281:281::0:0:Prelude user:/nonexistent:/usr/sbin/nologin +spread:*:282:282::0:0:Spread user:/nonexistent:/usr/sbin/nologin backuppc:*:300:300::0:0:BackupPC pseudo-user:/nonexistent:/usr/sbin/nologin _sphinx:*:312:312::0:0:Sphinxsearch Owner:/nonexistent:/usr/sbin/nologin dkfilter:*:325:325::0:0:DK Filter Owner:/nonexistent:/usr/sbin/nologin diff --git a/net/spread/Makefile b/net/spread/Makefile index 63c8e483eaaf..fd1ea37cab1b 100644 --- a/net/spread/Makefile +++ b/net/spread/Makefile @@ -7,6 +7,7 @@ PORTNAME= spread PORTVERSION= 3.17.4 +PORTREVISION= 1 CATEGORIES= net perl5 MASTER_SITES= http://www.edu-linux.org/down/ DISTNAME= ${PORTNAME}-src-${PORTVERSION} @@ -20,9 +21,15 @@ PORTSCOUT= limit:^3 GNU_CONFIGURE= yes USE_PERL5= yes -USE_RC_SUBR= spread.sh +USE_RC_SUBR= spread USE_LDCONFIG= yes +USERS= spread +GROUPS= spread +RUNDIR= /var/run/spread + +PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR} + MAKE_ARGS+= PTHREAD_CFLAGS=${PTHREAD_CFLAGS} PTHREAD_LIBS=${PTHREAD_LIBS} WRKSRC= ${WRKDIR}/${PORTNAME}-src-${PORTVERSION} @@ -55,9 +62,6 @@ post-build: ${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile @cd ${WRKSRC}/perl/Spread && ${MAKE} -pre-install: - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: .for f in ${HEADERFILES} ${INSTALL_DATA} ${WRKSRC}/${f} ${PREFIX}/include @@ -82,7 +86,7 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/Readme.txt ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/license.txt ${DOCSDIR}/LICENSE .endif + @${INSTALL} -m 750 -o ${USERS} -g ${GROUPS} -d ${RUNDIR} @${CAT} ${PKGMESSAGE} - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.post.mk> diff --git a/net/spread/files/patch-Makefile.in b/net/spread/files/patch-Makefile.in index 382a7bafe925..2a8c851a23e1 100644 --- a/net/spread/files/patch-Makefile.in +++ b/net/spread/files/patch-Makefile.in @@ -1,5 +1,5 @@ ---- Makefile.in Thu Sep 23 12:12:52 2004 -+++ Makefile.in Tue Oct 4 14:49:56 2005 +--- ./Makefile.in.orig 2004-09-23 19:12:52.000000000 +0200 ++++ ./Makefile.in 2012-07-20 21:55:23.000000000 +0200 @@ -26,7 +26,7 @@ #Rules: major -- inc for incompatible change # : minor -- inc for bugfix or forward compatible change @@ -91,15 +91,15 @@ rm -f config.cache config.log docs/*.out core rm -rf autom4te.cache -@@ -254,11 +262,6 @@ - done +@@ -255,11 +263,6 @@ if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ $(buildtoolsdir)/mkinstalldirs $(DESTDIR)$(sysconfdir); \ -- fi + fi - if [ ! -f $(DESTDIR)$(sysconfdir)/spread.conf ]; then \ - $(INSTALL) -m 644 $(srcdir)/sample.spread.conf $(DESTDIR)$(sysconfdir)/spread.conf; \ - else \ - echo "$(DESTDIR)$(sysconfdir)/spread.conf already exists, install will not overwrite"; \ - fi +- fi uninstallall: uninstall + -rm -f $(DESTDIR)$(sysconfdir)/spread.conf diff --git a/net/spread/files/patch-docs::spmonitor.1 b/net/spread/files/patch-docs__spmonitor.1 index 982d5bb32913..982d5bb32913 100644 --- a/net/spread/files/patch-docs::spmonitor.1 +++ b/net/spread/files/patch-docs__spmonitor.1 diff --git a/net/spread/files/patch-docs::spread.1 b/net/spread/files/patch-docs__spread.1 index 6dca20e2b73d..6dca20e2b73d 100644 --- a/net/spread/files/patch-docs::spread.1 +++ b/net/spread/files/patch-docs__spread.1 diff --git a/net/spread/files/patch-perl::Spread::Spread.pm b/net/spread/files/patch-perl__Spread__Spread.pm index a753b18f6b45..a753b18f6b45 100644 --- a/net/spread/files/patch-perl::Spread::Spread.pm +++ b/net/spread/files/patch-perl__Spread__Spread.pm diff --git a/net/spread/files/patch-spread.c b/net/spread/files/patch-spread.c index 0de2385206a1..3c8ef918cac6 100644 --- a/net/spread/files/patch-spread.c +++ b/net/spread/files/patch-spread.c @@ -1,5 +1,5 @@ ---- spread.c Thu Jun 19 00:31:23 2003 -+++ spread.c Mon Dec 8 20:55:41 2003 +--- ./spread.c.orig 2006-11-20 05:53:13.000000000 +0100 ++++ ./spread.c 2012-07-20 21:55:23.000000000 +0200 @@ -48,6 +48,8 @@ #include <pwd.h> #include <unistd.h> @@ -29,12 +29,10 @@ /* initialize each valid authentication protocol */ null_init(); ip_init(); -@@ -193,6 +201,20 @@ - E_handle_events(); - +@@ -195,6 +203,20 @@ return 0; -+} -+ + } + +static void +writepidfile() +{ @@ -47,6 +45,8 @@ + snprintf(pidbuf, sizeof(pidbuf), "%ld\n", (long)getpid()); + write(pidfd, pidbuf, strlen(pidbuf)); + close(pidfd); - } - ++} ++ static void Print_help(void) + { + Alarmp( SPLOG_FATAL, SYSTEM, "Usage: spread\n%s\n%s\n%s\n", diff --git a/net/spread/files/spread.sh.in b/net/spread/files/spread.in index f685ae3dabfc..f685ae3dabfc 100644 --- a/net/spread/files/spread.sh.in +++ b/net/spread/files/spread.in diff --git a/net/spread/pkg-deinstall b/net/spread/pkg-deinstall deleted file mode 100644 index 1bc2206605ca..000000000000 --- a/net/spread/pkg-deinstall +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -USER=spread -GROUP=spread - -echo "===> deinstall note:" -echo " Please note that user ${USER} and group ${GROUP} was not removed" -echo " from this system:" -echo "" - -if pw usershow "${USER}" 2>/dev/null 1>&2; then - echo " To delete spread user permanently" - echo " $ pw userdel ${USER}" - echo "" -fi - -if pw groupshow "${GROUP}" 2>/dev/null 1>&2; then - echo " To delete spread group permanently" - echo " $ pw groupdel ${GROUP}" - echo "" -fi - -exit 0 diff --git a/net/spread/pkg-install b/net/spread/pkg-install deleted file mode 100644 index fbbf68fd7932..000000000000 --- a/net/spread/pkg-install +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -USER=spread -USER_HOMEDIR=/nonexistent -GROUP=spread -RUNDIR=/var/run/spread -NOLOGIN=/sbin/nologin - -case $2 in -PRE-INSTALL) - 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}; 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." - if pw usermod ${USER} -d ${USER_HOMEDIR} - then - echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"." - else - echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed." - exit 1 - fi - else - if pw useradd ${USER} -g ${GROUP} -h - \ - -d ${USER_HOMEDIR} -s ${NOLOGIN} -c "Spread User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - ;; -POST-INSTALL) - if [ ! -d ${RUNDIR} ]; then - install -d -o ${USER} -g ${GROUP} -m 0750 ${RUNDIR} - fi - ;; -*) - echo 'unexpect argument to pkg-install' - ;; -esac diff --git a/net/spread/pkg-plist b/net/spread/pkg-plist index 6046292721a7..7c1fc73bac2c 100644 --- a/net/spread/pkg-plist +++ b/net/spread/pkg-plist @@ -26,3 +26,5 @@ sbin/spread %%EXAMPLESDIR%%/test.pl @dirrm %%EXAMPLESDIR%% @dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Spread +@exec install -m 750 -o %%USERS%% -g %%GROUPS%% -d %%RUNDIR%% +@dirrmtry %%RUNDIR%% diff --git a/net/spread4/Makefile b/net/spread4/Makefile index d85059635854..cc696e14c17e 100644 --- a/net/spread4/Makefile +++ b/net/spread4/Makefile @@ -7,6 +7,7 @@ PORTNAME= spread4 PORTVERSION= 4.1.0 +PORTREVISION= 1 CATEGORIES= net perl5 MASTER_SITES= LOCAL/wen DISTNAME= spread-src-${PORTVERSION} @@ -16,10 +17,16 @@ COMMENT= The Spread Group Communication System, a network toolkit GNU_CONFIGURE= yes USE_GMAKE= yes -USE_RC_SUBR= spread.sh +USE_RC_SUBR= spread USE_LDCONFIG= yes ALL_TARGET= all +USERS= spread +GROUPS= spread +RUNDIR= /var/run/spread + +PLIST_SUB+= USERS=${USERS} GROUPS=${GROUPS} RUNDIR=${RUNDIR} + WRKSRC= ${WRKDIR}/spread-src-${PORTVERSION} PKGMESSAGE= ${WRKSRC}/license.txt @@ -43,9 +50,6 @@ post-extract: @${REINPLACE_CMD} -e 's|INSTALLSUBDIRS=daemon docs|INSTALLSUBDIRS=daemon|' \ ${WRKSRC}/Makefile.in -pre-install: - ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - post-install: ${INSTALL_DATA} ${WRKSRC}/docs/sample.spread.conf \ ${PREFIX}/etc/spread.conf.sample @@ -76,8 +80,7 @@ post-install: .for f in ${MAN3} ${INSTALL_MAN} ${WRKSRC}/docs/${f} ${LOCALBASE}/man/man3/ .endfor - + @${INSTALL} -m 750 -o ${USERS} -g ${GROUPS} -d ${RUNDIR} @${CAT} ${PKGMESSAGE} - ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL .include <bsd.port.post.mk> diff --git a/net/spread4/files/patch-docs-sample.spread.conf b/net/spread4/files/patch-docs__sample.spread.conf index 523958f95941..523958f95941 100644 --- a/net/spread4/files/patch-docs-sample.spread.conf +++ b/net/spread4/files/patch-docs__sample.spread.conf diff --git a/net/spread4/files/patch-docs::spmonitor.1 b/net/spread4/files/patch-docs__spmonitor.1 index 982d5bb32913..982d5bb32913 100644 --- a/net/spread4/files/patch-docs::spmonitor.1 +++ b/net/spread4/files/patch-docs__spmonitor.1 diff --git a/net/spread4/files/patch-docs::spread.1 b/net/spread4/files/patch-docs__spread.1 index 6dca20e2b73d..6dca20e2b73d 100644 --- a/net/spread4/files/patch-docs::spread.1 +++ b/net/spread4/files/patch-docs__spread.1 diff --git a/net/spread4/files/spread.sh.in b/net/spread4/files/spread.in index 6e5b76fc4fac..6e5b76fc4fac 100644 --- a/net/spread4/files/spread.sh.in +++ b/net/spread4/files/spread.in diff --git a/net/spread4/pkg-deinstall b/net/spread4/pkg-deinstall deleted file mode 100644 index 1bc2206605ca..000000000000 --- a/net/spread4/pkg-deinstall +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ - -if [ "$2" != "POST-DEINSTALL" ]; then - exit 0 -fi - -USER=spread -GROUP=spread - -echo "===> deinstall note:" -echo " Please note that user ${USER} and group ${GROUP} was not removed" -echo " from this system:" -echo "" - -if pw usershow "${USER}" 2>/dev/null 1>&2; then - echo " To delete spread user permanently" - echo " $ pw userdel ${USER}" - echo "" -fi - -if pw groupshow "${GROUP}" 2>/dev/null 1>&2; then - echo " To delete spread group permanently" - echo " $ pw groupdel ${GROUP}" - echo "" -fi - -exit 0 diff --git a/net/spread4/pkg-install b/net/spread4/pkg-install deleted file mode 100644 index fbbf68fd7932..000000000000 --- a/net/spread4/pkg-install +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -USER=spread -USER_HOMEDIR=/nonexistent -GROUP=spread -RUNDIR=/var/run/spread -NOLOGIN=/sbin/nologin - -case $2 in -PRE-INSTALL) - 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}; 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." - if pw usermod ${USER} -d ${USER_HOMEDIR} - then - echo "Changed home directory of \"${USER}\" to \"${USER_HOMEDIR}\"." - else - echo "Changing home directory of \"${USER}\" to \"${USER_HOMEDIR}\" failed." - exit 1 - fi - else - if pw useradd ${USER} -g ${GROUP} -h - \ - -d ${USER_HOMEDIR} -s ${NOLOGIN} -c "Spread User" - then - echo "Added user \"${USER}\"." - else - echo "Adding user \"${USER}\" failed..." - exit 1 - fi - fi - ;; -POST-INSTALL) - if [ ! -d ${RUNDIR} ]; then - install -d -o ${USER} -g ${GROUP} -m 0750 ${RUNDIR} - fi - ;; -*) - echo 'unexpect argument to pkg-install' - ;; -esac diff --git a/net/spread4/pkg-plist b/net/spread4/pkg-plist index fb102fcf6f78..2324bb6df796 100644 --- a/net/spread4/pkg-plist +++ b/net/spread4/pkg-plist @@ -33,3 +33,5 @@ sbin/spread %%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%%%DOCSDIR%%/PORTING %%PORTDOCS%%@dirrm %%DOCSDIR%% +@exec install -m 750 -o %%USERS%% -g %%GROUPS%% -d %%RUNDIR%% +@dirrmtry %%RUNDIR%% |