diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/openjdk8/APKBUILD | 20 | ||||
-rwxr-xr-x | user/openjdk8/maintain | 149 |
2 files changed, 143 insertions, 26 deletions
diff --git a/user/openjdk8/APKBUILD b/user/openjdk8/APKBUILD index 86a052d72..f55638fbf 100644 --- a/user/openjdk8/APKBUILD +++ b/user/openjdk8/APKBUILD @@ -4,7 +4,7 @@ _icedteaver=3.21.0 # pkgver is <JDK version>.<JDK update>.<JDK build> # Check https://icedtea.classpath.org/wiki/Main_Page when updating pkgver=8.312.07 -pkgrel=0 +pkgrel=1 pkgdesc="Libre Java development kit for Java 8" url="https://icedtea.classpath.org/" arch="all" @@ -69,7 +69,7 @@ source="https://icedtea.classpath.org/download/source/icedtea-$_icedteaver.tar.x project-autoconf-2xx.patch " -_targets="aarch64 pmmx ppc ppc64 x86_64" +_targets="aarch64 ppc64 ppc x86_64 pmmx" for target in $_targets; do source="$source https://distfiles.adelielinux.org/source/openjdk/openjdk8-bootstrap-$target.txz @@ -152,7 +152,7 @@ unpack() { fi mkdir -p "$srcdir" msg "Unpacking sources..." - tar -C "$srcdir" -Jxf icedtea-$_icedteaver.tar.xz + tar -C "$srcdir" -xJf icedtea-$_icedteaver.tar.xz tar -C "$srcdir" -xJf openjdk8-bootstrap-$CARCH.txz \ || die "Architecture $CARCH not bootstrapped" } @@ -224,7 +224,9 @@ build() { --with-jdk-home="$_bootstrap_java_home" \ --with-pkgversion="Adelie ${pkgver}-r${pkgrel}" \ --enable-nss \ - --enable-non-nss-curves + --enable-non-nss-curves \ + --disable-jfr `# configure error without this` \ + ; make } @@ -345,8 +347,8 @@ b135991c76b0db8fa7c363e0903624668e11eda7b54a943035c214aa4d7fc8c3e8110ed200edcec8 662d662d0a7a84be2978e921317589f212f3ba3b7629527ba0f1140b5ac4c1024893e0ed176211688ed1a4505968c4befc841ed57ffcdbb9d355c2cb0571b167 icedtea-autoconf-config.patch b0f6d07c6a949acdc8b4a25bf924f134f468e162f01dd440fd4ca80769fb84a0a54210f93efbe88012404fe3db6701aad31cdbc772bc054ad69021c37db5538c remove-gawk.patch 6dd39baca14f088d0b2157308e3d9657ab64ecdb7daab09137486e212e3a8c53f6deae6167b6212217c6ef29c1406347e21ca6bb193ced9ebeb399aeb06bda4b project-autoconf-2xx.patch -29b2ee1920285acb8e842f9502c5fb1ca791ee47a8887e35bc16cb21a4cd9f2a25c74508cca2c3311a8351a9796cce34ec7ac32c177117cf7f54bbdfcce1dbc9 openjdk8-bootstrap-aarch64.txz -c91ff930d85967e5909b6d4e108c6ad37866287b1e3d23065b693b8fd275d4136d3764c541637d22f2aaa4e0cd7fadda686c400e82c27c4eecf67d79c78c8e16 openjdk8-bootstrap-pmmx.txz -103c67808fc004a039bb2e7482f50ac96f35d040b918be6444129915e210c207d813f08fe3ec837ac3d753beed3542737fd4e733ed542fe277c8278cbb12f564 openjdk8-bootstrap-ppc.txz -6a411c549064b0242b976560f0ebca5c9eba2f419c2eb73af4dfc7901e2623c31b19b6fc94c428a75c73d5ced783b8f7b14984193c8b4e2a059d7046e8ebeb91 openjdk8-bootstrap-ppc64.txz -877fc16d855d381465f0662ed75c19ef9408311a37bcd75ddea8ac950965a7e6f42c582796640e0029a960b15f8495c0c597b0d5b5a2c59b03b6741bfb1b77cb openjdk8-bootstrap-x86_64.txz" +2bbf44ce9145554829c9645e12645fed671201a2af73891d0552295a0a38d45d2d98dccf7db888926450481537e9aebaf4fe12701494e432af10b3ed79bf524e openjdk8-bootstrap-aarch64.txz +2c0aa356ad015e4176250eda49060f73fef85e8cd457144ab131c03ff79acc5721062755c60b0efa8058602244e2c4f79ec0985e219ff37a4fc933c485a070ce openjdk8-bootstrap-ppc64.txz +c4c5d65b41a5928b0583c5a7a82530f802380d6104dfa60c0613682e29193760505ca06427a30613d72a9d45609038e5192440f799d348ce89f213ede0659d4a openjdk8-bootstrap-ppc.txz +c4e6e620f43a9b71e06a616853abce95452044147ca26ac2f484d1e4e4c23f03682ad650a77968f96d88a554832b341f6aa6e7cb059ae87f99349fe8d68a5d6c openjdk8-bootstrap-x86_64.txz +9281ac1dee1bf35fbdb320cac615de1bfd731853cc1ade59896341f28a2d126f3106fffcdda25375e8c96d224cbe60962e6862893bfc7fff1fe2efbf3900e06c openjdk8-bootstrap-pmmx.txz" diff --git a/user/openjdk8/maintain b/user/openjdk8/maintain index bd0f69533..41133cf7f 100755 --- a/user/openjdk8/maintain +++ b/user/openjdk8/maintain @@ -1,11 +1,25 @@ -#!/bin/sh +#!/bin/sh -e ## +# The purpose of this script is for reproducibility, +# not to be used except for creation of the bootstrap +# tarballs and to document how they were created for +# the RC3 release. This is a TEMPORARY WORKAROUND so +# that we do not unnecessarily postpone RC3 over Java. +# +# Files are uploaded to: +# +# * https://distfiles.adelielinux.org/source/openjdk/ +# # This script downloads RC2 'openjdk8' .apk files, # extracts some JVM bits, and produces tarballs for # bootstrapping this package, suitable for upload to # https://distfiles.adelielinux.org/source/openjdk/. # +# Shared libraries may be added for compatibility to +# avoid using system-provided libraries which may be +# incompatible with the existing binaries. +# # Note: checksums may vary between 'tar' versions or # implementations; please do not rely on this. The # output has been verified by 'diff -qr', may differ @@ -15,33 +29,134 @@ # HERE="$(dirname $(readlink -f ${0}))"; + +## +# mirror for input binaries +# host=https://distfiles.adelielinux.org; -repo=1.0-rc2; -vers=8.252.09-r0; -keep=usr/lib/jvm/java-1.8-openjdk; +from=1.0-rc2; + + +## +# supported architectures +# +# Note: empty or broken tarballs may be created for +# architectures that are missing ingredients. We do +# not treat this as an error; we want to have a full +# set of bootstrap tarballs, fix as needed, and not +# have to update code in multiple places. +# arch="aarch64 armv7 ppc64 ppc x86_64 pmmx"; + + +## +# packages to fetch +# +# Note: order is important; we assume tree structure +# during the manipulation stage. Does not matter for +# extraction, which we do before manipulation anyway. +# This is easily refactored but I can't be bothered. +# apks=" -openjdk8-jre-lib -openjdk8-jre-base -openjdk8-jre -openjdk8 +user/openjdk8-jre-lib:8.252.09-r0 +user/openjdk8-jre-base:8.252.09-r0 +user/openjdk8-jre:8.252.09-r0 +user/openjdk8:8.252.09-r0 +system/libffi:3.2.1-r6 "; +## +# global variables +# +vers=; # 3.2.1-r6 +repo=; # system +name=; # libffi + + +## +# supporting routines +# +set_metadata () +{ + vers=${apk#*:}; + repo=${apk%/*}; + temp=${apk%:${vers}}; + name=${temp#*/}; +} + +brk_unsupport () +{ + printf "E: target is missing dependency '%s'.\n" "${1}"; + break; +} + + +## +# H. P. Lovecraft +# knows this is daft. +# for cpu in $arch; do + printf "\n%s\n" "$cpu"; - rm -fr "${HERE}"/$cpu; # sanity - mkdir -p "${HERE}"/$cpu/boot-home; + + # output directory (specific to APKBUILD) + keep="${HERE}"/$cpu/boot-home; + + # always start fresh + rm -fr "${HERE}"/$cpu; + mkdir -p "${keep}"; + + # initial download/extract + for apk in $apks; do + + set_metadata $apk; + + printf " * %s\n" "$name-$vers.apk"; + + curl -s $host/adelie/$from/$repo/$cpu/$name-$vers.apk \ + | tar -C "${HERE}"/$cpu -xzf - 2>/dev/null \ + || brk_unsupport "$name-$vers.apk"; # armv7 + + done + + # optional special-case manipulation for apk in $apks; do - printf " * %s\n" "$apk-$vers.apk"; - curl -s $host/adelie/$repo/user/$cpu/$apk-$vers.apk \ - | tar -C "${HERE}"/$cpu -xzf - 2>/dev/null; + + set_metadata $apk; + + case "${name}" in + libffi) + # naming does not match $cpu! + # e.g. { x86_64 --> amd64, ppc64 --> ppc, pmmx --> i386 } + # so we look for a known file and work relative to it + _tmp=$(find "${keep}" -name libjvm.so || brk_unsupport "libjvm.so"); # armv7 + _dst=${_tmp%/*}; + cp -a $(find "${HERE}"/$cpu/usr/lib -name "libffi.so*") \ + "${_dst}" \ + || brk_unsupport "libffi.so*"; # armv7 + ;; + openjdk8) + cp -a "${HERE}"/$cpu/usr/lib/jvm/java-1.8-openjdk \ + "${keep}"/$cpu \ + || brk_unsupport "openjdk8"; # armv7 + ;; + esac + done - cp -a "${HERE}"/$cpu/$keep "${HERE}"/$cpu/boot-home/$cpu; + + # create bootstrap tarball ( cd "${HERE}"/$cpu; - chown -R 1000:1000 boot-home; - tar -cJf "${HERE}"/openjdk8-bootstrap-$cpu.txz boot-home; + + # cleanup unnecessary files (specific to APKBUILD) + rm -fr usr; + + chown -R 1000:1000 .; + tar -cJf "${HERE}"/openjdk8-bootstrap-$cpu.txz .; ) + + # cleanup intermediates rm -fr "${HERE}"/$cpu; -done
\ No newline at end of file + +done |