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:38 GMT	[thread overview]
Message-ID: <178639827888.1.6315542799620579050.rpms-rpkg-d35e81155f58@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/rpkg
            Branch : 1.70-1
            Commit : d35e81155f584afe442b3bed369915257a4f485b
            Author : Ondřej Nosek <onosek@redhat.com>
            Date   : 2023-08-20T20:58:32+00:00
            Stats  : +111/-1 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/rpkg/c/d35e81155f584afe442b3bed369915257a4f485b?branch=1.70-1

            Log:
            A few patches:

- Patch: Support for checking exploded sources before push
- Patch: Split git credential data on first = only

Signed-off-by: Ondřej Nosek <onosek@redhat.com>

---
diff --git a/0023-Split-git-credential-data-on-first-only.patch b/0023-Split-git-credential-data-on-first-only.patch
new file mode 100644
index 0000000..43416b7
--- /dev/null
+++ b/0023-Split-git-credential-data-on-first-only.patch
@@ -0,0 +1,33 @@
+From 75d42bad79b54654fca9770a2857e79e82d83c3e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
+Date: Wed, 21 Jun 2023 10:42:45 +0200
+Subject: [PATCH 1/3] Split git credential data on first = only
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The value itself can contain a = character, but we don't really care
+about that. We can treat the value of the key as opaque.
+
+Fixes: https://pagure.io/rpkg/issue/694
+Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
+---
+ pyrpkg/cli.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py
+index 020a247..1bd7979 100644
+--- a/pyrpkg/cli.py
++++ b/pyrpkg/cli.py
+@@ -824,7 +824,7 @@ class cliClient(object):
+         """Parses the git-credential-helper IO format input."""
+         inp = {}
+         for line in sys.stdin:
+-            vals = line.split('=', 2)
++            vals = line.split('=', 1)
+             if len(vals) != 2:
+                 print('Invalid input: %s' % line, file=sys.stderr)
+                 return False
+-- 
+2.41.0
+

diff --git a/0024-Support-for-checking-exploded-sources-before-push.patch b/0024-Support-for-checking-exploded-sources-before-push.patch
new file mode 100644
index 0000000..e8f14de
--- /dev/null
+++ b/0024-Support-for-checking-exploded-sources-before-push.patch
@@ -0,0 +1,71 @@
+From 87d4995b40fbcddac88fb21191eb2d5d1f248550 Mon Sep 17 00:00:00 2001
+From: Ondrej Nosek <onosek@redhat.com>
+Date: Tue, 11 Jul 2023 17:00:48 +0200
+Subject: [PATCH 2/3] Support for checking exploded sources before push
+
+pre-push-check now includes test whether source files listed
+in a specfile come from additional sources.
+This functionality is relevant only for some x-pkg tools, others
+should not be affected.
+
+JIRA: RHELCMP-11777
+
+Signed-off-by: Ondrej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py                    | 12 ++++++++++--
+ tests/commands/test_pre_push_check.py |  4 ++--
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index b45ad8f..bc669b9 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -4468,6 +4468,10 @@ class Commands(object):
+ 
+         return self._repo_name, version, release
+ 
++    # Works as virtual method. Other x-pkg tools can add their specific sources
++    def additional_source_entries(self):
++        return {}
++
+     def pre_push_check(self, ref):
+         show_hint = ('Hint: this check (.git/hooks/pre-push script) can be bypassed by adding '
+                      'the argument \'--no-verify\' argument to the push command.')
+@@ -4561,13 +4565,17 @@ class Commands(object):
+         # list of all files (their relative paths) in the commit
+         repo_entries = set(item.path for item in commit.tree.traverse() if item.type != "tree")
+ 
++        # other x-pkg tools can add their specific sources
++        additional_entries = set(self.additional_source_entries())
++
+         # check whether every source file is either listed in the 'sources' file or tracked in git
+         for source_file in source_files:
+             listed = source_file in sourcesf_entries
+             tracked = source_file in repo_entries
+-            if not (listed or tracked):
++            listed_additional = source_file in additional_entries
++            if not (listed or tracked or listed_additional):
+                 self.log.error('Source file \'{0}\' was neither listed in the \'sources\' file '
+-                               'nor tracked in git. '
++                               'nor tracked in git nor listed in additional sources. '
+                                'Push operation was cancelled'.format(source_file))
+                 self.log.warning(show_hint)
+                 sys.exit(4)
+diff --git a/tests/commands/test_pre_push_check.py b/tests/commands/test_pre_push_check.py
+index ee151c1..79165ec 100644
+--- a/tests/commands/test_pre_push_check.py
++++ b/tests/commands/test_pre_push_check.py
+@@ -90,8 +90,8 @@ Patch3: d.patch
+ 
+         self.assertEqual(exc.exception.code, 4)
+         log_error.assert_called_once_with("Source file 'b.patch' was neither listed in the "
+-                                          "'sources' file nor tracked in git. Push operation "
+-                                          "was cancelled")
++                                          "'sources' file nor tracked in git nor listed "
++                                          "in additional sources. Push operation was cancelled")
+ 
+         # Verify added files are committed but not pushed to origin
+         local_repo = git.Repo(self.cloned_dir)
+-- 
+2.41.0
+

diff --git a/rpkg.spec b/rpkg.spec
index 8d1cb8f..346816d 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
 Name:           rpkg
 Version:        1.66
-Release:        10%{?dist}
+Release:        11%{?dist}
 
 Summary:        Python library for interacting with rpm+git
 License:        GPLv2+ and LGPLv2
@@ -56,6 +56,8 @@ Patch19:        0019-Pre-push-hook-won-t-check-private-branches.patch
 Patch20:        0020-Use-release-s-rpmdefines-in-unused-sources-check.patch
 Patch21:        0021-Do-not-require-sources-file-for-all-namespaces.patch
 Patch22:        0022-commit-command-fails-on-containers-namespace.patch
+Patch23:        0023-Split-git-credential-data-on-first-only.patch
+Patch24:        0024-Support-for-checking-exploded-sources-before-push.patch
 
 %description
 Python library for interacting with rpm+git
@@ -272,6 +274,10 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 
 
 %changelog
+* Sun Aug 20 2023 Ondřej Nosek <onosek@redhat.com> - 1.66-11
+- Patch: Support for checking exploded sources before push
+- Patch: Split git credential data on first = only
+
 * Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.66-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
 

             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=178639827888.1.6315542799620579050.rpms-rpkg-d35e81155f58@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