summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--helper/binutil.inc22
-rw-r--r--remote/modules/systemd/systemd.build5
2 files changed, 15 insertions, 12 deletions
diff --git a/helper/binutil.inc b/helper/binutil.inc
index 72a43ad2..9ad9e104 100644
--- a/helper/binutil.inc
+++ b/helper/binutil.inc
@@ -45,21 +45,21 @@ get_dynamic_dependencies() {
if [ "x$1" == "x-l" ]; then
LOCALSEARCH=1
shift
- [ ! -d $1 ] && perror "Directory given does not exist, exiting."
- LOCALSEARCHDIR=$1
+ [ ! -d "$1" ] && perror "Directory '$1' does not exist, exiting."
+ LOCALSEARCHDIR="$1"
shift
fi
# main loop over the list of binaries
while [ $# != 0 ]; do
- local BINARY=$1
+ local BINARY="$1"
shift
# now run ldd on it and save the output in $LDD_OUT
local LDD_OUT="ldd_output"
- if ldd $BINARY > $LDD_OUT; then
+ if ldd "$BINARY" > "$LDD_OUT"; then
# Case 1: file is a dynamic executable
- for LIB in $(cat $LDD_OUT | grep -v "${CURRENT_BLACKLIST}" | awk '{print $1 $2 $3}'); do
+ for LIB in $(cat "$LDD_OUT" | grep -v "${CURRENT_BLACKLIST}" | awk '{print $1 $2 $3}'); do
# split the entry into an array, ex:
# libm.so.6 => /lib/libm.so.6 would be split into:
# LIBLINK[0] LIBLINK[1]
@@ -70,10 +70,10 @@ get_dynamic_dependencies() {
else
# Case 2: not a dynamic, do nothing
pdebug "\t\t\t(Not a dynamic.)"
- rm -f $LDD_OUT
+ rm -f "$LDD_OUT"
continue
fi
- rm -f $LDD_OUT
+ rm -f "$LDD_OUT"
done
}
@@ -92,16 +92,16 @@ get_dynamic_dependencies() {
# If the local was activated in get_dynamic_dependencies
# this will search for the library in LOCALSEARCHDIR first.
# If its not found, then it will look system-wide.
-lib_search(){
+lib_search() {
# if activated, start by searching the lib locally
if [ "x$LOCALSEARCH" == "x1" ]; then
- cd $LOCALSEARCHDIR
+ cd "$LOCALSEARCHDIR"
local LOCAL_MATCHES=$(find . -name "${LIBLINK[0]}") # | awk -F '.' '{print $1}')".so\*)
- cd - &>/dev/null
+ cd - >/dev/null
if [ "x${LOCAL_MATCHES}" != "x" ]; then
for LOCALLIB in ${LOCAL_MATCHES}; do
- get_link_chain "${LOCALSEARCHDIR}"/"${LOCALLIB}" "${LOCALSEARCHDIR}"
+ get_link_chain "${LOCALSEARCHDIR}/${LOCALLIB}" "${LOCALSEARCHDIR}"
get_dynamic_dependencies -l "${LOCALSEARCHDIR}" "${LOCALLIB}"
CURRENT_BLACKLIST+="\|${LIBLINK[0]}"
done
diff --git a/remote/modules/systemd/systemd.build b/remote/modules/systemd/systemd.build
index a84cc7b3..a0a57b4d 100644
--- a/remote/modules/systemd/systemd.build
+++ b/remote/modules/systemd/systemd.build
@@ -3,7 +3,10 @@
fetch_source () {
download_untar "$REQUIRED_URL" "src/"
download_untar "$REQUIRED_LIBKMOD_URL" "src/"
-}
+ # Patch PATH environment
+ sed -s -i -r 's#"/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin(:/sbin:/bin)?"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/core/main.c
+ sed -s -i -r 's#"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"#& ":/opt/openslx/usr/sbin:/opt/openslx/usr/bin:/opt/openslx/sbin:/opt/openslx/bin"#g' src/systemd-*/src/nspawn/nspawn.c
+}
build () {
#build libkmod