[Rpm-maint] [rpm-software-management/rpm] Dynamic Spec generation (#1485)
Panu Matilainen
notifications at github.com
Thu Nov 3 09:19:29 UTC 2022
@pmatilai commented on this pull request.
> @@ -273,6 +273,15 @@ static int doSetupMacro(rpmSpec spec, const char *line)
free(buf);
}
+ /* mkdir for dynamic specparts */
+ buf = rpmExpand("%{__mkdir} SPECPARTS", NULL);
+ appendBuf(spec, buf, 1);
+ free(buf);
+
+ buf = rpmGenPath("%{u2p:%{_builddir}}", "%{buildsubdir}", "SPECPARTS");
+ rpmPushMacro(spec->macros, "specpartsdir", NULL, buf, RMIL_SPEC);
Hmm, except maybe that's a step too far, we don't have separate macros for SPECS, SOURCES and the like either.
Internal uses we can always fix if necessary, what matters is that packages should never hardcode the value. And for that, we must export it in the build scriptlet environment (similar to $RPM_BUILD_ROOT) and document that as the thing to use.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1485#discussion_r1012656185
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/1485/review/1166529856 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20221103/6e78b75a/attachment-0001.html>
More information about the Rpm-maint
mailing list