In our ancient wacko setup, %_builddir is shared by all your packages, under 
which a package may create %buildsubdir - if it uses %setup that is. In other 
words, there's no safe and sane place for rpm to place per-build material. 
Introduce a new intermediate directory between the two, created in a newly 
added (internal) %builddir build step, to give rpm that place. This opens up 
all manner of opportunities, to be explored in later commits.

A new build-time macro %pkgbuilddir is added for the absolute path of this new 
directory, but in addition we override %_builddir to the same value for maximum 
compatibility with existing specs - a LOT of packages reference %{_builddir} 
for all sorts of (mostly bad) reasons and we don't want to deal with the 
carnage that would follow from breaking it. A further complication here is that 
defining %_builddir (along with sources etc) to current working directory is a 
common configuration (used eg by fedpkg and its variants) that we don't 
want to break either. So upon entry, we grab the pre-existing %_builddir and 
define %_top_builddir from it, which we can then base the %pkgbuilddir on, 
while preserving compatibility with both of the above scenarios.
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/2885

-- Commit Summary --

  * Introduce an rpm-controlled per-build directory

-- File Changes --

    M build/build.c (29)
    M build/parsePreamble.c (13)
    M build/rpmbuild_internal.h (1)
    M build/spec.c (4)
    M include/rpm/rpmbuild.h (1)
    M macros.in (8)
    M tests/rpmbuild.at (32)
    M tests/rpmspec.at (6)
    M tools/rpmbuild.c (6)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/2885.patch
https://github.com/rpm-software-management/rpm/pull/2885.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2885
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to