diff options
author | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-05-06 03:44:20 +0000 |
---|---|---|
committer | Nicolás Reynolds <fauno@endefensadelsl.org> | 2014-05-06 03:44:20 +0000 |
commit | 58ee2a8b8164437294a44a627d05ee1c701ced57 (patch) | |
tree | 8b37bc17534883a0f5e7edb57b2a9301d4b41d92 /core/lvm2 | |
parent | d7918d0226da2805ff09c48963d2c79e1327c630 (diff) |
Tue May 6 03:39:24 UTC 2014
Diffstat (limited to 'core/lvm2')
-rw-r--r-- | core/lvm2/PKGBUILD | 68 | ||||
-rw-r--r-- | core/lvm2/dmeventd.service | 14 | ||||
-rw-r--r-- | core/lvm2/dmeventd.socket | 11 | ||||
-rw-r--r-- | core/lvm2/lvm-monitoring.service | 17 | ||||
-rw-r--r-- | core/lvm2/lvm2-fix-pvscan-service.patch | 11 | ||||
-rw-r--r-- | core/lvm2/lvm2-make-sockets-static.patch | 20 | ||||
-rw-r--r-- | core/lvm2/lvm2.conf | 2 | ||||
-rw-r--r-- | core/lvm2/lvm2.install | 9 | ||||
-rw-r--r-- | core/lvm2/lvm2_install | 2 | ||||
-rw-r--r-- | core/lvm2/lvmetad.service | 16 | ||||
-rw-r--r-- | core/lvm2/lvmetad.socket | 10 | ||||
-rw-r--r-- | core/lvm2/sd-lvm2 | 7 |
12 files changed, 82 insertions, 105 deletions
diff --git a/core/lvm2/PKGBUILD b/core/lvm2/PKGBUILD index 0fcd10d11..a4a7c5afe 100644 --- a/core/lvm2/PKGBUILD +++ b/core/lvm2/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 210240 2014-04-12 17:56:22Z thomas $ +# $Id: PKGBUILD 212046 2014-05-05 07:44:24Z thomas $ # Maintainer: Eric Bélanger <eric@archlinux.org> # Maintainer: Thomas Bächler <thomas@archlinux.org> pkgbase=lvm2 pkgname=('lvm2' 'device-mapper') pkgver=2.02.106 -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') url="http://sourceware.org/lvm2/" license=('GPL2' 'LGPL2.1') @@ -16,42 +16,47 @@ source=(ftp://sources.redhat.com/pub/lvm2/LVM2.${pkgver}.tgz{,.asc} lvm2_hook sd-lvm2 11-dm-initramfs.rules - lvm2.conf - dmeventd.service - dmeventd.socket - lvm-monitoring.service - lvmetad.service - lvmetad.socket) + lvm2-fix-pvscan-service.patch + lvm2-make-sockets-static.patch) sha1sums=('0943d1c401675dfdc2118b9ad4fd4d7fb50eaaff' 'SKIP' - '76e83966d1bc84f9a1e30bcaff84b8b8fefbca0f' + 'be3b7db02e76d31d4742dc853b2fa3f898368ff8' 'ff0fdf0a3005a41acd4b36865056109effc3474b' - 'ab1719813fd7e5f5b525b7f38e969d1f855d6083' + '86c18852409dc03f38bdd734ac3e7b54bed9c4ce' 'f6a554eea9557c3c236df2943bb6e7e723945c41' - 'ccefad65fde3d50331a42b0e90a1539dc7c8b9e4' - '01782ce8e10718c1513e3906b126f30f682f5cab' - '1d56f47a81350ae37ffbf61ee036fe31f4c5d504' - 'aad90fce0e12eda41d38571d8eb27c5d5a8c59ec' - 'f857a4a63fcc604a981e56875edda91767d4f1bf' - 'fcfc265e3b10294cc4b10949a342e9db4310b186') + 'ec22d30fed5fb5ec836932b070ee65b34bbe875b' + 'f9e96af741ef6d0b4bb3c302faa5f6b29f9ef04a') prepare() { cd LVM2.${pkgver} # enable lvmetad sed -i 's|use_lvmetad = 0|use_lvmetad = 1|' conf/example.conf.in + # fix pvscan@.service for initramfs + patch -p1 -i "${srcdir}/lvm2-fix-pvscan-service.patch" + # make systemd sockets static + patch -p1 -i "${srcdir}/lvm2-make-sockets-static.patch" } build() { + CONFIGUREOPTS="--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" + + cp -a LVM2.${pkgver} LVM2-initramfs + 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 + ./configure $CONFIGUREOPTS --enable-udev-systemd-background-jobs make + + # Build legacy udev rule for initramfs + cd ../LVM2-initramfs + ./configure $CONFIGUREOPTS --enable-udev-systemd-background-jobs=no + cd udev + make 69-dm-lvm-metad.rules } package_device-mapper() { @@ -64,10 +69,10 @@ package_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" + make DESTDIR="${pkgdir}" install_systemd_units + rm -f "${pkgdir}/usr/lib/systemd/system/"{blk-availability.service,lvm2-*} 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" + ln -sf ../dm-event.socket "${pkgdir}/usr/lib/systemd/system/sockets.target.wants/dm-event.socket" } package_lvm2() { @@ -89,11 +94,12 @@ package_lvm2() { 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" + # extra udev rule for lvmetad in non-systemd initramfs + install -D -m644 "${srcdir}/LVM2-initramfs/udev/69-dm-lvm-metad.rules" "${pkgdir}/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" # 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" + make DESTDIR="${pkgdir}" install_systemd_units + rm -f "${pkgdir}/usr/lib/systemd/system/"dm-* install -d -m755 "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants" - ln -sf /usr/lib/systemd/system/lvmetad.socket "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants/lvmetad.socket" + ln -sf ../lvm2-lvmetad.socket "${pkgdir}/usr/lib/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket" + make DESTDIR="${pkgdir}" install_systemd_generators } diff --git a/core/lvm2/dmeventd.service b/core/lvm2/dmeventd.service deleted file mode 100644 index e0b1b33d0..000000000 --- a/core/lvm2/dmeventd.service +++ /dev/null @@ -1,14 +0,0 @@ -[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 diff --git a/core/lvm2/dmeventd.socket b/core/lvm2/dmeventd.socket deleted file mode 100644 index 726d11236..000000000 --- a/core/lvm2/dmeventd.socket +++ /dev/null @@ -1,11 +0,0 @@ -[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 diff --git a/core/lvm2/lvm-monitoring.service b/core/lvm2/lvm-monitoring.service deleted file mode 100644 index 14b2d1dee..000000000 --- a/core/lvm2/lvm-monitoring.service +++ /dev/null @@ -1,17 +0,0 @@ -[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 diff --git a/core/lvm2/lvm2-fix-pvscan-service.patch b/core/lvm2/lvm2-fix-pvscan-service.patch new file mode 100644 index 000000000..e19e09084 --- /dev/null +++ b/core/lvm2/lvm2-fix-pvscan-service.patch @@ -0,0 +1,11 @@ +diff -Nur LVM2.2.02.106.orig/scripts/lvm2_pvscan_systemd_red_hat@.service.in LVM2.2.02.106/scripts/lvm2_pvscan_systemd_red_hat@.service.in +--- LVM2.2.02.106.orig/scripts/lvm2_pvscan_systemd_red_hat@.service.in 2014-04-10 17:38:46.000000000 +0200 ++++ LVM2.2.02.106/scripts/lvm2_pvscan_systemd_red_hat@.service.in 2014-04-26 14:14:27.472679661 +0200 +@@ -11,5 +11,5 @@ + [Service] + Type=oneshot + RemainAfterExit=yes +-ExecStart=@sbindir@/pvscan --cache --activate ay %i +-ExecStop=@sbindir@/pvscan --cache %i ++ExecStart=@sbindir@/lvm pvscan --cache --activate ay %i ++ExecStop=@sbindir@/lvm pvscan --cache %i diff --git a/core/lvm2/lvm2-make-sockets-static.patch b/core/lvm2/lvm2-make-sockets-static.patch new file mode 100644 index 000000000..7291100a9 --- /dev/null +++ b/core/lvm2/lvm2-make-sockets-static.patch @@ -0,0 +1,20 @@ +diff -Nur LVM2.2.02.106.orig/scripts/dm_event_systemd_red_hat.socket.in LVM2.2.02.106/scripts/dm_event_systemd_red_hat.socket.in +--- LVM2.2.02.106.orig/scripts/dm_event_systemd_red_hat.socket.in 2014-04-10 17:38:46.000000000 +0200 ++++ LVM2.2.02.106/scripts/dm_event_systemd_red_hat.socket.in 2014-04-26 14:21:10.097269315 +0200 +@@ -7,6 +7,3 @@ + ListenFIFO=@DEFAULT_DM_RUN_DIR@/dmeventd-server + ListenFIFO=@DEFAULT_DM_RUN_DIR@/dmeventd-client + SocketMode=0600 +- +-[Install] +-WantedBy=sockets.target +diff -Nur LVM2.2.02.106.orig/scripts/lvm2_lvmetad_systemd_red_hat.socket.in LVM2.2.02.106/scripts/lvm2_lvmetad_systemd_red_hat.socket.in +--- LVM2.2.02.106.orig/scripts/lvm2_lvmetad_systemd_red_hat.socket.in 2014-04-10 17:38:46.000000000 +0200 ++++ LVM2.2.02.106/scripts/lvm2_lvmetad_systemd_red_hat.socket.in 2014-04-26 14:21:15.287156152 +0200 +@@ -6,6 +6,3 @@ + [Socket] + ListenStream=@DEFAULT_RUN_DIR@/lvmetad.socket + SocketMode=0600 +- +-[Install] +-WantedBy=sockets.target diff --git a/core/lvm2/lvm2.conf b/core/lvm2/lvm2.conf deleted file mode 100644 index 129824552..000000000 --- a/core/lvm2/lvm2.conf +++ /dev/null @@ -1,2 +0,0 @@ -d /run/lock/lvm 0755 root root - -d /run/lvm 0755 root root - diff --git a/core/lvm2/lvm2.install b/core/lvm2/lvm2.install index 7faf708d4..e11834d44 100644 --- a/core/lvm2/lvm2.install +++ b/core/lvm2/lvm2.install @@ -11,6 +11,15 @@ post_upgrade() { echo " into /etc/lvm/lvm.conf or LVM will fail to work." fi fi + + if [ $(vercmp $2 2.02.106-2) -lt 0 ]; then + if [ -L /etc/systemd/system/sysinit.target.wants/lvm-monitoring.service ]; then + echo "rm /etc/systemd/system/sysinit.target.wants/lvm-monitoring.service" + rm /etc/systemd/system/sysinit.target.wants/lvm-monitoring.service + echo "ln -s /usr/lib/systemd/system/lvm2-monitor.service /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service" + ln -s /usr/lib/systemd/system/lvm2-monitor.service /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service + fi + fi } # vim:set ts=2 sw=2 et: diff --git a/core/lvm2/lvm2_install b/core/lvm2/lvm2_install index 6f3c1cb41..fd0a51075 100644 --- a/core/lvm2/lvm2_install +++ b/core/lvm2/lvm2_install @@ -13,7 +13,7 @@ build() { 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/69-dm-lvm-metad.rules" "/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" diff --git a/core/lvm2/lvmetad.service b/core/lvm2/lvmetad.service deleted file mode 100644 index 4be520a3b..000000000 --- a/core/lvm2/lvmetad.service +++ /dev/null @@ -1,16 +0,0 @@ -[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 diff --git a/core/lvm2/lvmetad.socket b/core/lvm2/lvmetad.socket deleted file mode 100644 index 9c0ffa5b4..000000000 --- a/core/lvm2/lvmetad.socket +++ /dev/null @@ -1,10 +0,0 @@ -[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 diff --git a/core/lvm2/sd-lvm2 b/core/lvm2/sd-lvm2 index 214b38c8e..e35e40cb6 100644 --- a/core/lvm2/sd-lvm2 +++ b/core/lvm2/sd-lvm2 @@ -17,9 +17,10 @@ build() { 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/sysinit.target.wants/lvmetad.socket" + add_file "/usr/lib/systemd/system/lvm2-lvmetad.service" + add_file "/usr/lib/systemd/system/lvm2-lvmetad.socket" + add_file "/usr/lib/systemd/system/lvm2-pvscan@.service" + add_symlink "/usr/lib/systemd/system/sysinit.target.wants/lvm2-lvmetad.socket" } help() { |