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 | |
| 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')
23 files changed, 89 insertions, 136 deletions
diff --git a/remote/modules/consolekit/consolekit.conf b/remote/modules/consolekit/consolekit.conf index afb573ce..4f128c62 100644 --- a/remote/modules/consolekit/consolekit.conf +++ b/remote/modules/consolekit/consolekit.conf @@ -1,11 +1,12 @@ -REQUIRED_CONTENT_PACKAGES="consolekit" -REQUIRED_BINARIES=" ck-history - ck-launch-session - ck-list-sessions - ck-log-system-start - ck-log-system-restart - ck-log-system-stop - console-kit-daemon" -REQUIRED_DIRECTORIES=" /usr/lib/ConsoleKit /etc /lib/systemd/system" -REQUIRED_FILES=" /usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service - /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy" +REQUIRED_BINARIES=" + console-kit-daemon +" +REQUIRED_DIRECTORIES=" + /usr + /etc + /lib +" +REQUIRED_LIBRARIES=" + pam_ck_connector +" + diff --git a/remote/modules/consolekit/consolekit.conf.opensuse b/remote/modules/consolekit/consolekit.conf.opensuse new file mode 100644 index 00000000..74c694a1 --- /dev/null +++ b/remote/modules/consolekit/consolekit.conf.opensuse @@ -0,0 +1,2 @@ +REQUIRED_CONTENT_PACKAGES="ConsoleKit" + diff --git a/remote/modules/consolekit/consolekit.conf.ubuntu b/remote/modules/consolekit/consolekit.conf.ubuntu new file mode 100644 index 00000000..c0fffffa --- /dev/null +++ b/remote/modules/consolekit/consolekit.conf.ubuntu @@ -0,0 +1,2 @@ +REQUIRED_CONTENT_PACKAGES="consolekit" + diff --git a/remote/modules/consolekit/consolekit.conf.zypper b/remote/modules/consolekit/consolekit.conf.zypper deleted file mode 100644 index 394ee0da..00000000 --- a/remote/modules/consolekit/consolekit.conf.zypper +++ /dev/null @@ -1,11 +0,0 @@ -REQUIRED_CONTENT_PACKAGES="ConsoleKit" -REQUIRED_BINARIES=" ck-history - ck-launch-session - ck-list-sessions - ck-log-system-start - ck-log-system-restart - ck-log-system-stop - console-kit-daemon" -REQUIRED_DIRECTORIES=" /usr/lib/ConsoleKit /etc /lib/systemd/system" -REQUIRED_FILES=" /usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service - /usr/share/polkit-1/actions/org.freedesktop.consolekit.policy" diff --git a/remote/modules/consolekit/data/etc/systemd/system/basic.target.wants/console-kit-daemon.service b/remote/modules/consolekit/data/etc/systemd/system/basic.target.wants/console-kit-daemon.service new file mode 120000 index 00000000..2b34a3f6 --- /dev/null +++ b/remote/modules/consolekit/data/etc/systemd/system/basic.target.wants/console-kit-daemon.service @@ -0,0 +1 @@ +../console-kit-daemon.service
\ No newline at end of file diff --git a/remote/modules/consolekit/data/etc/systemd/system/console-kit-daemon.service b/remote/modules/consolekit/data/etc/systemd/system/console-kit-daemon.service new file mode 100644 index 00000000..bc2a0de9 --- /dev/null +++ b/remote/modules/consolekit/data/etc/systemd/system/console-kit-daemon.service @@ -0,0 +1,8 @@ +[Unit] +Description=ConsoleKit + +[Service] +Type=dbus +BusName=org.freedesktop.ConsoleKit +ExecStart=/usr/sbin/console-kit-daemon --no-daemon + diff --git a/remote/modules/consolekit/data/usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service b/remote/modules/consolekit/data/usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service new file mode 100644 index 00000000..cbefc9a4 --- /dev/null +++ b/remote/modules/consolekit/data/usr/share/dbus-1/system-services/org.freedesktop.ConsoleKit.service @@ -0,0 +1,6 @@ +[D-BUS Service] +Name=org.freedesktop.ConsoleKit +Exec=/usr/sbin/console-kit-daemon --no-daemon +User=root +SystemdService=console-kit-daemon.service + diff --git a/remote/modules/policykit-src/TODO b/remote/modules/policykit-src/TODO deleted file mode 100644 index 6203c18f..00000000 --- a/remote/modules/policykit-src/TODO +++ /dev/null @@ -1 +0,0 @@ -update to new config scheme diff --git a/remote/modules/policykit-src/policykit.build b/remote/modules/policykit-src/policykit.build deleted file mode 100644 index 26d1e27a..00000000 --- a/remote/modules/policykit-src/policykit.build +++ /dev/null @@ -1,38 +0,0 @@ -#tool/distro specific functions for fetching, building and installing dependencies - - -fetch_source () { - download_untar "$URL" "src/" -} - -build () { - cd src/$VERSION - - [ ! -d "${MODULES_DIR}/systemd/build" ] && perror "systemd build directory not found. Build it first." - SYSTEMD_BUILD_DIR="${MODULES_DIR}/systemd/build" - pinfo "configuring..." - LIBSYSTEMD_LOGIN_LIBS="-L${SYSTEMD_BUILD_DIR}/usr/lib/" \ - LIBSYSTEMD_LOGIN_CFLAGS="-I${SYSTEMD_BUILD_DIR}/usr/include -I${SYSTEMD_BUILD_DIR}/usr/include/systemd -lsystemd-login -lsystemd-daemon" \ - ./configure --enable-libsystemd-login=yes --with-systemdsystemunitdir=/etc/systemd/system -prefix="/" --datarootdir="/usr/share" --enable-man-pages=no --enable-gtk-doc-html=no --enable-examples=no --enable-static=no - pinfo "calling make..." - make || perror "make failed." - [ ! -d "${MODULE_BUILD_DIR}" ] && mkdir -p "${MODULE_BUILD_DIR}" - pinfo "installing to ${MODULE_BUILD_DIR}..." - DESTDIR="${MODULE_BUILD_DIR}" make install || perror "make install failed..." - - COPYLIST="list_dpkg_output" - [ -e "$COPYLIST" ] && rm "$COPYLIST" - - list_packet_files >> "$COPYLIST" - tarcopy "$(cat "$COPYLIST" | sort -u)" "${MODULE_BUILD_DIR}" - - cd - -} - -post_copy() { - - #Add Polkit User/Group/Shadow to Stage3.2 - pinfo "Adding polkitd user to target system..." - add_user "polkitd" -} - diff --git a/remote/modules/policykit-src/policykit.conf b/remote/modules/policykit-src/policykit.conf deleted file mode 100644 index 3e74c383..00000000 --- a/remote/modules/policykit-src/policykit.conf +++ /dev/null @@ -1,10 +0,0 @@ -VERSION=polkit-0.110 -URL=http://www.freedesktop.org/software/polkit/releases/polkit-0.110.tar.gz -REQUIRED_INSTALLED_PACKAGES="libmozjs185-1.0" -REQUIRED_CONTENT_PACKAGES="libmozjs185-1.0" -REQUIRED_BINARIES="" -REQUIRED_DIRECTORIES="/bin /etc /lib /usr/share/dbus-1 /usr/share/polkit-1" -REQUIRED_FILES="" -REQUIRED_LIBRARIES="libmozjs185" -REQUIRED_MODULES="systemd" - diff --git a/remote/modules/policykit/data/etc/systemd/system/polkitd.service b/remote/modules/policykit/data/etc/systemd/system/polkitd.service deleted file mode 100644 index 2aeb3c48..00000000 --- a/remote/modules/policykit/data/etc/systemd/system/polkitd.service +++ /dev/null @@ -1,7 +0,0 @@ -[Unit] -Description=Authenticate and Authorize Users to Run Privileged Tasks - -[Service] -Type=dbus -BusName=org.freedesktop.PolicyKit1 -ExecStart=%%POLKITD%% --no-debug diff --git a/remote/modules/policykit/policykit.build b/remote/modules/policykit/policykit.build deleted file mode 100644 index 52be1221..00000000 --- a/remote/modules/policykit/policykit.build +++ /dev/null @@ -1,24 +0,0 @@ -#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}" -} - -post_copy() { - COPYLIST="$MODULE_DIR/list_dpkg_output" - local POLPATH="$(grep '/polkitd$' "$COPYLIST" | head -1 | sed -e 's/[\/&]/\\&/g')" - [ -n "$POLPATH" ] && sed -i "s/%%POLKITD%%/${POLPATH}/g" "$TARGET_BUILD_DIR/etc/systemd/system/polkitd.service" - #Add Polkit User/Group/Shadow to Stage3.2 - pinfo "Adding polkitd user to target system..." - add_user "polkitd" -} - diff --git a/remote/modules/policykit/policykit.conf b/remote/modules/policykit/policykit.conf deleted file mode 100644 index d1f5269e..00000000 --- a/remote/modules/policykit/policykit.conf +++ /dev/null @@ -1,11 +0,0 @@ -REQUIRED_BINARIES="" -REQUIRED_DIRECTORIES=" - /etc/pam.d - /etc/dbus-1 - /etc/polkit-1 - /usr/bin - /usr/share/dbus-1 - /usr/share/polkit-1 -" -REQUIRED_FILES="" -REQUIRED_LIBRARIES="libmozjs185" 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/policykit/policykit.conf.opensuse b/remote/modules/polkit/polkit.conf.opensuse index f0a7d385..10cedbe9 100644 --- a/remote/modules/policykit/policykit.conf.opensuse +++ b/remote/modules/polkit/polkit.conf.opensuse @@ -5,8 +5,7 @@ REQUIRED_CONTENT_PACKAGES=" libmozjs185-1_0 polkit " -REQUIRED_BINARIES="" REQUIRED_DIRECTORIES+=" /usr/lib/polkit-1 " -REQUIRED_FILES="" + diff --git a/remote/modules/policykit/policykit.conf.ubuntu b/remote/modules/polkit/polkit.conf.ubuntu index 4bdd625d..76d31b9e 100644 --- a/remote/modules/policykit/policykit.conf.ubuntu +++ b/remote/modules/polkit/polkit.conf.ubuntu @@ -5,9 +5,8 @@ REQUIRED_CONTENT_PACKAGES=" libmozjs185-1.0 policykit-1 " -REQUIRED_BINARIES="" -REQUIRED_FILES="" 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 + diff --git a/remote/setup_target b/remote/setup_target index 9db5ba20..b783729f 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -355,25 +355,6 @@ post_process_target() { rm -r "${TARGET_BUILD_DIR}/lib/systemd" fi - # replace ck connector with fake one - # CAVE: On Scientific Lunux (6.4) and perhaps others: - # If include dbus/dbus-arch-deps.h is missing (file not found) either set a symb. link: - # /usr/include/dbus-1.0/dbus/dbus-arch-deps.h -> /usr/lib(64)/dbus-1.0/include/dbus/dbus-arch-deps.h - # or execute "pkg-config dbus-1 --cflags". - - local CK_LIBS=$(find "$TARGET_BUILD_DIR" -name "libck-connector.so*") - if [ -n "$CK_LIBS" ]; then - pinfo "Replacing libck-connector with dummy" - local SRC="$ROOT_DIR/remote/post-patch/ck-connector/fake-ck-connector.c" - local BIN="$ROOT_DIR/remote/post-patch/ck-connector/libck-connector.so" - if [ ! -s "$BIN" ]; then - gcc -O3 -shared -o "$BIN" "-I/usr/include/dbus-1.0" "-I/usr/lib/$ARCH_TRIPLET/dbus-1.0/include" "$SRC" || perror "Compiling fake libck-connector.so failed. Make sure libdbus-1-dev is installed." - fi - for OCCURENCE in $CK_LIBS; do - cp "$BIN" "$OCCURENCE" || perror "Frickeling ck-connector to $OCCURENCE failed." - done - fi - # figure out all relevant ld-paths pinfo "Running ldconfig" local LDTEMP="$TARGET_BUILD_DIR/ldconf-temp" diff --git a/remote/targets/stage32/consolekit b/remote/targets/stage32/consolekit new file mode 120000 index 00000000..261968c7 --- /dev/null +++ b/remote/targets/stage32/consolekit @@ -0,0 +1 @@ +../../modules/consolekit
\ No newline at end of file diff --git a/remote/targets/stage32/polkit b/remote/targets/stage32/polkit new file mode 120000 index 00000000..0ad0b111 --- /dev/null +++ b/remote/targets/stage32/polkit @@ -0,0 +1 @@ +../../modules/polkit
\ No newline at end of file |
