summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlarchunix2016-09-30 22:53:29 +0200
committerlarchunix2016-09-30 22:53:29 +0200
commit63ee459751754ac4311d7892e04142816336a454 (patch)
tree58316a5141264f59896d7bbed59b68180235443f
parent95c2394e3710dab1d4d008d812bdb39cc122c0ad (diff)
downloadaur-63ee459751754ac4311d7892e04142816336a454.tar.gz
Use systemd-{sysusers,tmpfiles} to create mock group and dirs
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD11
-rw-r--r--mock.install5
-rw-r--r--mock.sysusers1
-rw-r--r--mock.tmpfiles2
5 files changed, 18 insertions, 5 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 36e26056796..cda3d902110 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -15,7 +15,11 @@ pkgbase = mock
optdepends = yum-utils: to create RPMs for Fedora <= 23 (including EL5, EL6 and EL7)
backup = etc/mock/site-defaults.cfg
source = https://github.com/rpm-software-management/mock/archive/mock-1.2.20.tar.gz
+ source = mock.sysusers
+ source = mock.tmpfiles
md5sums = e4d5b7424fd9c14fbe3b150367357a86
+ md5sums = d277502b9a95484594f86231d073dae0
+ md5sums = 1052fa4db74b59b0c195f4756bd865e8
pkgname = mock
diff --git a/PKGBUILD b/PKGBUILD
index fdaa09c5e74..a510ada815e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,8 +22,12 @@ optdepends=('createrepo_c: for mockchain command'
'yum-utils: to create RPMs for Fedora <= 23 (including EL5, EL6 and EL7)')
install="$pkgname.install"
backup=("etc/$pkgname/site-defaults.cfg")
-source=("$url/archive/$pkgname-$pkgver.tar.gz")
-md5sums=('e4d5b7424fd9c14fbe3b150367357a86')
+source=("$url/archive/$pkgname-$pkgver.tar.gz"
+ "$pkgname.sysusers"
+ "$pkgname.tmpfiles")
+md5sums=('e4d5b7424fd9c14fbe3b150367357a86'
+ 'd277502b9a95484594f86231d073dae0'
+ '1052fa4db74b59b0c195f4756bd865e8')
prepare() {
mv "$pkgname-$pkgname-$pkgver" "$pkgname-$pkgver"
@@ -50,6 +54,9 @@ package() {
-i "$pkgdir/etc/security/console.apps/$pkgname"
ln -s /usr/bin/consolehelper "$pkgdir/usr/bin/$pkgname"
fi
+
+ install -Dm644 "$srcdir/$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+ install -Dm644 "$srcdir/$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
# vim: set ft=sh ts=4 sw=4 noet:
diff --git a/mock.install b/mock.install
index 493664c8cd9..5ea260d740d 100644
--- a/mock.install
+++ b/mock.install
@@ -1,7 +1,6 @@
post_install() {
- getent group mock >/dev/null || groupadd -r mock
- install -o root -g mock -m 02755 -d /var/{cache,lib}/mock
-
+ systemd-sysusers mock.conf
+ systemd-tmpfiles --create mock.conf
echo 'You must add yourself to the mock group in order to run mock.'
}
diff --git a/mock.sysusers b/mock.sysusers
new file mode 100644
index 00000000000..058e8b832e2
--- /dev/null
+++ b/mock.sysusers
@@ -0,0 +1 @@
+g mock - -
diff --git a/mock.tmpfiles b/mock.tmpfiles
new file mode 100644
index 00000000000..59d54bd4317
--- /dev/null
+++ b/mock.tmpfiles
@@ -0,0 +1,2 @@
+d /var/cache/mock 2755 root mock - -
+d /var/lib/mock 2755 root mock - -