summaryrefslogtreecommitdiffstats
path: root/remote/setup_target
diff options
context:
space:
mode:
authorMichael Neves2013-06-20 13:57:14 +0200
committerMichael Neves2013-06-20 13:57:14 +0200
commitcbc9a3a486bd77062a105ab457d323f65f370d1d (patch)
treee7af291c2563c266d2044262b0f58f1d10897a98 /remote/setup_target
parent[udhcpc] remove old IP adress if new one is obtained. Update hostname if obta... (diff)
parent[rootfs-stage32] fixes (diff)
downloadtm-scripts-cbc9a3a486bd77062a105ab457d323f65f370d1d.tar.gz
tm-scripts-cbc9a3a486bd77062a105ab457d323f65f370d1d.tar.xz
tm-scripts-cbc9a3a486bd77062a105ab457d323f65f370d1d.zip
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-xremote/setup_target18
1 files changed, 16 insertions, 2 deletions
diff --git a/remote/setup_target b/remote/setup_target
index b0565550..da4b7701 100755
--- a/remote/setup_target
+++ b/remote/setup_target
@@ -53,7 +53,7 @@
#
MODE_DIR="${ROOT_DIR}/remote"
MODULES_DIR="${MODE_DIR}/modules"
-
+EXPORT_DIR="/export/build"
# Keep track of processed modules
PROCESSED_MODULES=""
@@ -93,6 +93,13 @@ read_build () {
. "${BUILD_SCRIPT}" || perror "Sourcing '${BUILD_SCRIPT}' failed."
}
+export_builds() {
+ [ ! -d "${MODE_DIR}/builds" ] && perror "No ${MODE_DIR}/builds, nothing to export."
+ pinfo "Mounting ${MODE_DIR}/builds to ${EXPORT_DIR}. This will make the local builds syncable from another machine."
+ [ ! -d "${EXPORT_DIR}" ] && mkdir -p "${EXPORT_DIR}"
+ mount --bind ${MODE_DIR}/builds ${EXPORT_DIR} || perror "Failed to bind mount ${MODE_DIR}/builds to ${EXPORT_DIR}"
+}
+
#
# main function which copies all files, directories, binaries and external libraries to TARGET_BUILD_DIR
#
@@ -128,6 +135,8 @@ copy_files_with_deps () {
else
pdebug "\tFound ${FILENAME} at ${FILE}"
fi
+ elif [ "$(echo $FILE_CANDIDATES | wc -w)" -eq 0 ]; then
+ perror "Could not find required binary $FILENAME"
else
# one candidate
FINAL_LIST=${FILE_CANDIDATES}
@@ -314,7 +323,12 @@ post_process_target() {
rm -r "${TARGET_BUILD_DIR}/lib/systemd"
fi
- ldconfig -r "${TARGET_BUILD_DIR}"
+ # figure out all relevant ld-paths
+ 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)
+ ldconfig -v -r "${TARGET_BUILD_DIR}" -f "/ldconf-temp"
+ unlink "$LDTEMP"
}