[Rpm-maint] [rpm-software-management/rpm] %buildsubdir not defined in manual spec sections of specs using declarative buildsystem (Issue #3890)

Panu Matilainen notifications at github.com
Fri Sep 5 07:16:05 UTC 2025


pmatilai left a comment (rpm-software-management/rpm#3890)

Having slept a few nights on this, I think the sanest way out of this is to export the BUILDSUBDIR and/or the full build directory as environment variables to the build scripts. It's a little hysterical that it isn't already, isn't it?

And maybe we can then override %buildsubdir to the environment variable name, so that it gets evaluated inside the build instead of the spec parse. Like we do with %_smp_mflags, for similar reasons.

%buildsubdir is actually just another example how macros became way overused (over the last 20+ years) for various build-time tasks where environment variables would've been a better fit. Macros are spec parse time things where various things about the *build* environment simply are not yet known. And so, would be better off left to environment variables.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/3890#issuecomment-3257325684
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/3890/3257325684 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250905/907a2a6a/attachment.htm>


More information about the Rpm-maint mailing list