From 0f111f7ed6b69cf1ad6182de30a0e53d76a899d0 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 03 2020 12:04:31 +0000 Subject: import udisks2-2.9.0-3.el8 --- diff --git a/.gitignore b/.gitignore index 282adc9..038ce06 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/udisks-2.8.3.tar.bz2 +SOURCES/udisks-2.9.0.tar.bz2 diff --git a/.udisks2.metadata b/.udisks2.metadata index 1345bc1..0758963 100644 --- a/.udisks2.metadata +++ b/.udisks2.metadata @@ -1 +1 @@ -47a9d8bc386271bbbb8d77999e0a0c8bb8e38f84 SOURCES/udisks-2.8.3.tar.bz2 +1565118b5a2d05b1b9b9c71ad3f0043ae0ee6897 SOURCES/udisks-2.9.0.tar.bz2 diff --git a/SOURCES/0001-tests-Reflect-new-location-of-D-Bus-service-files.patch b/SOURCES/0001-tests-Reflect-new-location-of-D-Bus-service-files.patch deleted file mode 100644 index dfcbaa8..0000000 --- a/SOURCES/0001-tests-Reflect-new-location-of-D-Bus-service-files.patch +++ /dev/null @@ -1,70 +0,0 @@ -From ffa52f4c674477795a756bbe5983b5a20929ce94 Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Fri, 14 Jun 2019 16:03:49 +0200 -Subject: [PATCH 1/2] tests: Reflect new location of D-Bus service files - -Related to the following change: - - commit f9d9b4e89915fdc87f8d9b56269def24f709b2da - Author: Michael Biebl - Date: Tue Nov 27 00:48:15 2018 +0100 - - Move D-Bus policy file to /usr/share/dbus-1/system.d/ - - To better support stateless systems with an empty /etc, the old location - in /etc/dbus-1/system.d/ should only be used for local admin changes. - Package provided D-Bus policy files are supposed to be installed in - /usr/share/dbus-1/system.d/. - - This is supported since dbus 1.9.18. - - https://lists.freedesktop.org/archives/dbus/2015-July/016746.html ---- - README.md | 2 +- - src/tests/dbus-tests/run_tests.py | 2 +- - src/tests/install-udisks/runtest.sh | 2 +- - src/tests/integration-test | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/README.md b/README.md -index b4fa385c..cf2207cf 100644 ---- a/README.md -+++ b/README.md -@@ -88,7 +88,7 @@ Please report bugs via the GitHub's issues tracker at - sudo cp data/*.policy /usr/share/polkit-1/actions/ - sudo cp modules/*/data/*.policy /usr/share/polkit-1/actions/ - -- sudo cp data/org.freedesktop.UDisks2.conf /etc/dbus-1/system.d/ -+ sudo cp data/org.freedesktop.UDisks2.conf /usr/share/dbus-1/system.d/ - - sudo cp data/80-udisks2.rules /usr/lib/udev/rules.d/ - ``` -diff --git a/src/tests/dbus-tests/run_tests.py b/src/tests/dbus-tests/run_tests.py -index e730346a..3dc3c631 100755 ---- a/src/tests/dbus-tests/run_tests.py -+++ b/src/tests/dbus-tests/run_tests.py -@@ -96,7 +96,7 @@ def install_config_files(projdir, tmpdir): - - # dbus config files - copied.extend(_copy_files((os.path.join(projdir, 'data/org.freedesktop.UDisks2.conf'),), -- '/etc/dbus-1/system.d/', tmpdir)) -+ '/usr/share/dbus-1/system.d/', tmpdir)) - - # polkit policies - policies = glob.glob(projdir + '/data/*.policy') + glob.glob(projdir + '/modules/*/data/*.policy') -diff --git a/src/tests/integration-test b/src/tests/integration-test -index 19087bbc..2bc78a2b 100755 ---- a/src/tests/integration-test -+++ b/src/tests/integration-test -@@ -1866,7 +1866,7 @@ def install_config_files(projdir, tmpdir): - - # dbus config files - copied.extend(_copy_files((os.path.join(projdir, 'data/org.freedesktop.UDisks2.conf'),), -- '/etc/dbus-1/system.d/', tmpdir)) -+ '/usr/share/dbus-1/system.d/', tmpdir)) - - # polkit policies - policies = glob(projdir + '/data/*.policy') + glob(projdir + '/modules/*/data/*.policy') --- -2.21.0 - diff --git a/SOURCES/0001-udiskslinuxpartition-Fix-potential-NULL-dereference.patch b/SOURCES/0001-udiskslinuxpartition-Fix-potential-NULL-dereference.patch deleted file mode 100644 index 7f931df..0000000 --- a/SOURCES/0001-udiskslinuxpartition-Fix-potential-NULL-dereference.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 9c87ed1f7a5daab0864b22be89ff58ffde51b5af Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Fri, 14 Jun 2019 17:11:16 +0200 -Subject: [PATCH] udiskslinuxpartition: Fix potential NULL dereference - ---- - src/udiskslinuxpartition.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c -index c29cf0fa..d00e6519 100644 ---- a/src/udiskslinuxpartition.c -+++ b/src/udiskslinuxpartition.c -@@ -198,7 +198,7 @@ static void update_partitions_list (UDisksObject *disk_object, - /* this partition is already in the property */ - goto out; - -- num_parts = g_strv_length (partitions); -+ num_parts = partitions ? g_strv_length (partitions) : 0; - partitions = g_realloc (partitions, (num_parts + 2) * sizeof (gchar *)); - partitions[num_parts] = g_strdup (object_path); - partitions[num_parts + 1] = NULL; --- -2.21.0 - diff --git a/SOURCES/0002-integration-test-Do-not-copy-config-files-when-testi.patch b/SOURCES/0002-integration-test-Do-not-copy-config-files-when-testi.patch deleted file mode 100644 index eb6cbfd..0000000 --- a/SOURCES/0002-integration-test-Do-not-copy-config-files-when-testi.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 6e4fdd7d353b9171d164dcee2ec434a1b55c7e27 Mon Sep 17 00:00:00 2001 -From: Tomas Bzatek -Date: Fri, 14 Jun 2019 16:36:34 +0200 -Subject: [PATCH 2/2] integration-test: Do not copy config files when testing - system instance - ---- - src/tests/integration-test | 15 +++++++-------- - 1 file changed, 7 insertions(+), 8 deletions(-) - -diff --git a/src/tests/integration-test b/src/tests/integration-test -index 2bc78a2b..4652a8c2 100755 ---- a/src/tests/integration-test -+++ b/src/tests/integration-test -@@ -129,6 +129,13 @@ class UDisksTestCase(unittest.TestCase): - if (os.access(cls.daemon_path, os.X_OK)): - print('Testing binaries from local build tree') - cls.check_build_tree_config() -+ # copy required system files -+ testdir = os.path.abspath(os.path.dirname(__file__)) -+ projdir = os.path.abspath(os.path.normpath(os.path.join(testdir, '..', '..'))) -+ tmpdir = tempfile.mkdtemp(prefix='udisks-tst-') -+ atexit.register(shutil.rmtree, tmpdir) -+ files_to_restore = install_config_files(projdir, tmpdir) -+ atexit.register(restore_files, files_to_restore, tmpdir) - else: - print('Testing installed system binaries') - cls.daemon_path = None -@@ -1899,14 +1906,6 @@ if __name__ == '__main__': - help='name of test class or method (e. g. "Drive", "FS.test_ext2")') - cli_args = argparser.parse_args() - -- testdir = os.path.abspath(os.path.dirname(__file__)) -- projdir = os.path.abspath(os.path.normpath(os.path.join(testdir, '..', '..'))) -- tmpdir = tempfile.mkdtemp(prefix='udisks-tst-') -- atexit.register(shutil.rmtree, tmpdir) -- -- files_to_restore = install_config_files(projdir, tmpdir) -- atexit.register(restore_files, files_to_restore, tmpdir) -- - UDisksTestCase.init(logfile=cli_args.logfile) - if cli_args.testname: - tests = unittest.TestLoader().loadTestsFromNames( --- -2.21.0 - diff --git a/SOURCES/udisks-2.9.1-lvm_vdo-test_resize_physical-size.patch b/SOURCES/udisks-2.9.1-lvm_vdo-test_resize_physical-size.patch new file mode 100644 index 0000000..cd2f1b5 --- /dev/null +++ b/SOURCES/udisks-2.9.1-lvm_vdo-test_resize_physical-size.patch @@ -0,0 +1,34 @@ +From 890a0f3ca8cb5894d1764752c98b90dcb6274d6d Mon Sep 17 00:00:00 2001 +From: Vojtech Trefny +Date: Tue, 9 Jun 2020 11:16:15 +0200 +Subject: [PATCH] dbus-tests: Fix UdisksLVMVDOTest.test_resize_physical + +1 GiB suddenly isn't enough for physical size grow, lets hope +2 GiB will be enough for everyone. + +Resolves: rhzb#1845435 +--- + src/tests/dbus-tests/test_20_LVM.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/tests/dbus-tests/test_20_LVM.py b/src/tests/dbus-tests/test_20_LVM.py +index e238879a3..1073a2f90 100644 +--- a/src/tests/dbus-tests/test_20_LVM.py ++++ b/src/tests/dbus-tests/test_20_LVM.py +@@ -576,6 +576,7 @@ def test_resize_logical(self): + dbus_size = self.get_property(lv, '.LogicalVolume', 'Size') + dbus_size.assertEqual(vsize * 5) + ++ @udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE) + def test_resize_physical(self): + vgname = 'udisks_test_vdo_vg' + +@@ -586,7 +587,7 @@ def test_resize_physical(self): + vg_free = self.get_property(vg, '.VolumeGroup', 'FreeSize') + lv_name = 'udisks_test_vdovlv' + pool_name = 'udisks_test_vdopool' +- psize = vg_free.value - 1 * 1024**3 ++ psize = vg_free.value - 2 * 1024**3 + vsize = psize * 5 + lv_path = vg.CreateVDOVolume(lv_name, pool_name, dbus.UInt64(psize), dbus.UInt64(vsize), + dbus.UInt64(0), True, True, "auto", self.no_options, diff --git a/SOURCES/udisks-2.9.1-teardown-needle-match.patch b/SOURCES/udisks-2.9.1-teardown-needle-match.patch new file mode 100644 index 0000000..2d1d5ed --- /dev/null +++ b/SOURCES/udisks-2.9.1-teardown-needle-match.patch @@ -0,0 +1,29 @@ +From fdf6b233df960e6903c62b86735d86c59d967d12 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Fri, 19 Jun 2020 19:12:07 +0200 +Subject: [PATCH] udiskslinuxblock: Fix fstab records matching by needle + +Apparently mnt_fs_match_options() is not suitable for this use case. +--- + src/udiskslinuxblock.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c +index 888ec634..d5be8e4c 100644 +--- a/src/udiskslinuxblock.c ++++ b/src/udiskslinuxblock.c +@@ -575,7 +575,10 @@ find_fstab_entries (UDisksDaemon *daemon, + } + else if (needle != NULL) + { +- if (mnt_fs_match_options (fs, needle) == 0) ++ const char *opts; ++ ++ opts = mnt_fs_get_options (fs); ++ if (! opts || g_strstr_len (opts, -1, needle) == NULL) + continue; + } + +-- +2.26.2 + diff --git a/SPECS/udisks2.spec b/SPECS/udisks2.spec index 1c4d565..f58d217 100644 --- a/SPECS/udisks2.spec +++ b/SPECS/udisks2.spec @@ -5,11 +5,11 @@ %global libatasmart_version 0.17 %global dbus_version 1.4.0 %global with_gtk_doc 1 -%global libblockdev_version 2.19 +%global libblockdev_version 2.24 %define with_bcache 1 %define with_btrfs 1 -%define with_vdo 1 +%define with_vdo 0 %define with_lsm 1 %define with_zram 1 %define with_lvmcache 1 @@ -55,15 +55,14 @@ Name: udisks2 Summary: Disk Manager -Version: 2.8.3 -Release: 2%{?dist} +Version: 2.9.0 +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: https://github.com/storaged-project/udisks Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2 -Patch0: 0001-tests-Reflect-new-location-of-D-Bus-service-files.patch -Patch1: 0002-integration-test-Do-not-copy-config-files-when-testi.patch -Patch2: 0001-udiskslinuxpartition-Fix-potential-NULL-dereference.patch +Patch0: udisks-2.9.1-teardown-needle-match.patch +Patch1: udisks-2.9.1-lvm_vdo-test_resize_physical-size.patch BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version} @@ -85,6 +84,7 @@ BuildRequires: libblockdev-mdraid-devel >= %{libblockdev_version} BuildRequires: libblockdev-fs-devel >= %{libblockdev_version} BuildRequires: libblockdev-crypto-devel >= %{libblockdev_version} BuildRequires: libmount-devel +BuildRequires: libuuid-devel Requires: libblockdev >= %{libblockdev_version} Requires: libblockdev-part >= %{libblockdev_version} @@ -269,7 +269,6 @@ This package contains module for VDO management. %setup -q -n udisks-%{version} %patch0 -p1 %patch1 -p1 -%patch2 -p1 sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/" %build @@ -320,17 +319,18 @@ chrpath --delete %{buildroot}/%{_libexecdir}/udisks2/udisksd %post -n %{name} %systemd_post udisks2.service -%systemd_post clean-mount-point@.service -udevadm control --reload -udevadm trigger +# skip retriggering if udevd isn't even accessible, e.g. containers or +# rpm-ostree-based systems +if [ -S /run/udev/control ]; then + udevadm control --reload + udevadm trigger +fi %preun -n %{name} %systemd_preun udisks2.service -%systemd_preun clean-mount-point@.service %postun -n %{name} %systemd_postun_with_restart udisks2.service -%systemd_postun clean-mount-point@.service %ldconfig_scriptlets -n lib%{name} @@ -354,12 +354,12 @@ udevadm trigger %dir %{_sysconfdir}/udisks2/modules.conf.d %endif %{_sysconfdir}/udisks2/udisks2.conf +%{_sysconfdir}/udisks2/mount_options.conf.example %{_datadir}/dbus-1/system.d/org.freedesktop.UDisks2.conf %{_datadir}/bash-completion/completions/udisksctl %{_tmpfilesdir}/%{name}.conf %{_unitdir}/udisks2.service -%{_unitdir}/clean-mount-point@.service %{_udevrulesdir}/80-udisks2.rules %{_sbindir}/umount.udisks2 @@ -407,6 +407,23 @@ udevadm trigger %{_datadir}/gtk-doc/html/udisks2/* %endif %{_libdir}/pkgconfig/udisks2.pc +%{_libdir}/pkgconfig/udisks2-lvm2.pc +%{_libdir}/pkgconfig/udisks2-iscsi.pc +%if 0%{?with_bcache} +%{_libdir}/pkgconfig/udisks2-bcache.pc +%endif +%if 0%{?with_btrfs} +%{_libdir}/pkgconfig/udisks2-btrfs.pc +%endif +%if 0%{?with_lsm} +%{_libdir}/pkgconfig/udisks2-lsm.pc +%endif +%if 0%{?with_zram} +%{_libdir}/pkgconfig/udisks2-zram.pc +%endif +%if 0%{?with_vdo} +%{_libdir}/pkgconfig/udisks2-vdo.pc +%endif %if 0%{?with_bcache} %files -n %{name}-bcache @@ -444,6 +461,16 @@ udevadm trigger %endif %changelog +* Mon Jun 22 2020 Tomas Bzatek - 2.9.0-3 +- Fix the UdisksLVMVDOTest.test_resize_physical test (#1845435) + +* Mon Jun 22 2020 Tomas Bzatek - 2.9.0-2 +- Fix block tear-down functionality (#1843454) +- Fix libblockdev requires + +* Tue May 26 2020 Tomas Bzatek - 2.9.0-1 +- Rebase to 2.9.0 (#1824147) + * Fri Jun 14 2019 Tomas Bzatek - 2.8.3-2 - Minor test fixes - Fix potential NULL dereference in UDisksLinuxPartition