Re: [Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)
Merged #1453 into master. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1453#event-4078870111___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)
@pmatilai commented on this pull request. > @@ -383,12 +385,22 @@ static char * getTarSpec(const char *arg) if (!gotspec) { rpmlog(RPMLOG_ERR, _("Failed to read spec file from %s\n"), arg); - specFile = NULL; +} else { + /* remove trailing \n */ + tarbuf[strlen(tarbuf)-1] = '\0'; + specFinal = rpmExpand("%{_specdir}/%{basename:", tarbuf, "}", NULL); I almost considered adding a %{rstrip:...} macro that strips any trailing whitespace (and still might) but seemed like an overkill for just this :sweat_smile: -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1453#discussion_r537392107___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
Re: [Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)
@dmnks approved this pull request. > @@ -383,12 +385,22 @@ static char * getTarSpec(const char *arg) if (!gotspec) { rpmlog(RPMLOG_ERR, _("Failed to read spec file from %s\n"), arg); - specFile = NULL; +} else { + /* remove trailing \n */ + tarbuf[strlen(tarbuf)-1] = '\0'; + specFinal = rpmExpand("%{_specdir}/%{basename:", tarbuf, "}", NULL); Elegant! :smiley: -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1453#pullrequestreview-544981744___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint
[Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)
Commit acf5e00281d73a2f8034091241c7b0e2ba00e383 cut a couple of corners too many, causing the temporary file name used to extract the spec from the tarball to end up in the src.rpm too. Revert back to creating %_specdir for tar builds, it might not be optimal but it's not exactly harmful either (%_sourcedir is different). The "truly correct" solutions get increasingly complicated for such a silly thing as this is. In addition to creating the %_specdir, we also need to rename the file to its proper name, simplify that code a bit while at it and add a test-case. Fixes: #1386 You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1453 -- Commit Summary -- * Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts -- File Changes -- M rpmbuild.c (22) M tests/rpmbuild.at (15) -- Patch Links -- https://github.com/rpm-software-management/rpm/pull/1453.patch https://github.com/rpm-software-management/rpm/pull/1453.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/1453 ___ Rpm-maint mailing list Rpm-maint@lists.rpm.org http://lists.rpm.org/mailman/listinfo/rpm-maint