Skip to content

Commit

Permalink
Add files required to consistently build Alpine APKs for January Rele…
Browse files Browse the repository at this point in the history
…ase (#1119)

* Add Jan APK Updates

* Fix APK package build

* Update alpine for automation.

* Update Opensuse/sles templates for JDK/JRE8
  • Loading branch information
steelhead31 authored Jan 29, 2025
1 parent 1b0aa4e commit 5ca028d
Show file tree
Hide file tree
Showing 22 changed files with 102 additions and 62 deletions.
2 changes: 1 addition & 1 deletion linux/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ def jenkinsStepAlpine() {
}
// reallocate jenkins agent per element in list
if (ApkARCH == 'x86_64' || ApkARCH == 'aarch64') {
node("linux&&${apkLabel}") {
node("linux&&apkbuild&&${apkLabel}") {
setup('Alpine', "${ApkARCH}")
tool name: 'jfrog-cli', type: 'jfrog'
unstash 'installercode'
Expand Down
2 changes: 1 addition & 1 deletion linux/jdk/alpine/src/main/packaging/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CONTAINER_REGISTRY=""

FROM ${CONTAINER_REGISTRY}alpine:3.19
FROM ${CONTAINER_REGISTRY}alpine:latest
ENV GOSU_VERSION 1.14

RUN set -eux; \
Expand Down
8 changes: 8 additions & 0 deletions linux/jdk/alpine/src/main/packaging/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ set -euox pipefail
mkdir /home/builder/workspace
cp -R /home/builder/build/generated/packaging /home/builder/workspace

# Install Adoptium Public Key
sudo chmod 664 /etc/apk/repositories
sudo chgrp abuild /etc/apk/repositories
sudo wget -O /etc/apk/keys/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk
sudo echo 'https://packages.adoptium.net/artifactory/apk/alpine/main' >> /etc/apk/repositories
sudo wget -O /home/builder/.abuild/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk

# Set permssions
sudo chown -R builder /home/builder/out

# Build package and set distributions it supports
cd /home/builder/workspace/packaging
sudo apk update
abuild -r

arch=$(abuild -A)
Expand Down
4 changes: 2 additions & 2 deletions linux/jdk/alpine/src/main/packaging/temurin/11/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-11
pkgver=11.0.25_p9
pkgver=11.0.26_p4
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -95,7 +95,7 @@ _jdk() {
}

sha256sums="
0a431310ccccc36c85b1274b5d31e368fdc8cf62cb7c2ed98d7b59eb5a13dc82 OpenJDK11U-jdk_x64_alpine-linux_hotspot_$_pkgver.tar.gz
2e1f667395cdb1e872bd7320e3eda96c0f0978e29e574e75f9cdf61160e8974a OpenJDK11U-jdk_x64_alpine-linux_hotspot_$_pkgver.tar.gz
e9185736dde99a4dc570a645a20407bdb41c1f48dfc34d9c3eb246cf0435a378 HelloWorld.java
22d2ff9757549ebc64e09afd3423f84b5690dcf972cd6535211c07c66d38fab0 TestCryptoLevel.java
9fb00c7b0220de8f3ee2aa398459a37d119f43fd63321530a00b3bb9217dd933 TestECDSA.java
Expand Down
4 changes: 2 additions & 2 deletions linux/jdk/alpine/src/main/packaging/temurin/17/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-17
pkgver=17.0.13_p11
pkgver=17.0.14_p7
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -95,7 +95,7 @@ _jdk() {
}

sha256sums="
67632ee4563e9827b56f62ab6da95bce200d9e82092b211988c0d2113abc4071 OpenJDK17U-jdk_x64_alpine-linux_hotspot_$_pkgver.tar.gz
259c85e16f7bbfdfb3e0a2ec1c5d6e2063300d413422286583265a9d8a882358 OpenJDK17U-jdk_x64_alpine-linux_hotspot_$_pkgver.tar.gz
e9185736dde99a4dc570a645a20407bdb41c1f48dfc34d9c3eb246cf0435a378 HelloWorld.java
22d2ff9757549ebc64e09afd3423f84b5690dcf972cd6535211c07c66d38fab0 TestCryptoLevel.java
9fb00c7b0220de8f3ee2aa398459a37d119f43fd63321530a00b3bb9217dd933 TestECDSA.java
Expand Down
6 changes: 3 additions & 3 deletions linux/jdk/alpine/src/main/packaging/temurin/21/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-21
pkgver=21.0.5_p11
pkgver=21.0.6_p7
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -97,10 +97,10 @@ _jdk() {

case "$CARCH" in
x86_64)
_arch_sum="8da7da49101d45f646272616f20e8b10d57472bbf5961d64ffb07d7ba93c6909"
_arch_sum="6c66470a9143ad562570a34c1583d9fa50bf904f6f9ced642e9d800ce043a0f3"
;;
aarch64)
_arch_sum="f22e32b869dd0e5e3f248646f62bffaa307b360299488ac8764e622923d7e747"
_arch_sum="2798990401d9c47eaeddb7d5148f577770e4c1013b9223290a43765463204ae4"
;;
esac

Expand Down
6 changes: 3 additions & 3 deletions linux/jdk/alpine/src/main/packaging/temurin/23/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-23
pkgver=23.0.1_p11
pkgver=23.0.2_p7
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -97,10 +97,10 @@ _jdk() {

case "$CARCH" in
x86_64)
_arch_sum="4c37a9e885c4e099b049c3ba9baa073de1525e28cd5ffca016c5c5bd7ed385a6"
_arch_sum="2c05c6dfea23a83fdbfaf5b03cc3cfd8d998c8069e930e0e585a39d4a99f3d99"
;;
aarch64)
_arch_sum="ebdd6602d27bd7535bf06f21e8a0c3d563be7b790a90bef00cb6ac4123c66f86"
_arch_sum="b55c5c881a2fed17ec5a59feaa33d9263703b399d1bfae3a5eaed3f140aa4570"
;;
esac

Expand Down
4 changes: 2 additions & 2 deletions linux/jdk/alpine/src/main/packaging/temurin/8/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-8-jdk
pkgver=8.432.06
pkgver=8.442.06
# replace 8. with 8u and .01 with b-01
_pkgver=${pkgver/8./8u}
_pkgver=${_pkgver%.*}b${_pkgver#*.}
Expand Down Expand Up @@ -67,6 +67,6 @@ package() {
}

sha256sums="
86071bc98901cae80c62745a64bb4486212985fe5b66b5aec36ce92e8a036a9d OpenJDK8U-jdk_x64_alpine-linux_hotspot_$_pkgver.tar.gz
9fcb96380b25c1d1caec65b7606c387716a7ae51caf359f5f3ff0dcca40f231f OpenJDK8U-jdk_x64_alpine-linux_hotspot_$_pkgver.tar.gz
e9185736dde99a4dc570a645a20407bdb41c1f48dfc34d9c3eb246cf0435a378 HelloWorld.java
"
10 changes: 7 additions & 3 deletions linux/jre/alpine/src/main/packaging/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CONTAINER_REGISTRY=""

FROM ${CONTAINER_REGISTRY}alpine:3.19
FROM ${CONTAINER_REGISTRY}alpine:latest
ENV GOSU_VERSION 1.14

RUN set -eux; \
Expand All @@ -9,15 +9,19 @@ RUN set -eux; \
alpine-sdk \
bash \
ca-certificates \
doas \
dpkg \
sudo
sudo \
wget

# Create unprivileged user for building, see
# https://github.com/hexops/dockerfile#use-a-static-uid-and-gid
RUN adduser -D -h /home/builder builder \
&& addgroup builder abuild \
&& echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
&& echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& echo 'permit builder as root' > /etc/doas.d/doas.conf

# Add GPG key
USER builder
WORKDIR /home/builder
RUN --mount=type=secret,id=gpg,gid=1000,uid=1000,dst=/tmp/private.rsa \
Expand Down
8 changes: 8 additions & 0 deletions linux/jre/alpine/src/main/packaging/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ set -euox pipefail
mkdir /home/builder/workspace
cp -R /home/builder/build/generated/packaging /home/builder/workspace

# Install Adoptium Public Key
sudo chmod 664 /etc/apk/repositories
sudo chgrp abuild /etc/apk/repositories
sudo wget -O /etc/apk/keys/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk
sudo echo 'https://packages.adoptium.net/artifactory/apk/alpine/main' >> /etc/apk/repositories
sudo wget -O /home/builder/.abuild/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk

# Set permssions
sudo chown -R builder /home/builder/out

# Build package and set distributions it supports
cd /home/builder/workspace/packaging
sudo apk update
abuild -r

arch=$(abuild -A)
Expand Down
4 changes: 2 additions & 2 deletions linux/jre/alpine/src/main/packaging/temurin/11/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-11
pkgver=11.0.25_p9
pkgver=11.0.26_p4
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -72,5 +72,5 @@ _jre() {
}

sha256sums="
905e35f14228904d67a7a56f9f0b8ede58e9b15f9af3a3d54fb86f78c8e47a34 OpenJDK11U-jre_x64_alpine-linux_hotspot_$_pkgver.tar.gz
69031fc68d41189691dbeca73447ca543040d26995f61cef83fd7aed8fb4dbd2 OpenJDK11U-jre_x64_alpine-linux_hotspot_$_pkgver.tar.gz
"
4 changes: 2 additions & 2 deletions linux/jre/alpine/src/main/packaging/temurin/17/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-17
pkgver=17.0.13_p11
pkgver=17.0.14_p7
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -71,5 +71,5 @@ _jre() {
}

sha256sums="
7a2df4e2f86eca649af1e17d990ab8e354cb6dee389606025b9d05f75623c388 OpenJDK17U-jre_x64_alpine-linux_hotspot_$_pkgver.tar.gz
9dcc53a30676692e604571a6e0bd13ac0c1b15f4bc2b78d19f88bd316075f84a OpenJDK17U-jre_x64_alpine-linux_hotspot_$_pkgver.tar.gz
"
6 changes: 3 additions & 3 deletions linux/jre/alpine/src/main/packaging/temurin/21/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-21
pkgver=21.0.5_p11
pkgver=21.0.6_p7
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -71,10 +71,10 @@ _jre() {

case "$CARCH" in
x86_64)
_arch_sum="2dfa33fb8e9474e6967c6cf17964abb5ddce9c17fa6a9f8d7aa221a0ae295df9"
_arch_sum="2330f38feb59ab7af0e2fffc12d5500005d35f7f53f49dd8a9f9aa1ae68aee5f"
;;
aarch64)
_arch_sum="12b988a3d934e3eb89c6a981a93f8e2adf0a62cc9030487dee76c0c29b93714d"
_arch_sum="bcd459e70cdddaa6ada0d855ce944c592814042f1e12d53aa08fa89eedcdf893"
;;
esac

Expand Down
6 changes: 3 additions & 3 deletions linux/jre/alpine/src/main/packaging/temurin/23/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-23
pkgver=23.0.1_p11
pkgver=23.0.2_p7
# replace _p1 with _1
_pkgver=${pkgver/_p/_}
_pkgverplus=${pkgver/_p/+}
Expand Down Expand Up @@ -71,10 +71,10 @@ _jre() {

case "$CARCH" in
x86_64)
_arch_sum="38a1b20b5ee8869b20e9f9aefdc91eedf245584d35287842a66540f0745dd3d0"
_arch_sum="4513750bd10cc6c38f0c19d335dac7dcc112bba64e52010f81ba29e7a71e2a76"
;;
aarch64)
_arch_sum="b56eaedc094cb9107be2d5be9ad34c3dd9492c45aa671d102b5829a488cfc744"
_arch_sum="248a2ffb3abcb0cee7841ce648af7af415c96ee88cba4f8bf676c0115d38de5e"
;;
esac

Expand Down
4 changes: 2 additions & 2 deletions linux/jre/alpine/src/main/packaging/temurin/8/APKBUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Maintainer: Eclipse Adoptium Package Maintainers <[email protected]>
pkgname=temurin-8-jre
pkgver=8.432.06
pkgver=8.442.06
# replace 8. with 8u and .01 with b-01
_pkgver=${pkgver/8./8u}
_pkgver=${_pkgver%.*}b${_pkgver#*.}
Expand Down Expand Up @@ -60,5 +60,5 @@ ls ${srcdir}
}

sha256sums="
7f7c265560dd5a42533bf282831d7d2f044a7ff7f4c310b40a0f9f8e19ff12e5 OpenJDK8U-jre_x64_alpine-linux_hotspot_$_pkgver.tar.gz
4fb0636534b0cd4534a3cdcbbe7cf2e937523d6376d9cef00cc6cfd5d19537e8 OpenJDK8U-jre_x64_alpine-linux_hotspot_$_pkgver.tar.gz
"
20 changes: 10 additions & 10 deletions linux_new/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def ArchiveFileName = ""
// Github Artifact Repos
def binaryRepo = "${params.VERSION.replace('jdk', 'temurin')}-binaries/releases/tag/${params.TAG}"
def binaryDLRepo = "${params.VERSION.replace('jdk', 'temurin')}-binaries/releases/download/${params.TAG}"
def fullURL = "${baseURL}/${binaryRepo}"
def dlURL = "${baseURL}/${binaryDLRepo}"
def fullURL = "${baseURL}${binaryRepo}"
def dlURL = "${baseURL}${binaryDLRepo}"

/* Supported Distro Arrays */
// Remember If Adding An Deb Distro to update the cacerts package //
Expand Down Expand Up @@ -86,7 +86,7 @@ def TemurinVersion = "${params.TEMURIN_VERSION_INCREMENT}"
/* Have Some Default Node Labels */
/* Specified Here To Simplify Updates Later */

def PKGBUILDLABELAPK = 'build&&linux&&x64&&dockerBuild&&dynamicAzure'
def PKGBUILDLABELAPK = 'linux&&apkbuild&&buildx64&&dockerBuild'
def PKGBUILDLABELDEB = 'build&&linux&&x64&&dockerBuild&&dynamicAzure'
def PKGBUILDLABELRHEL = 'build&&linux&&x64&&dockerBuild&&dynamicAzure'

Expand Down Expand Up @@ -134,9 +134,9 @@ def getPackageBuildLabel(String arch, String distro) {
switch (distro) {
case 'APK':
if (arch == 'x64') {
return 'build&&linux&&x64&&dockerBuild&&dynamicAzure'
return 'linux&&apkbuild&&build&&x64&&dockerBuild'
} else if (arch == 'aarch64') {
// return 'docker&&linux&&aarch64&&alpineInstaller'
// return 'docker&&linux&&aarch64&&apkbuild'
return 'build&&docker&&linux&&aarch64'
} else {
error("Unsupported architecture '${arch}' for distro 'APK'")
Expand Down Expand Up @@ -256,7 +256,7 @@ pipeline {
string(name: 'UPSTREAM_JOB_NUMBER', defaultValue: '', description: 'Parameter From Upstream Job Not Required Here')
booleanParam(name: 'UPLOAD_TESTRESULTS_ONLY', defaultValue: false, description: 'Parameter From Upstream Job Not Required Here')
string(name: 'TIMESTAMP', defaultValue: '', description: 'Parameter From Upstream Job Not Required Here')
string(name: 'GITHUB_TOKEN', defaultValue: '', description: 'Parameter From Upstream Job Not Required Here')
password(name: 'GITHUB_TOKEN', defaultValue: '', description: 'Parameter From Upstream Job Not Required Here')
string(name: 'ARTIFACTS_TO_SKIP', defaultValue: '', description: 'Parameter From Upstream Job Not Required Here')
}
// Stage Definition - Start
Expand Down Expand Up @@ -304,7 +304,7 @@ pipeline {

// Valid architectures
def validArchs = ['aarch64', 'x64', 's390x', 'arm', 'ppc64le', 'riscv64']

// Extract architectures from the parameter
def specifiedPaths = params.ARTIFACTS_TO_COPY.tokenize(',') // Split by commas
def extractedArchs = specifiedPaths.collect { path ->
Expand Down Expand Up @@ -748,7 +748,7 @@ stage('Build & Archive Package') {
buildCli = params.ENABLEDEBUG.toBoolean() ? buildCli + ' --stacktrace' : buildCli
sh("$buildCli")
}

if (DistArrayElement == "rhel" || DistArrayElement == "suse") { // for RPM based: RedHat / Suse / Alpine
echo "Using RPM Private KEY"
def privateKey = 'adoptium-artifactory-gpg-key'
Expand All @@ -758,7 +758,7 @@ stage('Build & Archive Package') {
sh("$buildCli")
}
}

if (DistArrayElement == "alpine") {
echo "Using Alpine Private KEY"
def privateKey = 'adoptium-artifactory-rsa-key'
Expand Down Expand Up @@ -920,4 +920,4 @@ post {
}
// End Of Post Build Trigger Stage
}
// Pipeline Definition - End
// Pipeline Definition - End
2 changes: 1 addition & 1 deletion linux_new/jdk/alpine/src/main/packaging/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG CONTAINER_REGISTRY=""

FROM ${CONTAINER_REGISTRY}alpine:3.19
FROM ${CONTAINER_REGISTRY}alpine:latest
ENV GOSU_VERSION 1.14

RUN set -eux; \
Expand Down
8 changes: 8 additions & 0 deletions linux_new/jdk/alpine/src/main/packaging/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,19 @@ set -euox pipefail
mkdir /home/builder/workspace
cp -R /home/builder/build/generated/packaging /home/builder/workspace

# Install Adoptium Public Key
sudo chmod 664 /etc/apk/repositories
sudo chgrp abuild /etc/apk/repositories
sudo wget -O /etc/apk/keys/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk
sudo echo 'https://packages.adoptium.net/artifactory/apk/alpine/main' >> /etc/apk/repositories
sudo wget -O /home/builder/.abuild/adoptium.rsa.pub https://packages.adoptium.net/artifactory/api/security/keypair/public/repositories/apk

# Set permssions
sudo chown -R builder /home/builder/out

# Build package and set distributions it supports
cd /home/builder/workspace/packaging
sudo apk update
abuild -r

arch=$(abuild -A)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ BuildRequires: wget
Requires: /bin/sh
Requires: /usr/sbin/alternatives
Requires: ca-certificates
Requires: dejavu-sans-fonts
Requires: dejavu-fonts
%ifarch %{arm}
Requires: libatomic
Requires: libatomic1
%endif
Requires: libX11%{?_isa}
Requires: libXext%{?_isa}
Requires: libXi%{?_isa}
Requires: libXrender%{?_isa}
Requires: libXtst%{?_isa}
Requires: alsa-lib%{?_isa}
Requires: libX11-6%{?_isa}
Requires: libXext6%{?_isa}
Requires: libXi6%{?_isa}
Requires: libXrender1%{?_isa}
Requires: libXtst6%{?_isa}
Requires: libasound2%{?_isa}
Requires: glibc%{?_isa}
Requires: zlib%{?_isa}
Requires: libz1%{?_isa}
Requires: fontconfig%{?_isa}
Requires: freetype%{?_isa}
Requires: libfreetype6%{?_isa}

Provides: java
Provides: java-1.8.0
Expand Down
Loading

0 comments on commit 5ca028d

Please sign in to comment.