[arch-commits] Commit in fcron/trunk (PKGBUILD fcron.install fcron.sysusers)

Eli Schwartz eschwartz at archlinux.org
Mon Jan 8 20:41:02 UTC 2018


    Date: Monday, January 8, 2018 @ 20:40:54
  Author: eschwartz
Revision: 280575

upgpkg: fcron 3.2.1-3

migrate to systemd-sysusers

Added:
  fcron/trunk/fcron.sysusers
Modified:
  fcron/trunk/PKGBUILD
  fcron/trunk/fcron.install

----------------+
 PKGBUILD       |    5 ++++-
 fcron.install  |   27 +--------------------------
 fcron.sysusers |    1 +
 3 files changed, 6 insertions(+), 27 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-01-08 20:11:50 UTC (rev 280574)
+++ PKGBUILD	2018-01-08 20:40:54 UTC (rev 280575)
@@ -7,7 +7,7 @@
 
 pkgname=fcron
 pkgver=3.2.1
-pkgrel=2
+pkgrel=3
 pkgdesc='Feature-rich cron implementation'
 arch=(x86_64)
 url='http://fcron.free.fr'
@@ -30,9 +30,11 @@
 install=$pkgname.install
 source=("http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz"
         "http://fcron.free.fr/archives/$pkgname-$pkgver.src.tar.gz.sign"
+        "fcron.sysusers"
         'systab.orig')
 md5sums=('bd4996e941a40327d11efc5e3fd1f839'
          'SKIP'
+         'aef8c3887202cbc1252cdcfecc2db1dd'
          'afecbfd98caa49e8e4aa239fa1b19255')
 validpgpkeys=('7733B98B987784DF27707D41F8E544EC485EE7BC')
 
@@ -62,6 +64,7 @@
   make DESTDIR="$pkgdir/" install
   install -Dm644 files/fcron.pam "$pkgdir/etc/pam.d/fcron"
   install -Dm644 files/fcrontab.pam "$pkgdir/etc/pam.d/fcrontab"
+  install -Dm644 "$srcdir/fcron.sysusers" "$pkgdir/usr/lib/sysusers.d/fcron.conf"
 
   # Install a default fcrontab so that fcron can completely replace dcron
   # We don't use binary format which is incompatible between arch and may cause crash

Modified: fcron.install
===================================================================
--- fcron.install	2018-01-08 20:11:50 UTC (rev 280574)
+++ fcron.install	2018-01-08 20:40:54 UTC (rev 280575)
@@ -1,8 +1,6 @@
 # arg 1:  the new package version
 post_install() {
-  # we need a dedicated fcron user
-  getent group fcron >/dev/null || groupadd -g 23 fcron
-  getent passwd fcron >/dev/null || useradd -r -d /var/spool/fcron -u 23 -g 23 fcron
+  systemd-sysusers fcron.conf
   # Generate binary format which is incompatible between arch
   fcrontab -z -u systab &>/dev/null
 }
@@ -11,29 +9,6 @@
 # arg 2:  the old package version
 post_upgrade() {
   post_install "$1"
-  if (( $(vercmp $2 3.1.2-8) < 0 )); then
-    echo 'Previous versions of fcron allow root priviledge escalation by using'
-    echo 'runas option in crontabs. fcron check rights at crontab compilation.'
-    echo 'Thus, the migration script will recreate the binary crontabs'
-    echo 'for you (with all side effects) and fix the files rights.'
-    # fix invalid etc files
-    for _f in /etc/fcron/fcron.{conf,allow,deny}; do
-      [[ -e $_f ]] || continue
-      chown root:fcron "$_f"
-      chmod 640 "$_f"
-    done
-    # fix invalid spool directory
-    chown fcron:fcron /var/spool/fcron
-    chmod 770 /var/spool/fcron
-    # regen user fcron files
-    cd /var/spool/fcron
-    for _f in *; do
-      if [[ "${_f%.orig}" != "$_f" ]]; then
-        chgrp fcron "$_f"
-        fcrontab -z -u "${_f%.orig}" &>/dev/null
-      fi
-    done
-  fi
 }
 
 # vim:set ts=2 sw=2 et:

Added: fcron.sysusers
===================================================================
--- fcron.sysusers	                        (rev 0)
+++ fcron.sysusers	2018-01-08 20:40:54 UTC (rev 280575)
@@ -0,0 +1 @@
+u fcron 23 - /var/spool/fcron



More information about the arch-commits mailing list