Skip to content

Commit

Permalink
Fix regression in rubygem unpacking (#2040)
Browse files Browse the repository at this point in the history
Externalizing the source unpack in commit
cd5d667 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
  • Loading branch information
pmatilai committed Apr 28, 2022
1 parent bb36aac commit cbcd9dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tools/rpmuncompress.c
Original file line number Diff line number Diff line change
Expand Up @@ -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'",
Expand Down

0 comments on commit cbcd9dd

Please sign in to comment.