Skip to content

Commit 2a28657

Browse files
committed
update staticx version for aarch64
1 parent 47b3e2e commit 2a28657

File tree

3 files changed

+6
-40
lines changed

3 files changed

+6
-40
lines changed

executable.Dockerfile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ COPY --from=perf-builder /bpftool /bpftool
121121

122122
WORKDIR /bcc
123123
COPY scripts/staticx_for_pyperf_patch.diff .
124-
COPY scripts/staticx_patch.diff .
125124
COPY scripts/bcc_helpers_build.sh .
126125
COPY scripts/pyperf_env.sh .
127126
RUN ./pyperf_env.sh --with-staticx
@@ -270,16 +269,12 @@ RUN pyinstaller pyinstaller.spec \
270269
&& test -f build/pyinstaller/warn-pyinstaller.txt \
271270
&& ./check_pyinstaller.sh
272271

273-
# for aarch64 - build a patched version of staticx 0.13.6. we remove calls to getpwnam and getgrnam, for these end up doing dlopen()s which
274-
# crash the staticx bootloader. we don't need them anyway (all files in our staticx tar are uid 0 and we don't need the names translation)
275-
COPY scripts/staticx_patch.diff staticx_patch.diff
276-
# TODO: fix me
272+
# for aarch64 - build a patched version of staticx
277273
# hadolint ignore=DL3003
278274
RUN if [ "$(uname -m)" = "aarch64" ]; then \
279-
git clone -b v0.13.6 https://github.com/JonathonReinhart/staticx.git && \
275+
git clone -b v0.14.1 https://github.com/JonathonReinhart/staticx.git && \
280276
cd staticx && \
281-
git reset --hard 819d8eafecbaab3646f70dfb1e3e19f6bbc017f8 && \
282-
git apply ../staticx_patch.diff && \
277+
git reset --hard 033d694a6fbf0ab0952cf0ff4a476269828167af && \
283278
ln -s libnss_files.so.2 /lib64/libnss_files.so && \
284279
ln -s libnss_dns.so.2 /lib64/libnss_dns.so && \
285280
python3 -m pip install --no-cache-dir . ; \

scripts/pyperf_env.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,14 @@ if [ -n "$with_staticx" ]; then
5555
if [ "$(uname -m)" = "aarch64" ]; then
5656
exit 0;
5757
fi
58-
git clone -b v0.13.6 https://github.com/JonathonReinhart/staticx.git
58+
git clone -b v0.14.1 https://github.com/JonathonReinhart/staticx.git
5959
# We're using staticx to build a distribution-independent binary of PyPerf because PyPerf
6060
# can only build with latest llvm (>10), which cannot be obtained on CentOS.
6161
cd staticx
62-
git reset --hard 819d8eafecbaab3646f70dfb1e3e19f6bbc017f8
62+
git reset --hard 033d694a6fbf0ab0952cf0ff4a476269828167af
6363
# - apply patch to ensure staticx bootloader propagates dump signal to actual PyPerf binary
64-
# - apply patch removing calls to getpwnam and getgrnam,
6564
# to avoid crashing the staticx bootloader on ubuntu:22.04+ and centos:8+
66-
git apply ../staticx_for_pyperf_patch.diff ../staticx_patch.diff
65+
git apply ../staticx_for_pyperf_patch.diff
6766
python3 -m pip install --no-cache-dir .
6867
cd ..
6968
rm -rf staticx

scripts/staticx_patch.diff

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)