public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rpkg] 1.70-1: A few patches:
Date: Mon, 10 Aug 2026 21:44:48 GMT [thread overview]
Message-ID: <178639828859.1.14693672849357424589.rpms-rpkg-f8a7f14fbe3c@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/rpkg
Branch : 1.70-1
Commit : f8a7f14fbe3c2bd3229a3e023cf78e090f39dde6
Author : Ondřej Nosek <onosek@redhat.com>
Date : 2025-09-03T00:29:53+00:00
Stats : +309/-5 in 7 file(s)
URL : https://src.fedoraproject.org/rpms/rpkg/c/f8a7f14fbe3c2bd3229a3e023cf78e090f39dde6?branch=1.70-1
Log:
A few patches:
- Patch: `pre-push-check`: bogus error - file wasn't listed
- Patch: Fix mockbuild --srpm-mock specfile_path
- Patch: `patch`: Execute subprocess in text mode
- Patch: type: fix typo in requirements README.
- Patch: `install`: add rpmbuild arguments `--with` and `--without`
- Patch: `srpm`: man page generation fixed
Signed-off-by: Ondřej Nosek <onosek@redhat.com>
---
diff --git a/0002-pre-push-check-bogus-error-file-wasn-t-listed.patch b/0002-pre-push-check-bogus-error-file-wasn-t-listed.patch
new file mode 100644
index 0000000..cca0e36
--- /dev/null
+++ b/0002-pre-push-check-bogus-error-file-wasn-t-listed.patch
@@ -0,0 +1,39 @@
+From 3e766e09ab5403f01c92bb57f0bf4b7ed5cb8b10 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Tue, 8 Jul 2025 16:49:57 +0200
+Subject: [PATCH 08/13] `pre-push-check`: bogus error - file wasn't listed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+During the check before a push operation, a file was falsely marked
+as not listed in the specfile and the check failed.
+The marked patch was named "./0001-some-fix.patch" which is rarely
+seen in the specfile. As a fix, file names are normalized and thus
+'./' prefix is removed.
+
+Fixes: #747
+JIRA: RHELCMP-14651
+
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index bf8c3e2..8b2ec89 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -4617,7 +4617,8 @@ class Commands(object):
+ elif res.scheme and res.netloc:
+ source_files.append(os.path.basename(res.path))
+ else:
+- source_files.append(file_location)
++ # file path could rarely be in format './0001-my-fix.patch' - normalize it
++ source_files.append(os.path.normpath(file_location))
+
+ if not len(source_files):
+ self.log.warning('No source files found in the specfile \'{0}\'. '
+--
+2.51.0
+
diff --git a/0003-Fix-mockbuild-srpm-mock-specfile_path.patch b/0003-Fix-mockbuild-srpm-mock-specfile_path.patch
new file mode 100644
index 0000000..db8fb72
--- /dev/null
+++ b/0003-Fix-mockbuild-srpm-mock-specfile_path.patch
@@ -0,0 +1,27 @@
+From 266ce739a075c6cee1a0221fd8faf0fc823daf37 Mon Sep 17 00:00:00 2001
+From: Tony Wang <wngtk@outlook.com>
+Date: Wed, 2 Jul 2025 21:51:01 +0800
+Subject: [PATCH 09/13] Fix mockbuild --srpm-mock specfile_path
+
+Signed-off-by: Tony Wang <wngtk@outlook.com>
+---
+ pyrpkg/__init__.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index 8b2ec89..ad5ee31 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -3207,7 +3207,8 @@ class Commands(object):
+ if shell:
+ cmd.append('--shell')
+ elif srpm_mock:
+- cmd += ['--buildsrpm', '--sources', self.layout.sourcedir, '--spec', self.spec]
++ specfile_path = os.path.join(self.layout.specdir, self.spec)
++ cmd += ['--buildsrpm', '--sources', self.layout.sourcedir, '--spec', specfile_path]
+ else:
+ cmd += ['--rebuild', self.srpmname]
+
+--
+2.51.0
+
diff --git a/0004-patch-Execute-subprocess-in-text-mode.patch b/0004-patch-Execute-subprocess-in-text-mode.patch
new file mode 100644
index 0000000..76696c0
--- /dev/null
+++ b/0004-patch-Execute-subprocess-in-text-mode.patch
@@ -0,0 +1,30 @@
+From f828c71a8aa080d8c95aea21396f5b799f610af4 Mon Sep 17 00:00:00 2001
+From: "FeRD (Frank Dana)" <ferdnyc@gmail.com>
+Date: Thu, 12 Jun 2025 05:49:15 -0400
+Subject: [PATCH 10/13] `patch`: Execute subprocess in text mode
+
+This prevents `fedpkg patch suffix` aborting with the error message
+"Could not execute patch: write() argument must be str, not bytes".
+
+Merges: https://pagure.io/rpkg/pull-request/744
+
+Signed-off-by: FeRD (Frank Dana) <ferdnyc@gmail.com>
+---
+ pyrpkg/__init__.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index ad5ee31..a0fbb6d 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -2178,6 +2178,7 @@ class Commands(object):
+ self.log.debug('Running %s', ' '.join(cmd))
+ (output, errors) = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE,
++ universal_newlines=True,
+ cwd=self.path).communicate()
+ except Exception as e:
+ raise rpkgError('Error running gendiff: %s' % e)
+--
+2.51.0
+
diff --git a/0005-type-fix-typo-in-requirements-README.patch b/0005-type-fix-typo-in-requirements-README.patch
new file mode 100644
index 0000000..a2bb057
--- /dev/null
+++ b/0005-type-fix-typo-in-requirements-README.patch
@@ -0,0 +1,24 @@
+From f487f5cd260ee4029c7545ffb7126997ded75600 Mon Sep 17 00:00:00 2001
+From: "Guillermo N." <gleiro@redhat.com>
+Date: Fri, 18 Jul 2025 20:47:37 +0200
+Subject: [PATCH 11/13] type: fix typo in requirements README.
+
+Signed-off-by: Guillermo N. <gleiro@redhat.com>
+---
+ requirements/README.rst | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/requirements/README.rst b/requirements/README.rst
+index 4e94bca..166c182 100644
+--- a/requirements/README.rst
++++ b/requirements/README.rst
+@@ -3,4 +3,5 @@ Requirements
+
+ * pypi.txt: contains Python packages that can be installed from PyPI via
+ ``pip``. Some of required packages are not available in PyPI as of writing
+- this README file. They has to be installed from package manager too.
++ this README file. They have to be installed from package manager too.
++
+--
+2.51.0
+
diff --git a/0006-install-add-rpmbuild-arguments-with-and-without.patch b/0006-install-add-rpmbuild-arguments-with-and-without.patch
new file mode 100644
index 0000000..d236711
--- /dev/null
+++ b/0006-install-add-rpmbuild-arguments-with-and-without.patch
@@ -0,0 +1,132 @@
+From 04338101aa86d383e993358f349872fd0056168a Mon Sep 17 00:00:00 2001
+From: "Guillermo N." <gleiro@redhat.com>
+Date: Fri, 18 Jul 2025 20:55:19 +0200
+Subject: [PATCH 12/13] `install`: add rpmbuild arguments `--with` and
+ `--without`
+
+This commit introduces two new command-line flags for on-the-fly
+modification of `rpmbuild` arguments directly from the `install` subcommand:
+ - `--with <bcond>`: Appends a build condition (bcond) to `rpmbuild`
+ arguments.
+ - `--without <bcond>`: Removes or disables a build condition (bcond) from
+ `rpmbuild` arguments.
+
+These flags address the feature requested on `fedpkg` downstream repo.
+
+Resolves: https://pagure.io/fedpkg/issue/541
+
+Signed-off-by: Guillermo N. <gleiro@redhat.com>
+---
+ pyrpkg/__init__.py | 8 +++++++-
+ pyrpkg/cli.py | 21 ++++++++++++++++++++-
+ tests/test_cli.py | 2 ++
+ 3 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index a0fbb6d..41a84c2 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -2763,7 +2763,7 @@ class Commands(object):
+ self.kojisession.uploadWrapper(file, path, name=name, callback=callback)
+
+ def install(self, arch=None, short=False, builddir=None, nocheck=False,
+- buildrootdir=None, define=None, extra_args=None):
++ buildrootdir=None, define=None, extra_args=None, installargs=None):
+ """Run ``rpmbuild -bi``
+
+ optionally for a specific arch, short-circuit it,
+@@ -2771,6 +2771,8 @@ class Commands(object):
+
+ Logs the output and returns nothing
+
++ :param list installargs: Modifiers for rpmbuild defaults (similar to
++ 'extra_args' but derived from different command-line parsing).
+ :param str arch: specify a specific arch.
+ :param list define: specify a list of rpmbuild macros.
+ :param bool short: short-circuit it.
+@@ -2787,6 +2789,8 @@ class Commands(object):
+ # setup the rpm command
+ cmd = ['rpmbuild']
+ cmd.extend(self.rpmdefines)
++ if installargs:
++ cmd.extend(installargs)
+ if builddir:
+ # Tack on a new builddir to the end of the defines
+ cmd.extend(["--define", "_builddir %s" % os.path.abspath(builddir)])
+@@ -2905,6 +2909,8 @@ class Commands(object):
+ written into current working directory and in format
+ `.build-{version}-{release}.log`.
+
++ :param list localargs: Modifiers for rpmbuild defaults (similar to
++ 'extra_args' but derived from different command-line parsing).
+ :param str arch: to optionally build for a specific arch.
+ :param list define: optional list of rpmbuild macros.
+ :param str hashtype: an alternative algorithm used for payload file
+diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
+index 8f5ae40..10c6fd4 100644
+--- a/pyrpkg/cli.py
++++ b/pyrpkg/cli.py
+@@ -1030,6 +1030,13 @@ class cliClient(object):
+ '--nocheck',
+ action='store_true',
+ help='nocheck install')
++ # Pass --with/without options to rpmbuild
++ install_parser.add_argument(
++ '--with', help='Enable configure option (bcond) for the build',
++ dest='bcond_with', action='append')
++ install_parser.add_argument(
++ '--without', help='Disable configure option (bcond) for the build',
++ dest='bcond_without', action='append')
+ install_parser.set_defaults(command=self.install, default=False)
+
+ def register_lint(self):
+@@ -2449,13 +2456,25 @@ class cliClient(object):
+
+ def install(self):
+ self.sources()
++
++ installargs = []
++
++ if self.args.bcond_with:
++ for arg in self.args.bcond_with:
++ installargs.extend(['--with', arg])
++
++ if self.args.bcond_without:
++ for arg in self.args.bcond_without:
++ installargs.extend(['--without', arg])
++
+ self.cmd.install(builddir=self.args.builddir,
+ arch=self.args.arch,
+ define=self.args.define,
+ extra_args=self.extra_args,
+ short=self.args.short_circuit,
+ nocheck=self.args.nocheck,
+- buildrootdir=self.args.buildrootdir,)
++ buildrootdir=self.args.buildrootdir,
++ installargs=installargs)
+
+ def lint(self):
+ self.cmd.lint(self.args.info, self.args.rpmlintconf)
+diff --git a/tests/test_cli.py b/tests/test_cli.py
+index ae532b0..f734c43 100644
+--- a/tests/test_cli.py
++++ b/tests/test_cli.py
+@@ -865,6 +865,7 @@ class TestInstall(CliTestCase):
+ cli_cmd = [
+ 'rpkg', '--path', self.cloned_repo_path, '--release', 'rhel-6',
+ '-q', 'install', '--nocheck', '--arch', 'i686',
++ '--with', 'a', '--without', 'b',
+ '--builddir', builddir, '--buildrootdir', buildrootdir
+ ]
+
+@@ -874,6 +875,7 @@ class TestInstall(CliTestCase):
+
+ spec = os.path.join(cli.cmd.path, cli.cmd.spec)
+ rpmbuild = ['rpmbuild'] + cli.cmd.rpmdefines + [
++ '--with', 'a', '--without', 'b',
+ '--define', '_builddir %s' % builddir, '--target', 'i686',
+ '--nocheck', '--quiet',
+ '--define', '_buildrootdir %s' % buildrootdir,
+--
+2.51.0
+
diff --git a/0007-srpm-man-page-generation-fixed.patch b/0007-srpm-man-page-generation-fixed.patch
new file mode 100644
index 0000000..d35197a
--- /dev/null
+++ b/0007-srpm-man-page-generation-fixed.patch
@@ -0,0 +1,37 @@
+From e8d209e9d66b13ad6eef5e84f7620781b0bbb6d8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Fri, 29 Aug 2025 01:07:49 +0200
+Subject: [PATCH 13/13] `srpm`: man page generation fixed
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Usage wasn't generated properly for this command. The usage was
+overridden with fixed text instead of automatic generation.
+
+Relates: #751
+
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyrpkg/cli.py | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
+index 10c6fd4..9fbb166 100644
+--- a/pyrpkg/cli.py
++++ b/pyrpkg/cli.py
+@@ -1548,9 +1548,10 @@ class cliClient(object):
+ srpm_parser = self.subparsers.add_parser(
+ 'srpm', help='Create a source rpm',
+ parents=[self.rpm_parser_common],
+- usage='Create a source rpm',
+ formatter_class=argparse.RawDescriptionHelpFormatter,
+ description=textwrap.dedent("""
++ Create a source rpm
++
+ This command wraps "rpmbuild -bs", roughly equivalent to:
+
+ rpmbuild -bs mypackage.spec \\
+--
+2.51.0
+
diff --git a/rpkg.spec b/rpkg.spec
index 44d19cc..70e68de 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
Name: rpkg
Version: 1.68
-Release: 5%{?dist}
+Release: 6%{?dist}
Summary: Python library for interacting with rpm+git
# Automatically converted from old format: GPLv2+ and LGPLv2 - review is highly recommended.
@@ -25,10 +25,12 @@ Source0: https://pagure.io/releases/rpkg/%{name}-%{version}.tar.gz
# No support for setup.py since Python 3.12 (RHEL 10)
# hatchling is supported in >Python 3.6 releases (RHEL 8)
-%if 0%{?rhel} >= 9 || 0%{?fedora} >= 41
-%global with_hatchling 1
-%else
+%if 0%{?rhel} && 0%{?rhel} <= 8
%global with_hatchling 0
+%{echo:--> with_hatchling unset, 0%{?rhel} %{?fedora}}
+%else
+%global with_hatchling 1
+%{echo:--> with_hatchling set, 0%{?rhel} %{?fedora}}
%endif
@@ -46,7 +48,12 @@ Patch0: remove-koji-and-rpm-py-installer-from-requires.patch
%if 0%{?with_python2}
Patch1: 0001-Remove-Environment-Markers-syntax.patch
%endif
-
+Patch2: 0002-pre-push-check-bogus-error-file-wasn-t-listed.patch
+Patch3: 0003-Fix-mockbuild-srpm-mock-specfile_path.patch
+Patch4: 0004-patch-Execute-subprocess-in-text-mode.patch
+Patch5: 0005-type-fix-typo-in-requirements-README.patch
+Patch6: 0006-install-add-rpmbuild-arguments-with-and-without.patch
+Patch7: 0007-srpm-man-page-generation-fixed.patch
%description
Python library for interacting with rpm+git
@@ -277,6 +284,14 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
%changelog
+* Tue Sep 02 2025 Ondřej Nosek <onosek@redhat.com> - 1.68-6
+- Patch: `pre-push-check`: bogus error - file wasn't listed
+- Patch: Fix mockbuild --srpm-mock specfile_path
+- Patch: `patch`: Execute subprocess in text mode
+- Patch: type: fix typo in requirements README.
+- Patch: `install`: add rpmbuild arguments `--with` and `--without`
+- Patch: `srpm`: man page generation fixed
+
* Fri Aug 15 2025 Python Maint <python-maint@redhat.com> - 1.68-5
- Rebuilt for Python 3.14.0rc2 bytecode
next reply other threads:[~2026-08-10 21:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-10 21:44 [this message]
-- strict thread matches above, loose matches on Subject: below --
2026-08-10 21:44 [rpms/rpkg] 1.70-1: A few patches:
2026-08-10 21:44
2026-08-10 21:44
2026-08-10 21:44
2026-08-10 21:44
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178639828859.1.14693672849357424589.rpms-rpkg-f8a7f14fbe3c@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox