mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-22 09:19:37 +01:00
JBR-3906 JBR for Linux aarch64 with JCEF is missing, is there any support plan?
(cherry picked from commit d47bc61b0e)
This commit is contained in:
@@ -1,11 +1,41 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/bash -x
|
||||||
|
|
||||||
# The following parameter must be specified:
|
# The following parameters must be specified:
|
||||||
# build_number - specifies the number of JetBrainsRuntime build
|
# build_number - specifies the number of JetBrainsRuntime build
|
||||||
|
# bundle_type - specifies bundle to be built;possible values:
|
||||||
|
# <empty> or nomod - the release bundles without any additional modules (jcef)
|
||||||
|
# jcef - the release bundles with jcef
|
||||||
|
# fd - the fastdebug bundles which also include the jcef module
|
||||||
#
|
#
|
||||||
|
# This script makes test-image along with JDK images when bundle_type is set to "jcef".
|
||||||
|
# If the character 't' is added at the end of bundle_type then it also makes test-image along with JDK images.
|
||||||
|
#
|
||||||
|
# Environment variables:
|
||||||
|
# JDK_BUILD_NUMBER - specifies update release of OpenJDK build or the value of --with-version-build argument
|
||||||
|
# to configure
|
||||||
|
# By default JDK_BUILD_NUMBER is set zero
|
||||||
|
# JCEF_PATH - specifies the path to the directory with JCEF binaries.
|
||||||
|
# By default JCEF binaries should be located in ./jcef_linux_aarch64
|
||||||
|
|
||||||
source jb/project/tools/common/scripts/common.sh
|
source jb/project/tools/common/scripts/common.sh
|
||||||
|
|
||||||
|
JCEF_PATH=${JCEF_PATH:=./jcef_linux_aarch64}
|
||||||
|
|
||||||
|
function do_configure {
|
||||||
|
sh configure \
|
||||||
|
$WITH_DEBUG_LEVEL \
|
||||||
|
--with-vendor-name="$VENDOR_NAME" \
|
||||||
|
--with-vendor-version-string="$VENDOR_VERSION_STRING" \
|
||||||
|
--with-jvm-features=shenandoahgc \
|
||||||
|
--with-version-pre= \
|
||||||
|
--with-version-build="$JDK_BUILD_NUMBER" \
|
||||||
|
--with-version-opt=b"$build_number" \
|
||||||
|
--with-boot-jdk="$BOOT_JDK" \
|
||||||
|
--enable-cds=yes \
|
||||||
|
$REPRODUCIBLE_BUILD_OPTS \
|
||||||
|
|| do_exit $?
|
||||||
|
}
|
||||||
|
|
||||||
function is_musl {
|
function is_musl {
|
||||||
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||||
if [ -z $libc ]; then
|
if [ -z $libc ]; then
|
||||||
@@ -15,70 +45,113 @@ function is_musl {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
JBRSDK_BASE_NAME=jbrsdk-${JBSDK_VERSION}
|
function create_image_bundle {
|
||||||
|
__bundle_name=$1
|
||||||
|
__arch_name=$2
|
||||||
|
__modules_path=$3
|
||||||
|
__modules=$4
|
||||||
|
|
||||||
LIBC_TYPE_SUFFIX=''
|
libc_type_suffix=''
|
||||||
|
|
||||||
if is_musl; then LIBC_TYPE_SUFFIX='musl-' ; fi
|
if is_musl; then libc_type_suffix='musl-' ; fi
|
||||||
|
|
||||||
sh configure \
|
[ "$bundle_type" == "fd" ] && [ "$__arch_name" == "$JBRSDK_BUNDLE" ] && __bundle_name=$__arch_name && fastdebug_infix="fastdebug-"
|
||||||
--with-debug-level=release \
|
JBR=${__bundle_name}-${JBSDK_VERSION}-linux-${libc_type_suffix}aarch64-${fastdebug_infix}b${build_number}
|
||||||
--with-vendor-name="${VENDOR_NAME}" \
|
|
||||||
--with-vendor-version-string="${VENDOR_VERSION_STRING}" \
|
|
||||||
--with-jvm-features=shenandoahgc \
|
|
||||||
--with-version-pre= \
|
|
||||||
--with-version-build="${JDK_BUILD_NUMBER}" \
|
|
||||||
--with-version-opt=b${build_number} \
|
|
||||||
--with-boot-jdk=${BOOT_JDK} \
|
|
||||||
--enable-cds=yes \
|
|
||||||
$REPRODUCIBLE_BUILD_OPTS \
|
|
||||||
|| exit $?
|
|
||||||
make clean CONF=linux-aarch64-server-release || exit $?
|
|
||||||
make images CONF=linux-aarch64-server-release test-image || exit $?
|
|
||||||
|
|
||||||
JBSDK=${JBRSDK_BASE_NAME}-linux-${LIBC_TYPE_SUFFIX}aarch64-b${build_number}
|
echo Running jlink....
|
||||||
BASE_DIR=build/linux-aarch64-server-release/images
|
[ -d "$IMAGES_DIR"/"$__arch_name" ] && rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
|
||||||
JSDK=${BASE_DIR}/jdk
|
$JSDK/bin/jlink \
|
||||||
|
--module-path "$__modules_path" --no-man-pages --compress=2 \
|
||||||
|
--add-modules "$__modules" --output "$IMAGES_DIR"/"$__arch_name"
|
||||||
|
|
||||||
|
grep -v "^JAVA_VERSION" "$JSDK"/release | grep -v "^MODULES" >> "$IMAGES_DIR"/"$__arch_name"/release
|
||||||
|
if [ "$__arch_name" == "$JBRSDK_BUNDLE" ]; then
|
||||||
|
sed 's/JBR/JBRSDK/g' "$IMAGES_DIR"/"$__arch_name"/release > release
|
||||||
|
mv release "$IMAGES_DIR"/"$__arch_name"/release
|
||||||
|
copy_jmods "$__modules" "$__modules_path" "$IMAGES_DIR"/"$__arch_name"/jmods
|
||||||
|
fi
|
||||||
|
|
||||||
|
# jmod does not preserve file permissions (JDK-8173610)
|
||||||
|
[ -f "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper ] && chmod a+x "$IMAGES_DIR"/"$__arch_name"/lib/jcef_helper
|
||||||
|
|
||||||
|
echo Creating "$JBR".tar.gz ...
|
||||||
|
|
||||||
|
(cd "$IMAGES_DIR" &&
|
||||||
|
find "$__arch_name" -print0 | LC_ALL=C sort -z | \
|
||||||
|
tar $REPRODUCIBLE_TAR_OPTS \
|
||||||
|
--no-recursion --null -T - -cf "$JBR".tar) || do_exit $?
|
||||||
|
mv "$IMAGES_DIR"/"$JBR".tar ./"$JBR".tar
|
||||||
|
[ -f "$JBR".tar.gz ] && rm "$JBR.tar.gz"
|
||||||
|
touch -c -d "@$SOURCE_DATE_EPOCH" "$JBR".tar
|
||||||
|
gzip "$JBR".tar || do_exit $?
|
||||||
|
rm -rf "${IMAGES_DIR:?}"/"$__arch_name"
|
||||||
|
}
|
||||||
|
|
||||||
|
WITH_DEBUG_LEVEL="--with-debug-level=release"
|
||||||
|
RELEASE_NAME=linux-aarch64-server-release
|
||||||
|
|
||||||
|
case "$bundle_type" in
|
||||||
|
"jcef")
|
||||||
|
do_reset_changes=1
|
||||||
|
do_maketest=1
|
||||||
|
;;
|
||||||
|
"dcevm")
|
||||||
|
HEAD_REVISION=$(git rev-parse HEAD)
|
||||||
|
git am jb/project/tools/patches/dcevm/*.patch || do_exit $?
|
||||||
|
do_reset_dcevm=0
|
||||||
|
do_reset_changes=0
|
||||||
|
;;
|
||||||
|
"nomod" | "")
|
||||||
|
bundle_type=""
|
||||||
|
;;
|
||||||
|
"fd")
|
||||||
|
do_reset_changes=1
|
||||||
|
WITH_DEBUG_LEVEL="--with-debug-level=fastdebug"
|
||||||
|
RELEASE_NAME=linux-aarch64-server-fastdebug
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if [ -z "$INC_BUILD" ]; then
|
||||||
|
do_configure || do_exit $?
|
||||||
|
make clean CONF=$RELEASE_NAME || do_exit $?
|
||||||
|
fi
|
||||||
|
make images CONF=$RELEASE_NAME || do_exit $?
|
||||||
|
|
||||||
|
IMAGES_DIR=build/$RELEASE_NAME/images
|
||||||
|
JSDK=$IMAGES_DIR/jdk
|
||||||
|
JSDK_MODS_DIR=$IMAGES_DIR/jmods
|
||||||
JBRSDK_BUNDLE=jbrsdk
|
JBRSDK_BUNDLE=jbrsdk
|
||||||
|
|
||||||
echo Fixing permissions
|
echo Fixing permissions
|
||||||
chmod -R a+r $JSDK
|
chmod -R a+r $JSDK
|
||||||
|
|
||||||
rm -rf $BASE_DIR/$JBRSDK_BUNDLE
|
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ]; then
|
||||||
cp -r $JSDK $BASE_DIR/$JBRSDK_BUNDLE || exit $?
|
git apply -p0 < jb/project/tools/patches/add_jcef_module_aarch64.patch || do_exit $?
|
||||||
|
update_jsdk_mods $JSDK $JCEF_PATH/jmods $JSDK/jmods $JSDK_MODS_DIR || do_exit $?
|
||||||
|
cp $JCEF_PATH/jmods/* $JSDK_MODS_DIR # $JSDK/jmods is not changed
|
||||||
|
|
||||||
echo Creating $JBSDK.tar.gz ...
|
jbr_name_postfix="_${bundle_type}"
|
||||||
sed 's/JBR/JBRSDK/g' ${BASE_DIR}/${JBRSDK_BUNDLE}/release > release
|
fi
|
||||||
mv release ${BASE_DIR}/${JBRSDK_BUNDLE}/release
|
|
||||||
|
|
||||||
# NB: --sort=name requires tar1.28
|
# create runtime image bundle
|
||||||
tar $REPRODUCIBLE_TAR_OPTS --sort=name -pcf $JBSDK.tar \
|
modules=$(xargs < jb/project/tools/common/modules.list | sed s/" "//g) || do_exit $?
|
||||||
--exclude=*.debuginfo --exclude=demo --exclude=sample --exclude=man \
|
create_image_bundle "jbr${jbr_name_postfix}" "jbr" $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||||
-C $BASE_DIR ${JBRSDK_BUNDLE} || exit $?
|
|
||||||
touch -c -d @$SOURCE_DATE_EPOCH $JBRSDK.tar
|
|
||||||
gzip $JBSDK.tar || exit $?
|
|
||||||
|
|
||||||
JBR_BUNDLE=jbr
|
# create sdk image bundle
|
||||||
JBR_BASE_NAME=jbr-$JBSDK_VERSION
|
modules=$(cat $JSDK/release | grep MODULES | sed s/MODULES=//g | sed s/' '/','/g | sed s/\"//g | sed s/\\n//g) || do_exit $?
|
||||||
rm -rf $BASE_DIR/$JBR_BUNDLE
|
if [ "$bundle_type" == "jcef" ] || [ "$bundle_type" == "dcevm" ] || [ "$bundle_type" == "fd" ] || [ "$bundle_type" == "$JBRSDK_BUNDLE" ]; then
|
||||||
|
modules=${modules},$(get_mods_list "$JCEF_PATH"/jmods)
|
||||||
|
fi
|
||||||
|
create_image_bundle "$JBRSDK_BUNDLE${jbr_name_postfix}" $JBRSDK_BUNDLE $JSDK_MODS_DIR "$modules" || do_exit $?
|
||||||
|
|
||||||
JBR=$JBR_BASE_NAME-linux-${LIBC_TYPE_SUFFIX}aarch64-b$build_number
|
if [ $do_maketest -eq 1 ]; then
|
||||||
grep -v javafx jb/project/tools/common/modules.list | grep -v "jdk.internal.vm\|jdk.aot\|jcef" > modules.list.aarch64
|
JBRSDK_TEST=${JBRSDK_BUNDLE}-${JBSDK_VERSION}-linux-${libc_type_suffix}test-aarch64-b${build_number}
|
||||||
echo Running jlink....
|
echo Creating "$JBRSDK_TEST" ...
|
||||||
${JSDK}/bin/jlink \
|
[ $do_reset_changes -eq 1 ] && git checkout HEAD jb/project/tools/common/modules.list src/java.desktop/share/classes/module-info.java
|
||||||
--module-path ${JSDK}/jmods --no-man-pages --compress=2 \
|
make test-image CONF=$RELEASE_NAME || do_exit $?
|
||||||
--add-modules $(xargs < modules.list.aarch64 | sed s/" "//g | sed s/',$'//g) \
|
tar -pcf "$JBRSDK_TEST".tar -C $IMAGES_DIR --exclude='test/jdk/demos' test || do_exit $?
|
||||||
--output ${BASE_DIR}/${JBR_BUNDLE} || exit $?
|
[ -f "$JBRSDK_TEST.tar.gz" ] && rm "$JBRSDK_TEST.tar.gz"
|
||||||
|
gzip "$JBRSDK_TEST".tar || do_exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
echo Modifying release info ...
|
do_exit 0
|
||||||
grep -v \"^JAVA_VERSION\" ${JSDK}/release | grep -v \"^MODULES\" >> ${BASE_DIR}/${JBR_BUNDLE}/release
|
|
||||||
|
|
||||||
echo Creating $JBR.tar.gz ...
|
|
||||||
tar $REPRODUCIBLE_TAR_OPTS --sort=name -pcf $JBR.tar -C $BASE_DIR ${JBR_BUNDLE} || exit $?
|
|
||||||
touch -c -d @$SOURCE_DATE_EPOCH $JBR.tar
|
|
||||||
gzip $JBR.tar || exit $?
|
|
||||||
|
|
||||||
JBRSDK_TEST=$JBRSDK_BASE_NAME-linux-${LIBC_TYPE_SUFFIX}test-aarch64-b$build_number
|
|
||||||
echo Creating $JBRSDK_TEST.tar.gz ...
|
|
||||||
tar -pcf $JBRSDK_TEST.tar -C $BASE_DIR --exclude='test/jdk/demos' test || exit $?
|
|
||||||
gzip $JBRSDK_TEST.tar || exit $?
|
|
||||||
|
|||||||
30
jb/project/tools/patches/add_jcef_module_aarch64.patch
Normal file
30
jb/project/tools/patches/add_jcef_module_aarch64.patch
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
diff --git jb/project/tools/common/modules.list jb/project/tools/common/modules.list
|
||||||
|
index 522acb7..c40e689 100644
|
||||||
|
--- jb/project/tools/common/modules.list
|
||||||
|
+++ jb/project/tools/common/modules.list
|
||||||
|
@@ -51,4 +51,7 @@ jdk.unsupported.desktop,
|
||||||
|
jdk.xml.dom,
|
||||||
|
jdk.zipfs,
|
||||||
|
jdk.hotspot.agent,
|
||||||
|
-jdk.jcmd
|
||||||
|
+jdk.jcmd,
|
||||||
|
+jcef,
|
||||||
|
+gluegen.rt,
|
||||||
|
+jogl.all
|
||||||
|
diff --git src/java.desktop/share/classes/module-info.java src/java.desktop/share/classes/module-info.java
|
||||||
|
index 897647e..781d180 100644
|
||||||
|
--- src/java.desktop/share/classes/module-info.java
|
||||||
|
+++ src/java.desktop/share/classes/module-info.java
|
||||||
|
@@ -116,7 +116,11 @@ module java.desktop {
|
||||||
|
// see make/GensrcModuleInfo.gmk
|
||||||
|
exports sun.awt to
|
||||||
|
jdk.accessibility,
|
||||||
|
- jdk.unsupported.desktop;
|
||||||
|
+ jdk.unsupported.desktop,
|
||||||
|
+ jcef,
|
||||||
|
+ jogl.all;
|
||||||
|
+
|
||||||
|
+ exports java.awt.peer to jcef;
|
||||||
|
|
||||||
|
exports java.awt.dnd.peer to jdk.unsupported.desktop;
|
||||||
|
exports sun.awt.dnd to jdk.unsupported.desktop;
|
||||||
Reference in New Issue
Block a user