From 1f3f4df79a1ab70b827f17a6628bb0294ec9e6a4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 14 2015 20:09:43 +0000 Subject: import java-1.6.0-openjdk-1.6.0.35-1.13.7.1.el7_1 --- diff --git a/.gitignore b/.gitignore index f3a18f1..85ac28b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ -SOURCES/icedtea6-1.13.6.tar.xz +SOURCES/icedtea6-1.13.7.tar.xz SOURCES/java-access-bridge-1.23.0.tar.bz2 -SOURCES/openjdk-6-src-b34-20_jan_2015-rhel.tar.xz +SOURCES/openjdk-6-src-b35-14_apr_2015-rhel.tar.xz diff --git a/.java-1.6.0-openjdk.metadata b/.java-1.6.0-openjdk.metadata index 1e854b0..67687da 100644 --- a/.java-1.6.0-openjdk.metadata +++ b/.java-1.6.0-openjdk.metadata @@ -1,3 +1,3 @@ -45482c5f0b52d49f338b059541b75a214c006560 SOURCES/icedtea6-1.13.6.tar.xz +a6aa43fcc2e76daebb72079032d097f525f99e48 SOURCES/icedtea6-1.13.7.tar.xz aa2c61cc73bad1e1a09e8843f341270f70921dbf SOURCES/java-access-bridge-1.23.0.tar.bz2 -f0ecba331385a38068dddcdc3926bb436157488e SOURCES/openjdk-6-src-b34-20_jan_2015-rhel.tar.xz +e9b8b30704dbb4d52b7046bc443f2eb152fc4a9b SOURCES/openjdk-6-src-b35-14_apr_2015-rhel.tar.xz diff --git a/SOURCES/add-final-location-rpaths.patch b/SOURCES/add-final-location-rpaths.patch new file mode 100644 index 0000000..3def45f --- /dev/null +++ b/SOURCES/add-final-location-rpaths.patch @@ -0,0 +1,147 @@ +Work in the presence of capabilities + +Include a hardcoded install path in RPATH in binaries. This is used +as fallback when $ORIGIN is ignored. $ORIGIN is ignored for when +linux capabilities are added to the binary. + +Fix launcher to treat the case where capabilities are set as +identical to a setuid binary: don't expect LD_LIBRARY_PATH to be +set. +diff -r b85872bd06da Makefile.am +--- a/Makefile.am Thu Apr 09 20:20:00 2015 +0100 ++++ b/Makefile.am Thu Apr 09 20:41:52 2015 +0100 +@@ -815,7 +815,8 @@ + BUILD_GCC=gcc$(GCC_SUFFIX) \ + BUILD_CXX=g++$(GCC_SUFFIX) \ + COMPILER_WARNINGS_FATAL="$(WERROR_STATUS)" \ +- UNLIMITED_CRYPTO="true" ++ UNLIMITED_CRYPTO="true" \ ++ INSTALL_LOCATION="${INSTALL_LOCATION}" + + if ENABLE_CACAO + ICEDTEA_ENV += \ +diff -r b85872bd06da patches/add-final-location-rpaths.patch +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ b/patches/add-final-location-rpaths.patch Thu Apr 09 20:41:52 2015 +0100 +@@ -0,0 +1,121 @@ ++diff -Nru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk ++--- openjdk.orig/corba/make/common/Defs-linux.gmk 2015-04-09 20:37:21.682577260 +0100 +++++ openjdk/corba/make/common/Defs-linux.gmk 2015-04-09 20:38:35.115295051 +0100 ++@@ -209,8 +209,8 @@ ++ # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. ++ # Try: 'readelf -d lib*.so' to see these settings in a library. ++ # ++- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN ++- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) +++ LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN:$(INSTALL_LOCATION)/jre/lib/$(LIBARCH) +++ LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/:$(INSTALL_LOCATION)/jre/lib/$(LIBARCH)%) ++ endif ++ ++ EXTRA_LIBS += -lc ++diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ++--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2015-04-09 20:37:21.962579996 +0100 +++++ openjdk/jdk/make/common/Defs-linux.gmk 2015-04-09 20:38:35.115295051 +0100 ++@@ -233,8 +233,8 @@ ++ # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. ++ # Try: 'readelf -d lib*.so' to see these settings in a library. ++ # ++- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN ++- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) +++ LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN:$(INSTALL_LOCATION)/jre/lib/$(LIBARCH) +++ LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/:$(INSTALL_LOCATION)/jre/lib/$(LIBARCH)%) ++ endif ++ ++ EXTRA_LIBS += -lc ++diff -Nru openjdk.orig/jdk/make/common/Program.gmk openjdk/jdk/make/common/Program.gmk ++--- openjdk.orig/jdk/make/common/Program.gmk 2015-04-09 20:37:28.862647438 +0100 +++++ openjdk/jdk/make/common/Program.gmk 2015-04-09 20:39:08.779624149 +0100 ++@@ -83,9 +83,10 @@ ++ endif ++ endif ++ ifeq ($(PLATFORM), linux) +++ LDFLAGS += -lcap ++ LDFLAGS += $(ZLIB_LIBS) -Wl,-z -Wl,origin ++ LDFLAGS += -Wl,--allow-shlib-undefined ++- LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli +++ LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli:$(INSTALL_LOCATION)/jre/lib/$(LIBARCH)/jli ++ endif ++ endif ++ ifeq ($(PLATFORM), windows) ++diff -Nru openjdk.orig/jdk/make/java/instrument/Makefile openjdk/jdk/make/java/instrument/Makefile ++--- openjdk.orig/jdk/make/java/instrument/Makefile 2015-04-09 02:19:17.000000000 +0100 +++++ openjdk/jdk/make/java/instrument/Makefile 2015-04-09 20:38:35.115295051 +0100 ++@@ -111,7 +111,7 @@ ++ ifeq ($(PLATFORM), linux) ++ LDFLAGS += -Wl,-z -Wl,origin ++ LDFLAGS += -Wl,--allow-shlib-undefined ++- LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli +++ LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli:$(INSTALL_LOCATION)/jre/lib/$(LIBARCH)/jli ++ endif ++ endif ++ ++diff -Nru openjdk.orig/jdk/src/solaris/bin/java_md.c openjdk/jdk/src/solaris/bin/java_md.c ++--- openjdk.orig/jdk/src/solaris/bin/java_md.c 2015-04-09 02:19:52.000000000 +0100 +++++ openjdk/jdk/src/solaris/bin/java_md.c 2015-04-09 20:38:35.115295051 +0100 ++@@ -39,6 +39,7 @@ ++ ++ #ifdef __linux__ ++ #include +++#include ++ #else ++ #include ++ #endif ++@@ -169,6 +170,19 @@ ++ return LIBARCHNAME; ++ } ++ +++#ifdef __linux +++static int +++have_caps() { +++ int have_cap = 0; +++ cap_t no_caps = cap_init(); +++ cap_t my_caps = cap_get_proc(); +++ have_cap = cap_compare(no_caps, my_caps); +++ cap_free(my_caps); +++ cap_free(no_caps); +++ return have_cap; +++} +++#endif +++ ++ void ++ CreateExecutionEnvironment(int *_argcp, ++ char ***_argvp, ++@@ -413,20 +427,24 @@ ++ ++ #ifdef __linux ++ /* ++- * On linux, if a binary is running as sgid or suid, glibc sets ++- * LD_LIBRARY_PATH to the empty string for security purposes. (In ++- * contrast, on Solaris the LD_LIBRARY_PATH variable for a ++- * privileged binary does not lose its settings; but the dynamic ++- * linker does apply more scrutiny to the path.) The launcher uses ++- * the value of LD_LIBRARY_PATH to prevent an exec loop. ++- * Therefore, if we are running sgid or suid, this function's ++- * setting of LD_LIBRARY_PATH will be ineffective and we should ++- * return from the function now. Getting the right libraries to ++- * be found must be handled through other mechanisms. +++ * On linux, if a binary is running as sgid or suid, or has +++ * capabilities set, glibc sets LD_LIBRARY_PATH to the empty +++ * string for security purposes. (In contrast, on Solaris the +++ * LD_LIBRARY_PATH variable for a privileged binary does not lose +++ * its settings; but the dynamic linker does apply more scrutiny +++ * to the path.) The launcher uses the value of LD_LIBRARY_PATH to +++ * prevent an exec loop. Therefore, if we are running sgid or +++ * suid, or have linux capabilities set, this function's setting +++ * of LD_LIBRARY_PATH will be ineffective and we should return +++ * from the function now. Getting the right libraries to be found +++ * must be handled through other mechanisms. ++ */ ++ if((getgid() != getegid()) || (getuid() != geteuid()) ) { ++ return; ++ } +++ if (have_caps()) { +++ return; +++ } ++ #endif ++ ++ /* runpath contains current effective LD_LIBRARY_PATH setting */ diff --git a/SPECS/java-1.6.0-openjdk.spec b/SPECS/java-1.6.0-openjdk.spec index 26793c1..fa6d9c9 100644 --- a/SPECS/java-1.6.0-openjdk.spec +++ b/SPECS/java-1.6.0-openjdk.spec @@ -7,10 +7,10 @@ %define debug 0 -%define icedteaver 1.13.6 +%define icedteaver 1.13.7 %define icedteasnapshot %{nil} -%define openjdkver 34 -%define openjdkdate 20_jan_2015 +%define openjdkver 35 +%define openjdkdate 14_apr_2015 %define genurl http://cvs.fedoraproject.org/viewcvs/devel/java-1.6.0-openjdk/ @@ -202,6 +202,9 @@ Patch6: %{name}-debuginfo.patch # This turns off the application of PR2125 by fsg.sh as # we do it ourselves ahead of time via generate-rhel-zip.sh Patch7: no_pr2125.patch +# This is a RHEL-specific patch to embed RHEL-specific paths +Patch10: add-final-location-rpaths.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -357,6 +360,7 @@ The OpenJDK API documentation. %setup -q -n icedtea6-%{icedteaver}%{icedteasnapshot} -T -D -a 2 %patch0 %patch7 -p1 +%patch10 -p1 cp %{SOURCE4} . @@ -379,7 +383,7 @@ export CFLAGS="$CFLAGS -mieee" --with-abs-install-dir=%{_jvmdir}/%{sdkdir} \ --with-rhino --with-parallel-jobs=$NUM_PROC --disable-lcms2 -make patch +make DISTRIBUTION_PATCHES=patches/add-final-location-rpaths.patch patch patch -l -p0 < %{PATCH3} patch -l -p0 < %{PATCH4} @@ -878,7 +882,16 @@ exit 0 %doc %{_javadocdir}/%{name} %changelog -* Thu Jan 22 2015 Andrew Hughes - 1:1.6.0.34-1.13.6.0.1 +* Fri Apr 10 2015 Andrew Hughes - 1:1.6.0.35-1.13.7.1 +- Repackaged source files +- Resolves: rhbz#1209067 + +* Thu Apr 09 2015 Andrew Hughes - 1:1.6.0.35-1.13.7.0 +- Update to IcedTea 1.13.7 +- Regenerate add-final-location-rpaths patch so as to be less disruptive. +- Resolves: rhbz#1209067 + +* Thu Jan 22 2015 Andrew Hughes - 1:1.6.0.34-1.13.6.1 - Update to latest 1.13.6 release candidate tarball - Fixes a number of issues found with b34: - * OJ51, PR2187: Sync patch for 4873188 with 7 version @@ -887,16 +900,18 @@ exit 0 - * OJ54, PR2182: 6911104 reintroduces test fragment removed in existing 6964018 backport - * S6730740, PR2186: Fix for 6729881 has apparently broken several 64 bit tests: "Bad address" - * S7031830, PR2183: bad_record_mac failure on TLSv1.2 enabled connection with SSLEngine -- Resolves: rhbz#1180292 +- Regenerate add-final-location-rpaths patch against new release. +- Resolves: rhbz#1180293 * Tue Jan 20 2015 Andrew Hughes - 1:1.6.0.34-1.13.6.0 - Update to IcedTea 1.13.6 - Remove upstream patch type_hsx23_patch4.patch. +- Regenerate add-final-location-rpaths patch against new release. - Apply pr2125.patch in generate_rhel_zip.sh to remove unwanted elliptic curves. - Add no_pr2125.patch to avoid repeating the procedure during the IcedTea build. - Avoid duplicating the OpenJDK build version by making more use of %%{openjdkver}. - Add US_export_policy.jar and local_policy.jar to packages. -- Resolves: rhbz#1180292 +- Resolves: rhbz#1180293 * Thu Oct 09 2014 Andrew Hughes - 1:1.6.0.33-1.13.5.0 - Update to IcedTea 1.13.5 @@ -906,13 +921,17 @@ exit 0 - Use xz for tarballs to reduce file size. - No need to explicitly disable system LCMS any more (bug fixed upstream). - Add icedteasnapshot to setup lines so they work with pre-release tarballs. -- Resolves: rhbz#1148901 +- Resolves: rhbz#1148902 * Mon Jul 14 2014 Jiri Vanek - 1:1.6.0.1-6.1.13.4 - moved to icedteaver 1.13.4 - moved to openjdkver b32 and openjdkdate 15_jul_2014 - added upstreamed patch patch9 rh1115580-unsyncHashMap.patch -- Resolves: rhbz#1115869 +- Resolves: rhbz#1115870 +- forwardported from rhel 6.6, patch10, add-final-location-rpaths.patch (rh1059925) + - Work when capabilities are set on the binary + - Include hardcoded install path as well as $ORIGIN in RPATH + - Don't Expect LD_LIBRARY_PATH to be set in the launcher * Tue May 20 2014 Jiri Vanek - 1:1.6.0.1-6.1.13.3 - updated to icedtea 1.13.3