de6dc7 Fix rubygem unpack regression, causing rubygem builds to fail

Authored and Committed by Panu Matilainen 2 years ago
    Fix rubygem unpack regression, causing rubygem builds to fail
    
        
0001-Fix-regression-in-rubygem-unpacking-2040.patch ADDED
@@ -0,0 +1,39 @@
1
+ From cbcd9dd38dd1d0379e5d25ed3c1b1e96353e4014 Mon Sep 17 00:00:00 2001
2
+ Message-Id: <cbcd9dd38dd1d0379e5d25ed3c1b1e96353e4014.1651130985.git.pmatilai@redhat.com>
3
+ From: Panu Matilainen <pmatilai@redhat.com>
4
+ Date: Thu, 28 Apr 2022 10:17:16 +0300
5
+ Subject: [PATCH] Fix regression in rubygem unpacking (#2040)
6
+
7
+ Externalizing the source unpack in commit
8
+ cd5d667e99f931504a512b591fcde7ed92cee344 required changing the way
9
+ rubygems are unpacked, and now the .gemspec file gets unpacked into
10
+ different place. Oops. Reported and initial patch by Vit Ondruch.
11
+
12
+ Fixes: #2040
13
+ ---
14
+ tools/rpmuncompress.c | 5 +++--
15
+ 1 file changed, 3 insertions(+), 2 deletions(-)
16
+
17
+ diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
18
+ index 609fb0f53..55aac4c44 100644
19
+ --- a/tools/rpmuncompress.c
20
+ +++ b/tools/rpmuncompress.c
21
+ @@ -97,12 +97,13 @@ static char *doUntar(const char *fn)
22
+ if (needtar) {
23
+ rasprintf(&buf, "%s '%s' | %s %s -", zipper, fn, tar, taropts);
24
+ } else if (at->compressed == COMPRESSED_GEM) {
25
+ - size_t nvlen = strlen(fn) - 3;
26
+ + const char *bn = basename(fn);
27
+ + size_t nvlen = strlen(bn) - 3;
28
+ char *gem = rpmGetPath("%{__gem}", NULL);
29
+ char *gemspec = NULL;
30
+ char gemnameversion[nvlen];
31
+
32
+ - rstrlcpy(gemnameversion, fn, nvlen);
33
+ + rstrlcpy(gemnameversion, bn, nvlen);
34
+ gemspec = rpmGetPath("", gemnameversion, ".gemspec", NULL);
35
+
36
+ rasprintf(&buf, "%s '%s' && %s spec '%s' --ruby > '%s'",
37
+ --
38
+ 2.35.1
39
+
file modified
+5 -1
rpm.spec CHANGED
@@ -30,7 +30,7 @@
30
30
31
31
%global rpmver 4.18.0
32
32
%global snapver alpha1
33
- %global baserelease 5
33
+ %global baserelease 6
34
34
%global sover 9
35
35
36
36
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -60,6 +60,7 @@ Patch100: 0001-Fix-OpenPGP-key-ID-parsing-regression.patch
60
60
Patch101: 0001-Revert-Fix-shared-colored-files-not-removed-on-erasu.patch
61
61
Patch102: 0001-Fix-regressions-on-dynamic-buildrequires-cli-switche.patch
62
62
Patch103: 0001-Fix-a-typo-in-doUntar-that-breaks-verbose-uncompress.patch
63
+ Patch104: 0001-Fix-regression-in-rubygem-unpacking-2040.patch
63
64
64
65
# These are not yet upstream
65
66
Patch906: rpm-4.7.1-geode-i686.patch
@@ -614,6 +615,9 @@ fi
614
615
%doc docs/librpm/html/*
615
616
616
617
%changelog
618
+ * Thu Apr 28 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.6
619
+ - Fix rubygem unpack regression, causing rubygem builds to fail
620
+
617
621
* Wed Apr 27 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.5
618
622
- Fix verbose source uncompress regression (#2079127)
619
623