From 745a16c448b55d836ad94f78885544266cdea455 Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Apr 04 2014 20:35:58 +0000 Subject: import java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.src.rpm --- diff --git a/.java-1.7.0-openjdk.metadata b/.java-1.7.0-openjdk.metadata index f5ecb39..e500587 100644 --- a/.java-1.7.0-openjdk.metadata +++ b/.java-1.7.0-openjdk.metadata @@ -1,4 +1,4 @@ +bab95f0194d79843fa3e6e01c9f9c972cae75dfd SOURCES/openjdk-icedtea-2.4.5.tar.xz fcc167de17354efb6e52cb387eb3e7dbb0316b53 SOURCES/class-rewriter.tar.gz 4708fedba257c5ba7aef6d416421bf207d190c5e SOURCES/systemtap-tapset-2013-10-02.tar.gz -241f89696fd5019bba8b98363c5091101ab602b3 SOURCES/openjdk-icedtea-2.4.3.tar.xz fb72b6b1f4735ad9b5799d0b5058b0b1dec67b17 SOURCES/pulseaudio.tar.gz diff --git a/SOURCES/FixPPC64StackOverflow.patch b/SOURCES/FixPPC64StackOverflow.patch deleted file mode 100644 index a205208..0000000 --- a/SOURCES/FixPPC64StackOverflow.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -r 0505a797849f src/os/linux/vm/os_linux.cpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Wed Oct 23 05:23:32 2013 +0100 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Thu Oct 24 14:21:47 2013 +0000 -@@ -4538,6 +4538,7 @@ - initial_time_count = os::elapsed_counter(); - pthread_mutex_init(&dl_mutex, NULL); - -+NOT_ZERO ( - // If the pagesize of the VM is greater than 8K determine the appropriate - // number of initial guard pages. The user can change this with the - // command line arguments, if needed. -@@ -4546,6 +4547,7 @@ - StackRedPages = 1; - StackShadowPages = round_to((StackShadowPages*Linux::vm_default_page_size()), vm_page_size()) / vm_page_size(); - } -+) - } - - // To install functions for atexit system call -@@ -4598,9 +4600,16 @@ - // size. Add a page for compiler2 recursion in main thread. - // Add in 2*BytesPerWord times page size to account for VM stack during - // class initialization depending on 32 or 64 bit VM. -+NOT_ZERO ( - os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed, - (size_t)(StackYellowPages+StackRedPages+StackShadowPages) * Linux::page_size() + - (2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::vm_default_page_size()); -+) -+ZERO_ONLY ( -+ os::Linux::min_stack_allowed = MAX2(os::Linux::min_stack_allowed, -+ (size_t)(StackYellowPages+StackRedPages+StackShadowPages+ -+ 2*BytesPerWord COMPILER2_PRESENT(+1)) * Linux::page_size()); -+) - - size_t threadStackSizeInBytes = ThreadStackSize * K; - if (threadStackSizeInBytes != 0 && diff --git a/SOURCES/java-1.7.0-openjdk-ppc-zero-hotspot.patch b/SOURCES/java-1.7.0-openjdk-ppc-zero-hotspot.patch deleted file mode 100644 index 7b6195b..0000000 --- a/SOURCES/java-1.7.0-openjdk-ppc-zero-hotspot.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2012-03-23 10:57:01.000000000 -0400 -+++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2012-03-23 10:57:00.000000000 -0400 -@@ -34,9 +34,9 @@ - define_pd_global(bool, DontYieldALot, false); - define_pd_global(intx, ThreadStackSize, 1664); - #ifdef _LP64 --define_pd_global(intx, VMThreadStackSize, 1024); -+define_pd_global(intx, VMThreadStackSize, 1664); - #else --define_pd_global(intx, VMThreadStackSize, 512); -+define_pd_global(intx, VMThreadStackSize, 1152); - #endif // _LP64 - define_pd_global(intx, CompilerThreadStackSize, 0); - define_pd_global(uintx, JVMInvokeMethodSlack, 8192); diff --git a/SOURCES/java-1.7.0-openjdk-ppc-zero-jdk.patch b/SOURCES/java-1.7.0-openjdk-ppc-zero-jdk.patch deleted file mode 100644 index 6dfcbd5..0000000 --- a/SOURCES/java-1.7.0-openjdk-ppc-zero-jdk.patch +++ /dev/null @@ -1,23 +0,0 @@ ---- openjdk/jdk/make/common/shared/Defs-java.gmk 2012-03-23 10:56:45.000000000 -0400 -+++ openjdk/jdk/make/common/shared/Defs-java.gmk 2012-03-23 10:56:45.000000000 -0400 -@@ -88,7 +88,7 @@ - - # 64-bit builds require a larger thread stack size. - ifeq ($(ARCH_DATA_MODEL), 32) -- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 -+ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1152 - else - JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1664 - endif -diff -up openjdk/corba/make/common/shared/Defs-java.gmk.ppc openjdk/corba/make/common/shared/Defs-java.gmk ---- openjdk/corba/make/common/shared/Defs-java.gmk.ppc 2012-03-24 11:44:34.450072733 +0100 -+++ openjdk/corba/make/common/shared/Defs-java.gmk 2012-03-24 11:44:53.300073137 +0100 -@@ -79,7 +79,7 @@ - - # 64-bit builds require a larger thread stack size. - ifeq ($(ARCH_DATA_MODEL), 32) -- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 -+ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1152 - else - JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1664 - endif diff --git a/SPECS/java-1.7.0-openjdk.spec b/SPECS/java-1.7.0-openjdk.spec index 1cd1f50..087b445 100644 --- a/SPECS/java-1.7.0-openjdk.spec +++ b/SPECS/java-1.7.0-openjdk.spec @@ -5,7 +5,7 @@ # conflicting) files in the -debuginfo package %undefine _missing_build_ids_terminate_build -%global icedtea_version 2.4.3 +%global icedtea_version 2.4.5 %global hg_tag icedtea-{icedtea_version} %global aarch64 aarch64 arm64 armv8 @@ -13,7 +13,7 @@ %global jit_arches %{ix86} x86_64 sparcv9 sparc64 -%global enable_nss 1 +%global enable_nss 0 # With diabled nss is NSS deactivated, so in NSS_LIBDIR can be wrong path # the initialisation must be here. LAter the pkg-connfig have bugy behaviour @@ -116,9 +116,9 @@ # Standard JPackage naming and versioning defines. %global origin openjdk -%global updatever 45 +%global updatever 51 #Fedora have an bogus 60 instead of updatever. Fix when updatever>=60 in version: -%global buildver 15 +%global buildver 31 # Keep priority on 6digits in case updatever>9 %global priority 1700%{updatever} %global javaver 1.7.0 @@ -159,7 +159,7 @@ Name: java-%{javaver}-%{origin} Version: %{javaver}.%{updatever} -Release: %{icedtea_version}.4%{?dist} +Release: %{icedtea_version}.5%{?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 @@ -204,7 +204,7 @@ Source5: class-rewriter.tar.gz # Systemtap tapsets. Zipped up to keep it small. # last update from http://icedtea.classpath.org/hg/icedtea7/file/8599fdfc398d/tapset -Source6: systemtap-tapset-2013-10-02.tar.gz +Source6: systemtap-tapset-2013-10-02.tar.gz # .desktop files. Source7: policytool.desktop @@ -256,13 +256,7 @@ Patch6: %{name}-debuginfo.patch # Add rhino support Patch100: rhino.patch - -# Patch for PPC/PPC64 -Patch106: %{name}-ppc-zero-jdk.patch -Patch107: %{name}-ppc-zero-hotspot.patch -Patch121: FixPPC64StackOverflow.patch - -Patch120: %{name}-freetype-check-fix.patch +Patch106: %{name}-freetype-check-fix.patch #Start of NSS patches # NSS/AES patch @@ -321,7 +315,6 @@ BuildRequires: libpng-devel BuildRequires: wget BuildRequires: libxslt BuildRequires: xorg-x11-proto-devel -BuildRequires: mercurial BuildRequires: ant BuildRequires: libXinerama-devel BuildRequires: rhino @@ -336,10 +329,10 @@ BuildRequires: at-spi-devel BuildRequires: gawk BuildRequires: pkgconfig >= 0.9.0 BuildRequires: xorg-x11-utils +BuildRequires: nss-devel # PulseAudio build requirements. %if %{with_pulseaudio} BuildRequires: pulseaudio-libs-devel >= 0.9.11 -BuildRequires: pulseaudio >= 0.9.11 %endif # Zero-assembler build requirement. %ifnarch %{jit_arches} @@ -358,15 +351,11 @@ BuildRequires: prelink BuildRequires: systemtap-sdt-devel %endif -# nss provider requirements -%if %{enable_nss} -BuildRequires: nss-devel -%endif - Requires: fontconfig Requires: xorg-x11-fonts-Type1 #requires rest of java Requires: %{name}-headless = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} # Standard JPackage base provides. @@ -416,7 +405,7 @@ Provides: jre-%{javaver}-%{origin}-headless = %{epoch}:%{version}-%{release} Provides: jre-%{origin}-headless = %{epoch}:%{version}-%{release} Provides: jre-%{javaver}-headless = %{epoch}:%{version}-%{release} Provides: java-%{javaver}-headless = %{epoch}:%{version}-%{release} -Provides: jre-headless = %{javaver} +Provides: jre-headless = %{epoch}:%{javaver} Provides: java-%{origin}-headless = %{epoch}:%{version}-%{release} Provides: java-headless = %{epoch}:%{javaver} # Standard JPackage extensions provides. @@ -440,6 +429,7 @@ Group: Development/Tools # Require base package. Requires: %{name} = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} # Post requires alternatives to install tool alternatives. Requires(post): %{_sbindir}/alternatives # Postun requires alternatives to uninstall tool alternatives. @@ -463,6 +453,7 @@ Summary: OpenJDK Demos Group: Development/Languages Requires: %{name} = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} %description demo The OpenJDK demos. @@ -482,6 +473,7 @@ Group: Documentation Requires: jpackage-utils BuildArch: noarch +OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} # Post requires alternatives to install javadoc alternative. Requires(post): %{_sbindir}/alternatives # Postun requires alternatives to uninstall javadoc alternative. @@ -498,6 +490,7 @@ The OpenJDK API documentation. Summary: OpenJDK accessibility connector Requires: java-atk-wrapper Requires: %{name} = %{epoch}:%{version}-%{release} +OrderWithRequires: %{name}-headless = %{epoch}:%{version}-%{release} %description accessibility Enables accessibility support in OpenJDK by using java-at-wrapper. This allows compatible at-spi2 based accessibility programs to work for AWT and Swing-based programs. @@ -565,16 +558,8 @@ tar xzf %{SOURCE9} %patch6 %endif - -%patch120 -%patch200 - -%ifarch ppc %{power64} -# PPC fixes %patch106 -%patch107 -%patch121 -%endif +%patch200 # NSS patches 1 %if %{enable_nss} @@ -586,10 +571,10 @@ tar xzf %{SOURCE9} %patch116 %endif -%ifarch %{jit_arches} %patch402 %patch403 -%endif + + %build # How many cpu's do we have? @@ -609,6 +594,8 @@ export ARCH_DATA_MODEL=64 export CFLAGS="$CFLAGS -mieee" %endif +export CFLAGS="$CFLAGS -fstack-protector-strong" + # Build the re-written rhino jar mkdir -p rhino/{old,new} @@ -670,13 +657,15 @@ make \ DISTRO_PACKAGE_VERSION="rhel-%{release}-%{_arch} u%{updatever}-b%{buildver}" \ JDK_UPDATE_VERSION=`printf "%02d" %{updatever}` \ JDK_BUILD_NUMBER=b`printf "%02d" %{buildver}` \ + JRE_RELEASE_VERSION=%{javaver}_`printf "%02d" %{updatever}`-b`printf "%02d" %{buildver}` \ MILESTONE="fcs" \ + ALT_PARALLEL_COMPILE_JOBS="$NUM_PROC" \ HOTSPOT_BUILD_JOBS="$NUM_PROC" \ STATIC_CXX="false" \ RHINO_JAR="$PWD/../rhino/rhino.jar" \ GENSRCDIR="$PWD/generated.build" \ - FT2_CFLAGS="-I/usr/include/freetype2 " \ - FT2_LIBS="-lfreetype " \ + FT2_CFLAGS="`pkg-config --cflags freetype2` " \ + FT2_LIBS="`pkg-config --libs freetype2` " \ DEBUG_CLASSFILES="true" \ DEBUG_BINARIES="true" \ STRIP_POLICY="no_strip" \ @@ -953,6 +942,171 @@ find $RPM_BUILD_ROOT%{_jvmdir}/%{sdkdir}/demo \ echo "" >> accessibility.properties popd +%pretrans headless -p +-- see https://bugzilla.redhat.com/show_bug.cgi?id=1038092 for whole issue + +local posix = require "posix" + +local currentjvm = "%{uniquesuffix}" +local jvmdir = "%{_jvmdir}" +local jvmDestdir = jvmdir +local origname = "%{name}" +local origjavaver = "%{javaver}" +--trasnform substitute names to lua patterns +--all percentages must be doubled for case of RPM escapingg +local name = string.gsub(string.gsub(origname, "%%-", "%%%%-"), "%%.", "%%%%.") +local javaver = string.gsub(origjavaver, "%%.", "%%%%.") +local arch ="%{_arch}" +local debug = false; + +local jvms = { } + +local caredFiles = {"jre/lib/calendars.properties", + "jre/lib/content-types.properties", + "jre/lib/flavormap.properties", + "jre/lib/logging.properties", + "jre/lib/net.properties", + "jre/lib/psfontj2d.properties", + "jre/lib/sound.properties", + "jre/lib/tz.properties", + "jre/lib/deployment.properties", + "jre/lib/deployment.config", + "jre/lib/security/US_export_policy.jar", + "jre/lib/security/java.policy", + "jre/lib/security/java.security", + "jre/lib/security/local_policy.jar", + "jre/lib/security/nss.cfg,", + "jre/lib/ext"} + +function splitToTable(source, pattern) + local i1 = string.gmatch(source, pattern) + local l1 = {} + for i in i1 do + table.insert(l1, i) + end + return l1 +end + +if (debug) then + print("started") +end; + +foundJvms = posix.dir(jvmdir); +if (foundJvms == nil) then + if (debug) then + print("no, or nothing in "..jvmdir.." exit") + end; + return +end + +if (debug) then + print("found "..#foundJvms.."jvms") +end; + +for i,p in pairs(foundJvms) do +-- regex similar to %{_jvmdir}/%{name}-%{javaver}*%{_arch} bash command +--all percentages must be doubled for case of RPM escapingg + if (string.find(p, name.."%%-"..javaver..".*"..arch) ~= nil ) then + if (debug) then + print("matched: "..p) + end; + table.insert(jvms, p) + else + if (debug) then + print("NOT matched: "..p) + end; + end +end + +if (#jvms <=0) then + if (debug) then + print("no matching jdk in "..jvmdir.." exit") + end; + return +end; + +if (debug) then + print("matched "..#jvms.." jdk in "..jvmdir) +end; + +--full names are like java-1.7.0-openjdk-1.7.0.60-2.4.5.1.fc20.x86_64 +table.sort(jvms , function(a,b) +-- version-sort +-- split on non word: . - + local l1 = splitToTable(a, "[^%.-]+") + local l2 = splitToTable(b, "[^%.-]+") + for x = 1, math.min(#l1, #l2) do + local l1x = tonumber(l1[x]) + local l2x = tonumber(l2[x]) + if (l1x ~= nil and l2x ~= nil)then +--if hunks are numbers, go with them + if (l1x < l2x) then return true; end + if (l1x > l2x) then return false; end + else + if (l1[x] < l2[x]) then return true; end + if (l1[x] > l2[x]) then return false; end + end +-- if hunks are equals then move to another pair of hunks + end +return a /dev/null || : /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : @@ -1029,9 +1183,14 @@ exit 0 alternatives --remove jre_%{javaver} %{_jvmdir}/%{jredir} alternatives --remove jre_%{javaver}_%{origin} %{_jvmdir}/%{jrelnk} + # avoid unnecessary failure + if [ -e %{_jvmdir}/%{uniquesuffix} ] ; then + # as lua copied all necessary config files, we do not wont the double rpmnew and rpm.save + rm -rf %{_jvmdir}/%{uniquesuffix} + fi exit 0 -%posttrans +%posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : @@ -1293,6 +1452,61 @@ exit 0 %{_jvmdir}/%{jredir}/lib/accessibility.properties %changelog +* Fri Apr 04 2014 Jiri Vanek - 1.7.0.51-2.4.5.5.el7 +- added OrderWithRequires on headless where possible +- Resolves: rhbz#1038092 + +* Thu Mar 27 2014 Jiri Vanek - 1.7.0.51-2.4.5.3.el7 +- synced lua script from fedora. +- Resolves: rhbz#1038092 + +* Fri Mar 14 2014 Jiri Vanek - 1.7.0.51-2.4.5.2.el7 +- added fstack-protector-strong to CFLAGS +- Resolves: rhbz#1070816 + +* Thu Mar 06 2014 Jiri Vanek - 1.7.0.51-2.4.5.1.el7 +- diabled NSS. Missuisng 1038092 for it as it is in hurry. +- Related: rhbz#1038092 + +* Thu Jan 30 2014 Jiri Vanek - 1.7.0.51-2.4.5.0.el7 +- updated to icedtea 2.4.5 + sync with f21 + - http://blog.fuseyism.com/index.php/2014/01/29/icedtea-2-4-5-released/ +- removed buildRequires: pulseaudio >= 0.9.11, as not neccessary + - but kept libs-devel) +- removed upstreamed or unwonted patches (thanx to gnu_andrew to pointing them out) + - patch410 1015432.patch (upstreamed) + - patch411 1029588.patch + - patch412 zero-x32.diff + - patch104 java-1.7.0-ppc-zero-jdk.patch + - patch105 java-1.7.0-ppc-zero-hotspot.patch +- patch402 gstackbounds.patch and patch403 PStack-808293.patch applied always + (again thanx to gnu_andrew) +- merged other gnu_andrew's changes + - FT2_CFLAGS and FT2_LIBS hardoced values replaced by correct pkg-config calls + - buildver bumbed to 31 +- added build requires nss-devel +- removed build requires mercurial +- added JRE_RELEASE_VERSION and ALT_PARALLEL_COMPILE_JOBS into make call +- Related: rhbz1038092 + +* Tue Jan 28 2014 Daniel Mach - 1.7.0.51-2.4.4.1 +- Mass rebuild 2014-01-24 + +* Fri Jan 10 2014 Jiri Vanek - 1.7.0.51-2.4.4.0.el7 +- updated to security icedtea 2.4.4 + - icedtea_version set to 2.4.4 + - updatever bumped to 51 + - release reset to 0 +- sync with fedora + - added and applied patch411 1029588.patch (rh 1029588) + - added aand applied patch410, 1015432 (rh 1015432) + - and so removed patch121 FixPPC64StackOverflow.patch +- added patch412 zero-x32.diff to try to fix zero builds build +- Resolves: rhbz#1053280 + +* Fri Dec 27 2013 Daniel Mach - 1.7.0.45-2.4.3.5.el7 +- Mass rebuild 2013-12-27 + * Thu Oct 31 2013 Jiri Vanek - 1.7.0.40-2.4.3.4.fel7 - Removed obsoletes for java-1.6.0-openjdk* , until decided its presence in el7 - Resolves:rhbz#1018680