diff --git a/SOURCES/lvm2-2_03_12-fsadm-avoid-access-to-unbound-variable.patch b/SOURCES/lvm2-2_03_12-fsadm-avoid-access-to-unbound-variable.patch new file mode 100644 index 0000000..6beff68 --- /dev/null +++ b/SOURCES/lvm2-2_03_12-fsadm-avoid-access-to-unbound-variable.patch @@ -0,0 +1,16 @@ + scripts/fsadm.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh +index 2cb1fc7..4f59cee 100755 +--- a/scripts/fsadm.sh ++++ b/scripts/fsadm.sh +@@ -163,7 +163,7 @@ cleanup() { + _FSADM_EXTOFF=$EXTOFF + export _FSADM_YES _FSADM_EXTOFF + unset FSADM_RUNNING +- test -n "$LVM_BINARY" && PATH=$_SAVEPATH ++ test -n "${LVM_BINARY-}" && PATH=$_SAVEPATH + dry exec "$LVM" lvresize $VERB $FORCE -r -L"${NEWSIZE_ORIG}b" "$VOLUME_ORIG" + fi + diff --git a/SOURCES/lvm2-2_03_12-man-Fix-wording-in-lvmthin-7.patch b/SOURCES/lvm2-2_03_12-man-Fix-wording-in-lvmthin-7.patch new file mode 100644 index 0000000..09088d5 --- /dev/null +++ b/SOURCES/lvm2-2_03_12-man-Fix-wording-in-lvmthin-7.patch @@ -0,0 +1,22 @@ + man/lvmthin.7_main | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/man/lvmthin.7_main b/man/lvmthin.7_main +index 3ce34a5..9568eca 100644 +--- a/man/lvmthin.7_main ++++ b/man/lvmthin.7_main +@@ -443,12 +443,12 @@ If the repair works, the thin pool LV and its thin LVs can be activated. + User should manually check if repaired thin pool kernel metadata + has all data for all lvm2 known LVs by individual activation of + every thin LV. When all works, user should continue with fsck of +-all filesystems present these such volumes. ++all filesystems present on these volumes. + Once the thin pool is considered fully functional user may remove ThinPoolLV_metaN + (the LV containing the damaged thin pool metadata) for possible + space reuse. + For a better performance it may be useful to pvmove the new repaired metadata LV +-(written to previous pmspare volume) to a better PV (i.e. SSD) ++(written to previous pmspare volume) to a faster PV, e.g. SSD. + + If the repair operation fails, the thin pool LV and its thin LVs + are not accessible and it may be necessary to restore their content diff --git a/SOURCES/lvm2-2_03_12-tests-remove-local-setting-of-LVM_BINARY.patch b/SOURCES/lvm2-2_03_12-tests-remove-local-setting-of-LVM_BINARY.patch new file mode 100644 index 0000000..71f6272 --- /dev/null +++ b/SOURCES/lvm2-2_03_12-tests-remove-local-setting-of-LVM_BINARY.patch @@ -0,0 +1,61 @@ + test/shell/fsadm-crypt.sh | 3 --- + test/shell/fsadm-renamed.sh | 3 --- + test/shell/fsadm.sh | 3 --- + test/shell/lvresize-full.sh | 2 -- + 4 files changed, 11 deletions(-) + +diff --git a/test/shell/fsadm-crypt.sh b/test/shell/fsadm-crypt.sh +index 4b8fc4e..2004db9 100644 +--- a/test/shell/fsadm-crypt.sh ++++ b/test/shell/fsadm-crypt.sh +@@ -76,9 +76,6 @@ dev_vg_lv="$DM_DEV_DIR/$vg_lv" + dev_vg_lv2="$DM_DEV_DIR/$vg_lv2" + dev_vg_lv3="$DM_DEV_DIR/$vg_lv3" + mount_dir="mnt" +-# for recursive call +-LVM_BINARY=$(which lvm) +-export LVM_BINARY + + test ! -d "$mount_dir" && mkdir "$mount_dir" + +diff --git a/test/shell/fsadm-renamed.sh b/test/shell/fsadm-renamed.sh +index 3218939..50c6d3e 100644 +--- a/test/shell/fsadm-renamed.sh ++++ b/test/shell/fsadm-renamed.sh +@@ -27,9 +27,6 @@ dev_vg_lv_ren="$DM_DEV_DIR/$vg_lv_ren" + mount_dir="mnt" + mount_space_dir="mnt space dir" + mount_dolar_dir="mnt \$SPACE dir" +-# for recursive call +-LVM_BINARY=$(which lvm) +-export LVM_BINARY + + test ! -d "$mount_dir" && mkdir "$mount_dir" + test ! -d "$mount_space_dir" && mkdir "$mount_space_dir" +diff --git a/test/shell/fsadm.sh b/test/shell/fsadm.sh +index 67f9660..987b1a1 100644 +--- a/test/shell/fsadm.sh ++++ b/test/shell/fsadm.sh +@@ -45,9 +45,6 @@ dev_vg_lv="$DM_DEV_DIR/$vg_lv" + dev_vg_lv2="$DM_DEV_DIR/$vg_lv2" + mount_dir="mnt" + mount_space_dir="mnt space dir" +-# for recursive call +-LVM_BINARY=$(which lvm) +-export LVM_BINARY + + test ! -d "$mount_dir" && mkdir "$mount_dir" + test ! -d "$mount_space_dir" && mkdir "$mount_space_dir" +diff --git a/test/shell/lvresize-full.sh b/test/shell/lvresize-full.sh +index 3cab522..dcf93a7 100644 +--- a/test/shell/lvresize-full.sh ++++ b/test/shell/lvresize-full.sh +@@ -21,8 +21,6 @@ SKIP_WITH_LVMPOLLD=1 + FSCK=${FSCK-fsck} + MKFS=${MKFS-mkfs.ext3} + RESIZEFS=${RESIZEFS-resize2fs} +-LVM_BINARY=$(which lvm) +-export LVM_BINARY + + which $FSCK || skip + which $MKFS || skip diff --git a/SPECS/lvm2.spec b/SPECS/lvm2.spec index 04ee8b3..3262fe8 100644 --- a/SPECS/lvm2.spec +++ b/SPECS/lvm2.spec @@ -57,7 +57,7 @@ Name: lvm2 Epoch: %{rhel} %endif Version: 2.03.11 -Release: 4%{?dist} +Release: 5%{?dist} License: GPLv2 URL: http://sourceware.org/lvm2 Source0: ftp://sourceware.org/pub/lvm2/releases/LVM2.%{version}.tgz @@ -94,6 +94,10 @@ Patch21: lvm2-2_03_12-test-check-read_only_volume_list-tagging-works.patch Patch22: lvm2-2_03_12-filter-mpath-work-with-nvme-devices.patch # BZ 1925871: Patch23: lvm2-2_03_12-dev_get_primary_dev-fix-invalid-path-check.patch +# BZ 1931893: +Patch24: lvm2-2_03_12-fsadm-avoid-access-to-unbound-variable.patch +Patch25: lvm2-2_03_12-tests-remove-local-setting-of-LVM_BINARY.patch +Patch26: lvm2-2_03_12-man-Fix-wording-in-lvmthin-7.patch BuildRequires: gcc %if %{enable_testsuite} @@ -173,6 +177,9 @@ or more physical volumes and creating one or more logical volumes %patch21 -p1 -b .backup21 %patch22 -p1 -b .backup22 %patch23 -p1 -b .backup23 +%patch24 -p1 -b .backup24 +%patch25 -p1 -b .backup25 +%patch26 -p1 -b .backup26 %build %global _default_pid_dir /run @@ -777,6 +784,9 @@ An extensive functional testsuite for LVM2. %endif %changelog +* Thu Feb 11 2021 Marian Csontos - 2.03.11-5 +- Fix fsadm failure due to accessing unbound variable. + * Thu Feb 11 2021 Marian Csontos - 2.03.11-4 - Fix "Failed to get primary device" for NVMe devices.