[arch-commits] Commit in pdnsd/trunk (PKGBUILD pdnsd.install)
Date: Friday, May 20, 2016 @ 13:45:55 Author: spupykin Revision: 175860 upgpkg: pdnsd 1.2.9.a-11 upd Modified: pdnsd/trunk/PKGBUILD pdnsd/trunk/pdnsd.install ---+ PKGBUILD |2 +- pdnsd.install |4 2 files changed, 5 insertions(+), 1 deletion(-) Modified: PKGBUILD === --- PKGBUILD2016-05-20 10:14:22 UTC (rev 175859) +++ PKGBUILD2016-05-20 11:45:55 UTC (rev 175860) @@ -6,7 +6,7 @@ pkgname=pdnsd pkgver=1.2.9.a _pkgver=${pkgver/.a/a} -pkgrel=10 +pkgrel=11 pkgdesc="Proxy DNS server with permanent caching" arch=(i686 x86_64) url="http://members.home.nl/p.a.rombouts/pdnsd/; Modified: pdnsd.install === --- pdnsd.install 2016-05-20 10:14:22 UTC (rev 175859) +++ pdnsd.install 2016-05-20 11:45:55 UTC (rev 175860) @@ -18,4 +18,8 @@ echo You may now restart the pdnsd service. fi + + if [[ $(vercmp $2 1.2.9.a-10) -le 0 ]]; then +echo "Default config is in usr/share/doc/pdnsd/, restore your .pacsave or copy default one" + fi }
[arch-commits] Commit in pdnsd/trunk (PKGBUILD pdnsd.install)
Date: Tuesday, February 10, 2015 @ 18:18:48 Author: spupykin Revision: 127513 upgpkg: pdnsd 1.2.9.a-8 upd Modified: pdnsd/trunk/PKGBUILD pdnsd/trunk/pdnsd.install ---+ PKGBUILD |5 + pdnsd.install | 10 ++ 2 files changed, 3 insertions(+), 12 deletions(-) Modified: PKGBUILD === --- PKGBUILD2015-02-10 17:18:44 UTC (rev 127512) +++ PKGBUILD2015-02-10 17:18:48 UTC (rev 127513) @@ -6,7 +6,7 @@ pkgname=pdnsd pkgver=1.2.9.a _pkgver=${pkgver/.a/a} -pkgrel=7 +pkgrel=8 pkgdesc=Proxy DNS server with permanent caching arch=(i686 x86_64) url=http://members.home.nl/p.a.rombouts/pdnsd/; @@ -29,11 +29,8 @@ cd $srcdir/$pkgname-$_pkgver make DESTDIR=$pkgdir install install -Dm0644 ../service $pkgdir/usr/lib/systemd/system/pdnsd.service - # Rename the configuration file, so users get pacnew files. mv $pkgdir/etc/pdnsd.conf.sample $pkgdir/etc/pdnsd.conf - sed -i 's/nobody/pdnsd/' $pkgdir/etc/pdnsd.conf - chown -R 184:184 $pkgdir/var/cache/pdnsd } Modified: pdnsd.install === --- pdnsd.install 2015-02-10 17:18:44 UTC (rev 127512) +++ pdnsd.install 2015-02-10 17:18:48 UTC (rev 127513) @@ -1,6 +1,6 @@ post_install() { - getent group pdnsd /dev/null || groupadd -g 184 pdnsd /dev/null - getent passwd pdnsd /dev/null || useradd -u 184 -g pdnsd -d /var/cache/pdnsd -c 'Proxy DNS server' -s /bin/nologin pdnsd /dev/null + getent group pdnsd /dev/null || groupadd -r -g 184 pdnsd /dev/null + getent passwd pdnsd /dev/null || useradd -r -u 184 -g pdnsd -d /var/cache/pdnsd -c 'Proxy DNS server' -s /bin/nologin pdnsd /dev/null true } @@ -19,9 +19,3 @@ echo You may now restart the pdnsd service. fi } - -post_remove() { - getent passwd pdnsd /dev/null userdel pdnsd /dev/null - getent group pdnsd /dev/null groupdel pdnsd /dev/null - true -}
[arch-commits] Commit in pdnsd/trunk (PKGBUILD pdnsd.install)
Date: Wednesday, March 26, 2014 @ 12:03:08 Author: thestinger Revision: 108296 upgpkg: pdnsd 1.2.9.a-6 The service needs to be stopped in order to delete the old user/group. The home directory was also specified incorrectly. Modified: pdnsd/trunk/PKGBUILD pdnsd/trunk/pdnsd.install ---+ PKGBUILD |2 +- pdnsd.install |9 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) Modified: PKGBUILD === --- PKGBUILD2014-03-26 11:03:04 UTC (rev 108295) +++ PKGBUILD2014-03-26 11:03:08 UTC (rev 108296) @@ -6,7 +6,7 @@ pkgname=pdnsd pkgver=1.2.9.a _pkgver=${pkgver/.a/a} -pkgrel=5 +pkgrel=6 pkgdesc=Proxy DNS server with permanent caching arch=(i686 x86_64) url=http://members.home.nl/p.a.rombouts/pdnsd/; Modified: pdnsd.install === --- pdnsd.install 2014-03-26 11:03:04 UTC (rev 108295) +++ pdnsd.install 2014-03-26 11:03:08 UTC (rev 108296) @@ -1,11 +1,14 @@ post_install() { getent group pdnsd /dev/null || groupadd -g 184 pdnsd /dev/null - getent passwd pdnsd /dev/null || useradd -u 184 -g pdnsd -d /var/lib/pdnsd -c 'Proxy DNS server' -s /bin/nologin pdnsd /dev/null + getent passwd pdnsd /dev/null || useradd -u 184 -g pdnsd -d /var/cache/pdnsd -c 'Proxy DNS server' -s /bin/nologin pdnsd /dev/null true } post_upgrade() { - if [[ $(vercmp $2 1.2.9.a-5) -le 0 ]]; then + if [[ $(vercmp $2 1.2.9.a-6) -le 0 ]]; then +echo Stopping pdnsd service in order to modify the user/group. +systemctl stop pdnsd + # in case the user/group were already created as recommended by the wiki userdel pdnsd /dev/null groupdel pdnsd /dev/null @@ -12,6 +15,8 @@ post_install chown -R 184:184 /var/cache/pdnsd + +echo You may now restart the pdnsd service. fi }
[arch-commits] Commit in pdnsd/trunk (PKGBUILD pdnsd.install)
Date: Tuesday, March 25, 2014 @ 03:20:56 Author: thestinger Revision: 108219 pdnsd: run as pdnsd user, not root This also renames /etc/pdnsd.conf.sample to /etc/pdnsd.conf in order to generate pacnew files. Otherwise, upgrades like this would cause silent breakage. Added: pdnsd/trunk/pdnsd.install Modified: pdnsd/trunk/PKGBUILD ---+ PKGBUILD | 24 +--- pdnsd.install | 22 ++ 2 files changed, 39 insertions(+), 7 deletions(-) Modified: PKGBUILD === --- PKGBUILD2014-03-25 01:00:48 UTC (rev 108218) +++ PKGBUILD2014-03-25 02:20:56 UTC (rev 108219) @@ -1,16 +1,19 @@ # $Id$ # Maintainer: Sergej Pupykin pupykin.s+a...@gmail.com +# Contributor: Daniel Micay danielmi...@gmail.com # Contributor: Henrik Nymann Jensen h...@henriknj.dk pkgname=pdnsd pkgver=1.2.9.a _pkgver=${pkgver/.a/a} -pkgrel=4 +pkgrel=5 pkgdesc=Proxy DNS server with permanent caching arch=(i686 x86_64) url=http://members.home.nl/p.a.rombouts/pdnsd/; license=('GPL') depends=('glibc') +backup=(etc/pdnsd.conf) +install=${pkgname}.install source=(http://members.home.nl/p.a.rombouts/pdnsd/releases/pdnsd-$_pkgver-par.tar.gz service) md5sums=('2f3e705d59a0f9308ad9504b24400769' @@ -17,13 +20,20 @@ '4f86bdbd8495b53341070d5720491996') build() { - cd $srcdir/$pkgname-${_pkgver} - ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --enable-ipv6 - make + cd $srcdir/$pkgname-$_pkgver + ./configure --prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --enable-ipv6 + make } package() { - cd $srcdir/$pkgname-${_pkgver} - make DESTDIR=$pkgdir install - install -Dm0644 $srcdir/service $pkgdir/usr/lib/systemd/system/pdnsd.service + cd $srcdir/$pkgname-$_pkgver + make DESTDIR=$pkgdir install + install -Dm0644 ../service $pkgdir/usr/lib/systemd/system/pdnsd.service + + # Rename the configuration file, so users get pacnew files. + mv $pkgdir/etc/pdnsd.conf.sample $pkgdir/etc/pdnsd.conf + + sed -i 's/nobody/pdnsd/' $pkgdir/etc/pdnsd.conf + + chown 184:184 $pkgdir/var/cache/pdnsd } Added: pdnsd.install === --- pdnsd.install (rev 0) +++ pdnsd.install 2014-03-25 02:20:56 UTC (rev 108219) @@ -0,0 +1,22 @@ +post_install() { + getent group pdnsd /dev/null || groupadd -g 184 pdnsd /dev/null + getent passwd pdnsd /dev/null || useradd -u 184 -g pdnsd -d /var/lib/pdnsd -c 'Proxy DNS server' -s /bin/nologin pdnsd /dev/null + true +} + +post_upgrade() { + if [[ $(vercmp $2 1.2.9.a-5) -le 0 ]]; then +# in case the user/group were already created as recommended by the wiki +userdel pdnsd /dev/null +groupdel pdnsd /dev/null + +post_install +chown -R 184:184 /var/cache/pdnsd + fi +} + +post_remove() { + getent passwd pdnsd /dev/null userdel pdnsd /dev/null + getent group pdnsd /dev/null groupdel pdnsd /dev/null + true +}