From 9cddf75449350b13ae87ceaf36b3388269f71917 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Fri, 23 Nov 2018 16:32:43 +0100 Subject: [PATCH 1/5] Ship 32-bit strip binary --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index b51f271..4bf1d65 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ matrix: - automake # required for patchelf - libfuse2:i386 - libcairo2:i386 + - strip:i386 # will be bundled, needs to be 32-bit binary - env: ARCH=x86_64 BUILD_TYPE=coverage addons: apt: From b38612d07edd7c69b70ad499e24d15b6af96e031 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Fri, 23 Nov 2018 17:17:38 +0100 Subject: [PATCH 2/5] Ship 32-bit strip binary, mk. 2 --- .travis.yml | 2 +- travis/build.sh | 19 ++++++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4bf1d65..3d57337 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,7 @@ matrix: - automake # required for patchelf - libfuse2:i386 - libcairo2:i386 - - strip:i386 # will be bundled, needs to be 32-bit binary + - binutils-i686-gnu # to be able to bundle 32-bit strip binary - env: ARCH=x86_64 BUILD_TYPE=coverage addons: apt: diff --git a/travis/build.sh b/travis/build.sh index 23f8f2d..0aaae78 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -42,8 +42,25 @@ make -j$(nproc) ## Run Unit Tests ctest -V +# look for suitable strip binary to bundle +# https://github.com/linuxdeploy/linuxdeploy/issues/59 +# first, try to find architecture aware +strip_path=/usr/"$ARCH"*/bin/strip + +# another possible path +if [[ ! -f "$strip_path" ]]; then + strip_path=/usr/bin/"$ARCH"*-strip +fi + +# fall back to using "default" distro strip +if [[ ! -f "$strip_path" ]]; then + strip_path=/usr/bin/strip +fi + +# TODO: make sure strip binary's architecture matches the one we want, e.g., using file, readelf... + # args are used more than once -LINUXDEPLOY_ARGS=("--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i" "$REPO_ROOT/resources/linuxdeploy.png" "--create-desktop-file" "-e" "/usr/bin/patchelf" "-e" "/usr/bin/strip") +LINUXDEPLOY_ARGS=("--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i" "$REPO_ROOT/resources/linuxdeploy.png" "--create-desktop-file" "-e" "/usr/bin/patchelf" "-e" "$strip_path") # deploy patchelf which is a dependency of linuxdeploy bin/linuxdeploy "${LINUXDEPLOY_ARGS[@]}" From d65574544ffb6712f54da0670d8e44554d024c98 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Fri, 23 Nov 2018 17:55:53 +0100 Subject: [PATCH 3/5] Ship 32-bit strip binary, mk. 3 --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3d57337..25a3f3c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,7 +26,10 @@ matrix: - automake # required for patchelf - libfuse2:i386 - libcairo2:i386 - - binutils-i686-gnu # to be able to bundle 32-bit strip binary + install: + # to be able to bundle 32-bit strip binary + - wget https://ftp.fau.de/debian/pool/main/b/binutils/binutils-i686-linux-gnu_2.31.1-7_i386.deb + - sudo dpkg -i binutils-i686-linux-gnu*.deb - env: ARCH=x86_64 BUILD_TYPE=coverage addons: apt: From 23c85c732a8580d92ca0cea89684575b36b112c7 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Fri, 23 Nov 2018 23:58:21 +0100 Subject: [PATCH 4/5] Download known working version of strip for i386 --- .travis.yml | 4 ---- travis/build.sh | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25a3f3c..b51f271 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,10 +26,6 @@ matrix: - automake # required for patchelf - libfuse2:i386 - libcairo2:i386 - install: - # to be able to bundle 32-bit strip binary - - wget https://ftp.fau.de/debian/pool/main/b/binutils/binutils-i686-linux-gnu_2.31.1-7_i386.deb - - sudo dpkg -i binutils-i686-linux-gnu*.deb - env: ARCH=x86_64 BUILD_TYPE=coverage addons: apt: diff --git a/travis/build.sh b/travis/build.sh index 0aaae78..eb0e220 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -42,23 +42,18 @@ make -j$(nproc) ## Run Unit Tests ctest -V -# look for suitable strip binary to bundle -# https://github.com/linuxdeploy/linuxdeploy/issues/59 -# first, try to find architecture aware -strip_path=/usr/"$ARCH"*/bin/strip +strip_path=$(which strip) -# another possible path -if [[ ! -f "$strip_path" ]]; then - strip_path=/usr/bin/"$ARCH"*-strip +if [ "$ARCH" == "i386" ]; then + # download i386 strip for i386 AppImage + # https://github.com/linuxdeploy/linuxdeploy/issues/59 + wget http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-multiarch_2.24-5ubuntu14.2_i386.deb + echo "0106f170cebf5800e863a558cad039e4f16a76d3424ae943209c3f6b0cacd511 binutils-multiarch_2.24-5ubuntu14.2_i386.deb" | sha256sum -c + dpkg -x binutils-multiarch_2.24-5ubuntu14.2_i386.deb out/ + rm binutils-multiarch_2.24-5ubuntu14.2_i386.deb + strip_path=$(readlink -f out/usr/bin/strip) fi -# fall back to using "default" distro strip -if [[ ! -f "$strip_path" ]]; then - strip_path=/usr/bin/strip -fi - -# TODO: make sure strip binary's architecture matches the one we want, e.g., using file, readelf... - # args are used more than once LINUXDEPLOY_ARGS=("--appdir" "AppDir" "-e" "bin/linuxdeploy" "-i" "$REPO_ROOT/resources/linuxdeploy.png" "--create-desktop-file" "-e" "/usr/bin/patchelf" "-e" "$strip_path") From 4585cb1a288243a45318045368104e3baee45375 Mon Sep 17 00:00:00 2001 From: TheAssassin Date: Sat, 24 Nov 2018 00:34:38 +0100 Subject: [PATCH 5/5] Download known working version of strip for i386, mk. 2 --- travis/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/travis/build.sh b/travis/build.sh index eb0e220..05cf46e 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -49,9 +49,13 @@ if [ "$ARCH" == "i386" ]; then # https://github.com/linuxdeploy/linuxdeploy/issues/59 wget http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-multiarch_2.24-5ubuntu14.2_i386.deb echo "0106f170cebf5800e863a558cad039e4f16a76d3424ae943209c3f6b0cacd511 binutils-multiarch_2.24-5ubuntu14.2_i386.deb" | sha256sum -c + wget http://security.ubuntu.com/ubuntu/pool/main/b/binutils/binutils-multiarch-dev_2.24-5ubuntu14.2_i386.deb + echo "ed9ca4fbbf492233228f79fae6b349a2ed2ee3e0927bdc795425fccf5fae648e binutils-multiarch-dev_2.24-5ubuntu14.2_i386.deb" | sha256sum -c dpkg -x binutils-multiarch_2.24-5ubuntu14.2_i386.deb out/ - rm binutils-multiarch_2.24-5ubuntu14.2_i386.deb + dpkg -x binutils-multiarch-dev_2.24-5ubuntu14.2_i386.deb out/ + rm binutils-multiarch*.deb strip_path=$(readlink -f out/usr/bin/strip) + export LD_LIBRARY_PATH=$(readlink -f out/usr/lib) fi # args are used more than once