Date: Thursday, January 11, 2018 @ 04:39:33
  Author: eschwartz
Revision: 281212

upgpkg: puppet 5.3.3-3

migrate to systemd-sysusers

Modified:
  puppet/trunk/PKGBUILD
  puppet/trunk/puppet.install

----------------+
 PKGBUILD       |   13 +++++++------
 puppet.install |   15 ---------------
 2 files changed, 7 insertions(+), 21 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-01-11 03:05:49 UTC (rev 281211)
+++ PKGBUILD    2018-01-11 04:39:33 UTC (rev 281212)
@@ -10,10 +10,10 @@
 
 pkgname=puppet
 pkgver=5.3.3
-pkgrel=2
+pkgrel=3
 pkgdesc="Server automation framework and application"
 arch=('any')
-url="http://puppetlabs.com/puppet/puppet-open-source";
+url="https://puppet.com/products/open-source-projects";
 license=('Apache')
 depends=('facter' 'hiera')
 optdepends=('ruby-shadow: user password management')
@@ -36,10 +36,11 @@
   ruby install.rb --destdir="$pkgdir" --sitelibdir="$( ruby -e \
     'puts RbConfig::CONFIG["vendorlibdir"]' )"
 
-  install -d "$pkgdir"/{var/lib/$pkgname,usr/lib/tmpfiles.d}
+  echo 'u puppet 52 "Puppet" /var/lib/puppet' | install -Dm644 \
+    /dev/stdin "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
 
-  echo "d /run/puppetlabs 0755 $pkgname $pkgname -" > \
-    "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
+  echo "d /run/puppetlabs 0755 $pkgname $pkgname -" | install -Dm644 \
+    /dev/stdin "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
 
   # systemd
   install -Dm644 "$srcdir"/$pkgname-$pkgver/ext/systemd/$pkgname.service \
@@ -48,7 +49,7 @@
   install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 
   # Match permissions that puppet sets when running
-  chmod 775 "$pkgdir"/var/lib/puppet
+  install -dm775 "$pkgdir"/var/lib/puppet
   chmod 750 "$pkgdir"/var/log/puppetlabs/puppet
 
   rm -r "$pkgdir"/var/run

Modified: puppet.install
===================================================================
--- puppet.install      2018-01-11 03:05:49 UTC (rev 281211)
+++ puppet.install      2018-01-11 04:39:33 UTC (rev 281212)
@@ -1,18 +1,3 @@
-pre_install() {
-  getent group puppet &>/dev/null || groupadd -r puppet -g 52
-  getent passwd puppet &>/dev/null || useradd -r -u 52 -g puppet \
-    -d /var/lib/puppet -s /usr/bin/nologin -c "Puppet" puppet
-}
-
-pre_upgrade() {
-  pre_install
-
-  # puppetmaster has been dropped
-  if [[ -f /run/puppetlabs/master.pid ]]; then
-    systemctl stop puppetmaster
-  fi
-}
-
 pre_remove() {
   if [[ -f /run/puppetlabs/agent.pid ]]; then
     systemctl stop puppet

Reply via email to