From b4e7dcf856fea47dbf955a94f96cc6c6cd36cebd Mon Sep 17 00:00:00 2001 From: Python Maint Date: Wed, 15 Jun 2022 18:25:29 +0200 Subject: [PATCH 01/29] Rebuilt for Python 3.11 --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 17a5813..6d95a13 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.17 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -288,6 +288,9 @@ fi %changelog +* Wed Jun 15 2022 Python Maint - 1.18.17-2 +- Rebuilt for Python 3.11 + * Tue Mar 8 2022 Thomas Moschny - 1.18.17-1 - Update to 1.18.17. From c1c0ae2a9408843d98b28d97cccb6a72c8178392 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 02:32:53 +0000 Subject: [PATCH 02/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 6d95a13..23c5983 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.17 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -288,6 +288,9 @@ fi %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 1.18.17-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Wed Jun 15 2022 Python Maint - 1.18.17-2 - Rebuilt for Python 3.11 From 7a7d0e9726d50aab13ebfffe9eed202c7c3b2d90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 21 Oct 2022 12:01:10 +0200 Subject: [PATCH 03/29] BuilRequire setuptools when Python >= 3.12 The dnf and brz setups use distutils. Python 3.12 removes distutils, but setuptools can provide it instead. --- etckeeper.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etckeeper.spec b/etckeeper.spec index 23c5983..c2c7a66 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -85,6 +85,7 @@ etckeeper with bzr backend, install this package. %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 @@ -99,6 +100,7 @@ etckeeper with (bzr) bazaar repositories, install this package. Summary: DNF plugin for etckeeper support %if 0%{?dnf_uses_python3} BuildRequires: python3-devel +BuildRequires: (python3-setuptools if python3-devel >= 3.12) %else BuildRequires: python2-devel %endif # dnf_uses_python3 From 271a95d1f06422d6a5b8d434ce9a551f7159868e Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 3 Dec 2022 12:11:17 +0100 Subject: [PATCH 04/29] Update to 1.18.18. Rebase patches. Update patch to fix logging with Ansible (#1917461). BuilRequire setuptools when Python >= 3.12. --- ...eeper-1.18.12-fix-output-for-ansible.patch | 162 ------------------ ...=> etckeeper-1.18.18-fix-hg-warnings.patch | 4 +- ...eeper-1.18.18-fix-output-for-ansible.patch | 52 ++++++ etckeeper.spec | 15 +- sources | 2 +- 5 files changed, 66 insertions(+), 169 deletions(-) delete mode 100644 etckeeper-1.18.12-fix-output-for-ansible.patch rename etckeeper-1.18.7-fix-hg-warnings.patch => etckeeper-1.18.18-fix-hg-warnings.patch (95%) create mode 100644 etckeeper-1.18.18-fix-output-for-ansible.patch diff --git a/etckeeper-1.18.12-fix-output-for-ansible.patch b/etckeeper-1.18.12-fix-output-for-ansible.patch deleted file mode 100644 index 7ca4b4f..0000000 --- a/etckeeper-1.18.12-fix-output-for-ansible.patch +++ /dev/null @@ -1,162 +0,0 @@ -From 8266a4fb45621e08085c58537a531f33fc7eca74 Mon Sep 17 00:00:00 2001 -From: Alan Jenkins -Date: Wed, 10 Apr 2019 00:19:14 +0100 -Subject: [PATCH 1/2] DNF: stderr is not ours to log to (and doing so breaks - Ansible) - -stderr does not belong to etckeeper-dnf ---------------------------------------- - -The Ansible dnf module uses the python dnf bindings. In contexts like -these, stdout/stderr is owned by the host app (Ansible). dnf should not -mess with stdout/stderr, unless the host app asks it to log there. - -Specifically, we were breaking the JSON output of the Ansible dnf module. -This was only noticeable when the etckeeper message began with a "[" -character. Ansible has a mechanism to try and skip header messages like -login banners. However, "[" is a valid character to start a JSON document. - -https://unix.stackexchange.com/questions/511210/ansible-dnf-module-module-failure/ - -Solution --------- - -Instead, log any non-zero exit status through the dnf logger. - -For the pre-transaction etckeeper run, this message replaces an exception. -So we now avoid logging a traceback, which did not appear to add anything -useful. (In my testing, dnf was continued to install after the exception -was logged). - -I have also added a warning message for the post-transaction etckeeper run. - -I switched from os.system() to subprocess.call(). The latter interface -supports better error reporting. (When I tested os.system(), it returned -an errno number which was indistinguishable from an exit code). - -etckeeper >/dev/null 2>&1 --------------------------- - -Any specific error messages from etckeeper are now discarded. Because -unfortunately, python conventions about passing text strings have been -somewhat unclear. It is an error to log strings if the encoding settings -of a registered logger cannot handle them. Because a "bad" character -causes the entire string to be discarded, and optionally an exception -printed to stderr. In a previous proposal I showed code that should be -correct in all expected cases. However, the length of comment required to -define "all expected cases" was not very reassuring. - -That was on top of explaining that dnf has a workaround that will avoid -raising exceptions when arbitrary unicode is logged to stdout. My proposal -had to include that explanation, to show that we were not breaking a -system package manager. - -It might sound strange to talk about error messages with characters -we cannot encode. But I have one word for you: "filenames". - -(After the recent python PR #14008[1], logging.basicConfig() defaults -to errors='backslashreplace'. Also, errors= can be manually specified when -creating a lower-level logging "Handler". I think this will resolve the -problem in the future. It means that when programs are written for this -new version of python, it should be the responsibility of the log setup -code to prevent UnicodeEncodeError.) - -[1] https://github.com/python/cpython/pull/14008 ---- - etckeeper-dnf/etckeeper.py | 27 ++++++++++++++++----------- - 1 file changed, 16 insertions(+), 11 deletions(-) - -diff --git a/etckeeper-dnf/etckeeper.py b/etckeeper-dnf/etckeeper.py -index e8a1a51..69edd88 100644 ---- a/etckeeper-dnf/etckeeper.py -+++ b/etckeeper-dnf/etckeeper.py -@@ -9,7 +9,7 @@ - - from dnfpluginscore import logger - --import os -+import subprocess - import dnf - - -@@ -17,20 +17,25 @@ class Etckeeper(dnf.Plugin): - - name = 'etckeeper' - -- def _out(self, msg): -- logger.debug('Etckeeper plugin: %s', msg) -+ def _run_command(self, command): -+ logger.debug('Etckeeper plugin: %s', command) -+ try: -+ with open("/dev/null", "wb") as devnull: -+ ret = subprocess.call(("etckeeper", command), -+ stdout=devnull, stderr=devnull, -+ close_fds=True) -+ if ret > 0: -+ logger.warning('"etckeeper %s" failed (exit code %d)' % (command, ret)) -+ if ret < 0: -+ logger.warning('"etckeeper %s" died (signal %d)' % (command, -ret)) -+ except OSError as err: -+ logger.warning('Failed to run "etckeeper %s": %s' % (command, err)) - - def resolved(self): -- self._out('pre transaction commit') -- command = '%s %s' % ('etckeeper', " pre-install") -- ret = os.system(command) -- if ret != 0: -- raise dnf.exceptions.Error('etckeeper returned %d' % (ret >> 8)) -+ self._run_command("pre-install") - - def transaction(self): -- self._out('post transaction commit') -- command = '%s %s > /dev/null' % ('etckeeper', "post-install") -- os.system(command) -+ self._run_command("post-install") - - if __name__ == "__main__": - from distutils.core import setup --- -2.23.0 - - -From 7cda9678b1e60c0495a2a522721b319843d5fae0 Mon Sep 17 00:00:00 2001 -From: Alan Jenkins -Date: Tue, 23 Apr 2019 20:15:01 +0100 -Subject: [PATCH 2/2] Do not use dnfpluginscore.logger - -dnfpluginscore is not core support for dnf plugins, it is just a -collection of "core plugins" for dnf. There is equally -dnfpluginsextras and dnfpluginsextras.logger. - -A comment in dnf.logger comment says the logger name 'dnf.plugin' is "api". -So we can safely rely on that name. - -Technically you can install etckeeper without the dnfpluginscore package -(at least I managed to run into this for python2, on a Fedora 29 system -which uses python3 for dnf by default). ---- - etckeeper-dnf/etckeeper.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/etckeeper-dnf/etckeeper.py b/etckeeper-dnf/etckeeper.py -index 69edd88..d9dd2c3 100644 ---- a/etckeeper-dnf/etckeeper.py -+++ b/etckeeper-dnf/etckeeper.py -@@ -7,11 +7,12 @@ - # Distutils code below was copied from etckeeper-bzr distributed with v1.15 - # - --from dnfpluginscore import logger -- -+import logging - import subprocess - import dnf - -+logger = logging.getLogger('dnf.plugin') -+ - - class Etckeeper(dnf.Plugin): - --- -2.23.0 - diff --git a/etckeeper-1.18.7-fix-hg-warnings.patch b/etckeeper-1.18.18-fix-hg-warnings.patch similarity index 95% rename from etckeeper-1.18.7-fix-hg-warnings.patch rename to etckeeper-1.18.18-fix-hg-warnings.patch index 90c6818..7a74e70 100644 --- a/etckeeper-1.18.7-fix-hg-warnings.patch +++ b/etckeeper-1.18.18-fix-hg-warnings.patch @@ -1,5 +1,5 @@ diff --git a/pre-commit.d/20warn-problem-files b/pre-commit.d/20warn-problem-files -index 6bd5c2b..7899268 100755 +index 43320e4..7899268 100755 --- a/pre-commit.d/20warn-problem-files +++ b/pre-commit.d/20warn-problem-files @@ -1,19 +1,20 @@ @@ -7,7 +7,7 @@ index 6bd5c2b..7899268 100755 set -e -exclude_internal () { -- egrep -v '(^|/)(\.git|\.hg|\.bzr|_darcs)/' +- grep -E -v '(^|/)(\.git|\.hg|\.bzr|_darcs)/' -} +# (Note that when using this, the find expression must end with +# -print or -exec, else the excluded directories will actually be diff --git a/etckeeper-1.18.18-fix-output-for-ansible.patch b/etckeeper-1.18.18-fix-output-for-ansible.patch new file mode 100644 index 0000000..b36af3c --- /dev/null +++ b/etckeeper-1.18.18-fix-output-for-ansible.patch @@ -0,0 +1,52 @@ +diff --git a/etckeeper-dnf/etckeeper.py b/etckeeper-dnf/etckeeper.py +index e8a1a51..7c3210b 100644 +--- a/etckeeper-dnf/etckeeper.py ++++ b/etckeeper-dnf/etckeeper.py +@@ -7,30 +7,34 @@ + # Distutils code below was copied from etckeeper-bzr distributed with v1.15 + # + +-from dnfpluginscore import logger +- +-import os ++import logging ++import subprocess + import dnf + ++logger = logging.getLogger('dnf.plugin') ++ + + class Etckeeper(dnf.Plugin): + + name = 'etckeeper' + +- def _out(self, msg): +- logger.debug('Etckeeper plugin: %s', msg) ++ def _run_command(self, command): ++ logger.debug('Etckeeper plugin: %s', command) ++ try: ++ with open("/dev/null", "wb") as devnull: ++ ret = subprocess.call(("etckeeper", command), ++ stdout=devnull, stderr=devnull, ++ close_fds=True) ++ if ret != 0: ++ raise dnf.exceptions.Error('"etckeeper %s" returned: %d' % (command, ret)) ++ except OSError as err: ++ logger.warning('Failed to run "etckeeper %s": %s' % (command, err)) + + def resolved(self): +- self._out('pre transaction commit') +- command = '%s %s' % ('etckeeper', " pre-install") +- ret = os.system(command) +- if ret != 0: +- raise dnf.exceptions.Error('etckeeper returned %d' % (ret >> 8)) ++ self._run_command("pre-install") + + def transaction(self): +- self._out('post transaction commit') +- command = '%s %s > /dev/null' % ('etckeeper', "post-install") +- os.system(command) ++ self._run_command("post-install") + + if __name__ == "__main__": + from distutils.core import setup diff --git a/etckeeper.spec b/etckeeper.spec index c2c7a66..9debc57 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -17,8 +17,8 @@ %endif Name: etckeeper -Version: 1.18.17 -Release: 3%{?dist} +Version: 1.18.18 +Release: 1%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -30,11 +30,12 @@ Patch0: etckeeper-makefile-remove-python-plugins.patch # see rhbz#1460461 Patch1: etckeeper-1.18.7-fix-rpm-ignores.patch # see rhbz#1480843 -Patch2: etckeeper-1.18.7-fix-hg-warnings.patch +Patch2: etckeeper-1.18.18-fix-hg-warnings.patch # From https://bugs.launchpad.net/ubuntu/+source/etckeeper/+bug/1826855 Patch3: etckeeper-add-breezy-python3-plugin.patch # see rhbz#1762693 and https://github.com/ansible/ansible/issues/54949 -Patch4: etckeeper-1.18.12-fix-output-for-ansible.patch +# see also rhbz#1917461 +Patch4: etckeeper-1.18.18-fix-output-for-ansible.patch BuildArch: noarch BuildRequires: %{_bindir}/markdown_py Requires: git-core @@ -290,6 +291,12 @@ fi %changelog +* Fri Dec 2 2022 Thomas Moschny - 1.18.18-1 +- Update to 1.18.18. +- Rebase patches. +- Update patch to fix logging with Ansible (#1917461). +- BuilRequire setuptools when Python >= 3.12. + * Thu Jul 21 2022 Fedora Release Engineering - 1.18.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 73fac7e..9afa13c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (etckeeper-1.18.17.tar.gz) = 6e75d0f38c8d27ba290ab6e1a51d50ca7a736c958da7a1edb792a5c7f1eedd4848adbb43571425f127bf2c5fe39d5b7887968b09178ca5385ec0abeaeb6cfa00 +SHA512 (etckeeper-1.18.18.tar.gz) = 57b2f7297c0b71e3d39a7838dd3e6599bb3f1275d86200be9d7986f46f0392aa0ba130cb38ba7a5757fcb5d6fa33b4d32233237dba15e8ce9fb8c52565cf251b From 1b9858c84cb4d4411b4dc245ead537217c750f5a Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 02:49:56 +0000 Subject: [PATCH 05/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 9debc57..d2e13d3 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.18 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 1.18.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Fri Dec 2 2022 Thomas Moschny - 1.18.18-1 - Update to 1.18.18. - Rebase patches. From c9ab258fe63b0d20f1f698c294e5b505d99ef676 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sat, 28 Jan 2023 10:13:06 +0100 Subject: [PATCH 06/29] Update to 1.18.20. --- etckeeper.spec | 9 ++++++--- sources | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index d2e13d3..4c40156 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -17,8 +17,8 @@ %endif Name: etckeeper -Version: 1.18.18 -Release: 2%{?dist} +Version: 1.18.20 +Release: 1%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Sat Jan 28 2023 Thomas Moschny - 1.18.20-1 +- Update to 1.18.20. + * Thu Jan 19 2023 Fedora Release Engineering - 1.18.18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild @@ -298,7 +301,7 @@ fi - Update to 1.18.18. - Rebase patches. - Update patch to fix logging with Ansible (#1917461). -- BuilRequire setuptools when Python >= 3.12. +- BuildRequire setuptools when Python >= 3.12. * Thu Jul 21 2022 Fedora Release Engineering - 1.18.17-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild diff --git a/sources b/sources index 9afa13c..5d4192f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (etckeeper-1.18.18.tar.gz) = 57b2f7297c0b71e3d39a7838dd3e6599bb3f1275d86200be9d7986f46f0392aa0ba130cb38ba7a5757fcb5d6fa33b4d32233237dba15e8ce9fb8c52565cf251b +SHA512 (etckeeper-1.18.20.tar.gz) = b190da11ac589d6240c8293d961b75efe01e835091f9b5fba84c3c9062ffb4cb1dc52c9ea2bdf881f021c7d5584c4487d3c60121fdcb0a2a35e349c8321422c6 From 87aff6b5d0c02135b2bfaa0998cbeb5a816768cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 19 Jul 2023 19:02:32 +0000 Subject: [PATCH 07/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 4c40156..3825fd2 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.20 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Wed Jul 19 2023 Fedora Release Engineering - 1.18.20-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Sat Jan 28 2023 Thomas Moschny - 1.18.20-1 - Update to 1.18.20. From 02c3e185a70d54ffc2523e7fa1367d52796e9b83 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 25 Jul 2023 12:22:02 +0200 Subject: [PATCH 08/29] Rebuilt for Python 3.12 --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 3825fd2..aa4d67d 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.20 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Tue Jul 25 2023 Python Maint - 1.18.20-3 +- Rebuilt for Python 3.12 + * Wed Jul 19 2023 Fedora Release Engineering - 1.18.20-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From 42f89e1794f7254a65c2b165651f94db9eb32d02 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jan 2024 18:39:10 +0000 Subject: [PATCH 09/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index aa4d67d..4c6e831 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.20 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Fri Jan 19 2024 Fedora Release Engineering - 1.18.20-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Tue Jul 25 2023 Python Maint - 1.18.20-3 - Rebuilt for Python 3.12 From a5bc5650757adfbc4b2286f7019ff7db40609809 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 24 Jan 2024 10:55:18 +0000 Subject: [PATCH 10/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 4c6e831..42b6983 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.20 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Wed Jan 24 2024 Fedora Release Engineering - 1.18.20-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Fri Jan 19 2024 Fedora Release Engineering - 1.18.20-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 7daca89518bc5a8114637e86a5002250d4a397a7 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Wed, 1 May 2024 19:02:47 +0200 Subject: [PATCH 11/29] Update to 1.18.21. --- etckeeper.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index 42b6983..30c7b1a 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -17,8 +17,8 @@ %endif Name: etckeeper -Version: 1.18.20 -Release: 5%{?dist} +Version: 1.18.21 +Release: 1%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -291,6 +291,9 @@ fi %changelog +* Wed May 1 2024 Thomas Moschny - 1.18.21-1 +- Update to 1.18.21. + * Wed Jan 24 2024 Fedora Release Engineering - 1.18.20-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild diff --git a/sources b/sources index 5d4192f..cd0fb6a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (etckeeper-1.18.20.tar.gz) = b190da11ac589d6240c8293d961b75efe01e835091f9b5fba84c3c9062ffb4cb1dc52c9ea2bdf881f021c7d5584c4487d3c60121fdcb0a2a35e349c8321422c6 +SHA512 (etckeeper-1.18.21.tar.gz) = c23bd0f24e04b565ceae77e552eb00926dae16f4a6c8c183c5a6bb404d5351ee7a040e01287b7c0d3d530bc8dea62cd2336b3151a349998aa9c145f1258ac2a0 From d1ea1e7de658e3263c0cbea20e8051f0d575c914 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Wed, 1 May 2024 19:37:30 +0200 Subject: [PATCH 12/29] Add patch for rhbz#2203408 from pr#7. --- etckeeper-1.18.21-bz2203408.patch | 11 +++++++++++ etckeeper.spec | 3 +++ 2 files changed, 14 insertions(+) create mode 100644 etckeeper-1.18.21-bz2203408.patch diff --git a/etckeeper-1.18.21-bz2203408.patch b/etckeeper-1.18.21-bz2203408.patch new file mode 100644 index 0000000..537192b --- /dev/null +++ b/etckeeper-1.18.21-bz2203408.patch @@ -0,0 +1,11 @@ +--- 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 diff --git a/etckeeper.spec b/etckeeper.spec index 30c7b1a..a38dfb8 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -36,6 +36,8 @@ 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: %{_bindir}/markdown_py Requires: git-core @@ -293,6 +295,7 @@ fi %changelog * Wed May 1 2024 Thomas Moschny - 1.18.21-1 - Update to 1.18.21. +- Add patch for rhbz#2203408 from pr#7. * Wed Jan 24 2024 Fedora Release Engineering - 1.18.20-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From f01b9f8030ba65a4b01b45a3d55a781cc055a6fc Mon Sep 17 00:00:00 2001 From: Evan Goode Date: Tue, 23 May 2023 12:26:57 -0400 Subject: [PATCH 13/29] Depend on python3-dnf, not dnf DNF is being replaced by a new package manager, DNF 5, in Fedora 39+. The `dnf` package will soon be obsoleted by the `dnf5` package. The old DNF 4 library functionality will still be (and always has been) available under the `python3-dnf` package; the `dnf` package only provides `/usr/bin/dnf`. Eventually, etckeeper should switch to using libdnf5. --- etckeeper.spec | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index a38dfb8..8ec6022 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -104,14 +104,16 @@ Summary: DNF plugin for etckeeper support %if 0%{?dnf_uses_python3} BuildRequires: python3-devel BuildRequires: (python3-setuptools if python3-devel >= 3.12) +BuildRequires: python3-dnf +Requires: python3-dnf %else BuildRequires: python2-devel -%endif # dnf_uses_python3 BuildRequires: dnf +Requires: dnf +%endif # dnf_uses_python3 BuildRequires: dnf-plugins-core BuildRequires: make Requires: %{name} = %{version}-%{release} -Requires: dnf Requires: dnf-plugins-core %description dnf From 589409b24c2049234829e2be294fbc8679979707 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Wed, 1 May 2024 20:59:58 +0200 Subject: [PATCH 14/29] Merged PR#6. --- etckeeper.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/etckeeper.spec b/etckeeper.spec index 8ec6022..25b7112 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -298,6 +298,7 @@ fi * Wed May 1 2024 Thomas Moschny - 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 - 1.18.20-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 4482a1283a6fc040c4ebd6617a8de904e9137e55 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 7 Jun 2024 22:43:55 +0200 Subject: [PATCH 15/29] Rebuilt for Python 3.13 --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 25b7112..a651af2 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.21 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -295,6 +295,9 @@ fi %changelog +* Fri Jun 07 2024 Python Maint - 1.18.21-2 +- Rebuilt for Python 3.13 + * Wed May 1 2024 Thomas Moschny - 1.18.21-1 - Update to 1.18.21. - Add patch for rhbz#2203408 from pr#7. From c40275ea18448958b44d24f8885fb46e825d117d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 17 Jul 2024 22:29:26 +0000 Subject: [PATCH 16/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index a651af2..6d39921 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.21 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) License: GPLv2+ URL: https://etckeeper.branchable.com/ @@ -295,6 +295,9 @@ fi %changelog +* Wed Jul 17 2024 Fedora Release Engineering - 1.18.21-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Fri Jun 07 2024 Python Maint - 1.18.21-2 - Rebuilt for Python 3.13 From 922d9a0613dad7b10129cb499b2e747aee7b227f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Thu, 25 Jul 2024 23:42:02 +0200 Subject: [PATCH 17/29] convert GPLv2+ license to SPDX This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4 --- etckeeper.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index 6d39921..3720976 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,9 +18,10 @@ Name: etckeeper Version: 1.18.21 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Store /etc in a SCM system (git, mercurial, bzr or darcs) -License: GPLv2+ +# Automatically converted from old format: GPLv2+ - review is highly recommended. +License: GPL-2.0-or-later URL: https://etckeeper.branchable.com/ Source0: https://git.joeyh.name/index.cgi/etckeeper.git/snapshot/%{name}-%{version}.tar.gz Source1: README.fedora @@ -295,6 +296,9 @@ fi %changelog +* Thu Jul 25 2024 Miroslav Suchý - 1.18.21-4 +- convert license to SPDX + * Wed Jul 17 2024 Fedora Release Engineering - 1.18.21-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From fde6b6dbd954a87f58bf10e1032a6300e93be4da Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 16 Jan 2025 17:32:22 +0000 Subject: [PATCH 18/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 3720976..1ed606d 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.21 -Release: 4%{?dist} +Release: 5%{?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 @@ -296,6 +296,9 @@ fi %changelog +* Thu Jan 16 2025 Fedora Release Engineering - 1.18.21-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 25 2024 Miroslav Suchý - 1.18.21-4 - convert license to SPDX From 4958724e4dcaf9f022392f1cbc4c145afd797879 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 15:25:40 +0200 Subject: [PATCH 19/29] Rebuilt for Python 3.14 --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 1ed606d..ef5a149 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -18,7 +18,7 @@ Name: etckeeper Version: 1.18.21 -Release: 5%{?dist} +Release: 6%{?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 @@ -296,6 +296,9 @@ fi %changelog +* Tue Jun 03 2025 Python Maint - 1.18.21-6 +- Rebuilt for Python 3.14 + * Thu Jan 16 2025 Fedora Release Engineering - 1.18.21-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From 79b07d68a8420a84cc7fab928728dda70428784f Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Sun, 29 Jun 2025 20:29:30 +0200 Subject: [PATCH 20/29] Update to 1.18.22. --- etckeeper.spec | 7 +++++-- sources | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index ef5a149..e6919b9 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -17,8 +17,8 @@ %endif Name: etckeeper -Version: 1.18.21 -Release: 6%{?dist} +Version: 1.18.22 +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 @@ -296,6 +296,9 @@ fi %changelog +* Sun Jun 29 2025 Thomas Moschny - 1.18.22-1 +- Update to 1.18.22. + * Tue Jun 03 2025 Python Maint - 1.18.21-6 - Rebuilt for Python 3.14 diff --git a/sources b/sources index cd0fb6a..1412813 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (etckeeper-1.18.21.tar.gz) = c23bd0f24e04b565ceae77e552eb00926dae16f4a6c8c183c5a6bb404d5351ee7a040e01287b7c0d3d530bc8dea62cd2336b3151a349998aa9c145f1258ac2a0 +SHA512 (etckeeper-1.18.22.tar.gz) = e35ab90862c1f4426c17aec4d9ffe5975c652b290645ac333e9f27fcc157b9eba5e0efe73553a400464102c939f085f4e08f4b04564a015ad6941b1d50dbbe76 From 9bb9852468381f773d12aa521597e50fae8fe47c Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 14 Jul 2025 15:36:31 +0200 Subject: [PATCH 21/29] Remove all EL7-related conditionals and parts. --- etckeeper.spec | 94 ++------------------------------------------------ 1 file changed, 3 insertions(+), 91 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index e6919b9..e962e5d 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -1,19 +1,7 @@ %{!?_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 bazaar brz -%endif - -%if 0%{?fedora} || 0%{?rhel} >= 8 -%global dnf_is_mandatory 1 -%global dnf_uses_python3 1 %endif Name: etckeeper @@ -47,9 +35,7 @@ Requires: crontabs Requires: findutils Requires: hostname Requires: which -%if 0%{?dnf_is_mandatory} Requires: %{name}-dnf = %{version}-%{release} -%endif # dnf_is_mandatory BuildRequires: systemd Requires(post): systemd Requires(preun): systemd @@ -66,25 +52,11 @@ 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). -%{?bazaar: To use bazaar/breezy as backend, please also install the %{name}-%{bazaar} package.} +%{?with_brz: To use breezy as bzr backend, please also install the %{name}-brz 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) @@ -102,16 +74,10 @@ 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-setuptools if python3-devel >= 3.12) BuildRequires: python3-dnf Requires: python3-dnf -%else -BuildRequires: python2-devel -BuildRequires: dnf -Requires: dnf -%endif # dnf_uses_python3 BuildRequires: dnf-plugins-core BuildRequires: make Requires: %{name} = %{version}-%{release} @@ -124,13 +90,7 @@ etckeeper with DNF, install this package. %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}|' \ @@ -144,7 +104,6 @@ sed -e 's|^prefix=.*|prefix=%{_prefix}|' \ -i Makefile # move each plugin in its own subdirectory, so each has its own build/ # directory -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} . @@ -153,13 +112,6 @@ cp -av %{SOURCE1} . %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} pushd brz-plugin %define py_setup etckeeper-brz/__init__.py @@ -169,11 +121,7 @@ popd 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 @@ -182,13 +130,6 @@ 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} pushd brz-plugin %define py_setup etckeeper-brz/__init__.py @@ -198,18 +139,9 @@ popd 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} @@ -248,25 +180,11 @@ 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 @@ -280,24 +198,18 @@ fi %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}-*.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 -* Sun Jun 29 2025 Thomas Moschny - 1.18.22-1 +* Mon Jul 14 2025 Thomas Moschny - 1.18.22-1 - Update to 1.18.22. +- Remove all EL7-related conditionals and parts. * Tue Jun 03 2025 Python Maint - 1.18.21-6 - Rebuilt for Python 3.14 From e0589d4bdf37a99e8d97927753e8d29bb18db344 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 14 Jul 2025 19:56:05 +0200 Subject: [PATCH 22/29] Update for current Python packaging guidelines (rhbz#2377253). --- etckeeper.spec | 57 +++++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index e962e5d..0736a37 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -61,7 +61,6 @@ To start using the package please read %{_pkgdocdir}/README. %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 @@ -75,7 +74,6 @@ etckeeper with (bzr) bazaar repositories, install this package. %package dnf Summary: DNF plugin for etckeeper support BuildRequires: python3-devel -BuildRequires: (python3-setuptools if python3-devel >= 3.12) BuildRequires: python3-dnf Requires: python3-dnf BuildRequires: dnf-plugins-core @@ -104,25 +102,41 @@ 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 -mkdir dnf-plugin ; mv etckeeper-dnf dnf-plugin +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 + 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_brz} -pushd brz-plugin -%define py_setup etckeeper-brz/__init__.py -%py3_build -popd +cd brz-plugin +%pyproject_wheel +cd .. %endif # with_brz -pushd dnf-plugin -%define py_setup etckeeper-dnf/etckeeper.py build -%py3_build -popd +cd dnf-plugin +%pyproject_wheel +cd .. markdown_py -f README.html README.md @@ -131,16 +145,14 @@ markdown_py -f README.html README.md %make_install %if 0%{?with_brz} -pushd brz-plugin -%define py_setup etckeeper-brz/__init__.py -%py3_install -popd +cd brz-plugin +%pyproject_install +cd .. %endif # with_brz -pushd dnf-plugin -%define py_setup etckeeper-dnf/etckeeper.py build -%py3_install -popd +cd dnf-plugin +%pyproject_install +cd .. install -D -p %{SOURCE2} %{buildroot}%{_sysconfdir}/cron.daily/%{name} install -d %{buildroot}%{_localstatedir}/cache/%{name} @@ -193,7 +205,7 @@ 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}-*.egg-info +%exclude %{python3_sitelib}/brz_%{name}-*.dist-info %endif # with_brz @@ -203,13 +215,14 @@ fi %{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}-*.egg-info +%exclude %{python3_sitelib}/dnf_%{name}-*.dist-info %changelog * Mon Jul 14 2025 Thomas Moschny - 1.18.22-1 - Update to 1.18.22. - Remove all EL7-related conditionals and parts. +- Update for current Python packaging guidelines. * Tue Jun 03 2025 Python Maint - 1.18.21-6 - Rebuilt for Python 3.14 From cb78c6e477cdd6f7c690060ebd734c6fa0c4be1f Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 14 Jul 2025 22:28:31 +0200 Subject: [PATCH 23/29] Add support for DNF5 (rhbz#2326283). --- etckeeper.spec | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index 0736a37..8cf7df9 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -2,6 +2,7 @@ %if 0%{?fedora} %global with_brz 1 +%global with_dnf5 1 %endif Name: etckeeper @@ -14,6 +15,7 @@ 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 @@ -28,6 +30,7 @@ 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 @@ -36,6 +39,9 @@ Requires: findutils Requires: hostname Requires: which Requires: %{name}-dnf = %{version}-%{release} +%if 0%{?with_dnf5} +Requires: %{name}-dnf5 = %{version}-%{release} +%endif # with_dnf5 BuildRequires: systemd Requires(post): systemd Requires(preun): systemd @@ -77,7 +83,6 @@ BuildRequires: python3-devel BuildRequires: python3-dnf Requires: python3-dnf BuildRequires: dnf-plugins-core -BuildRequires: make Requires: %{name} = %{version}-%{release} Requires: dnf-plugins-core @@ -86,6 +91,18 @@ 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 + +%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 sed -e 's|HIGHLEVEL_PACKAGE_MANAGER=.*|HIGHLEVEL_PACKAGE_MANAGER=dnf|' \ @@ -157,6 +174,10 @@ cd .. 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 @@ -218,11 +239,18 @@ fi %exclude %{python3_sitelib}/dnf_%{name}-*.dist-info +%if 0%{with_dnf5} +%files dnf5 +%{_sysconfdir}/dnf/libdnf5-plugins/actions.d/%{name}.actions +%endif # with_dnf5 + + %changelog * Mon Jul 14 2025 Thomas Moschny - 1.18.22-1 - Update to 1.18.22. - Remove all EL7-related conditionals and parts. -- Update for current Python packaging guidelines. +- Update for current Python packaging guidelines (rhbz#2377253). +- Add support for DNF5 (rhbz#2326283). * Tue Jun 03 2025 Python Maint - 1.18.21-6 - Rebuilt for Python 3.14 From b0bd45069e4e49cac25c93c474dc2a4c501895f6 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Mon, 14 Jul 2025 22:41:21 +0200 Subject: [PATCH 24/29] Add missing source file. --- etckeeper.actions | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 etckeeper.actions diff --git a/etckeeper.actions b/etckeeper.actions new file mode 100644 index 0000000..6ed21ac --- /dev/null +++ b/etckeeper.actions @@ -0,0 +1,4 @@ +# to be placed in /etc/dnf/libdnf5-plugins/actions.d +# requires dnf5 5.2.11.0 or later +pre_base_setup:::raise_error=1:etckeeper pre-install +post_transaction::::etckeeper post-install From 5c5e2591b222a0d6b6db6854cb1dbe39671cde05 Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 15 Jul 2025 11:27:31 +0200 Subject: [PATCH 25/29] Update action file to produce expected action output. --- etckeeper.actions | 4 ++-- etckeeper.spec | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/etckeeper.actions b/etckeeper.actions index 6ed21ac..f654e21 100644 --- a/etckeeper.actions +++ b/etckeeper.actions @@ -1,4 +1,4 @@ # to be placed in /etc/dnf/libdnf5-plugins/actions.d # requires dnf5 5.2.11.0 or later -pre_base_setup:::raise_error=1:etckeeper pre-install -post_transaction::::etckeeper post-install +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=/' diff --git a/etckeeper.spec b/etckeeper.spec index 8cf7df9..74f061d 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -7,7 +7,7 @@ Name: etckeeper Version: 1.18.22 -Release: 1%{?dist} +Release: 2%{?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 @@ -96,6 +96,7 @@ etckeeper with DNF, install this package. 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 @@ -246,6 +247,9 @@ fi %changelog +* Tue Jul 15 2025 Thomas Moschny - 1.18.22-2 +- Update action file to produce expected action output. + * Mon Jul 14 2025 Thomas Moschny - 1.18.22-1 - Update to 1.18.22. - Remove all EL7-related conditionals and parts. From fa46cc7b0ce57f9dd4430dc2f86fa9afe399bd5b Mon Sep 17 00:00:00 2001 From: Thomas Moschny Date: Tue, 15 Jul 2025 12:50:14 +0200 Subject: [PATCH 26/29] Fix conditional. --- etckeeper.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/etckeeper.spec b/etckeeper.spec index 74f061d..4a85d12 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -7,7 +7,7 @@ Name: etckeeper Version: 1.18.22 -Release: 2%{?dist} +Release: 3%{?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 @@ -240,13 +240,16 @@ fi %exclude %{python3_sitelib}/dnf_%{name}-*.dist-info -%if 0%{with_dnf5} +%if 0%{?with_dnf5} %files dnf5 %{_sysconfdir}/dnf/libdnf5-plugins/actions.d/%{name}.actions %endif # with_dnf5 %changelog +* Tue Jul 15 2025 Thomas Moschny - 1.18.22-3 +- Fix conditional. + * Tue Jul 15 2025 Thomas Moschny - 1.18.22-2 - Update action file to produce expected action output. From 308dfc9c2a4fb70aec3fcb86413884d6f6717285 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 23 Jul 2025 20:09:54 +0000 Subject: [PATCH 27/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 4a85d12..31e0673 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -7,7 +7,7 @@ Name: etckeeper Version: 1.18.22 -Release: 3%{?dist} +Release: 4%{?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 @@ -247,6 +247,9 @@ fi %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 1.18.22-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Tue Jul 15 2025 Thomas Moschny - 1.18.22-3 - Fix conditional. From 17530229049a2b3758fb4a9d2f69bd1b46c748e6 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 12:46:18 +0200 Subject: [PATCH 28/29] Rebuilt for Python 3.14.0rc2 bytecode --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 31e0673..62ece4c 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -7,7 +7,7 @@ Name: etckeeper Version: 1.18.22 -Release: 4%{?dist} +Release: 5%{?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 @@ -247,6 +247,9 @@ fi %changelog +* Fri Aug 15 2025 Python Maint - 1.18.22-5 +- Rebuilt for Python 3.14.0rc2 bytecode + * Wed Jul 23 2025 Fedora Release Engineering - 1.18.22-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From c99b0692f0112c82f5edfdcebab4dc86c49f3897 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 12:15:49 +0200 Subject: [PATCH 29/29] Rebuilt for Python 3.14.0rc3 bytecode --- etckeeper.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etckeeper.spec b/etckeeper.spec index 62ece4c..7893c0c 100644 --- a/etckeeper.spec +++ b/etckeeper.spec @@ -7,7 +7,7 @@ Name: etckeeper Version: 1.18.22 -Release: 5%{?dist} +Release: 6%{?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 @@ -247,6 +247,9 @@ fi %changelog +* Fri Sep 19 2025 Python Maint - 1.18.22-6 +- Rebuilt for Python 3.14.0rc3 bytecode + * Fri Aug 15 2025 Python Maint - 1.18.22-5 - Rebuilt for Python 3.14.0rc2 bytecode