java-openjdk/update_package.sh

106 lines
3.1 KiB
Bash
Raw Normal View History

#!/bin/bash -x
# Generates the 'source tarball' for JDK 8 projects and update spec infrastructure
# By default, this script regenerate source as they are currently used.
# so if the version of sources change, this file changes and is pushed
#
# In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg:
Udpated to jdk11+19 - adapted RHBZ-1565658-system-nss-SunEC.patch; hopefully correct - broken system lcms - probably caused by http://hg.openjdk.java.net/jdk/jdk/rev/f0aeede1b855 === Output from failing command(s) repeated here === make/Init.gmk:342: Building on-failure /usr/bin/printf "* For target support_native_java.desktop_libjavajpeg_imageioJPEG.o:\n" + /usr/bin/printf '* For target support_native_java.desktop_libjavajpeg_imageioJPEG.o:\n' * For target support_native_java.desktop_libjavajpeg_imageioJPEG.o: make/Init.gmk:342: Building on-failure (/usr/bin/grep -v -e "^Note: including file:" < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_libjavajpeg_imageioJPEG.o.log || true) | /usr/bin/head -n 12 + /usr/bin/grep -v -e '^Note: including file:' + /usr/bin/head -n 12 cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c:49:10: fatal error: com_sun_imageio_plugins_jpeg_JPEGImageReader.h: No such file or directory #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make/Init.gmk:342: Building on-failure if test `/usr/bin/wc -l < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_libjavajpeg_imageioJPEG.o.log` -gt 12; then /usr/bin/echo " ... (rest of output omitted)" ; fi ++ /usr/bin/wc -l + test 5 -gt 12 make/Init.gmk:342: Building on-failure /usr/bin/printf "* For target support_native_java.desktop_liblcms_LCMS.o:\n" + /usr/bin/printf '* For target support_native_java.desktop_liblcms_LCMS.o:\n' * For target support_native_java.desktop_liblcms_LCMS.o: make/Init.gmk:342: Building on-failure (/usr/bin/grep -v -e "^Note: including file:" < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_liblcms_LCMS.o.log || true) | /usr/bin/head -n 12 + /usr/bin/grep -v -e '^Note: including file:' + /usr/bin/head -n 12 cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/src/java.desktop/share/native/liblcms/LCMS.c:29:10: fatal error: sun_java2d_cmm_lcms_LCMS.h: No such file or directory #include "sun_java2d_cmm_lcms_LCMS.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make/Init.gmk:342: Building on-failure if test `/usr/bin/wc -l < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_liblcms_LCMS.o.log` -gt 12; then /usr/bin/echo " ... (rest of output omitted)" ; fi ++ /usr/bin/wc -l + test 5 -gt 12 make/Init.gmk:342: Building on-failure /usr/bin/printf "\n* All command lines available in /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs.\n" + /usr/bin/printf '\n* All command lines available in /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs.\n' * All command lines available in /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs. make/Init.gmk:342: Building on-failure /usr/bin/printf "=== End of repeated output ===\n" + /usr/bin/printf '=== End of repeated
2018-06-22 08:45:30 +00:00
# PROJECT_NAME=jdk11
# REPO_NAME=jdk
# VERSION=inDevelopment (but keyword tip will still do its job)
#
# If you don't, default are used and so already uploaded tarball regenerated
# They are used to create correct name and are used in construction of sources url (unless REPO_ROOT is set)
#
# For other useful variables see generate_source_tarball.sh
#
# the used values are then substituted to spec and sources
if [ ! "x$PR2126" = "x" ] ; then
if [ ! -f "$PR2126" ] ; then
echo "You have specified PR2126 as $PR2126 but it does not exists. exiting"
exit 1
fi
fi
set -e
if [ "x$PROJECT_NAME" = "x" ] ; then
Udpated to jdk11+19 - adapted RHBZ-1565658-system-nss-SunEC.patch; hopefully correct - broken system lcms - probably caused by http://hg.openjdk.java.net/jdk/jdk/rev/f0aeede1b855 === Output from failing command(s) repeated here === make/Init.gmk:342: Building on-failure /usr/bin/printf "* For target support_native_java.desktop_libjavajpeg_imageioJPEG.o:\n" + /usr/bin/printf '* For target support_native_java.desktop_libjavajpeg_imageioJPEG.o:\n' * For target support_native_java.desktop_libjavajpeg_imageioJPEG.o: make/Init.gmk:342: Building on-failure (/usr/bin/grep -v -e "^Note: including file:" < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_libjavajpeg_imageioJPEG.o.log || true) | /usr/bin/head -n 12 + /usr/bin/grep -v -e '^Note: including file:' + /usr/bin/head -n 12 cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/src/java.desktop/share/native/libjavajpeg/imageioJPEG.c:49:10: fatal error: com_sun_imageio_plugins_jpeg_JPEGImageReader.h: No such file or directory #include "com_sun_imageio_plugins_jpeg_JPEGImageReader.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make/Init.gmk:342: Building on-failure if test `/usr/bin/wc -l < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_libjavajpeg_imageioJPEG.o.log` -gt 12; then /usr/bin/echo " ... (rest of output omitted)" ; fi ++ /usr/bin/wc -l + test 5 -gt 12 make/Init.gmk:342: Building on-failure /usr/bin/printf "* For target support_native_java.desktop_liblcms_LCMS.o:\n" + /usr/bin/printf '* For target support_native_java.desktop_liblcms_LCMS.o:\n' * For target support_native_java.desktop_liblcms_LCMS.o: make/Init.gmk:342: Building on-failure (/usr/bin/grep -v -e "^Note: including file:" < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_liblcms_LCMS.o.log || true) | /usr/bin/head -n 12 + /usr/bin/grep -v -e '^Note: including file:' + /usr/bin/head -n 12 cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/src/java.desktop/share/native/liblcms/LCMS.c:29:10: fatal error: sun_java2d_cmm_lcms_LCMS.h: No such file or directory #include "sun_java2d_cmm_lcms_LCMS.h" ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. make/Init.gmk:342: Building on-failure if test `/usr/bin/wc -l < /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs/support_native_java.desktop_liblcms_LCMS.o.log` -gt 12; then /usr/bin/echo " ... (rest of output omitted)" ; fi ++ /usr/bin/wc -l + test 5 -gt 12 make/Init.gmk:342: Building on-failure /usr/bin/printf "\n* All command lines available in /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs.\n" + /usr/bin/printf '\n* All command lines available in /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs.\n' * All command lines available in /home/jvanek/rpmbuild/BUILD/java-11-openjdk-11.0.ea.19-5.fc27.x86_64/openjdk/build/make-support/failure-logs. make/Init.gmk:342: Building on-failure /usr/bin/printf "=== End of repeated output ===\n" + /usr/bin/printf '=== End of repeated
2018-06-22 08:45:30 +00:00
PROJECT_NAME="jdk"
fi
if [ "x$REPO_NAME" = "x" ] ; then
2018-07-04 19:19:04 +00:00
REPO_NAME="jdk11"
fi
if [ "x$VERSION" = "x" ] ; then
2018-07-04 19:19:04 +00:00
VERSION="jdk-11+20"
fi
if [ "x$COMPRESSION" = "x" ] ; then
# rhel 5 needs tar.gz
COMPRESSION=xz
fi
if [ "x$FILE_NAME_ROOT" = "x" ] ; then
FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
fi
2018-07-04 19:19:04 +00:00
MAIN_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
2018-07-04 19:19:04 +00:00
if [ ! -f ${MAIN_FILENAME} ] ; then
echo "Generating ${MAIN_FILENAME}"
. ./generate_source_tarball.sh
else
2018-07-04 19:19:04 +00:00
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${MAIN_FILENAME}
fi
# generate shenandoah hotspot
2018-07-04 19:19:04 +00:00
if [ "x$PROJECT_NAME" = "x" ] ; then
PROJECT_NAME="shenandoah"
fi
if [ "x$REPO_NAME" = "x" ] ; then
REPO_NAME="jdk"
fi
if [ "x$VERSION" = "x" ] ; then
VERSION="4f5549ec27fb"
fi
2018-06-22 15:24:43 +00:00
2018-07-04 19:19:04 +00:00
if [ "x$COMPRESSION" = "x" ] ; then
# rhel 5 needs tar.gz
COMPRESSION=xz
fi
if [ "x$FILE_NAME_ROOT" = "x" ] ; then
FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
fi
2018-06-22 15:24:43 +00:00
2018-07-04 19:19:04 +00:00
SHENANDOAH_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION}
2018-07-04 19:19:04 +00:00
if [ ! -f ${SHENANDOAH_FILENAME} ] ; then
echo "Generating ${SHENANDOAH_FILENAME}"
. ./generate_source_tarball.sh
else
2018-07-04 19:19:04 +00:00
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${SHENANDOAH_FILENAME}
fi
2018-07-04 19:19:04 +00:00
TAPSET=`sh generate_tapsets.sh | tail -n 1`
2018-06-22 15:24:43 +00:00
2018-07-04 19:19:04 +00:00
echo "rh/fedpkg $TAPSET $SHENANDOAH_FILENAME $MAIN_FILENAME"
user_name=`whoami`
user_record=$(getent passwd $user_name)
user_gecos_field=$(echo "$user_record" | cut -d ':' -f 5)
user_full_name=$(echo "$user_gecos_field" | cut -d ',' -f 1)
spec_date=`date +"%a %b %d %Y"`
revision_helper=`echo ${MAIN_VERSION%-*}`
updatever=`echo ${revision_helper##*u}`
buildver=`echo ${MAIN_VERSION##*-}`
2018-07-04 19:19:04 +00:00
echo "%chnagelog"
echo "* $spec_date $user_full_name <$user_name@redhat.com> - 1:MAJORVER.SECURITY.UPDATE.BUILD-RELEASE(1)"
echo "- updated to $MAIN_FILENAME"
echo "- updated to $SHENANDOAH_FILENAME"
echo "- updated to $TAPSET "
echo "- adjusted buildver minorver securityver majorver acordingly"
echo "you should verify by fedpkg/rhpkg prep --arch XXXX on all architectures: x86_64 i386 i586 i686 ppc ppc64 ppc64le s390 s390x aarch64 armv7hl"