public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: Fix rubygem unpack regression, causing rubygem builds to fail
Date: Mon, 23 Nov 2026 09:34:18 GMT	[thread overview]
Message-ID: <179542645890.1.2845890047078225464.rpms-rpm-de6dc77d5065@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : de6dc77d50659241e74edac9d22800cb26bdeeb8
Author : Panu Matilainen <pmatilai@redhat.com>
Date   : 2022-04-28T10:32:07+03:00
Stats  : +44/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/de6dc77d50659241e74edac9d22800cb26bdeeb8?branch=pmatilai-v6

Log:
Fix rubygem unpack regression, causing rubygem builds to fail

---
diff --git a/0001-Fix-regression-in-rubygem-unpacking-2040.patch b/0001-Fix-regression-in-rubygem-unpacking-2040.patch
new file mode 100644
index 0000000..7daa937
--- /dev/null
+++ b/0001-Fix-regression-in-rubygem-unpacking-2040.patch
@@ -0,0 +1,39 @@
+From cbcd9dd38dd1d0379e5d25ed3c1b1e96353e4014 Mon Sep 17 00:00:00 2001
+Message-Id: <cbcd9dd38dd1d0379e5d25ed3c1b1e96353e4014.1651130985.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Thu, 28 Apr 2022 10:17:16 +0300
+Subject: [PATCH] Fix regression in rubygem unpacking (#2040)
+
+Externalizing the source unpack in commit
+cd5d667e99f931504a512b591fcde7ed92cee344 required changing the way
+rubygems are unpacked, and now the .gemspec file gets unpacked into
+different place. Oops. Reported and initial patch by Vit Ondruch.
+
+Fixes: #2040
+---
+ tools/rpmuncompress.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
+index 609fb0f53..55aac4c44 100644
+--- a/tools/rpmuncompress.c
++++ b/tools/rpmuncompress.c
+@@ -97,12 +97,13 @@ static char *doUntar(const char *fn)
+ 	if (needtar) {
+ 	    rasprintf(&buf, "%s '%s' | %s %s -", zipper, fn, tar, taropts);
+ 	} else if (at->compressed == COMPRESSED_GEM) {
+-	    size_t nvlen = strlen(fn) - 3;
++	    const char *bn = basename(fn);
++	    size_t nvlen = strlen(bn) - 3;
+ 	    char *gem = rpmGetPath("%{__gem}", NULL);
+ 	    char *gemspec = NULL;
+ 	    char gemnameversion[nvlen];
+ 
+-	    rstrlcpy(gemnameversion, fn, nvlen);
++	    rstrlcpy(gemnameversion, bn, nvlen);
+ 	    gemspec = rpmGetPath("", gemnameversion, ".gemspec", NULL);
+ 
+ 	    rasprintf(&buf, "%s '%s' && %s spec '%s' --ruby > '%s'",
+-- 
+2.35.1
+

diff --git a/rpm.spec b/rpm.spec
index 4d9571d..39506ea 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -30,7 +30,7 @@
 
 %global rpmver 4.18.0
 %global snapver alpha1
-%global baserelease 5
+%global baserelease 6
 %global sover 9
 
 %global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -60,6 +60,7 @@ Patch100: 0001-Fix-OpenPGP-key-ID-parsing-regression.patch
 Patch101: 0001-Revert-Fix-shared-colored-files-not-removed-on-erasu.patch
 Patch102: 0001-Fix-regressions-on-dynamic-buildrequires-cli-switche.patch
 Patch103: 0001-Fix-a-typo-in-doUntar-that-breaks-verbose-uncompress.patch
+Patch104: 0001-Fix-regression-in-rubygem-unpacking-2040.patch
 
 # These are not yet upstream
 Patch906: rpm-4.7.1-geode-i686.patch
@@ -614,6 +615,9 @@ fi
 %doc docs/librpm/html/*
 
 %changelog
+* Thu Apr 28 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.6
+- Fix rubygem unpack regression, causing rubygem builds to fail
+
 * Wed Apr 27 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.5
 - Fix verbose source uncompress regression (#2079127)
 

                 reply	other threads:[~2026-11-23  9:34 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=179542645890.1.2845890047078225464.rpms-rpm-de6dc77d5065@fedoraproject.org \
    --to=pmatilai@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