diff options
| author | Simon Rettberg | 2013-06-24 18:38:30 +0200 |
|---|---|---|
| committer | Simon Rettberg | 2013-06-24 18:38:30 +0200 |
| commit | e52c2ba8b9827288cfc2d40f2f259884db51b034 (patch) | |
| tree | 03e157322919da419b9f8b88ec53c7fa3ce49d2c /remote/setup_target | |
| parent | Merge branch 'master' of simonslx:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-e52c2ba8b9827288cfc2d40f2f259884db51b034.tar.gz tm-scripts-e52c2ba8b9827288cfc2d40f2f259884db51b034.tar.xz tm-scripts-e52c2ba8b9827288cfc2d40f2f259884db51b034.zip | |
post_process_target: Replace libck-connector.so with dummy
This is to prevent KDM from trying to talk to ConsoleKit (which we don't use)
ConsoleKit is not being actively developed anymore, and we want to switch
to systemd (and its logind) entirely
Diffstat (limited to 'remote/setup_target')
| -rwxr-xr-x | remote/setup_target | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/remote/setup_target b/remote/setup_target index da4b7701..1638f392 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -315,7 +315,6 @@ post_process_target() { #move systemd files from /lib to /etc/lib pinfo "move systemd files from /lib/systemd to /etc/systemd" - if [ -d "${TARGET_BUILD_DIR}/lib/systemd" ]; then cd "${TARGET_BUILD_DIR}/lib" tarcopy "systemd" "${TARGET_BUILD_DIR}/etc" @@ -323,7 +322,22 @@ post_process_target() { rm -r "${TARGET_BUILD_DIR}/lib/systemd" fi + # replace ck connector with fake one + 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" grep -h '^\s*/' /etc/ld.so.conf /etc/ld.so.conf.d/* > "$LDTEMP" # TODO: Echo other stuff to $LDTEMP (but figure out if first or last match wins) @@ -351,13 +365,16 @@ clean_modules() { fi set -- $(ls ${TARGET_DIR} | grep -v kernel) fi - cd ${TARGET_DIR} + cd "$TARGET_DIR" while (( "$#" )); do clean_module $(readlink -f $1) shift done cd - &> /dev/null + + # libck-connector cleanup + rm -f "$TARGET_DIR/post-patch/ck-connector/libck-connector.so" } clean_module() { |
