diff options
author | Lalufu <[email protected]> | 2024-01-16 22:32:59 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2024-01-16 13:32:59 -0800 |
commit | ef00da803de24f93fb02757f1a4295fe7f0016b9 (patch) | |
tree | 1e907a5d9ce417255c0b04ab97cb7bdbb95c764c | |
parent | 29ea6faf8ff5173da33c5506a7ef8ae21d3926e3 (diff) |
Make sure all necessary RPM path macros are defined
When building (s)rpm files through the Makefile, a directory structure
is created in /tmp to hold the various files.
In case the user running the command has overridden some of the RPM path
settings through their user profile (for example in `~/.rpmmacros`),
these paths do not line up with the configuration, and the build fails.
Make sure all paths used are properly defined.
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ralf Ertzinger <[email protected]>
Closes #15756
-rw-r--r-- | config/rpm.am | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/config/rpm.am b/config/rpm.am index 13bd54a62..85c56c0b2 100644 --- a/config/rpm.am +++ b/config/rpm.am @@ -83,6 +83,11 @@ srpm-common: rpm-local || exit 1; \ LANG=C $(RPMBUILD) \ --define "_tmppath $$rpmbuild/TMP" \ + --define "_builddir $$rpmbuild/BUILD" \ + --define "_rpmdir $$rpmbuild/RPMS" \ + --define "_srcrpmdir $$rpmbuild/SRPMS" \ + --define "_specdir $$rpmbuild/SPECS" \ + --define "_sourcedir $$rpmbuild/SOURCES" \ --define "_topdir $$rpmbuild" \ $(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \ cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \ @@ -99,6 +104,11 @@ rpm-common: rpm-local || exit 1; \ LANG=C ${RPMBUILD} \ --define "_tmppath $$rpmbuild/TMP" \ + --define "_builddir $$rpmbuild/BUILD" \ + --define "_rpmdir $$rpmbuild/RPMS" \ + --define "_srcrpmdir $$rpmbuild/SRPMS" \ + --define "_specdir $$rpmbuild/SPECS" \ + --define "_sourcedir $$rpmbuild/SOURCES" \ --define "_topdir $$rpmbuild" \ $(def) --rebuild $$rpmpkg || exit 1; \ cp $$rpmbuild/RPMS/*/* . || exit 1; \ |