Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rpmconf for openSUSE:Factory checked in at 2023-06-13 16:09:08 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmconf (Old) and /work/SRC/openSUSE:Factory/.rpmconf.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmconf" Tue Jun 13 16:09:08 2023 rev:15 rq:1092596 version:1.1.9 Changes: -------- --- /work/SRC/openSUSE:Factory/rpmconf/rpmconf.changes 2022-12-06 14:24:14.602070831 +0100 +++ /work/SRC/openSUSE:Factory/.rpmconf.new.15902/rpmconf.changes 2023-06-13 16:09:18.866816182 +0200 @@ -1,0 +2,7 @@ +Thu Jun 8 11:32:58 UTC 2023 - Martin Pluskal <mplus...@suse.com> + +- Update to version 1.1.9: + * Add BuildRequire on setuptools to fix distutils error on + Python 3.12 + +------------------------------------------------------------------- Old: ---- rpmconf-1.1.8.tar.gz New: ---- rpmconf-1.1.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmconf.spec ++++++ --- /var/tmp/diff_new_pack.gr5Vb8/_old 2023-06-13 16:09:19.418819438 +0200 +++ /var/tmp/diff_new_pack.gr5Vb8/_new 2023-06-13 16:09:19.422819461 +0200 @@ -1,7 +1,7 @@ # # spec file for package rpmconf # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,26 +17,27 @@ Name: rpmconf -Version: 1.1.8 +Version: 1.1.9 Release: 0 Summary: Tool to handle rpmnew and rpmsave files License: GPL-3.0-or-later -Group: System/Base URL: https://github.com/xsuchy/rpmconf Source: https://github.com/xsuchy/%{name}/archive/%{name}-%{version}-1.tar.gz#/%{name}-%{version}.tar.gz BuildRequires: docbook-utils-minimal BuildRequires: docbook_3 +BuildRequires: fdupes BuildRequires: make +BuildRequires: python-rpm-macros BuildRequires: python3-Sphinx BuildRequires: python3-devel BuildRequires: python3-rpm Requires: python3-%{name} Requires: python3-rpm Suggests: diffuse +Suggests: diffutils Suggests: kdiff3 Suggests: meld Suggests: vim -Suggests: diffutils BuildArch: noarch %description @@ -52,19 +53,19 @@ Python interface for rpmconf and an essential part of rpmconf. %prep -%setup -q -n %{name}-%{name}-%{version}-1 +%autosetup -n %{name}-%{name}-%{version}-1 sed -i 's/__version__ = .*/__version__ = "%{version}"/' rpmconf/rpmconf.py sed -i 's/version = .*,/version = "%{version}",/' setup.py %build -python3 setup.py build +%python3_build docbook2man %{name}.sgml %make_build -C docs man \ SPHINXBUILD=sphinx-build-%{py3_ver} %install -python3 setup.py install \ +%python3_install \ --skip-build \ --root %{buildroot} \ --install-scripts %{_sbindir} @@ -75,6 +76,8 @@ mkdir -p %{buildroot}%{_datadir}/%{name}/ find docs/build/ -type f -name ".buildinfo" -delete -print +%fdupes -s %{buildroot}%{python3_sitelib} + %files %license LICENSE %doc README.md TODO ++++++ rpmconf-1.1.8.tar.gz -> rpmconf-1.1.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmconf-rpmconf-1.1.8-1/.tito/packages/rpmconf new/rpmconf-rpmconf-1.1.9-1/.tito/packages/rpmconf --- old/rpmconf-rpmconf-1.1.8-1/.tito/packages/rpmconf 2022-11-30 16:57:14.000000000 +0100 +++ new/rpmconf-rpmconf-1.1.9-1/.tito/packages/rpmconf 2023-05-04 11:49:24.000000000 +0200 @@ -1 +1 @@ -1.1.8-1 ./ +1.1.9-1 ./ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmconf-rpmconf-1.1.8-1/.tito/releasers.conf new/rpmconf-rpmconf-1.1.9-1/.tito/releasers.conf --- old/rpmconf-rpmconf-1.1.8-1/.tito/releasers.conf 2022-11-30 16:57:14.000000000 +0100 +++ new/rpmconf-rpmconf-1.1.9-1/.tito/releasers.conf 2023-05-04 11:49:24.000000000 +0200 @@ -1,10 +1,10 @@ [release] releaser = tito.release.FedoraGitReleaser -branches = main epel8 epel7 +branches = main [all] releaser = tito.release.FedoraGitReleaser -branches = main f37 f36 f35 epel8 epel7 +branches = main f38 f37 epel8 epel7 [fedora-main] releaser = tito.release.FedoraGitReleaser diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmconf-rpmconf-1.1.8-1/rpmconf/rpmconf.py new/rpmconf-rpmconf-1.1.9-1/rpmconf/rpmconf.py --- old/rpmconf-rpmconf-1.1.8-1/rpmconf/rpmconf.py 2022-11-30 16:57:14.000000000 +0100 +++ new/rpmconf-rpmconf-1.1.9-1/rpmconf/rpmconf.py 2023-05-04 11:49:24.000000000 +0200 @@ -42,8 +42,11 @@ import termios __version__ = "1.0.60" -#uncomment when rpm 4.13 is available -#rpm.setInterruptSafety(False) + +if rpm.__version__ > "4.13.0": + rpm.setInterruptSafety(False) + + class RpmConf(object): """ @@ -171,6 +174,7 @@ """ err_msg_template = "Warning: file {} is broken symlink. I'm using /dev/null instead.\n" + missing_file_template = "Warning: file {} is missing. I'm using /dev/null instead.\n" err_msg = "" if os.path.islink(file1): err_msg += "Info: '{0}' is symlink to '{1}'.\n".format(file1, os.readlink(file1)) @@ -181,7 +185,12 @@ err_msg += err_msg_template.format(file1) file1 = "/dev/null" else: - fromdate = time.ctime(os.stat(file1).st_mtime) + if not os.path.exists(file1): + fromdate = "" + err_msg += missing_file_template.format(file1) + file1 = "/dev/null" + else: + fromdate = time.ctime(os.stat(file1).st_mtime) if os.path.islink(file2): err_msg += "Info: '{0}' is symlink to '{1}'.\n".format(file2, os.readlink(file2)) if self.is_broken_symlink(file2): @@ -191,14 +200,15 @@ err_msg += err_msg_template.format(file2) file2 = "/dev/null" else: - todate = time.ctime(os.stat(file2).st_mtime) + if not os.path.exists(file2): + todate = "" + err_msg += missing_file_template.format(file2) + file2 = "/dev/null" + else: + todate = time.ctime(os.stat(file2).st_mtime) try: fromlines = open(file1).readlines() - if fromlines == []: - fromlines = [""] tolines = open(file2).readlines() - if tolines == []: - tolines = [""] diff = difflib.unified_diff(fromlines, tolines, file1, file2, fromdate, todate) @@ -265,6 +275,9 @@ def _ls_conf_file(self, conf_file, other_file): print("Configuration file '{}'".format(conf_file)) + if not os.path.exists(conf_file): + print("File is missing. Using /dev/null instead.") + conf_file = "/dev/null" if self.selinux: print(subprocess.check_output(['/usr/bin/ls', '-ltrd', '--context', conf_file, other_file], @@ -278,9 +291,7 @@ # vimdiff, gvimdiff, meld return 0 even if file was not saved # we may handle it some way. check last modification? ask user? try: - if self.frontend == "vimdiff" or \ - self.frontend == "gvimdiff" or \ - self.frontend == "meld": + if self.frontend in ["vimdiff", "gvimdiff", "meld"]: subprocess.check_call( ["/usr/bin/{}".format(self.frontend), conf_file, other_file]) @@ -332,6 +343,8 @@ result = 0 for conf_file in self.get_list_of_config(package): if self.diff: + if not os.path.exists(conf_file): + conf_file = "/dev/null" conf_rpmnew = "{0}.rpmnew".format(conf_file) conf_rpmsave = "{0}.rpmsave".format(conf_file) conf_rpmorig = "{0}.rpmorig".format(conf_file) @@ -365,7 +378,7 @@ def _handle_rpmnew(self, conf_file, other_file): if not (self.is_broken_symlink(conf_file) or self.is_broken_symlink(other_file)) \ - and filecmp.cmp(conf_file, other_file): + and os.path.exists(conf_file) and filecmp.cmp(conf_file, other_file): self._remove(other_file) return @@ -422,7 +435,7 @@ def _handle_rpmsave(self, conf_file, other_file): if not (self.is_broken_symlink(conf_file) or self.is_broken_symlink(other_file)) \ - and filecmp.cmp(conf_file, other_file): + and os.path.exists(conf_file) and filecmp.cmp(conf_file, other_file): self._remove(other_file) return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmconf-rpmconf-1.1.8-1/rpmconf.spec new/rpmconf-rpmconf-1.1.9-1/rpmconf.spec --- old/rpmconf-rpmconf-1.1.8-1/rpmconf.spec 2022-11-30 16:57:14.000000000 +0100 +++ new/rpmconf-rpmconf-1.1.9-1/rpmconf.spec 2023-05-04 11:49:24.000000000 +0200 @@ -6,7 +6,7 @@ Name: rpmconf Summary: Tool to handle rpmnew and rpmsave files License: GPL-3.0-only -Version: 1.1.8 +Version: 1.1.9 Release: 1%{?dist} URL: https://github.com/xsuchy/rpmconf # source is created by: @@ -17,6 +17,9 @@ BuildRequires: make BuildRequires: docbook-utils BuildRequires: docbook-dtd31-sgml +%if 0%{?rhel} > 9 || 0%{?fedora} > 38 +BuildRequires: python%{python3_pkgversion}-setuptools +%endif BuildRequires: python%{python3_pkgversion}-sphinx BuildRequires: python%{python3_pkgversion}-devel Requires: %{name}-base @@ -119,6 +122,10 @@ %dir %{_datadir}/rpmconf %changelog +* Thu May 04 2023 Miroslav Suchý <msu...@redhat.com> 1.1.9-1 +- Add BuildRequire on setuptools to fix distutils error on Python 3.12 +- when package config does not exists use /dev/null instead + * Wed Nov 30 2022 Miroslav Suchý <msu...@redhat.com> 1.1.8-1 - use spdx license - 2135035 - change wording to avoid confusion diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmconf-rpmconf-1.1.8-1/setup.py new/rpmconf-rpmconf-1.1.9-1/setup.py --- old/rpmconf-rpmconf-1.1.8-1/setup.py 2022-11-30 16:57:14.000000000 +0100 +++ new/rpmconf-rpmconf-1.1.9-1/setup.py 2023-05-04 11:49:24.000000000 +0200 @@ -4,7 +4,7 @@ setup(name = "rpmconf", packages = ["rpmconf"], - version = "1.1.8", + version = "1.1.9", description = "Handle rpmnew and rpmsave files", author = "Igor Gnatenko", author_email = "i.gnatenko.br...@gmail.com",