public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Adam Williamson <awilliam@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpkg] 1.70-1: Backport upstream fix for changelog line duplication
Date: Mon, 10 Aug 2026 21:44:45 GMT	[thread overview]
Message-ID: <178639828586.1.2789026987496099388.rpms-rpkg-32edd5569620@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpkg
Branch : 1.70-1
Commit : 32edd5569620dcc0da26bbec240bfdab3701c07c
Author : Adam Williamson <awilliam@redhat.com>
Date   : 2025-03-03T10:14:52-08:00
Stats  : +58/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpkg/c/32edd5569620dcc0da26bbec240bfdab3701c07c?branch=1.70-1

Log:
Backport upstream fix for changelog line duplication

---
diff --git a/0001-clog-is-duplicating-changelog-lines.patch b/0001-clog-is-duplicating-changelog-lines.patch
new file mode 100644
index 0000000..7df4239
--- /dev/null
+++ b/0001-clog-is-duplicating-changelog-lines.patch
@@ -0,0 +1,50 @@
+From 7b3f92f6f3caa15bda19f557f5eb33405dcd7147 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ond=C5=99ej=20Nosek?= <onosek@redhat.com>
+Date: Tue, 21 Jan 2025 18:09:57 +0100
+Subject: [PATCH] `clog` is duplicating changelog lines
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+`clog` have to read the tag CHANGELOGTEXT (not macro) appropriately
+as an array: --qf '[%{CHANGELOGTEXT}\n]'.
+Whole array is read, so the <SEPARATOR> is used to extract the first
+changelog.
+
+Fixes: https://pagure.io/fedpkg/issue/581
+Resolves: rhbz#2310713
+JIRA: RHELCMP-14285
+
+Signed-off-by: Ondřej Nosek <onosek@redhat.com>
+---
+ pyrpkg/__init__.py | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/pyrpkg/__init__.py b/pyrpkg/__init__.py
+index dfccad3..5b77453 100644
+--- a/pyrpkg/__init__.py
++++ b/pyrpkg/__init__.py
+@@ -2643,7 +2643,10 @@ class Commands(object):
+         # Command contains workaround (undefines _changelog_trimtime) described at:
+         # https://github.com/rpm-software-management/rpm/issues/1301
+         # It caused, that older changelog records were not displayed.
+-        cmd = ["rpm"] + self.rpmdefines + ["-q", "--qf", "%{CHANGELOGTEXT}\n",
++        #
++        # [%{CHANGELOGTEXT}] is an array that contains all changelog records in a specfile
++        # <SEPARATOR> tag is placed between changelogs records to be able to extract the first one
++        cmd = ["rpm"] + self.rpmdefines + ["-q", "--qf", "[%{CHANGELOGTEXT}\n<SEPARATOR>]",
+                                            "--undefine", "_changelog_trimtime",
+                                            "--specfile", "%s" % spec_file]
+         proc = subprocess.Popen(cmd,
+@@ -2660,6 +2663,8 @@ class Commands(object):
+             clog_lines = []
+         buf = six.StringIO(stdout)
+         for line in buf:
++            if line.startswith("<SEPARATOR>"):
++                break
+             if line == '\n' or line.startswith('$'):
+                 continue
+             if line == '(none)\n':
+-- 
+2.48.1
+

diff --git a/rpkg.spec b/rpkg.spec
index 6e10724..8018f00 100644
--- a/rpkg.spec
+++ b/rpkg.spec
@@ -1,6 +1,6 @@
 Name:           rpkg
 Version:        1.67
-Release:        6%{?dist}
+Release:        7%{?dist}
 
 Summary:        Python library for interacting with rpm+git
 # Automatically converted from old format: GPLv2+ and LGPLv2 - review is highly recommended.
@@ -50,6 +50,10 @@ Patch5:         0005-Fixing-encoding-of-the-url-when-checking-lookaside.patch
 Patch6:         0006-Add-draft-builds-support.patch
 Patch7:         0007-Fix-regular-expression-for-parsing-Source-lines.patch
 Patch8:         0008-chain-build-correct-the-info-message.patch
+# https://pagure.io/rpkg/c/7b3f92f6
+# https://pagure.io/fedpkg/issue/581
+# Fixes duplication of changelog lines (which affected fedpkg also)
+Patch9:          0001-clog-is-duplicating-changelog-lines.patch
 
 
 %description
@@ -281,6 +285,9 @@ example_cli_dir=$RPM_BUILD_ROOT%{_datadir}/%{name}/examples/cli
 
 
 %changelog
+* Mon Mar 03 2025 Adam Williamson <awilliam@redhat.com> - 1.67-7
+- Patch: `clog` is duplicating changelog lines
+
 * Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.67-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
 

                 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=178639828586.1.2789026987496099388.rpms-rpkg-32edd5569620@fedoraproject.org \
    --to=awilliam@redhat.com \
    --cc=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