diff --git a/Makefile.in b/Makefile.in index 7d6f48cd0..9a470a346 100644 --- a/Makefile.in +++ b/Makefile.in @@ -97,6 +97,9 @@ install_initscripts: install_systemd_units: $(MAKE) -C scripts install_systemd_units +install_tmpfiles_configuration: + $(MAKE) -C scripts install_tmpfiles_configuration + LCOV_TRACES = libdm.info lib.info tools.info \ daemons/dmeventd.info daemons/clvmd.info CLEAN_TARGETS += $(LCOV_TRACES) diff --git a/WHATS_NEW b/WHATS_NEW index c5f3cd26e..207f3b1df 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,7 @@ Version 2.02.93 - ==================================== + Add tmpfiles.d style configuration for lvm2 lock and run directory. + Add configure --with-tmpfilesdir for dir holding volatile-file configuration. Allow 'lvconvert --repair' to operate on RAID 4/5/6 Fix 'build_parallel_areas_from_lv' to work properly with RAID 4/5/6 diff --git a/configure b/configure index 836ad1378..e43b4bde1 100755 --- a/configure +++ b/configure @@ -596,6 +596,7 @@ ac_default_prefix=/usr ac_subst_vars='LTLIBOBJS usrsbindir usrlibdir +tmpfilesdir systemdsystemunitdir udevdir udev_prefix @@ -844,6 +845,7 @@ with_usrsbindir with_udev_prefix with_udevdir with_systemdsystemunitdir +with_tmpfilesdir with_dmeventd_pidfile with_dmeventd_path with_default_run_dir @@ -1589,6 +1591,9 @@ Optional Packages: --with-udevdir=DIR udev rules in DIR [[UPREFIX/lib/udev/rules.d]] --with-systemdsystemunitdir=DIR systemd service files in DIR + --with-tmpfilesdir=DIR install configuration files for management of + volatile files and directories in DIR + [[SYSCONFDIR/tmpfiles.d]] --with-dmeventd-pidfile=PATH dmeventd pidfile [[/var/run/dmeventd.pid]] --with-dmeventd-path=PATH @@ -9763,6 +9768,15 @@ fi if test -z "$systemdsystemunitdir"; then systemdsystemunitdir='/lib/systemd/system'; fi +################################################################################ + +# Check whether --with-tmpfilesdir was given. +if test "${with_tmpfilesdir+set}" = set; then : + withval=$with_tmpfilesdir; tmpfilesdir=$withval +else + tmpfilesdir='${sysconfdir}/tmpfiles.d' +fi + ################################################################################ if test x$READLINE = xyes; then for ac_header in readline/readline.h readline/history.h @@ -10408,10 +10422,11 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'` + ################################################################################ -ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/common/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile doc/Makefile doc/example.conf include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile" +ac_config_files="$ac_config_files Makefile make.tmpl daemons/Makefile daemons/clvmd/Makefile daemons/cmirrord/Makefile daemons/common/Makefile daemons/dmeventd/Makefile daemons/dmeventd/libdevmapper-event.pc daemons/dmeventd/plugins/Makefile daemons/dmeventd/plugins/lvm2/Makefile daemons/dmeventd/plugins/raid/Makefile daemons/dmeventd/plugins/mirror/Makefile daemons/dmeventd/plugins/snapshot/Makefile daemons/dmeventd/plugins/thin/Makefile daemons/lvmetad/Makefile doc/Makefile doc/example.conf include/.symlinks include/Makefile lib/Makefile lib/format1/Makefile lib/format_pool/Makefile lib/locking/Makefile lib/mirror/Makefile lib/replicator/Makefile lib/misc/lvm-version.h lib/raid/Makefile lib/snapshot/Makefile lib/thin/Makefile libdm/Makefile libdm/libdevmapper.pc liblvm/Makefile liblvm/liblvm2app.pc man/Makefile po/Makefile scripts/clvmd_init_red_hat scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile test/unit/Makefile tools/Makefile udev/Makefile unit-tests/datastruct/Makefile unit-tests/regex/Makefile unit-tests/mm/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -11140,6 +11155,7 @@ do "scripts/lvm2_monitoring_init_red_hat") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_monitoring_init_red_hat" ;; "scripts/dm_event_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/dm_event_systemd_red_hat.service" ;; "scripts/lvm2_monitoring_systemd_red_hat.service") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_monitoring_systemd_red_hat.service" ;; + "scripts/lvm2_tmpfiles_red_hat.conf") CONFIG_FILES="$CONFIG_FILES scripts/lvm2_tmpfiles_red_hat.conf" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; "test/api/Makefile") CONFIG_FILES="$CONFIG_FILES test/api/Makefile" ;; diff --git a/configure.in b/configure.in index cfa80170c..5ab2c55d9 100644 --- a/configure.in +++ b/configure.in @@ -1209,6 +1209,11 @@ if test -z "$systemdsystemunitdir"; then systemdsystemunitdir='/lib/systemd/system'; fi ################################################################################ +AC_ARG_WITH(tmpfilesdir, + AC_HELP_STRING([--with-tmpfilesdir=DIR], + [install configuration files for management of volatile files and directories in DIR [[SYSCONFDIR/tmpfiles.d]]]), + tmpfilesdir=$withval, tmpfilesdir='${sysconfdir}/tmpfiles.d') +################################################################################ dnl -- Ensure additional headers required if test x$READLINE = xyes; then AC_CHECK_HEADERS(readline/readline.h readline/history.h,,AC_MSG_ERROR(bailing out)) @@ -1478,6 +1483,7 @@ AC_SUBST(tmpdir) AC_SUBST(udev_prefix) AC_SUBST(udevdir) AC_SUBST(systemdsystemunitdir) +AC_SUBST(tmpfilesdir) AC_SUBST(usrlibdir) AC_SUBST(usrsbindir) @@ -1525,6 +1531,7 @@ scripts/cmirrord_init_red_hat scripts/lvm2_monitoring_init_red_hat scripts/dm_event_systemd_red_hat.service scripts/lvm2_monitoring_systemd_red_hat.service +scripts/lvm2_tmpfiles_red_hat.conf scripts/Makefile test/Makefile test/api/Makefile diff --git a/make.tmpl.in b/make.tmpl.in index 1c702923c..a84d5fd58 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -51,6 +51,7 @@ TESTING = @TESTING@ prefix = @prefix@ exec_prefix = @exec_prefix@ udev_prefix = @udev_prefix@ +sysconfdir = @sysconfdir@ bindir = $(DESTDIR)@bindir@ confdir = $(DESTDIR)@CONFDIR@/lvm includedir = $(DESTDIR)@includedir@ @@ -65,8 +66,9 @@ localedir = $(DESTDIR)@LOCALEDIR@ staticdir = $(DESTDIR)@STATICDIR@ udevdir = $(DESTDIR)@udevdir@ pkgconfigdir = $(usrlibdir)/pkgconfig -initdir = $(DESTDIR)@sysconfdir@/rc.d/init.d +initdir = $(DESTDIR)$(sysconfdir)/rc.d/init.d systemd_dir = $(DESTDIR)@systemdsystemunitdir@ +tmpfiles_dir = $(DESTDIR)@tmpfilesdir@ ocf_scriptdir = $(DESTDIR)@OCFDIR@ USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \ diff --git a/scripts/Makefile.in b/scripts/Makefile.in index bf1b1c415..3a9ded5c6 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -60,5 +60,9 @@ install_systemd_units: $(INSTALL_DATA) dm_event_systemd_red_hat.service $(systemd_dir)/dm-event.service $(INSTALL_DATA) lvm2_monitoring_systemd_red_hat.service $(systemd_dir)/lvm2-monitor.service +install_tmpfiles_configuration: + $(INSTALL_DIR) $(tmpfiles_dir) + $(INSTALL_DATA) lvm2_tmpfiles_red_hat.conf $(tmpfiles_dir)/lvm2.conf + DISTCLEAN_TARGETS += clvmd_init_red_hat cmirrord_init_red_hat lvm2_monitoring_init_red_hat \ dm_event_systemd_red_hat.service lvm2_monitoring_systemd_red_hat.service