[arch-commits] Commit in tenshi/trunk (4 files)

Eli Schwartz eschwartz at archlinux.org
Thu Jan 11 14:18:51 UTC 2018


    Date: Thursday, January 11, 2018 @ 14:18:50
  Author: eschwartz
Revision: 281347

upgpkg: tenshi 0.16-2

migrate to systemd-sysusers/systemd-tmpfiles
fix changing permissions in post_install via the elegance of /usr/share/factory :)
Update url to HTTPS

Added:
  tenshi/trunk/tenshi.sysusers
  tenshi/trunk/tenshi.tmpfiles
Modified:
  tenshi/trunk/PKGBUILD
Deleted:
  tenshi/trunk/tenshi.install

-----------------+
 PKGBUILD        |   19 ++++++++++++-------
 tenshi.install  |   20 --------------------
 tenshi.sysusers |    1 +
 tenshi.tmpfiles |    3 +++
 4 files changed, 16 insertions(+), 27 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-11 14:07:09 UTC (rev 281346)
+++ PKGBUILD	2018-01-11 14:18:50 UTC (rev 281347)
@@ -4,21 +4,21 @@
 
 pkgname=tenshi
 pkgver=0.16
-pkgrel=1
+pkgrel=2
 pkgdesc="real-time log monitor from the Gentoo Linux project"
-url="http://dev.inversepath.com/trac/tenshi"
+url="https://inversepath.com/tenshi.html"
 arch=(any)
 license=("custom")
 depends=('perl' 'perl-io-bufferedselect')
-install="$pkgname.install"
 source=("$pkgname-$pkgver.tar.gz::https://github.com/inversepath/tenshi/archive/$pkgver.tar.gz"
-        'tenshi.install'
         'tenshi.service'
+        'tenshi.sysusers'
+        'tenshi.tmpfiles'
         'conf.diff')
-backup=(etc/tenshi/tenshi.conf)
 md5sums=('b9646895fc1d16dfe7012677a34b0633'
-         '29bd3646a619768666b704b2ed2e6e72'
          '8c8a582c6a8c61d4ff596ed3af8ab593'
+         '19314a464da97b3046a2c7b7c81cd2e6'
+         '68aafee3a3c8ea472296408854adac76'
          '451250b1955b14691ca1c7124d1991f2')
 
 build() {
@@ -33,7 +33,12 @@
 
 	make DESTDIR="$pkgdir" docdir=/usr/share/doc/tenshi bindir=/usr/bin install
 	install -Dm644 "$srcdir/tenshi.service" "$pkgdir/usr/lib/systemd/system/tenshi.service"
+	install -Dm644 "$srcdir/tenshi.sysusers" "$pkgdir/usr/lib/sysusers.d/tenshi.conf"
+	install -Dm644 "$srcdir/tenshi.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/tenshi.conf"
 	install -dm755 "$pkgdir/usr/share/licenses/tenshi"
 	mv "$pkgdir/usr/share/doc/tenshi/LICENSE" "$pkgdir/usr/share/licenses/tenshi/LICENSE"
-	chmod 750 "$pkgdir/etc/tenshi" "$pkgdir/var/lib/tenshi"
+
+	# Set more secure permissions for configuration via tmpfiles.d
+	install -Dm644 "$pkgdir"/{,usr/share/factory/}etc/tenshi/tenshi.conf
+	rm -rf "$pkgdir"/{etc,var}
 }

Deleted: tenshi.install
===================================================================
--- tenshi.install	2018-01-11 14:07:09 UTC (rev 281346)
+++ tenshi.install	2018-01-11 14:18:50 UTC (rev 281347)
@@ -1,20 +0,0 @@
-post_install() {
-    # create tenshi user
-    if [ -z "`grep '^tenshi:' /etc/group`" ]; then
-        groupadd tenshi
-    fi
-    if [ -z "`grep '^tenshi:' /etc/passwd`" ]; then
-        useradd -d /var/lib/tenshi -g tenshi -s /bin/false tenshi
-    else
-        usermod -s /bin/false tenshi
-    fi
-
-    # set more secure permissions on config files, etc
-    chown -R tenshi:tenshi /etc/tenshi
-    chown -R tenshi:tenshi /var/lib/tenshi
-}
-
-post_upgrade() {
-    post_install $1
-}
-

Added: tenshi.sysusers
===================================================================
--- tenshi.sysusers	                        (rev 0)
+++ tenshi.sysusers	2018-01-11 14:18:50 UTC (rev 281347)
@@ -0,0 +1 @@
+u tenshi - - /var/lib/tenshi

Added: tenshi.tmpfiles
===================================================================
--- tenshi.tmpfiles	                        (rev 0)
+++ tenshi.tmpfiles	2018-01-11 14:18:50 UTC (rev 281347)
@@ -0,0 +1,3 @@
+d /etc/tenshi              0750 tenshi tenshi - -
+d /var/lib/tenshi          0750 tenshi tenshi - -
+C /etc/tenshi/tenshi.conf  0750 tenshi tenshi - -



More information about the arch-commits mailing list