aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-09-03 07:38:58 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-09-03 07:39:50 +0000
commit7da8992147bf5e51939f03f5d9f60c3ce03e16e0 (patch)
treeaca8095a62cf7c7c3c9e05813026a9255ce7571b
parent7be684889a0de03b8dd79517934b277af083d6c9 (diff)
downloadaports-7da8992147bf5e51939f03f5d9f60c3ce03e16e0.tar.bz2
aports-7da8992147bf5e51939f03f5d9f60c3ce03e16e0.tar.xz
main/amavisd-new: set permissions in package, use /sbin/nologin
-rw-r--r--main/amavisd-new/APKBUILD14
-rwxr-xr-xmain/amavisd-new/amavisd-new.post-install5
-rwxr-xr-xmain/amavisd-new/amavisd-new.pre-install2
3 files changed, 13 insertions, 8 deletions
diff --git a/main/amavisd-new/APKBUILD b/main/amavisd-new/APKBUILD
index 59a5781381..9a89b1ac69 100644
--- a/main/amavisd-new/APKBUILD
+++ b/main/amavisd-new/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=amavisd-new
pkgver=2.8.1
-pkgrel=0
+pkgrel=1
pkgdesc="High-performance interface between mailer (MTA) and content checkers"
url="http://www.ijs.si/software/amavisd"
arch="noarch"
@@ -11,11 +11,17 @@ depends="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 $pkgname.pre-install"
+install="$pkgname.pre-install"
subpackages=""
source="http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.gz"
+pkgusers="amavis"
+pkggroups="amavis"
build() {
+ return 0
+}
+
+package() {
cd "$srcdir/$pkgname-$pkgver"
(
HOME=/var/amavis
@@ -42,6 +48,10 @@ build() {
install -m 640 -o root -D amavisd.conf.alpine ${pkgdir}${CONFIG}
install -m 755 -D ../../amavisd.init $pkgdir/etc/init.d/amavisd
)
+
+ chown -R amavis:amavis "$pkgdir"/var/amavis
+ chmod -R 750 "$pkgdir"/var/amavis
+ chown root:amavis "$pkgdir"/etc/amavisd.conf
}
md5sums="f6f9abd1aac05521bdcb3754d09f5314 amavisd-new-2.8.1.tar.gz"
diff --git a/main/amavisd-new/amavisd-new.post-install b/main/amavisd-new/amavisd-new.post-install
deleted file mode 100755
index 2c5ea2cf65..0000000000
--- a/main/amavisd-new/amavisd-new.post-install
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-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
index 167ec16d6d..431d9ab3f4 100755
--- a/main/amavisd-new/amavisd-new.pre-install
+++ b/main/amavisd-new/amavisd-new.pre-install
@@ -1,6 +1,6 @@
#!/bin/sh
addgroup amavis 2>/dev/null
-adduser -D -S -G amavis -h /var/amavis -s /bin/false amavis 2>/dev/null
+adduser -D -S -G amavis -h /var/amavis -s /sbin/nologin amavis 2>/dev/null
exit 0