public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/rpkg] 1.70-1: Merge remote-tracking branch 'upstream/rawhide' into f42
Date: Mon, 10 Aug 2026 21:44:51 GMT	[thread overview]
Message-ID: <178639829179.1.17963835190780107690.rpms-rpkg-3eb95a18a49c@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpkg
Branch : 1.70-1
Commit : 3eb95a18a49c0e436b37d3f8794bef72d06f3713
Author : Ondřej Nosek <onosek@redhat.com>
Date   : 2025-11-25T01:51:26+00:00
Stats  : +247/-395 in 12 file(s)
URL    : https://src.fedoraproject.org/rpms/rpkg/c/3eb95a18a49c0e436b37d3f8794bef72d06f3713?branch=1.70-1

Log:
Merge remote-tracking branch 'upstream/rawhide' into f42

---
diff --git a/.gitignore b/.gitignore
index 0e7689d..4e5316b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,3 +64,4 @@
 /rpkg-1.66.tar.gz
 /rpkg-1.67.tar.gz
 /rpkg-1.68.tar.gz
+/rpkg-1.69.tar.gz

diff --git a/0002-Execute-shell-command-Non-interactive-stdin.patch b/0002-Execute-shell-command-Non-interactive-stdin.patch
new file mode 100644
index 0000000..82e9517
--- /dev/null
+++ b/0002-Execute-shell-command-Non-interactive-stdin.patch
@@ -0,0 +1,138 @@
+From 0123ce42d214968defe74b8a05ba7d9c7ecfa6c1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Mon, 6 Oct 2025 00:23:26 +0200
+Subject: [PATCH] Execute shell command: Non-interactive stdin
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+During the `push` command on non-interactive environment, rhpkg hangs.
+
+JIRA: RHELBLD-17387
+
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py     |  9 ++++++++-
+ tests/test_commands.py | 23 +++++++++++++++--------
+ 2 files changed, 23 insertions(+), 9 deletions(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index 57b273d..4d453ca 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -1302,6 +1302,7 @@ class Commands(object):
+                 # stderr, so....
+                 parent_proc = subprocess.Popen(
+                     command, env=environ, shell=shell, cwd=cwd,  # nosec
++                    stdin=subprocess.DEVNULL,
+                     stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ 
+                 proc = subprocess.Popen(
+@@ -1309,9 +1310,11 @@ class Commands(object):
+                     stdin=parent_proc.stdout,
+                     stdout=proc_stdout, stderr=proc_stderr,
+                     universal_newlines=return_text)
++                parent_proc.stdout.close()
+             else:
+                 proc = subprocess.Popen(
+                     command, env=environ, shell=shell, cwd=cwd,  # nosec
++                    stdin=subprocess.DEVNULL,
+                     stdout=proc_stdout, stderr=proc_stderr,
+                     universal_newlines=return_text)
+         except KeyboardInterrupt:
+@@ -1319,7 +1322,11 @@ class Commands(object):
+         except Exception as e:
+             raise rpkgError(e)
+ 
+-        exit_code = proc.wait()
++        try:
++            exit_code = proc.wait(timeout=3600)
++        except subprocess.TimeoutExpired:
++            proc.kill()
++            raise rpkgError('Command timed out.')
+         if exit_code > 0 and not return_stderr:
+             raise rpkgError('Failed to execute command.')
+ 
+diff --git a/tests/test_commands.py b/tests/test_commands.py
+index 732d79f..b0b18a3 100644
+--- a/tests/test_commands.py
++++ b/tests/test_commands.py
+@@ -1118,7 +1118,8 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, None, None), result)
+         Popen.assert_called_once_with(
+             'rpmbuild', env=os.environ, shell=True, cwd=None,  # nosec
+-            stdout=None, stderr=None, universal_newlines=False)
++            stdin=subprocess.DEVNULL, stdout=None, stderr=None,
++            universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_run_command_without_shell(self, Popen):
+@@ -1129,7 +1130,8 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, None, None), result)
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdout=None, stderr=None, universal_newlines=False)
++            stdin=subprocess.DEVNULL, stdout=None, stderr=None,
++            universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_return_stdout(self, Popen):
+@@ -1142,7 +1144,8 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, 'output', None), result)
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdout=subprocess.PIPE, stderr=None, universal_newlines=False)
++            stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=None,
++            universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_return_stderr(self, Popen):
+@@ -1155,7 +1158,8 @@ class TestRunCommand(CommandTestCase):
+         self.assertEqual((0, None, 'output'), result)
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdout=None, stderr=subprocess.PIPE, universal_newlines=False)
++            stdin=subprocess.DEVNULL, stdout=None, stderr=subprocess.PIPE,
++            universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+     def test_pipe(self, Popen):
+@@ -1174,7 +1178,7 @@ class TestRunCommand(CommandTestCase):
+         Popen.assert_has_calls([
+             call(['rpmbuild'],
+                  env=os.environ, shell=False, cwd=None,
+-                 stdout=subprocess.PIPE, stderr=subprocess.STDOUT),
++                 stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT),
+             call(['grep', 'src.rpm'],
+                  env=os.environ, shell=False, cwd=None,
+                  stdin=first_proc.stdout, stdout=None, stderr=None,
+@@ -1215,7 +1219,8 @@ class TestRunCommand(CommandTestCase):
+             self.assertEqual((0, None, None), result)
+             Popen.assert_called_once_with(
+                 ['rpmbuild'], env={'myvar': 'test'},
+-                shell=False, cwd=None, stdout=None, stderr=None,
++                shell=False, cwd=None,
++                stdin=subprocess.DEVNULL, stdout=None, stderr=None,
+                 universal_newlines=False)
+ 
+     @patch('subprocess.Popen')
+@@ -1227,7 +1232,8 @@ class TestRunCommand(CommandTestCase):
+ 
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=tempdir,
+-            stdout=None, stderr=None, universal_newlines=False)
++            stdin=subprocess.DEVNULL, stdout=None, stderr=None,
++            universal_newlines=False)
+ 
+         shutil.rmtree(tempdir)
+ 
+@@ -1240,4 +1246,5 @@ class TestRunCommand(CommandTestCase):
+ 
+         Popen.assert_called_once_with(
+             ['rpmbuild'], env=os.environ, shell=False, cwd=None,
+-            stdout=subprocess.PIPE, stderr=None, universal_newlines=True)
++            stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=None,
++            universal_newlines=True)
+-- 
+2.51.1
+

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
deleted file mode 100644
index cca0e36..0000000
--- a/0002-pre-push-check-bogus-error-file-wasn-t-listed.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-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
deleted file mode 100644
index db8fb72..0000000
--- a/0003-Fix-mockbuild-srpm-mock-specfile_path.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-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
deleted file mode 100644
index 76696c0..0000000
--- a/0004-patch-Execute-subprocess-in-text-mode.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-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
deleted file mode 100644
index a2bb057..0000000
--- a/0005-type-fix-typo-in-requirements-README.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-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
deleted file mode 100644
index d236711..0000000
--- a/0006-install-add-rpmbuild-arguments-with-and-without.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-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
deleted file mode 100644
index d35197a..0000000
--- a/0007-srpm-man-page-generation-fixed.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-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/0008-Add-mock-configuration-option-to-build-and-srpm.patch b/0008-Add-mock-configuration-option-to-build-and-srpm.patch
deleted file mode 100644
index 30a7fc5..0000000
--- a/0008-Add-mock-configuration-option-to-build-and-srpm.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 041be8edebc59eb5606f80987d8e74fe1bf2099f Mon Sep 17 00:00:00 2001
-From: Anton Bobrov <abobrov@redhat.com>
-Date: Wed, 13 Aug 2025 10:04:33 +0200
-Subject: [PATCH] Add mock configuration option to build and srpm commands for
- use along with the srpm mock option, same as in mockbuild command.
-
-Add arguments separator for mock rpm shell in
-load_nameverrel_mock to ensure the rpm args go to
-rpm and not mock.
-
-Signed-off-by: Anton Bobrov <abobrov@redhat.com>
----
- pyrpkg/__init__.py |  2 +-
- pyrpkg/cli.py      | 17 +++++++++++++----
- 2 files changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
-index 41a84c2..a4e8b23 100644
---- a/pyrpkg/__init__.py
-+++ b/pyrpkg/__init__.py
-@@ -842,7 +842,7 @@ class Commands(object):
-                         "--specfile", "%s" % os.path.join(tmp_root, self.spec)])
-         # escape whole 'rpm' command because it will be executed under mock command
-         rpm_cmd = [shlex.quote(item) for item in rpm_cmd]
--        main_cmd = cmd + ['--shell'] + rpm_cmd \
-+        main_cmd = cmd + ['--shell'] + ['--'] + rpm_cmd \
-             + ['> ' + os.path.join(tmp_root, 'output')]
- 
-         copyout_cmd = cmd + ['--copyout', os.path.join(tmp_root, 'output'), tmp_resultdir]
-diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
-index 9fbb166..decef3f 100644
---- a/pyrpkg/cli.py
-+++ b/pyrpkg/cli.py
-@@ -569,6 +569,9 @@ class cliClient(object):
-             '--srpm-mock', action='store_true',
-             help='Build from an srpm. Source rpm will be generated in \'mock\''
-                  ' instead of \'rpmbuild\'.')
-+        build_parser.add_argument(
-+            '--root', '--mock-config', '-r', metavar='CONFIG',
-+            dest='root', help='Override mock configuration (like mock -r)')
-         build_parser.set_defaults(command=self.build)
- 
-     def register_chainbuild(self):
-@@ -1522,6 +1525,9 @@ class cliClient(object):
-             '--srpm-mock', action='store_true',
-             help='Build from an srpm. Source rpm will be generated in \'mock\''
-                  ' instead of \'rpmbuild\'.')
-+        scratch_build_parser.add_argument(
-+            '--root', '--mock-config', '-r', metavar='CONFIG',
-+            dest='root', help='Override mock configuration (like mock -r)')
-         scratch_build_parser.set_defaults(command=self.scratch_build)
- 
-     def register_sources(self):
-@@ -1585,6 +1591,9 @@ class cliClient(object):
-         srpm_parser.add_argument(
-             '--offline', dest='koji_offline', help='Don\'t connect to the Koji '
-             'and try to work offline', action='store_true')
-+        srpm_parser.add_argument(
-+            '--root', '--mock-config', '-r', metavar='CONFIG',
-+            dest='root', help='Override mock configuration (like mock -r)')
-         srpm_parser.set_defaults(command=self.srpm)
- 
-     def register_copr_build(self):
-@@ -1967,12 +1976,12 @@ class cliClient(object):
-         if hasattr(self.args, 'srpm_mock') and self.args.srpm_mock:
-             # Set the release and version of a package with mock. Mockbuild needs them.
-             self.cmd.load_nameverrel_mock(mockargs=tuple(),
--                                          root=None,
-+                                          root=self.args.root,
-                                           force_local_mock_config=None)
-             # generate srpm with mock instead of rpmbuild
-             self.log.debug('Generating an srpm with mock')
-             self.cmd.mockbuild(mockargs=tuple(),
--                               root=None,
-+                               root=self.args.root,
-                                hashtype=self.args.hash,
-                                shell=None,
-                                force_local_mock_config=None,
-@@ -3011,11 +3020,11 @@ class cliClient(object):
- 
-             # Set the release and version of a package with mock. Mockbuild needs them.
-             self.cmd.load_nameverrel_mock(mockargs=tuple(),
--                                          root=None,
-+                                          root=self.args.root,
-                                           force_local_mock_config=None)
-             # generate srpm with mock instead of rpmbuild
-             self.cmd.mockbuild(mockargs=tuple(),
--                               root=None,
-+                               root=self.args.root,
-                                hashtype=self.args.hash,
-                                shell=None,
-                                force_local_mock_config=None,
--- 
-2.51.0
-

diff --git a/rpkg.spec b/rpkg.spec
index 8f75de7..cddce34 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
 Name:           rpkg
-Version:        1.68
-Release:        9%{?dist}
+Version:        1.69
+Release:        1%{?dist}
 
 Summary:        Python library for interacting with rpm+git
 # Automatically converted from old format: GPLv2+ and LGPLv2 - review is highly recommended.
@@ -46,14 +46,7 @@ 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
-Patch8:         0008-Add-mock-configuration-option-to-build-and-srpm.patch
-Patch9:         https://pagure.io/rpkg/pull-request/757.patch
+Patch2:         0002-Execute-shell-command-Non-interactive-stdin.patch
 
 %description
 Python library for interacting with rpm+git
@@ -284,6 +277,28 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 
 
 %changelog
+* Tue Nov 25 2025 Ondřej Nosek <onosek@redhat.com> - 1.69-1
+- Only update the progress bar when meaningfully changed (code)
+- Don’t set up upload progress when stdout isn’t a tty (code)
+- Fix unittests for Python 3.14 (onosek)
+- `sources`: set "Accept-Encoding: identity" header on HTTP requests
+  (decathorpe)
+- Accept auto-generated sources in pre-push checks (fweimer)
+- Add mock configuration option to build and srpm commands for use along with
+  the srpm mock option, same as in mockbuild command. (abobrov)
+- `srpm`: man page generation fixed (onosek)
+- `install`: add rpmbuild arguments `--with` and `--without` - 541 (gleiro)
+- type: fix typo in requirements README. (gleiro)
+- `patch`: Execute subprocess in text mode (ferdnyc)
+- Fix mockbuild --srpm-mock specfile_path (wngtk)
+- `pre-push-check`: bogus error - file wasn't listed - #747 (onosek)
+- Switch to %pyproject_* macros (onosek)
+- Use the spec name to assemble src.rpm name (sergio)
+- Jenkinsfile: use local declaration instead the global (onosek)
+- `srpm`: --offline arg to prevent connecting to Koji - 600 (onosek)
+- `mockbuild`: -r argument as shortcut of --root (sergio)
+- `rhpkg mockbuild` won't show a hint with '--target' (onosek)
+
 * Fri Oct 17 2025 Lubomír Sedlář <lsedlar@redhat.com> - 1.68-9
 - Accept auto-generated sources in pre-push checks
 

diff --git a/sources b/sources
index e3989e2..8dfdb92 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (rpkg-1.68.tar.gz) = cf5d6bb7cdcb95de6a3f858c489e0c059b47a7b5974acb5047dad78d7448a848d5ac0645b73cf9c0ae10b69d7fd663965af4357de2479451810f19583bd5eafd
+SHA512 (rpkg-1.69.tar.gz) = ccd9f5fd213aca2fa289aef7c96662dbc5b05506f5e82ff18f13aa7a4989a38508575d9c7141f6d6fe35613bb78bd465109c9162e478ec7f842b437ae1f1c3bc

diff --git a/757.patch b/757.patch
new file mode 100644
index 0000000..1e64c66
--- /dev/null
+++ b/757.patch
@@ -0,0 +1,82 @@
+From 0a2a54318ef5f57142a8fab05370e6824b0645da Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Oct 13 2025 09:59:52 +0000
+Subject: Accept auto-generated sources in pre-push checks
+
+
+The patch-git tool creates source files during spec file parsing.
+
+<https://gitlab.com/redhat/centos-stream/rpms/glibc/-/blob/c10s/patch-git.lua>
+
+With this change, the pre-push check recognizes the "auto-generated-/"
+source file prefix, so that patch-git can use it to bypass the check.
+(The rpmbuild tool ignores directory names.)
+
+Signed-off-by: Florian Weimer <fweimer@redhat.com>
+
+---
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index a4e8b23..ee74fdc 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -4617,6 +4617,13 @@ class Commands(object):
+             match = SpecFile.sourcefile_expression.match(line)
+             if match:
+                 file_location = match.group('val')
++                if file_location.startswith('auto-generated/'):
++                    # This source file is auto-generated during SRPM
++                    # construction.  It is not expected to be listed
++                    # in source/checked into Git.  Skip it for the
++                    # pre-push check.
++                    continue
++
+                 # find out the format of the source file path. From URL use just the file name.
+                 # We want to keep hierarchy of the files if possible
+                 res = urllib.parse.urlparse(file_location)
+diff --git a/tests/commands/test_pre_push_check.py b/tests/commands/test_pre_push_check.py
+index 0e9aaf7..df7d2b4 100644
+--- a/tests/commands/test_pre_push_check.py
++++ b/tests/commands/test_pre_push_check.py
+@@ -105,3 +105,40 @@ Patch3: d.patch
+         with open('sources', 'r') as f:
+             expected_sources_content = f.read().strip()
+         self.assertEqual(expected_sources_content, sources_content)
++
++    def test_push_is_not_blocked_with_autogenerated_sources(self):
++        """
++        Check that auto-generated/ source lines in the spec file
++        do not result in push failures.
++        """
++        # Track SPEC and a.patch in Git.
++        spec_file = self.module + ".spec"
++        with open(spec_file, 'w') as f:
++            f.write(SPECFILE_TEMPLATE % '''Patch0: a.patch
++Patch2: c.patch
++Source1: auto-generated/patch-git-generated-commit.txt
++''')
++
++        for patch_file in ('a.patch', 'c.patch',
++                           'patch-git-generated-commit.txt'):
++            with open(patch_file, 'w') as f:
++                f.write(patch_file)
++
++        # Track c.patch in sources
++        sources_file = SourcesFile(self.cmd.sources_filename,
++                                   self.cmd.source_entry_type)
++        file_hash = self.cmd.lookasidecache.hash_file('c.patch')
++        sources_file.add_entry(self.cmd.lookasidehash, 'c.patch', file_hash)
++        sources_file.write()
++
++        self.cmd.repo.index.add([spec_file, 'a.patch', 'sources'])
++        self.cmd.repo.index.commit('add SPEC and patches')
++
++        # The test attempts to connect to the lookaside cache.
++
++        def patch_remote_file_exists_head(name, filename, hash, hashtype):
++            return filename == 'c.patch'
++
++        with patch.object(self.cmd.lookasidecache, 'remote_file_exists_head',
++                          patch_remote_file_exists_head):
++            self.cmd.pre_push_check("HEAD")
+

                 reply	other threads:[~2026-08-10 21:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=178639829179.1.17963835190780107690.rpms-rpkg-3eb95a18a49c@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