summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Scarborough2024-07-14 21:02:26 -0500
committerKim Scarborough2024-07-14 21:02:26 -0500
commit4eea812aaac3c742dace558ac0550cae2001e9bd (patch)
tree8c78518377aa485753389c8704cc3f95af03e90e
parentc7f7215c4312fe809f6941a0a8ae14f0295f8ba8 (diff)
downloadaur-netkit-rwho-debian.tar.gz
Fixing creation of spool directory
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD13
-rw-r--r--rwhod.install27
-rw-r--r--rwhod.sysdir1
4 files changed, 8 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 582ea85d0594..654870b4a35a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = netkit-rwho-debian
pkgdesc = Remote who client and server (with Debian patches)
pkgver = 0.17
- pkgrel = 9
+ pkgrel = 10
url = https://tracker.debian.org/pkg/netkit-rwho
arch = i686
arch = x86_64
@@ -21,6 +21,7 @@ pkgbase = netkit-rwho-debian
source = rwhod-purge.service
source = rwhod-purge.timer
source = rwhod.sysusers
+ source = rwhod.sysdir
sha256sums = 0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7
sha256sums = b5d47f5bf9eb68290881020ef0c6b38e8444e67c5eb1db9877f136495886b02d
sha256sums = 3ad57b0f1ec2f05084df0d2e33fd7605b8c1af5c4330e519b1defcd0ef334a3c
@@ -29,5 +30,6 @@ pkgbase = netkit-rwho-debian
sha256sums = 75577158b804b17b1aec4454d1f8e0818dc75ea7ee6b96cf6a8008acc5cba19d
sha256sums = c1622fe4c88aebd4aa52aad247476388374a5f02ae1533023c9312505eef1600
sha256sums = 3508a6744e1fc2e0dbf907aef1834c20e22d080cfe505db4faa4905e349a090a
+ sha256sums = fd7814093c9abae5eaaf3eeceb7331198436d7881cff4b909f6364f4877d83ae
pkgname = netkit-rwho-debian
diff --git a/PKGBUILD b/PKGBUILD
index 91d0d072643e..82b53b997385 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
# Contributor: mortzu
pkgname=netkit-rwho-debian
pkgver=0.17
-pkgrel=9
+pkgrel=10
_debrev=15
arch=('i686' 'x86_64' 'arm' 'aarch64')
license=('BSD-4-Clause-UC')
@@ -26,6 +26,7 @@ source=(
rwhod-purge.service
rwhod-purge.timer
rwhod.sysusers
+ rwhod.sysdir
)
sha256sums=(
@@ -37,6 +38,7 @@ sha256sums=(
'75577158b804b17b1aec4454d1f8e0818dc75ea7ee6b96cf6a8008acc5cba19d'
'c1622fe4c88aebd4aa52aad247476388374a5f02ae1533023c9312505eef1600'
'3508a6744e1fc2e0dbf907aef1834c20e22d080cfe505db4faa4905e349a090a'
+ 'fd7814093c9abae5eaaf3eeceb7331198436d7881cff4b909f6364f4877d83ae'
)
build() {
@@ -68,13 +70,6 @@ package() {
install -m644 "$srcdir/rwhod-purge.timer" "$pkgdir/usr/lib/systemd/system/rwhod-purge.timer"
install -D "$srcdir/rwhod-purge.cron" "$pkgdir/usr/share/$pkgname/rwhod-purge.cron"
install -Dm644 "$srcdir/rwhod.sysusers" "$pkgdir/usr/lib/sysusers.d/rwhod.conf"
-}
-
-post_install() {
- chown -R rwhod:rwhod /var/spool/rwho
-}
-
-post_upgrade() {
- post_install $1
+ install -Dm644 "$srcdir/rwhod.sysdir" "$pkgdir/usr/lib/tmpfiles.d/rwhod.conf"
}
diff --git a/rwhod.install b/rwhod.install
deleted file mode 100644
index 3ee05942f75e..000000000000
--- a/rwhod.install
+++ /dev/null
@@ -1,27 +0,0 @@
-post_install() {
- if ! getent group rwhod &>/dev/null; then
- groupadd -r rwhod &>/dev/null
- fi
-
- if ! getent passwd rwhod &>/dev/null; then
- useradd -s /bin/false -d /var/spool/rwho -g rwhod -M -r rwhod &>/dev/null
- fi
-
- chown -R rwhod:rwhod /var/spool/rwho
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- if getent passwd rwhod &>/dev/null; then
- userdel rwhod &>/dev/null
- fi
-
- if getent group rwhod &>/dev/null; then
- groupdel rwhod &>/dev/null
- fi
-
- rm -rf /var/spool/rwhod/* &>/dev/null || true
-}
diff --git a/rwhod.sysdir b/rwhod.sysdir
new file mode 100644
index 000000000000..c5985487db8a
--- /dev/null
+++ b/rwhod.sysdir
@@ -0,0 +1 @@
+d /var/spool/rwho 0755 rwhod rwhod