diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-08-19 07:45:34 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-08-19 07:45:34 +0000 |
commit | 87239ae6b56c9bdac3676c2e7c11bc5aedb9855d (patch) | |
tree | de0e83df59421238560b2061367a73458333857f /main | |
parent | 3b485b56c7cd847d57795dc259642418a555de15 (diff) | |
download | aports-87239ae6b56c9bdac3676c2e7c11bc5aedb9855d.tar.bz2 aports-87239ae6b56c9bdac3676c2e7c11bc5aedb9855d.tar.xz |
main/amavisd-new: create users in pre-install, set perms in post-install
remove use of users in APKBUILD, we still dont support this,
but will later
Diffstat (limited to 'main')
-rw-r--r-- | main/amavisd-new/APKBUILD | 17 | ||||
-rwxr-xr-x | main/amavisd-new/amavisd-new.post-install | 15 | ||||
-rwxr-xr-x | main/amavisd-new/amavisd-new.pre-install | 4 |
3 files changed, 13 insertions, 23 deletions
diff --git a/main/amavisd-new/APKBUILD b/main/amavisd-new/APKBUILD index c6c79173af..10d98696e8 100644 --- a/main/amavisd-new/APKBUILD +++ b/main/amavisd-new/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Leonardo Arena <rnalrd@gmail.com> pkgname=amavisd-new pkgver=2.6.3 -pkgrel=0 +pkgrel=1 pkgdesc="High-performance interface between mailer (MTA) and content checkers" url="http://www.ijs.si/software/amavisd" license="GPL-2" @@ -10,10 +10,9 @@ depends="uclibc sed file perl perl-archive-zip perl-convert-tnef perl-convert-uulib perl-mime-tools perl-mail-tools perl-net-server perl-io-stringy perl-unix-syslog perl-db perl-mail-dkim" makedepends="" -install="$pkgname.post-install" +install="$pkgname.post-install $pkgname.pre-install" subpackages="" -source="http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.gz -$pkgname.post-install" +source="http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.gz" build() { cd "$srcdir/$pkgname-$pkgver" @@ -27,10 +26,7 @@ build() { for dir in $DIRS do - if [ ! -d "${pkgdir}$dir" ]; then - mkdir -p ${pkgdir}$dir - fi - chown -R amavis.amavis $HOME + mkdir -p ${pkgdir}$dir done install -m 755 -o root -D amavisd $pkgdir/usr/sbin/amavisd @@ -42,10 +38,9 @@ build() { -e "s:^.*\$QUARANTINEDIR = .*$:\$QUARANTINEDIR = '$QUARANTINE';:" \ -e "s:^.*\$daemon_user = 'vscan';\(.*\)$:\$daemon_user = 'amavis';\1:" \ -e "s:^.*\$daemon_group = 'vscan';\(.*\)$:\$daemon_group = 'amavis';\1:" < amavisd.conf > amavisd.conf.alpine - install -m 640 -o root -g amavis -D amavisd.conf.alpine ${pkgdir}${CONFIG} + install -m 640 -o root -D amavisd.conf.alpine ${pkgdir}${CONFIG} install -m 755 -D ../../amavisd.init $pkgdir/etc/init.d/amavisd ) } -md5sums="02b0bd38b40258841c60479603dc6842 amavisd-new-2.6.3.tar.gz -4b5cb0c750ab11d9d211a4e389545d6d amavisd-new.post-install" +md5sums="02b0bd38b40258841c60479603dc6842 amavisd-new-2.6.3.tar.gz" diff --git a/main/amavisd-new/amavisd-new.post-install b/main/amavisd-new/amavisd-new.post-install index 56cad39f52..2c5ea2cf65 100755 --- a/main/amavisd-new/amavisd-new.post-install +++ b/main/amavisd-new/amavisd-new.post-install @@ -1,14 +1,5 @@ #!/bin/sh -HOME=/var/amavis -QUARANTINE=$HOME/quarantine -USER=amavis -GROUP=amavis -DIRS="$HOME $HOME/tmp $HOME/var $HOME/db $HOME/home $QUARANTINE" -CONFIG=/etc/amavisd.conf - -addgroup $USER -adduser -h $HOME -s /bin/false -G $GROUP -D $USER -chown -R $USER:$GROUP $HOME -chmod -R 750 $HOME -chown root:$GROUP $CONFIG +chown -R amavis:amavis /var/amavis +chmod -R 750 /var/amavis +chown root:amavis /etc/amavisd.conf diff --git a/main/amavisd-new/amavisd-new.pre-install b/main/amavisd-new/amavisd-new.pre-install new file mode 100755 index 0000000000..aaaa763c80 --- /dev/null +++ b/main/amavisd-new/amavisd-new.pre-install @@ -0,0 +1,4 @@ +#!/bin/sh + +addgroup amavis +adduser -D -S -G amavis -h /var/amavis -s /bin/false amavis |