[arch-commits] Commit in lvm2/repos (26 files)

Thomas Bächler thomas at nymeria.archlinux.org
Wed Nov 13 19:38:18 UTC 2013


    Date: Wednesday, November 13, 2013 @ 20:38:17
  Author: thomas
Revision: 199508

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  lvm2/repos/testing-i686/
  lvm2/repos/testing-i686/11-dm-initramfs.rules
    (from rev 199507, lvm2/trunk/11-dm-initramfs.rules)
  lvm2/repos/testing-i686/PKGBUILD
    (from rev 199507, lvm2/trunk/PKGBUILD)
  lvm2/repos/testing-i686/dmeventd.service
    (from rev 199507, lvm2/trunk/dmeventd.service)
  lvm2/repos/testing-i686/dmeventd.socket
    (from rev 199507, lvm2/trunk/dmeventd.socket)
  lvm2/repos/testing-i686/lvm-monitoring.service
    (from rev 199507, lvm2/trunk/lvm-monitoring.service)
  lvm2/repos/testing-i686/lvm2.conf
    (from rev 199507, lvm2/trunk/lvm2.conf)
  lvm2/repos/testing-i686/lvm2.install
    (from rev 199507, lvm2/trunk/lvm2.install)
  lvm2/repos/testing-i686/lvm2_hook
    (from rev 199507, lvm2/trunk/lvm2_hook)
  lvm2/repos/testing-i686/lvm2_install
    (from rev 199507, lvm2/trunk/lvm2_install)
  lvm2/repos/testing-i686/lvmetad.service
    (from rev 199507, lvm2/trunk/lvmetad.service)
  lvm2/repos/testing-i686/lvmetad.socket
    (from rev 199507, lvm2/trunk/lvmetad.socket)
  lvm2/repos/testing-i686/sd-lvm2
    (from rev 199507, lvm2/trunk/sd-lvm2)
  lvm2/repos/testing-x86_64/
  lvm2/repos/testing-x86_64/11-dm-initramfs.rules
    (from rev 199507, lvm2/trunk/11-dm-initramfs.rules)
  lvm2/repos/testing-x86_64/PKGBUILD
    (from rev 199507, lvm2/trunk/PKGBUILD)
  lvm2/repos/testing-x86_64/dmeventd.service
    (from rev 199507, lvm2/trunk/dmeventd.service)
  lvm2/repos/testing-x86_64/dmeventd.socket
    (from rev 199507, lvm2/trunk/dmeventd.socket)
  lvm2/repos/testing-x86_64/lvm-monitoring.service
    (from rev 199507, lvm2/trunk/lvm-monitoring.service)
  lvm2/repos/testing-x86_64/lvm2.conf
    (from rev 199507, lvm2/trunk/lvm2.conf)
  lvm2/repos/testing-x86_64/lvm2.install
    (from rev 199507, lvm2/trunk/lvm2.install)
  lvm2/repos/testing-x86_64/lvm2_hook
    (from rev 199507, lvm2/trunk/lvm2_hook)
  lvm2/repos/testing-x86_64/lvm2_install
    (from rev 199507, lvm2/trunk/lvm2_install)
  lvm2/repos/testing-x86_64/lvmetad.service
    (from rev 199507, lvm2/trunk/lvmetad.service)
  lvm2/repos/testing-x86_64/lvmetad.socket
    (from rev 199507, lvm2/trunk/lvmetad.socket)
  lvm2/repos/testing-x86_64/sd-lvm2
    (from rev 199507, lvm2/trunk/sd-lvm2)

---------------------------------------+
 testing-i686/11-dm-initramfs.rules    |    3 
 testing-i686/PKGBUILD                 |   99 ++++++++++++++++++++++++++++++++
 testing-i686/dmeventd.service         |   14 ++++
 testing-i686/dmeventd.socket          |   11 +++
 testing-i686/lvm-monitoring.service   |   17 +++++
 testing-i686/lvm2.conf                |    2 
 testing-i686/lvm2.install             |   16 +++++
 testing-i686/lvm2_hook                |   12 +++
 testing-i686/lvm2_install             |   29 +++++++++
 testing-i686/lvmetad.service          |   16 +++++
 testing-i686/lvmetad.socket           |   10 +++
 testing-i686/sd-lvm2                  |   31 ++++++++++
 testing-x86_64/11-dm-initramfs.rules  |    3 
 testing-x86_64/PKGBUILD               |   99 ++++++++++++++++++++++++++++++++
 testing-x86_64/dmeventd.service       |   14 ++++
 testing-x86_64/dmeventd.socket        |   11 +++
 testing-x86_64/lvm-monitoring.service |   17 +++++
 testing-x86_64/lvm2.conf              |    2 
 testing-x86_64/lvm2.install           |   16 +++++
 testing-x86_64/lvm2_hook              |   12 +++
 testing-x86_64/lvm2_install           |   29 +++++++++
 testing-x86_64/lvmetad.service        |   16 +++++
 testing-x86_64/lvmetad.socket         |   10 +++
 testing-x86_64/sd-lvm2                |   31 ++++++++++
 24 files changed, 520 insertions(+)

Copied: lvm2/repos/testing-i686/11-dm-initramfs.rules (from rev 199507, lvm2/trunk/11-dm-initramfs.rules)
===================================================================
--- testing-i686/11-dm-initramfs.rules	                        (rev 0)
+++ testing-i686/11-dm-initramfs.rules	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,3 @@
+# needed with new udev/mkinitcpio and as implemented in dracut:
+# <http://git.kernel.org/?p=boot/dracut/dracut.git;a=commitdiff;h=12b9736228f2b34c15a9cb63be79cf7b6e865b54>
+SUBSYSTEM=="block", KERNEL=="dm-[0-9]*", ACTION=="add|change", OPTIONS="db_persist"

Copied: lvm2/repos/testing-i686/PKGBUILD (from rev 199507, lvm2/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,99 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgbase=lvm2
+pkgname=('lvm2' 'device-mapper')
+pkgver=2.02.104
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://sourceware.org/lvm2/"
+license=('GPL2' 'LGPL2.1')
+makedepends=('systemd' 'thin-provisioning-tools')
+groups=('base')
+source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${pkgver}.tgz{,.asc}
+        lvm2_install
+        lvm2_hook
+        sd-lvm2
+        11-dm-initramfs.rules
+        lvm2.conf
+        dmeventd.service
+        dmeventd.socket
+        lvm-monitoring.service
+        lvmetad.service
+        lvmetad.socket)
+sha1sums=('4c296453e10deafe02004fde40075cdb3792eeb2'
+          'SKIP'
+          '76e83966d1bc84f9a1e30bcaff84b8b8fefbca0f'
+          'ff0fdf0a3005a41acd4b36865056109effc3474b'
+          '30777d42e31cb7fe1f4fadc1e8f4c4d4cdd8ffed'
+          'f6a554eea9557c3c236df2943bb6e7e723945c41'
+          'ccefad65fde3d50331a42b0e90a1539dc7c8b9e4'
+          '01782ce8e10718c1513e3906b126f30f682f5cab'
+          '1d56f47a81350ae37ffbf61ee036fe31f4c5d504'
+          'aad90fce0e12eda41d38571d8eb27c5d5a8c59ec'
+          'f857a4a63fcc604a981e56875edda91767d4f1bf'
+          'fcfc265e3b10294cc4b10949a342e9db4310b186')
+
+prepare() {
+  cd LVM2.${pkgver}
+  # enable lvmetad
+  sed -i 's|use_lvmetad = 0|use_lvmetad = 1|' conf/example.conf.in
+}
+
+build() {
+  cd LVM2.${pkgver}
+  unset LDFLAGS
+
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin \
+    --with-udev-prefix=/usr --with-systemdsystemunitdir=/usr/lib/systemd/system \
+    --with-default-pid-dir=/run --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm \
+    --enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib --enable-applib \
+    --enable-udev_sync --enable-udev_rules --with-default-locking-dir=/run/lock/lvm \
+    --enable-lvmetad --with-thin=internal
+  make
+}
+
+package_device-mapper() {
+  pkgdesc="Device mapper userspace library and tools"
+  url="http://sourceware.org/dm/"
+  depends=('glibc' 'systemd')
+
+  cd LVM2.${pkgver}
+  make DESTDIR="${pkgdir}" install_device-mapper
+  # extra udev rule for device-mapper in initramfs
+  install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/usr/lib/initcpio/udev/11-dm-initramfs.rules"
+  # Install dmeventd socket and service
+  install -D -m644 "${srcdir}/dmeventd.service" "${pkgdir}/usr/lib/systemd/system/dmeventd.service"
+  install -D -m644 "${srcdir}/dmeventd.socket" "${pkgdir}/usr/lib/systemd/system/dmeventd.socket"
+  install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
+  ln -sf /usr/lib/systemd/system/dmeventd.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket"
+}
+
+package_lvm2() {
+  pkgdesc="Logical Volume Manager 2 utilities"
+  depends=('bash' "device-mapper>=${pkgver}" 'systemd' 'readline')
+  conflicts=('lvm' 'mkinitcpio<0.7')
+  backup=('etc/lvm/lvm.conf')
+  options=('!makeflags')
+  optdepends=('thin-provisioning-tools: For thin provisioning support.')
+  install=lvm2.install
+
+  cd LVM2.${pkgver}
+  make DESTDIR="${pkgdir}" install_lvm2
+  # install applib
+  make -C liblvm DESTDIR="${pkgdir}" install
+  # /etc directories
+  install -d "${pkgdir}"/etc/lvm/{archive,backup}
+  # mkinitcpio hook
+  install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/usr/lib/initcpio/hooks/lvm2"
+  install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
+  install -D -m644 "${srcdir}/sd-lvm2" "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
+  # systemd support
+  install -D -m644 "${srcdir}/lvm2.conf" "${pkgdir}/usr/lib/tmpfiles.d/lvm2.conf"
+  install -D -m644 "${srcdir}/lvm-monitoring.service" "${pkgdir}/usr/lib/systemd/system/lvm-monitoring.service"
+  install -D -m644 "${srcdir}/lvmetad.service" "${pkgdir}/usr/lib/systemd/system/lvmetad.service"
+  install -D -m644 "${srcdir}/lvmetad.socket" "${pkgdir}/usr/lib/systemd/system/lvmetad.socket"
+  install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
+  ln -sf /usr/lib/systemd/system/lvmetad.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/lvmetad.socket"
+}

Copied: lvm2/repos/testing-i686/dmeventd.service (from rev 199507, lvm2/trunk/dmeventd.service)
===================================================================
--- testing-i686/dmeventd.service	                        (rev 0)
+++ testing-i686/dmeventd.service	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,14 @@
+[Unit]
+Description=Device-mapper event daemon
+Documentation=man:dmeventd(8)
+Requires=dmeventd.socket
+After=dmeventd.socket
+DefaultDependencies=no
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/dmeventd
+ExecReload=/usr/bin/dmeventd -R
+Environment=SD_ACTIVATION=1
+PIDFile=/run/dmeventd.pid
+OOMScoreAdjust=-1000

Copied: lvm2/repos/testing-i686/dmeventd.socket (from rev 199507, lvm2/trunk/dmeventd.socket)
===================================================================
--- testing-i686/dmeventd.socket	                        (rev 0)
+++ testing-i686/dmeventd.socket	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Device-mapper event daemon FIFOs
+Documentation=man:dmeventd(8)
+Before=sockets.target
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Socket]
+ListenFIFO=/run/dmeventd-server
+ListenFIFO=/run/dmeventd-client
+SocketMode=0600

Copied: lvm2/repos/testing-i686/lvm-monitoring.service (from rev 199507, lvm2/trunk/lvm-monitoring.service)
===================================================================
--- testing-i686/lvm-monitoring.service	                        (rev 0)
+++ testing-i686/lvm-monitoring.service	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,17 @@
+[Unit]
+Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
+Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
+Requires=dmeventd.socket
+After=dmeventd.socket lvmetad.socket
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=oneshot
+Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
+ExecStart=/usr/bin/lvm vgchange --monitor y
+ExecStop=/usr/bin/lvm vgchange --monitor n
+RemainAfterExit=yes
+
+[Install]
+WantedBy=sysinit.target

Copied: lvm2/repos/testing-i686/lvm2.conf (from rev 199507, lvm2/trunk/lvm2.conf)
===================================================================
--- testing-i686/lvm2.conf	                        (rev 0)
+++ testing-i686/lvm2.conf	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,2 @@
+d /run/lock/lvm 0755 root root -
+d /run/lvm 0755 root root -

Copied: lvm2/repos/testing-i686/lvm2.install (from rev 199507, lvm2/trunk/lvm2.install)
===================================================================
--- testing-i686/lvm2.install	                        (rev 0)
+++ testing-i686/lvm2.install	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,16 @@
+post_upgrade() {
+  if [ $(vercmp $2 2.02.98-2) -lt 0 ]; then
+    echo "Changes to the lvm2 package:"
+    echo " + Activating lvm in mkinitcpio now requires both the 'udev' and 'lvm2' hooks."
+    echo " + LVM volumes are automatically activated by udev (full hotplug support)."
+    echo " + You MUST have use_lvmetad = 1 in /etc/lvm/lvm.conf (the default)."
+    echo " + If you uncomment auto_activation_volume_list in /etc/lvm/lvm.conf, only the"
+    echo "   volumes listed there will be activated (default: it is commented out)."
+    if [ -f /etc/lvm/lvm.conf.pacnew ]; then
+        echo "WARNING: /etc/lvm/lvm.conf.pacnew exists. You MUST merge the required changes"
+        echo "         into /etc/lvm/lvm.conf or LVM will fail to work."
+    fi
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Copied: lvm2/repos/testing-i686/lvm2_hook (from rev 199507, lvm2/trunk/lvm2_hook)
===================================================================
--- testing-i686/lvm2_hook	                        (rev 0)
+++ testing-i686/lvm2_hook	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,12 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+    mkdir /run/lvm
+    lvmetad
+}
+
+run_cleanuphook() {
+    kill $(cat /run/lvmetad.pid)
+}
+
+# vim: set ft=sh ts=4 sw=4 et:

Copied: lvm2/repos/testing-i686/lvm2_install (from rev 199507, lvm2/trunk/lvm2_install)
===================================================================
--- testing-i686/lvm2_install	                        (rev 0)
+++ testing-i686/lvm2_install	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,29 @@
+#!/usr/bin/bash
+
+build() {
+    local mod
+    for mod in dm-mod dm-snapshot dm-mirror; do
+        add_module "$mod"
+    done
+
+    add_binary "/usr/bin/lvm"
+    add_binary "/usr/bin/lvmetad"
+    add_binary "/usr/bin/dmsetup"
+    add_file "/usr/lib/udev/rules.d/10-dm.rules"
+    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+    add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+    add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+    add_file "/etc/lvm/lvm.conf"
+
+    add_runscript
+}
+
+help() {
+  cat <<HELPEOF
+This hook enables LVM2 volumes in initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:

Copied: lvm2/repos/testing-i686/lvmetad.service (from rev 199507, lvm2/trunk/lvmetad.service)
===================================================================
--- testing-i686/lvmetad.service	                        (rev 0)
+++ testing-i686/lvmetad.service	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,16 @@
+[Unit]
+Description=LVM2 metadata daemon
+Documentation=man:lvmetad(8)
+Requires=lvmetad.socket
+After=lvmetad.socket
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=forking
+NonBlocking=true
+ExecStart=/usr/bin/lvmetad
+ExecReload=/usr/bin/lvmetad -R
+Environment=SD_ACTIVATION=1
+Restart=on-abort
+PIDFile=/run/lvmetad.pid

Copied: lvm2/repos/testing-i686/lvmetad.socket (from rev 199507, lvm2/trunk/lvmetad.socket)
===================================================================
--- testing-i686/lvmetad.socket	                        (rev 0)
+++ testing-i686/lvmetad.socket	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,10 @@
+[Unit]
+Description=LVM2 metadata daemon socket
+Documentation=man:lvmetad(8)
+Before=sockets.target systemd-udev-trigger.service
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Socket]
+ListenStream=/run/lvm/lvmetad.socket
+SocketMode=0600

Copied: lvm2/repos/testing-i686/sd-lvm2 (from rev 199507, lvm2/trunk/sd-lvm2)
===================================================================
--- testing-i686/sd-lvm2	                        (rev 0)
+++ testing-i686/sd-lvm2	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,31 @@
+#!/usr/bin/bash
+
+build() {
+    local mod
+    for mod in dm-mod dm-snapshot dm-mirror; do
+        add_module "$mod"
+    done
+
+    add_binary "/usr/bin/lvm"
+    add_binary "/usr/bin/lvmetad"
+    add_binary "/usr/bin/dmsetup"
+    add_file "/usr/lib/udev/rules.d/10-dm.rules"
+    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+    add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+    add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+    add_file "/etc/lvm/lvm.conf"
+
+    add_file "/usr/lib/systemd/system/lvmetad.service"
+    add_file "/usr/lib/systemd/system/lvmetad.socket"
+    add_symlink "/usr/lib/systemd/system/sockets.target.wants/lvmetad.socket"
+}
+
+help() {
+  cat <<HELPEOF
+This hook enables LVM2 volumes in systemd-based initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:

Copied: lvm2/repos/testing-x86_64/11-dm-initramfs.rules (from rev 199507, lvm2/trunk/11-dm-initramfs.rules)
===================================================================
--- testing-x86_64/11-dm-initramfs.rules	                        (rev 0)
+++ testing-x86_64/11-dm-initramfs.rules	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,3 @@
+# needed with new udev/mkinitcpio and as implemented in dracut:
+# <http://git.kernel.org/?p=boot/dracut/dracut.git;a=commitdiff;h=12b9736228f2b34c15a9cb63be79cf7b6e865b54>
+SUBSYSTEM=="block", KERNEL=="dm-[0-9]*", ACTION=="add|change", OPTIONS="db_persist"

Copied: lvm2/repos/testing-x86_64/PKGBUILD (from rev 199507, lvm2/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,99 @@
+# $Id$
+# Maintainer: Eric Bélanger <eric at archlinux.org>
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgbase=lvm2
+pkgname=('lvm2' 'device-mapper')
+pkgver=2.02.104
+pkgrel=1
+arch=('i686' 'x86_64')
+url="http://sourceware.org/lvm2/"
+license=('GPL2' 'LGPL2.1')
+makedepends=('systemd' 'thin-provisioning-tools')
+groups=('base')
+source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${pkgver}.tgz{,.asc}
+        lvm2_install
+        lvm2_hook
+        sd-lvm2
+        11-dm-initramfs.rules
+        lvm2.conf
+        dmeventd.service
+        dmeventd.socket
+        lvm-monitoring.service
+        lvmetad.service
+        lvmetad.socket)
+sha1sums=('4c296453e10deafe02004fde40075cdb3792eeb2'
+          'SKIP'
+          '76e83966d1bc84f9a1e30bcaff84b8b8fefbca0f'
+          'ff0fdf0a3005a41acd4b36865056109effc3474b'
+          '30777d42e31cb7fe1f4fadc1e8f4c4d4cdd8ffed'
+          'f6a554eea9557c3c236df2943bb6e7e723945c41'
+          'ccefad65fde3d50331a42b0e90a1539dc7c8b9e4'
+          '01782ce8e10718c1513e3906b126f30f682f5cab'
+          '1d56f47a81350ae37ffbf61ee036fe31f4c5d504'
+          'aad90fce0e12eda41d38571d8eb27c5d5a8c59ec'
+          'f857a4a63fcc604a981e56875edda91767d4f1bf'
+          'fcfc265e3b10294cc4b10949a342e9db4310b186')
+
+prepare() {
+  cd LVM2.${pkgver}
+  # enable lvmetad
+  sed -i 's|use_lvmetad = 0|use_lvmetad = 1|' conf/example.conf.in
+}
+
+build() {
+  cd LVM2.${pkgver}
+  unset LDFLAGS
+
+  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin \
+    --with-udev-prefix=/usr --with-systemdsystemunitdir=/usr/lib/systemd/system \
+    --with-default-pid-dir=/run --with-default-dm-run-dir=/run --with-default-run-dir=/run/lvm \
+    --enable-pkgconfig --enable-readline --enable-dmeventd --enable-cmdlib --enable-applib \
+    --enable-udev_sync --enable-udev_rules --with-default-locking-dir=/run/lock/lvm \
+    --enable-lvmetad --with-thin=internal
+  make
+}
+
+package_device-mapper() {
+  pkgdesc="Device mapper userspace library and tools"
+  url="http://sourceware.org/dm/"
+  depends=('glibc' 'systemd')
+
+  cd LVM2.${pkgver}
+  make DESTDIR="${pkgdir}" install_device-mapper
+  # extra udev rule for device-mapper in initramfs
+  install -D -m644 "${srcdir}/11-dm-initramfs.rules" "${pkgdir}/usr/lib/initcpio/udev/11-dm-initramfs.rules"
+  # Install dmeventd socket and service
+  install -D -m644 "${srcdir}/dmeventd.service" "${pkgdir}/usr/lib/systemd/system/dmeventd.service"
+  install -D -m644 "${srcdir}/dmeventd.socket" "${pkgdir}/usr/lib/systemd/system/dmeventd.socket"
+  install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
+  ln -sf /usr/lib/systemd/system/dmeventd.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/dmeventd.socket"
+}
+
+package_lvm2() {
+  pkgdesc="Logical Volume Manager 2 utilities"
+  depends=('bash' "device-mapper>=${pkgver}" 'systemd' 'readline')
+  conflicts=('lvm' 'mkinitcpio<0.7')
+  backup=('etc/lvm/lvm.conf')
+  options=('!makeflags')
+  optdepends=('thin-provisioning-tools: For thin provisioning support.')
+  install=lvm2.install
+
+  cd LVM2.${pkgver}
+  make DESTDIR="${pkgdir}" install_lvm2
+  # install applib
+  make -C liblvm DESTDIR="${pkgdir}" install
+  # /etc directories
+  install -d "${pkgdir}"/etc/lvm/{archive,backup}
+  # mkinitcpio hook
+  install -D -m644 "${srcdir}/lvm2_hook" "${pkgdir}/usr/lib/initcpio/hooks/lvm2"
+  install -D -m644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
+  install -D -m644 "${srcdir}/sd-lvm2" "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
+  # systemd support
+  install -D -m644 "${srcdir}/lvm2.conf" "${pkgdir}/usr/lib/tmpfiles.d/lvm2.conf"
+  install -D -m644 "${srcdir}/lvm-monitoring.service" "${pkgdir}/usr/lib/systemd/system/lvm-monitoring.service"
+  install -D -m644 "${srcdir}/lvmetad.service" "${pkgdir}/usr/lib/systemd/system/lvmetad.service"
+  install -D -m644 "${srcdir}/lvmetad.socket" "${pkgdir}/usr/lib/systemd/system/lvmetad.socket"
+  install -d -m755 "${pkgdir}/usr/lib/systemd/system/sockets.target.wants"
+  ln -sf /usr/lib/systemd/system/lvmetad.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/lvmetad.socket"
+}

Copied: lvm2/repos/testing-x86_64/dmeventd.service (from rev 199507, lvm2/trunk/dmeventd.service)
===================================================================
--- testing-x86_64/dmeventd.service	                        (rev 0)
+++ testing-x86_64/dmeventd.service	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,14 @@
+[Unit]
+Description=Device-mapper event daemon
+Documentation=man:dmeventd(8)
+Requires=dmeventd.socket
+After=dmeventd.socket
+DefaultDependencies=no
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/dmeventd
+ExecReload=/usr/bin/dmeventd -R
+Environment=SD_ACTIVATION=1
+PIDFile=/run/dmeventd.pid
+OOMScoreAdjust=-1000

Copied: lvm2/repos/testing-x86_64/dmeventd.socket (from rev 199507, lvm2/trunk/dmeventd.socket)
===================================================================
--- testing-x86_64/dmeventd.socket	                        (rev 0)
+++ testing-x86_64/dmeventd.socket	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Device-mapper event daemon FIFOs
+Documentation=man:dmeventd(8)
+Before=sockets.target
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Socket]
+ListenFIFO=/run/dmeventd-server
+ListenFIFO=/run/dmeventd-client
+SocketMode=0600

Copied: lvm2/repos/testing-x86_64/lvm-monitoring.service (from rev 199507, lvm2/trunk/lvm-monitoring.service)
===================================================================
--- testing-x86_64/lvm-monitoring.service	                        (rev 0)
+++ testing-x86_64/lvm-monitoring.service	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,17 @@
+[Unit]
+Description=Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling
+Documentation=man:dmeventd(8) man:lvcreate(8) man:lvchange(8) man:vgchange(8)
+Requires=dmeventd.socket
+After=dmeventd.socket lvmetad.socket
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=oneshot
+Environment=LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
+ExecStart=/usr/bin/lvm vgchange --monitor y
+ExecStop=/usr/bin/lvm vgchange --monitor n
+RemainAfterExit=yes
+
+[Install]
+WantedBy=sysinit.target

Copied: lvm2/repos/testing-x86_64/lvm2.conf (from rev 199507, lvm2/trunk/lvm2.conf)
===================================================================
--- testing-x86_64/lvm2.conf	                        (rev 0)
+++ testing-x86_64/lvm2.conf	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,2 @@
+d /run/lock/lvm 0755 root root -
+d /run/lvm 0755 root root -

Copied: lvm2/repos/testing-x86_64/lvm2.install (from rev 199507, lvm2/trunk/lvm2.install)
===================================================================
--- testing-x86_64/lvm2.install	                        (rev 0)
+++ testing-x86_64/lvm2.install	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,16 @@
+post_upgrade() {
+  if [ $(vercmp $2 2.02.98-2) -lt 0 ]; then
+    echo "Changes to the lvm2 package:"
+    echo " + Activating lvm in mkinitcpio now requires both the 'udev' and 'lvm2' hooks."
+    echo " + LVM volumes are automatically activated by udev (full hotplug support)."
+    echo " + You MUST have use_lvmetad = 1 in /etc/lvm/lvm.conf (the default)."
+    echo " + If you uncomment auto_activation_volume_list in /etc/lvm/lvm.conf, only the"
+    echo "   volumes listed there will be activated (default: it is commented out)."
+    if [ -f /etc/lvm/lvm.conf.pacnew ]; then
+        echo "WARNING: /etc/lvm/lvm.conf.pacnew exists. You MUST merge the required changes"
+        echo "         into /etc/lvm/lvm.conf or LVM will fail to work."
+    fi
+  fi
+}
+
+# vim:set ts=2 sw=2 et:

Copied: lvm2/repos/testing-x86_64/lvm2_hook (from rev 199507, lvm2/trunk/lvm2_hook)
===================================================================
--- testing-x86_64/lvm2_hook	                        (rev 0)
+++ testing-x86_64/lvm2_hook	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,12 @@
+#!/usr/bin/ash
+
+run_earlyhook() {
+    mkdir /run/lvm
+    lvmetad
+}
+
+run_cleanuphook() {
+    kill $(cat /run/lvmetad.pid)
+}
+
+# vim: set ft=sh ts=4 sw=4 et:

Copied: lvm2/repos/testing-x86_64/lvm2_install (from rev 199507, lvm2/trunk/lvm2_install)
===================================================================
--- testing-x86_64/lvm2_install	                        (rev 0)
+++ testing-x86_64/lvm2_install	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,29 @@
+#!/usr/bin/bash
+
+build() {
+    local mod
+    for mod in dm-mod dm-snapshot dm-mirror; do
+        add_module "$mod"
+    done
+
+    add_binary "/usr/bin/lvm"
+    add_binary "/usr/bin/lvmetad"
+    add_binary "/usr/bin/dmsetup"
+    add_file "/usr/lib/udev/rules.d/10-dm.rules"
+    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+    add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+    add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+    add_file "/etc/lvm/lvm.conf"
+
+    add_runscript
+}
+
+help() {
+  cat <<HELPEOF
+This hook enables LVM2 volumes in initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:

Copied: lvm2/repos/testing-x86_64/lvmetad.service (from rev 199507, lvm2/trunk/lvmetad.service)
===================================================================
--- testing-x86_64/lvmetad.service	                        (rev 0)
+++ testing-x86_64/lvmetad.service	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,16 @@
+[Unit]
+Description=LVM2 metadata daemon
+Documentation=man:lvmetad(8)
+Requires=lvmetad.socket
+After=lvmetad.socket
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Service]
+Type=forking
+NonBlocking=true
+ExecStart=/usr/bin/lvmetad
+ExecReload=/usr/bin/lvmetad -R
+Environment=SD_ACTIVATION=1
+Restart=on-abort
+PIDFile=/run/lvmetad.pid

Copied: lvm2/repos/testing-x86_64/lvmetad.socket (from rev 199507, lvm2/trunk/lvmetad.socket)
===================================================================
--- testing-x86_64/lvmetad.socket	                        (rev 0)
+++ testing-x86_64/lvmetad.socket	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,10 @@
+[Unit]
+Description=LVM2 metadata daemon socket
+Documentation=man:lvmetad(8)
+Before=sockets.target systemd-udev-trigger.service
+DefaultDependencies=no
+Conflicts=shutdown.target
+
+[Socket]
+ListenStream=/run/lvm/lvmetad.socket
+SocketMode=0600

Copied: lvm2/repos/testing-x86_64/sd-lvm2 (from rev 199507, lvm2/trunk/sd-lvm2)
===================================================================
--- testing-x86_64/sd-lvm2	                        (rev 0)
+++ testing-x86_64/sd-lvm2	2013-11-13 19:38:17 UTC (rev 199508)
@@ -0,0 +1,31 @@
+#!/usr/bin/bash
+
+build() {
+    local mod
+    for mod in dm-mod dm-snapshot dm-mirror; do
+        add_module "$mod"
+    done
+
+    add_binary "/usr/bin/lvm"
+    add_binary "/usr/bin/lvmetad"
+    add_binary "/usr/bin/dmsetup"
+    add_file "/usr/lib/udev/rules.d/10-dm.rules"
+    add_file "/usr/lib/udev/rules.d/13-dm-disk.rules"
+    add_file "/usr/lib/udev/rules.d/95-dm-notify.rules"
+    add_file "/usr/lib/udev/rules.d/11-dm-lvm.rules"
+    add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+    add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
+    add_file "/etc/lvm/lvm.conf"
+
+    add_file "/usr/lib/systemd/system/lvmetad.service"
+    add_file "/usr/lib/systemd/system/lvmetad.socket"
+    add_symlink "/usr/lib/systemd/system/sockets.target.wants/lvmetad.socket"
+}
+
+help() {
+  cat <<HELPEOF
+This hook enables LVM2 volumes in systemd-based initramfs.
+HELPEOF
+}
+
+# vim: set ft=sh ts=4 sw=4 et:




More information about the arch-commits mailing list