Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFOS3.2.1 #28

Merged
merged 7 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ 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<br />
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).<br />
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<br />
Due to another round of significant spec-file changes (completely removed SalifishOS dependencies and all %post scriptlets), increasing the version number again.
* v0.6<br />
Expand Down
7 changes: 5 additions & 2 deletions rpm/crypto-sdcard.spec
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,6 +15,9 @@ Requires: polkit
Requires: udisks2
Requires: cryptsetup >= 1.4.0
Conflicts: crypto-sdcard_sbj
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

%description
%{summary}
Expand Down
7 changes: 3 additions & 4 deletions systemd/system/mount-cryptosd-luks@.service
Original file line number Diff line number Diff line change
@@ -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*
Expand All @@ -10,14 +10,13 @@ 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
# "udisksd" (per "udisks2.service") has finished starting, as the
# 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

7 changes: 3 additions & 4 deletions systemd/system/mount-cryptosd-plain@.service
Original file line number Diff line number Diff line change
@@ -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*
Expand All @@ -10,14 +10,13 @@ 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
# "udisksd" (per "udisks2.service") has finished starting, as the
# 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