From dab954c6bb5df3d88762465b7e89a6ee2955dc4c Mon Sep 17 00:00:00 2001 From: TheOtherP Date: Fri, 22 Mar 2024 16:52:15 +0100 Subject: [PATCH] Update upx to fix arm64 build --- misc/buildLinuxCore/amd64/buildInContainer.sh | 6 +++--- misc/buildLinuxCore/amd64/dockerfile | 10 +++++----- misc/buildLinuxCore/arm64/buildInContainer.sh | 2 +- misc/buildLinuxCore/arm64/dockerfile | 6 +++--- shared/pom.xml | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/misc/buildLinuxCore/amd64/buildInContainer.sh b/misc/buildLinuxCore/amd64/buildInContainer.sh index 8fdeccf79..578894b45 100644 --- a/misc/buildLinuxCore/amd64/buildInContainer.sh +++ b/misc/buildLinuxCore/amd64/buildInContainer.sh @@ -7,8 +7,8 @@ cd /nzbhydra2 || exit #clean so that if the build fails we won't use the old results rm -rf core/target -mvn --batch-mode clean install -pl \!org.nzbhydra:linux-amd64-release,!org.nzbhydra:linux-arm64-release,\!org.nzbhydra:windows-release,\!org.nzbhydra:generic-release -DskipTests -T 1C -mvn -pl org.nzbhydra:core -Pnative clean native:compile -DskipTests -/upx-4.2.1-amd64_linux/upx -3 core/target/core +mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn --batch-mode clean install -pl \!org.nzbhydra:linux-amd64-release,!org.nzbhydra:linux-arm64-release,\!org.nzbhydra:windows-release,\!org.nzbhydra:generic-release -DskipTests -T 1C +mvn -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -pl org.nzbhydra:core -Pnative clean native:compile -DskipTests +/upx-4.2.2-amd64_linux/upx -3 core/target/core #Because docker is run as root the files are written to the host file system as root chmod o+rwx -R . diff --git a/misc/buildLinuxCore/amd64/dockerfile b/misc/buildLinuxCore/amd64/dockerfile index 33644c41b..916939ac0 100644 --- a/misc/buildLinuxCore/amd64/dockerfile +++ b/misc/buildLinuxCore/amd64/dockerfile @@ -5,10 +5,10 @@ FROM ubuntu:18.04 RUN echo 'APT::Install-Suggests "0";' >> /etc/apt/apt.conf.d/00-docker RUN echo 'APT::Install-Recommends "0";' >> /etc/apt/apt.conf.d/00-docker RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y zip unzip wget curl libfreetype6 libfreetype6-dev build-essential ca-certificates -RUN wget -nv --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.5/binaries/apache-maven-3.9.5-bin.tar.gz -P /tmp +RUN wget -nv --no-check-certificate https://dlcdn.apache.org/maven/maven-3/3.9.6/binaries/apache-maven-3.9.6-bin.tar.gz -P /tmp RUN tar xf /tmp/apache-maven-*.tar.gz -C /opt -RUN ln -s /opt/apache-maven-3.9.5 /opt/maven +RUN ln -s /opt/apache-maven-3.9.6 /opt/maven ENV M2_HOME=/opt/maven ENV MAVEN_HOME=/opt/maven ENV PATH=${M2_HOME}/bin:${PATH} @@ -19,9 +19,9 @@ ENV PATH=/graalvm-community-openjdk-17.0.9+9.1/bin/:$PATH ENV JAVA_HOME=/graalvm-community-openjdk-17.0.9+9.1 # When you update this also change the directory in buildInContainer.sh -RUN wget -nv --no-check-certificate https://github.com/upx/upx/releases/download/v4.2.1/upx-4.2.1-amd64_linux.tar.xz -RUN tar -xf upx-4.2.1-amd64_linux.tar.xz -ENV PATH=/tmp/upx-4.2.1-amd64_linux/:$PATH +RUN wget -nv --no-check-certificate https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-amd64_linux.tar.xz +RUN tar -xf upx-4.2.2-amd64_linux.tar.xz +ENV PATH=/tmp/upx-4.2.2-amd64_linux/:$PATH ENV HYDRA_NATIVE_BUILD=true diff --git a/misc/buildLinuxCore/arm64/buildInContainer.sh b/misc/buildLinuxCore/arm64/buildInContainer.sh index d68a37926..fa9889ae8 100644 --- a/misc/buildLinuxCore/arm64/buildInContainer.sh +++ b/misc/buildLinuxCore/arm64/buildInContainer.sh @@ -8,6 +8,6 @@ cd /nzbhydra2 || exit rm -rf core/target mvn --batch-mode clean install -pl \!org.nzbhydra:linux-amd64-release,!org.nzbhydra:linux-arm64-release,\!org.nzbhydra:windows-release,\!org.nzbhydra:generic-release -DskipTests -T 1C mvn -pl org.nzbhydra:core -Pnative clean native:compile -DskipTests -/upx-4.0.1-arm64_linux/upx -3 core/target/core +/upx-4.2.2-arm64_linux/upx -3 core/target/core #Because docker is run as root the files are written to the host file system as root chmod o+rwx -R . diff --git a/misc/buildLinuxCore/arm64/dockerfile b/misc/buildLinuxCore/arm64/dockerfile index dfb3e68fb..3f11c4ec1 100644 --- a/misc/buildLinuxCore/arm64/dockerfile +++ b/misc/buildLinuxCore/arm64/dockerfile @@ -19,9 +19,9 @@ ENV JAVA_HOME=/graalvm-community-openjdk-17.0.9+9.1 # When you update this also change the directory in buildInContainer.sh #Newer versions crash with segmentation fault: https://github.com/upx/upx/issues/737 -RUN wget -nv --no-check-certificate https://github.com/upx/upx/releases/download/v4.0.1/upx-4.0.1-arm64_linux.tar.xz -RUN tar -xf upx-4.0.1-arm64_linux.tar.xz -ENV PATH=/tmp/upx-4.0.1-arm64_linux/:$PATH +RUN wget -nv --no-check-certificate https://github.com/upx/upx/releases/download/v4.2.2/upx-4.2.2-arm64_linux.tar.xz +RUN tar -xf upx-4.2.2-arm64_linux.tar.xz +ENV PATH=/tmp/upx-4.2.2-arm64_linux/:$PATH ENV HYDRA_NATIVE_BUILD=true diff --git a/shared/pom.xml b/shared/pom.xml index 5238158ca..2bf7dd96c 100644 --- a/shared/pom.xml +++ b/shared/pom.xml @@ -13,7 +13,7 @@ mapping - assertions + assertions