Handle empty sandbox_shell

Previously, SANDBOX_SHELL was set to empty when unavailable. This
caused issues when actually generating the sandbox. Instead, just set
SANDBOX_SHELL when --with-sandbox-shell= is non-empty. Alternative
implementation to https://github.com/NixOS/nix/pull/3038.

(cherry picked from commit 199e888785bd23073e44e56f6c74b95dc7c10ffa)
This commit is contained in:
Matthew Bauer 2019-10-08 23:12:31 -04:00 committed by Eelco Dolstra
parent 1b78bbb414
commit 9f698c4530
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -39,9 +39,12 @@ libstore_CXXFLAGS = \
-DNIX_LIBEXEC_DIR=\"$(libexecdir)\" \
-DNIX_BIN_DIR=\"$(bindir)\" \
-DNIX_MAN_DIR=\"$(mandir)\" \
-DSANDBOX_SHELL="\"$(sandbox_shell)\"" \
-DLSOF=\"$(lsof)\"
ifneq ($(sandbox_shell),)
libstore_CXXFLAGS += -DSANDBOX_SHELL="\"$(sandbox_shell)\""
endif
$(d)/local-store.cc: $(d)/schema.sql.gen.hh
$(d)/build.cc: