From ef5f5c8659b1ca3999e362dfa33478e0a0150ced Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 19 Mar 2016 14:45:58 +0100 Subject: build: Protect against misconfiguration of localstatedir. Suggested by Jookia <166291@gmail.com>. * m4/guix.m4 (GUIX_CURRENT_LOCALSTATEDIR, GUIX_CHECK_LOCALSTATEDIR): New macros. * config-daemon.ac: Use 'GUIX_CHECK_LOCALSTATEDIR'. * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --localstatedir. * doc/guix.texi (Requirements): Mention --localstatedir. (The Store): Mention LOCALSTATEDIR as such. --- Makefile.am | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 8a5430794a..a9c281d4d1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -421,7 +421,11 @@ include daemon.am endif BUILD_DAEMON ACLOCAL_AMFLAGS = -I m4 + +# Pass an explicit '--localstatedir' so that configure does not error out if +# it finds an existing installation with a different localstatedir. AM_DISTCHECK_CONFIGURE_FLAGS = \ + --localstatedir="$$dc_install_base/var" \ --with-libgcrypt-prefix="$(LIBGCRYPT_PREFIX)" \ --with-libgcrypt-libdir="$(LIBGCRYPT_LIBDIR)" \ --with-nix-prefix="$(NIX_PREFIX)" \ -- cgit v1.2.3