public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] rawhide: Fix rubygem rpmuncompress -x regression (#2492128)
@ 2026-06-24 12:51 Panu Matilainen
0 siblings, 0 replies; only message in thread
From: Panu Matilainen @ 2026-06-24 12:51 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : rawhide
Commit : 186d0a16ca198458337ea47fe65b77998959648a
Author : Panu Matilainen <pmatilai@redhat.com>
Date : 2026-06-24T15:51:32+03:00
Stats : +73/-1 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/186d0a16ca198458337ea47fe65b77998959648a?branch=rawhide
Log:
Fix rubygem rpmuncompress -x regression (#2492128)
---
diff --git a/0001-Fix-rubygem-extract-regression-from-b8b54f92c65bca7b.patch b/0001-Fix-rubygem-extract-regression-from-b8b54f92c65bca7b.patch
new file mode 100644
index 0000000..023b454
--- /dev/null
+++ b/0001-Fix-rubygem-extract-regression-from-b8b54f92c65bca7b.patch
@@ -0,0 +1,66 @@
+From f7d1f552f6a148d90dbdd646aecf8224501f4523 Mon Sep 17 00:00:00 2001
+Message-ID: <f7d1f552f6a148d90dbdd646aecf8224501f4523.1782305243.git.pmatilai@redhat.com>
+From: Panu Matilainen <pmatilai@redhat.com>
+Date: Wed, 24 Jun 2026 15:39:24 +0300
+Subject: [PATCH] Fix rubygem extract regression from
+ b8b54f92c65bca7bfdd80c3ecf717d5c48b02e91
+
+As b8b54f92c65bca7bfdd80c3ecf717d5c48b02e91 notes, this could've used
+some C++ love and maybe avoided the regression too by being waaaayy simpler.
+Adjust test expectation to pass now.
+
+Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2492128
+---
+ tests/rpmmacro.at | 1 -
+ tools/rpmuncompress.cc | 17 ++++++-----------
+ 2 files changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/tools/rpmuncompress.cc b/tools/rpmuncompress.cc
+index dc49921bf..76ea6ab32 100644
+--- a/tools/rpmuncompress.cc
++++ b/tools/rpmuncompress.cc
+@@ -6,6 +6,7 @@
+ #include <stdio.h>
+ #include <string.h>
+
++#include <filesystem>
+ #include <string>
+
+ #include <archive.h>
+@@ -17,6 +18,8 @@
+
+ #include "debug.h"
+
++namespace fs = std::filesystem;
++
+ static int extract = 0;
+ static int dryrun = 0;
+ static char *dstpath = NULL;
+@@ -217,21 +220,13 @@ static char *doUntar(const char *fn)
+ if (needtar) {
+ rasprintf(&buf, "%s %s '%s' | %s %s - %s", mkdir, zipper, fn, tar, taropts, stripcd);
+ } else if (at->compressed == COMPRESSED_GEM) {
+- char *tmp = xstrdup(fn);
+- const char *bn = basename(tmp);
+- size_t nvlen = strlen(bn) - 3;
++ auto bn = fs::path(fn).stem();
+ char *gem = rpmGetPath("%{__gem}", NULL);
+- char *gemspec = NULL;
+- std::string gemnameversion(bn, nvlen);
+-
+- gemspec = rpmGetPath("", gemnameversion.c_str(), ".gemspec", NULL);
+
+- rasprintf(&buf, "%s '%s' && %s spec '%s' --ruby > '%s'",
+- zipper, fn, gem, fn, gemspec);
++ rasprintf(&buf, "%s '%s' && %s spec '%s' --ruby > '%s.gemspec'",
++ zipper, fn, gem, fn, bn.c_str());
+
+- free(gemspec);
+ free(gem);
+- free(tmp);
+ } else {
+ rasprintf(&buf, "%s%s '%s' %s", mkdir, zipper, fn, stripcd);
+ }
+--
+2.54.0
+
diff --git a/rpm.spec b/rpm.spec
index 42735cc..e373d1f 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -28,7 +28,7 @@
%global rpmver 6.0.91
#global snapver rc1
-%global baserelease 1
+%global baserelease 2
%global sover 10
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -126,6 +126,9 @@ rpm-6.0-rpmformat.patch
0001-Revert-Add-a-deprecation-warning-for-clamp_mtime_to_.patch
# Patches already upstream:
+# Slightly modified from usptream commit due to not having the test,
+# because the test adds a binary that "patch" doesn't handle, argh
+0001-Fix-rubygem-extract-regression-from-b8b54f92c65bca7b.patch
# These are not yet upstream
rpm-4.7.1-geode-i686.patch
@@ -638,6 +641,9 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
+* Wed Jun 24 2026 Panu Matilainen <pmatilai@redhat.com - 6.0.91-2
+- Fix rubygem rpmuncompress -x regression (#2492128)
+
* Mon Jun 22 2026 Panu Matilainen <pmatilai@redhat.com - 6.0.91-1
- Rebase to 6.1 rc1 (https://fedoraproject.org/wiki/Changes/RPM-6.1)
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-06-24 12:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-24 12:51 [rpms/rpm] rawhide: Fix rubygem rpmuncompress -x regression (#2492128) Panu Matilainen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox