From 29a4f827bca5db12f3c6868a9a54ea002b27668c Mon Sep 17 00:00:00 2001 From: olf Date: Sat, 26 Oct 2019 15:13:10 +0200 Subject: [PATCH 1/7] Following the changes in SFOS-next Following the changes made per https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e --- systemd/system/mount-cryptosd-luks@.service | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/systemd/system/mount-cryptosd-luks@.service b/systemd/system/mount-cryptosd-luks@.service index 2293b577..3ea195ad 100644 --- a/systemd/system/mount-cryptosd-luks@.service +++ b/systemd/system/mount-cryptosd-luks@.service @@ -1,7 +1,7 @@ [Unit] Description=Mount LUKS encrypted SD-card (%I) with udisks Documentation=https://github.com/Olf0/crypto-sdcard -After=udisks2.service cryptosd-luks@%i.service dev-mapper-%i.device +After=udisks2.service cryptosd-luks@%i.service dev-mapper-%i.device start-user-session.service BindsTo=udisks2.service cryptosd-luks@%i.service dev-mapper-%i.device # Ensure that this Unit is processed before alien-service-manager # is started (and even more importantly that it is shut down, *after* @@ -10,7 +10,6 @@ BindsTo=udisks2.service cryptosd-luks@%i.service dev-mapper-%i.device Before=alien-service-manager.service [Service] -User=nemo Type=oneshot RemainAfterExit=yes # "udisksctl mount" (below) often fails when issued right after @@ -18,6 +17,6 @@ RemainAfterExit=yes # udisks object for an encrypted partition has not been created yet. # Hence giving udisksd a second to settle: ExecStartPre=/bin/sleep 1 -ExecStart=/usr/bin/udisksctl mount -b /dev/mapper/%I -ExecStop=/usr/bin/udisksctl unmount -b /dev/mapper/%I +ExecStart=/usr/bin/udisksctl-user mount -b /dev/mapper/%I +ExecStop=/usr/bin/udisksctl-user unmount -b /dev/mapper/%I From a354efbeaba68b4eba7d0c28ff41a345dd5457b3 Mon Sep 17 00:00:00 2001 From: olf Date: Sat, 26 Oct 2019 15:22:08 +0200 Subject: [PATCH 2/7] Following the changes in SFOS-next Following the changes made per https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e --- systemd/system/mount-cryptosd-plain@.service | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/systemd/system/mount-cryptosd-plain@.service b/systemd/system/mount-cryptosd-plain@.service index 5a78d49a..8ea07019 100644 --- a/systemd/system/mount-cryptosd-plain@.service +++ b/systemd/system/mount-cryptosd-plain@.service @@ -1,7 +1,7 @@ [Unit] Description=Mount "plain" encrypted SD-card (%I) with udisks Documentation=https://github.com/Olf0/crypto-sdcard -After=udisks2.service cryptosd-plain@%i.service dev-mapper-%i.device +After=udisks2.service cryptosd-plain@%i.service dev-mapper-%i.device start-user-session.service BindsTo=udisks2.service cryptosd-plain@%i.service dev-mapper-%i.device # Ensure that this Unit is processed before alien-service-manager # is started (and even more importantly that it is shut down, *after* @@ -10,7 +10,6 @@ BindsTo=udisks2.service cryptosd-plain@%i.service dev-mapper-%i.device Before=alien-service-manager.service [Service] -User=nemo Type=oneshot RemainAfterExit=yes # "udisksctl mount" (below) often fails when issued right after @@ -18,6 +17,6 @@ RemainAfterExit=yes # udisks object for an encrypted partition has not been created yet. # Hence giving udisksd a second to settle: ExecStartPre=/bin/sleep 1 -ExecStart=/usr/bin/udisksctl mount -b /dev/mapper/%I -ExecStop=/usr/bin/udisksctl unmount -b /dev/mapper/%I +ExecStart=/usr/bin/udisksctl-user mount -b /dev/mapper/%I +ExecStop=/usr/bin/udisksctl-user unmount -b /dev/mapper/%I From 97647b4eb71b3e8f9593ef84da61e5a7daf35166 Mon Sep 17 00:00:00 2001 From: olf Date: Sat, 26 Oct 2019 16:25:45 +0200 Subject: [PATCH 3/7] Update crypto-sdcard.spec --- rpm/crypto-sdcard.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index 1ccd1e52..6d4ad19f 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -1,7 +1,7 @@ Name: crypto-sdcard Summary: Configuration files for unlocking and mounting encrypted SD-cards automatically -Version: 1.0 -Release: 4 +Version: 1.1 +Release: 1 Group: System/Base Distribution: SailfishOS Vendor: olf @@ -15,6 +15,9 @@ Requires: polkit Requires: udisks2 Requires: cryptsetup >= 1.4.0 Conflicts: crypto-sdcard_sbj +Requires: sailfish-version >= 3.2.0 +# Omit anti-dependency on future, untested SFOS versions, until a known conflict exists: +# Requires: sailfish-version < 3.9.9 %description %{summary} From 70ff964f488195b70f6f89522f56d74055463d6a Mon Sep 17 00:00:00 2001 From: olf Date: Sun, 27 Oct 2019 14:33:38 +0100 Subject: [PATCH 4/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f1dc106a..0b64cbd3 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ Nevertheless, these configuration files are also applicable to devices without A * Boot time is not significantly prolonged, as unlocking encrypted partitions per Cryptsetup occurs in parallel to starting udisks2; after both succeeded, all mount operations are also started concurrently. Version history: +* v1.1
+ Following the [changes in SFOS-next](https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e) to allow any interactive user (i.e., not just *nemo*) to mount an SD-card. * v1.0
Due to another round of significant spec-file changes (completely removed SalifishOS dependencies and all %post scriptlets), increasing the version number again. * v0.6
From 5661c394ec934caee4500f6b48abff03f4b48baa Mon Sep 17 00:00:00 2001 From: olf Date: Sun, 27 Oct 2019 15:07:28 +0100 Subject: [PATCH 5/7] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0b64cbd3..4781ee4a 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ Nevertheless, these configuration files are also applicable to devices without A Version history: * v1.1
- Following the [changes in SFOS-next](https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e) to allow any interactive user (i.e., not just *nemo*) to mount an SD-card. + Following the [changes in SFOS-next](https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e) to allow any interactive user (i.e., not just *nemo*) to mount an SD-card.
+ Note that mounting is still restricted to users, who belong to the Unix-group **system**, in contrast to e.g. [mount-sdcard](https://github.com/Olf0/mount-sdcard). * v1.0
Due to another round of significant spec-file changes (completely removed SalifishOS dependencies and all %post scriptlets), increasing the version number again. * v0.6
From 3fddf25ea6741fca1fb9a11ea5ea03f5410ce2b6 Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 11 Dec 2019 19:44:42 +0100 Subject: [PATCH 6/7] Require SFOS >= 3.2.1 See https://together.jolla.com/question/217840/changelog-321-nuuksio/#217840-udisks2 --- rpm/crypto-sdcard.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm/crypto-sdcard.spec b/rpm/crypto-sdcard.spec index 6d4ad19f..48338698 100644 --- a/rpm/crypto-sdcard.spec +++ b/rpm/crypto-sdcard.spec @@ -15,7 +15,7 @@ Requires: polkit Requires: udisks2 Requires: cryptsetup >= 1.4.0 Conflicts: crypto-sdcard_sbj -Requires: sailfish-version >= 3.2.0 +Requires: sailfish-version >= 3.2.1 # Omit anti-dependency on future, untested SFOS versions, until a known conflict exists: # Requires: sailfish-version < 3.9.9 From 0de6357968d640a2ca9e92970f536118922ed1ef Mon Sep 17 00:00:00 2001 From: olf Date: Wed, 11 Dec 2019 20:42:18 +0100 Subject: [PATCH 7/7] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4781ee4a..b6afce32 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,8 @@ Nevertheless, these configuration files are also applicable to devices without A Version history: * v1.1
- Following the [changes in SFOS-next](https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e) to allow any interactive user (i.e., not just *nemo*) to mount an SD-card.
+ Following the [changes in SFOS-next](https://git.sailfishos.org/mer-core/udisks2/commit/bcc6437ff35a3cc1e8c4777ee80d85a9c112e63e) to allow any interactive user (i.e., not just *nemo*) to mount an SD-card. + Hence v1.1 requires at least [SailfishOS 3.2.1](https://together.jolla.com/question/217840/changelog-321-nuuksio/#217840-udisks2).
Note that mounting is still restricted to users, who belong to the Unix-group **system**, in contrast to e.g. [mount-sdcard](https://github.com/Olf0/mount-sdcard). * v1.0
Due to another round of significant spec-file changes (completely removed SalifishOS dependencies and all %post scriptlets), increasing the version number again.