From 49cf89a2b1802b9c69d166c9432d6e75ad926fae Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Mon, 16 Jul 2018 15:50:28 +0300 Subject: [PATCH] [udisks2] Make it possible to format from another seat. Fixes JB#42414 --- ...dev-mdraid-and-part-support-from-sou.patch | 6 ++-- rpm/0002-Drop-smartata-dependencies.patch | 6 ++-- rpm/0003-Loosen-up-mount-unmount-rights.patch | 6 ++-- ...-sd-service-that-is-executed-as-nemo.patch | 6 ++-- ...005-Add-udev-rule-for-the-sda-drives.patch | 6 ++-- rpm/0006-Disable-zram-rule-for-now.patch | 6 ++-- ...07-Create-mount-path-with-755-rights.patch | 6 ++-- ...-to-format-from-another-seat.-Fixes-.patch | 31 +++++++++++++++++++ ...possible-to-format-from-another-seat.patch | 31 +++++++++++++++++++ rpm/udisks2.spec | 2 ++ 10 files changed, 85 insertions(+), 21 deletions(-) create mode 100644 rpm/0008-Make-it-possible-to-format-from-another-seat.-Fixes-.patch create mode 100644 rpm/0008-udisks2-Make-it-possible-to-format-from-another-seat.patch diff --git a/rpm/0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch b/rpm/0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch index 7d348c7..c172685 100644 --- a/rpm/0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch +++ b/rpm/0001-Disable-libblockdev-mdraid-and-part-support-from-sou.patch @@ -1,7 +1,7 @@ -From 4f1e2b1bdfe5886ebdb6c830dbe9f966cd1e0d8a Mon Sep 17 00:00:00 2001 +From 66b9026ffbd0653d698e96674c229d006b7503bc Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 5 Dec 2017 11:17:50 +0200 -Subject: [PATCH 1/7] Disable libblockdev-mdraid and part support from source +Subject: [PATCH 1/8] Disable libblockdev-mdraid and part support from source tree Signed-off-by: Raine Makelainen @@ -489,5 +489,5 @@ index 7a92057f..90c7cf24 100644 static int -- -2.14.3 +2.17.1 diff --git a/rpm/0002-Drop-smartata-dependencies.patch b/rpm/0002-Drop-smartata-dependencies.patch index 259b278..bb7ab5d 100644 --- a/rpm/0002-Drop-smartata-dependencies.patch +++ b/rpm/0002-Drop-smartata-dependencies.patch @@ -1,7 +1,7 @@ -From e1ae99dfbabce1cd04b0f8dccbaf12650331d496 Mon Sep 17 00:00:00 2001 +From 8f3aad8fcdefa494421c23c0cc172974d0089d5b Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Thu, 7 Dec 2017 13:15:34 +0200 -Subject: [PATCH 2/7] Drop smartata dependencies +Subject: [PATCH 2/8] Drop smartata dependencies Signed-off-by: Raine Makelainen --- @@ -118,5 +118,5 @@ index 467f4612..7829d44a 100644 /* ---------------------------------------------------------------------------------------------------- */ -- -2.14.3 +2.17.1 diff --git a/rpm/0003-Loosen-up-mount-unmount-rights.patch b/rpm/0003-Loosen-up-mount-unmount-rights.patch index c214e70..9440ba0 100644 --- a/rpm/0003-Loosen-up-mount-unmount-rights.patch +++ b/rpm/0003-Loosen-up-mount-unmount-rights.patch @@ -1,7 +1,7 @@ -From 0dd3182fe80c7bdc28b2be5ab9b23782f015e1f3 Mon Sep 17 00:00:00 2001 +From 90d266f78e8b7f32adcd189d12aee699b0cb047c Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 6 Feb 2018 14:01:16 +0200 -Subject: [PATCH 3/7] Loosen up mount/unmount rights +Subject: [PATCH 3/8] Loosen up mount/unmount rights Signed-off-by: Raine Makelainen --- @@ -50,5 +50,5 @@ index d97528d4..7b42f7e0 100644 -- -2.14.3 +2.17.1 diff --git a/rpm/0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch b/rpm/0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch index 6c2bd8e..6f08507 100644 --- a/rpm/0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch +++ b/rpm/0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch @@ -1,7 +1,7 @@ -From a8f138d9bcaeb24e955b88b42b94de85af41112a Mon Sep 17 00:00:00 2001 +From 297ddec9abf15899ebed74f187232dadae0f49fc Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 6 Feb 2018 14:08:59 +0200 -Subject: [PATCH 4/7] Introduce mount-sd service that is executed as nemo +Subject: [PATCH 4/8] Introduce mount-sd service that is executed as nemo Signed-off-by: Raine Makelainen --- @@ -57,5 +57,5 @@ index 00000000..a981e303 +ExecStart=/usr/bin/udisksctl mount -b /dev/%i +ExecStop=-/usr/bin/udisksctl unmount -b /dev/%i -- -2.14.3 +2.17.1 diff --git a/rpm/0005-Add-udev-rule-for-the-sda-drives.patch b/rpm/0005-Add-udev-rule-for-the-sda-drives.patch index 5c70d30..813f1aa 100644 --- a/rpm/0005-Add-udev-rule-for-the-sda-drives.patch +++ b/rpm/0005-Add-udev-rule-for-the-sda-drives.patch @@ -1,7 +1,7 @@ -From b878553a1f192deef54ea184c4aef3f55b3ab569 Mon Sep 17 00:00:00 2001 +From 1cc5f25e78e0b22134cdc175b32195f872cc0588 Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Mon, 12 Mar 2018 10:18:03 +0200 -Subject: [PATCH 5/7] Add udev rule for the sda drives +Subject: [PATCH 5/8] Add udev rule for the sda drives Signed-off-by: Raine Makelainen --- @@ -26,5 +26,5 @@ index 2e6ed158..f738e897 100644 # ditto for memstick KERNEL=="msblk[0-9]|mspblk[0-9]", SUBSYSTEMS=="memstick", ENV{DEVTYPE}=="disk", ENV{ID_DRIVE_FLASH_MS}="1", ENV{ID_DRIVE_MEDIA_FLASH_MS}="1" -- -2.14.3 +2.17.1 diff --git a/rpm/0006-Disable-zram-rule-for-now.patch b/rpm/0006-Disable-zram-rule-for-now.patch index 9281a8c..400c189 100644 --- a/rpm/0006-Disable-zram-rule-for-now.patch +++ b/rpm/0006-Disable-zram-rule-for-now.patch @@ -1,7 +1,7 @@ -From d1845fbea73382a985d1b1eac5a8bd16d684d928 Mon Sep 17 00:00:00 2001 +From 4667c9b0ce05d48e2b7002a3f6b198ca0207d8f1 Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Wed, 11 Apr 2018 11:11:53 +0300 -Subject: [PATCH 6/7] Disable zram rule for now +Subject: [PATCH 6/8] Disable zram rule for now Signed-off-by: Raine Makelainen --- @@ -22,5 +22,5 @@ index f738e897..82221726 100644 # Explicitly ignore ram block devices, they don't work with udev KERNEL=="ram*", ENV{UDISKS_IGNORE}="1" -- -2.14.3 +2.17.1 diff --git a/rpm/0007-Create-mount-path-with-755-rights.patch b/rpm/0007-Create-mount-path-with-755-rights.patch index aa3a421..1107592 100644 --- a/rpm/0007-Create-mount-path-with-755-rights.patch +++ b/rpm/0007-Create-mount-path-with-755-rights.patch @@ -1,7 +1,7 @@ -From c4d624a4aad1733d11f5d7fd81b39f37b528352d Mon Sep 17 00:00:00 2001 +From 0cd18d6a72de3d800f6e8e9a55681484b79a9cb8 Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Wed, 18 Apr 2018 18:00:00 +0300 -Subject: [PATCH 7/7] Create mount path with 755 rights +Subject: [PATCH 7/8] Create mount path with 755 rights Signed-off-by: Raine Makelainen --- @@ -22,5 +22,5 @@ index c91a1279..6366bd76 100644 if (g_mkdir (mount_dir, 0750) != 0 && errno != EEXIST) #endif -- -2.14.3 +2.17.1 diff --git a/rpm/0008-Make-it-possible-to-format-from-another-seat.-Fixes-.patch b/rpm/0008-Make-it-possible-to-format-from-another-seat.-Fixes-.patch new file mode 100644 index 0000000..4b92a26 --- /dev/null +++ b/rpm/0008-Make-it-possible-to-format-from-another-seat.-Fixes-.patch @@ -0,0 +1,31 @@ +From 72dce4ff132fd0dc4aa6fda56047c1c91f182e9d Mon Sep 17 00:00:00 2001 +From: Raine Makelainen +Date: Mon, 16 Jul 2018 15:40:23 +0300 +Subject: [PATCH 8/8] Make it possible to format from another seat. Fixes + JB#42414 + +Signed-off-by: Raine Makelainen +--- + data/org.freedesktop.UDisks2.policy.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/data/org.freedesktop.UDisks2.policy.in b/data/org.freedesktop.UDisks2.policy.in +index 7b42f7e0..fedab426 100644 +--- a/data/org.freedesktop.UDisks2.policy.in ++++ b/data/org.freedesktop.UDisks2.policy.in +@@ -328,9 +328,9 @@ + <_description>Modify a device + <_message>Authentication is required to modify a device plugged into another seat + +- auth_admin +- auth_admin +- auth_admin_keep ++ auth_self ++ auth_self ++ auth_self_keep + + + +-- +2.17.1 + diff --git a/rpm/0008-udisks2-Make-it-possible-to-format-from-another-seat.patch b/rpm/0008-udisks2-Make-it-possible-to-format-from-another-seat.patch new file mode 100644 index 0000000..7f26ea2 --- /dev/null +++ b/rpm/0008-udisks2-Make-it-possible-to-format-from-another-seat.patch @@ -0,0 +1,31 @@ +From ae7391c9d960baa350b0a689c0171f4c9275904a Mon Sep 17 00:00:00 2001 +From: Raine Makelainen +Date: Mon, 16 Jul 2018 15:40:23 +0300 +Subject: [PATCH 8/8] [udisks2] Make it possible to format from another seat. + Contributes to JB#42414 + +Signed-off-by: Raine Makelainen +--- + data/org.freedesktop.UDisks2.policy.in | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/data/org.freedesktop.UDisks2.policy.in b/data/org.freedesktop.UDisks2.policy.in +index 7b42f7e0..fedab426 100644 +--- a/data/org.freedesktop.UDisks2.policy.in ++++ b/data/org.freedesktop.UDisks2.policy.in +@@ -328,9 +328,9 @@ + <_description>Modify a device + <_message>Authentication is required to modify a device plugged into another seat + +- auth_admin +- auth_admin +- auth_admin_keep ++ auth_self ++ auth_self ++ auth_self_keep + + + +-- +2.17.1 + diff --git a/rpm/udisks2.spec b/rpm/udisks2.spec index 985b1c6..df8ec9b 100644 --- a/rpm/udisks2.spec +++ b/rpm/udisks2.spec @@ -21,6 +21,7 @@ Patch4: 0004-Introduce-mount-sd-service-that-is-executed-as-nemo.patch Patch5: 0005-Add-udev-rule-for-the-sda-drives.patch Patch6: 0006-Disable-zram-rule-for-now.patch Patch7: 0007-Create-mount-path-with-755-rights.patch +Patch8: 0008-udisks2-Make-it-possible-to-format-from-another-seat.patch BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gobject-introspection-1.0) @@ -107,6 +108,7 @@ dynamic library, which provides access to the udisksd daemon. %patch5 -p1 -b .udev-rules-for-sda %patch6 -p1 -b .udev-disable-zram %patch7 -p1 -b .mount-path-rights +%patch8 -p1 -b .format-another-seat # Disable gtk-doc sed -i 's/SUBDIRS = data udisks src tools modules po doc/SUBDIRS = data udisks src tools modules po/' Makefile.am