From fbb951ffb041ddb5013ea6a895dfc1f4775375bb Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Tue, 4 Jun 2024 12:45:13 +0200 Subject: [PATCH] buildsys: fix running sbuild as root Signed-off-by: Stoiko Ivanov --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b4f8086..cddc5e4 100644 --- a/Makefile +++ b/Makefile @@ -36,9 +36,12 @@ dsc: $(DSC): $(ORIG_SRC_TAR) $(BUILDDIR) cd $(BUILDDIR); dpkg-buildpackage -S -us -uc -d +# spamassassin fails running tests as root, since tests starting spamd cause spamd +# to setuid to nobody, resulting in EPERM when spamd tries to access the testdirectory, which is +# used for pid-files and rulesets .PHONY: sbuild sbuild: $(DSC) - sbuild $(DSC) + sbuild --starting-build-commands 'chmod 775 /build' --starting-build-commands 'chmod 775 %SBUILD_BUILD_DIR' $(DSC) .PHONY: update-upstream update-upstream: $(OPKGNAME).tar.gz