diff --git a/generate_source_tarball.sh b/generate_source_tarball.sh new file mode 100755 index 0000000000000000000000000000000000000000..4c41c1ed69a3b3e206ed9fe971483f5d1058e329 --- /dev/null +++ b/generate_source_tarball.sh @@ -0,0 +1,157 @@ +#!/bin/bash +# Generates the 'source tarball' for JDK projects. +# +# Example: +# When used from local repo set REPO_ROOT pointing to file:// with your repo +# If your local repo follows upstream forests conventions, it may be enough to set OPENJDK_URL +# If you want to use a local copy of patch PR3751, set the path to it in the PR3751 variable +# +# In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg: +# PROJECT_NAME=jdk +# REPO_NAME=jdk +# VERSION=tip +# or to eg prepare systemtap: +# icedtea7's jstack and other tapsets +# VERSION=6327cf1cea9e +# REPO_NAME=icedtea7-2.6 +# PROJECT_NAME=release +# OPENJDK_URL=http://icedtea.classpath.org/hg/ +# TO_COMPRESS="*/tapset" +# +# They are used to create correct name and are used in construction of sources url (unless REPO_ROOT is set) + +# This script creates a single source tarball out of the repository +# based on the given tag and removes code not allowed in fedora/rhel. For +# consistency, the source tarball will always contain 'openjdk' as the top +# level folder, name is created, based on parameter +# + +if [ ! "x$PR3751" = "x" ] ; then + if [ ! -f "$PR3751" ] ; then + echo "You have specified PR3751 as $PR3751 but it does not exist. Exiting" + exit 1 + fi +fi + +set -e + +OPENJDK_URL_DEFAULT=http://hg.openjdk.java.net +COMPRESSION_DEFAULT=xz + +if [ "x$1" = "xhelp" ] ; then + echo -e "Behaviour may be specified by setting the following variables:\n" + echo "VERSION - the version of the specified OpenJDK project" + echo "PROJECT_NAME -- the name of the OpenJDK project being archived (optional; only needed by defaults)" + echo "REPO_NAME - the name of the OpenJDK repository (optional; only needed by defaults)" + echo "OPENJDK_URL - the URL to retrieve code from (optional; defaults to ${OPENJDK_URL_DEFAULT})" + echo "COMPRESSION - the compression type to use (optional; defaults to ${COMPRESSION_DEFAULT})" + echo "FILE_NAME_ROOT - name of the archive, minus extensions (optional; defaults to PROJECT_NAME-REPO_NAME-VERSION)" + echo "REPO_ROOT - the location of the Mercurial repository to archive (optional; defaults to OPENJDK_URL/PROJECT_NAME/REPO_NAME)" + echo "TO_COMPRESS - what part of clone to pack (default is openjdk)" + echo "PR3751 - the path to the PR3751 patch to apply (optional; downloaded if unavailable)" + exit 1; +fi + + +if [ "x$VERSION" = "x" ] ; then + echo "No VERSION specified" + exit -2 +fi +echo "Version: ${VERSION}" + +# REPO_NAME is only needed when we default on REPO_ROOT and FILE_NAME_ROOT +if [ "x$FILE_NAME_ROOT" = "x" -o "x$REPO_ROOT" = "x" ] ; then + if [ "x$PROJECT_NAME" = "x" ] ; then + echo "No PROJECT_NAME specified" + exit -1 + fi + echo "Project name: ${PROJECT_NAME}" + if [ "x$REPO_NAME" = "x" ] ; then + echo "No REPO_NAME specified" + exit -3 + fi + echo "Repository name: ${REPO_NAME}" +fi + +if [ "x$OPENJDK_URL" = "x" ] ; then + OPENJDK_URL=${OPENJDK_URL_DEFAULT} + echo "No OpenJDK URL specified; defaulting to ${OPENJDK_URL}" +else + echo "OpenJDK URL: ${OPENJDK_URL}" +fi + +if [ "x$COMPRESSION" = "x" ] ; then + # rhel 5 needs tar.gz + COMPRESSION=${COMPRESSION_DEFAULT} +fi +echo "Creating a tar.${COMPRESSION} archive" + +if [ "x$FILE_NAME_ROOT" = "x" ] ; then + FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION} + echo "No file name root specified; default to ${FILE_NAME_ROOT}" +fi +if [ "x$REPO_ROOT" = "x" ] ; then + REPO_ROOT="${OPENJDK_URL}/${PROJECT_NAME}/${REPO_NAME}" + echo "No repository root specified; default to ${REPO_ROOT}" +fi; + +if [ "x$TO_COMPRESS" = "x" ] ; then + TO_COMPRESS="openjdk" + echo "No to be compressed targets specified, ; default to ${TO_COMPRESS}" +fi; + +if [ -d ${FILE_NAME_ROOT} ] ; then + echo "exists exists exists exists exists exists exists " + echo "reusing reusing reusing reusing reusing reusing " + echo ${FILE_NAME_ROOT} +else + mkdir "${FILE_NAME_ROOT}" + pushd "${FILE_NAME_ROOT}" + echo "Cloning ${VERSION} root repository from ${REPO_ROOT}" + hg clone ${REPO_ROOT} openjdk -r ${VERSION} + popd +fi +pushd "${FILE_NAME_ROOT}" + if [ -d openjdk/src ]; then + pushd openjdk + echo "Removing EC source code we don't build" + CRYPTO_PATH=src/jdk.crypto.ec/share/native/libsunec/impl + rm -vf ${CRYPTO_PATH}/ec2.h + rm -vf ${CRYPTO_PATH}/ec2_163.c + rm -vf ${CRYPTO_PATH}/ec2_193.c + rm -vf ${CRYPTO_PATH}/ec2_233.c + rm -vf ${CRYPTO_PATH}/ec2_aff.c + rm -vf ${CRYPTO_PATH}/ec2_mont.c + rm -vf ${CRYPTO_PATH}/ecp_192.c + rm -vf ${CRYPTO_PATH}/ecp_224.c + + echo "Syncing EC list with NSS" + if [ "x$PR3751" = "x" ] ; then + # get pr3751.patch (from http://icedtea.classpath.org/hg/icedtea11) from most correct tag + # Do not push it or publish it (see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3751) + echo "PR3751 not found. Downloading..." + wget http://icedtea.classpath.org/hg/icedtea11/raw-file/tip/patches/pr3751.patch + echo "Applying ${PWD}/pr3751.patch" + patch -Np1 < pr3751.patch + rm pr3751.patch + else + echo "Applying ${PR3751}" + patch -Np1 < $PR3751 + fi; + find . -name '*.orig' -exec rm -vf '{}' ';' + popd + fi + + echo "Compressing remaining forest" + if [ "X$COMPRESSION" = "Xxz" ] ; then + SWITCH=cJf + else + SWITCH=czf + fi + TARBALL_NAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} + tar --exclude-vcs -$SWITCH ${TARBALL_NAME} $TO_COMPRESS + mv ${TARBALL_NAME} .. +popd +echo "Done. You may want to remove the uncompressed version - $FILE_NAME_ROOT." + + diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index 4a638e9f09b12f527608d40d72c0c7472f6cf4fb..2cf54f5199d1bc361e9ae7b9fa7299913e6eff45 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -114,15 +114,14 @@ # New Version-String scheme-style defines %global majorver 11 -%global securityver 7 +%global securityver 8 # buildjdkver is usually same as %%{majorver}, # but in time of bootstrap of next jdk, it is majorver-1, # and this it is better to change it here, on single place %global buildjdkver %{majorver} -#Used via new version scheme. JDK 11 was -# GA'ed in September 2018 => 18.9 -%global vendor_version_string 18.9 +%global lts_designator "" +%global lts_designator_zip "" # Define IcedTea version used for SystemTap tapsets and desktop file %global icedteaver 3.15.0 @@ -133,10 +132,16 @@ %global top_level_dir_name %{origin} %global minorver 0 %global buildver 10 + +%global project jdk-updates +%global repo jdk11u +%global revision jdk-11.0.8-ga +%global full_revision %{project}%{repo}%{revision} + # priority must be 7 digits in total # setting to 1, so debug ones can have 0 %global priority 00000%{minorver}1 -%global fulljavaver %{majorver}.%{minorver}.%{securityver} +%global newjavaver %{majorver}.%{minorver}.%{securityver} %global javaver %{majorver} @@ -636,7 +641,7 @@ Requires: ca-certificates # Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros Requires: javapackages-filesystem # Require zone-info data provided by tzdata-java sub-package -Requires: tzdata-java >= 2019c +Requires: tzdata-java >= 2020a # for support of kernel stream control # libsctp.so.1 is being `dlopen`ed on demand Requires: lksctp-tools%{?_isa} @@ -731,8 +736,8 @@ Provides: java-src%{?1} = %{epoch}:%{version}-%{release} } Name: java-%{javaver}-%{origin} -Version: %{fulljavaver}.%{buildver} -Release: 5 +Version: %{newjavaver}.%{buildver} +Release: 0 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons # and this change was brought into RHEL-4. java-1.5.0-ibm packages # also included the epoch in their virtual provides. This created a @@ -765,7 +770,7 @@ License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv URL: http://openjdk.java.net/ -Source0: openjdk-%{fulljavaver}-ga.tar.xz +Source0: %{full_revision}.tar.xz # Use 'icedtea_sync.sh' to update the following # They are based on code contained in the IcedTea project (3.x). @@ -1154,7 +1159,10 @@ bash ../configure \ --with-version-build=%{buildver} \ --with-version-pre="" \ --with-version-opt="" \ - --with-vendor-version-string="%{vendor_version_string}" \ + --with-vendor-name="openEuler" \ + --with-vendor-url="https://openeuler.org/" \ + --with-vendor-bug-url="https://gitee.com/src-openeuler/openjdk-11/issues/" \ + --with-vendor-vm-bug-url="https://gitee.com/src-openeuler/openjdk-11/issues/" \ --with-boot-jdk=/usr/lib/jvm/java-%{buildjdkver}-openjdk \ --with-debug-level=$debugbuild \ --with-native-debug-symbols=internal \ @@ -1170,8 +1178,7 @@ bash ../configure \ --with-extra-ldflags="%{ourldflags}" \ --with-num-cores="$NUM_PROC" \ --disable-javac-server \ - --disable-warnings-as-errors \ - --with-boot-jdk-jvmargs=-XX:-UsePerfData + --disable-warnings-as-errors # Debug builds don't need same targets as release for # build speed-up @@ -1354,7 +1361,7 @@ if ! echo $suffix | grep -q "debug" ; then # Install Javadoc documentation install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir} cp -a %{buildoutputdir -- $suffix}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix} - cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{fulljavaver}+%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip + cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{newjavaver}+%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip fi # Install icons and menu entries @@ -1561,8 +1568,10 @@ require "copy_jdk_configs.lua" %{files_src -- %{debug_suffix_unquoted}} %endif - %changelog +* Thu Jun 9 2020 jdkboy - 1:11.0.8.10-0 +- Update to jdk-11.0.8+10 (GA) + * Thu Jun 9 2020 jdkboy - 1:11.0.7.10-5 - Version support fulljavaver.buildver - Judge with_systemtap diff --git a/openjdk-11.0.7-ga.tar.xz b/jdk-updates-jdk11u-jdk-11.0.8-ga.tar.xz similarity index 84% rename from openjdk-11.0.7-ga.tar.xz rename to jdk-updates-jdk11u-jdk-11.0.8-ga.tar.xz index 352ffd458908b839060fcddb3ba6d4184687bf65..af73cdbb2a8d00c4331eaaefca43fddb4605c8ab 100644 Binary files a/openjdk-11.0.7-ga.tar.xz and b/jdk-updates-jdk11u-jdk-11.0.8-ga.tar.xz differ diff --git a/sources b/sources new file mode 100644 index 0000000000000000000000000000000000000000..68d9625284d0b7e8dbef22194c964082e348aa6e --- /dev/null +++ b/sources @@ -0,0 +1,2 @@ +SHA512 (tapsets-icedtea-3.15.0.tar.xz) = c752a197cb3d812d50c35e11e4722772be40096c81d2a57933e0d9b8a3c708b9c157b8108a4e33a06ca7bb81648170994408c75d6f69d5ff12785d0c31009671 +SHA512 (shenandoah-jdk11-shenandoah-jdk-11.0.8+10.tar.xz) = a78914b08fd4b935665a808bd383afa8ee8517454779df0aa1f2d83984cb230b5edff2d7826daaadc0891d3463e49911d90614523d6a42ad430b367a2e33093f diff --git a/update_package.sh b/update_package.sh new file mode 100644 index 0000000000000000000000000000000000000000..e381ba12f481007667be2a320239c82dddc8a2e8 --- /dev/null +++ b/update_package.sh @@ -0,0 +1,42 @@ +#!/bin/bash -x +# this file contains defaults for currently generated source tarballs + +set -e + +# OpenJDK from Shenandoah project +export PROJECT_NAME="jdk-updates" +export REPO_NAME="jdk11u" +# warning, clonning without shenadnaoh prefix, you will clone pure jdk - thus without shenandaoh GC +export VERSION="jdk-11.0.8-ga" +export COMPRESSION=xz +# unset tapsets overrides +export OPENJDK_URL="" +export TO_COMPRESS="" +# warning, filename and filenameroot creation is duplicated here from generate_source_tarball.sh +export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION} +FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} + +if [ ! -f ${FILENAME} ] ; then +echo "Generating ${FILENAME}" + sh ./generate_source_tarball.sh +else + echo "exists exists exists exists exists exists exists " + echo "reusing reusing reusing reusing reusing reusing " + echo ${FILENAME} +fi + +set +e + +major=`echo $REPO_NAME | sed 's/[a-zA-Z]*//g'` +build=`echo $VERSION | sed 's/.*+//g'` +name_helper=`echo $FILENAME | sed s/$major/'%{majorver}'/g ` +name_helper=`echo $name_helper | sed s/$build/'%{buildver}'/g ` +echo "align specfile acordingly:" +echo " sed 's/^Source0:.*/Source0: $name_helper/' -i *.spec" +echo " sed 's/^Source8:.*/Source8: $TAPSET/' -i *.spec" +echo " sed 's/^%global buildver.*/%global buildver $build/' -i *.spec" +echo " sed 's/Release:.*/Release: 1%{?dist}/' -i *.spec" +echo "and maybe others...." +echo "you should fedpkg/rhpkg new-sources $TAPSET $FILENAME" +echo "you should fedpkg/rhpkg prep --arch XXXX on all architectures: x86_64 i386 i586 i686 ppc ppc64 ppc64le s390 s390x aarch64 armv7hl" +