]> sourceware.org Git - lvm2.git/commitdiff
systemd: integrate lvm2 activation generator with conf+make
authorPeter Rajnoha <prajnoha@redhat.com>
Tue, 31 Jul 2012 14:46:24 +0000 (16:46 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Tue, 31 Jul 2012 14:46:24 +0000 (16:46 +0200)
Makefile.in
WHATS_NEW
configure
configure.in
make.tmpl.in
scripts/Makefile.in

index 5e0b348d863abdbadf0d7c776881c23f714918c0..04746d14751f952e7eac5621b2c9c2d8b6316d09 100644 (file)
@@ -16,7 +16,7 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
 
-SUBDIRS = doc include man scripts
+SUBDIRS = doc include man
 
 ifeq ("@UDEV_RULES@", "yes")
   SUBDIRS += udev
@@ -36,6 +36,8 @@ ifeq ("@BUILD_LVMETAD@", "yes")
   SUBDIRS += libdaemon
 endif
 
+SUBDIRS += scripts
+
 # FIXME Should use intermediate Makefiles here!
 ifeq ($(MAKECMDGOALS),distclean)
   SUBDIRS = doc include man scripts \
@@ -98,6 +100,9 @@ install_system_dirs:
 install_initscripts: 
        $(MAKE) -C scripts install_initscripts
 
+install_systemd_generators:
+       $(MAKE) -C scripts install_systemd_generators
+
 install_systemd_units:
        $(MAKE) -C scripts install_systemd_units
 
index 5208da9a72422ab77d622dc89c67ffdaca56ab15..92dd0dcef7008f72120035532f26eef5b95619c7 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,7 @@
 Version 2.02.97 - 
 ===============================
+  Add make install_systemd_generators.
+  Add generator for lvm2 activation systemd units.
   Add lvm_config_find_bool lvm2app fn to retrieve bool value from config tree.
   Respect --test also when using lvmetad.
   No longer capitalise first LV attribute char for invalid snapshots.
index ca71fdb0a540b9e406e6f0be998f259d9c448bf2..52f0e369bab2e0d7cbb2baf4ec3fd2fbefa2dfd6 100755 (executable)
--- a/configure
+++ b/configure
@@ -597,6 +597,7 @@ ac_subst_vars='LTLIBOBJS
 usrsbindir
 usrlibdir
 tmpfilesdir
+systemdutildir
 systemdsystemunitdir
 udevdir
 udev_prefix
@@ -9917,7 +9918,12 @@ if test -n "$pkg_systemdsystemunitdir"; then
 fi
 
 if test -z "$systemdsystemunitdir"; then
-           systemdsystemunitdir='/lib/systemd/system';
+           systemdsystemunitdir='${exec_prefix}/lib/systemd/system';
+fi
+
+systemdutildir=$($PKG_CONFIG --variable=systemdutildir systemd)
+if test -z "$systemdutildir"; then
+           systemdutildir='${exec_prefix}/lib/systemd';
 fi
 ################################################################################
 
@@ -10564,6 +10570,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[()]' '{print $2}'`
 
 
 
+
 
 
 ################################################################################
index 8bf0c4e3cfdbaf8a40320cd9fc122652865b7ca9..1c908f947e3f702f0d5a8e15615ba9e51797f64c 100644 (file)
@@ -1275,7 +1275,12 @@ if test -n "$pkg_systemdsystemunitdir"; then
 fi
 
 if test -z "$systemdsystemunitdir"; then
-           systemdsystemunitdir='/lib/systemd/system';
+           systemdsystemunitdir='${exec_prefix}/lib/systemd/system';
+fi
+
+systemdutildir=$($PKG_CONFIG --variable=systemdutildir systemd)
+if test -z "$systemdutildir"; then
+           systemdutildir='${exec_prefix}/lib/systemd';
 fi
 ################################################################################
 AC_ARG_WITH(tmpfilesdir,
@@ -1549,6 +1554,7 @@ AC_SUBST(tmpdir)
 AC_SUBST(udev_prefix)
 AC_SUBST(udevdir)
 AC_SUBST(systemdsystemunitdir)
+AC_SUBST(systemdutildir)
 AC_SUBST(tmpfilesdir)
 AC_SUBST(usrlibdir)
 AC_SUBST(usrsbindir)
index 25cc87f8bf1210f86e6b965f1e5bdc2341aa817e..b8b127fa2e6147a8ee851331d29791a2248cabf0 100644 (file)
@@ -67,7 +67,8 @@ staticdir = $(DESTDIR)@STATICDIR@
 udevdir = $(DESTDIR)@udevdir@
 pkgconfigdir = $(usrlibdir)/pkgconfig
 initdir = $(DESTDIR)$(sysconfdir)/rc.d/init.d
-systemd_dir = $(DESTDIR)@systemdsystemunitdir@
+systemd_unit_dir = $(DESTDIR)@systemdsystemunitdir@
+systemd_generator_dir = $(DESTDIR)@systemdutildir@/system-generators
 tmpfiles_dir = $(DESTDIR)@tmpfilesdir@
 ocf_scriptdir = $(DESTDIR)@OCFDIR@
 
index 53c85f5ab0cc337b14075d09fe325528d6614d55..40396b0474d0711d41fc6a9166fa88acc1f9d0f4 100644 (file)
@@ -15,9 +15,16 @@ srcdir = @srcdir@
 top_srcdir = @top_srcdir@
 top_builddir = @top_builddir@
 
+SOURCES = lvm2_activation_generator_systemd_red_hat.c
+TARGETS = lvm2_activation_generator_systemd_red_hat
+
 include $(top_builddir)/make.tmpl
 
+DEPLIBS += $(top_builddir)/liblvm/liblvm2app.so $(top_builddir)/libdm/libdevmapper.so
+LVMLIBS = @LVM2APP_LIB@ -ldevmapper
+
 SCRIPTS = lvmdump.sh lvmconf.sh vgimportclone.sh
+
 ifeq ("@FSADM@", "yes")
        SCRIPTS += fsadm.sh
 endif
@@ -59,16 +66,23 @@ ifeq ("@BUILD_CMIRRORD@", "yes")
        $(INSTALL_SCRIPT) cmirrord_init_red_hat $(initdir)/cmirrord
 endif
 
+lvm2_activation_generator_systemd_red_hat: $(OBJECTS) $(DEPLIBS)
+       $(CC) -o $@ $(OBJECTS) $(LVMLIBS)
+
+install_systemd_generators:
+       $(INSTALL_DIR) $(systemd_generator_dir)
+       $(INSTALL_PROGRAM) lvm2_activation_generator_systemd_red_hat $(systemd_generator_dir)/lvm2-activation-generator
+
 install_systemd_units:
-       $(INSTALL_DIR) $(systemd_dir)
+       $(INSTALL_DIR) $(systemd_unit_dir)
 ifeq ("@BUILD_DMEVENTD@", "yes")
-       $(INSTALL_DATA) dm_event_systemd_red_hat.socket $(systemd_dir)/dm-event.socket
-       $(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_DATA) dm_event_systemd_red_hat.socket $(systemd_unit_dir)/dm-event.socket
+       $(INSTALL_DATA) dm_event_systemd_red_hat.service $(systemd_unit_dir)/dm-event.service
+       $(INSTALL_DATA) lvm2_monitoring_systemd_red_hat.service $(systemd_unit_dir)/lvm2-monitor.service
 endif
 ifeq ("@BUILD_LVMETAD@", "yes")
-       $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.socket $(systemd_dir)/lvm2-lvmetad.socket
-       $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.service $(systemd_dir)/lvm2-lvmetad.service
+       $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.socket $(systemd_unit_dir)/lvm2-lvmetad.socket
+       $(INSTALL_DATA) lvm2_lvmetad_systemd_red_hat.service $(systemd_unit_dir)/lvm2-lvmetad.service
 endif
 
 install_tmpfiles_configuration:
This page took 0.057584 seconds and 5 git commands to generate.