summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Witschel2022-06-05 14:14:21 +0200
committerJonas Witschel2022-06-05 14:14:21 +0200
commitf8d21176abb7e9e6a138bf15bfdb8fe3dc916e7f (patch)
tree5762f05d62259b09da6048f1cc45a34dc59d06a5
parentfde69cb169ce1ef8df3dc082dd34c1d2c7bcc4ba (diff)
downloadaur-tang-git.tar.gz
upgpkg: tang-git 11.r0.e2059ee-1: create tang user and adjust key directory permissions
Upstream https://github.com/latchset/tang/commit/80725fda5dd2f98b201af06bb66ee96b1ec8863a switched the tangd service from running as root to a dedicated unprivileged "tang" user. We need to create this user and adjust the permissions of the key directory accordingly. This brings the PKGBUILD in sync with the package in [community].
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD10
-rw-r--r--tang.sysusers.conf1
-rw-r--r--tang.tmpfiles.conf3
4 files changed, 17 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f26fc5724a0e..5037e0a77e32 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = tang-git
pkgdesc = Server for binding data to network presence
- pkgver = 9.r0.d98ce92
+ pkgver = 11.r0.e2059ee
pkgrel = 1
url = https://github.com/latchset/tang
arch = x86_64
@@ -14,7 +14,10 @@ pkgbase = tang-git
provides = tang
conflicts = tang
source = git+https://github.com/latchset/tang.git
+ source = tang.sysusers.conf
+ source = tang.tmpfiles.conf
sha512sums = SKIP
+ sha512sums = 08b5abb5ff5195a96c1196e7336eefeabad36a82ef8862881689e3c9cfa8aebc5679e14c4aacc3fa80793fe42ffa591e6ec0ec07bf98f6e0d783e23b2f06218a
+ sha512sums = 48c3026b37ce3fe180633facb99a194e1fcb0ff860f6dff33541b6216b441572c1de0620102ce25e36c06f3c769b3149cb595f5aa4e355416c680b1c6f73e957
pkgname = tang-git
-
diff --git a/PKGBUILD b/PKGBUILD
index a46bd7dba7ea..09a7e16c2bf5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,8 +11,12 @@ makedepends=('git' 'asciidoc' 'meson')
checkdepends=('systemd')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-source=("git+$url.git")
-sha512sums=('SKIP')
+source=("git+$url.git"
+ 'tang.sysusers.conf'
+ 'tang.tmpfiles.conf')
+sha512sums=('SKIP'
+ '08b5abb5ff5195a96c1196e7336eefeabad36a82ef8862881689e3c9cfa8aebc5679e14c4aacc3fa80793fe42ffa591e6ec0ec07bf98f6e0d783e23b2f06218a'
+ '48c3026b37ce3fe180633facb99a194e1fcb0ff860f6dff33541b6216b441572c1de0620102ce25e36c06f3c769b3149cb595f5aa4e355416c680b1c6f73e957')
pkgver() {
cd "${pkgname%-git}"
@@ -34,4 +38,6 @@ package() {
cd "${pkgname%-git}"
DESTDIR="$pkgdir" meson install -C build
mkdir -pm700 "$pkgdir/var/db/tang"
+ install -Dm644 "$srcdir/tang.sysusers.conf" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
+ install -Dm644 "$srcdir/tang.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
}
diff --git a/tang.sysusers.conf b/tang.sysusers.conf
new file mode 100644
index 000000000000..7b30219db6dd
--- /dev/null
+++ b/tang.sysusers.conf
@@ -0,0 +1 @@
+u tang - "unprivileged user for tang operations"
diff --git a/tang.tmpfiles.conf b/tang.tmpfiles.conf
new file mode 100644
index 000000000000..597b2c2e085a
--- /dev/null
+++ b/tang.tmpfiles.conf
@@ -0,0 +1,3 @@
+Z /var/db/tang 0700 tang tang
+z /var/db/tang/*.jwk 0440 tang tang
+z /var/db/tang/.*.jwk 0440 tang tang