summaryrefslogtreecommitdiff
path: root/macros.in
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2022-03-25 11:32:27 +0200
committerPanu Matilainen <pmatilai@redhat.com>2022-04-04 10:04:25 +0300
commitcd5d667e99f931504a512b591fcde7ed92cee344 (patch)
tree881d7669f1d6301db95b775153b086782a8f5cc2 /macros.in
parent96de5c1f02e69a7ae37bcc8437451dfa35c87ae1 (diff)
downloadrpm-cd5d667e99f931504a512b591fcde7ed92cee344.tar.gz
Move source uncompress logic from spec parse to build time
Traditionally, %setup processing has figured out the commands needed to extract the source in question. The problem with this is that it happens at spec parse time, requiring access to sources that may not even be there in plain spec queries. Move the unpack logic from %setup internals to an `rpmuncompress` helper executable which is now the only command %setup needs to know. This way, spec parsing never needs to look at the actual source files, their presence is only required for an actual build. Another advantage is that the extraction machinery is now available to packagers without having to call %setup with its side-effects on %buildsubdir and such. Split the rpmbuild -ba test on missing sources into separate -bb and -bs tests as these are now rather different: binary build only tests for source presence if %prep is actually executed, and missing files at source build stage are discovered at a later stage as well.
Diffstat (limited to 'macros.in')
-rw-r--r--macros.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/macros.in b/macros.in
index 6177e6fec..99857b9e1 100644
--- a/macros.in
+++ b/macros.in
@@ -67,6 +67,7 @@
%__ld @__LD@
%__objdump @__OBJDUMP@
%__strip @__STRIP@
+%__rpmuncompress %{_rpmconfigdir}/rpmuncompress
%__find_debuginfo @__FIND_DEBUGINFO@