[Rpm-maint] [rpm-software-management/rpm] Fix 4.16.0 regression causing invalid spec file name on rpmbuild -ts (#1453)

Panu Matilainen notifications at github.com
Mon Dec 7 10:25:10 UTC 2020


@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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20201207/6dbf696c/attachment.html>


More information about the Rpm-maint mailing list