Skip to content

Commit 6f1f7af

Browse files
authored
Merge pull request #19 from Olf0/sfos220+
Commits for v1.5.1
2 parents a9fc7f8 + 8d3ab2f commit 6f1f7af

File tree

4 files changed

+25
-11
lines changed

4 files changed

+25
-11
lines changed

environment/udisks2/mount-sd@.conf

Lines changed: 0 additions & 2 deletions
This file was deleted.

rpm/mount-sdcard.spec

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Name: mount-sdcard
22
Summary: Enhanced mounting scripts for SD-cards
3-
Version: 1.5.0
3+
Version: 1.5.1
44
# Since v1.4.2, the release version consists of two or three fields, separated by a dot ("."):
55
# - The first field must contain a natural number greater than zero.
66
# This number may be prefixed by one of {alpha,beta,stable}, e.g. "alpha13".
@@ -26,8 +26,9 @@ Source: https://github.com/Olf0/%{name}/archive/%{version}-%{release}/%{n
2626
BuildArch: noarch
2727
Requires: systemd
2828
Requires: udisks2
29-
# Better use direct dependencies than indirect ones (here: the line above versus the one below), but
30-
# ultimately decided to use both in this case:
29+
# Better use direct dependencies on specific versions than indirect ones (here: the line above
30+
# versus the one below) in general, but ultimately decided not to do so in this special case
31+
# (for commonality across release versions):
3132
Requires: sailfish-version >= 2.2.0
3233
# Omit anti-dependency on future, untested SFOS versions, until a known conflict exists:
3334
Requires: sailfish-version < 3.0.1
@@ -43,12 +44,10 @@ Requires: sailfish-version < 3.0.1
4344
%install
4445
mkdir -p %{buildroot}%{_sysconfdir}
4546
cp -R systemd udev %{buildroot}%{_sysconfdir}/
46-
mkdir -p %{buildroot}%{_sharedstatedir}
47-
cp -R environment %{buildroot}%{_sharedstatedir}/
4847

4948
%files
5049
%defattr(-,root,root,-)
5150
%{_sysconfdir}/systemd/system/mount-sd@.service
5251
%{_sysconfdir}/udev/rules.d/91-mountsd.rules
53-
%config(noreplace) %{_sharedstatedir}/environment/udisks2/mount-sd@.conf
52+
%config %{_sysconfdir}/systemd/system/mount-sd.conf
5453

systemd/system/mount-sd.conf

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This configuration file is part of the mount-sdcard utility, see https://github.com/Olf0/mount-sdcard/
2+
# mount-sdcard evaluates configration files at these location in the following order:
3+
# A file listed lower (i.e., evaluated later) can override settings made by an earlier one.
4+
# /etc/systemd/system/mount-sd.conf
5+
# /etc/mount-sdcard/mount-sd.conf
6+
# Plus at last the device-specific configuration file:
7+
# /etc/mount-sdcard/mount-sd@<device-name>.conf
8+
# Do not alter or remove /etc/systemd/system/mount-sd.conf, because it will be redeployed by the next
9+
# update of mount-sdcard! Instead alter mount-sdcard's settings by creating one of the configuration
10+
# files in /etc/mount-sdcard/: I.e., set or reset (per e.g., UDISKS2_MOUNT_OPTIONS="") specific options
11+
# there.
12+
# All available option variables are listed here:
13+
14+
UDISKS2_MOUNT_OPTIONS="-o noexec"
15+
# Mind that udisks2 filters mount options against a whitelist: If not on that list, it refuses to mount.
16+

systemd/system/mount-sd@.service

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[Unit]
2-
Description=Mount SD-card (%i) with udisks
2+
Description=Mount /dev/%i per udisks
33
After=udisks2.service dev-%i.device start-user-session.service
44
Requisite=dev-%i.device
55
Requires=udisks2.service
@@ -16,8 +16,9 @@ Before=alien-service-manager.service umount.target
1616
User=nemo
1717
Type=oneshot
1818
RemainAfterExit=yes
19-
EnvironmentFile=-/var/lib/environment/udisks2/%p@.conf
20-
EnvironmentFile=-/var/lib/environment/udisks2/%N.conf
19+
EnvironmentFile=/etc/systemd/system/%p.conf
20+
EnvironmentFile=-/etc/mount-sdcard/%p.conf
21+
EnvironmentFile=-/etc/mount-sdcard/%N.conf
2122
ExecStart=/usr/bin/udisksctl mount $UDISKS2_MOUNT_OPTIONS -b /dev/%i
2223
ExecStop=/usr/bin/udisksctl unmount -b /dev/%i
2324
ExecStopPost=/bin/umount -vrq /dev/%i

0 commit comments

Comments
 (0)