From cf1d6461cb41309249d9fbf9d7c7632dc142b615 Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Tue, 31 Oct 2017 20:37:34 +0100 Subject: [PATCH] Do not rename tmpfile config but use it directly. --- Makefile.am | 5 +---- configure.ac | 6 ++++-- docs/v2.0.0-RC1-ReleaseNotes | 5 ++++- scripts/Makemodule.am | 9 ++------- .../{cryptsetup_tmpfiles.conf.in => cryptsetup.conf.in} | 0 5 files changed, 11 insertions(+), 14 deletions(-) rename scripts/{cryptsetup_tmpfiles.conf.in => cryptsetup.conf.in} (100%) diff --git a/Makefile.am b/Makefile.am index e6fca17c..a7994ea6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,7 +3,6 @@ SUBDIRS = po tests TESTS = CLEANFILES = DISTCLEAN_TARGETS = -INSTALL_DATA_HOOKS = AM_CPPFLAGS = \ -include config.h \ @@ -40,7 +39,7 @@ ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = \ --enable-python \ - --enable-cryptsetup-reencrypt + --with-tmpfilesdir=$$dc_install_base/$(systemd_tmpfilesdir) distclean-local: -find . -name \*~ -o -name \*.orig -o -name \*.rej | xargs rm -f @@ -48,5 +47,3 @@ distclean-local: clean-local: -rm -rf docs/doxygen_api_docs - -install-data-hook: $(INSTALL_DATA_HOOKS) diff --git a/configure.ac b/configure.ac index eadfc59e..d85af955 100644 --- a/configure.ac +++ b/configure.ac @@ -425,7 +425,9 @@ if test x$enable_static_cryptsetup = xyes; then PKG_CONFIG=$saved_PKG_CONFIG fi +AC_MSG_CHECKING([for systemd tmpfiles config directory]) PKG_CHECK_VAR([systemd_tmpfilesdir], [systemd], [tmpfilesdir], [], [systemd_tmpfilesdir=no]) +AC_MSG_RESULT([$systemd_tmpfilesdir]) AC_SUBST([DEVMAPPER_LIBS]) AC_SUBST([DEVMAPPER_STATIC_LIBS]) @@ -527,7 +529,7 @@ CS_NUM_WITH([verity-hash-block], [hash block size for verity mode], [4096]) CS_NUM_WITH([verity-salt-size], [salt size for verity mode], [32]) CS_NUM_WITH([verity-fec-roots], [parity bytes for verity FEC], [2]) -CS_STR_WITH([tmpfilesdir], [override default path to directory with systemd temporary files], [$systemd_tmpfilesdir]) +CS_STR_WITH([tmpfilesdir], [override default path to directory with systemd temporary files], []) test -z "$with_tmpfilesdir" && with_tmpfilesdir=$systemd_tmpfilesdir test "x$with_tmpfilesdir" == "xno" || { test "${with_tmpfilesdir:0:1}" = "/" || AC_MSG_ERROR([--with-tmpfilesdir argument must be an absolute path.]) @@ -553,7 +555,7 @@ dnl ========================================================================== AC_CONFIG_FILES([ Makefile lib/libcryptsetup.pc po/Makefile.in -scripts/cryptsetup_tmpfiles.conf +scripts/cryptsetup.conf tests/Makefile ]) AC_OUTPUT diff --git a/docs/v2.0.0-RC1-ReleaseNotes b/docs/v2.0.0-RC1-ReleaseNotes index 13ccdf15..dc55ff46 100644 --- a/docs/v2.0.0-RC1-ReleaseNotes +++ b/docs/v2.0.0-RC1-ReleaseNotes @@ -38,6 +38,9 @@ Changes since version 2.0.0-RC0 - New --disable-cryptsetup option to disable build of cryptsetup tool. - Enable build of cryptsetup-reencrypt by default. +* Install tmpfile.d configuration for locking directory. + You can overwrite this using --with-tmpfilesdir configure option. + * Adds limited support for offline reencryption of LUKS2 format. * Decrease size of testing images (and the whole release archive). @@ -154,7 +157,7 @@ and for block device by using a specific lock file in /run/lock/cryptsetup. This directory must be created by distribution (do not rely on internal fallback). For systemd-based distribution, you can simply install -scripts/cryptsetup_tmpfiles.conf into tmpfiles.d directory. +scripts/cryptsetup.conf into tmpfiles.d directory. For more details see LUKS2-format.txt and LUKS2-locking.txt in the docs directory. (Please note this is just overview, there will be more formal diff --git a/scripts/Makemodule.am b/scripts/Makemodule.am index 382e6232..5bf6ddf4 100644 --- a/scripts/Makemodule.am +++ b/scripts/Makemodule.am @@ -1,10 +1,5 @@ -DISTCLEAN_TARGETS += scripts/cryptsetup_tmpfiles.conf +DISTCLEAN_TARGETS += scripts/cryptsetup.conf if CRYPTSETUP_TMPFILE -tmpfilesd_DATA += scripts/cryptsetup_tmpfiles.conf - -install-data-hooks-tmpfiles: - mv $(DESTDIR)$(tmpfilesddir)/cryptsetup_tmpfiles.conf $(DESTDIR)$(tmpfilesddir)/cryptsetup.conf - -INSTALL_DATA_HOOKS += install-data-hooks-tmpfiles +tmpfilesd_DATA += scripts/cryptsetup.conf endif diff --git a/scripts/cryptsetup_tmpfiles.conf.in b/scripts/cryptsetup.conf.in similarity index 100% rename from scripts/cryptsetup_tmpfiles.conf.in rename to scripts/cryptsetup.conf.in