diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-09 22:11:06 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-04-09 22:12:39 +0200 |
commit | b1857379c710548b942e5169afe6bb600a49eab6 (patch) | |
tree | d066b0fbe632e25fb8028b54ee0f0dc0641da428 | |
parent | 8dfdf48e6dc99279902c482c33b6f055d9181e9e (diff) | |
download | aports-b1857379c710548b942e5169afe6bb600a49eab6.tar.bz2 aports-b1857379c710548b942e5169afe6bb600a49eab6.tar.xz |
testing/rust: fix check-rustc, dynamic exec *must* have INTERP
-rw-r--r-- | testing/rust/APKBUILD | 2 | ||||
-rwxr-xr-x | testing/rust/check-rustc | 28 |
2 files changed, 14 insertions, 16 deletions
diff --git a/testing/rust/APKBUILD b/testing/rust/APKBUILD index 0ac72d8d4b..03db5a2b0e 100644 --- a/testing/rust/APKBUILD +++ b/testing/rust/APKBUILD @@ -191,4 +191,4 @@ f436fddf7ab70ca5f1424081f5b75450270b200b3d997231323863e11addf76e1d65831a7ca09e3a 19cc2725d68db3e359e0e3016028374e5818a97fdba24d0103f7d1706601c8b17c4dd95a3152e64f982f98e95ad3e949acddbea8a39ed0ba8dd4f702acc2704d move-py-scripts-to-share.patch 8d6206f8c50856724cf7b4c1854ec82547f040358a1c7d44abeacc27a5c205a963b1fec51e58ec06c68d85bd2f68a9e6e27ebe457f39e8dd043de17758f5063f change-rpath-to-rustlib.patch a330fa913faeadb98cb95e644f434ddef4fbbea32bcd11b6621fb9e08f7b0d8c71fae702207465489af3cf793eade0af694a8c515fc1bed49624da25103a4862 fix-jemalloc-musl.patch -770cf8d2d3d55647ba551ae98314af6b6c09e5994cfae0c2ef7ee05ccbf8efa05308887d61a017ab53dee18723db3a5177ce145e43af20326cf156dd2bd0e360 check-rustc" +74911ab235e64ad297778786943f54cee397dfd7d199264f0aaea39f17942c03620047fa6ebe2c91d80713670c53c1a0474f2a55c1879e1982c4a0cdda7b0fbb check-rustc" diff --git a/testing/rust/check-rustc b/testing/rust/check-rustc index 015730dc0e..867666e503 100755 --- a/testing/rust/check-rustc +++ b/testing/rust/check-rustc @@ -1,4 +1,5 @@ #!/bin/sh +# vim: set ts=4: set -eu RUSTC="$1" @@ -21,17 +22,12 @@ fail() { failed=$(( failed + 1 )) } -# Checks if the given file is a statically linked binary. -is_static() { - ! readelf -l "$1" | grep -Fq INTERP \ - && ! readelf -d "$1" | grep -Fq NEEDED -} - assert_dynamic() { - test -f "$1" && ! is_static "$1" || { - fail "$1 is not a dynamic executable!" - readelf -ld "$1" - } + readelf -l "$1" | grep -Fqw INTERP \ + && readelf -d "$1" | grep -Fqw NEEDED || { + fail "$1 is not a dynamic executable!" + readelf -ld "$1" + } } assert_ok() { @@ -39,17 +35,19 @@ assert_ok() { } assert_pie() { - readelf -d "$1" | grep FLAGS_1 | grep -q PIE || { + readelf -d "$1" | grep -Fw FLAGS_1 | grep -Fqw PIE || { fail "$1 is not a PIE executable!" readelf -d "$1" } } assert_static() { - test -f "$1" && is_static "$1" || { - fail "$1 is not a static executable!" - readelf -ld "$1" - } + test -f "$1" \ + && ! readelf -l "$1" | grep -Fqw INTERP \ + && ! readelf -d "$1" | grep -Fqw NEEDED || { + fail "$1 is not a static executable!" + readelf -ld "$1" + } } |