Compare commits

..

18 commits

Author SHA1 Message Date
Thomas Moschny
9fca22b11f Update sources. 2025-07-15 13:21:23 +02:00
Thomas Moschny
3ba7c6cafc Update to 1.18.22. 2025-07-15 13:13:15 +02:00
Thomas Moschny
b0c51ba48d Update to 1.18.20. 2023-01-28 10:26:40 +01:00
Thomas Moschny
fd12d98901 Update to 1.18.18.
Rebase patches.
Update patch to fix logging with Ansible (#1917461).
BuilRequire setuptools when Python >= 3.12.
2022-12-03 12:47:53 +01:00
Miro Hrončok
fb5a96460b BuilRequire setuptools when Python >= 3.12
The dnf and brz setups use distutils.
Python 3.12 removes distutils,
but setuptools can provide it instead.
2022-12-03 12:25:40 +01:00
Thomas Moschny
a155b18fd2 Update to 1.18.17. 2022-03-08 23:31:13 +01:00
Todd Zullinger
7e8650ff96 require git-core instead of git
Avoid pulling in more dependencies that necessary.  The functionality
required is in git-core.
2022-03-08 23:31:13 +01:00
Thomas Moschny
3413ffada9 Exclude egg-info directories for dnf, bzr and brz plugins (#2048085). 2022-03-08 23:31:13 +01:00
Tom Stellard
23c7d7b6e5 Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2022-03-08 23:31:13 +01:00
Thomas Moschny
ec9a74382f Update to 1.18.16.
Update spec file, remove obsolete conditionals.
2021-02-09 21:13:05 +01:00
Troy Dawson
cc1985118b remove package.cfg per new epel-playground policy 2020-09-24 17:12:58 +00:00
Thomas Moschny
c5b58d564d Update to 1.18.14.
Include zsh completion.
Mark cron file as config file.
2020-03-14 13:12:55 +01:00
Thomas Moschny
4c64fcc5f0 Update to 1.18.12.
New version of patch to fix logging with Ansible (#1762693).
2019-12-01 13:31:04 +01:00
Thomas Moschny
5244985ead Add patch to fix logging with Ansible (#1762693). 2019-11-19 10:11:17 +01:00
Miro Hrončok
601adf7ddb Add breezy plugin on Fedora 31+
- Remove bazaar plugin on Fedora 32+
- https://fedoraproject.org/wiki/Changes/ReplaceBazaarWithBreezy
- https://bugzilla.redhat.com/show_bug.cgi?id=1741027
2019-11-19 10:11:08 +01:00
Thomas Moschny
ee57611c03 Package fixes for CentOS8.
Build dnf plugin on CentOS7.
2019-10-04 22:04:19 +02:00
Thomas Moschny
dff014d992 Import from current master. 2019-10-03 17:25:48 +02:00
Gwyn Ciesla
9d8abcaa58 "Adding package.cfg file" 2019-10-03 08:58:58 -05:00
3 changed files with 116 additions and 167 deletions

View file

@ -1,11 +0,0 @@
--- a/post-install.d/50vcs-commit 2023-12-05 10:45:18.967497833 +0100
+++ b/post-install.d/50vcs-commit 2023-12-05 10:46:00.848138455 +0100
@@ -6,7 +6,7 @@
# Parent process is etckeeper
# (Only procps ps is currently supported, others will fail,
# so this may end up empty.)
-ETCKEEPER_PID=$( ps --no-headers -o ppid "${PPID}" 2>/dev/null | sed 's/^ *//' )
+ETCKEEPER_PID=$( ps --no-headers -o ppid "$$" 2>/dev/null | sed 's/^ *//' )
# Find the parent of etckeeper and get the command line of the process
if ! [ -z "${ETCKEEPER_PID}" ]; then

View file

@ -1,4 +0,0 @@
# to be placed in /etc/dnf/libdnf5-plugins/actions.d
# requires dnf5 5.2.11.0 or later
pre_base_setup:::raise_error=1:/usr/bin/sh -c /usr/bin/etckeeper\ pre-install\ \|\ /usr/bin/sed\ -e\ 's/^/log.INFO=/'
post_transaction::::/usr/bin/sh -c /usr/bin/etckeeper\ post-install\ \|\ /usr/bin/sed\ -e\ 's/^/log.INFO=/'

View file

@ -1,21 +1,30 @@
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
%if 0%{?rhel} && 0%{?rhel} <= 7
%global with_yum 1
%global with_bzr 1
%global bazaar bzr
%endif
%if 0%{?fedora}
%global with_brz 1
%global with_dnf5 1
%global bazaar brz
%endif
%if 0%{?fedora} || 0%{?rhel} >= 8
%global dnf_is_mandatory 1
%global dnf_uses_python3 1
%endif
Name: etckeeper
Version: 1.18.22
Release: 6%{?dist}
Release: 1%{?dist}
Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs)
# Automatically converted from old format: GPLv2+ - review is highly recommended.
License: GPL-2.0-or-later
License: GPLv2+
URL: https://etckeeper.branchable.com/
Source0: https://git.joeyh.name/index.cgi/etckeeper.git/snapshot/%{name}-%{version}.tar.gz
Source1: README.fedora
Source2: cron.daily
Source3: etckeeper.actions
# build plugins separately
Patch0: etckeeper-makefile-remove-python-plugins.patch
# see rhbz#1460461
@ -27,10 +36,7 @@ Patch3: etckeeper-add-breezy-python3-plugin.patch
# see rhbz#1762693 and https://github.com/ansible/ansible/issues/54949
# see also rhbz#1917461
Patch4: etckeeper-1.18.18-fix-output-for-ansible.patch
# see rhbz#2203408 and pr#7
Patch5: etckeeper-1.18.21-bz2203408.patch
BuildArch: noarch
BuildRequires: make
BuildRequires: %{_bindir}/markdown_py
Requires: git-core
Requires: perl-interpreter
@ -38,10 +44,9 @@ Requires: crontabs
Requires: findutils
Requires: hostname
Requires: which
%if 0%{?dnf_is_mandatory}
Requires: %{name}-dnf = %{version}-%{release}
%if 0%{?with_dnf5}
Requires: %{name}-dnf5 = %{version}-%{release}
%endif # with_dnf5
%endif # dnf_is_mandatory
BuildRequires: systemd
Requires(post): systemd
Requires(preun): systemd
@ -58,15 +63,30 @@ 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).
%{?with_brz: To use breezy as bzr backend, please also install the %{name}-brz package.}
%{?bazaar: To use bazaar/breezy as backend, please also install the %{name}-%{bazaar} package.}
To start using the package please read %{_pkgdocdir}/README.
%if 0%{?with_bzr}
%package bzr
Summary: Support for bzr with etckeeper
BuildRequires: python2-devel
BuildRequires: bzr
Requires: %{name} = %{version}-%{release}
Requires: bzr
%description bzr
This package provides a bzr backend for etckeeper, if you want to use
etckeeper with bzr backend, install this package.
%endif # with_bzr
%if 0%{?with_brz}
%package brz
Summary: Support for bzr with etckeeper (via breezy)
BuildRequires: python3-devel
BuildRequires: (python3-setuptools if python3-devel >= 3.12)
BuildRequires: brz
Requires: %{name} = %{version}-%{release}
Requires: brz
@ -79,11 +99,17 @@ etckeeper with (bzr) bazaar repositories, install this package.
%package dnf
Summary: DNF plugin for etckeeper support
%if 0%{?dnf_uses_python3}
BuildRequires: python3-devel
BuildRequires: python3-dnf
Requires: python3-dnf
BuildRequires: (python3-setuptools if python3-devel >= 3.12)
%else
BuildRequires: python2-devel
%endif # dnf_uses_python3
BuildRequires: dnf
BuildRequires: dnf-plugins-core
BuildRequires: make
Requires: %{name} = %{version}-%{release}
Requires: dnf
Requires: dnf-plugins-core
%description dnf
@ -91,22 +117,15 @@ This package provides a DNF plugin for etckeeper. If you want to use
etckeeper with DNF, install this package.
%if 0%{?with_dnf5}
%package dnf5
Summary: DNF5 plugin for etckeeper support
Requires: %{name} = %{version}-%{release}
Requires: libdnf5-plugin-actions >= 5.2.11.0
Requires: sed
%description dnf5
This package provides a DNF5 plugin for etckeeper. If you want to use
etckeeper with DNF5, install this package.
%endif # with_dnf5
%prep
%autosetup -p1
%if 0%{?with_yum}
# we set yum here, so the yum plugin gets built, and change that to
# dnf later, if needed
sed -e 's|HIGHLEVEL_PACKAGE_MANAGER=.*|HIGHLEVEL_PACKAGE_MANAGER=yum|' \
%else
sed -e 's|HIGHLEVEL_PACKAGE_MANAGER=.*|HIGHLEVEL_PACKAGE_MANAGER=dnf|' \
%endif # with_yum
-e 's|LOWLEVEL_PACKAGE_MANAGER=.*|LOWLEVEL_PACKAGE_MANAGER=rpm|' \
-i etckeeper.conf
sed -e 's|^prefix=.*|prefix=%{_prefix}|' \
@ -120,41 +139,37 @@ sed -e 's|^prefix=.*|prefix=%{_prefix}|' \
-i Makefile
# move each plugin in its own subdirectory, so each has its own build/
# directory
mkdir brz-plugin
mv etckeeper-brz brz-plugin
ln -snf etckeeper-brz/__init__.py brz-plugin/setup.py
mkdir dnf-plugin
mv etckeeper-dnf dnf-plugin
ln -snf etckeeper-dnf/etckeeper.py dnf-plugin/setup.py
mkdir bzr-plugin ; mv etckeeper-bzr bzr-plugin
mkdir brz-plugin ; mv etckeeper-brz brz-plugin
mkdir dnf-plugin ; mv etckeeper-dnf dnf-plugin
cp -av %{SOURCE1} .
%generate_buildrequires
%if 0%{?with_brz}
cd brz-plugin
%pyproject_buildrequires
cd ..
%endif # with_brz
cd dnf-plugin
%pyproject_buildrequires
cd ..
%build
%make_build
%if 0%{?with_bzr}
pushd bzr-plugin
%define py_setup etckeeper-bzr/__init__.py
%py2_build
popd
%endif # with_bzr
%if 0%{?with_brz}
cd brz-plugin
%pyproject_wheel
cd ..
pushd brz-plugin
%define py_setup etckeeper-brz/__init__.py
%py3_build
popd
%endif # with_brz
cd dnf-plugin
%pyproject_wheel
cd ..
pushd dnf-plugin
%define py_setup etckeeper-dnf/etckeeper.py build
%if 0%{?dnf_uses_python3}
%py3_build
%else
%py2_build
%endif # dnf_uses_python3
popd
markdown_py -f README.html README.md
@ -162,23 +177,37 @@ markdown_py -f README.html README.md
%install
%make_install
%if 0%{?with_bzr}
pushd bzr-plugin
%define py_setup etckeeper-bzr/__init__.py
%py2_install
popd
%endif # with_bzr
%if 0%{?with_brz}
cd brz-plugin
%pyproject_install
cd ..
pushd brz-plugin
%define py_setup etckeeper-brz/__init__.py
%py3_install
popd
%endif # with_brz
cd dnf-plugin
%pyproject_install
cd ..
pushd dnf-plugin
%define py_setup etckeeper-dnf/etckeeper.py build
%if 0%{?dnf_uses_python3}
%py3_install
%else
%py2_install
%endif # dnf_uses_python3
popd
%if 0%{?dnf_is_mandatory}
sed -e 's|HIGHLEVEL_PACKAGE_MANAGER=.*|HIGHLEVEL_PACKAGE_MANAGER=dnf|' \
-i %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
%endif # dnf_is_mandatory
install -D -p %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.daily/%{name}
install -d %{buildroot}%{_localstatedir}/cache/%{name}
%if 0%{?with_dnf5}
install -D -p %{SOURCE3} %{buildroot}%{_sysconfdir}/dnf/libdnf5-plugins/actions.d/%{name}.actions
%endif # with_dnf5
%post
if [ $1 -gt 1 ] ; then
@ -214,11 +243,25 @@ fi
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/vendor-completions
%{_datadir}/zsh/vendor-completions/_%{name}
%if 0%{?with_yum}
%dir %{_prefix}/lib/yum-plugins
%{_prefix}/lib/yum-plugins/%{name}.*
%dir %{_sysconfdir}/yum/pluginconf.d
%config(noreplace) %{_sysconfdir}/yum/pluginconf.d/%{name}.conf
%endif # with_yum
%{_localstatedir}/cache/%{name}
%{_unitdir}/%{name}.service
%{_unitdir}/%{name}.timer
%if 0%{?with_bzr}
%files bzr
%{python2_sitelib}/bzrlib/plugins/%{name}
# exclude egg-info dir, doesn't contain meaningful information
%exclude %{python2_sitelib}/bzr_%{name}-*.egg-info
%endif # with_bzr
%if 0%{?with_brz}
%files brz
# co-own the plugins directories
@ -227,97 +270,39 @@ fi
%dir %{python3_sitelib}/breezy/plugins/
%{python3_sitelib}/breezy/plugins/%{name}/
# exclude egg-info dir, doesn't contain meaningful information
%exclude %{python3_sitelib}/brz_%{name}-*.dist-info
%exclude %{python3_sitelib}/brz_%{name}-*.egg-info
%endif # with_brz
%files dnf
%if 0%{?dnf_uses_python3}
%{python3_sitelib}/dnf-plugins/%{name}.py
%exclude %{python3_sitelib}/dnf-plugins/__init__.py
%{python3_sitelib}/dnf-plugins/__pycache__/%{name}.*
%exclude %{python3_sitelib}/dnf-plugins/__pycache__/__init__.*
# exclude egg-info dir, doesn't contain meaningful information
%exclude %{python3_sitelib}/dnf_%{name}-*.dist-info
%if 0%{?with_dnf5}
%files dnf5
%{_sysconfdir}/dnf/libdnf5-plugins/actions.d/%{name}.actions
%endif # with_dnf5
%exclude %{python3_sitelib}/dnf_%{name}-*.egg-info
%else
%{python2_sitelib}/dnf-plugins/%{name}.py*
%exclude %{python2_sitelib}/dnf-plugins/__init__.py*
# exclude egg-info dir, doesn't contain meaningful information
%exclude %{python2_sitelib}/dnf_%{name}-*.egg-info
%endif # dnf_uses_python3
%changelog
* Fri Sep 19 2025 Python Maint <python-maint@redhat.com> - 1.18.22-6
- Rebuilt for Python 3.14.0rc3 bytecode
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 1.18.22-5
- Rebuilt for Python 3.14.0rc2 bytecode
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.22-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Tue Jul 15 2025 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.22-3
- Fix conditional.
* Tue Jul 15 2025 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.22-2
- Update action file to produce expected action output.
* Mon Jul 14 2025 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.22-1
* Tue Jul 15 2025 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.22-1
- Update to 1.18.22.
- Remove all EL7-related conditionals and parts.
- Update for current Python packaging guidelines (rhbz#2377253).
- Add support for DNF5 (rhbz#2326283).
* Tue Jun 03 2025 Python Maint <python-maint@redhat.com> - 1.18.21-6
- Rebuilt for Python 3.14
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.21-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 25 2024 Miroslav Suchý <msuchy@redhat.com> - 1.18.21-4
- convert license to SPDX
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.21-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 1.18.21-2
- Rebuilt for Python 3.13
* Wed May 1 2024 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.21-1
- Update to 1.18.21.
- Add patch for rhbz#2203408 from pr#7.
- Depend on python3-dnf, not dnf (pr#6).
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.20-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.20-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jul 25 2023 Python Maint <python-maint@redhat.com> - 1.18.20-3
- Rebuilt for Python 3.12
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Sat Jan 28 2023 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.20-1
- Update to 1.18.20.
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 2 2022 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.18-1
- Update to 1.18.18.
- Rebase patches.
- Update patch to fix logging with Ansible (#1917461).
- BuildRequire setuptools when Python >= 3.12.
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jun 15 2022 Python Maint <python-maint@redhat.com> - 1.18.17-2
- Rebuilt for Python 3.11
* Tue Mar 8 2022 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.17-1
- Update to 1.18.17.
@ -327,36 +312,15 @@ fi
* Mon Jan 31 2022 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.16-5
- Exclude egg-info directories for dnf, bzr and brz plugins (#2048085).
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.16-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 1.18.16-2
- Rebuilt for Python 3.10
* Tue Feb 9 2021 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.16-1
- Update to 1.18.16.
- Update spec file, remove obsolete conditionals.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.14-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.18.14-2
- Rebuilt for Python 3.9
* Sat Mar 14 2020 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.14-1
- Update to 1.18.14.
- Include zsh completion.
- Mark cron file as config file.
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sun Dec 1 2019 Thomas Moschny <thomas.moschny@gmx.de> - 1.18.12-1
- Update to 1.18.12.
- New version of patch to fix logging with Ansible (#1762693).