diff --git a/.gitignore b/.gitignore index dcd397d..777a9bb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ /udisks-2.10.0.tar.bz2 /udisks-2.10.1.tar.bz2 /udisks-2.10.90.gitdb54112e.tar.bz2 +/udisks-2.10.90.tar.bz2 diff --git a/plans/env.yaml b/plans/env.yaml index 3fffcf4..3a70499 100644 --- a/plans/env.yaml +++ b/plans/env.yaml @@ -1,2 +1,2 @@ --- - xversion: '2.10.1' + xversion: '2.10.90' diff --git a/plans/udisks2.fmf b/plans/udisks2.fmf index 741099a..07d6f77 100644 --- a/plans/udisks2.fmf +++ b/plans/udisks2.fmf @@ -25,6 +25,7 @@ prepare: - udisks2-lvm2 - nvme-cli - nvmetcli + - vdo discover: how: shell diff --git a/sources b/sources index d435a5c..55741ad 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.10.90.gitdb54112e.tar.bz2) = eef61cd9d57b7275bc21b4a4445706e7d95a105011fa196c6c3058800ea34737d9660d8883bc01fda73cee47555d4bfafe462fd4ad5928611a5356cb5ff37801 +SHA512 (udisks-2.10.90.tar.bz2) = 7e2507ee9b235925af6d367a0d55608f7a2780a07efba9db3c4bc06a3d42728ce74fc9edc42255fc9259aa3426c83eb164e1e99740a2d2c1b80ec2265b51df90 diff --git a/udisks-2.11.0-lvm2-unused_device_detection-try_harder.patch b/udisks-2.11.0-lvm2-unused_device_detection-try_harder.patch new file mode 100644 index 0000000..eac0265 --- /dev/null +++ b/udisks-2.11.0-lvm2-unused_device_detection-try_harder.patch @@ -0,0 +1,33 @@ +From d747e73aaec2c4e2cf124646230159e8b45a5da8 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Tue, 5 Nov 2024 17:01:00 +0100 +Subject: [PATCH] lvm2: Try opening for unused device detection harder + +Though the voluntary BSD locks cannot be used here due to opening +O_EXCL already, let's make several attempts before bailing out. +--- + modules/lvm2/udiskslvm2daemonutil.c | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/modules/lvm2/udiskslvm2daemonutil.c b/modules/lvm2/udiskslvm2daemonutil.c +index b2131f9ca..32736d20f 100644 +--- a/modules/lvm2/udiskslvm2daemonutil.c ++++ b/modules/lvm2/udiskslvm2daemonutil.c +@@ -65,9 +65,16 @@ udisks_daemon_util_lvm2_block_is_unused (UDisksBlock *block, + { + const gchar *device_file; + int fd; ++ gint num_tries = 0; + + device_file = udisks_block_get_device (block); +- fd = open (device_file, O_RDONLY | O_EXCL); ++ ++ while ((fd = open (device_file, O_RDONLY | O_EXCL)) < 0) ++ { ++ g_usleep (100 * 1000); /* microseconds */ ++ if (num_tries++ > 10) ++ break; ++ } + if (fd < 0) + { + g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, diff --git a/udisks2.spec b/udisks2.spec index a388a1c..1933156 100644 --- a/udisks2.spec +++ b/udisks2.spec @@ -4,15 +4,14 @@ %global systemd_version 208 %global dbus_version 1.4.0 %global with_gtk_doc 1 -%global libblockdev_version 3.1.0-7 +%global libblockdev_version 3.2 %define with_btrfs 1 %define with_lsm 1 %define is_fedora 0%{?rhel} == 0 %define is_git %(git show > /dev/null 2>&1 && echo 1 || echo 0) -%define git_hashx %(git log -1 --pretty=format:"%h" || true) -%define git_hash db54112e +%define git_hash %(git log -1 --pretty=format:"%h" || true) %define build_date %(date '+%Y%m%d') # btrfs is not available on RHEL @@ -24,10 +23,13 @@ Name: udisks2 Summary: Disk Manager Version: 2.10.90 -Release: 3.git%{git_hash}%{?dist} +Release: 4%{?dist} License: GPL-2.0-or-later URL: https://github.com/storaged-project/udisks -Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.git%{git_hash}.tar.bz2 +Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 + +# https://issues.redhat.com/browse/RHEL-39935 +Patch0: udisks-2.11.0-lvm2-unused_device_detection-try_harder.patch BuildRequires: make BuildRequires: glib2-devel >= %{glib2_version} @@ -219,6 +221,9 @@ make install DESTDIR=%{buildroot} rm -fr %{buildroot}/%{_datadir}/gtk-doc/html/udisks2 %endif +# not created if lsm is disabled +mkdir -p %{buildroot}%{_sysconfdir}/udisks2/modules.conf.d + find %{buildroot} -name \*.la -o -name \*.a | xargs rm chrpath --delete %{buildroot}/%{_sbindir}/umount.udisks2 @@ -332,6 +337,10 @@ fi %endif %changelog +* Tue Nov 05 2024 Tomas Bzatek - 2.10.90-4 +- Rebase to upstream 2.10.90 (pre-)release +- lvm2: Try opening for unused device detection harder (RHEL-39935) + * Tue Oct 29 2024 Troy Dawson - 2.10.90-3.gitdb54112e - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018