summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOleksandr Natalenko2017-03-05 11:14:37 +0100
committerOleksandr Natalenko2017-03-05 11:14:37 +0100
commit4f1c65baf2f4b19248e6544d165719bbea093b4b (patch)
treeac1402478e4abd64f5d6e78eee7c42b9a592d616
parent4f94c2ffec39404da4431232251ec0c4c43983c6 (diff)
downloadaur-4f1c65baf2f4b19248e6544d165719bbea093b4b.tar.gz
use tmpfiles.d and sysusers.d
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD20
-rw-r--r--rspamd.install16
-rw-r--r--rspamd.sysuser1
-rw-r--r--rspamd.tmpfile2
5 files changed, 27 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 6b9f0644927e..e56e1f9829a6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Mar 4 18:31:17 UTC 2017
+# Sun Mar 5 10:14:17 UTC 2017
pkgbase = rspamd
pkgdesc = Fast, free and open-source spam filtering system.
pkgver = 1.5.1
- pkgrel = 4
+ pkgrel = 6
url = http://rspamd.com
install = rspamd.install
arch = x86_64
@@ -66,7 +66,11 @@ pkgbase = rspamd
backup = etc/rspamd/worker-fuzzy.inc
backup = etc/rspamd/worker-normal.inc
source = https://www.rspamd.com/downloads/rspamd-1.5.1.tar.xz
+ source = rspamd.tmpfile
+ source = rspamd.sysuser
sha256sums = 18e0f15d0121c3971cd11e7db1e15c0634289b1493b88656088fed0db92bc220
+ sha256sums = f89edae5436a3c14e58210fb5c1d5bdd2f8a6f98c03dbc150ea9ff1a3fcfe441
+ sha256sums = 59646874a5036f3f26cac2898a2f60713fe6147b3c60ee964494f07b6acc313f
pkgname = rspamd
diff --git a/PKGBUILD b/PKGBUILD
index 4284f948b716..f6e8ab537b86 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
# Former maintainer: Andrew Lewis <nerf@judo.za.org>
pkgname=rspamd
pkgver=1.5.1
-pkgrel=4
+pkgrel=6
epoch=
pkgdesc="Fast, free and open-source spam filtering system."
arch=('x86_64' 'i686' 'mips64el')
@@ -56,11 +56,16 @@ backup=('etc/rspamd/2tld.inc'
'etc/rspamd/worker-fuzzy.inc'
'etc/rspamd/worker-normal.inc')
-install=rspamd.install
+install="rspamd.install"
-source=("https://www.rspamd.com/downloads/${pkgname}-${pkgver}.tar.xz")
+source=("https://www.rspamd.com/downloads/${pkgname}-${pkgver}.tar.xz"
+ "${pkgname}.tmpfile"
+ "${pkgname}.sysuser"
+ )
-sha256sums=('18e0f15d0121c3971cd11e7db1e15c0634289b1493b88656088fed0db92bc220')
+sha256sums=('18e0f15d0121c3971cd11e7db1e15c0634289b1493b88656088fed0db92bc220'
+ 'f89edae5436a3c14e58210fb5c1d5bdd2f8a6f98c03dbc150ea9ff1a3fcfe441'
+ '59646874a5036f3f26cac2898a2f60713fe6147b3c60ee964494f07b6acc313f')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -76,13 +81,16 @@ build() {
-DWANT_SYSTEMD_UNITS=ON \
.
- make -j1
+ make -j$(nproc)
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}/" install
- install -Dm0644 'LICENSE' "${pkgdir}/usr/share/${pkgname}/LICENSE"
+ install -Dm0644 "LICENSE" "${pkgdir}/usr/share/${pkgname}/LICENSE"
+ install -Dm0644 "../${pkgname}.tmpfile" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
+ install -Dm0644 "../${pkgname}.sysuser" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
}
+# vim: set tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab
diff --git a/rspamd.install b/rspamd.install
index 2261599e8d34..705c21dbe07a 100644
--- a/rspamd.install
+++ b/rspamd.install
@@ -1,20 +1,12 @@
## arg 1: the new package version
post_install() {
- if ! getent passwd _rspamd >/dev/null; then
- useradd -k /dev/null -r -m -c 'rspam daemon' -d /var/lib/rspamd -s /sbin/nologin _rspamd
- passwd -l _rspamd >/dev/null
- fi
- mkdir -p /var/log/rspamd
- mkdir -p /run/rspamd
- chown _rspamd:_rspamd /var/log/rspamd
- chown _rspamd:_rspamd /run/rspamd
+ systemd-sysusers rspamd.conf
+ systemd-tmpfiles --create rspamd.conf
}
## arg 1: the old package version
post_remove() {
- if getent passwd _rspamd >/dev/null; then
- userdel _rspamd
- fi
+ true
}
-# vim:set ts=2 sw=2 et:
+# vim: set tabstop=4:softtabstop=4:shiftwidth=4:noexpandtab
diff --git a/rspamd.sysuser b/rspamd.sysuser
new file mode 100644
index 000000000000..0beda94391d2
--- /dev/null
+++ b/rspamd.sysuser
@@ -0,0 +1 @@
+u _rspamd /var/lib/rspamd "rspam daemon" /var/lib/rspamd
diff --git a/rspamd.tmpfile b/rspamd.tmpfile
new file mode 100644
index 000000000000..3fe6e9ad0570
--- /dev/null
+++ b/rspamd.tmpfile
@@ -0,0 +1,2 @@
+d /run/rspamd 0755 _rspamd _rspamd -
+d /var/log/rspamd 0755 _rspamd _rspamd -