[arch-commits] Commit in dhcpcd/trunk (5 files)

Antonio Rojas arojas at archlinux.org
Fri Apr 10 12:55:13 UTC 2020


    Date: Friday, April 10, 2020 @ 12:55:13
  Author: arojas
Revision: 379948

Fix systemd service files for new rundir (FS#66191), add dhcpcd user for privilege separation

Added:
  dhcpcd/trunk/dhcpcd.sysusers
  dhcpcd/trunk/dhcpcd.tmpfiles
Modified:
  dhcpcd/trunk/PKGBUILD
  dhcpcd/trunk/dhcpcd.service
  dhcpcd/trunk/dhcpcd_.service

-----------------+
 PKGBUILD        |   19 +++++++++++++------
 dhcpcd.service  |    2 +-
 dhcpcd.sysusers |    1 +
 dhcpcd.tmpfiles |    2 ++
 dhcpcd_.service |    2 +-
 5 files changed, 18 insertions(+), 8 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-10 11:08:54 UTC (rev 379947)
+++ PKGBUILD	2020-04-10 12:55:13 UTC (rev 379948)
@@ -4,7 +4,7 @@
 
 pkgname=dhcpcd
 pkgver=9.0.0
-pkgrel=1
+pkgrel=2
 pkgdesc="RFC2131 compliant DHCP client daemon"
 url="https://roy.marples.name/projects/dhcpcd/"
 arch=('x86_64')
@@ -15,12 +15,16 @@
 backup=('etc/dhcpcd.conf')
 options=('emptydirs')  # We Need the Empty /var/lib/dhcpcd Directory
 source=("https://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.xz"
-        'dhcpcd_.service'
-        'dhcpcd.service')
+        dhcpcd_.service
+        dhcpcd.service
+        dhcpcd.sysusers
+        dhcpcd.tmpfiles)
 validpgpkeys=('A785ED2755955D9E93EA59F6597F97EA9AD45549')  # Roy Marples (NetBSD) <roy at NetBSD.org>
 sha256sums=('4a31ae9edcb469dc626e9e70f61c7a87104c26936126ccac24be6d45d4cfe46a'
-            '72dba5d6e7a99cf6d9a796f79ee395e2434af12d6d4e76573d428c6d0c2986ed'
-            '782ba5fc31518e6f499d119120efe5ea68ce29ebbb797306d5e17b2a545c2f9e')
+            '37acd53a589711f5e1db2fcaebb4ccf1c90dc4bcd309626bde25beb7b630a545'
+            '20bccbf8a05b1bc2be365c8b4b526c38c752f48229ba53c3be113ac5b634f210'
+            'df33c69a79fb30895217db8fe6a46ad0658a70b32a280bc91fc04a09b584fa62'
+            'd9156325d42017201beeb833ff9931ec880accd503b5e39fc973392b8fef8b81')
 
 build() {
   cd ${pkgname}-${pkgver}
@@ -32,7 +36,8 @@
       --sbindir=/usr/bin \
       --libexecdir=/usr/lib/dhcpcd \
       --dbdir=/var/lib/dhcpcd \
-      --rundir=/run
+      --runstatedir=/run \
+      --privsepuser=dhcpcd
 
   # Build
   make
@@ -60,4 +65,6 @@
   # install systemd files
   install -Dm644 "${srcdir}/dhcpcd_.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd at .service"
   install -Dm644 "${srcdir}/dhcpcd.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd.service" # FS#31543
+  install -Dm644 "${srcdir}/dhcpcd.sysusers" "${pkgdir}/usr/lib/sysusers.d/dhcpcd.conf"
+  install -Dm644 "${srcdir}/dhcpcd.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/dhcpcd.conf"
 }

Modified: dhcpcd.service
===================================================================
--- dhcpcd.service	2020-04-10 11:08:54 UTC (rev 379947)
+++ dhcpcd.service	2020-04-10 12:55:13 UTC (rev 379948)
@@ -5,7 +5,7 @@
 
 [Service]
 Type=forking
-PIDFile=/run/dhcpcd.pid
+PIDFile=/run/dhcpcd/pid
 ExecStart=/usr/bin/dhcpcd -q -b
 ExecStop=/usr/bin/dhcpcd -x
 

Added: dhcpcd.sysusers
===================================================================
--- dhcpcd.sysusers	                        (rev 0)
+++ dhcpcd.sysusers	2020-04-10 12:55:13 UTC (rev 379948)
@@ -0,0 +1 @@
+u dhcpcd - "dhcpcd privilege separation" /var/lib/dhcpcd

Added: dhcpcd.tmpfiles
===================================================================
--- dhcpcd.tmpfiles	                        (rev 0)
+++ dhcpcd.tmpfiles	2020-04-10 12:55:13 UTC (rev 379948)
@@ -0,0 +1,2 @@
+d /var/lib/dhcpcd 0700 dhcpcd dhcpcd -
+d /run/dhcpcd 0700 dhcpcd dhcpcd -

Modified: dhcpcd_.service
===================================================================
--- dhcpcd_.service	2020-04-10 11:08:54 UTC (rev 379947)
+++ dhcpcd_.service	2020-04-10 12:55:13 UTC (rev 379948)
@@ -7,7 +7,7 @@
 
 [Service]
 Type=forking
-PIDFile=/run/dhcpcd-%I.pid
+PIDFile=/run/dhcpcd/%I.pid
 ExecStart=/usr/bin/dhcpcd -q -w %I
 ExecStop=/usr/bin/dhcpcd -x %I
 



More information about the arch-commits mailing list