%define _python_dist_allow_version_zero %{nil} %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} Name: etckeeper Version: 1.18.20 Release: %mkrel 2 Summary: Store /etc in a SCM system (git, mercurial, brz or darcs) Group: System/Configuration License: GPLv2+ URL: https://etckeeper.branchable.com/ Source0: https://git.joeyh.name/index.cgi/%{name}.git/snapshot/%{name}-%{version}.tar.gz Source1: README.mageia Source2: cron.daily Patch0: etckeeper-1.18.7-makefile-remove-python-plugins.patch Patch1: etckeeper-1.18.10-fdr-add-breezy-python3-plugin.patch BuildArch: noarch Requires: git >= 1.5.4 Suggests: mercurial Suggests: %{name}-brz Requires: perl-base Requires: crontabs Requires: %{name}-dnf = %{version}-%{release} Requires: bash-completion BuildRequires: pkgconfig(libsystemd) BuildRequires: python-setuptools-scm %{?systemd_requires} %description The etckeeper program is a tool to let /etc be stored in a git, mercurial, bzr or darcs repository. It hooks into yum to automatically commit changes made to /etc during package upgrades. It tracks file metadata that version control systems do not normally support, but that is important for /etc, such as the permissions of /etc/shadow. It's quite modular and configurable, while also being simple to use if you understand the basics of working with version control. The default backend is git, if want to use a another backend please install the appropriate tool (mercurial, darcs or bzr). To use bzr as backend, please also install the %{name}-bzr package. To start using the package please read %{_pkgdocdir}/README. %package brz Summary: Support for bzr with etckeeper (via breezy) BuildRequires: python3-devel BuildRequires: brz Requires: %{name} = %{version}-%{release} Requires: brz Obsoletes: %{name}-bzr < 1.18.13 %description brz This package provides a brz (breezy) backend for etckeeper, if you want to use etckeeper with (bzr) bazaar repositories, install this package. %package dnf Summary: DNF plugin for etckeeper support Group: System/Packaging BuildRequires: python3-devel BuildRequires: dnf BuildRequires: dnf-plugins-core Requires: %{name} = %{version}-%{release} Requires: dnf Requires: dnf-plugins-core %description dnf This package provides a DNF plugin for etckeeper. If you want to use etckeeper with DNF, install this package. %prep %autosetup -p1 # we set yum here so we get the yum plugin, which we're going to purge later # we want to install the dnf plugin manually to ensure it's correct sed -e 's|HIGHLEVEL_PACKAGE_MANAGER=.*|HIGHLEVEL_PACKAGE_MANAGER=yum|' \ -e 's|LOWLEVEL_PACKAGE_MANAGER=.*|LOWLEVEL_PACKAGE_MANAGER=rpm|' \ -i etckeeper.conf sed -e 's|^prefix=.*|prefix=%{_prefix}|' \ -e 's|^bindir=.*|bindir=%{_bindir}|' \ -e 's|^etcdir=.*|etcdir=%{_sysconfdir}|' \ -e 's|^mandir=.*|mandir=%{_mandir}|' \ -e 's|^vardir=.*|vardir=%{_localstatedir}|' \ -e 's|^INSTALL=.*|INSTALL=install -p|' \ -e 's|^CP=.*|CP=cp -pR|' \ -i Makefile sed -e 's|^systemddir=.*|systemddir=%{_unitdir}|' \ -i Makefile # move each plugin in its own subdirectory, so each has its own build/ # directory mkdir brz-plugin ; mv etckeeper-brz brz-plugin mkdir dnf-plugin ; mv etckeeper-dnf dnf-plugin cp -av %{SOURCE1} . cp -av doc/README.mdwn README %build %make_build pushd brz-plugin %{__python3} etckeeper-brz/__init__.py build popd pushd dnf-plugin %{__python3} etckeeper-dnf/etckeeper.py build popd %install %make_install pushd brz-plugin %{__python3} etckeeper-brz/__init__.py install -O1 --skip-build --root %{buildroot} popd pushd dnf-plugin %{__python3} etckeeper-dnf/etckeeper.py install -O1 --skip-build --root %{buildroot} # Delete useless files rm -f %{buildroot}%{python3_sitelib}/dnf-plugins/__init__.py rm -f %{buildroot}%{python3_sitelib}/dnf-plugins/__pycache__/__init__.* popd sed -e 's|HIGHLEVEL_PACKAGE_MANAGER=.*|HIGHLEVEL_PACKAGE_MANAGER=dnf|' \ -i %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf install -D -p %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.daily/%{name} install -d %{buildroot}%{_localstatedir}/cache/%{name} # Purge yum plugin, we don't want it rm -rf %{buildroot}%{_prefix}/lib/yum-plugins rm -rf %{buildroot}%{_sysconfdir}/yum/ %post if [ $1 -gt 1 ] ; then %{_bindir}/%{name} update-ignore fi %systemd_post %{name}.service %systemd_post %{name}.timer %preun %systemd_preun %{name}.service %systemd_preun %{name}.timer %files %doc README README.mageia %license GPL %{_bindir}/%{name} %{_mandir}/man8/%{name}.8* %dir %{_sysconfdir}/%{name} %{_sysconfdir}/%{name}/*.d %{_sysconfdir}/%{name}/daily %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %{_sysconfdir}/cron.daily/%{name} %{_datadir}/bash-completion/completions/%{name} %{_localstatedir}/cache/%{name} %{_unitdir}/%{name}.* %{_datadir}/zsh/vendor-completions/_%{name} %files brz %{python3_sitelib}/breezy/plugins/%{name}/ %{python3_sitelib}/brz_%{name}-*.egg-info %files dnf %{python3_sitelib}/dnf-plugins/%{name}.py %{python3_sitelib}/dnf-plugins/__pycache__/%{name}.* %{python3_sitelib}/dnf_%{name}-*.egg-info %changelog * Tue Mar 07 2023 papoteur <papoteur> 1.18.20-2.mga9 + Revision: 1948260 - fix build of python part version not detected * Mon Feb 27 2023 solbu <solbu> 1.18.20-1.mga9 + Revision: 1945591 - New version: 1.18.20 * Sat Sep 24 2022 solbu <solbu> 1.18.18-1.mga9 + Revision: 1892151 - New release: 1.18.18 * Mon Mar 28 2022 umeabot <umeabot> 1.18.17-3.mga9 + Revision: 1830600 - Mageia 9 Mass Rebuild * Tue Feb 22 2022 tv <tv> 1.18.17-2.mga9 + Revision: 1782834 - Rebuild for python-3.10 + solbu <solbu> - New release: 1.18.17 * Sat Mar 27 2021 tv <tv> 1.18.16-2.mga9 + Revision: 1710865 - rebuild for python 3.9 * Fri Mar 12 2021 solbu <solbu> 1.18.16-1.mga9 + Revision: 1701887 - New release - Add crontab script from previous version * Thu Feb 20 2020 umeabot <umeabot> 1.18.14-2.mga8 + Revision: 1545752 - Mageia 8 Mass Rebuild * Wed Jan 29 2020 solbu <solbu> 1.18.14-1.mga8 + Revision: 1485171 - Rename README.fedora > README.mageia. One of the instructions are wrong, so we correct it - New version: 1.18.14 - New release: 1.18.12 * Sat Jul 13 2019 daviddavid <daviddavid> 1.18.10-1.mga8 + Revision: 1420869 - new version: 1.18.10 * Fri Jan 11 2019 daviddavid <daviddavid> 1.18.8-2.mga7 + Revision: 1355006 - rebuild for new Python 3.7 * Wed Nov 07 2018 solbu <solbu> 1.18.8-1.mga7 + Revision: 1328832 - New version: 1.18.8 * Thu Sep 20 2018 umeabot <umeabot> 1.18.7-3.mga7 + Revision: 1278161 - Mageia 7 Mass Rebuild * Sun Dec 31 2017 solbu <solbu> 1.18.7-2.mga7 + Revision: 1188357 - Remove unneeded %%postun lines - Include the acutal README file, not just a broken symlink + ngompa <ngompa> - Revise the spec to build plugins correctly * Sun Dec 31 2017 solbu <solbu> 1.18.7-1.mga7 + Revision: 1188192 - Fix Group - imported package etckeeper * Sun Dec 31 2017 Johnny A. Solbu <johnny@solbu.net> 1.18.7-1.solbu5 - New release: 1.18.7 - Update URL and Source0 url * Wed Jun 11 2014 Johnny A. Solbu <johnny@solbu.net> - 1.11-1 - Porting to Mageia. - Spec cleanup. - Split yum plugin into separate package. * Thu Dec 19 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.11-1 - Update to 1.11. * Sat Nov 9 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.10-1 - Update to 1.10. * Thu Sep 12 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.9-1 - Update to 1.9. * Sun Aug 18 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.7-1 - Update to 1.7. - Define (if undefined) and use _pkgdocdir macro (rhbz#993741). * Tue Jul 30 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.6-1 - Update to 1.6. * Sat Jul 27 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.5-1 - Update to 1.5. * Sat Jul 27 2013 Jóhann B. Guðmundsson <johannbg@fedoraproject.org> - 1.4-2 - Add a missing requirement on crontabs to spec file * Sun Jun 23 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.4-1 - Update to 1.4. * Fri May 10 2013 Thomas Moschny <thomas.moschny@gmx.de> - 1.3-1 - Update to 1.3. * Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.64-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sun Sep 23 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.64-1 - Update to 0.64. * Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.63-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Mon Jun 4 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.63-1 - Update to 0.63. * Tue Mar 13 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.62-2 - Add missing dependency on perl (bz 798563). * Tue Mar 13 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.62-1 - Update to 0.62. * Tue Jan 17 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.61-1 - Update to 0.61. * Fri Jan 13 2012 Thomas Moschny <thomas.moschny@gmx.de> - 0.60-1 - Update to 0.60. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.58-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Thu Dec 1 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.58-1 - Update to 0.58. * Wed Nov 9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.57-1 - Update to 0.57. * Wed Aug 17 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.56-2 - Rebuilt for trailing slash bug of rpm-4.9.1 * Thu Jul 21 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.56-1 - Update to 0.56. * Fri Jun 24 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.55-1 - Update to 0.55. * Wed Jun 1 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.54-1 - Update to 0.54. - Add patch for bz 709487. * Mon Mar 28 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.53-1 - Update to 0.53. - Run update-ignore on package upgrade (bz 680632). * Wed Feb 9 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.52-1 - Update to 0.52. - Include a README.fedora (bz 670934). * Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.51-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Mon Jan 3 2011 Thomas Moschny <thomas.moschny@gmx.de> - 0.51-1 - Update to 0.51. - etckeeper has been moved out of sbin. * Sat Dec 11 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.50-2 - Don't package INSTALL. * Wed Oct 27 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.50-1 - Update to 0.50. - Change %%define -> %%global. * Fri Sep 17 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.49-2 - Adjust minimum required version of GIT. - egg-info files are not created automatically on RHEL5. * Wed Sep 15 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.49-1 - Update to 0.49. - Remove obsolete patch. * Fri Sep 3 2010 Thomas Moschny <thomas.moschny@gmx.de> - 0.48-1 - Update to 0.48. - Don't list /etc/etckeeper/*.d directories twice in %%files. - Add patch from upstream that fixes bz 588086. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.41-2 - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild * Sat Sep 12 2009 Bernie Innocenti <bernie@codewiz.org> - 0.41-1 - Update to 0.41 - Add missing directory ownerships * Sat Sep 12 2009 Bernie Innocenti <bernie@codewiz.org> - 0.40-3 - Make the bzr subpackage builddepend on python-devel * Wed Sep 09 2009 Terje Rosten <terje.rosten@ntnu.no> - 0.40-2 - Package is noarch - Rpmlint clean - Random cleanup - Ship cache dir in package - bzr subpackage - Add bzr to buildreq * Sat Sep 05 2009 Bernie Innocenti <bernie@codewiz.org> - 0.40-1 - Update to 0.40 * Sun Jun 14 2009 Bernie Innocenti <bernie@codewiz.org> - 0.37-1 - Update to 0.37 - Change license tag to GPLv2+ * Fri Feb 27 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.33-4 - fix up initial install to make directory in /var/cache/etckeeper - install the etckeeper daily cron job - define some config files that shouldn't be replaced, should the hooks in commit.d, init.d etc... saved and not blown away? if so they can defined as config files. etckeeper should record the changes anyway. * Wed Feb 25 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.32-1 - yum etckeeper plugin is now apart of this package * Tue Feb 24 2009 Jimmy Tang <jtang@tchpc.tcd.ie> - 0.31-1 - initial package