aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files
diff options
context:
space:
mode:
authorJonas Gorski <jogo@openwrt.org>2014-11-18 15:19:46 +0000
committerJonas Gorski <jogo@openwrt.org>2014-11-18 15:19:46 +0000
commit2e95b1fda74eb8c64f91e1c801195d9893d80986 (patch)
tree8084a50c428d1f0bc0aca55a85257c6000939557 /package/base-files
parentd2e0fa517f0901226fb9ed75e624bc38f7261705 (diff)
downloadupstream-2e95b1fda74eb8c64f91e1c801195d9893d80986.tar.gz
upstream-2e95b1fda74eb8c64f91e1c801195d9893d80986.tar.bz2
upstream-2e95b1fda74eb8c64f91e1c801195d9893d80986.zip
base-files: properly fix copying ld*.so with eglibc
r36107 ("base-files: sysupgrade fail with eglibc") tried to fix sysupgrade by changing the ld-soname to what is expected, but only fixed MIPS while breaking ARM. The underlying issue is that the ld.so name varies widely across different architectures for eglibc: eglibc-2.19-r25243$ grep -r "ld-soname :=" . | awk '{ print $3 }' | sort -u ld64.so.1 ld64.so.2 ld-linux-aarch64_be.so.1 ld-linux-aarch64.so.1 ld-linux-armhf.so.3 ld-linux-mipsn8.so.1 ld-linux.so.2 ld-linux.so.3 ld-linux-x32.so.2 ld-linux-x86-64.so.2 ld.so.1 Instead of adding each different soname to check for and copy it, replace the awk script with a sed script to extract it properly and drop the hardcoded so-name. Signed-off-by: Jonas Gorski <jogo@openwrt.org> SVN-Revision: 43295
Diffstat (limited to 'package/base-files')
-rw-r--r--package/base-files/files/lib/upgrade/common.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/package/base-files/files/lib/upgrade/common.sh b/package/base-files/files/lib/upgrade/common.sh
index 327322605a..9123359d1b 100644
--- a/package/base-files/files/lib/upgrade/common.sh
+++ b/package/base-files/files/lib/upgrade/common.sh
@@ -3,7 +3,7 @@
RAM_ROOT=/tmp/root
[ -x /usr/bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
-libs() { ldd $* | awk '{print $3}'; }
+libs() { ldd $* | sed -r 's/(.* => )?(.*) .*/\2/'; }
install_file() { # <file> [ <file> ... ]
for file in "$@"; do
@@ -21,9 +21,6 @@ install_bin() { # <file> [ <symlink> ... ]
files=$1
[ -x "$src" ] && files="$src $(libs $src)"
install_file $files
- [ -e /lib/ld.so.1 ] && {
- install_file /lib/ld.so.1
- }
shift
for link in "$@"; do {
dest="$RAM_ROOT/$link"