From 5b80f2920257f23a675e5bfccdd54df4684ef2fc Mon Sep 17 00:00:00 2001 From: liupei Date: Wed, 28 Feb 2024 10:17:32 +0800 Subject: [PATCH] The code that was modified last time based on an incorrect version needs to be rolled back --- drbd-utils-9.21.4-fix-bug-no-such-file.patch | 21 -------------------- drbd.spec | 8 +------- 2 files changed, 1 insertion(+), 28 deletions(-) delete mode 100644 drbd-utils-9.21.4-fix-bug-no-such-file.patch diff --git a/drbd-utils-9.21.4-fix-bug-no-such-file.patch b/drbd-utils-9.21.4-fix-bug-no-such-file.patch deleted file mode 100644 index 3478199..0000000 --- a/drbd-utils-9.21.4-fix-bug-no-such-file.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- drbd-utils-9.21.4-ori/scripts/drbd 2024-02-22 15:12:35.464103000 +0800 -+++ drbd-utils-9.21.4/scripts/drbd 2024-02-22 15:47:10.763928000 +0800 -@@ -149,9 +149,15 @@ - local line dev file loop_mapping - - # new location -- loop_mapping=/var/lib/linstor.d/loop_device_mapping -- # fallback to old location -- [ -f "$loop_mapping" ] || loop_mapping=/var/lib/linstor/loop_device_mapping -+ if [ -f /var/lib/linstor.d/loop_device_mapping ]; then -+ loop_mapping=/var/lib/linstor.d/loop_device_mapping -+ # old location -+ elif [ -f /var/lib/linstor/loop_device_mapping ]; then -+ loop_mapping=/var/lib/linstor/loop_device_mapping -+ else -+ # nothing to do. -+ return 0 -+ fi - - # || [[ -n $line ]]: in case there is no newline at EOF - while read -r line || [[ -n $line ]] ; do diff --git a/drbd.spec b/drbd.spec index 504fa1f..f5fc3f9 100644 --- a/drbd.spec +++ b/drbd.spec @@ -1,12 +1,10 @@ Name: drbd Summary: DRBD user-land tools and scripts Version: 9.21.4 -Release: 2 +Release: 1 Source0: http://www.linbit.com/downloads/%{name}/utils/%{name}-utils-%{version}.tar.gz Patch0: drbd-utils-9.12.2-disable_xsltproc_network_read.patch Patch1: drbd-utils-9.15.0-make_configure-workaround.patch -# https://github.com/LINBIT/drbd-utils/commit/0a825f1c859000b2143907b43a191e6dedb633f8 -Patch2: drbd-utils-9.21.4-fix-bug-no-such-file.patch License: GPLv2+ and MIT ExclusiveOS: linux @@ -42,7 +40,6 @@ This is a virtual package, installing the full user-land suite. # Don't let xsltproc make network calls during build %patch0 -p1 %patch1 -p1 -%patch2 -p1 %build %configure \ @@ -217,9 +214,6 @@ management utility. %systemd_preun drbd.service %changelog -* Thu Feb 22 2024 liupei - 9.21.4-2 -- Update scripts/drbd to fix "no such file" bug - * Mon Nov 27 2023 liupei - 9.21.4-1 - update to 9.21.4 -- Gitee