Download known working version of strip for i386

This commit is contained in:
TheAssassin
2018-11-23 23:58:21 +01:00
parent b3e259bda1
commit 23c85c732a
2 changed files with 9 additions and 18 deletions

View File

@@ -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:

View File

@@ -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")