Skip to content

Commit

Permalink
Update upx to fix arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
theotherp committed Mar 22, 2024
1 parent 7d8c72b commit dab954c
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions misc/buildLinuxCore/amd64/buildInContainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
10 changes: 5 additions & 5 deletions misc/buildLinuxCore/amd64/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion misc/buildLinuxCore/arm64/buildInContainer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
6 changes: 3 additions & 3 deletions misc/buildLinuxCore/arm64/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion shared/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<modules>
<module>mapping</module>
<module>assertions</module>
<module>assertions</module>
</modules>

</project>

0 comments on commit dab954c

Please sign in to comment.