diff options
| author | Simon Rettberg | 2013-09-03 17:42:51 +0200 |
|---|---|---|
| committer | Jonathan Bauer | 2013-09-30 13:22:03 +0200 |
| commit | bae5ec1ed4ca07b552d6523e424a0ace5fa86933 (patch) | |
| tree | d5d6446821a19aa4e553b4a9de9fd5145d4e27d8 /remote/modules/polkit | |
| parent | [vbox] Readme file with notes on pathced scripts (diff) | |
| download | tm-scripts-bae5ec1ed4ca07b552d6523e424a0ace5fa86933.tar.gz tm-scripts-bae5ec1ed4ca07b552d6523e424a0ace5fa86933.tar.xz tm-scripts-bae5ec1ed4ca07b552d6523e424a0ace5fa86933.zip | |
Add consolekit and polkit
Diffstat (limited to 'remote/modules/polkit')
| l--------- | remote/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service | 1 | ||||
| -rw-r--r-- | remote/modules/polkit/polkit.build | 26 | ||||
| -rw-r--r-- | remote/modules/polkit/polkit.conf | 13 | ||||
| -rw-r--r-- | remote/modules/polkit/polkit.conf.opensuse | 11 | ||||
| -rw-r--r-- | remote/modules/polkit/polkit.conf.ubuntu | 12 | ||||
| -rw-r--r-- | remote/modules/polkit/templates/dbus.service | 6 | ||||
| -rw-r--r-- | remote/modules/polkit/templates/systemd.service | 8 |
7 files changed, 77 insertions, 0 deletions
diff --git a/remote/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service b/remote/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service new file mode 120000 index 00000000..b766f9ab --- /dev/null +++ b/remote/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service @@ -0,0 +1 @@ +../polkit.service
\ No newline at end of file diff --git a/remote/modules/polkit/polkit.build b/remote/modules/polkit/polkit.build new file mode 100644 index 00000000..eeae1e32 --- /dev/null +++ b/remote/modules/polkit/polkit.build @@ -0,0 +1,26 @@ +#tool/distro specific functions for fetching, building and installing dependencies + + +fetch_source () { + pinfo "Extracting from running system..." +} + +build () { + COPYLIST="$MODULE_DIR/list_dpkg_output" + [ -e "${COPYLIST}" ] && rm "${COPYLIST}" + + list_packet_files >> "${COPYLIST}" + tarcopy "$(cat "${COPYLIST}" | sort -u)" "${MODULE_BUILD_DIR}" + local POLPATH=$(find "$MODULE_BUILD_DIR" -name polkitd -executable | head -n 1) + POLPATH="/${POLPATH#$MODULE_BUILD_DIR}" + mkdir -p "$MODULE_BUILD_DIR/etc/systemd/system" "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services" + sed "s,%POLKITD%,${POLPATH},g" "templates/systemd.service" > "$MODULE_BUILD_DIR/etc/systemd/system/polkit.service" || perror "Could not generate polkit.service for systemd" + sed "s,%POLKITD%,${POLPATH},g" "templates/dbus.service" > "$MODULE_BUILD_DIR/usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service" || perror "Could not generate polkit.service for dbus" +} + +post_copy() { + #Add Polkit User/Group/Shadow to Stage3.2, required on opensuse + pinfo "Adding polkitd user to target system..." + add_user "polkitd" +} + diff --git a/remote/modules/polkit/polkit.conf b/remote/modules/polkit/polkit.conf new file mode 100644 index 00000000..97d4b892 --- /dev/null +++ b/remote/modules/polkit/polkit.conf @@ -0,0 +1,13 @@ +REQUIRED_DIRECTORIES=" + /etc/pam.d + /etc/polkit-1 + /usr/bin + /usr/share/polkit-1 + /etc/dbus-1/system.d +" +REQUIRED_FILES=" + /usr/share/dbus-1/system-services/org.freedesktop.PolicyKit1.service + /etc/systemd/system/polkit.service +" +REQUIRED_LIBRARIES="libmozjs185" + diff --git a/remote/modules/polkit/polkit.conf.opensuse b/remote/modules/polkit/polkit.conf.opensuse new file mode 100644 index 00000000..10cedbe9 --- /dev/null +++ b/remote/modules/polkit/polkit.conf.opensuse @@ -0,0 +1,11 @@ +REQUIRED_INSTALLED_PACKAGES=" + libmozjs185-1_0 +" +REQUIRED_CONTENT_PACKAGES=" + libmozjs185-1_0 + polkit +" +REQUIRED_DIRECTORIES+=" + /usr/lib/polkit-1 +" + diff --git a/remote/modules/polkit/polkit.conf.ubuntu b/remote/modules/polkit/polkit.conf.ubuntu new file mode 100644 index 00000000..76d31b9e --- /dev/null +++ b/remote/modules/polkit/polkit.conf.ubuntu @@ -0,0 +1,12 @@ +REQUIRED_INSTALLED_PACKAGES=" + libmozjs185-1.0 +" +REQUIRED_CONTENT_PACKAGES=" + libmozjs185-1.0 + policykit-1 +" +REQUIRED_DIRECTORIES+=" + /usr/lib/policykit-1 + /usr${ARCH_LIB_DIR}/polkit-1 +" + diff --git a/remote/modules/polkit/templates/dbus.service b/remote/modules/polkit/templates/dbus.service new file mode 100644 index 00000000..c9ee6c8b --- /dev/null +++ b/remote/modules/polkit/templates/dbus.service @@ -0,0 +1,6 @@ +[D-BUS Service] +Name=org.freedesktop.PolicyKit1 +Exec=%POLKITD% --no-debug +User=root +SystemdService=polkit.service + diff --git a/remote/modules/polkit/templates/systemd.service b/remote/modules/polkit/templates/systemd.service new file mode 100644 index 00000000..747fd7eb --- /dev/null +++ b/remote/modules/polkit/templates/systemd.service @@ -0,0 +1,8 @@ +[Unit] +Description=the cancer that is called PolKit + +[Service] +Type=dbus +BusName=org.freedesktop.PolicyKit1 +ExecStart=%POLKITD% --no-debug + |
