summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Rawlinson2022-08-23 21:09:10 +1200
committerGeorge Rawlinson2022-08-23 21:09:10 +1200
commit165b434a71b4b79c1b78a7d65c74a3184e5a4994 (patch)
treecd42b83888224cc640303ba46f03a67691e5cc5d
parent23475da2650a477a5a75ea58b9462ec3d8a00e94 (diff)
downloadaur-165b434a71b4b79c1b78a7d65c74a3184e5a4994.tar.gz
upgpkg: autobrr 1.5.0-2
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD19
-rw-r--r--systemd.service44
-rw-r--r--sysusers.conf1
-rw-r--r--tmpfiles.conf1
5 files changed, 69 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b056b28ce7c4..fed27895f4fe 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = autobrr
pkgdesc = The modern download automation tool for torrents
pkgver = 1.5.0
- pkgrel = 1
+ pkgrel = 2
url = https://autobrr.com
arch = x86_64
license = unknown
@@ -18,6 +18,12 @@ pkgbase = autobrr
optdepends = lidarr
options = !lto
source = autobrr::git+https://github.com/autobrr/autobrr#commit=61741064c9dbcb1767520f9941205c0a2a53c888
+ source = systemd.service
+ source = sysusers.conf
+ source = tmpfiles.conf
b2sums = SKIP
+ b2sums = 68956fdadf43c4c714b0867dd5840971472e5647d3fef81a9b6a371610e7dbf1665b19945812ea2731da8e66f063db4f7fcefb1a4e70c5a437ecfa164697d8f7
+ b2sums = bd63a8a0f66561c10c81c85f8488c4e89e6c65fda6fb21715c24f7d9c565f0da502dd6b6ab68df360620dcc5aa5cc3fcf3e9ede6f202b5ddde6d2c2d0765342d
+ b2sums = 55e4ab4ad7434d8868fb90e764a541aacf0bbe9e5236fa17f0184252c494d9d77d6b16b6f8106e5eb5d8161f0f20dd464ab052a46de949d5e4a5f89c51e2fdab
pkgname = autobrr
diff --git a/PKGBUILD b/PKGBUILD
index 8577d092c39c..dc497a3e648c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=autobrr
pkgver=1.5.0
-pkgrel=1
+pkgrel=2
pkgdesc='The modern download automation tool for torrents'
arch=('x86_64')
url='https://autobrr.com'
@@ -20,8 +20,16 @@ optdepends=(
)
options=('!lto')
_commit='61741064c9dbcb1767520f9941205c0a2a53c888'
-source=("$pkgname::git+https://github.com/autobrr/autobrr#commit=$_commit")
-b2sums=('SKIP')
+source=(
+ "$pkgname::git+https://github.com/autobrr/autobrr#commit=$_commit"
+ 'systemd.service'
+ 'sysusers.conf'
+ 'tmpfiles.conf'
+)
+b2sums=('SKIP'
+ '68956fdadf43c4c714b0867dd5840971472e5647d3fef81a9b6a371610e7dbf1665b19945812ea2731da8e66f063db4f7fcefb1a4e70c5a437ecfa164697d8f7'
+ 'bd63a8a0f66561c10c81c85f8488c4e89e6c65fda6fb21715c24f7d9c565f0da502dd6b6ab68df360620dcc5aa5cc3fcf3e9ede6f202b5ddde6d2c2d0765342d'
+ '55e4ab4ad7434d8868fb90e764a541aacf0bbe9e5236fa17f0184252c494d9d77d6b16b6f8106e5eb5d8161f0f20dd464ab052a46de949d5e4a5f89c51e2fdab')
pkgver() {
cd "$pkgname"
@@ -74,6 +82,11 @@ build() {
}
package() {
+ # systemd integration
+ install -vDm644 systemd.service "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ install -vDm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+ install -vDm644 tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
+
cd "$pkgname"
# binary
diff --git a/systemd.service b/systemd.service
new file mode 100644
index 000000000000..ea5a47f40089
--- /dev/null
+++ b/systemd.service
@@ -0,0 +1,44 @@
+[Unit]
+Description=autobrr service
+Documentation=https://autobrr.com/
+After=syslog.target network-online.target
+
+[Service]
+User=autobrr
+Group=autobrr
+Type=simple
+ExecStart=/usr/bin/autobrr --config=/var/lib/autobrr
+ReadWritePaths=/var/lib/autobrr
+
+# hardening options
+UMask=0077
+NoNewPrivileges=true
+LimitNOFILE=1048576
+ProtectSystem=strict
+ProtectHome=true
+PrivateUsers=yes
+PrivateTmp=true
+PrivateDevices=true
+ProtectProc=invisible
+ProcSubset=pid
+ProtectHostname=true
+ProtectClock=true
+ProtectKernelTunables=true
+ProtectKernelModules=true
+ProtectKernelLogs=true
+ProtectControlGroups=true
+RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
+RestrictNamespaces=true
+LockPersonality=true
+MemoryDenyWriteExecute=true
+RestrictRealtime=true
+RestrictSUIDSGID=true
+RemoveIPC=true
+CapabilityBoundingSet=
+AmbientCapabilities=
+SystemCallFilter=@system-service
+SystemCallFilter=~@privileged @resources
+SystemCallArchitectures=native
+
+[Install]
+WantedBy=multi-user.target
diff --git a/sysusers.conf b/sysusers.conf
new file mode 100644
index 000000000000..cf82bfe01abe
--- /dev/null
+++ b/sysusers.conf
@@ -0,0 +1 @@
+u autobrr - "autobrr daemon user" /var/lib/autobrr
diff --git a/tmpfiles.conf b/tmpfiles.conf
new file mode 100644
index 000000000000..cd7007992ae9
--- /dev/null
+++ b/tmpfiles.conf
@@ -0,0 +1 @@
+d /var/lib/autobrr 0755 autobrr autobrr