diff options
author | Sebastian | 2016-04-25 12:01:08 +0200 |
---|---|---|
committer | Sebastian | 2016-04-25 12:01:08 +0200 |
commit | 5acda3eaeabae9045609539303a8c12c4ce401f1 (patch) | |
tree | 7e71975f8570b05aafe2ea6ec0e242a8912387bb /core/modules/polkit | |
parent | initial commit (diff) | |
download | mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.gz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.tar.xz mltk-5acda3eaeabae9045609539303a8c12c4ce401f1.zip |
merge with latest dev version
Diffstat (limited to 'core/modules/polkit')
l--------- | core/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service | 1 | ||||
-rw-r--r-- | core/modules/polkit/module.build | 25 | ||||
-rw-r--r-- | core/modules/polkit/module.conf | 13 | ||||
-rw-r--r-- | core/modules/polkit/module.conf.debian | 19 | ||||
-rw-r--r-- | core/modules/polkit/module.conf.fedora | 12 | ||||
-rw-r--r-- | core/modules/polkit/module.conf.opensuse | 12 | ||||
-rw-r--r-- | core/modules/polkit/module.conf.ubuntu | 19 | ||||
-rw-r--r-- | core/modules/polkit/templates/dbus.service | 6 | ||||
-rw-r--r-- | core/modules/polkit/templates/systemd.service | 8 |
9 files changed, 115 insertions, 0 deletions
diff --git a/core/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service b/core/modules/polkit/data/etc/systemd/system/basic.target.wants/polkit.service new file mode 120000 index 00000000..b766f9ab --- /dev/null +++ b/core/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/core/modules/polkit/module.build b/core/modules/polkit/module.build new file mode 100644 index 00000000..26b11370 --- /dev/null +++ b/core/modules/polkit/module.build @@ -0,0 +1,25 @@ +#tool/distro specific functions for fetching, building and installing dependencies + + +fetch_source () { + pinfo "Extracting from running system..." +} + +build () { + local COPYLIST="$MODULE_WORK_DIR/list_dpkg_output" + list_packet_files > "$COPYLIST" + [ -n "$REQUIRED_DIR_STRUCT" ] && find $REQUIRED_DIR_STRUCT -type d >> "$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" "$MODULE_BUILD_DIR/var/lib/polkit" + sed "s,%POLKITD%,${POLPATH},g" "${MODULE_DIR}/templates/systemd.service" > "$MODULE_BUILD_DIR/etc/systemd/system/polkit.service" || perror "Could not generate polkit.service for systemd" + sed "s,%POLKITD%,${POLPATH},g" "${MODULE_DIR}/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/core/modules/polkit/module.conf b/core/modules/polkit/module.conf new file mode 100644 index 00000000..97d4b892 --- /dev/null +++ b/core/modules/polkit/module.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/core/modules/polkit/module.conf.debian b/core/modules/polkit/module.conf.debian new file mode 100644 index 00000000..5684a504 --- /dev/null +++ b/core/modules/polkit/module.conf.debian @@ -0,0 +1,19 @@ +REQUIRED_INSTALLED_PACKAGES=" + libmozjs185-1.0 + policykit-1 +" +REQUIRED_CONTENT_PACKAGES=" + libmozjs185-1.0 + policykit-1 +" +REQUIRED_DIRECTORIES+=" + /usr/lib/policykit-1 + /usr/lib/${ARCH_TRIPLET}/polkit-1 + /var/lib/polkit-1 +" +# Module specific: Root of dirstructs we need directly from system +REQUIRED_DIR_STRUCT=" + /var/lib/polkit-1 + /etc/polkit-1 +" + diff --git a/core/modules/polkit/module.conf.fedora b/core/modules/polkit/module.conf.fedora new file mode 100644 index 00000000..3d4d965d --- /dev/null +++ b/core/modules/polkit/module.conf.fedora @@ -0,0 +1,12 @@ +REQUIRED_INSTALLED_PACKAGES=" + js-1.8.5 +" +REQUIRED_CONTENT_PACKAGES=" + js-1.8.5 + polkit +" +REQUIRED_DIRECTORIES+=" + /usr/lib/polkit-1 + /var/lib/polkit +" + diff --git a/core/modules/polkit/module.conf.opensuse b/core/modules/polkit/module.conf.opensuse new file mode 100644 index 00000000..e7c1f369 --- /dev/null +++ b/core/modules/polkit/module.conf.opensuse @@ -0,0 +1,12 @@ +REQUIRED_INSTALLED_PACKAGES=" + libmozjs185-1_0 +" +REQUIRED_CONTENT_PACKAGES=" + libmozjs185-1_0 + polkit +" +REQUIRED_DIRECTORIES+=" + /usr/lib/polkit-1 + /var/lib/polkit +" + diff --git a/core/modules/polkit/module.conf.ubuntu b/core/modules/polkit/module.conf.ubuntu new file mode 100644 index 00000000..eb2f88d1 --- /dev/null +++ b/core/modules/polkit/module.conf.ubuntu @@ -0,0 +1,19 @@ +REQUIRED_INSTALLED_PACKAGES=" + libmozjs185-1.0 +" +REQUIRED_CONTENT_PACKAGES=" + libmozjs185-1.0 + policykit-1 + policykit-desktop-privileges +" +REQUIRED_DIRECTORIES+=" + /usr/lib/policykit-1 + /usr${ARCH_LIB_DIR}/polkit-1 + /var/lib/polkit-1 +" +# Module specific: Root of dirstructs we need directly from system +REQUIRED_DIR_STRUCT=" + /var/lib/polkit-1 + /etc/polkit-1 +" + diff --git a/core/modules/polkit/templates/dbus.service b/core/modules/polkit/templates/dbus.service new file mode 100644 index 00000000..c9ee6c8b --- /dev/null +++ b/core/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/core/modules/polkit/templates/systemd.service b/core/modules/polkit/templates/systemd.service new file mode 100644 index 00000000..747fd7eb --- /dev/null +++ b/core/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 + |