]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Makefile: fix RPM build
authorFrantisek Sumsal <frantisek@sumsal.cz>
Mon, 24 Feb 2020 20:56:37 +0000 (21:56 +0100)
committerHarald Hoyer <harald@hoyer.xyz>
Fri, 28 Feb 2020 15:31:43 +0000 (16:31 +0100)
`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

index ba87d08ede3cc17ba1aa19c6e709243899a2a4bd..22b584f1441f7a8b173c6ab7929d14deb326c75b 100644 (file)
--- 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"; \