@ -1,24 +1,27 @@
%global nm_dispatcher_dir %{_prefix}/lib/NetworkManager
%global puppet_libdir %{ruby_vendorlibdir}
%global puppet_vendor_mod_dir %{_datadir}/%{name}/vendor_modules
Name: puppet
Version: 7.7 .0
Release: 4 %{?dist}
Version: 7.9 .0
Release: 1 %{?dist}
Summary: Network tool for managing many disparate systems
License: ASL 2.0
URL: https://puppet.com
Source0: https://downloads.puppetlabs.com/puppet/%{name}-%{version}.tar.gz
Source1: https://downloads.puppetlabs.com/puppet/%{name}-%{version}.tar.gz.asc
Source2: RPM-GPG-KEY-puppet-20250406
Source3: https://forge.puppet.com/v3/files/puppetlabs-mount_core-1.0.4.tar.gz
Source4: https://forge.puppet.com/v3/files/puppetlabs-host_core-1.0.3.tar.gz
Source5: https://forge.puppet.com/v3/files/puppetlabs-augeas_core-1.1.1.tar.gz
Source6: https://forge.puppet.com/v3/files/puppetlabs-cron_core-1.0.4.tar.gz
Source7: https://forge.puppet.com/v3/files/puppetlabs-scheduled_task-2.2.1.tar.gz
Source8: https://forge.puppet.com/v3/files/puppetlabs-selinux_core-1.0.4.tar.gz
# Get these by checking out the right tag from https://github.com/puppetlabs/puppet-agent and:
# sed 's|.\+puppetlabs/\([a-z_-]\+\).git.\+tags/\([0-9\.]\+\)"}|https://forge.puppet.com/v3/files/\1-\2.tar.gz|' configs/components/module-puppetlabs-*.json
Source3: https://forge.puppet.com/v3/files/puppetlabs-augeas_core-1.1.2.tar.gz
Source4: https://forge.puppet.com/v3/files/puppetlabs-cron_core-1.0.5.tar.gz
Source5: https://forge.puppet.com/v3/files/puppetlabs-host_core-1.0.3.tar.gz
Source6: https://forge.puppet.com/v3/files/puppetlabs-mount_core-1.0.4.tar.gz
Source7: https://forge.puppet.com/v3/files/puppetlabs-scheduled_task-1.0.0.tar.gz
Source8: https://forge.puppet.com/v3/files/puppetlabs-selinux_core-1.1.0.tar.gz
Source9: https://forge.puppet.com/v3/files/puppetlabs-sshkeys_core-2.2.0.tar.gz
Source10: https://forge.puppet.com/v3/files/puppetlabs-yumrepo_core-1.0.7.tar.gz
Source11: https://forge.puppet.com/v3/files/puppetlabs-zfs_core-1.1 .0.tar.gz
Source11: https://forge.puppet.com/v3/files/puppetlabs-zfs_core-1.2 .0.tar.gz
Source12: https://forge.puppet.com/v3/files/puppetlabs-zone_core-1.0.3.tar.gz
Source13: puppet-nm-dispatcher.systemd
Source14: start-puppet-wrapper
@ -35,18 +38,16 @@ BuildRequires: systemd
BuildRequires: gnupg2
Requires: hiera >= 3.3.1
Requires: facter >= 3.9.6
Requires: ruby-facter >= 3.9.6
Requires: rubygem-semantic_puppet >= 1.0.2
Requires: rubygem-puppet-resource_api
Requires: rubygem-deep_merge
Requires: rubygem-httpclient
Requires: rubygem-multi_json
Requires: rubygem-json
Requires: rubygem(concurrent-ruby) >= 1.0.5
Requires: rubygem(deep_merge) >= 1.0
Requires: rubygem(facter) >= 3.9.6
Requires: rubygem(multi_json) >= 1.10
Requires: rubygem(puppet-resource_api) >= 1.5
Requires: rubygem(semantic_puppet) >= 1.0.2
Requires: ruby-augeas >= 0.5.0
Requires: augeas >= 1.10.1
Requires: augeas-libs >= 1.10.1
Requires: cpp-hocon >= 0.2.1
Requires: rubygem-concurrent-ruby >= 1.0.5
Requires: ruby(selinux) libselinux-utils
Obsoletes: puppet-headless < 6.0.0
Obsoletes: puppet-server < 6.0.0
@ -68,46 +69,58 @@ done
# Puppetlabs messed up with default paths
find -type f -exec \
sed -i \
-e 's|/etc/puppetlabs/puppet|%{_sysconfdir}/%{name}|' \
-e 's|/etc/puppetlabs/code|%{_sysconfdir}/%{name}/code|' \
-e 's|/opt/puppetlabs/puppet/bin|%{_bindir}|' \
-e 's|/opt/puppetlabs/puppet/cache|%{_sharedstatedir}/puppet|' \
-e 's|/opt/puppetlabs/puppet/share/locale|%{_datadir}/puppetlabs/puppet/locale|' \
-e 's|/opt/puppetlabs/puppet/modules|%{_datadir}/puppetlabs/puppet/modules|' \
-e 's|/opt/puppetlabs/puppet/vendor_modules|%{_datadir}/puppetlabs/puppet/vendor_modules|' \
-e 's|/opt/puppetlabs/puppet/cache|%{_sharedstatedir}/%{name}|' \
-e 's|/opt/puppetlabs/puppet/public|%{_sharedstatedir}/%{name}/public|' \
-e 's|/opt/puppetlabs/puppet/share/locale|%{_datadir}/%{name}/locale|' \
-e 's|/opt/puppetlabs/puppet/modules|%{_datadir}/%{name}/modules|' \
-e 's|/opt/puppetlabs/puppet/vendor_modules|%{_datadir}/%{name}/vendor_modules|' \
-e 's|/var/log/puppetlabs/puppet|%{_localstatedir}/log/%{name}|' \
'{}' +
%install
ruby install.rb --destdir=%{buildroot} \
--bindir=%{_bindir} \
--logdir=%{_localstatedir}/log/puppetlabs/puppet \
--rundir=%{_rundir}/puppet \
--localedir=%{_datadir}/puppetlabs/puppet/locale \
--vardir=%{_sharedstatedir}/puppet \
--configdir=%{_sysconfdir}/%{name} \
--codedir=%{_sysconfdir}/%{name}/code \
--logdir=%{_localstatedir}/log/%{name} \
--rundir=%{_rundir}/%{name} \
--localedir=%{_datadir}/%{name}/locale \
--vardir=%{_sharedstatedir}/%{name} \
--publicdir=%{_sharedstatedir}/%{name}/public \
--sitelibdir=%{puppet_libdir}
mkdir -p %{buildroot}/usr/share/puppetlabs/puppet/vendor_modules
mkdir -p %{buildroot}%{_datadir}/%{name} /vendor_modules
for d in $(find -mindepth 1 -maxdepth 1 -type d -name 'puppetlabs-*'); do
modver=${d#*-}
mod=${modver%-*}
cp -a $d %{buildroot}%{_datadir}/puppetlabs/puppet /vendor_modules/$mod
cp -a $d %{buildroot}%{_datadir}/%{name} /vendor_modules/$mod
done
install -Dp -m0644 ext/redhat/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/puppet
install -Dp -m0644 ext/redhat/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
%{__install} -d -m0755 %{buildroot}%{_unitdir}
install -Dp -m0644 ext/systemd/puppet.service %{buildroot}%{_unitdir}/puppet .service
install -Dp -m0644 ext/systemd/puppet.service %{buildroot}%{_unitdir}/%{name} .service
# Note(hguemar): Conflicts with config file from hiera package
rm %{buildroot}%{_sysconfdir}/%{name}/hiera.yaml
# Install a NetworkManager dispatcher script to pickup changes to
# /etc/resolv.conf and such (https://bugzilla.redhat.com/532085).
install -Dpv -m0755 %{SOURCE13} \
%{buildroot}%{nm_dispatcher_dir}/dispatcher.d/98-%{name}
# Install the ext/ directory to %%{_datadir}/puppetlabs/%%{name}
install -d %{buildroot}%{_datadir}/puppetlabs/%{name}
cp -a ext/ %{buildroot}%{_datadir}/puppetlabs/ %{name}
chmod 0755 %{buildroot}%{_datadir}/puppetlabs/ %{name}/ext/regexp_nodes/regexp_nodes.rb
# Install the ext/ directory to %%{_datadir}/%%{name}
install -d %{buildroot}%{_datadir}/%{name}
cp -a ext/ %{buildroot}%{_datadir}/%{name}
chmod 0755 %{buildroot}%{_datadir}/%{name}/ext/regexp_nodes/regexp_nodes.rb
# Install wrappers for SELinux
install -Dp -m0755 %{SOURCE14} %{buildroot}%{_bindir}/start-puppet-agent
sed -i 's|^ExecStart=.*/bin/puppet|ExecStart=%{_bindir}/start-puppet-agent|' \
%{buildroot}%{_unitdir}/puppet .service
%{buildroot}%{_unitdir}/%{name} .service
# Setup tmpfiles.d config
mkdir -p %{buildroot}%{_tmpfilesdir}
@ -119,20 +132,25 @@ echo "D %{_rundir}/%{name} 0755 %{name} %{name} -" > \
# These mess-up with RPM automatic dependencies compute by adding
# unnecessary deps like /sbin/runscripts
# some other things were removed with the patch
rm -r %{buildroot}%{_datadir}/puppetlabs/puppet/ext/{debian,freebsd,gentoo,ips,osx,solaris,suse,windows}
rm %{buildroot}%{_datadir}/puppetlabs/puppet/ext/redhat/*.init
rm %{buildroot}%{_datadir}/puppetlabs/puppet/ext/{build_defaults.yaml,project_data.yaml}
rm -r %{buildroot}%{_datadir}/%{name}/ext/{debian,freebsd,gentoo,ips,osx,solaris,suse,windows,systemd,redhat}
rm %{buildroot}%{_datadir}/%{name}/ext/{build_defaults.yaml,project_data.yaml}
%files
%attr(-, puppet, puppet) %{_localstatedir}/log/puppetlabs
%attr(-, puppet, puppet) %{_datadir}/puppetlabs/puppet
%dir %attr(-, puppet, puppet) %{_datadir}/puppetlabs
%{_unitdir}/puppet.service
%attr(-, puppet, puppet) %{_localstatedir}/log/%{name}
%attr(-, root, root) %{_datadir}/%{name}
%{_unitdir}/%{name}.service
%{_tmpfilesdir}/%{name}.conf
%dir %{nm_dispatcher_dir}
%dir %{nm_dispatcher_dir}/dispatcher.d
%{nm_dispatcher_dir}/dispatcher.d/98-puppet
%{_bindir}/start-puppet-agent
# Vendor modules
%doc %{_datadir}/%{name}/vendor_modules/*/*.md
%doc %{_datadir}/%{name}/vendor_modules/*/readmes
%license %{_datadir}/%{name}/vendor_modules/*/LICENSE
# Strip development files
%exclude %{_datadir}/%{name}/vendor_modules/*/.{github,puppet-lint.rc,sync.yml}
%exclude %{_datadir}/%{name}/vendor_modules/*/{CODEOWNERS,Gemfile,appveyor.yml,spec}
%doc README.md examples
%license LICENSE
@ -142,8 +160,10 @@ rm %{buildroot}%{_datadir}/puppetlabs/puppet/ext/{build_defaults.yaml,project_da
%{_datadir}/ruby/vendor_ruby/puppet_pal.rb
%{_datadir}/ruby/vendor_ruby/puppet.rb
%{_datadir}/ruby/vendor_ruby/puppet_x.rb
%{_sharedstatedir}/puppet
%dir %{_sharedstatedir}/%{name}
%dir %{_sharedstatedir}/%{name}/public
%{_bindir}/puppet
%{_bindir}/start-puppet-agent
%{_mandir}/man5/puppet.conf.5*
%{_mandir}/man8/puppet-plugin.8*
%{_mandir}/man8/puppet-report.8*
@ -168,12 +188,9 @@ rm %{buildroot}%{_datadir}/puppetlabs/puppet/ext/{build_defaults.yaml,project_da
%{_mandir}/man8/puppet-node.8*
%{_mandir}/man8/puppet-parser.8*
# Due to the long time without building puppet with a new version, sysconfig and log paths have changed
%config(noreplace) %attr(-, root, root) %dir %{_sysconfdir}/puppetlabs
%config(noreplace) %attr(-, root, root) %dir %{_sysconfdir}/puppetlabs/puppet
%config(noreplace) %attr(-, root, root) %dir %{_sysconfdir}/puppetlabs/code
%config(noreplace) %attr(644, root, root) %{_sysconfdir}/puppetlabs/puppet/puppet.conf
%config(noreplace) %attr(644, root, root) %{_sysconfdir}/puppetlabs/puppet/hiera.yaml
%config(noreplace) %attr(-, root, root) %dir %{_sysconfdir}/%{name}
%config(noreplace) %attr(-, root, root) %dir %{_sysconfdir}/%{name}/code
%config(noreplace) %attr(644, root, root) %{_sysconfdir}/%{name}/puppet.conf
%config(noreplace) %attr(644, root, root) %{_sysconfdir}/logrotate.d/%{name}
%ghost %attr(755, puppet, puppet) %{_rundir}/%{name}
@ -185,12 +202,16 @@ useradd -r -u 52 -g puppet -s /sbin/nologin \
-c "Puppet" puppet &>/dev/null
%post
%systemd_post puppet .service
%systemd_post %{name} .service
%postun
%systemd_postun_with_restart puppet .service
%systemd_postun_with_restart %{name} .service
%changelog
* Tue Aug 17 2021 Ewoud Kohl van Wijngaarden <ewoud+fedora@kohlvanwijngaarden.nl> - 7.9.0-1
- Update to 7.9.0
- Revert paths to FHS standards
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 7.7.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild