From 2fc4384091c584198a8081a80f320469777c691c Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 18 Sep 2018 17:08:58 +0300 Subject: [PATCH] [udisks] Fix internal memory card encryption. Fixes JB#42802 --- ...dev-mdraid-and-part-support-from-sou.patch | 6 ++-- rpm/0002-Drop-smartata-dependencies.patch | 4 +-- rpm/0003-Loosen-up-mount-unmount-rights.patch | 4 +-- ...-sd-service-that-is-executed-as-nemo.patch | 6 ++-- ...005-Add-udev-rule-for-the-sda-drives.patch | 4 +-- rpm/0006-Disable-zram-rule-for-now.patch | 4 +-- ...07-Create-mount-path-with-755-rights.patch | 4 +-- ...-to-format-from-another-seat.-Fixes-.patch | 4 +-- ...possible-to-unlock-from-another-seat.patch | 4 +-- ...-to-encrypt-mmcblk-format-with-encry.patch | 32 +++++++++++++++++++ rpm/udisks2.spec | 2 ++ 11 files changed, 54 insertions(+), 20 deletions(-) create mode 100644 rpm/0010-Make-it-possible-to-encrypt-mmcblk-format-with-encry.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 6b16b09..85587c5 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 1416329a39c62b7b94148128f218a4ea731be29f Mon Sep 17 00:00:00 2001 +From d2bb5ff5f9a26797f69c04bd8bd8966e670d1149 Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 5 Dec 2017 11:17:50 +0200 -Subject: [PATCH 1/9] Disable libblockdev-mdraid and part support from source +Subject: [PATCH 01/10] Disable libblockdev-mdraid and part support from source tree Signed-off-by: Raine Makelainen @@ -314,7 +314,7 @@ index 8014664e..ef772320 100644 /* ---------------------------------------------------------------------------------------------------- */ diff --git a/src/udiskslinuxpartition.c b/src/udiskslinuxpartition.c -index 5fa20482..70eb6477 100644 +index 5fa20482..7260c00f 100644 --- a/src/udiskslinuxpartition.c +++ b/src/udiskslinuxpartition.c @@ -18,6 +18,10 @@ diff --git a/rpm/0002-Drop-smartata-dependencies.patch b/rpm/0002-Drop-smartata-dependencies.patch index 40c17a4..27d6552 100644 --- a/rpm/0002-Drop-smartata-dependencies.patch +++ b/rpm/0002-Drop-smartata-dependencies.patch @@ -1,7 +1,7 @@ -From cae22acf2f1cb3165c10bc9b5e63b15d1f866ee0 Mon Sep 17 00:00:00 2001 +From 15170ae4c4a9d0b12dc6d25184020dfea35b743f Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Thu, 7 Dec 2017 13:15:34 +0200 -Subject: [PATCH 2/9] Drop smartata dependencies +Subject: [PATCH 02/10] Drop smartata dependencies Signed-off-by: Raine Makelainen --- diff --git a/rpm/0003-Loosen-up-mount-unmount-rights.patch b/rpm/0003-Loosen-up-mount-unmount-rights.patch index f4a8ea9..fd490d0 100644 --- a/rpm/0003-Loosen-up-mount-unmount-rights.patch +++ b/rpm/0003-Loosen-up-mount-unmount-rights.patch @@ -1,7 +1,7 @@ -From 26f930ba9300ec99a277c87a3cafe116da13b417 Mon Sep 17 00:00:00 2001 +From 209bdc355e416d05292273d15e59303892391389 Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 6 Feb 2018 14:01:16 +0200 -Subject: [PATCH 3/9] Loosen up mount/unmount rights +Subject: [PATCH 03/10] Loosen up mount/unmount rights Signed-off-by: Raine Makelainen --- 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 fb270de..8405479 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 34b034aefe6a1f1954402ba68da61d4e3385f736 Mon Sep 17 00:00:00 2001 +From 197d54eae6fdee57babc0071c712ca534c429d6d Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Tue, 6 Feb 2018 14:08:59 +0200 -Subject: [PATCH 4/9] Introduce mount-sd service that is executed as nemo +Subject: [PATCH 04/10] Introduce mount-sd service that is executed as nemo Signed-off-by: Raine Makelainen --- @@ -40,7 +40,7 @@ index ddf9e3d6..4c77ee56 100644 systemdservicedir = $(systemdsystemunitdir) diff --git a/data/mount-sd@.service b/data/mount-sd@.service new file mode 100644 -index 00000000..a981e303 +index 00000000..c44deebd --- /dev/null +++ b/data/mount-sd@.service @@ -0,0 +1,12 @@ 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 ba05651..b7f5416 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 009396002ac2592de4d5b6a7b7a9da36a321e272 Mon Sep 17 00:00:00 2001 +From 577b5a4c6ed031f08daed8d08c48e8942f09736a Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Mon, 12 Mar 2018 10:18:03 +0200 -Subject: [PATCH 5/9] Add udev rule for the sda drives +Subject: [PATCH 05/10] Add udev rule for the sda drives Signed-off-by: Raine Makelainen --- diff --git a/rpm/0006-Disable-zram-rule-for-now.patch b/rpm/0006-Disable-zram-rule-for-now.patch index 61618df..50abe9b 100644 --- a/rpm/0006-Disable-zram-rule-for-now.patch +++ b/rpm/0006-Disable-zram-rule-for-now.patch @@ -1,7 +1,7 @@ -From 6cc6f7315474139959932ef477e74d29332d494d Mon Sep 17 00:00:00 2001 +From 08fb02a4ce23719d33dc66f56ad5b276bba5aafb Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Wed, 11 Apr 2018 11:11:53 +0300 -Subject: [PATCH 6/9] Disable zram rule for now +Subject: [PATCH 06/10] Disable zram rule for now Signed-off-by: Raine Makelainen --- diff --git a/rpm/0007-Create-mount-path-with-755-rights.patch b/rpm/0007-Create-mount-path-with-755-rights.patch index 99dd07d..febfe1b 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 cd86396dde456b4090856a0455ad68999bf07492 Mon Sep 17 00:00:00 2001 +From f0ba7213af52451d0fc70c90682f3f8ba8606f5b Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Wed, 18 Apr 2018 18:00:00 +0300 -Subject: [PATCH 7/9] Create mount path with 755 rights +Subject: [PATCH 07/10] Create mount path with 755 rights Signed-off-by: Raine Makelainen --- 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 index a970a7c..aea16f7 100644 --- 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 @@ -1,7 +1,7 @@ -From 5775a7f9008849338d3da27dc93a92e6b72dfb84 Mon Sep 17 00:00:00 2001 +From 51e65e9728ecb5acdb717a54e89b9bb036e46982 Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Mon, 16 Jul 2018 15:40:23 +0300 -Subject: [PATCH 8/9] Make it possible to format from another seat. Fixes +Subject: [PATCH 08/10] Make it possible to format from another seat. Fixes JB#42414 Signed-off-by: Raine Makelainen diff --git a/rpm/0009-Make-it-possible-to-unlock-from-another-seat.patch b/rpm/0009-Make-it-possible-to-unlock-from-another-seat.patch index 27e458b..527d8a2 100644 --- a/rpm/0009-Make-it-possible-to-unlock-from-another-seat.patch +++ b/rpm/0009-Make-it-possible-to-unlock-from-another-seat.patch @@ -1,7 +1,7 @@ -From a1e98f930a3906b6a5725aa5928bd61195d98cce Mon Sep 17 00:00:00 2001 +From 7bd4f8232b8c726f11bd989c3249f19a80cfb46a Mon Sep 17 00:00:00 2001 From: Raine Makelainen Date: Fri, 3 Aug 2018 09:39:20 +0300 -Subject: [PATCH 9/9] Make it possible to unlock from another seat +Subject: [PATCH 09/10] Make it possible to unlock from another seat Signed-off-by: Raine Makelainen --- diff --git a/rpm/0010-Make-it-possible-to-encrypt-mmcblk-format-with-encry.patch b/rpm/0010-Make-it-possible-to-encrypt-mmcblk-format-with-encry.patch new file mode 100644 index 0000000..23bf4d7 --- /dev/null +++ b/rpm/0010-Make-it-possible-to-encrypt-mmcblk-format-with-encry.patch @@ -0,0 +1,32 @@ +From c810cbae8bbdf5ca168170d37259f7f1a0534ec9 Mon Sep 17 00:00:00 2001 +From: Raine Makelainen +Date: Tue, 18 Sep 2018 17:04:36 +0300 +Subject: [PATCH 10/10] Make it possible to encrypt mmcblk* (format with + encryption) + +Signed-off-by: Raine Makelainen +--- + src/udiskslinuxblock.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/src/udiskslinuxblock.c b/src/udiskslinuxblock.c +index 09fa90a0..996cde55 100644 +--- a/src/udiskslinuxblock.c ++++ b/src/udiskslinuxblock.c +@@ -2129,8 +2129,13 @@ wait_for_luks_uuid (UDisksDaemon *daemon, + if (block == NULL) + goto out; + ++ // Currently /dev/mmcblk devices won't get assigned with ID_FS_TYPE=crypto_LUKS when formatting encryption ++ // enabled whereas with /dev/sda devices crypto_LUKS will appear. Wait condition used only when formatting encryption ++ // enabled. ++#if 0 + if (g_strcmp0 (udisks_block_get_id_type (block), "crypto_LUKS") != 0) + goto out; ++#endif + + ret = g_object_ref (data->object); + +-- +2.17.1 + diff --git a/rpm/udisks2.spec b/rpm/udisks2.spec index 84f94f6..e74376f 100644 --- a/rpm/udisks2.spec +++ b/rpm/udisks2.spec @@ -23,6 +23,7 @@ Patch6: 0006-Disable-zram-rule-for-now.patch Patch7: 0007-Create-mount-path-with-755-rights.patch Patch8: 0008-Make-it-possible-to-format-from-another-seat.-Fixes-.patch Patch9: 0009-Make-it-possible-to-unlock-from-another-seat.patch +Patch10: 0010-Make-it-possible-to-encrypt-mmcblk-format-with-encry.patch BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version} BuildRequires: pkgconfig(gobject-introspection-1.0) @@ -112,6 +113,7 @@ dynamic library, which provides access to the udisksd daemon. %patch7 -p1 -b .mount-path-rights %patch8 -p1 -b .format-another-seat %patch9 -p1 -b .unlock-another-seat +%patch10 -p1 -b .mmcblk-encryption %build # Disable gtk-doc