From 3eb9e5230d94d9b23af1f60c99e27fc460ab021f Mon Sep 17 00:00:00 2001 From: sturm Date: Sun, 22 Jun 2003 14:07:21 +0000 Subject: [PATCH] - use new username schema - remove Sebastian Stark as MAINTAINER by his request - bump PKGNAME --- net/pdnsd/Makefile | 7 ++-- net/pdnsd/patches/patch-Makefile_in | 4 +-- net/pdnsd/patches/patch-doc_Makefile_in | 4 +-- net/pdnsd/pkg/DEINSTALL | 3 +- net/pdnsd/pkg/INSTALL | 43 ++++++++++++++++--------- 5 files changed, 36 insertions(+), 25 deletions(-) diff --git a/net/pdnsd/Makefile b/net/pdnsd/Makefile index 86394a07b9d..a561b435dbd 100644 --- a/net/pdnsd/Makefile +++ b/net/pdnsd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.8 2002/12/29 21:14:11 fgsch Exp $ +# $OpenBSD: Makefile,v 1.9 2003/06/22 14:07:21 sturm Exp $ # Uses pthreads COMMENT= "threaded DNS daemon, optimized for caching" @@ -8,11 +8,10 @@ COMMENT= "threaded DNS daemon, optimized for caching" ONLY_FOR_ARCHS= i386 DISTNAME= pdnsd-1.1.7a +PKGNAME= ${DISTNAME}p0 CATEGORIES= net HOMEPAGE= http://home.t-online.de/home/Moestl/ -MAINTAINER= Sebastian Stark - # GPLv2 PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes @@ -30,7 +29,7 @@ CONFIGURE_ARGS+= --with-target=BSD \ --with-random-device=arc4random \ --enable-strict-rfc2181 \ --with-cachedir="/var/pdnsd" \ - --with-default-id=pdnsd + --with-default-id=_pdnsd DOCFILES= faq.txt intro.txt manual.txt diff --git a/net/pdnsd/patches/patch-Makefile_in b/net/pdnsd/patches/patch-Makefile_in index 2d8eb15d474..46c512c4a74 100644 --- a/net/pdnsd/patches/patch-Makefile_in +++ b/net/pdnsd/patches/patch-Makefile_in @@ -1,4 +1,4 @@ -$OpenBSD: patch-Makefile_in,v 1.1 2001/07/15 19:17:00 naddy Exp $ +$OpenBSD: patch-Makefile_in,v 1.2 2003/06/22 14:07:21 sturm Exp $ --- Makefile.in.orig Mon Jul 2 21:37:32 2001 +++ Makefile.in Sun Jul 15 20:42:16 2001 @@ -374,7 +374,7 @@ install-data-hook: @@ -6,7 +6,7 @@ $OpenBSD: patch-Makefile_in,v 1.1 2001/07/15 19:17:00 naddy Exp $ touch $(DESTDIR)$(cachedir)/pdnsd.cache; \ fi - if test `whoami` = "root"; then \ -+ if test `userinfo -e pdnsd`; then \ ++ if test `userinfo -e _pdnsd`; then \ chown $(def_id) $(DESTDIR)$(cachedir)/pdnsd.cache; \ chown $(def_id) $(DESTDIR)$(cachedir); \ fi diff --git a/net/pdnsd/patches/patch-doc_Makefile_in b/net/pdnsd/patches/patch-doc_Makefile_in index bfbfbe8b2c7..aeb82bfc8a5 100644 --- a/net/pdnsd/patches/patch-doc_Makefile_in +++ b/net/pdnsd/patches/patch-doc_Makefile_in @@ -1,4 +1,4 @@ -$OpenBSD: patch-doc_Makefile_in,v 1.2 2002/01/08 00:51:27 naddy Exp $ +$OpenBSD: patch-doc_Makefile_in,v 1.3 2003/06/22 14:07:21 sturm Exp $ --- doc/Makefile.in.orig Mon Jan 7 20:30:11 2002 +++ doc/Makefile.in Tue Jan 8 00:02:01 2002 @@ -230,7 +230,7 @@ maintainer-clean-generic clean mostlycle @@ -6,7 +6,7 @@ $OpenBSD: patch-doc_Makefile_in,v 1.2 2002/01/08 00:51:27 naddy Exp $ install-data-hook: $(mkinstalldirs) $(DESTDIR)/$(sysconfdir) - if test `whoami` = "root"; then \ -+ if test `userinfo -e pdnsd`; then \ ++ if test `userinfo -e _pdnsd`; then \ $(INSTALL) -o 0 -g 0 -m 644 pdnsd.conf $(DESTDIR)/$(sysconfdir)/pdnsd.conf.sample ; \ else \ $(INSTALL) -m 644 pdnsd.conf $(DESTDIR)/$(sysconfdir)/pdnsd.conf.sample ; \ diff --git a/net/pdnsd/pkg/DEINSTALL b/net/pdnsd/pkg/DEINSTALL index 7acd6f1a9c6..356310632f3 100644 --- a/net/pdnsd/pkg/DEINSTALL +++ b/net/pdnsd/pkg/DEINSTALL @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: DEINSTALL,v 1.1.1.1 2001/06/14 14:46:07 camield Exp $ +# $OpenBSD: DEINSTALL,v 1.2 2003/06/22 14:07:22 sturm Exp $ # # De-installation setup of pdnsd @@ -19,6 +19,7 @@ do_notice() echo "| To completely deinstall the $1 package you need to perform" echo "| these steps as root:" echo "|" + echo "| rmuser _pdnsd" echo "| rm -f ${CONFIG_DIR}/pdnsd.conf" echo "| rm -rf /var/pdnsd" echo "| rm -f /var/run/pdnsd.pid" diff --git a/net/pdnsd/pkg/INSTALL b/net/pdnsd/pkg/INSTALL index 6a783bc231f..d78f44ea7b1 100644 --- a/net/pdnsd/pkg/INSTALL +++ b/net/pdnsd/pkg/INSTALL @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: INSTALL,v 1.2 2003/05/10 15:25:25 sturm Exp $ +# $OpenBSD: INSTALL,v 1.3 2003/06/22 14:07:22 sturm Exp $ # # Pre/post-installation setup of pdnsd @@ -10,31 +10,31 @@ PREFIX=${PKG_PREFIX:-/usr/local} CONFIG_DIR=${SYSCONFDIR} SAMPLE_CONFIG_DIR=$PREFIX/share/examples/pdnsd CACHE_DIR=/var/pdnsd -ID=pdnsd +PDNSD=_pdnsd +ID=510 # Function: user "pdnsd" is not available # do_add_user() { - groupinfo -e ${ID} + groupinfo -e ${PDNSD} if [ $? -eq 0 ]; then - echo "===> Using existing group '${ID}'" + echo "===> Using existing group '${PDNSD}'" else - echo "===> Creating group '${ID}'" - groupadd ${ID} + echo "===> Creating group '${PDNSD}'" + groupadd -g ${ID} ${PDNSD} fi - userinfo -e ${ID} + userinfo -e ${PDNSD} if [ $? -eq 0 ]; then - echo "===> Using existing account '${ID}'" + echo "===> Using existing account '${PDNSD}'" else - echo "===> Creating user '${ID}'" - useradd -g ${ID} \ + echo "===> Creating user '${PDNSD}'" + useradd -g ${PDNSD} \ -c "Proxy DNS Server" \ - -m -d /nonexistent \ + -d /nonexistent \ -s /sbin/nologin \ - -p \* \ - ${ID} + -u ${ID} ${PDNSD} fi } @@ -63,9 +63,9 @@ echo "+---------------" # do_install_cachedir() { -install -d -o ${ID} -g ${ID} ${CACHE_DIR} +install -d -o ${PDNSD} -g ${PDNSD} ${CACHE_DIR} dd if=/dev/zero of=${CACHE_DIR}/pdnsd.cache bs=1 count=4 2>/dev/null -chown ${ID}:${ID} ${CACHE_DIR}/pdnsd.cache +chown ${PDNSD}:${PDNSD} ${CACHE_DIR}/pdnsd.cache echo echo "+---------------" echo "| The $1 caching directory has been installed in ${CACHE_DIR}." @@ -106,7 +106,17 @@ do_notice_docs() echo "+---------------" } - +do_warning() +{ + echo + echo "+---------------" + echo "| WARNING!" + echo "|" + echo "| This port has changed its user/group from 'pdnsd' to '_pdnsd'." + echo "| If you installed this port before, ensure all permissions are set" + echo "| correctly and then \"rmuser pdnsd\"." + echo "+---------------" +} # Verify proper execution # @@ -135,6 +145,7 @@ case $2 in do_notice_cachedir "$1" fi do_notice_docs "$1" + do_warning ;; *) echo "usage: $0 distname { PRE-INSTALL | POST-INSTALL }" >&2