summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2015-01-27 16:59:15 +0000
committerJavier Jardón <jjardon@gnome.org>2015-01-29 13:22:34 +0000
commit79b3a70233862ae00b209f9586f5f24c8ee05b25 (patch)
treed7646cd90df0e0138d34858eec8e6b2d50e46b45
parentf9701bf9fd26cb8217b4548a850f51b204dae8c2 (diff)
downloaddefinitions-79b3a70233862ae00b209f9586f5f24c8ee05b25.tar.gz
lvm: Use lvmetad by default, and generally fix LVM in Baserock
We now install the necessary LVM systemd units and enable lvmetad by default. Also, the udev rules are installed to the correct place so that /dev is correctly populated.
-rw-r--r--strata/lvm/lvm2.morph29
1 files changed, 27 insertions, 2 deletions
diff --git a/strata/lvm/lvm2.morph b/strata/lvm/lvm2.morph
index 49c166dc..791894df 100644
--- a/strata/lvm/lvm2.morph
+++ b/strata/lvm/lvm2.morph
@@ -1,6 +1,31 @@
name: lvm2
kind: chunk
build-system: autotools
+
configure-commands:
-- ./configure --prefix="$PREFIX" --enable-applib --enable-cmdlib --enable-pkgconfig
- --enable-dmeventd --enable-udev_sync
+# We specify --sbindir explicitly due to a bug in .service file generation:
+# if left to the default, @sbindir@ is expanded to the literal string
+# '${exec_prefix}/sbin' in the generated .service files.
+#
+# udev rules *must* go in /lib, they'll be ignored if they go in /usr/lib.
+- >
+ ./configure --prefix="$PREFIX" \
+ --sbindir="$PREFIX"/sbin \
+ --with-udev-prefix=/lib \
+ --with-systemdsystemunitdir="$PREFIX"/lib/systemd/system \
+ --enable-applib --enable-cmdlib --enable-pkgconfig --enable-lvmetad \
+ --enable-dmeventd --enable-udev_sync
+
+install-commands:
+- make DESTDIR="$DESTDIR" install
+- make DESTDIR="$DESTDIR" install_system_dirs
+- make DESTDIR="$DESTDIR" install_systemd_generators
+- make DESTDIR="$DESTDIR" install_systemd_units
+- make DESTDIR="$DESTDIR" install_tmpfiles_configuration
+
+# Use lvmetad by default. This means we don't have to use the
+# `lvm2-activation-generator` systemd generator, which is a good thing
+# because I have seen it cause systems to completely fail to boot. Fedora
+# does something similar, see:
+# http://pkgs.fedoraproject.org/cgit/lvm2.git/tree/lvm2-enable-lvmetad-by-default.patch
+- sed -e 's/use_lvmetad = 0/use_lvmetad = 1/' -i "$DESTDIR"/etc/lvm/lvm.conf