Date: Saturday, February 10, 2018 @ 14:52:33 Author: bluewind Revision: 316586
Switch to systemd-sysusers upgpkg: spamassassin 3.4.1-11 Modified: spamassassin/trunk/PKGBUILD spamassassin/trunk/spamassassin.install ----------------------+ PKGBUILD | 5 ++++- spamassassin.install | 13 ------------- 2 files changed, 4 insertions(+), 14 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-02-10 14:47:52 UTC (rev 316585) +++ PKGBUILD 2018-02-10 14:52:33 UTC (rev 316586) @@ -4,7 +4,7 @@ # Contributor: Manolis Tzanidakis pkgname=spamassassin pkgver=3.4.1 -pkgrel=10 +pkgrel=11 pkgdesc="A mail filter to identify spam." arch=('x86_64') license=('APACHE') @@ -77,4 +77,7 @@ install -D -m644 "${srcdir}/spamassassin.service" "${pkgdir}/usr/lib/systemd/system/spamassassin.service" install -d -o 182 -g 182 -m 755 "$pkgdir/var/lib/spamassassin" + + echo 'u spamd 182 - /var/lib/spamassassin' | + install -Dm644 /dev/stdin "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf } Modified: spamassassin.install =================================================================== --- spamassassin.install 2018-02-10 14:47:52 UTC (rev 316585) +++ spamassassin.install 2018-02-10 14:52:33 UTC (rev 316586) @@ -1,21 +1,8 @@ -setup_user() { - getent group spamd &>/dev/null || groupadd -g 182 spamd >/dev/null - getent passwd spamd &>/dev/null || useradd -u 182 -d /var/lib/spamassassin -g spamd -s /bin/false spamd >/dev/null - - if [[ -d /var/lib/spamassassin ]]; then - chown spamd:spamd /var/lib/spamassassin - fi - - true -} - post_install() { echo "You must run 'sa-update' to install spam rules before use." - setup_user } post_upgrade() { - setup_user if [ "$(vercmp $2 3.4)" -lt 0 ]; then echo '/var/lib/spamassassin is now owned by the spamd user. spamassassin.service' echo 'will also run under that user. You may need to adjust your setup.'