From 1d10e601c380f29729dfc88a2323617f27ae49dc Mon Sep 17 00:00:00 2001 From: Jiri Vanek Date: Sat, 7 Jul 2018 19:32:34 +0200 Subject: [PATCH] Reworked and clarified generating of sources. Moved to single source --- .gitignore | 2 + ...temLcmsAndJpgFixFor-rev_f0aeede1b855.patch | 18 --- ...e_tarball.sh => generate_source_tarball.sh | 72 +++++++----- generate_tapsets.sh | 41 ------- java-11-openjdk.spec | 59 ++++------ sources | 5 +- update_package.sh | 107 ++++++++---------- 7 files changed, 117 insertions(+), 187 deletions(-) delete mode 100644 JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch rename generate_openjdk_source_tarball.sh => generate_source_tarball.sh (67%) delete mode 100644 generate_tapsets.sh diff --git a/.gitignore b/.gitignore index 8c3a599..33995f1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,5 @@ /jdk-jdk-jdk-11+19.tar.xz /jdk-shenandoah-jdk-ac148db384ee.tar.xz /icedtea8_9d464368e06d_systemtap-tapset_3.2.tar.xz +/systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz +/shenandoah-jdk11-jdk-11+20.tar.xz diff --git a/JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch b/JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch deleted file mode 100644 index b037c2a..0000000 --- a/JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch +++ /dev/null @@ -1,18 +0,0 @@ -# see thread of http://mail.openjdk.java.net/pipermail/build-dev/2018-June/022393.html ---- openjdk/make/common/JdkNativeCompilation.gmk Wed Jun 20 19:46:44 2018 -0700 -+++ openjdk/make/common/JdkNativeCompilation.gmk Thu Jun 21 10:10:16 2018 +0200 -@@ -119,9 +119,11 @@ - endif - - ifneq ($$($1_HEADERS_FROM_SRC), false) -- $1_SRC_HEADER_FLAGS := $$(foreach dir, $$(wildcard $$($1_SRC) \ -- $$(call GetJavaHeaderDir, $$(MODULE))), -I$$(dir)) -+ $1_SRC_HEADER_FLAGS := $$(addprefix -I, $$(wildcard $$($1_SRC))) - endif -+ # Always add the java header dir -+ $1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE))) -+ - ifneq ($$($1_EXTRA_HEADER_DIRS), ) - $1_PROCESSED_EXTRA_HEADER_DIRS := $$(foreach dir, $$($1_EXTRA_HEADER_DIRS), \ - $$(call ProcessDir, $$(dir))) - diff --git a/generate_openjdk_source_tarball.sh b/generate_source_tarball.sh similarity index 67% rename from generate_openjdk_source_tarball.sh rename to generate_source_tarball.sh index b1ca61a..62218ba 100644 --- a/generate_openjdk_source_tarball.sh +++ b/generate_source_tarball.sh @@ -7,9 +7,16 @@ # if you wont to use local copy of patch PR2126 set path to it to PR2126 variable # # In any case you have to set PROJECT_NAME REPO_NAME and VERSION. eg: -# PROJECT_NAME=jdk9 -# REPO_NAME=jdk9 -# VERSION=inDevelopment (but keyword tip will still do its job) +# 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) @@ -25,10 +32,10 @@ if [ ! "x$PR2126" = "x" ] ; then exit 1 fi fi + set -e OPENJDK_URL_DEFAULT=http://hg.openjdk.java.net -OPENJDK_URL_DEFAULT=file:///home/jvanek/Desktop/repos COMPRESSION_DEFAULT=xz if [ "x$1" = "xhelp" ] ; then @@ -40,6 +47,7 @@ if [ "x$1" = "xhelp" ] ; then 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 "PR2126 - the path to the PR2126 patch to apply (optional; downloaded if unavailable)" exit 1; fi @@ -87,6 +95,11 @@ if [ "x$REPO_ROOT" = "x" ] ; then 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 " @@ -99,33 +112,34 @@ else popd fi pushd "${FILE_NAME_ROOT}" - pushd openjdk - if [ -d src ]; then - echo "Removing EC source code we don't build" - CRYPTO_PATH=src/jdk.crypto.ec/share/native/libsunec/impl - rm -vrf $CRYPTO_PATH - echo "Syncing EC list with NSS" - if [ "x$PR2126" = "x" ] ; then - # orriginally for 8: - # get pr2126.patch (from http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8d2c9a898f50) from most correct tag - # Do not push it or publish it (see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2126) - # there is currnetly no "upstram version of this patch, hardcoding custom version - PR2126="../../pr2126-11.patch" - fi; - echo "Applying ${PR2126}" - patch -Np1 < $PR2126 + 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 -vrf $CRYPTO_PATH + echo "Syncing EC list with NSS" + if [ "x$PR2126" = "x" ] ; then + # orriginally for 8: + # get pr2126.patch (from http://icedtea.classpath.org/hg/icedtea?cmd=changeset;node=8d2c9a898f50) from most correct tag + # Do not push it or publish it (see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=2126) + # there is currnetly no "upstram version of this patch, hardcoding custom version + PR2126="../../pr2126-11.patch" + fi; + echo "Applying ${PR2126}" + patch -Np1 < $PR2126 + find . -name '*.orig' -exec rm -vf '{}' ';' + popd fi - find . -name '*.orig' -exec rm -vf '{}' ';' - popd - echo "Compressing remaining forest" - if [ "X$COMPRESSION" = "Xxz" ] ; then - tar --exclude-vcs -cJf ${FILE_NAME_ROOT}.tar.${COMPRESSION} openjdk - else - tar --exclude-vcs -czf ${FILE_NAME_ROOT}.tar.${COMPRESSION} openjdk - fi - mv ${FILE_NAME_ROOT}.tar.${COMPRESSION} .. + echo "Compressing remaining forest" + if [ "X$COMPRESSION" = "Xxz" ] ; then + SWITCH=cJf + else + SWITCH=czf + fi + tar --exclude-vcs -$SWITCH ${FILE_NAME_ROOT}.tar.${COMPRESSION} $TO_COMPRESS + mv ${FILE_NAME_ROOT}.tar.${COMPRESSION} .. popd -echo "Done. You may want to remove the uncompressed version." +echo "Done. You may want to remove the uncompressed version - $FILE_NAME_ROOT." diff --git a/generate_tapsets.sh b/generate_tapsets.sh deleted file mode 100644 index 70735cd..0000000 --- a/generate_tapsets.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash -set -x -set -e - -TAPSET_VERSION=3.2 -# icedtea7 have different jstack -#PROJECT_VERSION=6327cf1cea9e -#PROJECT=icedtea7-2.6 -#PROJECT_URL=http://icedtea.classpath.org/hg/release/$PROJECT/ -PROJECT_VERSION=9d464368e06d -PROJECT=icedtea8 -PROJECT_URL=http://icedtea.classpath.org/hg/$PROJECT/ -INPUT_FILE=$PROJECT_VERSION.tar.gz -OUTPUT=${PROJECT}_${PROJECT_VERSION}_systemtap-tapset_${TAPSET_VERSION} -OUTPUT_FILE=$OUTPUT.tar.xz - -if [ -e $OUTPUT_FILE ] ; then - set +x - echo "exists exists exists exists exists exists exists " - echo "reusing reusing reusing reusing reusing reusing " - echo $OUTPUT_FILE - exit 0 -fi - -if [ ! -e $INPUT_FILE ] ; then - wget $PROJECT_URL/archive/$INPUT_FILE -fi - -rm -rf $OUTPUT -mkdir $OUTPUT -pushd $OUTPUT - tar --strip-components=1 -xf ../$INPUT_FILE - for file in hotspot hotspot_gc hotspot_jni jstack ; do - mv tapset/${file}.stp.in tapset/${file}-NVRA.stp.in - done - tar cvJf $OUTPUT_FILE tapset - mv $OUTPUT_FILE ../ -popd -rm -rf $OUTPUT -rm $INPUT_FILE -echo $OUTPUT_FILE diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index 2b35485..a9e8599 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -73,14 +73,6 @@ %global include_debug_build 0 %endif -# On x86_64 and AArch64, we use the Shenandoah HotSpot -%ifarch x86_64 %{aarch64} -%global use_shenandoah_hotspot 1 -%else -%global use_shenandoah_hotspot 0 -%endif - - %if %{include_debug_build} %global build_loop2 %{debug_suffix} %else @@ -875,22 +867,10 @@ License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv URL: http://openjdk.java.net/ -# to regenerate source0 and source1(Shenandoah hotspot) run update_package.sh +# to regenerate source0 (jdk) and source8 (jdk's taspets) run update_package.sh # update_package.sh contains hard-coded repos, revisions, tags, and projects to regenerate the source archives -# at the end it sed specfile and sources to match those new names -# FIXME adapt the script to work better on shenandoah hotspot (After the jdk10 and removal of forest). Current source1 was done by manual delete -# FIXME: adapt the sed to new specfile and sources or drop those parts -# next update will be used to tweek those two files -Source0: jdk-jdk11-jdk-%{majorver}+%{buildver}.tar.xz - -# Shenandoah HotSpot -# current name used with tip and bleeding edge may be incorrect -Source1: jdk-shenandoah-jdk-ac148db384ee.tar.xz - -# Systemtap tapsets. Zipped up to keep it small -# Use 'generate_tapsets.sh' to generate the following tarball -# The script have hard-coded URL and revision -Source8: icedtea8_9d464368e06d_systemtap-tapset_3.2.tar.xz +Source0: shenandoah-jdk%{majorver}-jdk-%{majorver}+%{buildver}.tar.xz +Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz # Desktop files. Adapted from IcedTea Source9: jconsole.desktop.in @@ -932,7 +912,7 @@ Patch5: RHBZ-1565658-system-nss-SunEC.patch # OpenJDK specific patches # ############################################# -Patch6: JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch + BuildRequires: autoconf BuildRequires: automake @@ -1188,15 +1168,6 @@ if [ $prioritylength -ne 7 ] ; then exit 14 fi -%if %{use_shenandoah_hotspot} -# On Shenandoah-supported architectures, replace HotSpot with -# the Shenandoah version -pushd openjdk/src -rm -rf hotspot -tar -xf %{SOURCE1} -popd -%endif - # OpenJDK patches # Remove libraries that are linked @@ -1207,7 +1178,6 @@ pushd %{top_level_dir_name} %patch3 -p1 %patch4 -p1 %patch5 -p1 -%patch6 -p1 popd # openjdk @@ -1215,7 +1185,7 @@ popd # openjdk # Extract systemtap tapsets %if %{with_systemtap} -tar -x -I xz -f %{SOURCE8} +tar --strip-components=1 -x -I xz -f %{SOURCE8} %if %{include_debug_build} cp -r tapset tapset%{debug_suffix} %endif @@ -1223,7 +1193,7 @@ cp -r tapset tapset%{debug_suffix} for suffix in %{build_loop} ; do for file in "tapset"$suffix/*.in; do - OUTPUT_FILE=`echo $file | sed -e "s:NVRA\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g"` + OUTPUT_FILE=`echo $file | sed -e "s:\.stp\.in$:%{version}-%{release}.%{_arch}.stp:g"` sed -e "s:@ABS_SERVER_LIBJVM_SO@:%{_jvmdir}/%{sdkdir -- $suffix}/lib/server/libjvm.so:g" $file > $file.1 # TODO find out which architectures other than i686 have a client vm %ifarch %{ix86} @@ -1760,9 +1730,24 @@ require "copy_jdk_configs.lua" %changelog +* Sat Jul 07 2018 Jiri Vanek - 1:11.0.ea.20-1 +- removed patch6 JDK-8205616-systemLcmsAndJpgFixFor-rev_f0aeede1b855.patch +- improved a bit generate_source_tarball.sh to serve also for systemtap +- thus deleted generate_tapsets.sh +- simplified and celared update_package.sh +- moved to single source jdk - from shenandoah/jdk11 +- bumped to latest jdk11+20 +- adapted PR2126 to jdk11+20 +- adapted handling of systemtap sources to new style +- (no (misleading) version inside (full version is in name), thus different sed on tapsets and different directory) +- shortened summaries and descriptions to around 80 chars +- Hunspell spell checked +- license fixed to correct jdk11 (sgehwolf) +- more correct handling of internal libraries (sgehwolf) + * Fri Jun 22 2018 Jiri Vanek - 1:11.0.ea.19-1 - updated sources to jdk-11+19 -- added patch systemLcmsAndJpgFixFor-f0aeede1b855.patch to fix regression of system libraries after f0aeede1b855 commit +- added patch6 systemLcmsAndJpgFixFor-f0aeede1b855.patch to fix regression of system libraries after f0aeede1b855 commit - adapted RHBZ-1565658-system-nss-SunEC.patch to accommodate changes after f0aeede1b855 commit * Thu Jun 14 2018 Severin Gehwolf - 1:11.0.ea.16-5 diff --git a/sources b/sources index 8be5fea..cfd7dda 100644 --- a/sources +++ b/sources @@ -1,3 +1,2 @@ -SHA512 (icedtea8_9d464368e06d_systemtap-tapset_3.2.tar.xz) = 1b76c0f1a98a1118f5352ad744c491b8704bb3383f7a8b60f71f526d11440a45fdbda63e510dd1ddcb8dae5b773946946ee3746fc9d1b0148fa9323140220a76 -SHA512 (jdk-jdk-jdk-11+19.tar.xz) = f99aef9e7a4896dfbcdb80f620ad44e69e07760b7fcf100be8cd12070797f8e7a568baec998f32bf8727595d6ed246fd2b53ad9ce39e984859d5174015cedf7a -SHA512 (jdk-shenandoah-jdk-ac148db384ee.tar.xz) = 1aa6a6663eaa9e6cb681753a3015929fab5ff4e339cd718f96281ed6adcc5cf09e764732cc9a06cc97ae071ca4e70172f23909383ff8e777a5fc124069aa5d74 +SHA512 (systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz) = cf578221b77d8c7e019f69909bc86c419c5fb5e10bceba9592ff6e7f96887b0a7f07c9cefe90800975247a078785ca190fdec5c2d0f841bb447cee784b570f7d +SHA512 (shenandoah-jdk11-jdk-11+20.tar.xz) = 80d57061b0c62b8ce6796d63c9a1167012dfbbc5612dacf3c2955bdef07f93fad9b278d08476d82df27594053d92175017a24c6e8ab97b62498e1b88c81d6f17 diff --git a/update_package.sh b/update_package.sh index b12b660..f6f8d54 100644 --- a/update_package.sh +++ b/update_package.sh @@ -1,77 +1,66 @@ #!/bin/bash -x # this file contains defaults for currently generated source tarballs -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 - PROJECT_NAME="jdk" -fi -if [ "x$REPO_NAME" = "x" ] ; then - REPO_NAME="jdk11" -fi -if [ "x$VERSION" = "x" ] ; then - 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 - -MAIN_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} - -if [ ! -f ${MAIN_FILENAME} ] ; then -echo "Generating ${MAIN_FILENAME}" - . ./generate_openjdk_source_tarball.sh +# TAPSET +export PROJECT_NAME="hg" +export REPO_NAME="icedtea8" +export VERSION="9d464368e06d" +export COMPRESSION=xz +export OPENJDK_URL=http://icedtea.classpath.org +export FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION} +export TO_COMPRESS="*/tapset" +# warning, filename and filenameroot creation is duplicated here from generate_source_tarball.sh +CLONED_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} +TAPSET_VERSION=3.2 +TAPSET=systemtap_"$TAPSET_VERSION"_tapsets_$CLONED_FILENAME +if [ ! -f ${TAPSET} ] ; then + if [ ! -f ${CLONED_FILENAME} ] ; then + echo "Generating ${CLONED_FILENAME}" + sh ./generate_source_tarball.sh + else + echo "exists exists exists exists exists exists exists " + echo "reusing reusing reusing reusing reusing reusing " + echo ${CLONED_FILENAME} + fi + mv -v $CLONED_FILENAME $TAPSET else echo "exists exists exists exists exists exists exists " echo "reusing reusing reusing reusing reusing reusing " - echo ${MAIN_FILENAME} + echo ${TAPSET} fi -# generate shenandoah hotspot -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 +# OpenJDK from Shenandoah project +export PROJECT_NAME="shenandoah" +export REPO_NAME="jdk11" +export VERSION="jdk-11+20" +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 [ "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 - -SHENANDOAH_FILENAME=${FILE_NAME_ROOT}.tar.${COMPRESSION} - -if [ ! -f ${SHENANDOAH_FILENAME} ] ; then -echo "Generating ${SHENANDOAH_FILENAME}" - . ./generate_openjdk_source_tarball.sh +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 ${SHENANDOAH_FILENAME} + echo ${FILENAME} fi -TAPSET=`sh generate_tapsets.sh | tail -n 1` - -echo "align specfile acordingly" -echo "you should fedpkg/rhpkg new-sources $TAPSET $SHENANDOAH_FILENAME $MAIN_FILENAME" +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 "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"