Compare commits

..

33 Commits

Author SHA1 Message Date
Severin Gehwolf 1828873b3e Adjust system NSS patch for -Wl,--as-needed.
redhat-rpm-config package turned on -Wl,--as-needed linker
flag by default, breaking the SunEC via system NSS provider
build. This fixes it by filtering -Wl,--as-needed from
linker flags when SunEC provider is being built.

Resolves: RHBZ#1623399
2018-08-29 12:12:49 +02:00
Jiri Vanek 203d656a9c Fixed name of main source 2018-08-23 18:50:41 +02:00
Jiri Vanek 91d9d511a1 Synced minor tweeks from ojdk11 2018-08-23 18:44:07 +02:00
Jiri Vanek 33daef27da updated to security jdk10+3.13
- deleted patch106 JDK-8193802-npe-jar-getVersionMap.patch
- deleted patch400 JDK-8200556-aarch64-slowdebug-crash.patch
- deleted patch104 JDK-8201509-s390-atomic_store.patch
- deleted patch103 JDK-8201788-bootcycle-images-jobs.patch
2018-07-23 19:01:24 +02:00
Fedora Release Engineering f2b05f174e - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 06:05:04 +00:00
Severin Gehwolf bb69b429bf Fix requires/provides filter.
See RHBZ#1590796 for details.
2018-07-02 18:32:36 +02:00
Jiri Vanek f272c6f4f1 Cosmetic change aligned with jdk8 2018-06-21 16:03:02 +02:00
Severin Gehwolf 202a7bb885 Expose release/slowdebug builds being produced via conditionals.
Example:
$ rpmbuild -ba java-openjdk.spec --without slowdebug

The above example wouldn't include a slowdebug build if it would
be otherwise supported on that architecture.

By default, slowdebug and release builds are being produced in the
same fashion as prior this patch.
2018-06-21 15:37:23 +02:00
Jiri Vanek 4daef38fba Bumped release 2018-06-20 14:40:42 +02:00
Jiri Vanek 88eeaff540 jsa files changed to 444 to pass rpm verification 2018-06-20 14:22:01 +02:00
Severin Gehwolf 2b8a0f601c Use proper private_libs expression for filtering requires/provides. 2018-06-13 14:48:40 +02:00
Severin Gehwolf 4bd976a72a Bump release and rebuild for fixed gdb.
See RHBZ#1589118.
2018-06-08 17:55:53 +02:00
Jiri Vanek 5b88def903 Repalced monitoring group by correct profiling 2018-06-04 16:55:33 +02:00
Jiri Vanek 5a0610b473 Fixed day in date, fixed slowdebug in description 2018-06-04 15:59:34 +02:00
Jiri Vanek 6e17b14b70 removed last trace of relative symlinks, added BuildRequires of javapackages-tools to fix build failure after Requires change to javapackages-filesystem
- quoted sed expressions, changed possibly confussing # by @
- added vendor(origin) into icons
- removed last trace of relative symlinks
- added BuildRequires of javapackages-tools to fix build failure after Requires change to javapackages-filesystem
2018-06-04 15:02:49 +02:00
Jiri Vanek d1442bd892 bumped release 2018-06-02 08:49:38 +02:00
Jiri Vanek 7275f10b39 Added several comments expalining licenses and calls 2018-06-02 08:48:04 +02:00
Severin Gehwolf bb25d5fdda Move to javapackages-filesystem for directory ownership.
Resolves RHBZ#1500288.
2018-05-17 10:40:21 +02:00
Severin Gehwolf dae369d0d0 Add patch of JDK-8193802 for RHBZ#1557375. 2018-04-30 12:31:43 +02:00
Severin Gehwolf 5bda264f7f Build flags injection for java-openjdk.
Resolves RHBZ#1571359.
2018-04-27 12:43:57 +02:00
Severin Gehwolf 903fd83316 Clean up patches.
- Remove unneeded ones.
- Rename patches for clarity. Update JDK-8201788
  from upstream.
- Add patches needed to build on more arches (Zero).
2018-04-23 10:06:59 +02:00
Jiri Vanek 7c201d1c3f used java-openjdk as boot jdk; aligned provides/requires; renamed zip javadoc 2018-04-20 19:35:22 +02:00
Jiri Vanek e20ee17760 for rawhide, used java-openjdk as boot jdk 2018-04-20 15:33:28 +02:00
Jiri Vanek f781a8567a Merge branch 'master' of ssh://pkgs.fedoraproject.org/rpms/java-openjdk 2018-04-20 15:07:46 +02:00
Jiri Vanek c9ab4cf17a Updated to security update 10.0.1 2018-04-20 15:03:55 +02:00
Severin Gehwolf 822d6ac3b2 Enable system NSS support test in %check. 2018-04-19 19:50:01 +02:00
Severin Gehwolf d74e09a0e8 Port Martin Balao's JDK 9 patch for system NSS support to JDK 10.
Resolves RHBZ#1565658.
2018-04-19 19:50:01 +02:00
Jiri Vanek a3924afa42 Added README.md 2018-04-10 14:53:49 +02:00
Jiri Vanek f40774cbc5 fixed systemtap install. Experimental Jexec removed from alternatives 2018-04-10 11:41:00 +02:00
Jiri Vanek d3f0a6bc2c fixed path to jeexec target 2018-04-09 18:13:17 +02:00
Jiri Vanek 1d2c8ddb0d Added supporting script and enabled debug build 2018-04-09 16:56:43 +02:00
Jiri Vanek 77ef5aab14 Initial import 2018-04-09 15:56:35 +02:00
Jiri Vanek 9724ec2820 init 2018-04-09 15:54:40 +02:00
12 changed files with 233 additions and 446 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@
/systemtap-tapset-3.6.0pre02.tar.xz
/jdk-jdk10-jdk-10+46.tar.xz
/jdk-updates-jdk10u-jdk-10.0.1+10.tar.xz
/jdk-updates-jdk10u-jdk-10.0.2+13.tar.xz

View File

@ -1,72 +0,0 @@
# HG changeset patch
# User sherman
# Date 1525080541 -7200
# Mon Apr 30 11:29:01 2018 +0200
# Node ID c3e284205e149a6d786ff5aa7dca9338cf70ba60
# Parent e541eaa797070bafe8c3dc41f4beec8395c78276
8193802: NullPointerException from JarFileSystem.getVersionMap()
Reviewed-by: mchung
diff --git a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java
--- a/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java
+++ b/src/jdk.zipfs/share/classes/jdk/nio/zipfs/JarFileSystem.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -109,7 +109,9 @@
*/
private Function<byte[],byte[]> createVersionedLinks(int version) {
HashMap<IndexNode,byte[]> aliasMap = new HashMap<>();
- getVersionMap(version, getInode(getBytes("/META-INF/versions"))).values()
+ IndexNode verdir = getInode(getBytes("/META-INF/versions"));
+ if (verdir != null) {
+ getVersionMap(version, verdir).values()
.forEach(versionNode -> { // for each META-INF/versions/{n} directory
// put all the leaf inodes, i.e. entries, into the alias map
// possibly shadowing lower versioned entries
@@ -124,6 +126,7 @@
}
});
});
+ }
return path -> aliasMap.get(IndexNode.keyOf(path));
}
diff --git a/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java b/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java
--- a/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java
+++ b/test/jdk/jdk/nio/zipfs/MultiReleaseJarTest.java
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8144355 8144062 8176709
+ * @bug 8144355 8144062 8176709 8193802
* @summary Test aliasing additions to ZipFileSystem for multi-release jar files
* @library /lib/testlibrary/java/util/jar
* @build Compiler JarBuilder CreateMultiReleaseTestJars
@@ -205,6 +205,21 @@
//testCustomMultiReleaseValue("true\r\n true", false);
}
+ @Test
+ public void testMultiReleaseJarWithNonVersionDir() throws Exception {
+ String jfname = "multi-release-non-ver.jar";
+ Path jfpath = Paths.get(jfname);
+ URI uri = new URI("jar", jfpath.toUri().toString() , null);
+ JarBuilder jb = new JarBuilder(jfname);
+ jb.addAttribute("Multi-Release", "true");
+ jb.build();
+ Map<String,String> env = Map.of("multi-release", "runtime");
+ try (FileSystem fs = FileSystems.newFileSystem(uri, env)) {
+ Assert.assertTrue(true);
+ }
+ Files.delete(jfpath);
+ }
+
private static final AtomicInteger JAR_COUNT = new AtomicInteger(0);
private void testCustomMultiReleaseValue(String value, boolean expected)

View File

@ -1,14 +0,0 @@
diff -r 214a94e9366c src/cpu/aarch64/vm/nativeInst_aarch64.cpp
--- openjdk/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Mon Jul 17 12:11:32 2017 +0000
+++ openjdk/src/hotspot/cpu/aarch64/nativeInst_aarch64.cpp Mon Jul 24 16:23:14 2017 +0100
@@ -343,7 +343,7 @@
CodeBuffer cb(code_pos, instruction_size);
MacroAssembler a(&cb);
- a.mov(rscratch1, entry);
+ a.movptr(rscratch1, (uintptr_t)entry);
a.br(rscratch1);
ICache::invalidate_range(code_pos, instruction_size);

View File

@ -1,18 +0,0 @@
diff --git a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp
--- a/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp
+++ b/src/hotspot/os_cpu/linux_zero/os_linux_zero.hpp
@@ -50,10 +50,10 @@
: "Q"(*(volatile long*)src));
#elif defined(S390) && !defined(_LP64)
double tmp;
- asm volatile ("ld %0, 0(%1)\n"
- "std %0, 0(%2)\n"
- : "=r"(tmp)
- : "a"(src), "a"(dst));
+ asm volatile ("ld %0, %2\n"
+ "std %0, %1\n"
+ : "=&f"(tmp), "=Q"(*(volatile double*)dst)
+ : "Q"(*(volatile double*)src));
#else
*(jlong *) dst = *(const jlong *) src;
#endif

View File

@ -1,27 +0,0 @@
# HG changeset patch
# User sgehwolf
# Date 1524152606 -7200
# Thu Apr 19 17:43:26 2018 +0200
# Node ID f7a3ca673e9cc831848fc890a2df3ae9acb447e4
# Parent dd26184768b0a1c4103a2e9eaa8b4d852a9eca1b
8201788: Number of make jobs wrong for bootcycle-images target
Reviewed-by: erikj, ihse
diff --git a/make/Init.gmk b/make/Init.gmk
--- a/make/Init.gmk
+++ b/make/Init.gmk
@@ -310,9 +310,13 @@
ifneq ($(PARALLEL_TARGETS), )
$(call StartGlobalTimer)
$(call PrepareSmartJavac)
+ # JOBS will only be empty for a bootcycle-images recursive call
+ # or if specified via a make argument directly. In those cases
+ # treat it as NOT using jobs at all.
( cd $(TOPDIR) && \
$(NICE) $(MAKE) $(MAKE_ARGS) $(OUTPUT_SYNC_FLAG) \
- -j $(JOBS) -f make/Main.gmk $(USER_MAKE_VARS) \
+ $(if $(JOBS), -j $(JOBS)) \
+ -f make/Main.gmk $(USER_MAKE_VARS) \
$(PARALLEL_TARGETS) $(COMPARE_BUILD_MAKE) $(BUILD_LOG_PIPE) || \
( exitcode=$$? && \
$(PRINTF) "\nERROR: Build failed for $(TARGET_DESCRIPTION) (exit code $$exitcode) \n" \

View File

@ -1,3 +1,11 @@
# JDK 10 branch of java-openjdk
Rolling release of (usually) STSs OpenJDK
OpenJDK have release cadence of 6 months. but 3/4 of them are Short Term Supported for 6 months only. This package is designed to harbore them. Currently it is build on openJDK 10. LTSs (next is 11) will go as separate packages.
This is used by the jdk-10 module.
JDK10 is next major release of Java platform. It is bringing many cool improvements - http://openjdk.java.net/projects/jdk/10/ and is landing to your Fedora. Where it will be maintained for f27 and newer. Unluckily, it is STS (short term support) version. Between individual LTS will be always several STS. Again, please See announcement: http://mail.openjdk.java.net/pipermail/discuss/2017-September/004281.html and See java SIG plans: https://jvanek.fedorapeople.org/devconf/2018/changesInjavaReleaseProcess.pdf . So this is rolling release of all STSs to come. Its fate during the release of fresh LTS is yet to be decided. You will always be allowed to install Used LTS in fedora build root, alongside with latest STS via alternatives.
See announcement: http://mail.openjdk.java.net/pipermail/discuss/2017-September/004281.html
See java SIG plans: https://jvanek.fedorapeople.org/devconf/2018/changesInjavaReleaseProcess.pdf
https://bugzilla.redhat.com/show_bug.cgi?id=1557371#c0
https://fedoraproject.org/wiki/Changes/java-openjdk-10

View File

@ -99,8 +99,13 @@ diff --git openjdk/make/lib/Lib-jdk.crypto.ec.gmk openjdk/make/lib/Lib-jdk.crypt
#
# On sol-sparc...all libraries are compiled with -xregs=no%appl
# (set in CFLAGS_REQUIRED_sparc)
@@ -60,7 +66,7 @@
LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
@@ -57,10 +63,11 @@
DISABLED_WARNINGS_gcc := sign-compare, \
DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \
MAPFILE := $(TOPDIR)/make/mapfiles/libsunec/mapfile-vers, \
- LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
+ LDFLAGS := $(subst -Xlinker --as-needed,, \
+ $(subst -Wl$(COMMA)--as-needed,, $(LDFLAGS_JDKLIB))) $(LDFLAGS_CXX_JDK), \
LDFLAGS_macosx := $(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS := $(LIBCXX), \
- LIBS_linux := -lc, \

View File

@ -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,6 +32,7 @@ if [ ! "x$PR2126" = "x" ] ; then
exit 1
fi
fi
set -e
OPENJDK_URL_DEFAULT=http://hg.openjdk.java.net
@ -39,8 +47,8 @@ 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)"
echo "REPOS - specify the repositories to use (optional; defaults to ${REPOS_DEFAULT})"
exit 1;
fi
@ -87,10 +95,15 @@ 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 "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "${FILE_NAME_ROOT} exists, reusing !!!!!!!"
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
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}"
@ -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-10.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-10.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."

View File

@ -1,25 +0,0 @@
#!/bin/bash
VERSION=3506c375241e
ICEDTEA_URL=http://icedtea.classpath.org/hg/icedtea7/
wget -O icedtea7.tar.gz ${ICEDTEA_URL}/archive/${VERSION}.tar.gz
tar xzf icedtea7.tar.gz
rm -f icedtea7.tar.gz
pushd icedtea7-${VERSION}
# desktop files
#mv jconsole.desktop ../jconsole.desktop.in
#mv policytool.desktop ../policytool.desktop.in
# Icons were generally cloned fromicedtea, but now are mucvh more specific
# tapsets
mv tapset/hotspot{,-1.8.0}.stp.in || exit 1
mv tapset/hotspot_gc{,-1.8.0}.stp.in || exit 1
mv tapset/hotspot_jni{,-1.8.0}.stp.in || exit 1
mv tapset/jstack{,-1.8.0}.stp.in || exit 1
tar cvzf systemtap-tapset.tar.gz tapset
mv systemtap-tapset.tar.gz ../
popd
rm -rf icedtea7-${VERSION}

View File

@ -1,6 +1,29 @@
# RPM conditionals so as to be able to dynamically produce
# slowdebug/release builds. See:
# http://rpm.org/user_doc/conditional_builds.html
#
# Examples:
#
# Produce release *and* slowdebug builds on x86_64 (default):
# $ rpmbuild -ba java-1.8.0-openjdk.spec
#
# Produce only release builds (no slowdebug builds) on x86_64:
# $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug
#
# Only produce a release build on x86_64:
# $ fedpkg mockbuild --without slowdebug
#
# Only produce a debug build on x86_64:
# $ fedpkg local --without release
#
# Enable slowdebug builds by default on relevant arches.
%bcond_without slowdebug
# Enable release builds by default on relevant arches.
%bcond_without release
# note: parametrized macros are order-sensitive (unlike not-parametrized) even with normal macros
# also necessary when passing it as parameter to other macros. If not macro, then it is considered a switch
# see the difference between global and deffine:
# see the difference between global and define:
# See https://github.com/rpm-software-management/rpm/issues/127 to comments at "pmatilai commented on Aug 18, 2017"
# (initiated in https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
%global debug_suffix_unquoted -slowdebug
@ -13,8 +36,12 @@
%global debug_on with full debug on
%global for_debug for packages with debug on
# by default we build normal build
%if %{with release}
%global include_normal_build 1
%else
%global include_normal_build 0
%endif
%if %{include_normal_build}
%global build_loop1 %{normal_suffix}
%else
@ -30,6 +57,7 @@
%global aot_arches x86_64
# By default, we build a debug build during main build on JIT architectures
%if %{with slowdebug}
%ifarch %{jit_arches}
%ifnarch %{arm}
%global include_debug_build 1
@ -39,6 +67,9 @@
%else
%global include_debug_build 0
%endif
%else
%global include_debug_build 0
%endif
%if %{include_debug_build}
%global build_loop2 %{debug_suffix}
@ -64,8 +95,9 @@
%global targets all docs
%endif
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
# We filter out -O flags so that the optimisation of HotSpot is not lowered from O3 to O2
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to O2
# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs)
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++
@ -74,7 +106,7 @@
%global ourldflags %{__global_ldflags}
# With disabled nss is NSS deactivated, so NSS_LIBDIR can contain the wrong path
# the initialisation must be here. Later the pkg-config have buggy behaviour
# the initialization must be here. Later the pkg-config have buggy behavior
# looks like openjdk RPM specific bug
# Always set this so the nss.cfg file is not broken
%global NSS_LIBDIR %(pkg-config --variable=libdir nss)
@ -88,8 +120,12 @@
%global NSS_BUILDTIME_VERSION %(if [ "x%{NSS_BUILDTIME_NUMBER}" == "x" ] ; then echo "" ;else echo ">= %{NSS_BUILDTIME_NUMBER}" ;fi)
# fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349
%global _privatelibs libjsoundalsa[.]so.*|libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libjsig[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas_unix[.]so.*|libjava[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libverify[.]so.*|libzip[.]so.*
# Fix for https://bugzilla.redhat.com/show_bug.cgi?id=1111349.
# See also https://bugzilla.redhat.com/show_bug.cgi?id=1590796
# as to why some libraries *cannot* be excluded. In particular,
# these are:
# libjsig.so, libjava.so, libjawt.so, libjvm.so and libverify.so
%global _privatelibs libjsoundalsa[.]so.*|libsplashscreen[.]so.*|libawt_xawt[.]so.*|libjli[.]so.*|libattach[.]so.*|libawt[.]so.*|libextnet[.]so.*|libawt_headless[.]so.*|libdt_socket[.]so.*|libfontmanager[.]so.*|libinstrument[.]so.*|libj2gss[.]so.*|libj2pcsc[.]so.*|libj2pkcs11[.]so.*|libjaas_unix[.]so.*|libjavajpeg[.]so.*|libjdwp[.]so.*|libjimage[.]so.*|libjsound[.]so.*|liblcms[.]so.*|libmanagement[.]so.*|libmanagement_agent[.]so.*|libmanagement_ext[.]so.*|libmlib_image[.]so.*|libnet[.]so.*|libnio[.]so.*|libprefs[.]so.*|librmi[.]so.*|libsaproc[.]so.*|libsctp[.]so.*|libsunec[.]so.*|libunpack[.]so.*|libzip[.]so.*|lib[.]so\\(SUNWprivate_.*
%global __provides_exclude ^(%{_privatelibs})$
%global __requires_exclude ^(%{_privatelibs})$
@ -150,21 +186,20 @@
# New Version-String scheme-style defines
%global majorver 10
%global securityver 1
%global securityver 2
# Standard JPackage naming and versioning defines
%global origin openjdk
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
%global minorver 0
%global buildver 10
%global buildver 13
# priority must be 7 digits in total
# setting to 1, so debug ones can have 0
%global priority 00000%{minorver}1
%global newjavaver %{majorver}.%{minorver}.%{securityver}
%global javaver %{majorver}
%global systemtap_javaver 9
# parametrized macros are order-sensitive
%global compatiblename java-%{majorver}-%{origin}
@ -191,9 +226,9 @@
%if %{with_systemtap}
# Where to install systemtap tapset (links)
# We would like these to be in a package specific subdir,
# We would like these to be in a package specific sub-dir,
# but currently systemtap doesn't support that, so we have to
# use the root tapset dir for now. To distinquish between 64
# use the root tapset dir for now. To distinguish between 64
# and 32 bit architectures we place the tapsets under the arch
# specific dir (note that systemtap will only pickup the tapset
# for the primary arch for now). Systemtap uses the machine name
@ -273,7 +308,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
# see pretrans where this file is declared
# also see that pretrans is only for nondebug
# also see that pretrans is only for non-debug
if [ ! "%{?1}" == %{debug_suffix} ]; then
if [ -f %{_libexecdir}/copy_jdk_configs_fixFiles.sh ] ; then
sh %{_libexecdir}/copy_jdk_configs_fixFiles.sh %{rpm_state_dir}/%{name}.%{_arch} %{_jvmdir}/%{sdkdir -- %{?1}}
@ -474,7 +509,6 @@ exit 0
%define files_jre_headless() %{expand:
%defattr(-,root,root,-)
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%dir %{_sysconfdir}/.java/.systemPrefs
%dir %{_sysconfdir}/.java
@ -549,8 +583,8 @@ exit 0
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/client/
%ifarch %{jit_arches}
%ifnarch %{power64}
%attr(664, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/classes.jsa
%attr(664, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/client/classes.jsa
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/server/classes.jsa
%attr(444, root, root) %ghost %{_jvmdir}/%{sdkdir -- %{?1}}/lib/client/classes.jsa
%endif
%endif
%dir %{etcjavasubdir}
@ -582,14 +616,11 @@ exit 0
%config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties
%config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties
# accessibility have package over user maintainnce, so not config-norepalce
%config %{etcjavadir -- %{?1}}/conf/accessibility.properties
%{_jvmdir}/%{sdkdir -- %{?1}}/conf
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/security
}
%define files_devel() %{expand:
%defattr(-,root,root,-)
%dir %{_jvmdir}/%{sdkdir -- %{?1}}/bin
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/appletviewer
%{_jvmdir}/%{sdkdir -- %{?1}}/bin/idlj
@ -663,31 +694,26 @@ exit 0
}
%define files_jmods() %{expand:
%defattr(-,root,root,-)
%{_jvmdir}/%{sdkdir -- %{?1}}/jmods
}
%define files_demo() %{expand:
%defattr(-,root,root,-)
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%{_jvmdir}/%{sdkdir -- %{?1}}/demo
%{_jvmdir}/%{sdkdir -- %{?1}}/sample
}
%define files_src() %{expand:
%defattr(-,root,root,-)
%license %{_jvmdir}/%{sdkdir -- %{?1}}/legal
%{_jvmdir}/%{sdkdir -- %{?1}}/lib/src.zip
}
%define files_javadoc() %{expand:
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/legal
}
%define files_javadoc_zip() %{expand:
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/legal
}
@ -696,12 +722,13 @@ exit 0
%define java_rpo() %{expand:
Requires: fontconfig%{?_isa}
Requires: xorg-x11-fonts-Type1
# Requires rest of java
Requires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
OrderWithRequires: %{name}-headless%{?1}%{?_isa} = %{epoch}:%{version}-%{release}
# for java-X-openjdk package's desktop binding
Recommends: gtk3%{?_isa}
Provides: java-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
Provides: java-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
# Standard JPackage base provides
Provides: jre = %{javaver}%{?1}
@ -716,9 +743,9 @@ Provides: java%{?1} = %{epoch}:%{javaver}
%define java_headless_rpo() %{expand:
# Require /etc/pki/java/cacerts
Requires: ca-certificates
# Require javapackages-filesystem for ownership of /usr/lib/jvm/
# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
Requires: javapackages-filesystem
# Require zoneinfo data provided by tzdata-java sub-package
# Require zone-info data provided by tzdata-java sub-package
Requires: tzdata-java >= 2015d
# libsctp.so.1 is being `dlopen`ed on demand
Requires: lksctp-tools%{?_isa}
@ -738,6 +765,8 @@ Requires(post): chkconfig >= 1.7
Requires(postun): %{_sbindir}/alternatives
# in version 1.7 and higher for --family switch
Requires(postun): chkconfig >= 1.7
# for optional support of kernel stream control, card reader and printing bindings
Suggests: lksctp-tools%{?_isa}, pcsc-lite-devel%{?_isa}, cups
# Standard JPackage base provides
Provides: jre-headless%{?1} = %{epoch}:%{javaver}
@ -781,7 +810,7 @@ Provides: java-%{javaver}-%{origin}-devel%{?1} = %{epoch}:%{version}
%define java_jmods_rpo() %{expand:
# Requires devel package
# as jmods are bytecode, they should be ok without any _isa
# as jmods are bytecode, they should be OK without any _isa
Requires: %{name}-devel%{?1} = %{epoch}:%{version}-%{release}
OrderWithRequires: %{name}-headless%{?1} = %{epoch}:%{version}-%{release}
@ -832,7 +861,7 @@ Provides: java-%{javaver}-%{origin}-src%{?1} = %{epoch}:%{version}-%{release}
Name: java-%{origin}
Version: %{newjavaver}.%{buildver}
Release: 11%{?dist}
Release: 8%{?dist}
# 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
@ -860,13 +889,11 @@ Group: Development/Languages
License: ASL 1.1 and ASL 2.0 and BSD and BSD with advertising and GPL+ and GPLv2 and GPLv2 with exceptions and IJG and LGPLv2+ and MIT and MPLv2.0 and Public Domain and W3C and zlib
URL: http://openjdk.java.net/
Source0: jdk-updates-jdk%{majorver}u-jdk-%{newjavaver}+%{buildver}.tar.xz
# Use 'generate_tarballs.sh' to generate the following tarballs
# They are based on code contained in the IcedTea7 project
# Systemtap tapsets. Zipped up to keep it small
Source8: systemtap-tapset-3.6.0pre02.tar.xz
# 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
Source0: jdk-updates-jdk%{majorver}u-jdk-%{newjavaver}+%{buildver}.tar.xz
Source8: systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz
# Desktop files. Adapted from IcedTea
Source9: jconsole.desktop.in
@ -917,22 +944,6 @@ Patch100: JDK-8201495-s390-java-opts.patch
Patch101: sorted-diff.patch
# Type fixing for s390 (Zero). Not upstream.
Patch102: java-openjdk-s390-size_t.patch
# bootcycle-images target may run out of ressources
# due to bad jobs config. Missing backports.
Patch103: JDK-8201788-bootcycle-images-jobs.patch
# s390 (Zero) build fix. Pending upstream.
Patch104: JDK-8201509-s390-atomic_store.patch
# libjsig.so does not receive extra ld flags when
# being built. Not an issue on JDK 11. Missing fix for
# 10 upstream.
Patch105: JDK-8202262-libjsig.so-extra-link-flags.patch
# NPE from JarFileSystem.getVersionMap. Fixed in JDK 11,
# not backported to JDK 10. See RHBZ#1557375 for the
# downstream issue. Not applicable for JDK 8.
Patch106: JDK-8193802-npe-jar-getVersionMap.patch
# aarch64 slowdebug build fix. Pending upstream
Patch400: JDK-8200556-aarch64-slowdebug-crash.patch
BuildRequires: autoconf
BuildRequires: automake
@ -940,14 +951,14 @@ BuildRequires: alsa-lib-devel
BuildRequires: binutils
BuildRequires: cups-devel
BuildRequires: desktop-file-utils
# elfutils only are ok for build without AOT
# elfutils only are OK for build without AOT
BuildRequires: elfutils-devel
BuildRequires: fontconfig
BuildRequires: freetype-devel
BuildRequires: giflib-devel
BuildRequires: gcc-c++
BuildRequires: gdb
BuildRequires: gtk2-devel
BuildRequires: gtk3-devel
BuildRequires: lcms2-devel
BuildRequires: libjpeg-devel
BuildRequires: libpng-devel
@ -962,9 +973,7 @@ BuildRequires: nss-devel
BuildRequires: pkgconfig
BuildRequires: xorg-x11-proto-devel
BuildRequires: zip
# since we require only javapackages-filesystem we have to require whole javapackages-tools in build-time to have various _jvm macros expanded
# note, that this dependency is bringing current main JDK into buildroot
BuildRequires: javapackages-tools
BuildRequires: javapackages-filesystem
BuildRequires: java-openjdk-devel
# Zero-assembler build requirement
%ifnarch %{jit_arches}
@ -1098,7 +1107,8 @@ Group: Development/Languages
%{java_src_rpo %{nil}}
%description src
The java-%{origin}-src sub-package contains the complete %{origin_nice} %{majorver} class library source code for use by IDE indexers and debuggers.
The java-%{origin}-src sub-package contains the complete %{origin_nice} %{majorver}
class library source code for use by IDE indexers and debuggers.
%endif
%if %{include_debug_build}
@ -1109,7 +1119,8 @@ Group: Development/Languages
%{java_src_rpo -- %{debug_suffix_unquoted}}
%description src-slowdebug
The java-%{origin}-src-slowdebug sub-package contains the complete %{origin_nice} %{majorver} class library source code for use by IDE indexers and debuggers. Debugging %{for_debug}.
The java-%{origin}-src-slowdebug sub-package contains the complete %{origin_nice} %{majorver}
class library source code for use by IDE indexers and debuggers. Debugging %{for_debug}.
%endif
%if %{include_normal_build}
@ -1175,7 +1186,7 @@ else
exit 12
fi
if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
echo "You have disabled both include_debug_build and include_debug_build. That is a no go."
echo "You have disabled both include_debug_build and include_normal_build. That is a no go."
exit 13
fi
%setup -q -c -n %{uniquesuffix ""} -T -a 0
@ -1199,12 +1210,6 @@ pushd %{top_level_dir_name}
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch400 -p1
popd # openjdk
@ -1212,7 +1217,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
@ -1220,7 +1225,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:%{systemtap_javaver}\.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}
@ -1256,7 +1261,7 @@ sed -e "s:@NSS_LIBDIR@:%{NSS_LIBDIR}:g" %{SOURCE11} > nss.cfg
%build
# How many cpu's do we have?
# How many CPU's do we have?
export NUM_PROC=%(/usr/bin/getconf _NPROCESSORS_ONLN 2> /dev/null || :)
export NUM_PROC=${NUM_PROC:-1}
%if 0%{?_smp_ncpus_max}
@ -1295,6 +1300,9 @@ else
debugbuild=`echo $suffix | sed "s/-//g"`
fi
# Variable used in hs_err hook on build failures
top_dir_abs_path=$(pwd)/%{top_level_dir_name}
mkdir -p %{buildoutputdir -- $suffix}
pushd %{buildoutputdir -- $suffix}
@ -1331,7 +1339,7 @@ make \
LOG=trace \
WARNINGS_ARE_ERRORS="-Wno-error" \
CFLAGS_WARNINGS_ARE_ERRORS="-Wno-error" \
%{targets}
%{targets} || ( pwd; find $top_dir_abs_path -name "hs_err_pid*.log" | xargs cat && false )
make docs-zip
@ -1492,12 +1500,12 @@ pushd %{buildoutputdir $suffix}/images/%{jdkimage}
# Remove empty cacerts database
rm -f $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/security/cacerts
# Install cacerts symlink needed by some apps which hardcode the path
# Install cacerts symlink needed by some apps which hard-code the path
pushd $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir -- $suffix}/lib/security
ln -sf /etc/pki/java/cacerts .
popd
# Install versioned symlinks
# Install version-ed symlinks
pushd $RPM_BUILD_ROOT%{_jvmdir}
ln -sf %{sdkdir -- $suffix} %{jrelnk -- $suffix}
popd
@ -1548,12 +1556,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/.java/.systemPrefs
# copy samples next to demos; samples are mostly js files
cp -r %{top_level_dir_name}/src/sample $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/
pushd $RPM_BUILD_ROOT/%{_jvmdir}/%{sdkdir -- $suffix}/conf/
echo "#Config file to enable java-atk-wrapper" > accessibility.properties
echo "" >> accessibility.properties
echo "assistive_technologies=org.GNOME.Accessibility.AtkWrapper" >> accessibility.properties
echo "" >> accessibility.properties
popd
# moving config files to /etc
mkdir -p $RPM_BUILD_ROOT/%{etcjavadir -- $suffix}
@ -1582,7 +1584,7 @@ done
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue
-- see https://bugzilla.redhat.com/show_bug.cgi?id=1290388 for pretrans over pre
-- if copy-jdk-configs is in transaction, it installs in pretrans to temp
-- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in tranasction and so is
-- if copy_jdk_configs is in temp, then it means that copy-jdk-configs is in transaction and so is
-- preferred over one in %%{_libexecdir}. If it is not in transaction, then depends
-- whether copy-jdk-configs is installed or not. If so, then configs are copied
-- (copy_jdk_configs from %%{_libexecdir} used) or not copied at all
@ -1603,7 +1605,7 @@ local stat2 = posix.stat(SOURCE2, "type");
else
if (stat2 ~= nil) then
if (debug) then
print(SOURCE2 .." exists - copy-jdk-configs alrady installed and NOT in transation. Using.")
print(SOURCE2 .." exists - copy-jdk-configs already installed and NOT in transaction. Using.")
end;
package.path = package.path .. ";" .. SOURCE2
else
@ -1727,7 +1729,7 @@ require "copy_jdk_configs.lua"
# this puts huge file to /usr/share
# unluckily ti is really a documentation file
# and unluckily it really is archtecture-depndent, as ag aot and grail are now x86_64 only
# and unluckily it really is architecture-dependent, as eg. aot and grail are now x86_64 only
# same for debug variant
%files javadoc-zip
%{files_javadoc_zip %{nil}}
@ -1761,11 +1763,37 @@ require "copy_jdk_configs.lua"
%changelog
* Fri Jun 15 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-11
- Rename back to java-openjdk.
* Wed Aug 29 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.3.13-8
- Adjust system NSS patch, RHBZ-1565658-system-nss-SunEC.patch, so
as to account for -Wl,--as-needed default linker flag by filtering
it. Resolves RHBZ#1623399.
* Thu Jun 14 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-10
- Rename to java-10-openjdk.
* Thu Aug 23 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.3.13-6
- dissabled accessibility, fixed provides for main package's debug variant
- now buildrequires javapackages-filesystem as the issue with macros should be fixed
- moved to versionless tapsets
- many small tweeks from ojdk11
* Mon Jul 23 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.3.13-1
- updated to security jdk10+3.13
- deleted patch106 JDK-8193802-npe-jar-getVersionMap.patch
- deleted patch400 JDK-8200556-aarch64-slowdebug-crash.patch
- deleted patch104 JDK-8201509-s390-atomic_store.patch
- deleted patch103 JDK-8201788-bootcycle-images-jobs.patch
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1:10.0.1.10-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Jul 02 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-12
- Fix requires/provides filter. See RHBZ#1590796.
* Thu Jun 21 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-11
- Expose release/slowdebug builds being produced via conditionals.
* Wed Jun 20 2018 Jiri Vanek <jvanek@redhat.com> - 1:10.0.1.10-10
- Filter private provides/requires: 'lib.so(SUNWprivate_.*'
- jsa files changed to 444 to pass rpm verification
* Tue Jun 12 2018 Severin Gehwolf <sgehwolf@redhat.com> - 1:10.0.1.10-9
- Use proper private_libs expression for filtering requires/provides.

View File

@ -1,2 +1,2 @@
SHA512 (systemtap-tapset-3.6.0pre02.tar.xz) = 848f42ef7ca751e723fd50e3a6da14c0965ad4da37ea3331568658e27497b7a7e4b9aad3dedd264ad0bb5566c37a92302b905f10258a4e2c89dc4ba609e55481
SHA512 (jdk-updates-jdk10u-jdk-10.0.1+10.tar.xz) = e57810a4208bb12a6b37f5e8313e30c489e6611ec6be8e7a8fb3c0ae9f1842803a3775bc7cc1f597064444fb4fabae5798a4447712fbf547f7021dd0da384613
SHA512 (systemtap_3.2_tapsets_hg-icedtea8-9d464368e06d.tar.xz) = cf578221b77d8c7e019f69909bc86c419c5fb5e10bceba9592ff6e7f96887b0a7f07c9cefe90800975247a078785ca190fdec5c2d0f841bb447cee784b570f7d
SHA512 (jdk-updates-jdk10u-jdk-10.0.2+13.tar.xz) = e5de419cec42e376ce341126c64370211cb09f326cdfafc64cec52640d2a2780f3ee705d51b6d025af6ca74c1525ed8d4a9d9afbe5b45f9709dd4d2242f1af08

View File

@ -1,184 +1,71 @@
#!/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:
# PROJECT_NAME=jdk9
# REPO_NAME=jdk9
# 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
# this file contains defaults for currently generated source tarballs
set -e
if [ "x$PROJECT_NAME" = "x" ] ; then
PROJECT_NAME="jdk-updates"
fi
if [ "x$REPO_NAME" = "x" ] ; then
REPO_NAME="jdk10u"
fi
if [ "x$VERSION" = "x" ] ; then
VERSION="jdk-10.0.1+10"
# 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 ${TAPSET}
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
#if [ "x$PKG" = "x" ] ; then
# URL=`cat .git/config | grep url`
# PKG=${URL##*/}
#fi
if [ "x$SPEC" = "x" ] ; then
SPEC=${PKG}.spec
fi
if [ "x$RELEASE" = "x" ] ; then
RELEASE=1
fi
# OpenJDK from jdk10 updates project
export PROJECT_NAME="jdk-updates"
export REPO_NAME="jdk10u"
# warning, clonning without shenadnaoh suffix, you will clone pure jdk - thus without shenandaoh GC
export VERSION="jdk-10.0.2+13"
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}"
. ./generate_source_tarball.sh
sh ./generate_source_tarball.sh
else
echo "${FILENAME} already exists, using"
echo "exists exists exists exists exists exists exists "
echo "reusing reusing reusing reusing reusing reusing "
echo ${FILENAME}
fi
echo "nothing more TBD for 10!!"
exit 0
set +e
echo "Touching spec: $SPEC"
sed -i "s/^%global\s\+project.*/%global project ${PROJECT_NAME}/" $SPEC
sed -i "s/^%global\s\+repo.*/%global repo ${REPO_NAME}/" $SPEC
sed -i "s/^%global\s\+revision.*/%global revision ${VERSION}/" $SPEC
# updated sources, resetting release
sed -i "s/^Release:.*/Release: $RELEASE.%{buildver}%{?dist}/" $SPEC
#https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Bash
function levenshtein {
if [ "$#" -ne "2" ]; then
echo "Usage: $0 word1 word2" >&2
elif [ "${#1}" -lt "${#2}" ]; then
levenshtein "$2" "$1"
else
local str1len=$((${#1}))
local str2len=$((${#2}))
local d i j
for i in $(seq 0 $(((str1len+1)*(str2len+1)))); do
d[i]=0
done
for i in $(seq 0 $((str1len))); do
d[$((i+0*str1len))]=$i
done
for j in $(seq 0 $((str2len))); do
d[$((0+j*(str1len+1)))]=$j
done
for j in $(seq 1 $((str2len))); do
for i in $(seq 1 $((str1len))); do
[ "${1:i-1:1}" = "${2:j-1:1}" ] && local cost=0 || local cost=1
local del=$((d[(i-1)+str1len*j]+1))
local ins=$((d[i+str1len*(j-1)]+1))
local alt=$((d[(i-1)+str1len*(j-1)]+cost))
d[i+str1len*j]=$(echo -e "$del\n$ins\n$alt" | sort -n | head -1)
done
done
echo ${d[str1len+str1len*(str2len)]}
fi
}
# generate shenandoah hotspot
# that means supply the underlying script with new values
# to new filename.
MAIN_VERSION=$VERSION
if [ "x$VERSION" = "xtip" ] ; then
VERSION="tip"
else
#hardcoding version for anything else except tip
VERSION="aarch64-shenandoah-jdk8u131-b12-shenandoah-merge-2017-04-20"
fi
MAIN_REPO_NAME=$REPO_NAME
REPO_NAME=jdk8u-shenandoah
MAIN_FILE_NAME_ROOT=$FILE_NAME_ROOT
FILE_NAME_ROOT=${PROJECT_NAME}-${REPO_NAME}-${VERSION}
FILENAME_SH=${FILE_NAME_ROOT}.tar.${COMPRESSION}
REPOS="hotspot"
if [ ! -f ${FILENAME_SH} ] ; then
echo "Generating ${FILENAME_SH}"
. ./generate_source_tarball.sh
else
echo "${FILENAME_SH} already exists, using"
fi
sed -i "s/^Source1:.*/Source1: ${FILENAME_SH}/" $SPEC
git --no-pager diff $SPEC
# find the most similar sources name and replace it by newly generated one.
echo "Old sources"
cat sources
a_sources=`cat sources | sed "s/.*(//g" | sed "s/).*//g" | sed "s/.*\s\+//g"`
winner=""
winnerDistance=999999
for x in $a_sources ; do
distance=`levenshtein $x ${FILENAME}`
if [ $distance -lt $winnerDistance ] ; then
winner=$x
winnerDistance=$distance
fi
done
sum=`md5sum ${FILENAME}`
sed -i "s;.*$winner;$sum;" sources
# now shenandoah hotspot
winner=""
winnerDistance=999999
for x in $a_sources ; do
distance=`levenshtein $x ${FILENAME_SH}`
if [ $distance -lt $winnerDistance ] ; then
winner=$x
winnerDistance=$distance
fi
done
sum=`md5sum ${FILENAME_SH}`
sed -i "s;.*$winner;$sum;" sources
echo "New sources"
cat sources
a_sources=`cat sources | sed "s/.*(//g" | sed "s/).*//g" | sed "s/.*\s\+//g"`
echo " you can get inspired by following %changelog template:"
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"`
# See spec:
revision_helper=`echo ${MAIN_VERSION%-*}`
updatever=`echo ${revision_helper##*u}`
buildver=`echo ${MAIN_VERSION##*-}`
echo "* $spec_date $user_full_name <$user_name@redhat.com> - 1:1.8.0.$updatever-$RELEASE.$buildver"
echo "- updated to $MAIN_VERSION (from $PROJECT_NAME/$MAIN_REPO_NAME)"
echo "- updated to $VERSION (from $PROJECT_NAME/$REPO_NAME) of hotspot"
echo "- used $FILENAME as new sources"
echo "- used $FILENAME_SH as new sources for hotspot"
echo " execute:"
echo "fedpkg/rhpkg new-sources "$a_sources
echo " to upload sources"
echo "you can verify by fedpkg/rhpkg prep --arch XXXX on all architectures: x86_64 i386 i586 i686 ppc ppc64 ppc64le s390 s390x aarch64 armv7hl"
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"