From 465982907ffee01b531bf25e68f7df0c427dc5b7 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 27 Jan 2015 12:43:41 +0000 Subject: Move LVM into its own stratum The LVM tools are generally useful, so they should be available separately from the huge 'virtualization' stratum. --- strata/lvm.morph | 16 ++++++++++++++++ strata/lvm/lvm2.morph | 6 ++++++ strata/virtualization.morph | 9 +-------- strata/virtualization/lvm2.morph | 6 ------ systems/gitlab-ci-runner.morph | 2 ++ 5 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 strata/lvm.morph create mode 100644 strata/lvm/lvm2.morph delete mode 100644 strata/virtualization/lvm2.morph diff --git a/strata/lvm.morph b/strata/lvm.morph new file mode 100644 index 00000000..c4cb574a --- /dev/null +++ b/strata/lvm.morph @@ -0,0 +1,16 @@ +name: lvm +kind: stratum +description: | + LVM userland tools. + + LVM is a logical volume manager for the Linux kernel. This stratum contains + the tools necessary to manage volumes with LVM. +build-depends: +- morph: strata/foundation.morph +chunks: +- name: lvm2 + morph: strata/lvm/lvm2.morph + repo: upstream:lvm2 + ref: 8c5b90b50bdf9f1a7ae1d3c4cf58ce4b0d7c2768 + unpetrify-ref: baserock/morph + build-depends: [] diff --git a/strata/lvm/lvm2.morph b/strata/lvm/lvm2.morph new file mode 100644 index 00000000..49c166dc --- /dev/null +++ b/strata/lvm/lvm2.morph @@ -0,0 +1,6 @@ +name: lvm2 +kind: chunk +build-system: autotools +configure-commands: +- ./configure --prefix="$PREFIX" --enable-applib --enable-cmdlib --enable-pkgconfig + --enable-dmeventd --enable-udev_sync diff --git a/strata/virtualization.morph b/strata/virtualization.morph index e3261f84..7aa8f6af 100644 --- a/strata/virtualization.morph +++ b/strata/virtualization.morph @@ -16,19 +16,12 @@ chunks: ref: 1d4a2abc875c4dda1b5eadc0a097a48a8d2ec82b unpetrify-ref: master build-depends: [] -- name: lvm2 - morph: strata/virtualization/lvm2.morph - repo: upstream:lvm2 - ref: 8c5b90b50bdf9f1a7ae1d3c4cf58ce4b0d7c2768 - unpetrify-ref: baserock/morph - build-depends: [] - name: dnsmasq morph: strata/virtualization/dnsmasq.morph repo: upstream:dnsmasq ref: 8471cd938ca41fbe4fee8ae3f657625c92cfb954 unpetrify-ref: baserock/morph - build-depends: - - lvm2 + build-depends: [] - name: qemu morph: strata/virtualization/qemu.morph repo: upstream:qemu diff --git a/strata/virtualization/lvm2.morph b/strata/virtualization/lvm2.morph deleted file mode 100644 index 49c166dc..00000000 --- a/strata/virtualization/lvm2.morph +++ /dev/null @@ -1,6 +0,0 @@ -name: lvm2 -kind: chunk -build-system: autotools -configure-commands: -- ./configure --prefix="$PREFIX" --enable-applib --enable-cmdlib --enable-pkgconfig - --enable-dmeventd --enable-udev_sync diff --git a/systems/gitlab-ci-runner.morph b/systems/gitlab-ci-runner.morph index 9eabc403..b4e20ec7 100644 --- a/systems/gitlab-ci-runner.morph +++ b/systems/gitlab-ci-runner.morph @@ -27,6 +27,8 @@ strata: morph: strata/genivi.morph - name: tools morph: strata/tools.morph +- name: lvm + morph: strata/lvm.morph - name: virtualization morph: strata/virtualization.morph - name: openstack-clients -- cgit v1.2.1 From 398c914624a25bcd2f7cca0d7002d127d6e5aa76 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 27 Jan 2015 16:30:30 +0000 Subject: lvm: Use latest tagged release of LVM tools --- strata/lvm.morph | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/strata/lvm.morph b/strata/lvm.morph index c4cb574a..8c1c3f67 100644 --- a/strata/lvm.morph +++ b/strata/lvm.morph @@ -11,6 +11,6 @@ chunks: - name: lvm2 morph: strata/lvm/lvm2.morph repo: upstream:lvm2 - ref: 8c5b90b50bdf9f1a7ae1d3c4cf58ce4b0d7c2768 - unpetrify-ref: baserock/morph + ref: fa01faaa4aa96de834ba7e8fbb9d9aff908571c3 + unpetrify-ref: v2_02_115 build-depends: [] -- cgit v1.2.1 From a2cb0484b970f2f58c4cc3e0057976b6a4daf64a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Tue, 27 Jan 2015 16:59:15 +0000 Subject: 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. --- strata/lvm/lvm2.morph | 29 +++++++++++++++++++++++++++-- 1 file 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 -- cgit v1.2.1