Add a new %setup switch -s to indicate building in a directory outside the 
source directory, known as vpath build in some circles. Add a new 
%{sourcesubdir} macro which by default equals %{buildsubdir}, but when -s is 
used, we create and switch to a separate directory after unpacking.

A one gotcha here is that special %doc and %license has traditionally worked 
for both built and pre-existing content. With build and source trees separated, 
both cannot work. As special %doc/%license is mostly used for things like 
README's and COPYING which come as part of the source, we define %doc on 
vpath builds to mean source directory, and assume built content has its own 
means of installing (eg make install-doc).

Another potential issue is that we redefine %_configure to an absolute path in 
the sourcesubdir, this would break some unusual cases where %configure is used 
to invoke a configure-script outside the project top directory. It's mainly 
redefined here to make testing -s on an autotools project easy, a final 
implementation might do something else.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Introduce an rpm-controlled per-build directory
  * Make buildroot fully rpm controlled, always inside the per-build directory
  * Move SPECPARTS to per-pkg builddir, no longer needing name-version
  * PoC: Add native support for vpath-style builds outside the source tree

-- File Changes --

    M build/build.c (38)
    M build/files.c (2)
    M build/parsePreamble.c (30)
    M build/parsePrep.c (20)
    M build/parseSpec.c (15)
    M build/rpmbuild_internal.h (1)
    M build/spec.c (4)
    M include/rpm/rpmbuild.h (3)
    M macros.in (22)
    M tests/rpmbuild.at (46)
    M tests/rpmspec.at (8)
    M tools/rpmbuild.c (18)

-- Patch Links --

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

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2886
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