GeezerVison is showing github.com — Install patchelf in the Debian, Arch and openSUSE dev images · fredericgermain/netty-tcnative@b734f12
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: docker/Dockerfile.arch +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -23,6 +23,7 @@ RUN pacman -Sy --noconfirm --needed \ |
23 | 23 | lsb-release \ |
24 | 24 | make \ |
25 | 25 | ninja \ |
| 26 | + patchelf \ |
26 | 27 | perl \ |
27 | 28 | tar \ |
28 | 29 | unzip \ |
|
Collapse file
Copy file name to clipboardExpand all lines: docker/Dockerfile.debian +12Lines changed: 12 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -12,6 +12,7 @@ ENV CMAKE_VERSION=$CMAKE_VERSION_BASE.4 |
12 | 12 | ENV NINJA_VERSION 1.7.2 |
13 | 13 | ENV GO_VERSION 1.9.3 |
14 | 14 | ENV GCC_VERSION 4.9.4 |
| 15 | +ENV PATCHELF_VERSION 0.18.0 |
15 | 16 |
|
16 | 17 | ARG java_version="8.0.302-zulu" |
17 | 18 | ENV JAVA_VERSION $java_version |
@@ -69,6 +70,17 @@ RUN set -x && \ |
69 | 70 | make -j1 install_sw) && \ |
70 | 71 | rm -rf openssl-$OPENSSL_VERSION openssl-$OPENSSL_VERSION.tar.gz |
71 | 72 |
|
| 73 | +# patchelf is used post-link by the boringssl-static profile to drop the DT_NEEDED on |
| 74 | +# ld-linux-x86-64.so.2 so the artifact also loads under musl. Wheezy has no patchelf package |
| 75 | +# (it entered Debian in jessie), so install the upstream prebuilt static binary instead, as |
| 76 | +# Dockerfile.centos6 does. --no-check-certificate for the same reason as the OpenSSL download. |
| 77 | +RUN wget -q --no-check-certificate https://github.com/NixOS/patchelf/releases/download/$PATCHELF_VERSION/patchelf-$PATCHELF_VERSION-x86_64.tar.gz \ |
| 78 | + && mkdir -p /opt/patchelf-$PATCHELF_VERSION \ |
| 79 | + && tar zxf patchelf-$PATCHELF_VERSION-x86_64.tar.gz -C /opt/patchelf-$PATCHELF_VERSION \ |
| 80 | + && ln -s /opt/patchelf-$PATCHELF_VERSION/bin/patchelf /usr/local/bin/patchelf \ |
| 81 | + && rm -f patchelf-$PATCHELF_VERSION-x86_64.tar.gz \ |
| 82 | + && patchelf --version |
| 83 | + |
72 | 84 | RUN rm -rf $SOURCE_DIR |
73 | 85 |
|
74 | 86 | # Downloading and installing SDKMAN! |
|
Collapse file
Copy file name to clipboardExpand all lines: docker/Dockerfile.opensuse +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,6 +28,7 @@ RUN zypper install --force-resolution --no-recommends --no-confirm \ |
28 | 28 | make \ |
29 | 29 | ninja \ |
30 | 30 | patch \ |
| 31 | + patchelf \ |
31 | 32 | perl \ |
32 | 33 | tar \ |
33 | 34 | unzip \ |
|
Collapse file
Copy file name to clipboardExpand all lines: docs/musl-compatibility.md +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -241,6 +241,7 @@ protocol/cipher against a released version. It must be identical. |
241 | 241 | | `boringssl-static/pom.xml`, antrun `native-jar` target | post-link `patchelf --remove-needed ld-linux-*` (Class A). Present in the FIPS profile and both release profiles: `fips-boringssl-static`, `boringssl-static-default` (x86_64), and `linux-aarch64`. | |
242 | 242 | | `docker/Dockerfile.centos6` | installs `patchelf` from the upstream prebuilt **static** binary — CentOS 6 is EOL with no EPEL, and `objcopy` cannot remove a `DT_NEEDED`. Needs `--no-check-certificate`, same as the OpenSSL download: the CA bundle cannot verify modern GitHub TLS. | |
243 | 243 | | `docker/Dockerfile.cross_compile_aarch64` | installs `patchelf` from EPEL 7 (available there, unlike CentOS 6) | |
| 244 | +| `docker/Dockerfile.debian`, `docker/Dockerfile.arch`, `docker/Dockerfile.opensuse` | also install `patchelf`. Their `build` compose service runs a module-unfiltered `./mvnw clean package`, which builds `boringssl-static` and so hits the `patchelf` exec (`failonerror="true"`). CI only runs Debian's `build-dynamic-only`, so a missing binary here is invisible to CI. Arch and openSUSE take the distro package; Debian 7 needs the prebuilt static binary like CentOS 6, wheezy has no `patchelf` package at all. | |
244 | 245 |
|
245 | 246 | Note the FIPS profile and two release profiles duplicate the whole native build, so **a change to |
246 | 247 | one does not apply to the others**. `linux-aarch64` cross-compiles from an x86_64 host; patchelf |
|