Compare commits
No commits in common. "c8" and "c9" have entirely different histories.
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/udisks-2.9.0.tar.bz2
|
SOURCES/udisks-2.9.4.tar.bz2
|
||||||
|
1
.udisks2.metadata
Normal file
1
.udisks2.metadata
Normal file
@ -0,0 +1 @@
|
|||||||
|
e6f21e90456360723d80265c4d3372eb88ef7a6e SOURCES/udisks-2.9.4.tar.bz2
|
25
SOURCES/ignore-apple-boot-part.patch
Normal file
25
SOURCES/ignore-apple-boot-part.patch
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
From b9863c11601e199420a375e13505e2b795de77c5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Frederick Grose <4335897+FGrose@users.noreply.github.com>
|
||||||
|
Date: Tue, 9 Feb 2021 19:02:01 -0500
|
||||||
|
Subject: [PATCH] 80-udisks2.rules: Ignore Apple boot partition from
|
||||||
|
livecd-tools
|
||||||
|
|
||||||
|
https://github.com/livecd-tools/livecd-tools/pull/176 creates a new boot
|
||||||
|
partition with livecd-iso-to-disk from Fedora Live .iso files that UDISKS
|
||||||
|
should ignore.
|
||||||
|
---
|
||||||
|
data/80-udisks2.rules | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/data/80-udisks2.rules b/data/80-udisks2.rules
|
||||||
|
index fb50f48a0..d6fa072fd 100644
|
||||||
|
--- a/data/80-udisks2.rules
|
||||||
|
+++ b/data/80-udisks2.rules
|
||||||
|
@@ -122,6 +122,7 @@ ENV{ID_PART_ENTRY_SCHEME}=="mac", ENV{ID_PART_ENTRY_TYPE}=="Apple_Bootstrap", EN
|
||||||
|
|
||||||
|
# Apple Boot partitions
|
||||||
|
ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_TYPE}=="426f6f74-0000-11aa-aa11-00306543ecac", ENV{UDISKS_IGNORE}="1"
|
||||||
|
+ENV{ID_FS_LABEL}=="ANACONDA", ENV{ID_PART_ENTRY_TYPE}=="48465300-0000-11aa-aa11-00306543ecac|0xaf", ENV{UDISKS_IGNORE}="1"
|
||||||
|
|
||||||
|
# special DOS partition types (EFI, hidden, etc.) and RAID/LVM
|
||||||
|
# see http://www.win.tue.nl/~aeb/partitions/partition_types-1.html
|
@ -1,11 +0,0 @@
|
|||||||
diff -up udisks-2.9.0/src/tests/dbus-tests/test_10_basic.py.bak udisks-2.9.0/src/tests/dbus-tests/test_10_basic.py
|
|
||||||
--- udisks-2.9.0/src/tests/dbus-tests/test_10_basic.py.bak 2020-05-26 14:59:20.000000000 +0200
|
|
||||||
+++ udisks-2.9.0/src/tests/dbus-tests/test_10_basic.py 2021-04-23 15:49:07.405824214 +0200
|
|
||||||
@@ -26,6 +26,7 @@ class UdisksBaseTest(udiskstestcase.Udis
|
|
||||||
elif distro in ('enterprise_linux', 'centos') and int(version) > 7:
|
|
||||||
modules.pop('bcache')
|
|
||||||
modules.pop('btrfs')
|
|
||||||
+ modules.pop('zram')
|
|
||||||
# assuming the kvdo module is typically pulled in as a vdo tool dependency
|
|
||||||
if not find_executable("vdo"):
|
|
||||||
modules.pop('vdo')
|
|
33
SOURCES/udisks-2.10.0-integration_test_force_readonly.patch
Normal file
33
SOURCES/udisks-2.10.0-integration_test_force_readonly.patch
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
From def82f87dcc0b21e4890e12d82e6007f98551dcb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Tue, 30 May 2023 18:23:08 +0200
|
||||||
|
Subject: [PATCH] tests: Forcefully set scsi_debug cd drive as read-only
|
||||||
|
|
||||||
|
There's something fishy in newer kernels and read-only detection
|
||||||
|
doesn't seem to work properly. As suggested in
|
||||||
|
https://github.com/util-linux/util-linux/issues/18#issuecomment-8453739
|
||||||
|
setting device ro by `blockdev --setro` seems to fix the issue.
|
||||||
|
---
|
||||||
|
src/tests/integration-test | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/tests/integration-test b/src/tests/integration-test
|
||||||
|
index 5f68217e0..10cdff85e 100755
|
||||||
|
--- a/src/tests/integration-test
|
||||||
|
+++ b/src/tests/integration-test
|
||||||
|
@@ -1096,6 +1096,7 @@ class FS(UDisksTestCase):
|
||||||
|
time.sleep(5)
|
||||||
|
self.sync()
|
||||||
|
cd_fs = self.udisks_filesystem(cd=True)
|
||||||
|
+ subprocess.call(['blockdev', '--setro', self.cd_device])
|
||||||
|
|
||||||
|
# forcing mount CD drive as 'rw' should fail
|
||||||
|
try:
|
||||||
|
@@ -1748,6 +1749,7 @@ class Polkit(UDisksTestCase, test_polkitd.PolkitTestCase):
|
||||||
|
try:
|
||||||
|
fs = self.udisks_filesystem(cd=True)
|
||||||
|
self.assertNotEqual(fs, None)
|
||||||
|
+ subprocess.call(['blockdev', '--setro', self.cd_device])
|
||||||
|
mount_path = fs.call_mount_sync(no_options, None)
|
||||||
|
self.assertIn('/media/', mount_path)
|
||||||
|
|
84
SOURCES/udisks-2.10.0-iscsi_test_03_iscsid_cache_clean.patch
Normal file
84
SOURCES/udisks-2.10.0-iscsi_test_03_iscsid_cache_clean.patch
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
commit 68115b16181db7a38f852b101ec965b9fc3e59cb
|
||||||
|
Author: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Thu Oct 20 17:32:29 2022 +0200
|
||||||
|
|
||||||
|
tests: Clean the discovered test target iscsid node cache
|
||||||
|
|
||||||
|
After each DiscoverSendTargets() and Login() calls iscsid caches
|
||||||
|
the node info in /var/lib/iscsi/nodes. That includes auth info and
|
||||||
|
passwords in plaintext. This might potentially lead to lingering
|
||||||
|
attributes sneaking into subsequent tests, affecting the results.
|
||||||
|
|
||||||
|
Let's clean that after each test run.
|
||||||
|
|
||||||
|
diff --git a/src/tests/dbus-tests/test_30_iscsi.py b/src/tests/dbus-tests/test_30_iscsi.py
|
||||||
|
index 6ac8386b..2b75462a 100644
|
||||||
|
--- a/src/tests/dbus-tests/test_30_iscsi.py
|
||||||
|
+++ b/src/tests/dbus-tests/test_30_iscsi.py
|
||||||
|
@@ -6,6 +6,7 @@ import os
|
||||||
|
import re
|
||||||
|
import six
|
||||||
|
import time
|
||||||
|
+import shutil
|
||||||
|
import unittest
|
||||||
|
|
||||||
|
|
||||||
|
@@ -26,6 +27,7 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
chap_iqn = 'iqn.2003-01.udisks.test:iscsi-test-chap'
|
||||||
|
mutual_iqn = 'iqn.2003-01.udisks.test:iscsi-test-mutual'
|
||||||
|
|
||||||
|
+
|
||||||
|
# Define common D-Bus method call timeout that needs to be slightly longer
|
||||||
|
# than the corresponding timeout defined in libiscsi:
|
||||||
|
# #define ISCSID_REQ_TIMEOUT 1000
|
||||||
|
@@ -61,6 +63,10 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
initiator = bytearray(data)
|
||||||
|
return initiator.strip().split(b"InitiatorName=")[1]
|
||||||
|
|
||||||
|
+ def _clean_iscsid_node_dir(self):
|
||||||
|
+ for iqn in [self.noauth_iqn, self.chap_iqn, self.mutual_iqn]:
|
||||||
|
+ shutil.rmtree(os.path.join('/var/lib/iscsi/nodes/', iqn), ignore_errors=True)
|
||||||
|
+
|
||||||
|
def test__manager_interface(self):
|
||||||
|
'''Test for module D-Bus Manager interface presence'''
|
||||||
|
|
||||||
|
@@ -86,6 +92,7 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
||||||
|
dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
||||||
|
timeout=self.iscsi_timeout)
|
||||||
|
+ self.addCleanup(self._clean_iscsid_node_dir)
|
||||||
|
|
||||||
|
node = next((node for node in nodes if node[0] == self.noauth_iqn), None)
|
||||||
|
self.assertIsNotNone(node)
|
||||||
|
@@ -131,6 +138,7 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
||||||
|
dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
||||||
|
timeout=self.iscsi_timeout)
|
||||||
|
+ self.addCleanup(self._clean_iscsid_node_dir)
|
||||||
|
|
||||||
|
node = next((node for node in nodes if node[0] == self.chap_iqn), None)
|
||||||
|
self.assertIsNotNone(node)
|
||||||
|
@@ -190,6 +198,7 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
||||||
|
dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
||||||
|
timeout=self.iscsi_timeout)
|
||||||
|
+ self.addCleanup(self._clean_iscsid_node_dir)
|
||||||
|
|
||||||
|
node = next((node for node in nodes if node[0] == self.mutual_iqn), None)
|
||||||
|
self.assertIsNotNone(node)
|
||||||
|
@@ -246,6 +255,7 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
||||||
|
dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
||||||
|
timeout=self.iscsi_timeout)
|
||||||
|
+ self.addCleanup(self._clean_iscsid_node_dir)
|
||||||
|
|
||||||
|
node = next((node for node in nodes if node[0] == self.noauth_iqn), None)
|
||||||
|
self.assertIsNotNone(node)
|
||||||
|
@@ -293,6 +303,7 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
||||||
|
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
||||||
|
dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
||||||
|
timeout=self.iscsi_timeout)
|
||||||
|
+ self.addCleanup(self._clean_iscsid_node_dir)
|
||||||
|
|
||||||
|
node = next((node for node in nodes if node[0] == self.noauth_iqn), None)
|
||||||
|
self.assertIsNotNone(node)
|
@ -1,156 +0,0 @@
|
|||||||
commit 4090b87a1468fcc479aafd264328abfed471daeb
|
|
||||||
Author: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Thu Jun 3 16:09:10 2021 +0200
|
|
||||||
|
|
||||||
tests: Extend iscsi method call timeouts
|
|
||||||
|
|
||||||
The default tests 100 sec. D-Bus method call timeout is not enough as
|
|
||||||
the iscsi initiator timeouts are typically around 120 sec, e.g. for
|
|
||||||
the Login operation.
|
|
||||||
|
|
||||||
diff --git a/src/tests/dbus-tests/test_30_iscsi.py b/src/tests/dbus-tests/test_30_iscsi.py
|
|
||||||
index 8ec6858c..34bdfc4b 100644
|
|
||||||
--- a/src/tests/dbus-tests/test_30_iscsi.py
|
|
||||||
+++ b/src/tests/dbus-tests/test_30_iscsi.py
|
|
||||||
@@ -26,6 +26,12 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
chap_iqn = 'iqn.2003-01.udisks.test:iscsi-test-chap'
|
|
||||||
mutual_iqn = 'iqn.2003-01.udisks.test:iscsi-test-mutual'
|
|
||||||
|
|
||||||
+ # Define common D-Bus method call timeout that needs to be slightly longer
|
|
||||||
+ # than the corresponding timeout defined in libiscsi:
|
|
||||||
+ # #define ISCSID_REQ_TIMEOUT 1000
|
|
||||||
+ # In reality the timeout is typically around 120 sec for the 'login' operation.
|
|
||||||
+ iscsi_timeout = 1000 + 5
|
|
||||||
+
|
|
||||||
@classmethod
|
|
||||||
def setUpClass(cls):
|
|
||||||
udiskstestcase.UdisksTestCase.setUpClass()
|
|
||||||
@@ -78,7 +84,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
def test_login_noauth(self):
|
|
||||||
manager = self.get_object('/Manager')
|
|
||||||
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
node = next((node for node in nodes if node[0] == self.noauth_iqn), None)
|
|
||||||
self.assertIsNotNone(node)
|
|
||||||
@@ -90,7 +97,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
|
|
||||||
self.addCleanup(self._force_lougout, self.noauth_iqn)
|
|
||||||
manager.Login(iqn, tpg, host, port, iface, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
devs = glob.glob('/dev/disk/by-path/*%s*' % iqn)
|
|
||||||
self.assertEqual(len(devs), 1)
|
|
||||||
@@ -105,7 +113,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
self.assertIn(self.str_to_ay(devs[0]), symlinks)
|
|
||||||
|
|
||||||
manager.Logout(iqn, tpg, host, port, iface, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
devs = glob.glob('/dev/disk/by-path/*%s*' % iqn)
|
|
||||||
self.assertEqual(len(devs), 0)
|
|
||||||
@@ -120,7 +129,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
|
|
||||||
manager = self.get_object('/Manager')
|
|
||||||
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
node = next((node for node in nodes if node[0] == self.chap_iqn), None)
|
|
||||||
self.assertIsNotNone(node)
|
|
||||||
@@ -138,14 +148,16 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
|
||||||
options['password'] = '12345'
|
|
||||||
manager.Login(iqn, tpg, host, port, iface, options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
# right password
|
|
||||||
options['password'] = self.password
|
|
||||||
|
|
||||||
self.addCleanup(self._force_lougout, self.chap_iqn)
|
|
||||||
manager.Login(iqn, tpg, host, port, iface, options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
devs = glob.glob('/dev/disk/by-path/*%s*' % iqn)
|
|
||||||
self.assertEqual(len(devs), 1)
|
|
||||||
@@ -160,7 +172,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
self.assertIn(self.str_to_ay(devs[0]), symlinks)
|
|
||||||
|
|
||||||
manager.Logout(iqn, tpg, host, port, iface, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
devs = glob.glob('/dev/disk/by-path/*%s*' % iqn)
|
|
||||||
self.assertEqual(len(devs), 0)
|
|
||||||
@@ -175,7 +188,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
|
|
||||||
manager = self.get_object('/Manager')
|
|
||||||
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
node = next((node for node in nodes if node[0] == self.mutual_iqn), None)
|
|
||||||
self.assertIsNotNone(node)
|
|
||||||
@@ -193,7 +207,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
|
|
||||||
self.addCleanup(self._force_lougout, self.mutual_iqn)
|
|
||||||
manager.Login(iqn, tpg, host, port, iface, options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
devs = glob.glob('/dev/disk/by-path/*%s*' % iqn)
|
|
||||||
self.assertEqual(len(devs), 1)
|
|
||||||
@@ -208,7 +223,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
self.assertIn(self.str_to_ay(devs[0]), symlinks)
|
|
||||||
|
|
||||||
manager.Logout(iqn, tpg, host, port, iface, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
devs = glob.glob('/dev/disk/by-path/*%s*' % iqn)
|
|
||||||
self.assertEqual(len(devs), 0)
|
|
||||||
@@ -228,7 +244,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
self.skipTest("ISCSI.Session objects not supported.")
|
|
||||||
|
|
||||||
nodes, _ = manager.DiscoverSendTargets(self.address, self.port, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
node = next((node for node in nodes if node[0] == self.noauth_iqn), None)
|
|
||||||
self.assertIsNotNone(node)
|
|
||||||
@@ -237,7 +254,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
|
|
||||||
self.addCleanup(self._force_lougout, self.noauth_iqn)
|
|
||||||
manager.Login(iqn, tpg, host, port, iface, self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.Manager.ISCSI.Initiator',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
# /org/freedesktop/UDisks2/iscsi/sessionX should be created
|
|
||||||
udisks = self.get_object('')
|
|
||||||
@@ -260,7 +278,8 @@ class UdisksISCSITest(udiskstestcase.UdisksTestCase):
|
|
||||||
|
|
||||||
# logout using session
|
|
||||||
session.Logout(self.no_options,
|
|
||||||
- dbus_interface=self.iface_prefix + '.ISCSI.Session')
|
|
||||||
+ dbus_interface=self.iface_prefix + '.ISCSI.Session',
|
|
||||||
+ timeout=self.iscsi_timeout)
|
|
||||||
|
|
||||||
# make sure the session object is no longer on dbus
|
|
||||||
objects = udisks.GetManagedObjects(dbus_interface='org.freedesktop.DBus.ObjectManager')
|
|
182
SOURCES/udisks-2.10.0-lvm2_teardown_tests.patch
Normal file
182
SOURCES/udisks-2.10.0-lvm2_teardown_tests.patch
Normal file
@ -0,0 +1,182 @@
|
|||||||
|
From dd6ef8393a8f27fefad66cce136e52f13350f0df Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Fri, 1 Oct 2021 18:23:10 +0200
|
||||||
|
Subject: [PATCH] tests: Add LVM2 teardown object existence checks
|
||||||
|
|
||||||
|
This adds a check for the created stack objects presence after the teardown.
|
||||||
|
|
||||||
|
Due to the nature of the global lvm2 module update some objects may still
|
||||||
|
hang around after the org.freedesktop.UDisks2.VolumeGroup.Delete(options='tear-down')
|
||||||
|
method call has returned. Until this is properly fixed an explicit timeout
|
||||||
|
had to be added.
|
||||||
|
---
|
||||||
|
src/tests/dbus-tests/test_20_LVM.py | 80 +++++++++++++++++------------
|
||||||
|
1 file changed, 46 insertions(+), 34 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/tests/dbus-tests/test_20_LVM.py b/src/tests/dbus-tests/test_20_LVM.py
|
||||||
|
index 56915e580..7fbff0434 100644
|
||||||
|
--- a/src/tests/dbus-tests/test_20_LVM.py
|
||||||
|
+++ b/src/tests/dbus-tests/test_20_LVM.py
|
||||||
|
@@ -3,6 +3,7 @@
|
||||||
|
import re
|
||||||
|
import time
|
||||||
|
import unittest
|
||||||
|
+import six
|
||||||
|
|
||||||
|
from distutils.version import LooseVersion
|
||||||
|
|
||||||
|
@@ -637,7 +638,8 @@ def _remove_luks(self, device, name, close=True):
|
||||||
|
device.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
except dbus.exceptions.DBusException as e:
|
||||||
|
# ignore when luks is actually already locked
|
||||||
|
- if not str(e).endswith('is not unlocked') and not 'No such interface' in str(e):
|
||||||
|
+ if not str(e).endswith('is not unlocked') and not 'No such interface' in str(e) and \
|
||||||
|
+ not 'Object does not exist at path' in str(e):
|
||||||
|
raise e
|
||||||
|
|
||||||
|
try:
|
||||||
|
@@ -645,7 +647,7 @@ def _remove_luks(self, device, name, close=True):
|
||||||
|
d['erase'] = True
|
||||||
|
device.Format('empty', d, dbus_interface=self.iface_prefix + '.Block')
|
||||||
|
except dbus.exceptions.DBusException as e:
|
||||||
|
- if not 'No such interface' in str(e):
|
||||||
|
+ if not 'No such interface' in str(e) and not 'Object does not exist at path' in str(e):
|
||||||
|
raise e
|
||||||
|
|
||||||
|
def _init_stack(self, name):
|
||||||
|
@@ -663,18 +665,19 @@ def _init_stack(self, name):
|
||||||
|
self.assertIsNotNone(self.pv)
|
||||||
|
|
||||||
|
self.vg = self._create_vg(vgname, dbus.Array([self.pv]))
|
||||||
|
+ self.vg_path = self.vg.object_path
|
||||||
|
self.addCleanup(self._remove_vg, self.vg, tear_down=True, ignore_removed=True)
|
||||||
|
|
||||||
|
# create an LV on it
|
||||||
|
- lv_path = self.vg.CreatePlainVolume(lvname, dbus.UInt64(200 * 1024**2), self.no_options,
|
||||||
|
- dbus_interface=self.iface_prefix + '.VolumeGroup')
|
||||||
|
- self.lv = self.bus.get_object(self.iface_prefix, lv_path)
|
||||||
|
+ self.lv_path = self.vg.CreatePlainVolume(lvname, dbus.UInt64(200 * 1024**2), self.no_options,
|
||||||
|
+ dbus_interface=self.iface_prefix + '.VolumeGroup')
|
||||||
|
+ self.lv = self.bus.get_object(self.iface_prefix, self.lv_path)
|
||||||
|
self.assertIsNotNone(self.lv)
|
||||||
|
|
||||||
|
- lv_block_path = self.lv.Activate(self.no_options, dbus_interface=self.iface_prefix + '.LogicalVolume')
|
||||||
|
- self.assertIsNotNone(lv_block_path)
|
||||||
|
+ self.lv_block_path = self.lv.Activate(self.no_options, dbus_interface=self.iface_prefix + '.LogicalVolume')
|
||||||
|
+ self.assertIsNotNone(self.lv_block_path)
|
||||||
|
|
||||||
|
- self.lv_block = self.get_object(lv_block_path)
|
||||||
|
+ self.lv_block = self.get_object(self.lv_block_path)
|
||||||
|
self.assertIsNotNone(self.lv_block)
|
||||||
|
|
||||||
|
# create LUKS on the LV
|
||||||
|
@@ -702,10 +705,10 @@ def _init_stack(self, name):
|
||||||
|
self.addCleanup(self._remove_luks, self.lv_block, vgname)
|
||||||
|
self.luks_uuid = self.get_property_raw(self.lv_block, '.Block', 'IdUUID')
|
||||||
|
|
||||||
|
- luks_block_path = self.get_property(self.lv_block, '.Encrypted', 'CleartextDevice')
|
||||||
|
- self.luks_block = self.get_object(luks_block_path.value)
|
||||||
|
- self.assertIsNotNone(self.luks_block)
|
||||||
|
- self.fs_uuid = self.get_property_raw(self.luks_block, '.Block', 'IdUUID')
|
||||||
|
+ self.luks_block_path = self.get_property_raw(self.lv_block, '.Encrypted', 'CleartextDevice')
|
||||||
|
+ luks_block = self.get_object(self.luks_block_path)
|
||||||
|
+ self.assertIsNotNone(luks_block)
|
||||||
|
+ self.fs_uuid = self.get_property_raw(luks_block, '.Block', 'IdUUID')
|
||||||
|
|
||||||
|
# check for present crypttab configuration item
|
||||||
|
conf = self.get_property(self.lv_block, '.Block', 'Configuration')
|
||||||
|
@@ -713,7 +716,7 @@ def _init_stack(self, name):
|
||||||
|
self.assertEqual(conf.value[0][0], 'crypttab')
|
||||||
|
|
||||||
|
# check for present fstab configuration item on a cleartext block device
|
||||||
|
- conf = self.get_property(self.luks_block, '.Block', 'Configuration')
|
||||||
|
+ conf = self.get_property(luks_block, '.Block', 'Configuration')
|
||||||
|
conf.assertTrue()
|
||||||
|
self.assertEqual(conf.value[0][0], 'fstab')
|
||||||
|
|
||||||
|
@@ -730,6 +733,32 @@ def _init_stack(self, name):
|
||||||
|
self.assertIn(vgname, fstab)
|
||||||
|
self.assertIn(self.fs_uuid, fstab)
|
||||||
|
|
||||||
|
+ def _check_torn_down_stack(self, name):
|
||||||
|
+ # check that all created objects don't exist anymore
|
||||||
|
+ msg = r'Object does not exist at path|No such interface'
|
||||||
|
+ with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
||||||
|
+ luks_block = self.get_object(self.luks_block_path)
|
||||||
|
+ self.get_property_raw(luks_block, '.Block', 'DeviceNumber')
|
||||||
|
+ with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
||||||
|
+ lv_block = self.get_object(self.lv_block_path)
|
||||||
|
+ self.get_property_raw(lv_block, '.Block', 'DeviceNumber')
|
||||||
|
+ with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
||||||
|
+ # the lvm2 udisks module is not fully synchronous, see https://github.com/storaged-project/udisks/pull/814
|
||||||
|
+ time.sleep(2)
|
||||||
|
+ lv = self.get_object(self.lv_path)
|
||||||
|
+ self.get_property_raw(lv, '.LogicalVolume', 'Name')
|
||||||
|
+ with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
||||||
|
+ vg = self.get_object(self.vg_path)
|
||||||
|
+ self.get_property_raw(vg, '.VolumeGroup', 'Name')
|
||||||
|
+
|
||||||
|
+ # check that fstab and crypttab records have been removed
|
||||||
|
+ crypttab = self.read_file('/etc/crypttab')
|
||||||
|
+ self.assertNotIn(name, crypttab)
|
||||||
|
+ self.assertNotIn(self.luks_uuid, crypttab)
|
||||||
|
+ fstab = self.read_file('/etc/fstab')
|
||||||
|
+ self.assertNotIn(name, fstab)
|
||||||
|
+ self.assertNotIn(self.fs_uuid, fstab)
|
||||||
|
+
|
||||||
|
|
||||||
|
@udiskstestcase.tag_test(udiskstestcase.TestTags.UNSAFE)
|
||||||
|
def test_teardown_active_vg_unlocked(self):
|
||||||
|
@@ -741,13 +770,7 @@ def test_teardown_active_vg_unlocked(self):
|
||||||
|
|
||||||
|
self._remove_vg(self.vg, tear_down=True, ignore_removed=False)
|
||||||
|
|
||||||
|
- # check that fstab and crypttab records have been removed
|
||||||
|
- crypttab = self.read_file('/etc/crypttab')
|
||||||
|
- self.assertNotIn(name, crypttab)
|
||||||
|
- self.assertNotIn(self.luks_uuid, crypttab)
|
||||||
|
- fstab = self.read_file('/etc/fstab')
|
||||||
|
- self.assertNotIn(name, fstab)
|
||||||
|
- self.assertNotIn(self.fs_uuid, fstab)
|
||||||
|
+ self._check_torn_down_stack(name)
|
||||||
|
|
||||||
|
@udiskstestcase.tag_test(udiskstestcase.TestTags.UNSAFE)
|
||||||
|
def test_teardown_active_vg_locked(self):
|
||||||
|
@@ -760,13 +783,7 @@ def test_teardown_active_vg_locked(self):
|
||||||
|
self.lv_block.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
self._remove_vg(self.vg, tear_down=True, ignore_removed=False)
|
||||||
|
|
||||||
|
- # check that fstab and crypttab records have been removed
|
||||||
|
- crypttab = self.read_file('/etc/crypttab')
|
||||||
|
- self.assertNotIn(name, crypttab)
|
||||||
|
- self.assertNotIn(self.luks_uuid, crypttab)
|
||||||
|
- fstab = self.read_file('/etc/fstab')
|
||||||
|
- self.assertNotIn(name, fstab)
|
||||||
|
- self.assertNotIn(self.fs_uuid, fstab)
|
||||||
|
+ self._check_torn_down_stack(name)
|
||||||
|
|
||||||
|
@udiskstestcase.tag_test(udiskstestcase.TestTags.UNSAFE)
|
||||||
|
def test_teardown_inactive_vg_locked(self):
|
||||||
|
@@ -780,13 +797,7 @@ def test_teardown_inactive_vg_locked(self):
|
||||||
|
self.lv.Deactivate(self.no_options, dbus_interface=self.iface_prefix + '.LogicalVolume')
|
||||||
|
self._remove_vg(self.vg, tear_down=True, ignore_removed=False)
|
||||||
|
|
||||||
|
- # check that fstab and crypttab records have been removed
|
||||||
|
- crypttab = self.read_file('/etc/crypttab')
|
||||||
|
- self.assertNotIn(name, crypttab)
|
||||||
|
- self.assertNotIn(self.luks_uuid, crypttab)
|
||||||
|
- fstab = self.read_file('/etc/fstab')
|
||||||
|
- self.assertNotIn(name, fstab)
|
||||||
|
- self.assertNotIn(self.fs_uuid, fstab)
|
||||||
|
+ self._check_torn_down_stack(name)
|
||||||
|
|
||||||
|
@udiskstestcase.tag_test(udiskstestcase.TestTags.UNSAFE)
|
||||||
|
def test_reformat_inactive_vg_locked(self):
|
||||||
|
@@ -812,6 +823,7 @@ def test_reformat_inactive_vg_locked(self):
|
||||||
|
|
||||||
|
# check that fstab and crypttab records have been removed
|
||||||
|
# TODO: these checks are the opposite - record shouldn't be present, once this is fixed
|
||||||
|
+ # self._check_torn_down_stack(name)
|
||||||
|
crypttab = self.read_file('/etc/crypttab')
|
||||||
|
self.assertIn(name, crypttab)
|
||||||
|
self.assertIn(self.luks_uuid, crypttab)
|
74
SOURCES/udisks-2.10.0-static_daemon_resources_free.patch
Normal file
74
SOURCES/udisks-2.10.0-static_daemon_resources_free.patch
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
From d205057296957d6064825252a3d3377e809d6fed Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Wed, 6 Oct 2021 17:12:13 +0200
|
||||||
|
Subject: [PATCH] udiskslinuxmountoptions: Do not free static daemon resources
|
||||||
|
|
||||||
|
The GResource instance returned from udisks_daemon_resources_get_resource()
|
||||||
|
that calls g_static_resource_get_resource() internally is marked as
|
||||||
|
'(transfer none)' and should not be freed. In fact that causes double
|
||||||
|
free inside the g_static_resource_fini() atexit handler leading
|
||||||
|
to memory corruption causing random failures of further atexit
|
||||||
|
handlers such as cryptsetup and openssl destructors.
|
||||||
|
|
||||||
|
Invalid read of size 4
|
||||||
|
at 0x4BB03A4: g_resource_unref (gresource.c:527)
|
||||||
|
by 0x4BB2150: g_static_resource_fini (gresource.c:1449)
|
||||||
|
by 0x4010ADB: _dl_fini (dl-fini.c:139)
|
||||||
|
by 0x4EF0DF4: __run_exit_handlers (exit.c:113)
|
||||||
|
by 0x4EF0F6F: exit (exit.c:143)
|
||||||
|
by 0x4ED9566: __libc_start_call_main (libc_start_call_main.h:74)
|
||||||
|
by 0x4ED960B: __libc_start_main@@GLIBC_2.34 (libc-start.c:409)
|
||||||
|
by 0x128774: (below main) (in udisks/src/.libs/udisksd)
|
||||||
|
Address 0x5cc5fc0 is 0 bytes inside a block of size 16 free'd
|
||||||
|
at 0x48430E4: free (vg_replace_malloc.c:755)
|
||||||
|
by 0x4DB10BC: g_free (gmem.c:199)
|
||||||
|
by 0x4BB2148: g_static_resource_fini (gresource.c:1448)
|
||||||
|
by 0x4010ADB: _dl_fini (dl-fini.c:139)
|
||||||
|
by 0x4EF0DF4: __run_exit_handlers (exit.c:113)
|
||||||
|
by 0x4EF0F6F: exit (exit.c:143)
|
||||||
|
by 0x4ED9566: __libc_start_call_main (libc_start_call_main.h:74)
|
||||||
|
by 0x4ED960B: __libc_start_main@@GLIBC_2.34 (libc-start.c:409)
|
||||||
|
by 0x128774: (below main) (in udisks/src/.libs/udisksd)
|
||||||
|
Block was alloc'd at
|
||||||
|
at 0x484086F: malloc (vg_replace_malloc.c:380)
|
||||||
|
by 0x4DB47A8: g_malloc (gmem.c:106)
|
||||||
|
by 0x4BB19C7: UnknownInlinedFun (gresource.c:545)
|
||||||
|
by 0x4BB19C7: g_resource_new_from_data (gresource.c:613)
|
||||||
|
by 0x4BB1A88: register_lazy_static_resources_unlocked (gresource.c:1374)
|
||||||
|
by 0x4BB218C: UnknownInlinedFun (gresource.c:1393)
|
||||||
|
by 0x4BB218C: UnknownInlinedFun (gresource.c:1387)
|
||||||
|
by 0x4BB218C: g_static_resource_get_resource (gresource.c:1472)
|
||||||
|
by 0x14F6A3: UnknownInlinedFun (udisks-daemon-resources.c:284)
|
||||||
|
by 0x14F6A3: udisks_linux_mount_options_get_builtin (udiskslinuxmountoptions.c:612)
|
||||||
|
by 0x12CC6E: udisks_daemon_constructed (udisksdaemon.c:441)
|
||||||
|
by 0x4D1ED96: g_object_new_internal (gobject.c:1985)
|
||||||
|
by 0x4D20227: g_object_new_valist (gobject.c:2288)
|
||||||
|
by 0x4D2075C: g_object_new (gobject.c:1788)
|
||||||
|
by 0x129A5F: udisks_daemon_new (udisksdaemon.c:619)
|
||||||
|
by 0x129AD5: on_bus_acquired (main.c:63)
|
||||||
|
by 0x4C35C95: connection_get_cb.lto_priv.0 (gdbusnameowning.c:504)
|
||||||
|
by 0x4BD3F99: g_task_return_now (gtask.c:1219)
|
||||||
|
by 0x4BD419A: UnknownInlinedFun (gtask.c:1289)
|
||||||
|
by 0x4BD419A: g_task_return (gtask.c:1245)
|
||||||
|
by 0x4C31D51: bus_get_async_initable_cb (gdbusconnection.c:7433)
|
||||||
|
by 0x4BD3F99: g_task_return_now (gtask.c:1219)
|
||||||
|
by 0x4BD3FDC: complete_in_idle_cb (gtask.c:1233)
|
||||||
|
by 0x4DA852A: g_idle_dispatch (gmain.c:5897)
|
||||||
|
by 0x4DAC33E: UnknownInlinedFun (gmain.c:3381)
|
||||||
|
by 0x4DAC33E: g_main_context_dispatch (gmain.c:4099)
|
||||||
|
---
|
||||||
|
src/udiskslinuxmountoptions.c | 1 -
|
||||||
|
1 file changed, 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/udiskslinuxmountoptions.c b/src/udiskslinuxmountoptions.c
|
||||||
|
index 7729d4015..819c9ba96 100644
|
||||||
|
--- a/src/udiskslinuxmountoptions.c
|
||||||
|
+++ b/src/udiskslinuxmountoptions.c
|
||||||
|
@@ -614,7 +614,6 @@ udisks_linux_mount_options_get_builtin (void)
|
||||||
|
"/org/freedesktop/UDisks2/data/builtin_mount_options.conf",
|
||||||
|
G_RESOURCE_LOOKUP_FLAGS_NONE,
|
||||||
|
&error);
|
||||||
|
- g_resource_unref (daemon_resource);
|
||||||
|
|
||||||
|
if (builtin_opts_bytes == NULL)
|
||||||
|
{
|
@ -1,64 +0,0 @@
|
|||||||
From c21ad308b1313a35cafa1664e5eb4772925bc005 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Thu, 22 Apr 2021 18:05:29 +0200
|
|
||||||
Subject: [PATCH 1/2] tests: Mark Drive.ATA tests as unstable
|
|
||||||
|
|
||||||
Some of the tests operate on physical ATA drives, comparing values between
|
|
||||||
smartctl output and udisks. Different libraries used, different approach
|
|
||||||
to retrieve some ATA features and values. Turned out this is not working
|
|
||||||
correctly on some SATA disks with each approach giving slightly different
|
|
||||||
results, presumably for the quirks in place.
|
|
||||||
---
|
|
||||||
src/tests/dbus-tests/test_drive_ata.py | 8 +++++---
|
|
||||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/tests/dbus-tests/test_drive_ata.py b/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
index 3187367e..e91bd02f 100644
|
|
||||||
--- a/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
+++ b/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
@@ -4,7 +4,7 @@ import re
|
|
||||||
import unittest
|
|
||||||
import time
|
|
||||||
|
|
||||||
-from udiskstestcase import UdisksTestCase
|
|
||||||
+import udiskstestcase
|
|
||||||
|
|
||||||
SMART_CMDLINE_FAIL = 1 << 0
|
|
||||||
SMART_OPEN_READ_FAIL = 1 << 1
|
|
||||||
@@ -32,7 +32,7 @@ def _get_sata_disks():
|
|
||||||
|
|
||||||
|
|
||||||
for disk in _get_sata_disks():
|
|
||||||
- ret, out = UdisksTestCase.run_command("smartctl -a /dev/%s" % disk)
|
|
||||||
+ ret, out = udiskstestcase.UdisksTestCase.run_command("smartctl -a /dev/%s" % disk)
|
|
||||||
|
|
||||||
# Only the following bits in the exit status mean the device failed to
|
|
||||||
# provide valid SMART data, others may be set for different reasons (see
|
|
||||||
@@ -46,7 +46,7 @@ for disk in _get_sata_disks():
|
|
||||||
else:
|
|
||||||
smart_unsupported.add(disk)
|
|
||||||
|
|
||||||
-class UdisksDriveAtaTest(UdisksTestCase):
|
|
||||||
+class UdisksDriveAtaTest(udiskstestcase.UdisksTestCase):
|
|
||||||
'''Noninvasive tests for the Drive.Ata interface'''
|
|
||||||
|
|
||||||
def get_smart_setting(self, disk, attr, out_prefix):
|
|
||||||
@@ -102,6 +102,7 @@ class UdisksDriveAtaTest(UdisksTestCase)
|
|
||||||
intro_data = drive_intro.Introspect()
|
|
||||||
self.assertNotIn('interface name="org.freedesktop.UDisks2.Drive.Ata"', intro_data)
|
|
||||||
|
|
||||||
+ @udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
|
|
||||||
@unittest.skipUnless(smart_supported, "No disks supporting S.M.A.R.T. available")
|
|
||||||
def test_properties(self):
|
|
||||||
for disk in smart_supported:
|
|
||||||
@@ -148,6 +149,7 @@ class UdisksDriveAtaTest(UdisksTestCase)
|
|
||||||
# nineth field is the raw value
|
|
||||||
self.assertEqual(int(pwon_s.value / 3600), int(pwon_attr[8]))
|
|
||||||
|
|
||||||
+ @udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
|
|
||||||
@unittest.skipUnless(smart_supported, "No disks supporting S.M.A.R.T. available")
|
|
||||||
def test_smart_get_attributes(self):
|
|
||||||
for disk in smart_supported:
|
|
||||||
--
|
|
||||||
2.30.2
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
|||||||
From 1358d1e5208d71d5a70f17a242eda00f079a9d0b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Thu, 22 Apr 2021 18:20:48 +0200
|
|
||||||
Subject: [PATCH 2/2] tests: Handle missing /dev/disk/by-path gracefully
|
|
||||||
|
|
||||||
Limited testing environments may not have this path always available.
|
|
||||||
---
|
|
||||||
src/tests/dbus-tests/test_drive_ata.py | 19 +++++++++++--------
|
|
||||||
1 file changed, 11 insertions(+), 8 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/tests/dbus-tests/test_drive_ata.py b/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
index e91bd02f..37740c60 100644
|
|
||||||
--- a/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
+++ b/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
@@ -20,14 +20,17 @@ DISK_PATH = "/dev/disk/by-path/"
|
|
||||||
|
|
||||||
def _get_sata_disks():
|
|
||||||
sata_disks = []
|
|
||||||
- by_path = os.listdir(DISK_PATH)
|
|
||||||
- for dev in by_path:
|
|
||||||
- if "ata" in dev and "part" not in dev:
|
|
||||||
- path = os.path.realpath(os.path.join(DISK_PATH, dev))
|
|
||||||
- name = os.path.basename(path)
|
|
||||||
- if name.startswith("sd"):
|
|
||||||
- # ignore devices like CD drives etc.
|
|
||||||
- sata_disks.append(name)
|
|
||||||
+ try:
|
|
||||||
+ by_path = os.listdir(DISK_PATH)
|
|
||||||
+ for dev in by_path:
|
|
||||||
+ if "ata" in dev and "part" not in dev:
|
|
||||||
+ path = os.path.realpath(os.path.join(DISK_PATH, dev))
|
|
||||||
+ name = os.path.basename(path)
|
|
||||||
+ if name.startswith("sd"):
|
|
||||||
+ # ignore devices like CD drives etc.
|
|
||||||
+ sata_disks.append(name)
|
|
||||||
+ except:
|
|
||||||
+ pass
|
|
||||||
return sata_disks
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
2.30.2
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 486778c778a4ddb24395408c6b267e702e19ae02 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Sat, 1 Jan 2022 22:01:49 +0100
|
|
||||||
Subject: [PATCH] udiskslinuxencrypted: Fix GError ownership
|
|
||||||
|
|
||||||
---
|
|
||||||
src/udiskslinuxencrypted.c | 3 +--
|
|
||||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxencrypted.c b/src/udiskslinuxencrypted.c
|
|
||||||
index c3a0821ac..3bc54e695 100644
|
|
||||||
--- a/src/udiskslinuxencrypted.c
|
|
||||||
+++ b/src/udiskslinuxencrypted.c
|
|
||||||
@@ -1040,7 +1040,7 @@ handle_resize (UDisksEncrypted *encrypted,
|
|
||||||
object = udisks_daemon_util_dup_object (encrypted, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1066,7 +1066,6 @@ handle_resize (UDisksEncrypted *encrypted,
|
|
||||||
if (!udisks_daemon_util_get_caller_uid_sync (daemon, invocation, NULL /* GCancellable */, &caller_uid, &error))
|
|
||||||
{
|
|
||||||
g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
- g_clear_error (&error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
|||||||
From 223256777f6e269b8501d95a64c4c6095a7a8a3e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Sat, 1 Jan 2022 22:02:17 +0100
|
|
||||||
Subject: [PATCH] udiskslinuxfilesystem: Fix GError ownership
|
|
||||||
|
|
||||||
---
|
|
||||||
src/udiskslinuxfilesystem.c | 8 ++++----
|
|
||||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
|
|
||||||
index f7c99757a..a8390a044 100644
|
|
||||||
--- a/src/udiskslinuxfilesystem.c
|
|
||||||
+++ b/src/udiskslinuxfilesystem.c
|
|
||||||
@@ -1739,7 +1739,7 @@ handle_resize (UDisksFilesystem *filesystem,
|
|
||||||
object = udisks_daemon_util_dup_object (filesystem, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1921,7 +1921,7 @@ handle_repair (UDisksFilesystem *filesystem,
|
|
||||||
object = udisks_daemon_util_dup_object (filesystem, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2089,7 +2089,7 @@ handle_check (UDisksFilesystem *filesystem,
|
|
||||||
object = udisks_daemon_util_dup_object (filesystem, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -2257,7 +2257,7 @@ handle_take_ownership (UDisksFilesystem *filesystem,
|
|
||||||
object = udisks_daemon_util_dup_object (filesystem, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
@ -1,70 +0,0 @@
|
|||||||
From 7c9933c0f80faaabbed607983fdf77f8c4562df6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Sat, 1 Jan 2022 20:11:57 +0100
|
|
||||||
Subject: [PATCH] udiskslinuxpartition: Fix GError ownership
|
|
||||||
|
|
||||||
---
|
|
||||||
src/udiskslinuxpartition.c | 15 ++++++---------
|
|
||||||
1 file changed, 6 insertions(+), 9 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c
|
|
||||||
index 5461b3903..3d970768d 100644
|
|
||||||
--- a/src/udiskslinuxpartition.c
|
|
||||||
+++ b/src/udiskslinuxpartition.c
|
|
||||||
@@ -135,8 +135,7 @@ check_authorization (UDisksPartition *partition,
|
|
||||||
caller_uid,
|
|
||||||
&error))
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
- g_clear_error (&error);
|
|
||||||
+ g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -351,7 +350,7 @@ handle_set_flags (UDisksPartition *partition,
|
|
||||||
object = udisks_daemon_util_dup_object (partition, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -499,7 +498,7 @@ handle_set_name (UDisksPartition *partition,
|
|
||||||
object = udisks_daemon_util_dup_object (partition, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -873,7 +872,7 @@ handle_resize (UDisksPartition *partition,
|
|
||||||
object = udisks_daemon_util_dup_object (partition, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -994,7 +993,7 @@ handle_delete (UDisksPartition *partition,
|
|
||||||
object = udisks_daemon_util_dup_object (partition, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1012,9 +1011,7 @@ handle_delete (UDisksPartition *partition,
|
|
||||||
if (!udisks_linux_block_teardown (block, invocation, options, &error))
|
|
||||||
{
|
|
||||||
if (invocation != NULL)
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
- else
|
|
||||||
- g_clear_error (&error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,73 +0,0 @@
|
|||||||
From f486a9fa22c2f9785a4a8fc58eb3be7b0cf934ce Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Sat, 1 Jan 2022 19:59:27 +0100
|
|
||||||
Subject: [PATCH] udiskslinuxpartitiontable: Fix GError ownership
|
|
||||||
|
|
||||||
---
|
|
||||||
src/udiskslinuxpartitiontable.c | 11 ++++-------
|
|
||||||
1 file changed, 4 insertions(+), 7 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxpartitiontable.c b/src/udiskslinuxpartitiontable.c
|
|
||||||
index b4c301095..14a54c9c7 100644
|
|
||||||
--- a/src/udiskslinuxpartitiontable.c
|
|
||||||
+++ b/src/udiskslinuxpartitiontable.c
|
|
||||||
@@ -277,7 +277,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
object = udisks_daemon_util_dup_object (table, &error);
|
|
||||||
if (object == NULL)
|
|
||||||
{
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -293,7 +293,6 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
- error = NULL;
|
|
||||||
if (!udisks_daemon_util_get_caller_uid_sync (daemon,
|
|
||||||
invocation,
|
|
||||||
NULL /* GCancellable */,
|
|
||||||
@@ -301,7 +300,6 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
&error))
|
|
||||||
{
|
|
||||||
g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
- g_clear_error (&error);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -464,7 +462,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
if (!bd_part_set_part_name (device_name, part_spec->path, name, &error))
|
|
||||||
{
|
|
||||||
g_prefix_error (&error, "Error setting name for newly created partition: ");
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
@@ -483,7 +481,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
if (!ret)
|
|
||||||
{
|
|
||||||
g_prefix_error (&error, "Error setting type for newly created partition: ");
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message);
|
|
||||||
goto out;
|
|
||||||
}
|
|
||||||
@@ -520,7 +518,6 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
/* sit and wait for the partition to show up */
|
|
||||||
g_warn_if_fail (wait_data->pos_to_wait_for > 0);
|
|
||||||
wait_data->partition_table_object = object;
|
|
||||||
- error = NULL;
|
|
||||||
partition_object = udisks_daemon_wait_for_object_sync (daemon,
|
|
||||||
wait_for_partition,
|
|
||||||
wait_data,
|
|
||||||
@@ -530,7 +527,7 @@ udisks_linux_partition_table_handle_create_partition (UDisksPartitionTable *ta
|
|
||||||
if (partition_object == NULL)
|
|
||||||
{
|
|
||||||
g_prefix_error (&error, "Error waiting for partition to appear: ");
|
|
||||||
- g_dbus_method_invocation_take_error (invocation, error);
|
|
||||||
+ g_dbus_method_invocation_return_gerror (invocation, error);
|
|
||||||
udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), FALSE, error->message);
|
|
||||||
goto out;
|
|
||||||
}
|
|
@ -1,190 +0,0 @@
|
|||||||
From e039516b103eb9749a3e261c5ee1a9bc110676cf Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 26 Jun 2020 17:42:32 +0200
|
|
||||||
Subject: [PATCH 1/8] daemon: Always flush interface property changes
|
|
||||||
|
|
||||||
Setting properties on a GDBusInterfaceSkeleton from the main thread
|
|
||||||
as a result of uevent is somewhat racy to clients that are waiting
|
|
||||||
for a method call to return that is processed in a separate thread
|
|
||||||
by the daemon. Perhaps there's a race in the GDBus worker thread
|
|
||||||
that processes changes from both threads and send them out on the bus.
|
|
||||||
|
|
||||||
Explicit flush on GDBusInterfaceSkeleton interfaces seems to fix
|
|
||||||
the issue. Such approach was used before on some places, this change
|
|
||||||
adds explicit flushes at all places where properties may change.
|
|
||||||
---
|
|
||||||
src/udiskslinuxblock.c | 2 ++
|
|
||||||
src/udiskslinuxdrive.c | 1 +
|
|
||||||
src/udiskslinuxdriveata.c | 5 +++++
|
|
||||||
src/udiskslinuxencrypted.c | 5 +++++
|
|
||||||
src/udiskslinuxfilesystem.c | 3 +++
|
|
||||||
src/udiskslinuxloop.c | 1 +
|
|
||||||
src/udiskslinuxmdraid.c | 1 +
|
|
||||||
src/udiskslinuxpartition.c | 2 ++
|
|
||||||
src/udiskslinuxpartitiontable.c | 1 +
|
|
||||||
src/udiskslinuxswapspace.c | 1 +
|
|
||||||
10 files changed, 22 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c
|
|
||||||
index ddc7fe1f..34d73f0e 100644
|
|
||||||
--- a/src/udiskslinuxblock.c
|
|
||||||
+++ b/src/udiskslinuxblock.c
|
|
||||||
@@ -893,6 +893,7 @@ update_configuration (UDisksLinuxBlock *block,
|
|
||||||
configuration = g_variant_new ("a(sa{sv})", NULL);
|
|
||||||
}
|
|
||||||
udisks_block_set_configuration (UDISKS_BLOCK (block), configuration);
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (block));
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBMOUNT_UTAB
|
|
||||||
@@ -1280,6 +1281,7 @@ udisks_linux_block_update (UDisksLinuxBlock *block,
|
|
||||||
update_mdraid (block, device, drive, object_manager);
|
|
||||||
|
|
||||||
out:
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (block));
|
|
||||||
if (device != NULL)
|
|
||||||
g_object_unref (device);
|
|
||||||
if (drive != NULL)
|
|
||||||
diff --git a/src/udiskslinuxdrive.c b/src/udiskslinuxdrive.c
|
|
||||||
index e9dd7117..28a90ce9 100644
|
|
||||||
--- a/src/udiskslinuxdrive.c
|
|
||||||
+++ b/src/udiskslinuxdrive.c
|
|
||||||
@@ -950,6 +950,7 @@ udisks_linux_drive_update (UDisksLinuxDrive *drive,
|
|
||||||
ret = update_configuration (drive, object);
|
|
||||||
|
|
||||||
out:
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (drive));
|
|
||||||
if (device != NULL)
|
|
||||||
g_clear_object (&device);
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxdriveata.c b/src/udiskslinuxdriveata.c
|
|
||||||
index d65f3254..4ba66d09 100644
|
|
||||||
--- a/src/udiskslinuxdriveata.c
|
|
||||||
+++ b/src/udiskslinuxdriveata.c
|
|
||||||
@@ -339,6 +339,8 @@ udisks_linux_drive_ata_update (UDisksLinuxDriveAta *drive,
|
|
||||||
update_security (drive, device);
|
|
||||||
|
|
||||||
out:
|
|
||||||
+ /* ensure property changes are sent before the method return */
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (drive));
|
|
||||||
if (device != NULL)
|
|
||||||
g_object_unref (device);
|
|
||||||
|
|
||||||
@@ -681,6 +683,9 @@ udisks_linux_drive_ata_refresh_smart_sync (UDisksLinuxDriveAta *drive,
|
|
||||||
/* update stats again to account for the IO we just did to read the SMART info */
|
|
||||||
update_io_stats (drive, device);
|
|
||||||
|
|
||||||
+ /* ensure property changes are sent before the method return */
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (drive));
|
|
||||||
+
|
|
||||||
out:
|
|
||||||
g_clear_object (&device);
|
|
||||||
if (d != NULL)
|
|
||||||
diff --git a/src/udiskslinuxencrypted.c b/src/udiskslinuxencrypted.c
|
|
||||||
index 73c78873..8a230fda 100644
|
|
||||||
--- a/src/udiskslinuxencrypted.c
|
|
||||||
+++ b/src/udiskslinuxencrypted.c
|
|
||||||
@@ -237,6 +237,8 @@ udisks_linux_encrypted_update (UDisksLinuxEncrypted *encrypted,
|
|
||||||
update_metadata_size (encrypted, object);
|
|
||||||
|
|
||||||
udisks_linux_block_encrypted_unlock (block);
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (encrypted));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
@@ -630,6 +632,9 @@ handle_unlock (UDisksEncrypted *encrypted,
|
|
||||||
g_udev_device_get_sysfs_attr (cleartext_device->udev_device, "dm/uuid"),
|
|
||||||
caller_uid);
|
|
||||||
|
|
||||||
+ /* ensure property changes are sent before the method return */
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (encrypted));
|
|
||||||
+
|
|
||||||
udisks_encrypted_complete_unlock (encrypted,
|
|
||||||
invocation,
|
|
||||||
g_dbus_object_get_object_path (G_DBUS_OBJECT (cleartext_object)));
|
|
||||||
diff --git a/src/udiskslinuxfilesystem.c b/src/udiskslinuxfilesystem.c
|
|
||||||
index 669fc40b..3ae11c32 100644
|
|
||||||
--- a/src/udiskslinuxfilesystem.c
|
|
||||||
+++ b/src/udiskslinuxfilesystem.c
|
|
||||||
@@ -277,6 +277,8 @@ udisks_linux_filesystem_update (UDisksLinuxFilesystem *filesystem,
|
|
||||||
if (! skip_fs_size)
|
|
||||||
udisks_filesystem_set_size (UDISKS_FILESYSTEM (filesystem), get_filesystem_size (object));
|
|
||||||
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (filesystem));
|
|
||||||
+
|
|
||||||
g_object_unref (device);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1865,6 +1867,7 @@ handle_resize (UDisksFilesystem *filesystem,
|
|
||||||
UDISKS_DEFAULT_WAIT_TIMEOUT);
|
|
||||||
|
|
||||||
udisks_filesystem_set_size (filesystem, get_filesystem_size (UDISKS_LINUX_BLOCK_OBJECT (object)));
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (filesystem));
|
|
||||||
udisks_filesystem_complete_resize (filesystem, invocation);
|
|
||||||
udisks_simple_job_complete (UDISKS_SIMPLE_JOB (job), TRUE, NULL);
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxloop.c b/src/udiskslinuxloop.c
|
|
||||||
index 6c8a4561..5d7e3553 100644
|
|
||||||
--- a/src/udiskslinuxloop.c
|
|
||||||
+++ b/src/udiskslinuxloop.c
|
|
||||||
@@ -187,6 +187,7 @@ udisks_linux_loop_update (UDisksLinuxLoop *loop,
|
|
||||||
}
|
|
||||||
udisks_loop_set_setup_by_uid (UDISKS_LOOP (loop), setup_by_uid);
|
|
||||||
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (loop));
|
|
||||||
g_object_unref (device);
|
|
||||||
}
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxmdraid.c b/src/udiskslinuxmdraid.c
|
|
||||||
index 85fc2a3b..7eca9764 100644
|
|
||||||
--- a/src/udiskslinuxmdraid.c
|
|
||||||
+++ b/src/udiskslinuxmdraid.c
|
|
||||||
@@ -512,6 +512,7 @@ udisks_linux_mdraid_update (UDisksLinuxMDRaid *mdraid,
|
|
||||||
uuid));
|
|
||||||
|
|
||||||
out:
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (mdraid));
|
|
||||||
if (raid_data)
|
|
||||||
bd_md_examine_data_free (raid_data);
|
|
||||||
g_free (sync_completed);
|
|
||||||
diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c
|
|
||||||
index 97ba02fe..ff0fdfc0 100644
|
|
||||||
--- a/src/udiskslinuxpartition.c
|
|
||||||
+++ b/src/udiskslinuxpartition.c
|
|
||||||
@@ -312,6 +312,8 @@ udisks_linux_partition_update (UDisksLinuxPartition *partition,
|
|
||||||
udisks_partition_set_is_container (UDISKS_PARTITION (partition), is_container);
|
|
||||||
udisks_partition_set_is_contained (UDISKS_PARTITION (partition), is_contained);
|
|
||||||
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (partition));
|
|
||||||
+
|
|
||||||
g_free (name);
|
|
||||||
g_clear_object (&device);
|
|
||||||
g_clear_object (&disk_block_object);
|
|
||||||
diff --git a/src/udiskslinuxpartitiontable.c b/src/udiskslinuxpartitiontable.c
|
|
||||||
index b26849bc..e43a0708 100644
|
|
||||||
--- a/src/udiskslinuxpartitiontable.c
|
|
||||||
+++ b/src/udiskslinuxpartitiontable.c
|
|
||||||
@@ -146,6 +146,7 @@ udisks_linux_partition_table_update (UDisksLinuxPartitionTable *table,
|
|
||||||
|
|
||||||
udisks_partition_table_set_partitions (UDISKS_PARTITION_TABLE (table),
|
|
||||||
partition_object_paths);
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (table));
|
|
||||||
|
|
||||||
|
|
||||||
g_free (partition_object_paths);
|
|
||||||
diff --git a/src/udiskslinuxswapspace.c b/src/udiskslinuxswapspace.c
|
|
||||||
index ee103528..bb47f3d4 100644
|
|
||||||
--- a/src/udiskslinuxswapspace.c
|
|
||||||
+++ b/src/udiskslinuxswapspace.c
|
|
||||||
@@ -127,6 +127,7 @@ udisks_linux_swapspace_update (UDisksLinuxSwapspace *swapspace,
|
|
||||||
active = TRUE;
|
|
||||||
udisks_swapspace_set_active (UDISKS_SWAPSPACE (swapspace), active);
|
|
||||||
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (swapspace));
|
|
||||||
g_object_unref (device);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,39 +0,0 @@
|
|||||||
commit 214d65ae4d2b779fc1674420a042082ae029eb6b
|
|
||||||
Author: Vojtech Trefny <vtrefny@redhat.com>
|
|
||||||
Date: Mon Jul 13 16:16:47 2020 +0200
|
|
||||||
|
|
||||||
dbus_tests: Fix getting list of SATA drives for Drive.ATA test
|
|
||||||
|
|
||||||
Resolves: rhbz#1855785
|
|
||||||
|
|
||||||
diff --git a/src/tests/dbus-tests/test_drive_ata.py b/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
index ff6d01cc..df298a9c 100644
|
|
||||||
--- a/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
+++ b/src/tests/dbus-tests/test_drive_ata.py
|
|
||||||
@@ -14,8 +14,24 @@ SMART_ATA_CHECKSUM_FAIL = 1 << 2
|
|
||||||
smart_unsupported = set()
|
|
||||||
smart_supported = set()
|
|
||||||
|
|
||||||
-sata_disks = (dev for dev in os.listdir("/dev") if re.match(r'sd[a-z]+$', dev))
|
|
||||||
-for disk in sata_disks:
|
|
||||||
+
|
|
||||||
+DISK_PATH = "/dev/disk/by-path/"
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+def _get_sata_disks():
|
|
||||||
+ sata_disks = []
|
|
||||||
+ by_path = os.listdir(DISK_PATH)
|
|
||||||
+ for dev in by_path:
|
|
||||||
+ if "ata" in dev and "part" not in dev:
|
|
||||||
+ path = os.path.realpath(os.path.join(DISK_PATH, dev))
|
|
||||||
+ name = os.path.basename(path)
|
|
||||||
+ if name.startswith("sd"):
|
|
||||||
+ # ignore devices like CD drives etc.
|
|
||||||
+ sata_disks.append(name)
|
|
||||||
+ return sata_disks
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+for disk in _get_sata_disks():
|
|
||||||
ret, out = UdisksTestCase.run_command("smartctl -a /dev/%s" % disk)
|
|
||||||
|
|
||||||
# Only the following bits in the exit status mean the device failed to
|
|
@ -1,25 +0,0 @@
|
|||||||
From 195f3b030de32f5993da736c75e6a9bd76e6a7c7 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 26 Jun 2020 17:56:39 +0200
|
|
||||||
Subject: [PATCH 5/8] iscsi: Always flush interface property changes
|
|
||||||
|
|
||||||
---
|
|
||||||
modules/iscsi/udiskslinuxiscsisessionobject.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules/iscsi/udiskslinuxiscsisessionobject.c b/modules/iscsi/udiskslinuxiscsisessionobject.c
|
|
||||||
index 9e525e3f..a43cecd1 100644
|
|
||||||
--- a/modules/iscsi/udiskslinuxiscsisessionobject.c
|
|
||||||
+++ b/modules/iscsi/udiskslinuxiscsisessionobject.c
|
|
||||||
@@ -355,6 +355,8 @@ udisks_linux_iscsi_session_object_update_iface (UDisksLinuxISCSISessionObject *s
|
|
||||||
udisks_iscsi_session_set_lu_reset_timeout (iface, session_info.tmo.lu_reset_tmo);
|
|
||||||
udisks_iscsi_session_set_recovery_timeout (iface, session_info.tmo.recovery_tmo);
|
|
||||||
udisks_iscsi_session_set_tgt_reset_timeout (iface, session_info.tmo.tgt_reset_tmo);
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
From 861a0d8721536e2d210b79c845bb4f5b266b037f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 26 Jun 2020 17:57:01 +0200
|
|
||||||
Subject: [PATCH 6/8] lsm: Always flush interface property changes
|
|
||||||
|
|
||||||
---
|
|
||||||
modules/lsm/lsm_linux_drive.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules/lsm/lsm_linux_drive.c b/modules/lsm/lsm_linux_drive.c
|
|
||||||
index 19e68c2f..6433c308 100644
|
|
||||||
--- a/modules/lsm/lsm_linux_drive.c
|
|
||||||
+++ b/modules/lsm/lsm_linux_drive.c
|
|
||||||
@@ -220,6 +220,8 @@ _fill_drive_lsm (UDisksLinuxDriveLSM *drive_lsm,
|
|
||||||
udisks_drive_lsm_set_min_io_size (std_drv_lsm, lsm_vol_data->min_io_size);
|
|
||||||
udisks_drive_lsm_set_opt_io_size (std_drv_lsm, lsm_vol_data->opt_io_size);
|
|
||||||
udisks_drive_lsm_set_raid_disk_count (std_drv_lsm, lsm_vol_data->raid_disk_count);
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (std_drv_lsm));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,110 +0,0 @@
|
|||||||
From 39d13907f712269bb9debd0fd8a0852347c98136 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 26 Jun 2020 17:55:53 +0200
|
|
||||||
Subject: [PATCH 2/8] lvm2: Always flush interface property changes
|
|
||||||
|
|
||||||
---
|
|
||||||
modules/lvm2/udiskslinuxlogicalvolume.c | 3 +++
|
|
||||||
modules/lvm2/udiskslinuxphysicalvolume.c | 2 ++
|
|
||||||
modules/lvm2/udiskslinuxvdovolume.c | 2 ++
|
|
||||||
modules/lvm2/udiskslinuxvolumegroup.c | 3 +++
|
|
||||||
modules/lvm2/udiskslinuxvolumegroupobject.c | 3 +++
|
|
||||||
5 files changed, 13 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/modules/lvm2/udiskslinuxlogicalvolume.c b/modules/lvm2/udiskslinuxlogicalvolume.c
|
|
||||||
index 373cee2e..c0f074d8 100644
|
|
||||||
--- a/modules/lvm2/udiskslinuxlogicalvolume.c
|
|
||||||
+++ b/modules/lvm2/udiskslinuxlogicalvolume.c
|
|
||||||
@@ -229,6 +229,8 @@ udisks_linux_logical_volume_update (UDisksLinuxLogicalVolume *logical_volume
|
|
||||||
logical_volume->needs_udev_hack = FALSE;
|
|
||||||
g_free (dev_file);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
@@ -248,6 +250,7 @@ udisks_linux_logical_volume_update_etctabs (UDisksLinuxLogicalVolume *logica
|
|
||||||
udisks_logical_volume_set_child_configuration (iface,
|
|
||||||
udisks_linux_find_child_configuration (daemon,
|
|
||||||
uuid));
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
diff --git a/modules/lvm2/udiskslinuxphysicalvolume.c b/modules/lvm2/udiskslinuxphysicalvolume.c
|
|
||||||
index 27043030..36e7c322 100644
|
|
||||||
--- a/modules/lvm2/udiskslinuxphysicalvolume.c
|
|
||||||
+++ b/modules/lvm2/udiskslinuxphysicalvolume.c
|
|
||||||
@@ -143,6 +143,8 @@ udisks_linux_physical_volume_update (UDisksLinuxPhysicalVolume *physical_vo
|
|
||||||
udisks_physical_volume_set_size (iface, pv_info->pv_size);
|
|
||||||
udisks_physical_volume_set_free_size (iface, pv_info->pv_free);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
diff --git a/modules/lvm2/udiskslinuxvdovolume.c b/modules/lvm2/udiskslinuxvdovolume.c
|
|
||||||
index 317eddc2..430e2814 100644
|
|
||||||
--- a/modules/lvm2/udiskslinuxvdovolume.c
|
|
||||||
+++ b/modules/lvm2/udiskslinuxvdovolume.c
|
|
||||||
@@ -177,6 +177,8 @@ udisks_linux_vdo_volume_update (UDisksLinuxVDOVolume *vdo_volume,
|
|
||||||
|
|
||||||
udisks_vdo_volume_set_compression (iface, vdo_info->compression);
|
|
||||||
udisks_vdo_volume_set_deduplication (iface, vdo_info->deduplication);
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
diff --git a/modules/lvm2/udiskslinuxvolumegroup.c b/modules/lvm2/udiskslinuxvolumegroup.c
|
|
||||||
index aad2193e..3fbf6f02 100644
|
|
||||||
--- a/modules/lvm2/udiskslinuxvolumegroup.c
|
|
||||||
+++ b/modules/lvm2/udiskslinuxvolumegroup.c
|
|
||||||
@@ -136,11 +136,14 @@ udisks_linux_volume_group_update (UDisksLinuxVolumeGroup *volume_group,
|
|
||||||
gboolean *needs_polling_ret)
|
|
||||||
{
|
|
||||||
UDisksVolumeGroup *iface = UDISKS_VOLUME_GROUP (volume_group);
|
|
||||||
+
|
|
||||||
udisks_volume_group_set_name (iface, vg_info->name);
|
|
||||||
udisks_volume_group_set_uuid (iface, vg_info->uuid);
|
|
||||||
udisks_volume_group_set_size (iface, vg_info->size);
|
|
||||||
udisks_volume_group_set_free_size (iface, vg_info->free);
|
|
||||||
udisks_volume_group_set_extent_size (iface, vg_info->extent_size);
|
|
||||||
+
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
diff --git a/modules/lvm2/udiskslinuxvolumegroupobject.c b/modules/lvm2/udiskslinuxvolumegroupobject.c
|
|
||||||
index 50e9c640..e3bc8dfc 100644
|
|
||||||
--- a/modules/lvm2/udiskslinuxvolumegroupobject.c
|
|
||||||
+++ b/modules/lvm2/udiskslinuxvolumegroupobject.c
|
|
||||||
@@ -442,6 +442,7 @@ block_object_update_lvm_iface (UDisksLinuxBlockObject *object,
|
|
||||||
|
|
||||||
udisks_linux_block_lvm2_update (UDISKS_LINUX_BLOCK_LVM2 (iface_block_lvm2), object);
|
|
||||||
udisks_block_lvm2_set_logical_volume (iface_block_lvm2, lv_obj_path);
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface_block_lvm2));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
@@ -456,6 +457,7 @@ lv_object_update_block_path (UDisksLinuxBlockObject *block_object,
|
|
||||||
{
|
|
||||||
block_objpath = g_dbus_object_get_object_path (G_DBUS_OBJECT (block_object));
|
|
||||||
udisks_logical_volume_set_block_device (UDISKS_LOGICAL_VOLUME (lv), block_objpath);
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (lv));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -695,6 +697,7 @@ update_vg (GObject *source_obj,
|
|
||||||
bd_lvm_vgdata_free (vg_info);
|
|
||||||
lv_list_free (lvs);
|
|
||||||
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (object->iface_volume_group));
|
|
||||||
g_object_unref (object);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
From 890a0f3ca8cb5894d1764752c98b90dcb6274d6d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
||||||
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,
|
|
@ -1,29 +0,0 @@
|
|||||||
From fdf6b233df960e6903c62b86735d86c59d967d12 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
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
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
From 724ff8679e0ae0fd4d84f4e6c1b36007e648e8ca Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 26 Jun 2020 17:57:12 +0200
|
|
||||||
Subject: [PATCH 7/8] zram: Always flush interface property changes
|
|
||||||
|
|
||||||
---
|
|
||||||
modules/zram/udiskslinuxblockzram.c | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/modules/zram/udiskslinuxblockzram.c b/modules/zram/udiskslinuxblockzram.c
|
|
||||||
index 132d4174..1bae3686 100644
|
|
||||||
--- a/modules/zram/udiskslinuxblockzram.c
|
|
||||||
+++ b/modules/zram/udiskslinuxblockzram.c
|
|
||||||
@@ -277,6 +277,7 @@ udisks_linux_block_zram_update (UDisksLinuxBlockZRAM *zramblock,
|
|
||||||
|
|
||||||
udisks_block_zram_set_active (iface, bd_swap_swapstatus (dev_file, &error));
|
|
||||||
out:
|
|
||||||
+ g_dbus_interface_skeleton_flush (G_DBUS_INTERFACE_SKELETON (iface));
|
|
||||||
if (zram_info)
|
|
||||||
bd_kbd_zram_stats_free (zram_info);
|
|
||||||
if (error)
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,528 +0,0 @@
|
|||||||
From 8d5c90a1f4bbe548a1ae361f8d69970669d6e72e Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 13 Nov 2020 16:52:11 +0100
|
|
||||||
Subject: [PATCH 1/2] udisksdaemonutil: Refactor
|
|
||||||
udisks_daemon_util_trigger_uevent() out of UDisksLinuxBlockObject
|
|
||||||
|
|
||||||
This decouples uevent triggering from UDisksLinuxBlockObject as sometimes
|
|
||||||
we don't have a block object yet or it's outdated.
|
|
||||||
---
|
|
||||||
doc/udisks2-sections.txt.daemon.sections.in | 2 +
|
|
||||||
src/udisksdaemonutil.c | 230 ++++++++++++++++++++
|
|
||||||
src/udisksdaemonutil.h | 7 +
|
|
||||||
src/udiskslinuxblockobject.c | 180 ++-------------
|
|
||||||
4 files changed, 253 insertions(+), 166 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/doc/udisks2-sections.txt.daemon.sections.in b/doc/udisks2-sections.txt.daemon.sections.in
|
|
||||||
index 26c3c2cd..3030fa95 100644
|
|
||||||
--- a/doc/udisks2-sections.txt.daemon.sections.in
|
|
||||||
+++ b/doc/udisks2-sections.txt.daemon.sections.in
|
|
||||||
@@ -307,6 +307,8 @@ udisks_daemon_util_file_set_contents
|
|
||||||
udisks_daemon_util_on_user_seat
|
|
||||||
udisks_daemon_util_get_free_mdraid_device
|
|
||||||
udisks_ata_identify_get_word
|
|
||||||
+udisks_daemon_util_trigger_uevent
|
|
||||||
+udisks_daemon_util_trigger_uevent_sync
|
|
||||||
</SECTION>
|
|
||||||
|
|
||||||
<SECTION>
|
|
||||||
diff --git a/src/udisksdaemonutil.c b/src/udisksdaemonutil.c
|
|
||||||
index 75b877a0..d16c0766 100644
|
|
||||||
--- a/src/udisksdaemonutil.c
|
|
||||||
+++ b/src/udisksdaemonutil.c
|
|
||||||
@@ -34,10 +34,14 @@
|
|
||||||
#include <limits.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
+#include <blockdev/blockdev.h>
|
|
||||||
+
|
|
||||||
#include "udisksdaemon.h"
|
|
||||||
#include "udisksdaemonutil.h"
|
|
||||||
#include "udisksstate.h"
|
|
||||||
#include "udiskslogging.h"
|
|
||||||
+#include "udiskslinuxdevice.h"
|
|
||||||
+#include "udiskslinuxprovider.h"
|
|
||||||
#include "udiskslinuxblockobject.h"
|
|
||||||
#include "udiskslinuxdriveobject.h"
|
|
||||||
|
|
||||||
@@ -1626,3 +1630,229 @@ udisks_ata_identify_get_word (const guchar *identify_data, guint word_number)
|
|
||||||
out:
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
+
|
|
||||||
+static volatile guint uevent_serial = 0;
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+trigger_uevent (const gchar *path, const gchar *str)
|
|
||||||
+{
|
|
||||||
+ gint fd;
|
|
||||||
+
|
|
||||||
+ fd = open (path, O_WRONLY);
|
|
||||||
+ if (fd < 0)
|
|
||||||
+ {
|
|
||||||
+ udisks_warning ("Error opening %s while triggering uevent: %m", path);
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (write (fd, str, strlen (str)) != (ssize_t) strlen (str))
|
|
||||||
+ {
|
|
||||||
+ udisks_warning ("Error writing '%s' to file %s: %m", str, path);
|
|
||||||
+ close (fd);
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ close (fd);
|
|
||||||
+ return TRUE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+typedef struct
|
|
||||||
+{
|
|
||||||
+ UDisksDaemon *daemon;
|
|
||||||
+ GMainLoop *main_loop;
|
|
||||||
+ guint serial;
|
|
||||||
+ gchar *uevent_path;
|
|
||||||
+ gboolean success;
|
|
||||||
+} SynthUeventData;
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+trigger_uevent_idle_cb (gpointer user_data)
|
|
||||||
+{
|
|
||||||
+ SynthUeventData *data = user_data;
|
|
||||||
+ gchar *str;
|
|
||||||
+
|
|
||||||
+ str = g_strdup_printf ("change %s UDISKSSERIAL=%u", udisks_daemon_get_uuid (data->daemon), data->serial);
|
|
||||||
+
|
|
||||||
+ if (! trigger_uevent (data->uevent_path, str))
|
|
||||||
+ {
|
|
||||||
+ /* kernel refused our string, try simple "change" but don't wait for it */
|
|
||||||
+ trigger_uevent (data->uevent_path, "change");
|
|
||||||
+ data->success = FALSE;
|
|
||||||
+ g_main_loop_quit (data->main_loop);
|
|
||||||
+ }
|
|
||||||
+ g_free (str);
|
|
||||||
+
|
|
||||||
+ /* remove the source */
|
|
||||||
+ return FALSE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static gboolean
|
|
||||||
+uevent_wait_timeout_cb (gpointer user_data)
|
|
||||||
+{
|
|
||||||
+ SynthUeventData *data = user_data;
|
|
||||||
+
|
|
||||||
+ data->success = FALSE;
|
|
||||||
+ g_main_loop_quit (data->main_loop);
|
|
||||||
+
|
|
||||||
+ /* remove the source */
|
|
||||||
+ return FALSE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void
|
|
||||||
+uevent_probed_cb (UDisksLinuxProvider *provider,
|
|
||||||
+ const gchar *action,
|
|
||||||
+ UDisksLinuxDevice *device,
|
|
||||||
+ gpointer user_data)
|
|
||||||
+{
|
|
||||||
+ SynthUeventData *data = user_data;
|
|
||||||
+ const gchar *received_serial_str;
|
|
||||||
+ gint64 received_serial;
|
|
||||||
+ gchar *endptr;
|
|
||||||
+
|
|
||||||
+ received_serial_str = g_udev_device_get_property (device->udev_device, "SYNTH_ARG_UDISKSSERIAL");
|
|
||||||
+ if (received_serial_str != NULL)
|
|
||||||
+ {
|
|
||||||
+ endptr = (gchar *) received_serial_str;
|
|
||||||
+ received_serial = g_ascii_strtoll (received_serial_str, &endptr, 0);
|
|
||||||
+ if (endptr != received_serial_str && received_serial == data->serial)
|
|
||||||
+ {
|
|
||||||
+ data->success = TRUE;
|
|
||||||
+ g_main_loop_quit (data->main_loop);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * udisks_daemon_util_trigger_uevent:
|
|
||||||
+ * @daemon: A #UDisksDaemon.
|
|
||||||
+ * @device_path: Block device path.
|
|
||||||
+ *
|
|
||||||
+ * Triggers a 'change' uevent in the kernel.
|
|
||||||
+ *
|
|
||||||
+ * The triggered event will bubble up from the kernel through the udev
|
|
||||||
+ * stack and will eventually be received by the udisks daemon process
|
|
||||||
+ * itself. This method does not wait for the event to be received.
|
|
||||||
+ */
|
|
||||||
+void
|
|
||||||
+udisks_daemon_util_trigger_uevent (UDisksDaemon *daemon,
|
|
||||||
+ const gchar *device_path)
|
|
||||||
+{
|
|
||||||
+ GUdevClient *gudev_client;
|
|
||||||
+ GUdevDevice *gudev_device;
|
|
||||||
+ gchar *path;
|
|
||||||
+
|
|
||||||
+ g_return_if_fail (UDISKS_IS_DAEMON (daemon));
|
|
||||||
+ g_return_if_fail (device_path != NULL);
|
|
||||||
+
|
|
||||||
+ gudev_client = udisks_linux_provider_get_udev_client (udisks_daemon_get_linux_provider (daemon));
|
|
||||||
+ gudev_device = g_udev_client_query_by_device_file (gudev_client, device_path);
|
|
||||||
+ if (gudev_device == NULL)
|
|
||||||
+ {
|
|
||||||
+ udisks_critical ("Device %s not found in udev database, skipping uevent trigger", device_path);
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ path = g_build_filename (g_udev_device_get_sysfs_path (gudev_device), "uevent", NULL);
|
|
||||||
+ trigger_uevent (path, "change");
|
|
||||||
+ g_free (path);
|
|
||||||
+
|
|
||||||
+ g_object_unref (gudev_device);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * udisks_daemon_util_trigger_uevent_sync:
|
|
||||||
+ * @daemon: A #UDisksDaemon.
|
|
||||||
+ * @device_path: Block device path.
|
|
||||||
+ * @timeout_seconds: Maximum time to wait for the uevent (in seconds).
|
|
||||||
+ *
|
|
||||||
+ * Triggers a 'change' uevent in the kernel and waits until it's received and
|
|
||||||
+ * processed by udisks.
|
|
||||||
+ *
|
|
||||||
+ * Unlike udisks_daemon_util_trigger_uevent() that just triggers
|
|
||||||
+ * a synthetic uevent to the kernel, this call will actually block and wait until
|
|
||||||
+ * the #UDisksLinuxProvider receives the uevent, performs probing and processes
|
|
||||||
+ * the uevent further down the UDisks object stack. Upon returning from this
|
|
||||||
+ * function call the caller may assume the event has been fully processed, all
|
|
||||||
+ * D-Bus objects are updated and settled. Typically used in busy wait for
|
|
||||||
+ * a particular D-Bus interface.
|
|
||||||
+ *
|
|
||||||
+ * Note that this uses synthetic uevent tagging and only works on linux kernel
|
|
||||||
+ * 4.13 and higher. In case an older kernel is detected this acts like the classic
|
|
||||||
+ * udisks_daemon_util_trigger_uevent() call and %FALSE is returned.
|
|
||||||
+ *
|
|
||||||
+ * Returns: %TRUE if the uevent has been successfully received, %FALSE otherwise
|
|
||||||
+ * or when the kernel version is too old.
|
|
||||||
+ */
|
|
||||||
+gboolean
|
|
||||||
+udisks_daemon_util_trigger_uevent_sync (UDisksDaemon *daemon,
|
|
||||||
+ const gchar *device_path,
|
|
||||||
+ guint timeout_seconds)
|
|
||||||
+{
|
|
||||||
+ UDisksLinuxProvider *provider;
|
|
||||||
+ GUdevClient *gudev_client;
|
|
||||||
+ GUdevDevice *gudev_device;
|
|
||||||
+ SynthUeventData data;
|
|
||||||
+ GMainContext *main_context;
|
|
||||||
+ GSource *idle_source;
|
|
||||||
+ GSource *timeout_source;
|
|
||||||
+
|
|
||||||
+ g_return_val_if_fail (UDISKS_IS_DAEMON (daemon), FALSE);
|
|
||||||
+ g_return_val_if_fail (device_path != NULL, FALSE);
|
|
||||||
+
|
|
||||||
+ if (bd_utils_check_linux_version (4, 13, 0) < 0)
|
|
||||||
+ {
|
|
||||||
+ udisks_daemon_util_trigger_uevent (daemon, device_path);
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ provider = udisks_daemon_get_linux_provider (daemon);
|
|
||||||
+ gudev_client = udisks_linux_provider_get_udev_client (provider);
|
|
||||||
+ gudev_device = g_udev_client_query_by_device_file (gudev_client, device_path);
|
|
||||||
+ if (gudev_device == NULL)
|
|
||||||
+ {
|
|
||||||
+ udisks_critical ("Device %s not found in udev database, skipping uevent trigger", device_path);
|
|
||||||
+ return FALSE;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ data.daemon = daemon;
|
|
||||||
+ data.uevent_path = g_build_filename (g_udev_device_get_sysfs_path (gudev_device), "uevent", NULL);
|
|
||||||
+ data.serial = g_atomic_int_add (&uevent_serial, 1);
|
|
||||||
+
|
|
||||||
+ main_context = g_main_context_new ();
|
|
||||||
+ g_main_context_push_thread_default (main_context);
|
|
||||||
+ data.main_loop = g_main_loop_new (main_context, FALSE);
|
|
||||||
+
|
|
||||||
+ /* queue the actual trigger in the loop */
|
|
||||||
+ idle_source = g_idle_source_new ();
|
|
||||||
+ g_source_set_callback (idle_source, (GSourceFunc) trigger_uevent_idle_cb, &data, NULL);
|
|
||||||
+ g_source_attach (idle_source, main_context);
|
|
||||||
+ g_source_unref (idle_source);
|
|
||||||
+
|
|
||||||
+ /* add timeout as a fallback */
|
|
||||||
+ timeout_source = g_timeout_source_new_seconds (timeout_seconds);
|
|
||||||
+ g_source_set_callback (timeout_source, (GSourceFunc) uevent_wait_timeout_cb, &data, NULL);
|
|
||||||
+ g_source_attach (timeout_source, main_context);
|
|
||||||
+ g_source_unref (timeout_source);
|
|
||||||
+
|
|
||||||
+ /* catch incoming uevents */
|
|
||||||
+ g_signal_connect (provider, "uevent-probed", G_CALLBACK (uevent_probed_cb), &data);
|
|
||||||
+
|
|
||||||
+ data.success = FALSE;
|
|
||||||
+ g_main_loop_run (data.main_loop);
|
|
||||||
+
|
|
||||||
+ g_signal_handlers_disconnect_by_func (provider, uevent_probed_cb, &data);
|
|
||||||
+ g_main_context_pop_thread_default (main_context);
|
|
||||||
+
|
|
||||||
+ g_main_loop_unref (data.main_loop);
|
|
||||||
+ g_main_context_unref (main_context);
|
|
||||||
+
|
|
||||||
+ g_free (data.uevent_path);
|
|
||||||
+ g_object_unref (gudev_device);
|
|
||||||
+
|
|
||||||
+ return data.success;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
diff --git a/src/udisksdaemonutil.h b/src/udisksdaemonutil.h
|
|
||||||
index 4fe36214..2edf2122 100644
|
|
||||||
--- a/src/udisksdaemonutil.h
|
|
||||||
+++ b/src/udisksdaemonutil.h
|
|
||||||
@@ -51,6 +51,13 @@ guint64 udisks_daemon_util_block_get_size (GUdevDevice *device,
|
|
||||||
gboolean *out_media_available,
|
|
||||||
gboolean *out_media_change_detected);
|
|
||||||
|
|
||||||
+void udisks_daemon_util_trigger_uevent (UDisksDaemon *daemon,
|
|
||||||
+ const gchar *device_path);
|
|
||||||
+
|
|
||||||
+gboolean udisks_daemon_util_trigger_uevent_sync (UDisksDaemon *daemon,
|
|
||||||
+ const gchar *device_path,
|
|
||||||
+ guint timeout_seconds);
|
|
||||||
+
|
|
||||||
gchar *udisks_daemon_util_resolve_link (const gchar *path,
|
|
||||||
const gchar *name);
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxblockobject.c b/src/udiskslinuxblockobject.c
|
|
||||||
index 42ab17d7..5a68c84b 100644
|
|
||||||
--- a/src/udiskslinuxblockobject.c
|
|
||||||
+++ b/src/udiskslinuxblockobject.c
|
|
||||||
@@ -38,8 +38,6 @@
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <glib/gstdio.h>
|
|
||||||
|
|
||||||
-#include <blockdev/blockdev.h>
|
|
||||||
-
|
|
||||||
#include "udiskslogging.h"
|
|
||||||
#include "udisksdaemon.h"
|
|
||||||
#include "udisksdaemonutil.h"
|
|
||||||
@@ -959,122 +957,24 @@ on_mount_monitor_mount_removed (UDisksMountMonitor *monitor,
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
|
|
||||||
-static volatile guint uevent_serial = 0;
|
|
||||||
-
|
|
||||||
-static gboolean
|
|
||||||
-trigger_uevent (const gchar *path, const gchar *str)
|
|
||||||
-{
|
|
||||||
- gint fd;
|
|
||||||
-
|
|
||||||
- fd = open (path, O_WRONLY);
|
|
||||||
- if (fd < 0)
|
|
||||||
- {
|
|
||||||
- udisks_warning ("Error opening %s while triggering uevent: %m", path);
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- if (write (fd, str, strlen (str)) != (ssize_t) strlen (str))
|
|
||||||
- {
|
|
||||||
- udisks_warning ("Error writing '%s' to file %s: %m", str, path);
|
|
||||||
- close (fd);
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- close (fd);
|
|
||||||
- return TRUE;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-typedef struct
|
|
||||||
-{
|
|
||||||
- UDisksLinuxBlockObject *object;
|
|
||||||
- GMainLoop *main_loop;
|
|
||||||
- guint serial;
|
|
||||||
- gchar *uevent_path;
|
|
||||||
- gboolean success;
|
|
||||||
-} SynthUeventData;
|
|
||||||
-
|
|
||||||
-static gboolean
|
|
||||||
-trigger_uevent_idle_cb (gpointer user_data)
|
|
||||||
-{
|
|
||||||
- SynthUeventData *data = user_data;
|
|
||||||
- gchar *str;
|
|
||||||
-
|
|
||||||
- str = g_strdup_printf ("change %s UDISKSSERIAL=%u", udisks_daemon_get_uuid (data->object->daemon), data->serial);
|
|
||||||
-
|
|
||||||
- if (! trigger_uevent (data->uevent_path, str))
|
|
||||||
- {
|
|
||||||
- /* kernel refused our string, try simple "change" but don't wait for it */
|
|
||||||
- trigger_uevent (data->uevent_path, "change");
|
|
||||||
- data->success = FALSE;
|
|
||||||
- g_main_loop_quit (data->main_loop);
|
|
||||||
- }
|
|
||||||
- g_free (str);
|
|
||||||
-
|
|
||||||
- /* remove the source */
|
|
||||||
- return FALSE;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-static gboolean
|
|
||||||
-uevent_wait_timeout_cb (gpointer user_data)
|
|
||||||
-{
|
|
||||||
- SynthUeventData *data = user_data;
|
|
||||||
-
|
|
||||||
- data->success = FALSE;
|
|
||||||
- g_main_loop_quit (data->main_loop);
|
|
||||||
-
|
|
||||||
- /* remove the source */
|
|
||||||
- return FALSE;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-static void
|
|
||||||
-uevent_probed_cb (UDisksLinuxProvider *provider,
|
|
||||||
- const gchar *action,
|
|
||||||
- UDisksLinuxDevice *device,
|
|
||||||
- gpointer user_data)
|
|
||||||
-{
|
|
||||||
- SynthUeventData *data = user_data;
|
|
||||||
- const gchar *received_serial_str;
|
|
||||||
- gint64 received_serial;
|
|
||||||
- gchar *endptr;
|
|
||||||
-
|
|
||||||
- received_serial_str = g_udev_device_get_property (device->udev_device, "SYNTH_ARG_UDISKSSERIAL");
|
|
||||||
- if (received_serial_str != NULL)
|
|
||||||
- {
|
|
||||||
- endptr = (gchar *) received_serial_str;
|
|
||||||
- received_serial = g_ascii_strtoll (received_serial_str, &endptr, 0);
|
|
||||||
- if (endptr != received_serial_str && received_serial == data->serial)
|
|
||||||
- {
|
|
||||||
- data->success = TRUE;
|
|
||||||
- g_main_loop_quit (data->main_loop);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
/**
|
|
||||||
* udisks_linux_block_object_trigger_uevent:
|
|
||||||
* @object: A #UDisksLinuxBlockObject.
|
|
||||||
*
|
|
||||||
* Triggers a 'change' uevent in the kernel.
|
|
||||||
*
|
|
||||||
- * The triggered event will bubble up from the kernel through the udev
|
|
||||||
- * stack and will eventually be received by the udisks daemon process
|
|
||||||
- * itself. This method does not wait for the event to be received.
|
|
||||||
+ * Refer to udisks_daemon_util_trigger_uevent() for detailed description.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
udisks_linux_block_object_trigger_uevent (UDisksLinuxBlockObject *object)
|
|
||||||
{
|
|
||||||
- UDisksLinuxDevice *device;
|
|
||||||
- gchar *path;
|
|
||||||
+ gchar *device_file;
|
|
||||||
|
|
||||||
g_return_if_fail (UDISKS_IS_LINUX_BLOCK_OBJECT (object));
|
|
||||||
|
|
||||||
- device = udisks_linux_block_object_get_device (object);
|
|
||||||
- path = g_strconcat (g_udev_device_get_sysfs_path (device->udev_device), "/uevent", NULL);
|
|
||||||
-
|
|
||||||
- trigger_uevent (path, "change");
|
|
||||||
-
|
|
||||||
- g_free (path);
|
|
||||||
- g_object_unref (device);
|
|
||||||
+ device_file = udisks_linux_block_object_get_device_file (object);
|
|
||||||
+ udisks_daemon_util_trigger_uevent (object->daemon, device_file);
|
|
||||||
+ g_free (device_file);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -1083,19 +983,10 @@ udisks_linux_block_object_trigger_uevent (UDisksLinuxBlockObject *object)
|
|
||||||
* @timeout_seconds: Maximum time to wait for the uevent (in seconds).
|
|
||||||
*
|
|
||||||
* Triggers a 'change' uevent in the kernel and waits until it's received and
|
|
||||||
- * processed by udisks.
|
|
||||||
- *
|
|
||||||
- * Unlike udisks_linux_block_object_trigger_uevent() that just triggers
|
|
||||||
- * a synthetic uevent to the kernel, this call will actually block and wait until
|
|
||||||
- * the #UDisksLinuxProvider receives the uevent, performs probing and processes
|
|
||||||
- * the uevent further down the UDisks object stack. Upon returning from this
|
|
||||||
- * function call the caller may assume the event has been fully processed, all
|
|
||||||
- * D-Bus objects are updated and settled. Typically used in busy wait for
|
|
||||||
- * a particular D-Bus interface.
|
|
||||||
+ * processed through the uevent queue.
|
|
||||||
*
|
|
||||||
- * Note that this uses synthetic uevent tagging and only works on linux kernel
|
|
||||||
- * 4.13 and higher. In case an older kernel is detected this acts like the classic
|
|
||||||
- * udisks_linux_block_object_trigger_uevent() call and %FALSE is returned.
|
|
||||||
+ * This is a convenient wrapper around udisks_daemon_util_trigger_uevent_sync().
|
|
||||||
+ * Refer to this function for detailed documentation.
|
|
||||||
*
|
|
||||||
* Returns: %TRUE if the uevent has been successfully received, %FALSE otherwise
|
|
||||||
* or when the kernel version is too old.
|
|
||||||
@@ -1104,59 +995,16 @@ gboolean
|
|
||||||
udisks_linux_block_object_trigger_uevent_sync (UDisksLinuxBlockObject *object,
|
|
||||||
guint timeout_seconds)
|
|
||||||
{
|
|
||||||
- UDisksLinuxDevice *device;
|
|
||||||
- UDisksLinuxProvider *provider;
|
|
||||||
- SynthUeventData data;
|
|
||||||
- GMainContext *main_context;
|
|
||||||
- GSource *idle_source;
|
|
||||||
- GSource *timeout_source;
|
|
||||||
+ gchar *device_file;
|
|
||||||
+ gboolean ret;
|
|
||||||
|
|
||||||
g_return_val_if_fail (UDISKS_IS_LINUX_BLOCK_OBJECT (object), FALSE);
|
|
||||||
|
|
||||||
- if (bd_utils_check_linux_version (4, 13, 0) < 0)
|
|
||||||
- {
|
|
||||||
- udisks_linux_block_object_trigger_uevent (object);
|
|
||||||
- return FALSE;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- data.object = object;
|
|
||||||
- device = udisks_linux_block_object_get_device (object);
|
|
||||||
- data.uevent_path = g_strconcat (g_udev_device_get_sysfs_path (device->udev_device), "/uevent", NULL);
|
|
||||||
- data.serial = g_atomic_int_add (&uevent_serial, 1);
|
|
||||||
-
|
|
||||||
- main_context = g_main_context_new ();
|
|
||||||
- g_main_context_push_thread_default (main_context);
|
|
||||||
- data.main_loop = g_main_loop_new (main_context, FALSE);
|
|
||||||
-
|
|
||||||
- /* queue the actual trigger in the loop */
|
|
||||||
- idle_source = g_idle_source_new ();
|
|
||||||
- g_source_set_callback (idle_source, (GSourceFunc) trigger_uevent_idle_cb, &data, NULL);
|
|
||||||
- g_source_attach (idle_source, main_context);
|
|
||||||
- g_source_unref (idle_source);
|
|
||||||
+ device_file = udisks_linux_block_object_get_device_file (object);
|
|
||||||
+ ret = udisks_daemon_util_trigger_uevent_sync (object->daemon, device_file, timeout_seconds);
|
|
||||||
+ g_free (device_file);
|
|
||||||
|
|
||||||
- /* add timeout as a fallback */
|
|
||||||
- timeout_source = g_timeout_source_new_seconds (timeout_seconds);
|
|
||||||
- g_source_set_callback (timeout_source, (GSourceFunc) uevent_wait_timeout_cb, &data, NULL);
|
|
||||||
- g_source_attach (timeout_source, main_context);
|
|
||||||
- g_source_unref (timeout_source);
|
|
||||||
-
|
|
||||||
- /* catch incoming uevents */
|
|
||||||
- provider = udisks_daemon_get_linux_provider (object->daemon);
|
|
||||||
- g_signal_connect (provider, "uevent-probed", G_CALLBACK (uevent_probed_cb), &data);
|
|
||||||
-
|
|
||||||
- data.success = FALSE;
|
|
||||||
- g_main_loop_run (data.main_loop);
|
|
||||||
-
|
|
||||||
- g_signal_handlers_disconnect_by_func (provider, uevent_probed_cb, &data);
|
|
||||||
- g_main_context_pop_thread_default (main_context);
|
|
||||||
-
|
|
||||||
- g_main_loop_unref (data.main_loop);
|
|
||||||
- g_main_context_unref (main_context);
|
|
||||||
-
|
|
||||||
- g_free (data.uevent_path);
|
|
||||||
- g_object_unref (device);
|
|
||||||
-
|
|
||||||
- return data.success;
|
|
||||||
+ return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ---------------------------------------------------------------------------------------------------- */
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
From 7fe04e70dc5a5ccf621a0beacc6d4b9e904037df Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Fri, 13 Nov 2020 16:57:24 +0100
|
|
||||||
Subject: [PATCH 2/2] udiskslinuxmanager: Trigger uevent after loop device
|
|
||||||
setup
|
|
||||||
|
|
||||||
---
|
|
||||||
src/udiskslinuxmanager.c | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/udiskslinuxmanager.c b/src/udiskslinuxmanager.c
|
|
||||||
index 1bbf980a..e0a83a80 100644
|
|
||||||
--- a/src/udiskslinuxmanager.c
|
|
||||||
+++ b/src/udiskslinuxmanager.c
|
|
||||||
@@ -430,6 +430,9 @@ handle_loop_setup (UDisksManager *object,
|
|
||||||
error = NULL;
|
|
||||||
wait_data.loop_device = loop_device;
|
|
||||||
wait_data.path = path;
|
|
||||||
+ udisks_daemon_util_trigger_uevent_sync (manager->daemon,
|
|
||||||
+ loop_device,
|
|
||||||
+ UDISKS_DEFAULT_WAIT_TIMEOUT);
|
|
||||||
loop_object = udisks_daemon_wait_for_object_sync (manager->daemon,
|
|
||||||
wait_for_loop_object,
|
|
||||||
&wait_data,
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,7 +1,19 @@
|
|||||||
diff -up udisks-2.9.0/src/tests/dbus-tests/test_50_block.py.bak udisks-2.9.0/src/tests/dbus-tests/test_50_block.py
|
From 9fdf616dd3a1dc8d9c17a7cd48995dd11068eedd Mon Sep 17 00:00:00 2001
|
||||||
--- udisks-2.9.0/src/tests/dbus-tests/test_50_block.py.bak 2020-05-26 14:59:20.000000000 +0200
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
+++ udisks-2.9.0/src/tests/dbus-tests/test_50_block.py 2023-06-02 17:08:45.203845819 +0200
|
Date: Thu, 25 May 2023 14:20:05 +0200
|
||||||
@@ -11,6 +11,8 @@ import udiskstestcase
|
Subject: [PATCH] LUKS FIPS fixes
|
||||||
|
|
||||||
|
---
|
||||||
|
src/tests/dbus-tests/test_50_block.py | 8 ++-
|
||||||
|
src/tests/dbus-tests/test_70_encrypted.py | 67 ++++++++++-------------
|
||||||
|
src/tests/integration-test | 30 +++++-----
|
||||||
|
3 files changed, 50 insertions(+), 55 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/tests/dbus-tests/test_50_block.py b/src/tests/dbus-tests/test_50_block.py
|
||||||
|
index 2154eea8..09f8fb95 100644
|
||||||
|
--- a/src/tests/dbus-tests/test_50_block.py
|
||||||
|
+++ b/src/tests/dbus-tests/test_50_block.py
|
||||||
|
@@ -12,6 +12,8 @@ import udiskstestcase
|
||||||
class UdisksBlockTest(udiskstestcase.UdisksTestCase):
|
class UdisksBlockTest(udiskstestcase.UdisksTestCase):
|
||||||
'''This is a basic block device test suite'''
|
'''This is a basic block device test suite'''
|
||||||
|
|
||||||
@ -10,7 +22,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_50_block.py.bak udisks-2.9.0/src
|
|||||||
def _close_luks(self, disk):
|
def _close_luks(self, disk):
|
||||||
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
|
||||||
@@ -201,7 +203,7 @@ class UdisksBlockTest(udiskstestcase.Udi
|
@@ -241,7 +243,7 @@ class UdisksBlockTest(udiskstestcase.UdisksTestCase):
|
||||||
|
|
||||||
# format the disk
|
# format the disk
|
||||||
disk = self.get_object('/block_devices/' + os.path.basename(self.vdevs[0]))
|
disk = self.get_object('/block_devices/' + os.path.basename(self.vdevs[0]))
|
||||||
@ -19,7 +31,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_50_block.py.bak udisks-2.9.0/src
|
|||||||
|
|
||||||
# cleanup -- close the luks and remove format
|
# cleanup -- close the luks and remove format
|
||||||
self.addCleanup(self.wipe_fs, self.vdevs[0])
|
self.addCleanup(self.wipe_fs, self.vdevs[0])
|
||||||
@@ -209,7 +211,7 @@ class UdisksBlockTest(udiskstestcase.Udi
|
@@ -249,7 +251,7 @@ class UdisksBlockTest(udiskstestcase.UdisksTestCase):
|
||||||
|
|
||||||
# configuration items as arrays of dbus.Byte
|
# configuration items as arrays of dbus.Byte
|
||||||
opts = self.str_to_ay('verify')
|
opts = self.str_to_ay('verify')
|
||||||
@ -28,7 +40,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_50_block.py.bak udisks-2.9.0/src
|
|||||||
|
|
||||||
# set the new configuration
|
# set the new configuration
|
||||||
conf = dbus.Dictionary({'passphrase-contents': passwd,
|
conf = dbus.Dictionary({'passphrase-contents': passwd,
|
||||||
@@ -254,7 +256,7 @@ class UdisksBlockTest(udiskstestcase.Udi
|
@@ -294,7 +296,7 @@ class UdisksBlockTest(udiskstestcase.UdisksTestCase):
|
||||||
|
|
||||||
# format the disk
|
# format the disk
|
||||||
disk = self.get_object('/block_devices/' + os.path.basename(self.vdevs[0]))
|
disk = self.get_object('/block_devices/' + os.path.basename(self.vdevs[0]))
|
||||||
@ -37,9 +49,10 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_50_block.py.bak udisks-2.9.0/src
|
|||||||
|
|
||||||
# cleanup -- close the luks and remove format
|
# cleanup -- close the luks and remove format
|
||||||
self.addCleanup(self.wipe_fs, self.vdevs[0])
|
self.addCleanup(self.wipe_fs, self.vdevs[0])
|
||||||
diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py
|
diff --git a/src/tests/dbus-tests/test_70_encrypted.py b/src/tests/dbus-tests/test_70_encrypted.py
|
||||||
--- udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak 2020-05-26 14:59:20.000000000 +0200
|
index effcceac..2f5a8854 100644
|
||||||
+++ udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py 2023-06-02 17:07:33.828531988 +0200
|
--- a/src/tests/dbus-tests/test_70_encrypted.py
|
||||||
|
+++ b/src/tests/dbus-tests/test_70_encrypted.py
|
||||||
@@ -40,6 +40,9 @@ def _get_blkid_version():
|
@@ -40,6 +40,9 @@ def _get_blkid_version():
|
||||||
class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
'''This is an encrypted device test suite'''
|
'''This is an encrypted device test suite'''
|
||||||
@ -50,7 +63,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
def _create_luks(self, device, passphrase, binary=False):
|
def _create_luks(self, device, passphrase, binary=False):
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
@@ -60,7 +63,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -60,7 +63,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
disk_name = os.path.basename(self.vdevs[0])
|
disk_name = os.path.basename(self.vdevs[0])
|
||||||
disk = self.get_object('/block_devices/' + disk_name)
|
disk = self.get_object('/block_devices/' + disk_name)
|
||||||
|
|
||||||
@ -59,7 +72,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.addCleanup(self._remove_luks, disk)
|
self.addCleanup(self._remove_luks, disk)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
@@ -124,7 +127,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -124,7 +127,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
disk_name = os.path.basename(self.vdevs[0])
|
disk_name = os.path.basename(self.vdevs[0])
|
||||||
disk = self.get_object('/block_devices/' + disk_name)
|
disk = self.get_object('/block_devices/' + disk_name)
|
||||||
|
|
||||||
@ -68,7 +81,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.addCleanup(self._remove_luks, disk)
|
self.addCleanup(self._remove_luks, disk)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
@@ -160,11 +163,11 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -160,11 +163,11 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
# wrong password
|
# wrong password
|
||||||
msg = 'org.freedesktop.UDisks2.Error.Failed: Error unlocking %s *' % self.vdevs[0]
|
msg = 'org.freedesktop.UDisks2.Error.Failed: Error unlocking %s *' % self.vdevs[0]
|
||||||
with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
||||||
@ -82,7 +95,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
self.assertIsNotNone(luks)
|
self.assertIsNotNone(luks)
|
||||||
self.assertTrue(os.path.exists('/dev/disk/by-uuid/%s' % luks_uuid))
|
self.assertTrue(os.path.exists('/dev/disk/by-uuid/%s' % luks_uuid))
|
||||||
@@ -180,7 +183,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -180,7 +183,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
|
|
||||||
# read-only
|
# read-only
|
||||||
ro_opts = dbus.Dictionary({'read-only': dbus.Boolean(True)}, signature=dbus.Signature('sv'))
|
ro_opts = dbus.Dictionary({'read-only': dbus.Boolean(True)}, signature=dbus.Signature('sv'))
|
||||||
@ -91,7 +104,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
self.assertIsNotNone(luks)
|
self.assertIsNotNone(luks)
|
||||||
self.assertTrue(os.path.exists('/dev/disk/by-uuid/%s' % luks_uuid))
|
self.assertTrue(os.path.exists('/dev/disk/by-uuid/%s' % luks_uuid))
|
||||||
@@ -196,13 +199,10 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -196,13 +199,10 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
crypttab = self.read_file('/etc/crypttab')
|
crypttab = self.read_file('/etc/crypttab')
|
||||||
self.addCleanup(self.write_file, '/etc/crypttab', crypttab)
|
self.addCleanup(self.write_file, '/etc/crypttab', crypttab)
|
||||||
|
|
||||||
@ -106,7 +119,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.addCleanup(self._remove_luks, disk)
|
self.addCleanup(self._remove_luks, disk)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
@@ -212,22 +212,22 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -212,20 +212,20 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
|
||||||
# add new entry to the crypttab
|
# add new entry to the crypttab
|
||||||
@ -114,8 +127,6 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
+ new_crypttab = crypttab + '%s UUID=%s none\n' % (self.LUKS_NAME, disk_uuid)
|
+ new_crypttab = crypttab + '%s UUID=%s none\n' % (self.LUKS_NAME, disk_uuid)
|
||||||
self.write_file('/etc/crypttab', new_crypttab)
|
self.write_file('/etc/crypttab', new_crypttab)
|
||||||
|
|
||||||
# give udisks time to react to change of the file
|
|
||||||
time.sleep(5)
|
|
||||||
dbus_conf = disk.GetSecretConfiguration(self.no_options, dbus_interface=self.iface_prefix + '.Block')
|
dbus_conf = disk.GetSecretConfiguration(self.no_options, dbus_interface=self.iface_prefix + '.Block')
|
||||||
self.assertIsNotNone(dbus_conf)
|
self.assertIsNotNone(dbus_conf)
|
||||||
- self.assertEqual(self.ay_to_str(dbus_conf[0][1]['name']), luks_name)
|
- self.assertEqual(self.ay_to_str(dbus_conf[0][1]['name']), luks_name)
|
||||||
@ -133,7 +144,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.assertTrue(os.path.exists(dm_path))
|
self.assertTrue(os.path.exists(dm_path))
|
||||||
|
|
||||||
# preferred 'device' should be /dev/mapper/name too
|
# preferred 'device' should be /dev/mapper/name too
|
||||||
@@ -242,8 +242,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -240,8 +240,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
crypttab = self.read_file('/etc/crypttab')
|
crypttab = self.read_file('/etc/crypttab')
|
||||||
self.addCleanup(self.write_file, '/etc/crypttab', crypttab)
|
self.addCleanup(self.write_file, '/etc/crypttab', crypttab)
|
||||||
|
|
||||||
@ -143,7 +154,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
|
|
||||||
# create key file
|
# create key file
|
||||||
_fd, key_file = tempfile.mkstemp()
|
_fd, key_file = tempfile.mkstemp()
|
||||||
@@ -264,14 +263,14 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -262,12 +261,12 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
|
||||||
# add new entry to the crypttab
|
# add new entry to the crypttab
|
||||||
@ -151,8 +162,6 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
+ new_crypttab = crypttab + '%s UUID=%s %s\n' % (self.LUKS_NAME, disk_uuid, key_file)
|
+ new_crypttab = crypttab + '%s UUID=%s %s\n' % (self.LUKS_NAME, disk_uuid, key_file)
|
||||||
self.write_file('/etc/crypttab', new_crypttab)
|
self.write_file('/etc/crypttab', new_crypttab)
|
||||||
|
|
||||||
# give udisks time to react to change of the file
|
|
||||||
time.sleep(5)
|
|
||||||
dbus_conf = disk.GetSecretConfiguration(self.no_options, dbus_interface=self.iface_prefix + '.Block')
|
dbus_conf = disk.GetSecretConfiguration(self.no_options, dbus_interface=self.iface_prefix + '.Block')
|
||||||
self.assertIsNotNone(dbus_conf)
|
self.assertIsNotNone(dbus_conf)
|
||||||
- self.assertEqual(self.ay_to_str(dbus_conf[0][1]['name']), luks_name)
|
- self.assertEqual(self.ay_to_str(dbus_conf[0][1]['name']), luks_name)
|
||||||
@ -160,7 +169,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.assertEqual(self.ay_to_str(dbus_conf[0][1]['passphrase-path']), key_file)
|
self.assertEqual(self.ay_to_str(dbus_conf[0][1]['passphrase-path']), key_file)
|
||||||
|
|
||||||
# unlock the device using empty passphrase (should use the key file)
|
# unlock the device using empty passphrase (should use the key file)
|
||||||
@@ -280,7 +279,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -276,7 +275,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
self.assertIsNotNone(luks)
|
self.assertIsNotNone(luks)
|
||||||
|
|
||||||
# unlock should use name from crypttab for the /dev/mapper device
|
# unlock should use name from crypttab for the /dev/mapper device
|
||||||
@ -169,7 +178,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.assertTrue(os.path.exists(dm_path))
|
self.assertTrue(os.path.exists(dm_path))
|
||||||
|
|
||||||
# preferred 'device' should be /dev/mapper/name too
|
# preferred 'device' should be /dev/mapper/name too
|
||||||
@@ -293,7 +292,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -289,7 +288,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
disk_name = os.path.basename(self.vdevs[0])
|
disk_name = os.path.basename(self.vdevs[0])
|
||||||
disk = self.get_object('/block_devices/' + disk_name)
|
disk = self.get_object('/block_devices/' + disk_name)
|
||||||
|
|
||||||
@ -178,7 +187,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.addCleanup(self._remove_luks, disk)
|
self.addCleanup(self._remove_luks, disk)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
@@ -320,11 +319,11 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -316,11 +315,11 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
disk_name = os.path.basename(self.vdevs[0])
|
disk_name = os.path.basename(self.vdevs[0])
|
||||||
disk = self.get_object('/block_devices/' + disk_name)
|
disk = self.get_object('/block_devices/' + disk_name)
|
||||||
|
|
||||||
@ -192,7 +201,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
|
||||||
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
disk.Lock(self.no_options, dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
@@ -332,11 +331,11 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -328,11 +327,11 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
# old password, should fail
|
# old password, should fail
|
||||||
msg = 'org.freedesktop.UDisks2.Error.Failed: Error unlocking %s *' % self.vdevs[0]
|
msg = 'org.freedesktop.UDisks2.Error.Failed: Error unlocking %s *' % self.vdevs[0]
|
||||||
with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
with six.assertRaisesRegex(self, dbus.exceptions.DBusException, msg):
|
||||||
@ -206,7 +215,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
self.assertIsNotNone(luks)
|
self.assertIsNotNone(luks)
|
||||||
|
|
||||||
@@ -347,7 +346,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -343,7 +342,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
|
|
||||||
def test_resize(self):
|
def test_resize(self):
|
||||||
device = self.get_device(self.vdevs[0])
|
device = self.get_device(self.vdevs[0])
|
||||||
@ -215,7 +224,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.addCleanup(self._remove_luks, device)
|
self.addCleanup(self._remove_luks, device)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
@@ -376,8 +375,6 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -372,8 +371,6 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
fstab = self.read_file('/etc/fstab')
|
fstab = self.read_file('/etc/fstab')
|
||||||
self.addCleanup(self.write_file, '/etc/fstab', fstab)
|
self.addCleanup(self.write_file, '/etc/fstab', fstab)
|
||||||
|
|
||||||
@ -224,7 +233,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
disk_name = os.path.basename(self.vdevs[0])
|
disk_name = os.path.basename(self.vdevs[0])
|
||||||
disk = self.get_object('/block_devices/' + disk_name)
|
disk = self.get_object('/block_devices/' + disk_name)
|
||||||
|
|
||||||
@@ -388,7 +385,7 @@ class UdisksEncryptedTest(udiskstestcase
|
@@ -384,7 +381,7 @@ class UdisksEncryptedTest(udiskstestcase.UdisksTestCase):
|
||||||
self.assertIsNotNone(part)
|
self.assertIsNotNone(part)
|
||||||
|
|
||||||
# create LUKS on the partition and add it to crypttab
|
# create LUKS on the partition and add it to crypttab
|
||||||
@ -233,7 +242,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
conf = dbus.Dictionary({'name': self.str_to_ay('udisks_luks_test'),
|
conf = dbus.Dictionary({'name': self.str_to_ay('udisks_luks_test'),
|
||||||
@@ -525,10 +522,8 @@ class UdisksEncryptedTestLUKS2(UdisksEnc
|
@@ -521,10 +518,8 @@ class UdisksEncryptedTestLUKS2(UdisksEncryptedTest):
|
||||||
super(UdisksEncryptedTestLUKS2, self).setUp()
|
super(UdisksEncryptedTestLUKS2, self).setUp()
|
||||||
|
|
||||||
def test_resize(self):
|
def test_resize(self):
|
||||||
@ -245,7 +254,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
self.addCleanup(self._remove_luks, device)
|
self.addCleanup(self._remove_luks, device)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
|
|
||||||
@@ -554,7 +549,7 @@ class UdisksEncryptedTestLUKS2(UdisksEnc
|
@@ -550,7 +545,7 @@ class UdisksEncryptedTestLUKS2(UdisksEncryptedTest):
|
||||||
|
|
||||||
# right passphrase
|
# right passphrase
|
||||||
d = dbus.Dictionary(signature='sv')
|
d = dbus.Dictionary(signature='sv')
|
||||||
@ -254,7 +263,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
device.Resize(dbus.UInt64(100*1024*1024), d,
|
device.Resize(dbus.UInt64(100*1024*1024), d,
|
||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
|
||||||
@@ -563,7 +558,7 @@ class UdisksEncryptedTestLUKS2(UdisksEnc
|
@@ -559,7 +554,7 @@ class UdisksEncryptedTestLUKS2(UdisksEncryptedTest):
|
||||||
|
|
||||||
# resize back to the original size (using binary passphrase)
|
# resize back to the original size (using binary passphrase)
|
||||||
d = dbus.Dictionary(signature='sv')
|
d = dbus.Dictionary(signature='sv')
|
||||||
@ -263,7 +272,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
device.Resize(dbus.UInt64(clear_size), d,
|
device.Resize(dbus.UInt64(clear_size), d,
|
||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
|
|
||||||
@@ -581,7 +576,7 @@ class UdisksEncryptedTestLUKS2(UdisksEnc
|
@@ -577,7 +572,7 @@ class UdisksEncryptedTestLUKS2(UdisksEncryptedTest):
|
||||||
|
|
||||||
# create LUKS without specifying version
|
# create LUKS without specifying version
|
||||||
options = dbus.Dictionary(signature='sv')
|
options = dbus.Dictionary(signature='sv')
|
||||||
@ -272,7 +281,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
|
|
||||||
disk.Format('xfs', options,
|
disk.Format('xfs', options,
|
||||||
dbus_interface=self.iface_prefix + '.Block')
|
dbus_interface=self.iface_prefix + '.Block')
|
||||||
@@ -617,14 +612,12 @@ class UdisksEncryptedTestLUKS2(UdisksEnc
|
@@ -613,14 +608,12 @@ class UdisksEncryptedTestLUKS2(UdisksEncryptedTest):
|
||||||
|
|
||||||
@udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
|
@udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
|
||||||
def test_integrity(self):
|
def test_integrity(self):
|
||||||
@ -288,7 +297,7 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
|
|
||||||
self.addCleanup(self._remove_luks, device)
|
self.addCleanup(self._remove_luks, device)
|
||||||
self.udev_settle()
|
self.udev_settle()
|
||||||
@@ -634,7 +627,7 @@ class UdisksEncryptedTestLUKS2(UdisksEnc
|
@@ -630,7 +623,7 @@ class UdisksEncryptedTestLUKS2(UdisksEncryptedTest):
|
||||||
# the device is not opened, we need to read the UUID from LUKS metadata
|
# the device is not opened, we need to read the UUID from LUKS metadata
|
||||||
luks_uuid = BlockDev.crypto_luks_uuid(self.vdevs[0])
|
luks_uuid = BlockDev.crypto_luks_uuid(self.vdevs[0])
|
||||||
|
|
||||||
@ -297,10 +306,11 @@ diff -up udisks-2.9.0/src/tests/dbus-tests/test_70_encrypted.py.bak udisks-2.9.0
|
|||||||
dbus_interface=self.iface_prefix + '.Encrypted')
|
dbus_interface=self.iface_prefix + '.Encrypted')
|
||||||
self.assertIsNotNone(luks_path)
|
self.assertIsNotNone(luks_path)
|
||||||
self.assertTrue(os.path.exists('/dev/disk/by-uuid/%s' % luks_uuid))
|
self.assertTrue(os.path.exists('/dev/disk/by-uuid/%s' % luks_uuid))
|
||||||
diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/integration-test
|
diff --git a/src/tests/integration-test b/src/tests/integration-test
|
||||||
--- udisks-2.9.0/src/tests/integration-test.bak 2020-05-26 14:59:20.000000000 +0200
|
index 4499a6a9..71955559 100755
|
||||||
+++ udisks-2.9.0/src/tests/integration-test 2023-06-02 16:59:52.841963720 +0200
|
--- a/src/tests/integration-test
|
||||||
@@ -1321,7 +1321,7 @@ class Luks(UDisksTestCase):
|
+++ b/src/tests/integration-test
|
||||||
|
@@ -1336,7 +1336,7 @@ class Luks(UDisksTestCase):
|
||||||
|
|
||||||
def setup_crypto_device(self):
|
def setup_crypto_device(self):
|
||||||
self.fs_create(None, 'ext4', GLib.Variant('a{sv}', {
|
self.fs_create(None, 'ext4', GLib.Variant('a{sv}', {
|
||||||
@ -309,7 +319,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
'label': GLib.Variant('s', 'treasure')}))
|
'label': GLib.Variant('s', 'treasure')}))
|
||||||
self.client.settle()
|
self.client.settle()
|
||||||
crypt_obj = self.client.get_object(self.udisks_block().get_object_path())
|
crypt_obj = self.client.get_object(self.udisks_block().get_object_path())
|
||||||
@@ -1332,7 +1332,7 @@ class Luks(UDisksTestCase):
|
@@ -1347,7 +1347,7 @@ class Luks(UDisksTestCase):
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def unlock_crypto_device(encrypted):
|
def unlock_crypto_device(encrypted):
|
||||||
return encrypted.call_unlock_sync(
|
return encrypted.call_unlock_sync(
|
||||||
@ -318,7 +328,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
"""clean up behind failed test cases"""
|
"""clean up behind failed test cases"""
|
||||||
@@ -1400,7 +1400,7 @@ class Luks(UDisksTestCase):
|
@@ -1415,7 +1415,7 @@ class Luks(UDisksTestCase):
|
||||||
udev_dump = subprocess.Popen(['udevadm', 'info', '--export-db'],
|
udev_dump = subprocess.Popen(['udevadm', 'info', '--export-db'],
|
||||||
stdout=subprocess.PIPE)
|
stdout=subprocess.PIPE)
|
||||||
out = udev_dump.communicate()[0]
|
out = udev_dump.communicate()[0]
|
||||||
@ -327,7 +337,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
self.assertFalse(b'essiv:sha' in out, 'key information in udev properties')
|
self.assertFalse(b'essiv:sha' in out, 'key information in udev properties')
|
||||||
|
|
||||||
finally:
|
finally:
|
||||||
@@ -1510,18 +1510,18 @@ class Luks(UDisksTestCase):
|
@@ -1525,18 +1525,18 @@ class Luks(UDisksTestCase):
|
||||||
encrypted = self.setup_crypto_device()
|
encrypted = self.setup_crypto_device()
|
||||||
# wrong password, has bytes after a trailing '\0'
|
# wrong password, has bytes after a trailing '\0'
|
||||||
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
||||||
@ -350,7 +360,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
'label': GLib.Variant('s', 'treasure')}))
|
'label': GLib.Variant('s', 'treasure')}))
|
||||||
|
|
||||||
crypt_obj = self.client.get_object(self.udisks_block().get_object_path())
|
crypt_obj = self.client.get_object(self.udisks_block().get_object_path())
|
||||||
@@ -1532,16 +1532,16 @@ class Luks(UDisksTestCase):
|
@@ -1547,16 +1547,16 @@ class Luks(UDisksTestCase):
|
||||||
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
||||||
'h4ckpassword', no_options, None)
|
'h4ckpassword', no_options, None)
|
||||||
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
||||||
@ -371,7 +381,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
encrypted.call_lock_sync(no_options, None)
|
encrypted.call_lock_sync(no_options, None)
|
||||||
|
|
||||||
def test_binary_keyfile(self):
|
def test_binary_keyfile(self):
|
||||||
@@ -1607,11 +1607,11 @@ class Luks(UDisksTestCase):
|
@@ -1622,11 +1622,11 @@ class Luks(UDisksTestCase):
|
||||||
encrypted = self.setup_crypto_device()
|
encrypted = self.setup_crypto_device()
|
||||||
|
|
||||||
# change: passphrase -> passphrase
|
# change: passphrase -> passphrase
|
||||||
@ -385,7 +395,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
encrypted.call_unlock_sync('passphrase', no_options, None)
|
encrypted.call_unlock_sync('passphrase', no_options, None)
|
||||||
encrypted.call_lock_sync(no_options, None)
|
encrypted.call_lock_sync(no_options, None)
|
||||||
|
|
||||||
@@ -1644,7 +1644,7 @@ class Luks(UDisksTestCase):
|
@@ -1659,7 +1659,7 @@ class Luks(UDisksTestCase):
|
||||||
|
|
||||||
# change: keyfile -> passphrase
|
# change: keyfile -> passphrase
|
||||||
encrypted.call_change_passphrase_sync(
|
encrypted.call_change_passphrase_sync(
|
||||||
@ -394,7 +404,7 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
'old_keyfile_contents': GLib.Variant('ay', _bytes_to_ay(key_file_1)),
|
'old_keyfile_contents': GLib.Variant('ay', _bytes_to_ay(key_file_1)),
|
||||||
}),
|
}),
|
||||||
None)
|
None)
|
||||||
@@ -1652,7 +1652,7 @@ class Luks(UDisksTestCase):
|
@@ -1667,7 +1667,7 @@ class Luks(UDisksTestCase):
|
||||||
# verify new password:
|
# verify new password:
|
||||||
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
self.assertRaises(GLib.GError, encrypted.call_unlock_sync,
|
||||||
'', Luks.keyfile_options(key_file_1), None)
|
'', Luks.keyfile_options(key_file_1), None)
|
||||||
@ -403,3 +413,6 @@ diff -up udisks-2.9.0/src/tests/integration-test.bak udisks-2.9.0/src/tests/inte
|
|||||||
encrypted.call_lock_sync(no_options, None)
|
encrypted.call_lock_sync(no_options, None)
|
||||||
|
|
||||||
|
|
||||||
|
--
|
||||||
|
2.39.1
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
From 2d5d2b7570b0f44c14b34b5dc831f174205c10f2 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tomas Bzatek <tbzatek@redhat.com>
|
|
||||||
Date: Wed, 15 Sep 2021 14:34:49 +0200
|
|
||||||
Subject: [PATCH] mount options: Always use errors=remount-ro for ext
|
|
||||||
filesystems
|
|
||||||
|
|
||||||
Default mount options are focused primarily on data safety, mounting
|
|
||||||
damaged ext2/3/4 filesystem as readonly would indicate something's wrong.
|
|
||||||
---
|
|
||||||
data/builtin_mount_options.conf | 9 +++++++++
|
|
||||||
src/tests/dbus-tests/test_80_filesystem.py | 6 ++++++
|
|
||||||
2 files changed, 15 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/data/builtin_mount_options.conf b/data/builtin_mount_options.conf
|
|
||||||
index 37715cfa4..e0bd0ee1f 100644
|
|
||||||
--- a/data/builtin_mount_options.conf
|
|
||||||
+++ b/data/builtin_mount_options.conf
|
|
||||||
@@ -27,3 +27,12 @@ f2fs_allow=discard,nodiscard,compress_algorithm,compress_log_size,compress_exten
|
|
||||||
btrfs_allow=compress,compress-force,datacow,nodatacow,datasum,nodatasum,degraded,device,discard,nodiscard,subvol,subvolid,space_cache
|
|
||||||
|
|
||||||
f2fs_allow=discard,nodiscard,compress_algorithm,compress_log_size,compress_extension,alloc_mode
|
|
||||||
+
|
|
||||||
+ext2_defaults=errors=remount-ro
|
|
||||||
+ext2_allow=errors=remount-ro
|
|
||||||
+
|
|
||||||
+ext3_defaults=errors=remount-ro
|
|
||||||
+ext3_allow=errors=remount-ro
|
|
||||||
+
|
|
||||||
+ext4_defaults=errors=remount-ro
|
|
||||||
+ext4_allow=errors=remount-ro
|
|
||||||
diff --git a/src/tests/dbus-tests/test_80_filesystem.py b/src/tests/dbus-tests/test_80_filesystem.py
|
|
||||||
index 019880f57..2d1933240 100644
|
|
||||||
--- a/src/tests/dbus-tests/test_80_filesystem.py
|
|
||||||
+++ b/src/tests/dbus-tests/test_80_filesystem.py
|
|
||||||
@@ -321,6 +321,8 @@ def test_mount_auto(self):
|
|
||||||
_ret, out = self.run_command('mount | grep %s' % block_fs_dev)
|
|
||||||
self.assertIn(mnt_path, out)
|
|
||||||
self.assertIn('ro', out)
|
|
||||||
+ if self._fs_name.startswith('ext'):
|
|
||||||
+ self.assertIn('errors=remount-ro', out)
|
|
||||||
|
|
||||||
# dbus mountpoint
|
|
||||||
dbus_mounts = self.get_property(block_fs, '.Filesystem', 'MountPoints')
|
|
||||||
@@ -478,6 +480,10 @@ def test_custom_option(self, should_fail, dbus_option, should_be_present, config
|
|
||||||
if self._fs_name == "udf":
|
|
||||||
test_custom_option(self, False, None, False, "[defaults]\ndefaults=\nallow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,ro,rw,sync,dirsync,noload,uid=ignore,uid=forget\n")
|
|
||||||
test_custom_option(self, True, "uid=notallowed", True, "[defaults]\nallow=exec,noexec,nodev,nosuid,atime,noatime,nodiratime,ro,rw,sync,dirsync,noload,uid=ignore\n")
|
|
||||||
+ if self._fs_name.startswith("ext"):
|
|
||||||
+ test_custom_option(self, False, "errors=remount-ro", True, "", match_mount_option="errors=remount-ro")
|
|
||||||
+ test_custom_option(self, True, "errors=panic", False, "")
|
|
||||||
+ test_custom_option(self, True, "errors=continue", False, "")
|
|
||||||
|
|
||||||
# udev rules overrides
|
|
||||||
test_readonly(self, False, "", udev_rules_content = { "UDISKS_MOUNT_OPTIONS_DEFAULTS": "rw" })
|
|
11
SOURCES/udisks-2.9.4-tests_job_unstable.patch
Normal file
11
SOURCES/udisks-2.9.4-tests_job_unstable.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
diff -up udisks-2.9.4/src/tests/dbus-tests/test_job.py.bak udisks-2.9.4/src/tests/dbus-tests/test_job.py
|
||||||
|
--- udisks-2.9.4/src/tests/dbus-tests/test_job.py.bak 2021-09-29 18:00:31.000000000 +0200
|
||||||
|
+++ udisks-2.9.4/src/tests/dbus-tests/test_job.py 2023-06-02 15:14:50.691620552 +0200
|
||||||
|
@@ -51,6 +51,7 @@ class UdisksJobTest(udiskstestcase.Udisk
|
||||||
|
|
||||||
|
time.sleep(0.1)
|
||||||
|
|
||||||
|
+ @udiskstestcase.tag_test(udiskstestcase.TestTags.UNSTABLE)
|
||||||
|
def test_job(self):
|
||||||
|
'''Test basic Job functionality and properties'''
|
||||||
|
|
@ -1,15 +1,14 @@
|
|||||||
%global glib2_version 2.36
|
%global glib2_version 2.50
|
||||||
%global gobject_introspection_version 1.30.0
|
%global gobject_introspection_version 1.30.0
|
||||||
%global polkit_version 0.102
|
%global polkit_version 0.102
|
||||||
%global systemd_version 208
|
%global systemd_version 208
|
||||||
%global libatasmart_version 0.17
|
%global libatasmart_version 0.17
|
||||||
%global dbus_version 1.4.0
|
%global dbus_version 1.4.0
|
||||||
%global with_gtk_doc 1
|
%global with_gtk_doc 1
|
||||||
%global libblockdev_version 2.24
|
%global libblockdev_version 2.25
|
||||||
|
|
||||||
%define with_bcache 1
|
%define with_bcache 1
|
||||||
%define with_btrfs 1
|
%define with_btrfs 1
|
||||||
%define with_vdo 0
|
|
||||||
%define with_lsm 1
|
%define with_lsm 1
|
||||||
%define with_zram 1
|
%define with_zram 1
|
||||||
%define with_lvmcache 1
|
%define with_lvmcache 1
|
||||||
@ -18,6 +17,9 @@
|
|||||||
%define default_luks_encryption luks1
|
%define default_luks_encryption luks1
|
||||||
|
|
||||||
%define is_fedora 0%{?rhel} == 0
|
%define is_fedora 0%{?rhel} == 0
|
||||||
|
%define is_git %(git show > /dev/null 2>&1 && echo 1 || echo 0)
|
||||||
|
%define git_hash %(git log -1 --pretty=format:"%h" || true)
|
||||||
|
%define build_date %(date '+%Y%m%d')
|
||||||
|
|
||||||
|
|
||||||
# bcache and zram are not available on RHEL
|
# bcache and zram are not available on RHEL
|
||||||
@ -27,20 +29,10 @@
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# btrfs is not available on RHEL > 7
|
# btrfs is not available on RHEL > 7
|
||||||
%if 0%{?rhel} > 7 || %{with_btrfs} == 0
|
%if 0%{?rhel} > 7
|
||||||
%define with_btrfs 0
|
%define with_btrfs 0
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# vdo is not available on Fedora
|
|
||||||
%if (0%{?fedora}) || %{with_vdo} == 0
|
|
||||||
%define with_vdo 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# vdo is not available on i686
|
|
||||||
%ifnarch x86_64 aarch64 ppc64le s390x
|
|
||||||
%define with_vdo 0
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# feature parity with existing RHEL 7 packages
|
# feature parity with existing RHEL 7 packages
|
||||||
%if (0%{?rhel}) && (0%{?rhel} <= 7)
|
%if (0%{?rhel}) && (0%{?rhel} <= 7)
|
||||||
%define with_lsm 0
|
%define with_lsm 0
|
||||||
@ -55,57 +47,46 @@
|
|||||||
|
|
||||||
Name: udisks2
|
Name: udisks2
|
||||||
Summary: Disk Manager
|
Summary: Disk Manager
|
||||||
Version: 2.9.0
|
Version: 2.9.4
|
||||||
Release: 16%{?dist}
|
Release: 9%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Libraries
|
|
||||||
URL: https://github.com/storaged-project/udisks
|
URL: https://github.com/storaged-project/udisks
|
||||||
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
Source0: https://github.com/storaged-project/udisks/releases/download/udisks-%{version}/udisks-%{version}.tar.bz2
|
||||||
Patch0: udisks-2.9.1-teardown-needle-match.patch
|
# https://github.com/storaged-project/udisks/pull/847
|
||||||
Patch1: udisks-2.9.1-lvm_vdo-test_resize_physical-size.patch
|
Patch0: ignore-apple-boot-part.patch
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1855785
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2001549
|
||||||
Patch2: udisks-2.9.1-drive_ata_tests.patch
|
Patch1: udisks-2.10.0-static_daemon_resources_free.patch
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2120697
|
Patch2: udisks-2.10.0-lvm2_teardown_tests.patch
|
||||||
Patch3: udisks-2.10.0-block_format_ata_secure_erase.patch
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2030916
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2135773
|
Patch3: udisks-2.10.0-vdo_test_writeAmplificationRatio.patch
|
||||||
Patch4: udisks-2.10.0-iscsi-auth-info.patch
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2120329
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1845973
|
Patch4: udisks-2.10.0-block_format_ata_secure_erase.patch
|
||||||
Patch10: udisks-2.9.1-daemon-Always-flush-interface-property-changes.patch
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1983602
|
||||||
Patch11: udisks-2.9.1-lvm2-Always-flush-interface-property-changes.patch
|
Patch5: udisks-2.10.0-iscsi-auth-info.patch
|
||||||
Patch12: udisks-2.9.1-lsm-Always-flush-interface-property-changes.patch
|
|
||||||
Patch13: udisks-2.9.1-iscsi-Always-flush-interface-property-changes.patch
|
|
||||||
Patch14: udisks-2.9.1-zram-Always-flush-interface-property-changes.patch
|
|
||||||
Patch15: udisks-2.9.2-udisksdaemonutil-Refactor-udisks_daemon_util_trigger.patch
|
|
||||||
Patch16: udisks-2.9.2-udiskslinuxmanager-Trigger-uevent-after-loop-device-setup.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2004422
|
|
||||||
Patch17: udisks-2.9.4-ext-mount-options.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2213715
|
|
||||||
Patch18: udisks-2.10.0-iscsi_timeout.patch
|
|
||||||
Patch20: udisks-2.10.0-tests-drive_ata-apm.patch
|
|
||||||
Patch21: udisks-2.10.0-tests-no-dev_disk-by-path.patch
|
|
||||||
Patch22: tests-disable-zram.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2023880
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2025483
|
|
||||||
Patch23: udisks-2.10.0-vdo_test_writeAmplificationRatio.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1999149
|
|
||||||
Patch24: udisks-2.10.0-udiskslinuxencrypted_GError.patch
|
|
||||||
Patch25: udisks-2.10.0-udiskslinuxpartition_GError.patch
|
|
||||||
Patch26: udisks-2.10.0-udiskslinuxpartitiontable_GError.patch
|
|
||||||
Patch27: udisks-2.10.0-udiskslinuxfilesystem_GError.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1966460
|
|
||||||
Patch28: udisks-2.10.0-iscsi_test_01_badauth.patch
|
|
||||||
Patch29: udisks-2.10.0-iscsi_test_02_lio_target_conf.patch
|
|
||||||
Patch31: udisks-2.10.0-iscsi_test_04_fix_test_login_chap_auth.patch
|
|
||||||
Patch32: udisks-2.10.0-iscsi_test_05_restart_iscsid.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2188991
|
|
||||||
Patch33: udisks-2.10.0-iscsi-CHAP-auth-algs.patch
|
|
||||||
Patch34: udisks-2.9.4-FIPS_LUKS_fixes-2.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2039772
|
|
||||||
Patch35: udisks-2.10.0-lvm2_update_epoch.patch
|
|
||||||
Patch36: udisks-2.10.0-lvm2_vgcreate_uevent_sync.patch
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=2213193
|
|
||||||
Patch37: udisks-2.10.0-iscsi-ibft-chap-auth.patch
|
|
||||||
|
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2136557
|
||||||
|
Patch10: udisks-2.10.0-iscsi_test_01_badauth.patch
|
||||||
|
Patch11: udisks-2.10.0-iscsi_test_02_lio_target_conf.patch
|
||||||
|
Patch12: udisks-2.10.0-iscsi_test_03_iscsid_cache_clean.patch
|
||||||
|
Patch13: udisks-2.10.0-iscsi_test_04_fix_test_login_chap_auth.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1958932
|
||||||
|
Patch14: udisks-2.10.0-iscsi_test_05_restart_iscsid.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2188916
|
||||||
|
Patch15: udisks-2.10.0-iscsi-CHAP-auth-algs.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2188750
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2188752
|
||||||
|
Patch16: udisks-2.9.4-FIPS_LUKS_fixes.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2211191
|
||||||
|
Patch17: udisks-2.10.0-integration_test_force_readonly.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2031673
|
||||||
|
Patch18: udisks-2.10.0-lvm2_update_epoch.patch
|
||||||
|
Patch19: udisks-2.10.0-lvm2_vgcreate_uevent_sync.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2148844
|
||||||
|
Patch20: udisks-2.9.4-tests_job_unstable.patch
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=2213769
|
||||||
|
Patch21: udisks-2.10.0-iscsi-ibft-chap-auth.patch
|
||||||
|
|
||||||
|
BuildRequires: make
|
||||||
BuildRequires: glib2-devel >= %{glib2_version}
|
BuildRequires: glib2-devel >= %{glib2_version}
|
||||||
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
BuildRequires: gobject-introspection-devel >= %{gobject_introspection_version}
|
||||||
BuildRequires: libgudev1-devel >= %{systemd_version}
|
BuildRequires: libgudev1-devel >= %{systemd_version}
|
||||||
@ -160,6 +141,12 @@ Requires: eject
|
|||||||
# For utab monitor
|
# For utab monitor
|
||||||
Requires: libmount
|
Requires: libmount
|
||||||
|
|
||||||
|
%if ! (0%{?rhel} && 0%{?rhel} < 8)
|
||||||
|
# Not really needed but doesn't make much sense to use UDisks without polkit
|
||||||
|
# (weak deps don't work on older versions of RHEL)
|
||||||
|
Recommends: polkit
|
||||||
|
%endif
|
||||||
|
|
||||||
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
# For mkntfs (not available on rhel or on ppc/ppc64)
|
# For mkntfs (not available on rhel or on ppc/ppc64)
|
||||||
@ -181,7 +168,6 @@ manipulate disks, storage devices and technologies.
|
|||||||
|
|
||||||
%package -n lib%{name}
|
%package -n lib%{name}
|
||||||
Summary: Dynamic library to access the udisksd daemon
|
Summary: Dynamic library to access the udisksd daemon
|
||||||
Group: System Environment/Libraries
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Provides: libstoraged = %{version}-%{release}
|
Provides: libstoraged = %{version}-%{release}
|
||||||
Obsoletes: libstoraged
|
Obsoletes: libstoraged
|
||||||
@ -192,7 +178,6 @@ access to the udisksd daemon.
|
|||||||
|
|
||||||
%package -n %{name}-iscsi
|
%package -n %{name}-iscsi
|
||||||
Summary: Module for iSCSI
|
Summary: Module for iSCSI
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: iscsi-initiator-utils
|
Requires: iscsi-initiator-utils
|
||||||
@ -205,7 +190,6 @@ This package contains module for iSCSI configuration.
|
|||||||
|
|
||||||
%package -n %{name}-lvm2
|
%package -n %{name}-lvm2
|
||||||
Summary: Module for LVM2
|
Summary: Module for LVM2
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: lvm2
|
Requires: lvm2
|
||||||
@ -220,7 +204,6 @@ This package contains module for LVM2 configuration.
|
|||||||
|
|
||||||
%package -n lib%{name}-devel
|
%package -n lib%{name}-devel
|
||||||
Summary: Development files for lib%{name}
|
Summary: Development files for lib%{name}
|
||||||
Group: Development/Libraries
|
|
||||||
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
Requires: lib%{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Provides: libstoraged-devel = %{version}-%{release}
|
Provides: libstoraged-devel = %{version}-%{release}
|
||||||
@ -233,7 +216,6 @@ dynamic library, which provides access to the udisksd daemon.
|
|||||||
%if 0%{?with_bcache}
|
%if 0%{?with_bcache}
|
||||||
%package -n %{name}-bcache
|
%package -n %{name}-bcache
|
||||||
Summary: Module for Bcache
|
Summary: Module for Bcache
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: libblockdev-kbd >= %{libblockdev_version}
|
Requires: libblockdev-kbd >= %{libblockdev_version}
|
||||||
@ -248,7 +230,6 @@ This package contains module for Bcache configuration.
|
|||||||
%if 0%{?with_btrfs}
|
%if 0%{?with_btrfs}
|
||||||
%package -n %{name}-btrfs
|
%package -n %{name}-btrfs
|
||||||
Summary: Module for BTRFS
|
Summary: Module for BTRFS
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: libblockdev-btrfs >= %{libblockdev_version}
|
Requires: libblockdev-btrfs >= %{libblockdev_version}
|
||||||
@ -263,7 +244,6 @@ This package contains module for BTRFS configuration.
|
|||||||
%if 0%{?with_lsm}
|
%if 0%{?with_lsm}
|
||||||
%package -n %{name}-lsm
|
%package -n %{name}-lsm
|
||||||
Summary: Module for LSM
|
Summary: Module for LSM
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: libstoragemgmt
|
Requires: libstoragemgmt
|
||||||
@ -279,7 +259,6 @@ This package contains module for LSM configuration.
|
|||||||
%if 0%{?with_zram}
|
%if 0%{?with_zram}
|
||||||
%package -n %{name}-zram
|
%package -n %{name}-zram
|
||||||
Summary: Module for ZRAM
|
Summary: Module for ZRAM
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Requires: libblockdev-kbd >= %{libblockdev_version}
|
Requires: libblockdev-kbd >= %{libblockdev_version}
|
||||||
@ -293,60 +272,15 @@ Obsoletes: storaged-zram
|
|||||||
This package contains module for ZRAM configuration.
|
This package contains module for ZRAM configuration.
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?with_vdo}
|
|
||||||
%package -n %{name}-vdo
|
|
||||||
Summary: Module for VDO
|
|
||||||
Group: System Environment/Libraries
|
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
||||||
License: LGPLv2+
|
|
||||||
Requires: vdo
|
|
||||||
Requires: libblockdev-vdo >= %{libblockdev_version}
|
|
||||||
BuildRequires: libblockdev-vdo-devel >= %{libblockdev_version}
|
|
||||||
|
|
||||||
%description -n %{name}-vdo
|
|
||||||
This package contains module for VDO management.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n udisks-%{version}
|
%autosetup -p1 -n udisks-%{version}
|
||||||
%patch0 -p1
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch10 -p1
|
|
||||||
%patch11 -p1
|
|
||||||
%patch12 -p1
|
|
||||||
%patch13 -p1
|
|
||||||
%patch14 -p1
|
|
||||||
%patch15 -p1
|
|
||||||
%patch16 -p1
|
|
||||||
%patch17 -p1
|
|
||||||
%patch18 -p1
|
|
||||||
%patch20 -p1
|
|
||||||
%patch21 -p1
|
|
||||||
%patch22 -p1
|
|
||||||
%patch23 -p1
|
|
||||||
%patch24 -p1
|
|
||||||
%patch25 -p1
|
|
||||||
%patch26 -p1
|
|
||||||
%patch27 -p1
|
|
||||||
%patch28 -p1
|
|
||||||
%patch29 -p1
|
|
||||||
%patch31 -p1
|
|
||||||
%patch32 -p1
|
|
||||||
%patch33 -p1
|
|
||||||
%patch34 -p1
|
|
||||||
%patch35 -p1
|
|
||||||
%patch36 -p1
|
|
||||||
%patch37 -p1
|
|
||||||
sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/"
|
sed -i udisks/udisks2.conf.in -e "s/encryption=luks1/encryption=%{default_luks_encryption}/"
|
||||||
|
rm -f src/tests/dbus-tests/config_h.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf -ivf
|
autoreconf -ivf
|
||||||
# modules need to be explicitly enabled
|
# modules need to be explicitly enabled
|
||||||
%configure \
|
%configure \
|
||||||
--sysconfdir=/etc \
|
|
||||||
%if %{with_gtk_doc}
|
%if %{with_gtk_doc}
|
||||||
--enable-gtk-doc \
|
--enable-gtk-doc \
|
||||||
%else
|
%else
|
||||||
@ -358,9 +292,7 @@ autoreconf -ivf
|
|||||||
%if 0%{?with_btrfs}
|
%if 0%{?with_btrfs}
|
||||||
--enable-btrfs \
|
--enable-btrfs \
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?with_vdo}
|
--disable-vdo \
|
||||||
--enable-vdo \
|
|
||||||
%endif
|
|
||||||
%if 0%{?with_zram}
|
%if 0%{?with_zram}
|
||||||
--enable-zram \
|
--enable-zram \
|
||||||
%endif
|
%endif
|
||||||
@ -407,13 +339,17 @@ fi
|
|||||||
|
|
||||||
%if 0%{?with_zram}
|
%if 0%{?with_zram}
|
||||||
%post -n %{name}-zram
|
%post -n %{name}-zram
|
||||||
%systemd_post zram-setup@.service
|
%systemd_post udisks2-zram-setup@.service
|
||||||
|
if [ -S /run/udev/control ]; then
|
||||||
|
udevadm control --reload
|
||||||
|
udevadm trigger
|
||||||
|
fi
|
||||||
|
|
||||||
%preun -n %{name}-zram
|
%preun -n %{name}-zram
|
||||||
%systemd_preun zram-setup@.service
|
%systemd_preun udisks2-zram-setup@.service
|
||||||
|
|
||||||
%postun -n %{name}-zram
|
%postun -n %{name}-zram
|
||||||
%systemd_postun zram-setup@.service
|
%systemd_postun udisks2-zram-setup@.service
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -f udisks2.lang
|
%files -f udisks2.lang
|
||||||
@ -492,9 +428,6 @@ fi
|
|||||||
%if 0%{?with_zram}
|
%if 0%{?with_zram}
|
||||||
%{_libdir}/pkgconfig/udisks2-zram.pc
|
%{_libdir}/pkgconfig/udisks2-zram.pc
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?with_vdo}
|
|
||||||
%{_libdir}/pkgconfig/udisks2-vdo.pc
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if 0%{?with_bcache}
|
%if 0%{?with_bcache}
|
||||||
%files -n %{name}-bcache
|
%files -n %{name}-bcache
|
||||||
@ -522,85 +455,112 @@ fi
|
|||||||
%dir %{_sysconfdir}/udisks2/modules.conf.d
|
%dir %{_sysconfdir}/udisks2/modules.conf.d
|
||||||
%{_libdir}/udisks2/modules/libudisks2_zram.so
|
%{_libdir}/udisks2/modules/libudisks2_zram.so
|
||||||
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy
|
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.zram.policy
|
||||||
%{_unitdir}/zram-setup@.service
|
%{_unitdir}/udisks2-zram-setup@.service
|
||||||
%endif
|
%{_udevrulesdir}/90-udisks2-zram.rules
|
||||||
|
|
||||||
%if 0%{?with_vdo}
|
|
||||||
%files -n %{name}-vdo
|
|
||||||
%{_libdir}/udisks2/modules/libudisks2_vdo.so
|
|
||||||
%{_datadir}/polkit-1/actions/org.freedesktop.UDisks2.vdo.policy
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Aug 03 2023 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-16
|
* Wed Aug 02 2023 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-9
|
||||||
- iscsi: Fix login on firmware-discovered nodes (#2213193)
|
- iscsi: Fix login on firmware-discovered nodes (#2213769)
|
||||||
- tests: Extend iscsi method call timeouts (#2213715)
|
|
||||||
|
|
||||||
* Tue Jun 06 2023 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-15
|
* Fri Jun 02 2023 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-8
|
||||||
- Reimport gating tests
|
- iscsi: CHAP auth algorithm selection fixes (#2188916)
|
||||||
|
- tests: Use stronger passphrases for LUKS tests (#2188750,#2188752)
|
||||||
|
- integration-test: Fix scsi_debug cd drive read-only detection (#2211191)
|
||||||
|
- lvm2: Improve uevent processing (#2031673)
|
||||||
|
- tests: Mark test_job.UdisksJobTest.test_job as unstable (#2148844)
|
||||||
|
|
||||||
* Fri Jun 02 2023 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-14
|
* Tue Nov 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-7
|
||||||
- iscsi: CHAP auth algorithm selection fixes (#2188991)
|
- Fix iscsi test auth failures (#1958932)
|
||||||
- tests: Use stronger passphrases for LUKS tests
|
|
||||||
- lvm2: Improve uevent processing (#2039772)
|
|
||||||
|
|
||||||
* Tue Nov 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-13
|
* Fri Oct 21 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-6
|
||||||
- Fix iscsi test auth failures (#1966460)
|
- Fix iscsi test LIO target config (#2136557)
|
||||||
|
|
||||||
* Wed Oct 19 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-12
|
* Wed Oct 19 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-5
|
||||||
- Fix iscsi authentication info override (#2135773)
|
- Fix iscsi authentication info override (#1983602)
|
||||||
|
|
||||||
* Fri Sep 16 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-11
|
* Fri Sep 16 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-4
|
||||||
- Fix the patch list
|
- Restrict ATA Secure Erase Format() options (#2120329)
|
||||||
|
|
||||||
* Fri Sep 16 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-10
|
* Tue Feb 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-3
|
||||||
- Restrict ATA Secure Erase Format() options (#2120697)
|
- Fix LVM-VDO statistics tests (#2030916)
|
||||||
|
|
||||||
* Tue Feb 01 2022 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-9
|
* Tue Oct 26 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-2
|
||||||
- Fix LVM-VDO statistics tests (#2023880,#2025483)
|
- Gating test fix
|
||||||
- Fix GError ownership (#1999149)
|
|
||||||
|
|
||||||
* Mon Oct 25 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-8
|
* Tue Oct 26 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.4-1
|
||||||
- CVE-2021-3802: Harden the default mount options for ext filesystems (#2004422)
|
- Version 2.9.4 (#2010363)
|
||||||
|
- CVE-2021-3802: Harden the default mount options for ext filesystems (#2004423)
|
||||||
|
- Fix double free on daemon exit (unaligned fastbin chunk) (#2001549)
|
||||||
|
|
||||||
* Fri Apr 23 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-7
|
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.2-6
|
||||||
- Do not build udisks2-zram (#1923078)
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||||
- Fix Drive.ATA test failures (#1926827)
|
Related: rhbz#1991688
|
||||||
|
|
||||||
* Tue Jan 26 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-6
|
* Thu Apr 22 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.2-5
|
||||||
- Rebuilt for new docbook-style-xsl (#1853153)
|
- Fix Drive.ATA test failures
|
||||||
|
|
||||||
* Mon Nov 16 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-5
|
* Tue Apr 20 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.2-4
|
||||||
- Fix loop device setup
|
- Fix a couple of issues found by Coverity (#1938890)
|
||||||
|
- Ignore systemd "Extended Boot Loader" GPT partition
|
||||||
|
|
||||||
* Tue Nov 10 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-4
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.2-3
|
||||||
- Fix Drive.Ata tests with system SAS drives (#1855785)
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
||||||
- Force D-Bus interfaces flush (#1845973)
|
|
||||||
|
|
||||||
* Mon Jun 22 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-3
|
* Fri Mar 26 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.2-2
|
||||||
- Fix the UdisksLVMVDOTest.test_resize_physical test (#1845435)
|
- Fix FAT mkfs with dosfstools >= 4.2
|
||||||
|
- udiskslinuxdriveata: Use GTask to apply configuration in a thread
|
||||||
|
- Limit allowed module names
|
||||||
|
- 80-udisks2.rules: Ignore Apple boot partition from livecd-tools
|
||||||
|
|
||||||
* Mon Jun 22 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-2
|
* Thu Feb 04 2021 Tomas Bzatek <tbzatek@redhat.com> - 2.9.2-1
|
||||||
- Fix block tear-down functionality (#1843454)
|
- Version 2.9.2
|
||||||
- Fix libblockdev requires
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Sep 07 2020 Neal Gompa <ngompa13@gmail.com> - 2.9.1-2
|
||||||
|
- Fix conditional around polkit Recommends for building on EL7
|
||||||
|
|
||||||
|
* Wed Aug 12 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.1-1
|
||||||
|
- Version 2.9.1
|
||||||
|
- Renamed zram-setup@.service to udisks2-zram-setup@.service
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
* Tue May 26 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-1
|
* Tue May 26 2020 Tomas Bzatek <tbzatek@redhat.com> - 2.9.0-1
|
||||||
- Rebase to 2.9.0 (#1824147)
|
- Version 2.9.0
|
||||||
|
|
||||||
* Fri Jun 14 2019 Tomas Bzatek <tbzatek@redhat.com> - 2.8.3-2
|
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-4
|
||||||
- Minor test fixes
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
- Fix potential NULL dereference in UDisksLinuxPartition
|
|
||||||
|
* Tue Oct 01 2019 Jonathan Lebon <jonathan@jlebon.com> - 2.8.4-3
|
||||||
|
- Don't trigger udev if socket is not accessible
|
||||||
|
|
||||||
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.4-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 22 2019 Tomas Bzatek <tbzatek@redhat.com> - 2.8.4-1
|
||||||
|
- Version 2.8.4
|
||||||
|
|
||||||
* Thu Jun 13 2019 Tomas Bzatek <tbzatek@redhat.com> - 2.8.3-1
|
* Thu Jun 13 2019 Tomas Bzatek <tbzatek@redhat.com> - 2.8.3-1
|
||||||
- Rebased to upstream 2.8.3 release (#1685210)
|
- Version 2.8.3
|
||||||
- Fix leaking filedescriptors (#1614774)
|
|
||||||
- Fix udisksctl pager scrolling (#1662336)
|
|
||||||
- Fix LVM2 plugin CreateSnapshot() error (#1668291)
|
|
||||||
- Add ISCSI plugin GetInitiatorNameRaw() method (#1710257)
|
|
||||||
|
|
||||||
* Mon Oct 08 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.8.0-2
|
* Fri Mar 15 2019 Debarshi Ray <rishi@fedoraproject.org> - 2.8.2-2
|
||||||
- Fix string format vulnerability
|
- Update for tmpfiles.d snippet
|
||||||
Resolves: rhbz#1632831
|
|
||||||
|
* Mon Mar 04 2019 Tomas Bzatek <tbzatek@redhat.com> - 2.8.2-1
|
||||||
|
- Version 2.8.2
|
||||||
|
|
||||||
|
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Sep 26 2018 Vojtech Trefny <vtrefny@redhat.com> - 2.8.1-1
|
||||||
|
- Version 2.8.1
|
||||||
|
|
||||||
|
* Fri Sep 14 2018 Adam Williamson <awilliam@redhat.com> - 2.8.0-2
|
||||||
|
- Backport PR #576 to fix udev multipath device check (see RHBZ#1628192)
|
||||||
|
|
||||||
* Mon Aug 13 2018 Tomas Bzatek <tbzatek@redhat.com> - 2.8.0-1
|
* Mon Aug 13 2018 Tomas Bzatek <tbzatek@redhat.com> - 2.8.0-1
|
||||||
- Version 2.8.0
|
- Version 2.8.0
|
||||||
|
Loading…
Reference in New Issue
Block a user