summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/opensysusers/01-parabola-openrc.conf4
-rw-r--r--pcr/opensysusers/PKGBUILD70
-rw-r--r--pcr/opensysusers/opensysusers.hook6
-rw-r--r--pcr/opensysusers/sysgid.patch23
4 files changed, 43 insertions, 60 deletions
diff --git a/pcr/opensysusers/01-parabola-openrc.conf b/pcr/opensysusers/01-parabola-openrc.conf
deleted file mode 100644
index 2b6784c47..000000000
--- a/pcr/opensysusers/01-parabola-openrc.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-# default parabola groups
-g adm 4 - -
-g wheel 10 - -
-g users 100 - -
diff --git a/pcr/opensysusers/PKGBUILD b/pcr/opensysusers/PKGBUILD
index 62624ff69..79a2a6949 100644
--- a/pcr/opensysusers/PKGBUILD
+++ b/pcr/opensysusers/PKGBUILD
@@ -1,43 +1,55 @@
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
# Contributor: David P. <megver83@parabola.nu>
+# Contributor: Luke Shumaker <lukeshu@parabola.nu>
# Maintainer (Artix): Chris Cromer <chris@artixlinux.org>
-_url="https://github.com/artix-linux/opensysusers/archive"
-
-pkgname=opensysusers
-pkgver=0.3.2
-pkgrel=5.parabola1
-pkgdesc="A standalone utility for handling systemd-style sysusers.d users and groups"
+pkgbase=opensysusers
+pkgname=('opensysusers' 'opensysusers-systemdcompat')
+pkgver=0.4.8
+pkgrel=1
+pkgdesc="A standalone utility to handle systemd-style sysusers.d files"
arch=('any')
url="https://github.com/artix-linux/opensysusers"
license=('BSD2')
-groups=('openrc-base' 'base-openrc')
+groups=('base-openrc')
+makedepends=('docbook-xsl')
depends=('shadow')
-optdepends=('openrc: update automatically on boot')
-source=("${pkgname}-${pkgver}.tar.gz::${_url}/${pkgver}.tar.gz"
- '01-parabola-openrc.conf'
- 'opensysusers.hook'
- sysgid.patch::"https://github.com/artix-linux/opensysusers/commit/3f451ccfe5e5943d0ebc98f5f0d095a6c0ee11b4.patch")
-sha256sums=('0a3ffb2bf5a3baa9bd49ef522d4bef7fbfa2f51ca6cce24d6354a7ae3c0344d8'
- 'cd69beb651c6807cbea4a520a7a38f7ff12431cd26359019e3ce89ed639a200d'
- '90fdf362a29138f1ed65e86e8b97d1251adb6b2e94d829cceb0094a63d00252a'
- '8575316ee9ab0f9b751e7856fbe28bfbe3d7442d56eab7582342d7bd8f1566d9')
-
-prepare(){
- cd "${srcdir}/${pkgname}-${pkgver}"
- patch -Np 1 -i ${srcdir}/sysgid.patch
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/artix-linux/${pkgname}/archive/${pkgver}.tar.gz"
+ 'opensysusers.hook')
+sha256sums=('4d1bf4657e8a2420d8dcf8da63f86809e3f023603a0940b86e4d10d0f42a0720'
+ '713ca6dcc491217307e812900f0bf4cfbc0315456aa382e41d4037565095fe53')
+
+build() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ make PREFIX=/usr HAVESYSTEMD=no HAVEOPENRC=yes HAVEMAN=yes
+ make PREFIX=/usr HAVESYSTEMD=yes HAVEOPENRC=no HAVEMAN=no
}
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make bindir="/usr/bin" DESTDIR="${pkgdir}" install
- ln -snf "/usr/bin/sysusers" "${pkgdir}/usr/bin/systemd-sysusers"
+package_opensysusers() {
+ cd "$srcdir/$pkgbase-$pkgver"
+ make PREFIX=/usr HAVESYSTEMD=no HAVEOPENRC=yes HAVEMAN=yes DESTDIR="$pkgdir" install
+ find "$pkgdir" -type f -name 'systemd-*' -delete
+ find "$pkgdir" -depth -type d -empty -exec rmdir -- {} \;
+
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # OpenRC defaults
+ install -d "$pkgdir"/etc/runlevels/boot
+ ln -sT /etc/init.d/opensysusers "$pkgdir"/etc/runlevels/boot/opensysusers
+
+ # pacman hooks
+ install -Dm0644 ../opensysusers.hook "$pkgdir"/usr/share/libalpm/hooks/opensysusers.hook
+}
- install -vDm0755 openrc/opensysusers.initd "${pkgdir}"/etc/init.d/opensysusers
+package_opensysusers-systemdcompat() {
+ depends=("opensysusers=$pkgver")
+ pkgdesc='Compatibility wrapper for opensysfiles providing the systemd-sysfiles program'
+ conflicts=('systemd-tools')
- install -dm0755 "${pkgdir}/etc/runlevels/boot"
- ln -snf "/etc/init.d/opensysusers" "${pkgdir}/etc/runlevels/boot/opensysusers"
+ cd "$srcdir/$pkgbase-$pkgver"
+ make PREFIX=/usr HAVESYSTEMD=yes HAVEOPENRC=no HAVEMAN=yes DESTDIR="$pkgdir" install BINNAME=systemd-sysusers
+ find "$pkgdir" -type f -not -name 'systemd-*' -delete
+ find "$pkgdir" -depth -type d -empty -exec rmdir -- {} \;
- install -vDm0644 "${srcdir}"/01-parabola-openrc.conf "${pkgdir}/usr/lib/sysusers.d/01-parabola-openrc.conf"
- install -vDm0644 "${srcdir}"/opensysusers.hook "${pkgdir}/usr/share/libalpm/hooks/opensysusers.hook"
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
diff --git a/pcr/opensysusers/opensysusers.hook b/pcr/opensysusers/opensysusers.hook
index c5360d786..7dfa1cf8b 100644
--- a/pcr/opensysusers/opensysusers.hook
+++ b/pcr/opensysusers/opensysusers.hook
@@ -2,11 +2,9 @@
Type = File
Operation = Install
Operation = Upgrade
-Target = usr/lib/sysusers.d/*
-Target = etc/sysusers.d/*
-Target = run/sysusers.d/*
+Target = usr/lib/sysusers.d/*.conf
[Action]
-Description = Updating system users and groups
+Description = Creating system user accounts...
When = PostTransaction
Exec = /usr/bin/sysusers
diff --git a/pcr/opensysusers/sysgid.patch b/pcr/opensysusers/sysgid.patch
deleted file mode 100644
index 502217f5b..000000000
--- a/pcr/opensysusers/sysgid.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From 3f451ccfe5e5943d0ebc98f5f0d095a6c0ee11b4 Mon Sep 17 00:00:00 2001
-From: udeved <artoo@cromnix.org>
-Date: Sun, 7 Jan 2018 11:08:10 +0100
-Subject: [PATCH] sysusers: use a system gid in add_group() if id='-' to get a
- gid<1000
-
----
- sysusers | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sysusers b/sysusers
-index 80442d3..d71fb61 100755
---- a/sysusers
-+++ b/sysusers
-@@ -17,7 +17,7 @@ add_group() {
- getent group "${name}" >/dev/null
- if [ "$?" -ne 0 ]; then
- if [ "${id}" == '-' ]; then
-- groupadd "${name}"
-+ groupadd -r "${name}"
- else
- if ! grep -qiw "${id}" /etc/group; then
- groupadd -g "${id}" "${name}"