[arch-commits] Commit in lvm2/trunk (4 files)
Christian Hesse
eworm at gemini.archlinux.org
Mon Oct 25 21:41:46 UTC 2021
Date: Monday, October 25, 2021 @ 21:41:45
Author: eworm
Revision: 426580
upgpkg: lvm2 2.03.14-1: new upstream release
Added:
lvm2/trunk/0001-udev-initcpio.patch
Modified:
lvm2/trunk/PKGBUILD
lvm2/trunk/lvm2_install
Deleted:
lvm2/trunk/0001-pvscan-wait-for-udevd.patch
----------------------------------+
0001-pvscan-wait-for-udevd.patch | 28 -------------
0001-udev-initcpio.patch | 38 ++++++++++++++++++
PKGBUILD | 75 ++++++++++++++++---------------------
lvm2_install | 48 ++++++++++-------------
4 files changed, 92 insertions(+), 97 deletions(-)
Deleted: 0001-pvscan-wait-for-udevd.patch
===================================================================
--- 0001-pvscan-wait-for-udevd.patch 2021-10-25 20:39:46 UTC (rev 426579)
+++ 0001-pvscan-wait-for-udevd.patch 2021-10-25 21:41:45 UTC (rev 426580)
@@ -1,28 +0,0 @@
-From 675d59e9e17a55f11699471896fd6f417ea1e07b Mon Sep 17 00:00:00 2001
-From: Christian Hesse <mail at eworm.de>
-Date: Thu, 11 Feb 2021 12:01:48 +0100
-Subject: [PATCH 1/1] pvscan: wait for udevd
-
-Running the scan before udevd finished startup may result in failure.
-This has been reported for Arch Linux [0] and proper ordering fixes
-the issue.
-
-[0] https://bugs.archlinux.org/task/69611
-
-Signed-off-by: Christian Hesse <mail at eworm.de>
----
- scripts/lvm2-pvscan.service.in | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/scripts/lvm2-pvscan.service.in b/scripts/lvm2-pvscan.service.in
-index 09753e8c9..7b4ace551 100644
---- a/scripts/lvm2-pvscan.service.in
-+++ b/scripts/lvm2-pvscan.service.in
-@@ -4,6 +4,7 @@ Documentation=man:pvscan(8)
- DefaultDependencies=no
- StartLimitIntervalSec=0
- BindsTo=dev-block-%i.device
-+After=systemd-udevd.service
- Before=shutdown.target
- Conflicts=shutdown.target
-
Added: 0001-udev-initcpio.patch
===================================================================
--- 0001-udev-initcpio.patch (rev 0)
+++ 0001-udev-initcpio.patch 2021-10-25 21:41:45 UTC (rev 426580)
@@ -0,0 +1,38 @@
+diff --git a/udev/69-dm-lvm-initcpio.rules.in b/udev/69-dm-lvm-initcpio.rules.in
+--- a/udev/69-dm-lvm-initcpio.rules.in
++++ b/udev/69-dm-lvm-initcpio.rules.in
+@@ -54,33 +54,7 @@ ACTION!="add", GOTO="lvm_end"
+
+ LABEL="lvm_scan"
+
+-ENV{SYSTEMD_READY}="1"
+-
+-# pvscan will check if this device completes a VG,
+-# i.e. all PVs in the VG are now present with the
+-# arrival of this PV. If so, it prints to stdout:
+-# LVM_VG_NAME_COMPLETE='foo'
+-#
+-# When the VG is complete it can be activated, so
+-# vgchange -aay <vgname> is run. It is run via
+-# systemd since it can take longer to run than
+-# udev wants to block when processing rules.
+-# (if there are hundreds of LVs to activate,
+-# the vgchange can take many seconds.)
+-#
+-# pvscan only reads the single device specified,
+-# and uses temp files under /run/lvm to check if
+-# other PVs in the VG are present.
+-#
+-# If event_activation=0 in lvm.conf, this pvscan
+-# (using checkcomplete) will do nothing, so that
+-# no event-based autoactivation will be happen.
+-#
+-# TODO: adjust the output of vgchange -aay so that
+-# it's better suited to appearing in the journal.
+-
+-IMPORT{program}="(LVM_EXEC)/lvm pvscan --cache --listvg --checkcomplete --vgonline --udevoutput --journal=output $env{DEVNAME}"
+-ENV{LVM_VG_NAME_COMPLETE}=="?*", RUN+="/usr/bin/systemd-run -r --no-block --property DefaultDependencies=no --unit lvm-activate-$env{LVM_VG_NAME_COMPLETE} (LVM_EXEC)/lvm vgchange -aay --nohints $env{LVM_VG_NAME_COMPLETE}"
++RUN+="(LVM_EXEC)/lvm pvscan --background --cache --activate ay --major $major --minor $minor", ENV{LVM_SCANNED}="1"
+ GOTO="lvm_end"
+
+ LABEL="lvm_end"
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-10-25 20:39:46 UTC (rev 426579)
+++ PKGBUILD 2021-10-25 21:41:45 UTC (rev 426580)
@@ -3,8 +3,8 @@
pkgbase=lvm2
pkgname=('lvm2' 'device-mapper')
-_tag='91a82455813bebce0949cb681369f370ce3105d5' # git rev-parse v${pkgver//./_}
-pkgver=2.03.13
+_tag='1d0d96a8fe7f7268d1a22e33237f6ff55f96f5cb' # git rev-parse v${pkgver//./_}
+pkgver=2.03.14
pkgrel=1
arch=('x86_64')
url='https://sourceware.org/lvm2/'
@@ -13,22 +13,22 @@
validpgpkeys=('88437EF5C077BD113D3B7224228191C1567E2C17' # Alasdair G Kergon <agk at redhat.com>
'D501A478440AE2FD130A1BE8B9112431E509039F') # Marian Csontos <marian.csontos at gmail.com>
source=("git+https://sourceware.org/git/lvm2.git#tag=${_tag}?signed"
- '0001-pvscan-wait-for-udevd.patch'
+ '0001-udev-initcpio.patch'
'lvm2_install'
'11-dm-initramfs.rules')
sha256sums=('SKIP'
- '69976608c4e8217f504c4ce964ab21cea722134cd9b3d0109283b3e2f3a33fbe'
- '1c06b4f9ea244b6d0824ab1ad8cc0336047238e33b6d14b61b8447e6f2243615'
+ 'db540799e8810c0976b354792074b4956693df985564aa1ae37bc60414b22cf1'
+ '00228d69679d5db15860bdf6b92746a146d0952f0d1bd27c74886ce6f22bf216'
'e10f24b57582d6e2da71f7c80732a62e0ee2e3b867fe84591ccdb53e80fa92e0')
_backports=(
+ # The path is known anyway and should be the bullet proof option.
+ '221e75316f472fbf5eb2ad206b861ea255c099ed'
)
prepare() {
cd lvm2/
- patch -Np1 < ../0001-pvscan-wait-for-udevd.patch
-
local _c
for _c in "${_backports[@]}"; do
git log --oneline -1 "${_c}"
@@ -35,6 +35,10 @@
git show "${_c}" -- ':(exclude)WHATS_NEW' | git apply
done
+ # prepare for non-systemd initcpio
+ cp udev/69-dm-lvm.rules.in udev/69-dm-lvm-initcpio.rules.in
+ patch -Np1 < ../0001-udev-initcpio.patch
+
# remove install section from systemd units that are enabled by default
sed -i -e '/^\[Install\]$/,$d' \
scripts/dm_event_systemd_red_hat.socket.in \
@@ -43,50 +47,37 @@
}
build() {
- local _CONFIGUREOPTS=(
- CONFIG_SHELL=/bin/bash
- --prefix=/usr
- --sbindir=/usr/bin
- --sysconfdir=/etc
- --localstatedir=/var
- --enable-cmdlib
- --enable-dmeventd
- --enable-lvmpolld
- --enable-pkgconfig
- --enable-readline
- --enable-udev_rules
- --enable-udev_sync
- --with-cache=internal
- --with-default-dm-run-dir=/run
- --with-default-locking-dir=/run/lock/lvm
- --with-default-pid-dir=/run
- --with-default-run-dir=/run/lvm
- --with-systemdsystemunitdir=/usr/lib/systemd/system
- --with-thin=internal
- --with-udev-prefix=/usr
- )
-
# build system requires bash:
# https://www.redhat.com/archives/linux-lvm/2020-January/msg00004.html
# https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Defining-Variables.html
export CONFIG_SHELL=/bin/bash
- cp -a lvm2/ lvm2-initramfs/
-
cd lvm2/
./configure \
- "${_CONFIGUREOPTS[@]}" \
- --enable-udev-systemd-background-jobs
+ CONFIG_SHELL=/bin/bash \
+ --prefix=/usr \
+ --sbindir=/usr/bin \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --enable-cmdlib \
+ --enable-dmeventd \
+ --enable-lvmpolld \
+ --enable-pkgconfig \
+ --enable-readline \
+ --enable-udev_rules \
+ --enable-udev_sync \
+ --with-cache=internal \
+ --with-default-dm-run-dir=/run \
+ --with-default-locking-dir=/run/lock/lvm \
+ --with-default-pid-dir=/run \
+ --with-default-run-dir=/run/lvm \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system \
+ --with-thin=internal \
+ --with-udev-prefix=/usr
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
+ make -C udev/ 69-dm-lvm-initcpio.rules
}
package_device-mapper() {
@@ -127,7 +118,7 @@
install -D -m0644 "${srcdir}/lvm2_install" "${pkgdir}/usr/lib/initcpio/install/lvm2"
ln -s /usr/lib/initcpio/install/lvm2 "${pkgdir}/usr/lib/initcpio/install/sd-lvm2"
# extra udev rule for non-systemd initramfs
- install -D -m0644 "${srcdir}/lvm2-initramfs/udev/69-dm-lvm-metad.rules" "${pkgdir}/usr/lib/initcpio/udev/69-dm-lvm-metad.rules"
+ install -D -m0644 udev/69-dm-lvm-initcpio.rules "${pkgdir}/usr/lib/initcpio/udev/69-dm-lvm.rules"
# systemd support
make DESTDIR="${pkgdir}" install_systemd_units
rm -f "${pkgdir}/usr/lib/systemd/system/"dm-*
Modified: lvm2_install
===================================================================
--- lvm2_install 2021-10-25 20:39:46 UTC (rev 426579)
+++ lvm2_install 2021-10-25 21:41:45 UTC (rev 426580)
@@ -1,47 +1,41 @@
#!/usr/bin/bash
build() {
- local mod
local symlink
# device mapper modules
- for mod in dm-mod dm-snapshot dm-mirror dm-cache dm-cache-smq dm-thin-pool; do
- add_module "$mod"
- done
+ map add_module \
+ 'dm-mod' \
+ 'dm-snapshot' \
+ 'dm-mirror' \
+ 'dm-cache' \
+ 'dm-cache-smq' \
+ 'dm-thin-pool'
- if command -v add_systemd_unit >/dev/null; then
- # device mapper and lvm2 systemd units
- # binaries and libraries are pull automatically, except ...
- add_systemd_unit "lvm2-pvscan at .service"
- fi
-
- # binaries from lvm2
- add_binary "lvm"
-
- # beinaries from device-mapper
- add_binary "dmsetup"
-
# from thin-provisioning-tools
- add_binary "pdata_tools"
+ add_binary 'pdata_tools'
for symlink in cache_{check,dump,metadata_size,repair,restore} thin_{check,delta,dump,ls,metadata_size,repair,restore,rmap,trim}; do
- add_symlink "/usr/bin/${symlink}" "pdata_tools"
+ add_symlink "/usr/bin/${symlink}" 'pdata_tools'
done
# udev rules and lvm configuration
- add_file "/usr/lib/udev/rules.d/10-dm.rules"
- add_file "/usr/lib/udev/rules.d/11-dm-lvm.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/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules"
- add_file "/etc/lvm/lvm.conf"
- sed -i '/^\smonitoring =/s/1/0/' "${BUILDROOT}/etc/lvm/lvm.conf"
+ map add_udev_rule \
+ '10-dm.rules' \
+ '11-dm-lvm.rules' \
+ '13-dm-disk.rules' \
+ '95-dm-notify.rules' \
+ '/usr/lib/initcpio/udev/11-dm-initramfs.rules'
# this udev rule is specific for systemd and non-systemd systems
if command -v add_systemd_unit >/dev/null; then
- add_file "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+ add_udev_rule '69-dm-lvm.rules'
else
- add_file "/usr/lib/initcpio/udev/69-dm-lvm-metad.rules" "/usr/lib/udev/rules.d/69-dm-lvm-metad.rules"
+ add_udev_rule '/usr/lib/initcpio/udev/69-dm-lvm.rules'
fi
+
+ # config file
+ add_file '/etc/lvm/lvm.conf'
+ sed -i '/^\smonitoring =/s/1/0/' "${BUILDROOT}/etc/lvm/lvm.conf"
}
help() {
More information about the arch-commits
mailing list