[arch-commits] Commit in lvm2/trunk (PKGBUILD lvm2_hook)
Christian Hesse
eworm at archlinux.org
Wed Jul 13 09:34:31 UTC 2016
Date: Wednesday, July 13, 2016 @ 09:34:31
Author: eworm
Revision: 271827
upgpkg: lvm2 2.02.160-2
* change source url (FS#49381)
* make lvmlocal.conf a backup file (FS#47232)
* for lvm2 hook (non-systemd initramfs) add a late hook with simple loop
to wait for pvscan processes to finish (FS#41833)
Modified:
lvm2/trunk/PKGBUILD
lvm2/trunk/lvm2_hook
-----------+
PKGBUILD | 9 +++++----
lvm2_hook | 13 +++++++++++++
2 files changed, 18 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2016-07-13 07:30:25 UTC (rev 271826)
+++ PKGBUILD 2016-07-13 09:34:31 UTC (rev 271827)
@@ -5,13 +5,13 @@
pkgbase=lvm2
pkgname=('lvm2' 'device-mapper')
pkgver=2.02.160
-pkgrel=1
+pkgrel=2
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}
+source=(ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${pkgver}.tgz{,.asc}
lvm2_install
lvm2_hook
sd-lvm2_install
@@ -20,7 +20,7 @@
sha1sums=('7281dba2a295d13efe854ad06c0baf06c2ae476b'
'SKIP'
'5aedf7b606f6b4bd7a27126854a371e59009eb8c'
- 'ff0fdf0a3005a41acd4b36865056109effc3474b'
+ '81fc438356216abdaead0742555e1719e6ff3127'
'6bf33bd104dcc146b86cb397b1cd904b5ee896f3'
'f6a554eea9557c3c236df2943bb6e7e723945c41'
'b084512af42f2e16cdccd8b7ee4de27b574d1f94')
@@ -78,7 +78,8 @@
pkgdesc="Logical Volume Manager 2 utilities"
depends=('bash' "device-mapper>=${pkgver}" 'systemd' 'readline' 'thin-provisioning-tools')
conflicts=('lvm' 'mkinitcpio<0.7')
- backup=('etc/lvm/lvm.conf')
+ backup=('etc/lvm/lvm.conf'
+ 'etc/lvm/lvmlocal.conf')
options=('!makeflags')
install=lvm2.install
Modified: lvm2_hook
===================================================================
--- lvm2_hook 2016-07-13 07:30:25 UTC (rev 271826)
+++ lvm2_hook 2016-07-13 09:34:31 UTC (rev 271827)
@@ -5,6 +5,19 @@
lvmetad
}
+# We are suffering a race condition in non-systemd initramfs: If lvmetad is
+# killed before pvscan processes finish we have stale processes and
+# uninitialized physical volumes. So wait for pvscan processes to finish.
+# Break after 10 seconds (50*0.2s) to avaid infinite loop.
+run_latehook() {
+ local i=50
+
+ while pgrep -f pvscan >/dev/null 2>/dev/null && [ $i -gt 0 ]; do
+ sleep 0.2
+ i=$((i - 1))
+ done
+}
+
run_cleanuphook() {
kill $(cat /run/lvmetad.pid)
}
More information about the arch-commits
mailing list