diff --git a/.gitignore b/.gitignore index 9b451cd..2befe26 100644 --- a/.gitignore +++ b/.gitignore @@ -17,10 +17,3 @@ /udisks-2.9.2.tar.bz2 /udisks-2.9.3.tar.bz2 /udisks-2.9.4.tar.bz2 -/udisks-2.10.0.tar.bz2 -/udisks-2.10.1.tar.bz2 -/udisks-2.10.90.tar.bz2 -/udisks-2.10.91.tar.bz2 -/udisks-2.11.0.tar.bz2 -/udisks-2.11.1.tar.bz2 -/udisks-2.11.2.tar.bz2 diff --git a/ignore-apple-boot-part.patch b/ignore-apple-boot-part.patch new file mode 100644 index 0000000..0c57303 --- /dev/null +++ b/ignore-apple-boot-part.patch @@ -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 diff --git a/sources b/sources index e41b09d..d2ecd4a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (udisks-2.11.2.tar.bz2) = 3996ac935cb330eb7f286f25a716da52ca374b14cc7b4f2e60a7e4b0b0745559607fa8c6d1e96e777b44eb8e07eb16e1ad6bc00b3051adea14e865df3efa2662 +SHA512 (udisks-2.9.4.tar.bz2) = 35f5429bc2a7092aa659cba9296837d127e2b17c23ab23111d0d9b230d15ef5a6965e112b1f3829748a69a52fb5b09722153f86f1ef70977b3ad7b7a4ec40ec5 diff --git a/udisks-2.10.0-block_format_ata_secure_erase.patch b/udisks-2.10.0-block_format_ata_secure_erase.patch new file mode 100644 index 0000000..3ad878d --- /dev/null +++ b/udisks-2.10.0-block_format_ata_secure_erase.patch @@ -0,0 +1,60 @@ +From eb917d346bc8592924c5f6566b01841176c53c8c Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Mon, 22 Aug 2022 16:27:11 +0200 +Subject: [PATCH] udiskslinuxblock: Only permit ATA Secure Erase during + Format() on a whole block device + +ATA Secure Erase requested as an option to the Format() method call used +to perform the actual erase on a whole drive object it looked up. When +Format() was called on a partition, this led to data loss on a whole drive. +This commit adds a safeguard to check that the Format() is requested +on a whole block device. + +Severity of this issue was slightly lowered by a failure to submit +the ATA Secure erase command in case some filesystem was mounted +at that point. +--- + src/udiskslinuxblock.c | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c +index d1da94edf..db0ed2bf6 100644 +--- a/src/udiskslinuxblock.c ++++ b/src/udiskslinuxblock.c +@@ -2354,6 +2354,7 @@ erase_ata_device (UDisksBlock *block, + { + gboolean ret = FALSE; + UDisksObject *drive_object = NULL; ++ UDisksLinuxBlockObject *block_object = NULL; + UDisksDriveAta *ata = NULL; + + drive_object = udisks_daemon_find_object (daemon, udisks_block_get_drive (block)); +@@ -2369,6 +2370,20 @@ erase_ata_device (UDisksBlock *block, + goto out; + } + ++ /* Reverse check to ensure we're erasing whole block device and not a partition */ ++ block_object = udisks_linux_drive_object_get_block (UDISKS_LINUX_DRIVE_OBJECT (drive_object), FALSE /* get_hw */); ++ if (block_object == NULL) ++ { ++ g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, "Couldn't find a block device for the drive to erase"); ++ goto out; ++ } ++ if (g_strcmp0 (g_dbus_object_get_object_path (G_DBUS_OBJECT (object)), ++ g_dbus_object_get_object_path (G_DBUS_OBJECT (block_object))) != 0) ++ { ++ g_set_error (error, UDISKS_ERROR, UDISKS_ERROR_FAILED, "ATA secure erase needs to be performed on a whole block device"); ++ goto out; ++ } ++ + /* sleep a tiny bit here to avoid the secure erase code racing with + * programs spawned by udev + */ +@@ -2382,6 +2397,7 @@ erase_ata_device (UDisksBlock *block, + out: + g_clear_object (&ata); + g_clear_object (&drive_object); ++ g_clear_object (&block_object); + return ret; + } + diff --git a/udisks-2.10.0-doc_annotations.patch b/udisks-2.10.0-doc_annotations.patch new file mode 100644 index 0000000..30f85fc --- /dev/null +++ b/udisks-2.10.0-doc_annotations.patch @@ -0,0 +1,39 @@ +From 1ef9ab02af5c10a0fc7611c5579c4bc2344e83d0 Mon Sep 17 00:00:00 2001 +From: Tomas Bzatek +Date: Tue, 15 Feb 2022 13:25:22 +0100 +Subject: [PATCH] doc: Fix @since: annotations + +Recent changes in gdbus-codegen (2.71.1) have introduced parser +issues on malformed annotations. + +https://gitlab.gnome.org/GNOME/glib/-/issues/2601 +--- + data/org.freedesktop.UDisks2.xml | 2 +- + modules/lvm2/data/org.freedesktop.UDisks2.lvm2.xml | 1 - + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/data/org.freedesktop.UDisks2.xml b/data/org.freedesktop.UDisks2.xml +index 23f18746f..d9045a7f3 100644 +--- a/data/org.freedesktop.UDisks2.xml ++++ b/data/org.freedesktop.UDisks2.xml +@@ -1802,7 +1802,7 @@ +