summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Scarborough2024-05-26 04:43:45 -0500
committerKim Scarborough2024-05-26 04:43:45 -0500
commitff6ca8146718f12353762a5bb9420c429a45a987 (patch)
tree47e384f8a8f1173e465989a40560103b66ed4714
parent2fd83ad9b342ba210622fcd181093a056334ad05 (diff)
downloadaur-ff6ca8146718f12353762a5bb9420c429a45a987.tar.gz
General rework
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD56
-rw-r--r--rwhod-purge.cron3
-rw-r--r--rwhod-purge.service5
-rw-r--r--rwhod-purge.timer9
-rw-r--r--rwhod.sysusers2
6 files changed, 70 insertions, 30 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 9131f32d77a3..9ade68b6c5dd 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,30 +1,29 @@
pkgbase = netkit-rwho-debian
pkgdesc = Remote who client and server (with Debian patches)
pkgver = 0.17
- pkgrel = 7
- url = http://packages.qa.debian.org/n/netkit-rwho.html
- install = rwhod.install
+ pkgrel = 8
+ url = https://tracker.debian.org/pkg/netkit-rwho
arch = i686
arch = x86_64
arch = arm
- arch = armv6h
- arch = armv7h
arch = aarch64
license = BSD
- depends = glibc
- depends = sh
- optdepends = cron: to periodically delete old /var/spool/rwho files
- optdepends = systemd: to run the rwhod daemon
backup = etc/conf.d/rwhod
- source = http://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_0.17.orig.tar.gz
- source = http://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_0.17-15.debian.tar.xz
+ source = https://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_0.17.orig.tar.gz
+ source = https://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_0.17-15.debian.tar.xz
source = rwhod.conf
source = rwhod.service
- source = rwhod.cron
+ source = rwhod-purge.cron
+ source = rwhod-purge.service
+ source = rwhod-purge.timer
+ source = rwhod.sysusers
sha256sums = 0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7
sha256sums = b5d47f5bf9eb68290881020ef0c6b38e8444e67c5eb1db9877f136495886b02d
sha256sums = 3ad57b0f1ec2f05084df0d2e33fd7605b8c1af5c4330e519b1defcd0ef334a3c
sha256sums = dd73567ee4b9f44096fc3c763d8cbd6b454d05c05bfe50d9a2a966336f1197c1
- sha256sums = f76bc6481d81a1d2510a410915b946c44eebdce12d6c3b5f2869634b10372ed8
+ sha256sums = d4d9766dd6aeb9e362f9bf14dec2aaa2cd976918ba607eb6fcc969693c93ece9
+ sha256sums = 75577158b804b17b1aec4454d1f8e0818dc75ea7ee6b96cf6a8008acc5cba19d
+ sha256sums = c1622fe4c88aebd4aa52aad247476388374a5f02ae1533023c9312505eef1600
+ sha256sums = 3508a6744e1fc2e0dbf907aef1834c20e22d080cfe505db4faa4905e349a090a
pkgname = netkit-rwho-debian
diff --git a/PKGBUILD b/PKGBUILD
index 17cef2c7d335..5a13945fb0c0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,37 @@
-# Maintainer: Michał Wojdyła < micwoj9292 at gmail dot com >
+# Maintainer: Kim Scarborough <kim@scarborough.kim>
+# Contributor: Michał Wojdyła < micwoj9292 at gmail dot com >
# Contributor: Graham Edgecombe <gpe@grahamedgecombe.com>
# Contributor: mortzu
pkgname=netkit-rwho-debian
pkgver=0.17
-pkgrel=7
+pkgrel=8
_debrev=15
-arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
+arch=('i686' 'x86_64' 'arm' 'aarch64')
license=('BSD')
pkgdesc='Remote who client and server (with Debian patches)'
-depends=('glibc' 'sh')
-optdepends=('cron: to periodically delete old /var/spool/rwho files'
- 'systemd: to run the rwhod daemon')
-url='http://packages.qa.debian.org/n/netkit-rwho.html'
-install=rwhod.install
+url='https://tracker.debian.org/pkg/netkit-rwho'
backup=('etc/conf.d/rwhod')
-source=(http://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_${pkgver}.orig.tar.gz
- http://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_${pkgver}-${_debrev}.debian.tar.xz
- rwhod.conf rwhod.service rwhod.cron)
-sha256sums=('0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7'
- 'b5d47f5bf9eb68290881020ef0c6b38e8444e67c5eb1db9877f136495886b02d'
- '3ad57b0f1ec2f05084df0d2e33fd7605b8c1af5c4330e519b1defcd0ef334a3c'
- 'dd73567ee4b9f44096fc3c763d8cbd6b454d05c05bfe50d9a2a966336f1197c1'
- 'f76bc6481d81a1d2510a410915b946c44eebdce12d6c3b5f2869634b10372ed8')
+source=(
+ https://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_${pkgver}.orig.tar.gz
+ https://ftp.debian.org/debian/pool/main/n/netkit-rwho/netkit-rwho_${pkgver}-${_debrev}.debian.tar.xz
+ rwhod.conf
+ rwhod.service
+ rwhod-purge.cron
+ rwhod-purge.service
+ rwhod-purge.timer
+ rwhod.sysusers
+)
+
+sha256sums=(
+ '0409e2ce4bfdb2dacb2c193d0fedfc49bb975cb057c5c6b0ffcca603a1188da7'
+ 'b5d47f5bf9eb68290881020ef0c6b38e8444e67c5eb1db9877f136495886b02d'
+ '3ad57b0f1ec2f05084df0d2e33fd7605b8c1af5c4330e519b1defcd0ef334a3c'
+ 'dd73567ee4b9f44096fc3c763d8cbd6b454d05c05bfe50d9a2a966336f1197c1'
+ 'd4d9766dd6aeb9e362f9bf14dec2aaa2cd976918ba607eb6fcc969693c93ece9'
+ '75577158b804b17b1aec4454d1f8e0818dc75ea7ee6b96cf6a8008acc5cba19d'
+ 'c1622fe4c88aebd4aa52aad247476388374a5f02ae1533023c9312505eef1600'
+ '3508a6744e1fc2e0dbf907aef1834c20e22d080cfe505db4faa4905e349a090a'
+)
build() {
cd "$srcdir/netkit-rwho-$pkgver"
@@ -48,5 +58,17 @@ package() {
install -Dm644 "$srcdir/debian/copyright" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm644 "$srcdir/rwhod.conf" "$pkgdir/etc/conf.d/rwhod"
install -Dm644 "$srcdir/rwhod.service" "$pkgdir/usr/lib/systemd/system/rwhod.service"
- install -D "$srcdir/rwhod.cron" "$pkgdir/etc/cron.monthly/rwhod"
+ install -m644 "$srcdir/rwhod-purge.service" "$pkgdir/usr/lib/systemd/system/rwhod-purge.service"
+ 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
+}
+
diff --git a/rwhod-purge.cron b/rwhod-purge.cron
new file mode 100644
index 000000000000..eaeacf5de270
--- /dev/null
+++ b/rwhod-purge.cron
@@ -0,0 +1,3 @@
+#!/usr/bin/bash
+
+/usr/bin/find /var/spool/rwho -mindepth 1 -mtime +30 -delete
diff --git a/rwhod-purge.service b/rwhod-purge.service
new file mode 100644
index 000000000000..caf795e293a1
--- /dev/null
+++ b/rwhod-purge.service
@@ -0,0 +1,5 @@
+[Unit]
+Description=rwhod host purge
+
+[Service]
+ExecStart=/usr/bin/find /var/spool/rwho -mindepth 1 -mtime +30 -delete
diff --git a/rwhod-purge.timer b/rwhod-purge.timer
new file mode 100644
index 000000000000..b2fee1d1ce3f
--- /dev/null
+++ b/rwhod-purge.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Monthly rwhod host purge
+
+[Timer]
+OnCalendar=monthly
+Persistent=true
+
+[Install]
+WantedBy=timers.target
diff --git a/rwhod.sysusers b/rwhod.sysusers
new file mode 100644
index 000000000000..74ec8ff57439
--- /dev/null
+++ b/rwhod.sysusers
@@ -0,0 +1,2 @@
+g rwhod - -
+u rwhod - "Remote who daemon" /var/spool/rwho -