Skip to content

Commit 303522d

Browse files
committed
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. Signed-off-by: Ralf Ertzinger <[email protected]>
1 parent a382e21 commit 303522d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

config/rpm.am

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,11 @@ srpm-common:
8383
rpm-local || exit 1; \
8484
LANG=C $(RPMBUILD) \
8585
--define "_tmppath $$rpmbuild/TMP" \
86+
--define "_builddir $$rpmbuild/BUILD" \
87+
--define "_rpmdir $$rpmbuild/RPMS" \
88+
--define "_srcrpmdir $$rpmbuild/SRPMS" \
89+
--define "_specdir $$rpmbuild/SPECS" \
90+
--define "_sourcedir $$rpmbuild/SOURCES" \
8691
--define "_topdir $$rpmbuild" \
8792
$(def) -bs $$rpmbuild/SPECS/$$rpmspec || exit 1; \
8893
cp $$rpmbuild/SRPMS/$$rpmpkg . || exit 1; \
@@ -99,6 +104,11 @@ rpm-common:
99104
rpm-local || exit 1; \
100105
LANG=C ${RPMBUILD} \
101106
--define "_tmppath $$rpmbuild/TMP" \
107+
--define "_builddir $$rpmbuild/BUILD" \
108+
--define "_rpmdir $$rpmbuild/RPMS" \
109+
--define "_srcrpmdir $$rpmbuild/SRPMS" \
110+
--define "_specdir $$rpmbuild/SPECS" \
111+
--define "_sourcedir $$rpmbuild/SOURCES" \
102112
--define "_topdir $$rpmbuild" \
103113
$(def) --rebuild $$rpmpkg || exit 1; \
104114
cp $$rpmbuild/RPMS/*/* . || exit 1; \

0 commit comments

Comments
 (0)