diff options
Diffstat (limited to 'remote/modules/udisks')
| -rw-r--r-- | remote/modules/udisks/data/usr/share/polkit-1/rules.d/10-drives.rules | 6 | ||||
| -rw-r--r-- | remote/modules/udisks/templates/udisks.dbus.service | 6 | ||||
| -rw-r--r-- | remote/modules/udisks/templates/udisks.systemd.service | 9 | ||||
| -rw-r--r-- | remote/modules/udisks/templates/udisks2.dbus.service | 6 | ||||
| -rw-r--r-- | remote/modules/udisks/templates/udisks2.systemd.service | 9 | ||||
| -rw-r--r-- | remote/modules/udisks/udisks.build | 38 | ||||
| -rw-r--r-- | remote/modules/udisks/udisks.conf | 14 | ||||
| -rw-r--r-- | remote/modules/udisks/udisks.conf.opensuse | 7 | ||||
| -rw-r--r-- | remote/modules/udisks/udisks.conf.ubuntu | 7 | ||||
| -rw-r--r-- | remote/modules/udisks/udisks.conf.ubuntu.12 | 7 |
10 files changed, 109 insertions, 0 deletions
diff --git a/remote/modules/udisks/data/usr/share/polkit-1/rules.d/10-drives.rules b/remote/modules/udisks/data/usr/share/polkit-1/rules.d/10-drives.rules new file mode 100644 index 00000000..72c4fb16 --- /dev/null +++ b/remote/modules/udisks/data/usr/share/polkit-1/rules.d/10-drives.rules @@ -0,0 +1,6 @@ +polkit.addRule(function(action, subject) { + if (action.id.indexOf("org.freedesktop.udisks") == 0) { + return polkit.Result.YES; + } +}); + diff --git a/remote/modules/udisks/templates/udisks.dbus.service b/remote/modules/udisks/templates/udisks.dbus.service new file mode 100644 index 00000000..f48b064b --- /dev/null +++ b/remote/modules/udisks/templates/udisks.dbus.service @@ -0,0 +1,6 @@ +[D-BUS Service] +Name=org.freedesktop.UDisks +Exec=%UDISKSD% --no-debug +User=root +SystemdService=udisks.service + diff --git a/remote/modules/udisks/templates/udisks.systemd.service b/remote/modules/udisks/templates/udisks.systemd.service new file mode 100644 index 00000000..d0c41438 --- /dev/null +++ b/remote/modules/udisks/templates/udisks.systemd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Gnomes bloated 1000 dependency monster aka Disk Manager +Documentation=man:udisks(8) + +[Service] +Type=dbus +BusName=org.freedesktop.UDisks +ExecStart=%UDISKSD% --no-debug + diff --git a/remote/modules/udisks/templates/udisks2.dbus.service b/remote/modules/udisks/templates/udisks2.dbus.service new file mode 100644 index 00000000..2761a67c --- /dev/null +++ b/remote/modules/udisks/templates/udisks2.dbus.service @@ -0,0 +1,6 @@ +[D-BUS Service] +Name=org.freedesktop.UDisks2 +Exec=%UDISKSD% --no-debug +User=root +SystemdService=udisks2.service + diff --git a/remote/modules/udisks/templates/udisks2.systemd.service b/remote/modules/udisks/templates/udisks2.systemd.service new file mode 100644 index 00000000..47105a71 --- /dev/null +++ b/remote/modules/udisks/templates/udisks2.systemd.service @@ -0,0 +1,9 @@ +[Unit] +Description=Gnomes bloated 1000 dependency monster aka Disk Manager +Documentation=man:udisks(8) + +[Service] +Type=dbus +BusName=org.freedesktop.UDisks2 +ExecStart=%UDISKSD% --no-debug + diff --git a/remote/modules/udisks/udisks.build b/remote/modules/udisks/udisks.build new file mode 100644 index 00000000..1e9e73b0 --- /dev/null +++ b/remote/modules/udisks/udisks.build @@ -0,0 +1,38 @@ + +fetch_source () { + : +} + +build () { + COPYLIST="list_dpkg_output" + rm -f "$COPYLIST" + + list_packet_files >> "$COPYLIST" + tarcopy "$(cat "$COPYLIST" | sort -u)" "$MODULE_BUILD_DIR" + if [ -d "$MODULE_BUILD_DIR/lib/udev" ]; then + cp -a "$MODULE_BUILD_DIR/lib/udev" "$MODULE_BUILD_DIR/usr/lib/" || perror "Could not move /lib/udev to /usr/lib/udev" + fi + mkdir -p "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants" "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services" + local BINARY=$(find "$MODULE_BUILD_DIR" -name udisksd -executable | head -n 1) + [ -z "$BINARY" ] && BINARY=$(find "$MODULE_BUILD_DIR" -name udisks2d -executable | head -n 1) + [ -z "$BINARY" ] && BINARY=$(find "$MODULE_BUILD_DIR" -name udisksd2 -executable | head -n 1) + [ -z "$BINARY" ] && BINARY=$(find "$MODULE_BUILD_DIR" -name udisks-daemon -executable | head -n 1) + [ -z "$BINARY" ] && perror "Could not determine the udisks(1/2) daemon binary from inspecting $MODULE_BUILD_DIR" + BINARY="/${BINARY#$MODULE_BUILD_DIR}" + if [[ "$BINARY" == *udisks2* || -d "$MODULE_BUILD_DIR/usr/lib/udisks2" ]]; then + # assume udisks v2 + sed "s,%UDISKSD%,$BINARY,g" templates/udisks2.systemd.service > "$MODULE_BUILD_DIR/etc/systemd/system/udisks2.service" || perror "Error creating systemd service for udisks2" + sed "s,%UDISKSD%,$BINARY,g" templates/udisks2.dbus.service > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.UDisks2.service" || perror "Error creating dbus service for udisks2" + ln -s "../udisks2.service" "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants/udisks2.service" + else + # assume udisks v1 + sed "s,%UDISKSD%,$BINARY,g" templates/udisks1.systemd.service > "$MODULE_BUILD_DIR/etc/systemd/system/udisks.service" || perror "Error creating systemd service for udisks" + sed "s,%UDISKSD%,$BINARY,g" templates/udisks1.dbus.service > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.UDisks.service" || perror "Error creating dbus service for udisks" + ln -s "../udisks.service" "$MODULE_BUILD_DIR/etc/systemd/system/basic.target.wants/udisks.service" + fi +} + +post_copy () { + : +} + diff --git a/remote/modules/udisks/udisks.conf b/remote/modules/udisks/udisks.conf new file mode 100644 index 00000000..8ef6f29c --- /dev/null +++ b/remote/modules/udisks/udisks.conf @@ -0,0 +1,14 @@ +# This module is a little special, as it's supposed to be compatible +# with udisks 1 and 2. suse 12.3 and ubuntu 13.04 use udisks2, ubuntu 12.04 +# uses udisks1. The build script looks a little hacky +REQUIRED_DIRECTORIES=" + /etc/dbus-1 + /usr/lib/udev/rules.d + /usr/share/dbus-1 + /usr/share/polkit-1 + /etc/systemd/system +" +REQUIRED_BINARIES=" + udisksd +" + diff --git a/remote/modules/udisks/udisks.conf.opensuse b/remote/modules/udisks/udisks.conf.opensuse new file mode 100644 index 00000000..abf12be7 --- /dev/null +++ b/remote/modules/udisks/udisks.conf.opensuse @@ -0,0 +1,7 @@ +REQUIRED_INSTALLED_PACKAGES=" + udisks2 +" +REQUIRED_CONTENT_PACKAGES=" + udisks2 +" + diff --git a/remote/modules/udisks/udisks.conf.ubuntu b/remote/modules/udisks/udisks.conf.ubuntu new file mode 100644 index 00000000..abf12be7 --- /dev/null +++ b/remote/modules/udisks/udisks.conf.ubuntu @@ -0,0 +1,7 @@ +REQUIRED_INSTALLED_PACKAGES=" + udisks2 +" +REQUIRED_CONTENT_PACKAGES=" + udisks2 +" + diff --git a/remote/modules/udisks/udisks.conf.ubuntu.12 b/remote/modules/udisks/udisks.conf.ubuntu.12 new file mode 100644 index 00000000..0b8690bd --- /dev/null +++ b/remote/modules/udisks/udisks.conf.ubuntu.12 @@ -0,0 +1,7 @@ +REQUIRED_INSTALLED_PACKAGES=" + udisks +" +REQUIRED_CONTENT_PACKAGES=" + udisks +" + |
