From 3f4ffebf33229c9f061d3153b209d1dae205702e Mon Sep 17 00:00:00 2001 From: Frantisek Sumsal Date: Mon, 24 Feb 2020 21:56:37 +0100 Subject: [PATCH] Makefile: fix RPM build `make rpm` usually chose `/tmp` as the `$rpmbuild` dir, which breaks the dracut build, since it needs to execute `./configure`, but `/tmp` is mounted with `-o noexec`, leading to: ``` /var/tmp/rpm-tmp.SwEhJO: line 46: ./configure: Permission denied error: Bad exit status from /var/tmp/rpm-tmp.SwEhJO (%build) RPM build errors: Bad exit status from /var/tmp/rpm-tmp.SwEhJO (%build) ``` Switching to `/var/tmp` helps in this case. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ba87d08ed..22b584f14 100644 --- a/Makefile +++ b/Makefile @@ -210,7 +210,7 @@ dracut-$(DRACUT_MAIN_VERSION).tar.xz: doc syncheck rm -f -- dracut-$(DRACUT_MAIN_VERSION).tar rpm: dracut-$(DRACUT_MAIN_VERSION).tar.xz syncheck - rpmbuild=$$(mktemp -d -t rpmbuild-dracut.XXXXXX); src=$$(pwd); \ + rpmbuild=$$(mktemp -d -p /var/tmp rpmbuild-dracut.XXXXXX); src=$$(pwd); \ cp dracut-$(DRACUT_MAIN_VERSION).tar.xz "$$rpmbuild"; \ LC_MESSAGES=C $$src/git2spec.pl $(DRACUT_MAIN_VERSION) "$$rpmbuild" < dracut.spec > $$rpmbuild/dracut.spec; \ (cd "$$rpmbuild"; \ -- 2.39.2