Browse code

Use Java alternatives & rename to openjdk8

Change-Id: Ibeff3a47b026c1b96958079450bd84aae0bcd04c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2722
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George

harishspqr authored on 2017/05/23 03:36:07
Showing 26 changed files
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Ant contrib
2 2
 Name:		ant-contrib
3 3
 Version:	1.0b3
4
-Release:	10%{?dist}
4
+Release:	11%{?dist}
5 5
 License:	Apache
6 6
 URL:		http://ant-contrib.sourceforget.net
7 7
 Group:		Applications/System
... ...
@@ -10,12 +10,11 @@ Distribution: 	Photon
10 10
 BuildArch:      noarch
11 11
 Source0:	http://dl.bintray.com/vmware/photon_release_1.0_TP1_x86_64/%{name}-%{version}-src.tar.gz
12 12
 %define sha1 ant-contrib=b28d2bf18656b263611187fa9fbb95cec93d47c8
13
-%define java_macros_version 1.8.0.112-2%{?dist}
14
-BuildRequires: openjre >= %{java_macros_version}
15
-BuildRequires: openjdk >= %{java_macros_version}
16
-BuildRequires: apache-ant >= 1.9.6
17
-Requires: openjre >= %{java_macros_version}
18
-Requires: apache-ant >= 1.9.6
13
+BuildRequires: openjre8 >= %{JAVA8_VERSION}
14
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
15
+BuildRequires: apache-ant >= %{ANT_VERSION}
16
+Requires: openjre8 >= %{JAVA8_VERSION}
17
+Requires: apache-ant >= %{ANT_VERSION}
19 18
 %define _prefix /var/opt/ant-contrib
20 19
 
21 20
 %description
... ...
@@ -26,12 +25,13 @@ The Ant Contrib project is a collection of tasks for Apache Ant.
26 26
 find . -name '*.jar' -or -name '*.class' -exec rm -rf {} +
27 27
 
28 28
 %build
29
-export ANT_HOME=%{_ant_home}
30
-export JAVA_HOME=%{_java_home}
29
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
31 30
 mkdir -p -m 700 %{_prefix}
31
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
32 32
 $ANT_HOME/bin/ant -Ddist.dir="%{_prefix}" -Dproject.version="1.0b3" dist
33 33
 %install
34
-ANT_HOME=/var/opt/apache-ant-1.9.6
34
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
35
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
35 36
 ANT_CONTRIB_DIST_DIR=%{buildroot}%{name}-%{version}
36 37
 [ %{buildroot} != "/" ] && rm -rf %{buildroot}/*
37 38
 mkdir -p -m 700 %{buildroot}/var/opt
... ...
@@ -42,6 +42,8 @@ cd %{buildroot}/var/opt && tar xvzf %{_prefix}/ant-contrib-1.0b3-bin.tar.gz --wi
42 42
 %{_prefix}/lib/*.jar
43 43
 
44 44
 %changelog
45
+*   Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.0b3-11
46
+-   Renamed openjdk to openjdk8
45 47
 *   Fri Apr 07 2017 Divya Thaluru <dthaluru@vmware.com> 1.0b3-10
46 48
 -   Removed prebuilt binaries from source tar ball
47 49
 *   Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0b3-9
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Apache Ant
2 2
 Name:		apache-ant
3 3
 Version:	1.10.1
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	Apache
6 6
 URL:		http://ant.apache.org
7 7
 Group:		Applications/System
... ...
@@ -14,10 +14,9 @@ Source1:	http://hamcrest.googlecode.com/files/hamcrest-1.3.tar.gz
14 14
 %define sha1 hamcrest=f0ab4d66186b894a06d89d103c5225cf53697db3
15 15
 Source2:    http://dl.bintray.com/vmware/photon_sources/1.0/maven-ant-tasks-2.1.3.tar.gz
16 16
 %define sha1 maven-ant-tasks=f38c0cc7b38007b09638366dbaa4ee902d9c255b
17
-%define java_macros_version 1.8.0.112-2%{?dist}
18
-Requires: openjre >= %{java_macros_version}, python2
19
-BuildRequires: openjre >= %{java_macros_version}
20
-BuildRequires: openjdk >= %{java_macros_version}
17
+Requires: openjre8 >= %{JAVA8_VERSION}, python2
18
+BuildRequires: openjre8 >= %{JAVA8_VERSION}
19
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
21 20
 %define _prefix /var/opt/apache-ant-%{version}
22 21
 %define _bindir %{_prefix}/bin
23 22
 %define _libdir %{_prefix}/lib
... ...
@@ -32,13 +31,9 @@ tar xf %{SOURCE1} --no-same-owner
32 32
 tar xf %{SOURCE2} --no-same-owner
33 33
 %build
34 34
 ANT_DIST_DIR=/var/opt/apache-ant-%{version}
35
-
36 35
 cp -v ./hamcrest-1.3/hamcrest-core-1.3.jar ./lib/optional
37
-
36
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
38 37
 mkdir -p -m 700 $ANT_DIST_DIR
39
-
40
-export JAVA_HOME=%{_java_home}
41
-
42 38
 ./bootstrap.sh && ./build.sh -Ddist.dir=$ANT_DIST_DIR
43 39
 
44 40
 %install
... ...
@@ -72,6 +67,8 @@ echo 'export ANT_HOME=/var/opt/%{name}-%{version}' > %{buildroot}/etc/profile.d/
72 72
 %{_sysconfdir}/profile.d/%{name}.sh
73 73
 
74 74
 %changelog
75
+*	Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.1-2
76
+-	Renamed openjdk to openjdk8
75 77
 *   Mon Apr 17 2017 Chang Lee <changlee@vmware.com> 1.10.1-1
76 78
 -   Updated Apache Ant to 1.10.1
77 79
 *   Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-6
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Apache Maven
2 2
 Name:		apache-maven
3 3
 Version:	3.5.0
4
-Release:	1%{?dist}
4
+Release:	2%{?dist}
5 5
 License:	Apache
6 6
 URL:		http://maven.apache.org
7 7
 Group:		Applications/System
... ...
@@ -10,13 +10,12 @@ Distribution: 	Photon
10 10
 BuildArch:      x86_64
11 11
 Source0:	http://apache.mirrors.lucidnetworks.net//maven/source/%{name}-%{version}-src.tar.gz
12 12
 %define sha1 apache-maven=1730812af1cdd77493e269b371ef8ac536230c15
13
-
14
-%define java_macros_version 1.8.0.121-1%{?dist}
15
-Requires: openjre >= %{java_macros_version}
16
-BuildRequires: openjre >= %{java_macros_version}
17
-BuildRequires: openjdk >= %{java_macros_version}
18
-BuildRequires: apache-ant >= 1.9.6
13
+BuildRequires: openjre8 >= %{JAVA8_VERSION}
14
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
15
+BuildRequires: apache-ant >= %{ANT_VERSION}
19 16
 BuildRequires: wget >= 1.15
17
+Requires: openjre8 >= %{JAVA8_VERSION}
18
+Requires: which
20 19
 
21 20
 %define _prefix /var/opt/apache-maven-%{version}
22 21
 %define _bindir %{_prefix}/bin
... ...
@@ -32,9 +31,8 @@ The Maven package contains binaries for a build system
32 32
 
33 33
 %build
34 34
 MAVEN_DIST_DIR=%{_prefix}
35
-
36
-export JAVA_HOME=%{_java_home}
37
-export ANT_HOME=%{_ant_home}
35
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
36
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
38 37
 export PATH=$PATH:$ANT_HOME/bin
39 38
 source /etc/profile.d/apache-maven.sh
40 39
 
... ...
@@ -71,6 +69,8 @@ echo 'export MAVEN_OPTS=-Xms256m' >> %{buildroot}/etc/profile.d/%{name}.sh
71 71
 %exclude %{_libdir}/jansi-native
72 72
 
73 73
 %changelog
74
+*	Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.5.0-2
75
+-	Renamed openjdk to openjdk8
74 76
 *   Mon Apr 24 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.5.0-1
75 77
 -   Updated apache-maven to version 3.5.0
76 78
 *   Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.3.9-8
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Apache Tomcat
2 2
 Name:		apache-tomcat
3 3
 Version:	8.5.13
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	Apache
6 6
 URL:		http://tomcat.apache.org
7 7
 Group:		Applications/System
... ...
@@ -10,12 +10,11 @@ Distribution: 	Photon
10 10
 BuildArch:      noarch
11 11
 Source0:    http://apache.mirrors.ionfish.org/tomcat/tomcat-8/v%{version}/src/%{name}-%{version}-src.tar.gz
12 12
 %define sha1 apache-tomcat=a2097a08b023c363098917078d9a23bd7a3b6032
13
-%define java_macros_version 1.8.0.112-2%{?dist}
14
-BuildRequires: openjre >= %{java_macros_version}
15
-BuildRequires: openjdk >= %{java_macros_version}
16
-BuildRequires: apache-ant >= 1.9.6
17
-Requires: openjre >= %{java_macros_version}
18
-Requires: apache-ant >= 1.9.6
13
+BuildRequires: openjre8 >= %{JAVA8_VERSION}
14
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
15
+BuildRequires: apache-ant >= %{ANT_VERSION}
16
+Requires: openjre8 >= %{JAVA8_VERSION}
17
+Requires: apache-ant >= %{ANT_VERSION}
19 18
 
20 19
 %define _prefix /var/opt/%{name}-%{version}
21 20
 %define _bindir %{_prefix}/bin
... ...
@@ -33,8 +32,7 @@ find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name "
33 33
    -name "*.jar" -o -name "*.war" -o -name "*.zip" \) -delete
34 34
 
35 35
 %build
36
-export ANT_HOME=%{_ant_home}
37
-export JAVA_HOME=%{_java_home}
36
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
38 37
 mkdir -p -m 700 %{_prefix}
39 38
 $ANT_HOME/bin/ant -Dbase.path="." deploy dist-prepare dist-source javadoc
40 39
 
... ...
@@ -73,6 +71,8 @@ rm -rf %{buildroot}/*
73 73
 %{_webappsdir}/*
74 74
 
75 75
 %changelog
76
+*   Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 8.5.13-3
77
+-   Renamed openjdk to openjdk8
76 78
 *   Tue Apr 18 2017 Divya Thaluru <dthaluru@vmware.com> 8.5.13-2
77 79
 -   Added logic to package directories
78 80
 *   Mon Apr 10 2017 Divya Thaluru <dthaluru@vmware.com> 8.5.13-1
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Apache Commons Daemon
2 2
 Name:		commons-daemon
3 3
 Version:	1.0.15
4
-Release:	9%{?dist}
4
+Release:	10%{?dist}
5 5
 License:	Apache
6 6
 URL:		http://commons.apache.org/proper/commons-daemon
7 7
 Group:		Applications/System
... ...
@@ -10,12 +10,10 @@ Distribution: 	Photon
10 10
 BuildArch:      x86_64
11 11
 Source0:	http://apache.mesi.com.ar//commons/daemon/source/commons-daemon-1.0.15-src.tar.gz
12 12
 %define sha1 commons-daemon=ca6a448d1d214f714e214b35809a2117568970e3
13
-
14
-%define java_macros_version 1.8.0.112-2%{?dist}
15
-Requires: openjre >= %{java_macros_version}
16
-BuildRequires: openjre >= %{java_macros_version}
17
-BuildRequires: openjdk >= %{java_macros_version}
18
-BuildRequires: apache-ant >= 1.9.6
13
+BuildRequires: openjre8 >= %{JAVA8_VERSION}
14
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
15
+BuildRequires: apache-ant >= %{ANT_VERSION}
16
+Requires: openjre8 >= %{JAVA8_VERSION}
19 17
 
20 18
 %define _prefix /var/opt/%{name}-%{version}
21 19
 %define _bindir %{_prefix}/bin
... ...
@@ -27,9 +25,8 @@ The JNA package contains libraries for interop from Java to native libraries.
27 27
 
28 28
 %setup -q -n %{name}-%{version}-src
29 29
 %build
30
-ANT_HOME=%{_ant_home}
31
-export JAVA_HOME=%{_java_home}
32
-
30
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
31
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
33 32
 $ANT_HOME/bin/ant dist
34 33
 
35 34
 export CFLAGS=-m64
... ...
@@ -42,8 +39,8 @@ cd src/native/unix && ./configure && make
42 42
 cd $CURDIR
43 43
 
44 44
 %install
45
-
46
-ANT_HOME=%{_ant_home}
45
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
46
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
47 47
 DIST_DIR=%{buildroot}%{_prefix}
48 48
 
49 49
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
... ...
@@ -62,6 +59,8 @@ chmod -R 755 $DIST_DIR
62 62
 %{_prefix}/*.jar
63 63
 
64 64
 %changelog
65
+*   Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.0.15-10
66
+-   Renamed openjdk to openjdk8
65 67
 *   Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0.15-9
66 68
 -   use java rpm macros to determine versions
67 69
 *   Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0.15-8
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:	Jax WS Reference Implementation
2 2
 Name:		jaxws-ri
3 3
 Version:	2.2.10
4
-Release:	2%{?dist}
4
+Release:	3%{?dist}
5 5
 License:	CDDL-1.0, GPLv2
6 6
 URL:		http://jax-ws.java.net/%{version}
7 7
 Group:		Applications/System
... ...
@@ -10,7 +10,7 @@ Distribution: 	Photon
10 10
 BuildArch:      noarch
11 11
 Source0:	http://jax-ws.java.net/%{version}/%{name}-%{version}.tar.gz
12 12
 %define sha1 jaxws-ri=0f2f00cfd3783f94fa940cc8ef678d47fb748c8c
13
-Requires: openjre >= 1.8.0.45
13
+Requires: openjre8 >= 1.8.0.45
14 14
 
15 15
 %define _prefix /opt/%{name}-%{version}
16 16
 %define _bindir %{_prefix}/bin
... ...
@@ -47,6 +47,8 @@ rm -rf %{buildroot}/*
47 47
 %{_libdir}/plugins/*.jar
48 48
 
49 49
 %changelog
50
+*	Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 2.2.10-3
51
+-	Renamed openjdk to openjdk8
50 52
 *	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 2.2.10-2
51 53
 -	GA - Bump release of all rpms
52 54
 * 	Tue Feb 23 2016 Anish Swaminathan <anishs@vmware.com>  2.2.10-1
... ...
@@ -4,7 +4,7 @@
4 4
 Summary:        Java Native Access
5 5
 Name:           jna
6 6
 Version:        4.4.0
7
-Release:        3%{?dist}
7
+Release:        4%{?dist}
8 8
 License:        Apache
9 9
 URL:            http://github.com/twall/jna
10 10
 Group:          Applications/System
... ...
@@ -13,12 +13,10 @@ Distribution:   Photon
13 13
 BuildArch:      x86_64
14 14
 Source0:        https://github.com/java-native-access/jna/archive/%{version}/%{name}-%{version}.tar.gz
15 15
 %define sha1 jna=d9b54e98393a696f458468bc8f3167f701a9ea9f
16
-
17
-%define java_macros_version 1.8.0.112-2%{?dist}
18
-Requires: openjre >= %{java_macros_version}
19
-BuildRequires: openjre >= %{java_macros_version}
20
-BuildRequires: openjdk >= %{java_macros_version}
21
-BuildRequires: apache-ant >= 1.9.6
16
+BuildRequires: openjre8 >= %{JAVA8_VERSION}
17
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
18
+BuildRequires: apache-ant >= %{ANT_VERSION}
19
+Requires:      openjre8 >= %{JAVA8_VERSION}
22 20
 
23 21
 %define _prefix /var/opt/jna-4.4.0
24 22
 
... ...
@@ -37,17 +35,16 @@ Sources for JNA
37 37
 
38 38
 %setup -q
39 39
 %build
40
-ANT_HOME=%{_ant_home}
41
-export JAVA_HOME=%{_java_home}
42
-
40
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
41
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
43 42
 #disabling all tests
44 43
 $ANT_HOME/bin/ant -Dcflags_extra.native=-DNO_JAWT -Dtests.exclude-patterns="**/*.java" -Drelease=true
45 44
 #$ANT_HOME/bin/ant -Dcflags_extra.native=-DNO_JAWT -Dtests.exclude-patterns="**/LibraryLoadTest.java" -Drelease=true
46 45
 
47 46
 %install
48
-
49
-ANT_HOME=%{_ant_home}
50
-JNA_DIST_DIR=%{buildroot}%{_prefix}
47
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
48
+export ANT_HOME=/var/opt/apache-ant-%{ANT_VERSION}
49
+export JNA_DIST_DIR=%{buildroot}%{_prefix}
51 50
 
52 51
 [ %{buildroot} != "/"] && rm -rf %{buildroot}/*
53 52
 
... ...
@@ -73,6 +70,8 @@ $ANT_HOME/bin/ant -Ddist=$JNA_DIST_DIR dist -Drelease=true
73 73
 %{_prefix}/*.aar
74 74
 
75 75
 %changelog
76
+*   Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 4.4.0-4
77
+-   Renamed openjdk to openjdk8
76 78
 *   Tue Apr 25 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.0-3
77 79
 -   disable debuginfo temporarily - wait for x11 deps
78 80
 *   Tue Apr 04 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.0-2
... ...
@@ -1,7 +1,7 @@
1 1
 Name:          lightwave
2 2
 Summary:       VMware Lightwave
3 3
 Version:       1.2.1
4
-Release:       1%{?dist}
4
+Release:       2%{?dist}
5 5
 License:       Apache 2.0
6 6
 Group:         Applications/System
7 7
 Vendor:        VMware, Inc.
... ...
@@ -19,7 +19,7 @@ Requires:  e2fsprogs
19 19
 Requires:  gawk >= 4.1.3
20 20
 Requires:  krb5 >= 1.14
21 21
 Requires:  likewise-open >= 6.2.10
22
-Requires:  openjre >= 1.8.0.112
22
+Requires:  openjre8 >= %{JAVA8_VERSION}
23 23
 Requires:  openssl >= 1.0.2
24 24
 Requires:  lightwave-client = %{version}
25 25
 
... ...
@@ -36,7 +36,7 @@ BuildRequires: jansson-devel
36 36
 BuildRequires: jaxws-ri = 2.2.10
37 37
 BuildRequires: krb5-devel >= 1.14
38 38
 BuildRequires: likewise-open-devel >= 6.2.10
39
-BuildRequires: openjdk > 1.8.0.112
39
+BuildRequires: openjdk8 >= %{JAVA8_VERSION}
40 40
 BuildRequires: openssl-devel >= 1.0.2
41 41
 BuildRequires: python2-devel >= 2.7.8
42 42
 BuildRequires: sqlite-devel >= 3.14
... ...
@@ -51,6 +51,9 @@ VMware Lightwave Server
51 51
 %define _commons_daemon_home /var/opt/commons-daemon-1.0.15
52 52
 %define _tomcat_home /var/opt/apache-tomcat-8.5.13
53 53
 %define _jaxws_home /opt/jaxws-ri-2.2.10
54
+%define _java_home /usr/lib/jvm/OpenJDK-%{JAVA8_VERSION}
55
+%define _ant_home /var/opt/apache-ant-%{ANT_VERSION}
56
+%define _maven_home /var/opt/apache-maven-%{MAVEN_VERSION}
54 57
 
55 58
 %if 0%{?_likewise_open_prefix:1} == 0
56 59
 %define _likewise_open_prefix /opt/likewise
... ...
@@ -97,7 +100,7 @@ Requires: openssl >= 1.0.2
97 97
 Requires: jansson
98 98
 Requires: krb5 >= 1.14
99 99
 Requires: likewise-open >= 6.2.9
100
-Requires: openjdk >= 1.8.0.45
100
+Requires: openjdk8 >= %{JAVA8_VERSION}
101 101
 Requires: boost = 1.63.0
102 102
 Requires: lightwave-client-libs = %{version}-%{release}
103 103
 
... ...
@@ -1115,5 +1118,7 @@ fi
1115 1115
 # %doc ChangeLog README COPYING
1116 1116
 
1117 1117
 %changelog
1118
+*   Thu Jun 01 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.2.1-2
1119
+-   disable java macros and use java alternatives
1118 1120
 *   Mon May 22 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.2.1-1
1119 1121
 -   Initial - spec modified for Photon from lightwave git repo.
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Mesos
2 2
 Name:           mesos
3 3
 Version:        1.2.0
4
-Release:        1%{?dist}
4
+Release:        2%{?dist}
5 5
 License:        Apache
6 6
 URL:            http://mesos.apache.org
7 7
 Group:          Applications/System
... ...
@@ -10,8 +10,8 @@ Distribution:   Photon
10 10
 Source0:        http://www.apache.org/dist/%{name}/%{version}/%{name}-%{version}.tar.gz
11 11
 %define sha1    mesos=1d570504498c90697b690e3b221feba63d0a800b
12 12
 Patch0:         mesos-sysmacros.patch
13
-BuildRequires:  openjre >= 1.8.0.45
14
-BuildRequires:  openjdk >= 1.8.0.45
13
+BuildRequires:  openjre8 >= 1.8.0.45
14
+BuildRequires:  openjdk8 >= 1.8.0.45
15 15
 BuildRequires:  curl-devel
16 16
 BuildRequires:  apache-maven >= 3.3.3
17 17
 BuildRequires:  apr-devel >= 1.5.2
... ...
@@ -21,6 +21,7 @@ BuildRequires:  apr-util-devel >= 1.5.4
21 21
 BuildRequires:  subversion >= 1.8.13
22 22
 BuildRequires:  subversion-devel >= 1.8.13
23 23
 BuildRequires:  cyrus-sasl >= 2.1.26
24
+BuildRequires:	which
24 25
 BuildRequires:  python2 >= 2.6
25 26
 BuildRequires:  python2-libs
26 27
 BuildRequires:  python-xml
... ...
@@ -31,7 +32,7 @@ Requires:       apr >= 1.5.2
31 31
 Requires:       apr-util >= 1.5.4
32 32
 Requires:       cyrus-sasl >= 2.1.26
33 33
 Requires:       expat
34
-Requires:       openjre >= 1.8.0.45
34
+Requires:       openjre8 >= 1.8.0.45
35 35
 Requires:       subversion >= 1.8.13
36 36
 
37 37
 
... ...
@@ -100,6 +101,8 @@ find %{buildroot}%{_libdir} -name '*.la' -delete
100 100
 %exclude %{_libdir}/debug/
101 101
 
102 102
 %changelog
103
+*	Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.2.0-2
104
+-	Renamed openjdk to openjdk8
103 105
 *   Fri Mar 31 2017 Michelle Wang <michellew@vmware.com> 1.2.0-1
104 106
 -   Update package version
105 107
 *   Fri Mar 24 2017 Alexey Makhalov <amakhalov@vmware.com> 1.1.0-3
106 108
deleted file mode 100644
... ...
@@ -1,433 +0,0 @@
1
-+++ b/jdk/src/share/back/invoker.c	Mon Mar 21 11:24:09 2016 +0100
2
-@@ -211,6 +211,47 @@
3
-     return error;
4
- }
5
- 
6
-+/*
7
-+ * Delete global references from the request which got put there before a
8
-+ * invoke request was carried out. See fillInvokeRequest() and invoker invoke*()
9
-+ * impls.
10
-+ */
11
-+static void
12
-+deleteGlobalRefs(JNIEnv *env, InvokeRequest *request)
13
-+{
14
-+    void *cursor;
15
-+    jint argIndex = 0;
16
-+    jvalue *argument = request->arguments;
17
-+    jbyte argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor);
18
-+
19
-+    if (request->clazz != NULL) {
20
-+        tossGlobalRef(env, &(request->clazz));
21
-+    }
22
-+    if (request->instance != NULL) {
23
-+        tossGlobalRef(env, &(request->instance));
24
-+    }
25
-+    /* Delete global argument references */
26
-+    while (argIndex < request->argumentCount) {
27
-+        if ((argumentTag == JDWP_TAG(OBJECT)) ||
28
-+            (argumentTag == JDWP_TAG(ARRAY))) {
29
-+            if (argument->l != NULL) {
30
-+                tossGlobalRef(env, &(argument->l));
31
-+            }
32
-+        }
33
-+        argument++;
34
-+        argIndex++;
35
-+        argumentTag = nextArgumentTypeTag(&cursor);
36
-+    }
37
-+    /* Delete potentially saved return values */
38
-+    if ((request->invokeType == INVOKE_CONSTRUCTOR) ||
39
-+        (returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT)) ||
40
-+        (returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY))) {
41
-+        if (request->returnValue.l != NULL) {
42
-+            tossGlobalRef(env, &(request->returnValue.l));
43
-+        }
44
-+    }
45
-+}
46
-+
47
- static jvmtiError
48
- fillInvokeRequest(JNIEnv *env, InvokeRequest *request,
49
-                   jbyte invokeType, jbyte options, jint id,
50
-@@ -736,6 +777,13 @@
51
-         (void)outStream_writeObjectRef(env, &out, exc);
52
-         outStream_sendReply(&out);
53
-     }
54
-+
55
-+    /*
56
-+     * At this time, there's no need to retain global references on
57
-+     * arguments since the reply is processed. No one will deal with
58
-+     * this request ID anymore, so we must call deleteGlobalRefs().
59
-+     */
60
-+    deleteGlobalRefs(env, request);
61
- }
62
- 
63
- jboolean
64
-+++ b/jdk/test/com/sun/jdi/oom/@debuggeeVMOptions	Mon Mar 21 11:24:09 2016 +0100
65
-@@ -0,0 +1,1 @@
66
-+-Xmx40m
67
-\ No newline at end of file
68
-+++ b/jdk/test/com/sun/jdi/oom/OomDebugTest.java	Mon Mar 21 11:24:09 2016 +0100
69
-@@ -0,0 +1,312 @@
70
-+/*
71
-+ * Copyright (c) 2016 Red Hat Inc.
72
-+ *
73
-+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
74
-+ *
75
-+ * This code is free software; you can redistribute it and/or modify it
76
-+ * under the terms of the GNU General Public License version 2 only, as
77
-+ * published by the Free Software Foundation.
78
-+ *
79
-+ * This code is distributed in the hope that it will be useful, but WITHOUT
80
-+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
81
-+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
82
-+ * version 2 for more details (a copy is included in the LICENSE file that
83
-+ * accompanied this code).
84
-+ *
85
-+ * You should have received a copy of the GNU General Public License version
86
-+ * 2 along with this work; if not, write to the Free Software Foundation,
87
-+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
88
-+ *
89
-+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
90
-+ * or visit www.oracle.com if you need additional information or have any
91
-+ * questions.
92
-+ */
93
-+
94
-+/**
95
-+ *  @test
96
-+ *  @bug 4858370
97
-+ *  @summary JDWP: Memory Leak (global references not deleted after invokeMethod).
98
-+ *
99
-+ *  @author Severin Gehwolf <sgehwolf@redhat.com>
100
-+ *
101
-+ *  @library ..
102
-+ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
103
-+ *  @run compile -g OomDebugTest.java
104
-+ *  @run shell OomDebugTestSetup.sh
105
-+ *  @run main OomDebugTest OomDebugTestTarget test1
106
-+ *  @run main OomDebugTest OomDebugTestTarget test2
107
-+ *  @run main OomDebugTest OomDebugTestTarget test3
108
-+ *  @run main OomDebugTest OomDebugTestTarget test4
109
-+ *  @run main OomDebugTest OomDebugTestTarget test5
110
-+ */
111
-+import java.util.ArrayList;
112
-+import java.util.Collections;
113
-+import java.util.List;
114
-+
115
-+import com.sun.jdi.ArrayReference;
116
-+import com.sun.jdi.ArrayType;
117
-+import com.sun.jdi.ClassType;
118
-+import com.sun.jdi.Field;
119
-+import com.sun.jdi.InvocationException;
120
-+import com.sun.jdi.Method;
121
-+import com.sun.jdi.ObjectReference;
122
-+import com.sun.jdi.ReferenceType;
123
-+import com.sun.jdi.StackFrame;
124
-+import com.sun.jdi.VMOutOfMemoryException;
125
-+import com.sun.jdi.Value;
126
-+import com.sun.jdi.event.BreakpointEvent;
127
-+
128
-+/***************** Target program **********************/
129
-+
130
-+class OomDebugTestTarget {
131
-+
132
-+    OomDebugTestTarget() {
133
-+        System.out.println("DEBUG: invoked constructor");
134
-+    }
135
-+    static class FooCls {
136
-+        @SuppressWarnings("unused")
137
-+        private byte[] bytes = new byte[3000000];
138
-+    };
139
-+
140
-+    FooCls fooCls = new FooCls();
141
-+    byte[] byteArray = new byte[0];
142
-+
143
-+    void testMethod(FooCls foo) {
144
-+        System.out.println("DEBUG: invoked 'void testMethod(FooCls)', foo == " + foo);
145
-+    }
146
-+
147
-+    void testPrimitive(byte[] foo) {
148
-+        System.out.println("DEBUG: invoked 'void testPrimitive(byte[])', foo == " + foo);
149
-+    }
150
-+
151
-+    byte[] testPrimitiveArrRetval() {
152
-+        System.out.println("DEBUG: invoked 'byte[] testPrimitiveArrRetval()'");
153
-+        return new byte[3000000];
154
-+    }
155
-+
156
-+    FooCls testFooClsRetval() {
157
-+        System.out.println("DEBUG: invoked 'FooCls testFooClsRetval()'");
158
-+        return new FooCls();
159
-+    }
160
-+
161
-+    public void entry() {}
162
-+
163
-+    public static void main(String[] args){
164
-+        System.out.println("DEBUG: OomDebugTestTarget.main");
165
-+        new OomDebugTestTarget().entry();
166
-+    }
167
-+}
168
-+
169
-+/***************** Test program ************************/
170
-+
171
-+public class OomDebugTest extends TestScaffold {
172
-+
173
-+    private static final int TOTAL_TESTS = 1;
174
-+    private ReferenceType targetClass;
175
-+    private ObjectReference thisObject;
176
-+    private int failedTests;
177
-+    private final String testMethodName;
178
-+
179
-+    public OomDebugTest(String[] args) {
180
-+        super(args);
181
-+        if (args.length != 2) {
182
-+            throw new RuntimeException("Test failed unexpectedly.");
183
-+        }
184
-+        testMethodName = args[1];
185
-+    }
186
-+
187
-+    @Override
188
-+    protected void runTests() throws Exception {
189
-+        try {
190
-+            /*
191
-+             * Get to the top of entry()
192
-+             * to determine targetClass and mainThread
193
-+             */
194
-+            BreakpointEvent bpe = startTo("OomDebugTestTarget", "entry", "()V");
195
-+            targetClass = bpe.location().declaringType();
196
-+
197
-+            mainThread = bpe.thread();
198
-+
199
-+            StackFrame frame = mainThread.frame(0);
200
-+            thisObject = frame.thisObject();
201
-+            java.lang.reflect.Method m = findTestMethod();
202
-+            m.invoke(this);
203
-+        } catch (NoSuchMethodException e) {
204
-+            e.printStackTrace();
205
-+            failure();
206
-+        } catch (SecurityException e) {
207
-+            e.printStackTrace();
208
-+            failure();
209
-+        }
210
-+    }
211
-+
212
-+    private java.lang.reflect.Method findTestMethod()
213
-+            throws NoSuchMethodException, SecurityException {
214
-+        return OomDebugTest.class.getDeclaredMethod(testMethodName);
215
-+    }
216
-+
217
-+    private void failure() {
218
-+        failedTests++;
219
-+    }
220
-+
221
-+    /*
222
-+     * Test case: Object reference as method parameter.
223
-+     */
224
-+    @SuppressWarnings("unused") // called via reflection
225
-+    private void test1() throws Exception {
226
-+        System.out.println("DEBUG: ------------> Running " + testMethodName);
227
-+        try {
228
-+            Field field = targetClass.fieldByName("fooCls");
229
-+            ClassType clsType = (ClassType)field.type();
230
-+            Method constructor = getConstructorForClass(clsType);
231
-+            for (int i = 0; i < 15; i++) {
232
-+                @SuppressWarnings({ "rawtypes", "unchecked" })
233
-+                ObjectReference objRef = clsType.newInstance(mainThread,
234
-+                                                             constructor,
235
-+                                                             new ArrayList(0),
236
-+                                                             ObjectReference.INVOKE_NONVIRTUAL);
237
-+                invoke("testMethod", "(LOomDebugTestTarget$FooCls;)V", objRef);
238
-+            }
239
-+        } catch (InvocationException e) {
240
-+            handleFailure(e);
241
-+        }
242
-+    }
243
-+
244
-+    /*
245
-+     * Test case: Array reference as method parameter.
246
-+     */
247
-+    @SuppressWarnings("unused") // called via reflection
248
-+    private void test2() throws Exception {
249
-+        System.out.println("DEBUG: ------------> Running " + testMethodName);
250
-+        try {
251
-+            Field field = targetClass.fieldByName("byteArray");
252
-+            ArrayType arrType = (ArrayType)field.type();
253
-+
254
-+            for (int i = 0; i < 15; i++) {
255
-+                ArrayReference byteArrayVal = arrType.newInstance(3000000);
256
-+                invoke("testPrimitive", "([B)V", byteArrayVal);
257
-+            }
258
-+        } catch (VMOutOfMemoryException e) {
259
-+            defaultHandleOOMFailure(e);
260
-+        }
261
-+    }
262
-+
263
-+    /*
264
-+     * Test case: Array reference as return value.
265
-+     */
266
-+    @SuppressWarnings("unused") // called via reflection
267
-+    private void test3() throws Exception {
268
-+        System.out.println("DEBUG: ------------> Running " + testMethodName);
269
-+        try {
270
-+            for (int i = 0; i < 15; i++) {
271
-+                invoke("testPrimitiveArrRetval",
272
-+                       "()[B",
273
-+                       Collections.EMPTY_LIST,
274
-+                       vm().mirrorOfVoid());
275
-+            }
276
-+        } catch (InvocationException e) {
277
-+            handleFailure(e);
278
-+        }
279
-+    }
280
-+
281
-+    /*
282
-+     * Test case: Object reference as return value.
283
-+     */
284
-+    @SuppressWarnings("unused") // called via reflection
285
-+    private void test4() throws Exception {
286
-+        System.out.println("DEBUG: ------------> Running " + testMethodName);
287
-+        try {
288
-+            for (int i = 0; i < 15; i++) {
289
-+                invoke("testFooClsRetval",
290
-+                       "()LOomDebugTestTarget$FooCls;",
291
-+                       Collections.EMPTY_LIST,
292
-+                       vm().mirrorOfVoid());
293
-+            }
294
-+        } catch (InvocationException e) {
295
-+            handleFailure(e);
296
-+        }
297
-+    }
298
-+
299
-+    /*
300
-+     * Test case: Constructor
301
-+     */
302
-+    @SuppressWarnings({ "unused", "unchecked", "rawtypes" }) // called via reflection
303
-+    private void test5() throws Exception {
304
-+        System.out.println("DEBUG: ------------> Running " + testMethodName);
305
-+        try {
306
-+            ClassType type = (ClassType)thisObject.type();
307
-+            for (int i = 0; i < 15; i++) {
308
-+                type.newInstance(mainThread,
309
-+                                 findMethod(targetClass, "<init>", "()V"),
310
-+                                 new ArrayList(0),
311
-+                                 ObjectReference.INVOKE_NONVIRTUAL);
312
-+            }
313
-+        } catch (InvocationException e) {
314
-+            handleFailure(e);
315
-+        }
316
-+    }
317
-+
318
-+    private Method getConstructorForClass(ClassType clsType) {
319
-+        List<Method> methods = clsType.methodsByName("<init>");
320
-+        if (methods.size() != 1) {
321
-+            throw new RuntimeException("FAIL. Expected only one, the default, constructor");
322
-+        }
323
-+        return methods.get(0);
324
-+    }
325
-+
326
-+    private void handleFailure(InvocationException e) {
327
-+        // There is no good way to see the OOME diagnostic message in the target since the
328
-+        // TestScaffold might throw an exception while trying to print the stack trace. I.e
329
-+        // it might get a a VMDisconnectedException before the stack trace printing finishes.
330
-+        System.err.println("FAILURE: InvocationException caused by OOM");
331
-+        defaultHandleOOMFailure(e);
332
-+    }
333
-+
334
-+    private void defaultHandleOOMFailure(Exception e) {
335
-+        e.printStackTrace();
336
-+        failure();
337
-+    }
338
-+
339
-+    @SuppressWarnings({ "rawtypes", "unchecked" })
340
-+    void invoke(String methodName, String methodSig, Value value)
341
-+            throws Exception {
342
-+        List args = new ArrayList(1);
343
-+        args.add(value);
344
-+        invoke(methodName, methodSig, args, value);
345
-+    }
346
-+
347
-+    void invoke(String methodName,
348
-+                String methodSig,
349
-+                @SuppressWarnings("rawtypes") List args,
350
-+                Value value) throws Exception {
351
-+        Method method = findMethod(targetClass, methodName, methodSig);
352
-+        if ( method == null) {
353
-+            failure("FAILED: Can't find method: "
354
-+                    + methodName  + " for class = " + targetClass);
355
-+            return;
356
-+        }
357
-+        invoke(method, args, value);
358
-+    }
359
-+
360
-+    @SuppressWarnings({ "rawtypes", "unchecked" })
361
-+    void invoke(Method method, List args, Value value) throws Exception {
362
-+        thisObject.invokeMethod(mainThread, method, args, 0);
363
-+        System.out.println("DEBUG: Done invoking method via debugger.");
364
-+    }
365
-+
366
-+    Value fieldValue(String fieldName) {
367
-+        Field field = targetClass.fieldByName(fieldName);
368
-+        return thisObject.getValue(field);
369
-+    }
370
-+
371
-+    public static void main(String[] args) throws Exception {
372
-+        OomDebugTest oomTest = new OomDebugTest(args);
373
-+        oomTest.startTests();
374
-+        if (oomTest.failedTests > 0) {
375
-+            throw new RuntimeException(oomTest.failedTests
376
-+                                       + " of " + TOTAL_TESTS + " test(s) failed.");
377
-+        }
378
-+        System.out.println("All " + TOTAL_TESTS + " tests passed.");
379
-+    }
380
-+
381
-+}
382
-+++ b/jdk/test/com/sun/jdi/oom/OomDebugTestSetup.sh	Mon Mar 21 11:24:09 2016 +0100
383
-@@ -0,0 +1,46 @@
384
-+#!/bin/sh
385
-+#
386
-+# Copyright (c) 2016 Red Hat Inc.
387
-+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
388
-+#
389
-+# This code is free software; you can redistribute it and/or modify it
390
-+# under the terms of the GNU General Public License version 2 only, as
391
-+# published by the Free Software Foundation.
392
-+#
393
-+# This code is distributed in the hope that it will be useful, but WITHOUT
394
-+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
395
-+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
396
-+# version 2 for more details (a copy is included in the LICENSE file that
397
-+# accompanied this code).
398
-+#
399
-+# You should have received a copy of the GNU General Public License version
400
-+# 2 along with this work; if not, write to the Free Software Foundation,
401
-+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
402
-+#
403
-+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
404
-+# or visit www.oracle.com if you need additional information or have any
405
-+# questions.
406
-+#
407
-+
408
-+
409
-+if [ "${TESTSRC}" = "" ]
410
-+then
411
-+  echo "TESTSRC not set.  Test cannot execute.  Failed."
412
-+  exit 1
413
-+fi
414
-+echo "TESTSRC=${TESTSRC}"
415
-+
416
-+if [ "${TESTJAVA}" = "" ]
417
-+then
418
-+  echo "TESTJAVA not set.  Test cannot execute.  Failed."
419
-+  exit 1
420
-+fi
421
-+echo "TESTJAVA=${TESTJAVA}"
422
-+
423
-+if [ "${TESTCLASSES}" = "" ]
424
-+then
425
-+  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
426
-+  exit 1
427
-+fi
428
-+
429
-+cp ${TESTSRC}/@debuggeeVMOptions ${TESTCLASSES}/
430 1
deleted file mode 100644
... ...
@@ -1,53 +0,0 @@
1
-diff -r 6b81fd2227d1 -r 3334efeacd83 src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
2
-+++ b/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java	Fri Apr 01 06:04:05 2016 +0100
3
-@@ -174,15 +174,20 @@
4
-                     storeFile = new File(storeFileName);
5
-                     fis = getFileInputStream(storeFile);
6
-                 } else {
7
--                    String javaHome = props.get("javaHome");
8
--                    storeFile = new File(javaHome + sep + "lib" + sep
9
--                                                    + "security" + sep +
10
--                                                    "jssecacerts");
11
-+                    /* Check system cacerts DB first; /etc/pki/java/cacerts */
12
-+                    storeFile = new File(sep + "etc" + sep + "pki" + sep
13
-+                                         + "java" + sep + "cacerts");
14
-                     if ((fis = getFileInputStream(storeFile)) == null) {
15
-+                        String javaHome = props.get("javaHome");
16
-                         storeFile = new File(javaHome + sep + "lib" + sep
17
--                                                    + "security" + sep +
18
--                                                    "cacerts");
19
--                        fis = getFileInputStream(storeFile);
20
-+                                             + "security" + sep +
21
-+                                             "jssecacerts");
22
-+                        if ((fis = getFileInputStream(storeFile)) == null) {
23
-+                            storeFile = new File(javaHome + sep + "lib" + sep
24
-+                                                 + "security" + sep +
25
-+                                                 "cacerts");
26
-+                            fis = getFileInputStream(storeFile);
27
-+                        }
28
-                     }
29
-                 }
30
- 
31
-diff -r 6b81fd2227d1 -r 3334efeacd83 src/share/classes/sun/security/tools/KeyStoreUtil.java
32
-+++ b/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java	Fri Apr 01 06:04:05 2016 +0100
33
-@@ -87,9 +87,14 @@
34
-         throws Exception
35
-     {
36
-         String sep = File.separator;
37
--        File file = new File(System.getProperty("java.home") + sep
38
--                             + "lib" + sep + "security" + sep
39
--                             + "cacerts");
40
-+        /* Check system cacerts DB first; /etc/pki/java/cacerts */
41
-+        File file = new File(sep + "etc" + sep + "pki" + sep
42
-+                             + "java" + sep + "cacerts");
43
-+        if (!file.exists()) {
44
-+            file = new File(System.getProperty("java.home") + sep
45
-+                            + "lib" + sep + "security" + sep
46
-+                            + "cacerts");
47
-+        }
48
-         if (!file.exists()) {
49
-             return null;
50
-         }
51
-
52 1
deleted file mode 100644
... ...
@@ -1,11 +0,0 @@
1
-+++ b/jdk/make/CompileNativeLibraries.gmk       2017-04-07 22:31:57.454696913 +0000
2
-@@ -83,7 +83,7 @@
3
-
4
- include lib/ServiceabilityLibraries.gmk
5
-
6
--include lib/Awt2dLibraries.gmk
7
-+#include lib/Awt2dLibraries.gmk
8
-
9
- include lib/SoundLibraries.gmk
10
-
11 1
deleted file mode 100644
... ...
@@ -1,13 +0,0 @@
1
-diff --git a/src/share/native/sun/java2d/cmm/lcms/cmstypes.c b/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
2
-+++ openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
3
-@@ -1483,7 +1483,7 @@
4
-         if (!_cmsReadUInt32Number(io, &Offset)) goto Error;
5
- 
6
-         // Check for overflow
7
--        if (Offset < (SizeOfHeader + 8)) goto Error;
8
-+        if ((Offset + Len) > SizeOfTag + :sunglasses: goto Error;
9
- 
10
-         // True begin of the string
11
-         BeginOfThisString = Offset - SizeOfHeader - 8;
12
-
13 1
deleted file mode 100644
... ...
@@ -1,9 +0,0 @@
1
-#java rpm macros
2
-%_java_exports        /etc/profile.d/java-exports.sh
3
-%_java_home %( [[ -f "%{_java_exports}" ]] && echo `cat "%{_java_exports}" | grep -m1 JAVA_HOME | cut -d'=' -f2` )
4
-#ant
5
-%_ant_exports        /etc/profile.d/apache-ant.sh
6
-%_ant_home %( [[ -f "%{_ant_exports}" ]] && echo `cat "%{_ant_exports}" | grep -m1 ANT_HOME | cut -d'=' -f2` )
7
-#maven
8
-%_maven_exports        /etc/profile.d/apache-maven.sh
9
-%_maven_home %( [[ -f "%{_maven_exports}" ]] && echo `cat "%{_maven_exports}" | grep -m1 MAVEN_HOME | cut -d'=' -f2` )
10 1
deleted file mode 100644
... ...
@@ -1,223 +0,0 @@
1
-%define _use_internal_dependency_generator 0
2
-%global security_hardening none
3
-Summary:	OpenJDK 
4
-Name:		openjdk
5
-Version:	1.8.0.131
6
-Release:	1%{?dist}
7
-License:	GNU GPL
8
-URL:		https://openjdk.java.net
9
-Group:		Development/Tools
10
-Vendor:		VMware, Inc.
11
-Distribution:   Photon
12
-Source0:	http://anduin.linuxfromscratch.org/files/BLFS/OpenJDK/openjdk-%{version}.tar.bz2
13
-%define sha1 openjdk=ae01c24fe5247d5aa246a60c0272ba92188a7d55
14
-Source1:    macros.java
15
-Patch0:		disable-awt-lib.patch
16
-Patch1:		fix-lcms.patch 
17
-Patch2:		Fix-memory-leak.patch
18
-Patch3:		check-system-ca-certs.patch
19
-BuildRequires:  pcre-devel
20
-BuildRequires:	which
21
-BuildRequires:	zip
22
-BuildRequires:	unzip
23
-BuildRequires:  zlib-devel
24
-BuildRequires:	ca-certificates
25
-Requires:       openjre = %{version}-%{release}
26
-AutoReqProv: 	no
27
-%define bootstrapjdkversion 1.8.0.112
28
-%description
29
-The OpenJDK package installs java class library and javac java compiler. 
30
-
31
-%package	-n openjre
32
-Summary:	Java runtime environment
33
-AutoReqProv: 	no
34
-%description	-n openjre
35
-It contains the libraries files for Java runtime environment
36
-#%global __requires_exclude ^libgif.*$
37
-#%filter_from_requires ^libgif.*$
38
-
39
-%package		sample
40
-Summary:		Sample java applications. 
41
-Group:          Development/Languages/Java
42
-%description	sample
43
-It contains the Sample java applications.
44
-Requires:       %{name} = %{version}-%{release}
45
-
46
-%package		doc
47
-Summary:		Documentation and demo applications for openjdk
48
-Group:          Development/Languages/Java
49
-%description	doc
50
-It contains the documentation and demo applications for openjdk
51
-Requires:       %{name} = %{version}-%{release}
52
-
53
-%package 		src
54
-Summary:        OpenJDK Java classes for developers
55
-Group:          Development/Languages/Java
56
-%description	src
57
-This package provides the runtime library class sources. 
58
-Requires:       %{name} = %{version}-%{release}
59
-
60
-%prep -p exit
61
-%setup -q -n openjdk
62
-%patch0 -p1
63
-%patch1 -p1
64
-%patch2 -p1
65
-%patch3 -p1
66
-
67
-%build
68
-chmod a+x ./configure
69
-unset JAVA_HOME &&
70
-./configure \
71
-	FREETYPE_NOT_NEEDED=yes \
72
-	CUPS_NOT_NEEDED=yes \
73
-	--with-target-bits=64 \
74
-	--with-boot-jdk=/var/opt/OpenJDK-%bootstrapjdkversion-bin \
75
-	--enable-headful=no \
76
-	--with-cacerts-file=/var/opt/OpenJDK-%bootstrapjdkversion-bin/jre/lib/security/cacerts \
77
-	--with-extra-cxxflags="-Wno-error -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse" \
78
-	--with-extra-cflags="-std=gnu++98 -fno-delete-null-pointer-checks -Wno-error -fno-lifetime-dse" \
79
-	--with-stdc++lib=dynamic
80
-
81
-make \
82
-    DEBUG_BINARIES=true \
83
-    BUILD_HEADLESS_ONLY=yes \
84
-    OPENJDK_TARGET_OS=linux \
85
-    JAVAC_FLAGS=-g \
86
-    STRIP_POLICY=no_strip \
87
-    DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
88
-    CLASSPATH=/var/opt/OpenJDK-%bootstrapjdkversion-bin/jre \
89
-    POST_STRIP_CMD="" \
90
-    LOG=trace \
91
-    SCTP_WERROR=
92
-
93
-%install
94
-make DESTDIR=%{buildroot} install \
95
-	BUILD_HEADLESS_ONLY=yes \
96
-	OPENJDK_TARGET_OS=linux \
97
-	DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
98
-	CLASSPATH=/var/opt/OpenJDK-%bootstrapjdkversion-bin/jre
99
-
100
-install -vdm755 %{buildroot}/var/opt/OpenJDK-%{version}-bin
101
-chown -R root:root %{buildroot}/var/opt/OpenJDK-%{version}-bin
102
-mkdir -p %{buildroot}/etc/profile.d
103
-install -vdm755 %{buildroot}%{_rpmconfigdir}/macros.d
104
-install -m 644 %{SOURCE1} %{buildroot}/%{_rpmconfigdir}/macros.d/
105
-install -vdm644 %{buildroot}/etc/profile.d
106
-mv /usr/local/jvm/openjdk-1.8.0-internal/* %{buildroot}/var/opt/OpenJDK-%{version}-bin/
107
-
108
-cat >> %{buildroot}/etc/profile.d/java-exports.sh <<- "EOF"
109
-export CLASSPATH=.:/usr/share/java
110
-export JAVA_HOME=/var/opt/OpenJDK-%{version}-bin
111
-export PATH="$PATH:/var/opt/OpenJDK-%{version}-bin/bin:/var/opt/OpenJDK-%{version}-bin/jre/bin"
112
-EOF
113
-
114
-chmod a+x %{buildroot}/etc/profile.d/java-exports.sh
115
-
116
-%post
117
-source /etc/profile.d/java-exports.sh
118
-
119
-%clean
120
-rm -rf %{buildroot}/*
121
-
122
-%files
123
-%defattr(-,root,root)
124
-/var/opt/OpenJDK-%{version}-bin/ASSEMBLY_EXCEPTION
125
-/var/opt/OpenJDK-%{version}-bin/LICENSE
126
-/var/opt/OpenJDK-%{version}-bin/release
127
-/var/opt/OpenJDK-%{version}-bin/THIRD_PARTY_README
128
-/var/opt/OpenJDK-%{version}-bin/lib
129
-/var/opt/OpenJDK-%{version}-bin/include/
130
-/var/opt/OpenJDK-%{version}-bin/bin/extcheck
131
-/var/opt/OpenJDK-%{version}-bin/bin/idlj
132
-/var/opt/OpenJDK-%{version}-bin/bin/jar
133
-/var/opt/OpenJDK-%{version}-bin/bin/jarsigner
134
-/var/opt/OpenJDK-%{version}-bin/bin/java-rmi.cgi
135
-/var/opt/OpenJDK-%{version}-bin/bin/javac
136
-/var/opt/OpenJDK-%{version}-bin/bin/javadoc
137
-/var/opt/OpenJDK-%{version}-bin/bin/javah
138
-/var/opt/OpenJDK-%{version}-bin/bin/javap
139
-/var/opt/OpenJDK-%{version}-bin/bin/jcmd
140
-/var/opt/OpenJDK-%{version}-bin/bin/jconsole
141
-/var/opt/OpenJDK-%{version}-bin/bin/jdb
142
-/var/opt/OpenJDK-%{version}-bin/bin/jdeps
143
-/var/opt/OpenJDK-%{version}-bin/bin/jhat
144
-/var/opt/OpenJDK-%{version}-bin/bin/jinfo
145
-/var/opt/OpenJDK-%{version}-bin/bin/jjs
146
-/var/opt/OpenJDK-%{version}-bin/bin/jmap
147
-/var/opt/OpenJDK-%{version}-bin/bin/jps
148
-/var/opt/OpenJDK-%{version}-bin/bin/jrunscript
149
-/var/opt/OpenJDK-%{version}-bin/bin/jsadebugd
150
-/var/opt/OpenJDK-%{version}-bin/bin/jstack
151
-/var/opt/OpenJDK-%{version}-bin/bin/jstat
152
-/var/opt/OpenJDK-%{version}-bin/bin/jstatd
153
-/var/opt/OpenJDK-%{version}-bin/bin/native2ascii
154
-/var/opt/OpenJDK-%{version}-bin/bin/rmic
155
-/var/opt/OpenJDK-%{version}-bin/bin/schemagen
156
-/var/opt/OpenJDK-%{version}-bin/bin/serialver
157
-/var/opt/OpenJDK-%{version}-bin/bin/wsgen
158
-/var/opt/OpenJDK-%{version}-bin/bin/wsimport
159
-/var/opt/OpenJDK-%{version}-bin/bin/xjc
160
-
161
-
162
-%files	-n openjre
163
-%defattr(-,root,root)
164
-
165
-/var/opt/OpenJDK-%{version}-bin/jre/
166
-/var/opt/OpenJDK-%{version}-bin/bin/java
167
-/var/opt/OpenJDK-%{version}-bin/bin/keytool
168
-/var/opt/OpenJDK-%{version}-bin/bin/orbd
169
-/var/opt/OpenJDK-%{version}-bin/bin/pack200
170
-/var/opt/OpenJDK-%{version}-bin/bin/rmid
171
-/var/opt/OpenJDK-%{version}-bin/bin/rmiregistry
172
-/var/opt/OpenJDK-%{version}-bin/bin/servertool
173
-/var/opt/OpenJDK-%{version}-bin/bin/tnameserv
174
-/var/opt/OpenJDK-%{version}-bin/bin/unpack200
175
-/var/opt/OpenJDK-%{version}-bin/lib/amd64/jli/
176
-/etc/profile.d/java-exports.sh
177
-%{_rpmconfigdir}/macros.d/macros.java
178
-
179
-%files sample
180
-%defattr(-,root,root)
181
-/var/opt/OpenJDK-%{version}-bin/sample/
182
-
183
-%files doc
184
-%defattr(-,root,root)
185
-/var/opt/OpenJDK-%{version}-bin/man/
186
-/var/opt/OpenJDK-%{version}-bin/demo
187
-
188
-%files src
189
-%defattr(-,root,root)
190
-/var/opt/OpenJDK-%{version}-bin/src.zip
191
-
192
-%changelog
193
-*	Mon Apr 10 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.8.0.131-1
194
--	Upgraded to version 1.8.0.131 and building Java from sources
195
-*       Tue Mar 28 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.112-2
196
--       add java rpm macros
197
-*       Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.112-1
198
--       Update to 1.8.0.112. addresses CVE-2016-5582 CVE-2016-5573
199
-*       Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.102-1
200
--       Update to 1.8.0.102, minor fixes in url, spelling.
201
--       addresses CVE-2016-3598, CVE-2016-3606, CVE-2016-3610
202
-*       Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com> 1.8.0.92-3
203
--	Added version constraint to runtime dependencies
204
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.92-2
205
--	GA - Bump release of all rpms
206
-*       Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 1.8.0.92-1
207
--	Updated to version 1.8.0.92
208
-*       Mon May 2 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.72-3
209
--       Move tools like javac to openjdk
210
-*       Thu Apr 28 2016 Divya Thaluru <dthaluru@vmware.com> 1.8.0.72-2
211
--       Adding openjre as run time dependency for openjdk package
212
-*       Fri Feb 26 2016 Kumar Kaushik <kaushikk@vmware.com> 1.8.0.72-1
213
--       Updating Version.
214
-*	Mon Nov 16 2015 Sharath George <sharathg@vmware.com> 1.8.0.51-3
215
--	Change to use /var/opt path
216
-*	Fri Sep 11 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.8.0.51-2
217
--	Split the openjdk into multiple sub-packages to reduce size. 
218
-*	Mon Aug 17 2015 Sharath George <sarahc@vmware.com> 1.8.0.51-1
219
--	Moved to the next version
220
-*	Tue Jun 30 2015 Sarah Choi <sarahc@vmware.com> 1.8.0.45-2
221
--	Add JRE path 
222
-*	Mon May 18 2015 Sharath George <sharathg@vmware.com> 1.8.0.45-1
223
--	Initial build.	First version
224 1
new file mode 100644
... ...
@@ -0,0 +1,433 @@
0
+--- a/jdk/src/share/back/invoker.c	Tue Mar 29 23:02:04 2016 +0100
1
+@@ -211,6 +211,47 @@
2
+     return error;
3
+ }
4
+ 
5
++/*
6
++ * Delete global references from the request which got put there before a
7
++ * invoke request was carried out. See fillInvokeRequest() and invoker invoke*()
8
++ * impls.
9
++ */
10
++static void
11
++deleteGlobalRefs(JNIEnv *env, InvokeRequest *request)
12
++{
13
++    void *cursor;
14
++    jint argIndex = 0;
15
++    jvalue *argument = request->arguments;
16
++    jbyte argumentTag = firstArgumentTypeTag(request->methodSignature, &cursor);
17
++
18
++    if (request->clazz != NULL) {
19
++        tossGlobalRef(env, &(request->clazz));
20
++    }
21
++    if (request->instance != NULL) {
22
++        tossGlobalRef(env, &(request->instance));
23
++    }
24
++    /* Delete global argument references */
25
++    while (argIndex < request->argumentCount) {
26
++        if ((argumentTag == JDWP_TAG(OBJECT)) ||
27
++            (argumentTag == JDWP_TAG(ARRAY))) {
28
++            if (argument->l != NULL) {
29
++                tossGlobalRef(env, &(argument->l));
30
++            }
31
++        }
32
++        argument++;
33
++        argIndex++;
34
++        argumentTag = nextArgumentTypeTag(&cursor);
35
++    }
36
++    /* Delete potentially saved return values */
37
++    if ((request->invokeType == INVOKE_CONSTRUCTOR) ||
38
++        (returnTypeTag(request->methodSignature) == JDWP_TAG(OBJECT)) ||
39
++        (returnTypeTag(request->methodSignature) == JDWP_TAG(ARRAY))) {
40
++        if (request->returnValue.l != NULL) {
41
++            tossGlobalRef(env, &(request->returnValue.l));
42
++        }
43
++    }
44
++}
45
++
46
+ static jvmtiError
47
+ fillInvokeRequest(JNIEnv *env, InvokeRequest *request,
48
+                   jbyte invokeType, jbyte options, jint id,
49
+@@ -736,6 +777,13 @@
50
+         (void)outStream_writeObjectRef(env, &out, exc);
51
+         outStream_sendReply(&out);
52
+     }
53
++
54
++    /*
55
++     * At this time, there's no need to retain global references on
56
++     * arguments since the reply is processed. No one will deal with
57
++     * this request ID anymore, so we must call deleteGlobalRefs().
58
++     */
59
++    deleteGlobalRefs(env, request);
60
+ }
61
+ 
62
+ jboolean
63
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
64
+@@ -0,0 +1,1 @@
65
++-Xmx40m
66
+\ No newline at end of file
67
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
68
+@@ -0,0 +1,312 @@
69
++/*
70
++ * Copyright (c) 2016 Red Hat Inc.
71
++ *
72
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
73
++ *
74
++ * This code is free software; you can redistribute it and/or modify it
75
++ * under the terms of the GNU General Public License version 2 only, as
76
++ * published by the Free Software Foundation.
77
++ *
78
++ * This code is distributed in the hope that it will be useful, but WITHOUT
79
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
80
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
81
++ * version 2 for more details (a copy is included in the LICENSE file that
82
++ * accompanied this code).
83
++ *
84
++ * You should have received a copy of the GNU General Public License version
85
++ * 2 along with this work; if not, write to the Free Software Foundation,
86
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
87
++ *
88
++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
89
++ * or visit www.oracle.com if you need additional information or have any
90
++ * questions.
91
++ */
92
++
93
++/**
94
++ *  @test
95
++ *  @bug 4858370
96
++ *  @summary JDWP: Memory Leak (global references not deleted after invokeMethod).
97
++ *
98
++ *  @author Severin Gehwolf <sgehwolf@redhat.com>
99
++ *
100
++ *  @library ..
101
++ *  @run build TestScaffold VMConnection TargetListener TargetAdapter
102
++ *  @run compile -g OomDebugTest.java
103
++ *  @run shell OomDebugTestSetup.sh
104
++ *  @run main OomDebugTest OomDebugTestTarget test1
105
++ *  @run main OomDebugTest OomDebugTestTarget test2
106
++ *  @run main OomDebugTest OomDebugTestTarget test3
107
++ *  @run main OomDebugTest OomDebugTestTarget test4
108
++ *  @run main OomDebugTest OomDebugTestTarget test5
109
++ */
110
++import java.util.ArrayList;
111
++import java.util.Collections;
112
++import java.util.List;
113
++
114
++import com.sun.jdi.ArrayReference;
115
++import com.sun.jdi.ArrayType;
116
++import com.sun.jdi.ClassType;
117
++import com.sun.jdi.Field;
118
++import com.sun.jdi.InvocationException;
119
++import com.sun.jdi.Method;
120
++import com.sun.jdi.ObjectReference;
121
++import com.sun.jdi.ReferenceType;
122
++import com.sun.jdi.StackFrame;
123
++import com.sun.jdi.VMOutOfMemoryException;
124
++import com.sun.jdi.Value;
125
++import com.sun.jdi.event.BreakpointEvent;
126
++
127
++/***************** Target program **********************/
128
++
129
++class OomDebugTestTarget {
130
++
131
++    OomDebugTestTarget() {
132
++        System.out.println("DEBUG: invoked constructor");
133
++    }
134
++    static class FooCls {
135
++        @SuppressWarnings("unused")
136
++        private byte[] bytes = new byte[3000000];
137
++    };
138
++
139
++    FooCls fooCls = new FooCls();
140
++    byte[] byteArray = new byte[0];
141
++
142
++    void testMethod(FooCls foo) {
143
++        System.out.println("DEBUG: invoked 'void testMethod(FooCls)', foo == " + foo);
144
++    }
145
++
146
++    void testPrimitive(byte[] foo) {
147
++        System.out.println("DEBUG: invoked 'void testPrimitive(byte[])', foo == " + foo);
148
++    }
149
++
150
++    byte[] testPrimitiveArrRetval() {
151
++        System.out.println("DEBUG: invoked 'byte[] testPrimitiveArrRetval()'");
152
++        return new byte[3000000];
153
++    }
154
++
155
++    FooCls testFooClsRetval() {
156
++        System.out.println("DEBUG: invoked 'FooCls testFooClsRetval()'");
157
++        return new FooCls();
158
++    }
159
++
160
++    public void entry() {}
161
++
162
++    public static void main(String[] args){
163
++        System.out.println("DEBUG: OomDebugTestTarget.main");
164
++        new OomDebugTestTarget().entry();
165
++    }
166
++}
167
++
168
++/***************** Test program ************************/
169
++
170
++public class OomDebugTest extends TestScaffold {
171
++
172
++    private static final int TOTAL_TESTS = 1;
173
++    private ReferenceType targetClass;
174
++    private ObjectReference thisObject;
175
++    private int failedTests;
176
++    private final String testMethodName;
177
++
178
++    public OomDebugTest(String[] args) {
179
++        super(args);
180
++        if (args.length != 2) {
181
++            throw new RuntimeException("Test failed unexpectedly.");
182
++        }
183
++        testMethodName = args[1];
184
++    }
185
++
186
++    @Override
187
++    protected void runTests() throws Exception {
188
++        try {
189
++            /*
190
++             * Get to the top of entry()
191
++             * to determine targetClass and mainThread
192
++             */
193
++            BreakpointEvent bpe = startTo("OomDebugTestTarget", "entry", "()V");
194
++            targetClass = bpe.location().declaringType();
195
++
196
++            mainThread = bpe.thread();
197
++
198
++            StackFrame frame = mainThread.frame(0);
199
++            thisObject = frame.thisObject();
200
++            java.lang.reflect.Method m = findTestMethod();
201
++            m.invoke(this);
202
++        } catch (NoSuchMethodException e) {
203
++            e.printStackTrace();
204
++            failure();
205
++        } catch (SecurityException e) {
206
++            e.printStackTrace();
207
++            failure();
208
++        }
209
++    }
210
++
211
++    private java.lang.reflect.Method findTestMethod()
212
++            throws NoSuchMethodException, SecurityException {
213
++        return OomDebugTest.class.getDeclaredMethod(testMethodName);
214
++    }
215
++
216
++    private void failure() {
217
++        failedTests++;
218
++    }
219
++
220
++    /*
221
++     * Test case: Object reference as method parameter.
222
++     */
223
++    @SuppressWarnings("unused") // called via reflection
224
++    private void test1() throws Exception {
225
++        System.out.println("DEBUG: ------------> Running " + testMethodName);
226
++        try {
227
++            Field field = targetClass.fieldByName("fooCls");
228
++            ClassType clsType = (ClassType)field.type();
229
++            Method constructor = getConstructorForClass(clsType);
230
++            for (int i = 0; i < 15; i++) {
231
++                @SuppressWarnings({ "rawtypes", "unchecked" })
232
++                ObjectReference objRef = clsType.newInstance(mainThread,
233
++                                                             constructor,
234
++                                                             new ArrayList(0),
235
++                                                             ObjectReference.INVOKE_NONVIRTUAL);
236
++                invoke("testMethod", "(LOomDebugTestTarget$FooCls;)V", objRef);
237
++            }
238
++        } catch (InvocationException e) {
239
++            handleFailure(e);
240
++        }
241
++    }
242
++
243
++    /*
244
++     * Test case: Array reference as method parameter.
245
++     */
246
++    @SuppressWarnings("unused") // called via reflection
247
++    private void test2() throws Exception {
248
++        System.out.println("DEBUG: ------------> Running " + testMethodName);
249
++        try {
250
++            Field field = targetClass.fieldByName("byteArray");
251
++            ArrayType arrType = (ArrayType)field.type();
252
++
253
++            for (int i = 0; i < 15; i++) {
254
++                ArrayReference byteArrayVal = arrType.newInstance(3000000);
255
++                invoke("testPrimitive", "([B)V", byteArrayVal);
256
++            }
257
++        } catch (VMOutOfMemoryException e) {
258
++            defaultHandleOOMFailure(e);
259
++        }
260
++    }
261
++
262
++    /*
263
++     * Test case: Array reference as return value.
264
++     */
265
++    @SuppressWarnings("unused") // called via reflection
266
++    private void test3() throws Exception {
267
++        System.out.println("DEBUG: ------------> Running " + testMethodName);
268
++        try {
269
++            for (int i = 0; i < 15; i++) {
270
++                invoke("testPrimitiveArrRetval",
271
++                       "()[B",
272
++                       Collections.EMPTY_LIST,
273
++                       vm().mirrorOfVoid());
274
++            }
275
++        } catch (InvocationException e) {
276
++            handleFailure(e);
277
++        }
278
++    }
279
++
280
++    /*
281
++     * Test case: Object reference as return value.
282
++     */
283
++    @SuppressWarnings("unused") // called via reflection
284
++    private void test4() throws Exception {
285
++        System.out.println("DEBUG: ------------> Running " + testMethodName);
286
++        try {
287
++            for (int i = 0; i < 15; i++) {
288
++                invoke("testFooClsRetval",
289
++                       "()LOomDebugTestTarget$FooCls;",
290
++                       Collections.EMPTY_LIST,
291
++                       vm().mirrorOfVoid());
292
++            }
293
++        } catch (InvocationException e) {
294
++            handleFailure(e);
295
++        }
296
++    }
297
++
298
++    /*
299
++     * Test case: Constructor
300
++     */
301
++    @SuppressWarnings({ "unused", "unchecked", "rawtypes" }) // called via reflection
302
++    private void test5() throws Exception {
303
++        System.out.println("DEBUG: ------------> Running " + testMethodName);
304
++        try {
305
++            ClassType type = (ClassType)thisObject.type();
306
++            for (int i = 0; i < 15; i++) {
307
++                type.newInstance(mainThread,
308
++                                 findMethod(targetClass, "<init>", "()V"),
309
++                                 new ArrayList(0),
310
++                                 ObjectReference.INVOKE_NONVIRTUAL);
311
++            }
312
++        } catch (InvocationException e) {
313
++            handleFailure(e);
314
++        }
315
++    }
316
++
317
++    private Method getConstructorForClass(ClassType clsType) {
318
++        List<Method> methods = clsType.methodsByName("<init>");
319
++        if (methods.size() != 1) {
320
++            throw new RuntimeException("FAIL. Expected only one, the default, constructor");
321
++        }
322
++        return methods.get(0);
323
++    }
324
++
325
++    private void handleFailure(InvocationException e) {
326
++        // There is no good way to see the OOME diagnostic message in the target since the
327
++        // TestScaffold might throw an exception while trying to print the stack trace. I.e
328
++        // it might get a a VMDisconnectedException before the stack trace printing finishes.
329
++        System.err.println("FAILURE: InvocationException caused by OOM");
330
++        defaultHandleOOMFailure(e);
331
++    }
332
++
333
++    private void defaultHandleOOMFailure(Exception e) {
334
++        e.printStackTrace();
335
++        failure();
336
++    }
337
++
338
++    @SuppressWarnings({ "rawtypes", "unchecked" })
339
++    void invoke(String methodName, String methodSig, Value value)
340
++            throws Exception {
341
++        List args = new ArrayList(1);
342
++        args.add(value);
343
++        invoke(methodName, methodSig, args, value);
344
++    }
345
++
346
++    void invoke(String methodName,
347
++                String methodSig,
348
++                @SuppressWarnings("rawtypes") List args,
349
++                Value value) throws Exception {
350
++        Method method = findMethod(targetClass, methodName, methodSig);
351
++        if ( method == null) {
352
++            failure("FAILED: Can't find method: "
353
++                    + methodName  + " for class = " + targetClass);
354
++            return;
355
++        }
356
++        invoke(method, args, value);
357
++    }
358
++
359
++    @SuppressWarnings({ "rawtypes", "unchecked" })
360
++    void invoke(Method method, List args, Value value) throws Exception {
361
++        thisObject.invokeMethod(mainThread, method, args, 0);
362
++        System.out.println("DEBUG: Done invoking method via debugger.");
363
++    }
364
++
365
++    Value fieldValue(String fieldName) {
366
++        Field field = targetClass.fieldByName(fieldName);
367
++        return thisObject.getValue(field);
368
++    }
369
++
370
++    public static void main(String[] args) throws Exception {
371
++        OomDebugTest oomTest = new OomDebugTest(args);
372
++        oomTest.startTests();
373
++        if (oomTest.failedTests > 0) {
374
++            throw new RuntimeException(oomTest.failedTests
375
++                                       + " of " + TOTAL_TESTS + " test(s) failed.");
376
++        }
377
++        System.out.println("All " + TOTAL_TESTS + " tests passed.");
378
++    }
379
++
380
++}
381
+--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
382
+@@ -0,0 +1,46 @@
383
++#!/bin/sh
384
++#
385
++# Copyright (c) 2016 Red Hat Inc.
386
++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
387
++#
388
++# This code is free software; you can redistribute it and/or modify it
389
++# under the terms of the GNU General Public License version 2 only, as
390
++# published by the Free Software Foundation.
391
++#
392
++# This code is distributed in the hope that it will be useful, but WITHOUT
393
++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
394
++# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
395
++# version 2 for more details (a copy is included in the LICENSE file that
396
++# accompanied this code).
397
++#
398
++# You should have received a copy of the GNU General Public License version
399
++# 2 along with this work; if not, write to the Free Software Foundation,
400
++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
401
++#
402
++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
403
++# or visit www.oracle.com if you need additional information or have any
404
++# questions.
405
++#
406
++
407
++
408
++if [ "${TESTSRC}" = "" ]
409
++then
410
++  echo "TESTSRC not set.  Test cannot execute.  Failed."
411
++  exit 1
412
++fi
413
++echo "TESTSRC=${TESTSRC}"
414
++
415
++if [ "${TESTJAVA}" = "" ]
416
++then
417
++  echo "TESTJAVA not set.  Test cannot execute.  Failed."
418
++  exit 1
419
++fi
420
++echo "TESTJAVA=${TESTJAVA}"
421
++
422
++if [ "${TESTCLASSES}" = "" ]
423
++then
424
++  echo "TESTCLASSES not set.  Test cannot execute.  Failed."
425
++  exit 1
426
++fi
427
++
428
++cp ${TESTSRC}/@debuggeeVMOptions ${TESTCLASSES}/
0 429
new file mode 100644
... ...
@@ -0,0 +1,53 @@
0
+diff -r 6b81fd2227d1 -r 3334efeacd83 src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java
1
+--- a/jdk/src/share/classes/sun/security/ssl/TrustManagerFactoryImpl.java	Fri Apr 01 05:33:37 2016 +0100
2
+@@ -174,15 +174,20 @@
3
+                     storeFile = new File(storeFileName);
4
+                     fis = getFileInputStream(storeFile);
5
+                 } else {
6
+-                    String javaHome = props.get("javaHome");
7
+-                    storeFile = new File(javaHome + sep + "lib" + sep
8
+-                                                    + "security" + sep +
9
+-                                                    "jssecacerts");
10
++                    /* Check system cacerts DB first; /etc/pki/java/cacerts */
11
++                    storeFile = new File(sep + "etc" + sep + "pki" + sep
12
++                                         + "java" + sep + "cacerts");
13
+                     if ((fis = getFileInputStream(storeFile)) == null) {
14
++                        String javaHome = props.get("javaHome");
15
+                         storeFile = new File(javaHome + sep + "lib" + sep
16
+-                                                    + "security" + sep +
17
+-                                                    "cacerts");
18
+-                        fis = getFileInputStream(storeFile);
19
++                                             + "security" + sep +
20
++                                             "jssecacerts");
21
++                        if ((fis = getFileInputStream(storeFile)) == null) {
22
++                            storeFile = new File(javaHome + sep + "lib" + sep
23
++                                                 + "security" + sep +
24
++                                                 "cacerts");
25
++                            fis = getFileInputStream(storeFile);
26
++                        }
27
+                     }
28
+                 }
29
+ 
30
+diff -r 6b81fd2227d1 -r 3334efeacd83 src/share/classes/sun/security/tools/KeyStoreUtil.java
31
+--- a/jdk/src/share/classes/sun/security/tools/KeyStoreUtil.java	Fri Apr 01 05:33:37 2016 +0100
32
+@@ -87,9 +87,14 @@
33
+         throws Exception
34
+     {
35
+         String sep = File.separator;
36
+-        File file = new File(System.getProperty("java.home") + sep
37
+-                             + "lib" + sep + "security" + sep
38
+-                             + "cacerts");
39
++        /* Check system cacerts DB first; /etc/pki/java/cacerts */
40
++        File file = new File(sep + "etc" + sep + "pki" + sep
41
++                             + "java" + sep + "cacerts");
42
++        if (!file.exists()) {
43
++            file = new File(System.getProperty("java.home") + sep
44
++                            + "lib" + sep + "security" + sep
45
++                            + "cacerts");
46
++        }
47
+         if (!file.exists()) {
48
+             return null;
49
+         }
50
+
0 51
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+--- a/jdk/make/CompileNativeLibraries.gmk       2017-04-07 20:06:07.668018356 +0000
1
+@@ -83,7 +83,7 @@
2
+
3
+ include lib/ServiceabilityLibraries.gmk
4
+
5
+-include lib/Awt2dLibraries.gmk
6
++#include lib/Awt2dLibraries.gmk
7
+
8
+ include lib/SoundLibraries.gmk
9
+
0 10
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+diff --git a/src/share/native/sun/java2d/cmm/lcms/cmstypes.c b/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
1
+--- openjdk/jdk/src/share/native/sun/java2d/cmm/lcms/cmstypes.c
2
+@@ -1483,7 +1483,7 @@
3
+         if (!_cmsReadUInt32Number(io, &Offset)) goto Error;
4
+ 
5
+         // Check for overflow
6
+-        if (Offset < (SizeOfHeader + 8)) goto Error;
7
++        if ((Offset + Len) > SizeOfTag + :sunglasses: goto Error;
8
+ 
9
+         // True begin of the string
10
+         BeginOfThisString = Offset - SizeOfHeader - 8;
11
+
0 12
new file mode 100644
... ...
@@ -0,0 +1,259 @@
0
+%define _use_internal_dependency_generator 0
1
+%global security_hardening none
2
+Summary:	OpenJDK 
3
+Name:		openjdk8
4
+Version:	1.8.0.131
5
+Release:	1%{?dist}
6
+License:	GNU GPL
7
+URL:		https://openjdk.java.net
8
+Group:		Development/Tools
9
+Vendor:		VMware, Inc.
10
+Distribution:   Photon
11
+Source0:	http://www.java.net/download/openjdk/jdk8/promoted/b131/openjdk-%{version}.tar.bz2
12
+%define sha1 openjdk=ae01c24fe5247d5aa246a60c0272ba92188a7d55
13
+Patch0:		disable-awt-lib.patch
14
+Patch1:		fix-lcms.patch 
15
+Patch2:		Fix-memory-leak.patch
16
+Patch3:		check-system-ca-certs.patch
17
+BuildRequires:  pcre-devel
18
+BuildRequires:	which
19
+BuildRequires:	zip
20
+BuildRequires:	unzip
21
+BuildRequires:  zlib-devel
22
+BuildRequires:	ca-certificates
23
+BuildRequires:	chkconfig
24
+Requires:       openjre8 = %{version}-%{release}
25
+Requires:       chkconfig
26
+AutoReqProv: 	no
27
+%define bootstrapjdkversion 1.8.0.112
28
+%description
29
+The OpenJDK package installs java class library and javac java compiler. 
30
+
31
+%package	-n openjre8
32
+Summary:	Java runtime environment
33
+AutoReqProv: 	no
34
+Requires:       chkconfig
35
+%description	-n openjre8
36
+It contains the libraries files for Java runtime environment
37
+
38
+
39
+%package	sample
40
+Summary:	Sample java applications. 
41
+Group:          Development/Languages/Java
42
+Requires:       %{name} = %{version}-%{release}
43
+%description	sample
44
+It contains the Sample java applications.
45
+
46
+%package		doc
47
+Summary:		Documentation and demo applications for openjdk
48
+Group:          Development/Languages/Java
49
+Requires:       %{name} = %{version}-%{release}
50
+%description	doc
51
+It contains the documentation and demo applications for openjdk
52
+
53
+%package 		src
54
+Summary:        OpenJDK Java classes for developers
55
+Group:          Development/Languages/Java
56
+Requires:       %{name} = %{version}-%{release}
57
+%description	src
58
+This package provides the runtime library class sources.
59
+
60
+%prep -p exit
61
+%setup -q -n openjdk
62
+%patch0 -p1
63
+%patch1 -p1
64
+%patch2 -p1
65
+%patch3 -p1
66
+
67
+%build
68
+chmod a+x ./configure
69
+unset JAVA_HOME &&
70
+./configure \
71
+	FREETYPE_NOT_NEEDED=yes \
72
+	CUPS_NOT_NEEDED=yes \
73
+	--with-target-bits=64 \
74
+	--with-boot-jdk=/var/opt/OpenJDK-%bootstrapjdkversion-bin \
75
+	--enable-headful=no \
76
+	--with-cacerts-file=/var/opt/OpenJDK-%bootstrapjdkversion-bin/jre/lib/security/cacerts \
77
+	--with-extra-cxxflags="-Wno-error -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse" \
78
+	--with-extra-cflags="-std=gnu++98 -fno-delete-null-pointer-checks -Wno-error -fno-lifetime-dse" \
79
+	--with-stdc++lib=dynamic
80
+
81
+make \
82
+    DEBUG_BINARIES=true \
83
+    BUILD_HEADLESS_ONLY=yes \
84
+    OPENJDK_TARGET_OS=linux \
85
+    JAVAC_FLAGS=-g \
86
+    STRIP_POLICY=no_strip \
87
+    DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
88
+    CLASSPATH=/var/opt/OpenJDK-%bootstrapjdkversion-bin/jre \
89
+    POST_STRIP_CMD="" \
90
+    LOG=trace \
91
+    SCTP_WERROR=
92
+
93
+%install
94
+make DESTDIR=%{buildroot} install \
95
+	BUILD_HEADLESS_ONLY=yes \
96
+	OPENJDK_TARGET_OS=linux \
97
+	DISABLE_HOTSPOT_OS_VERSION_CHECK=ok \
98
+	CLASSPATH=/var/opt/OpenJDK-%bootstrapjdkversion-bin/jre
99
+
100
+install -vdm755 %{buildroot}%{_libdir}/jvm/OpenJDK-%{version}
101
+chown -R root:root %{buildroot}%{_libdir}/jvm/OpenJDK-%{version}
102
+install -vdm755 %{buildroot}%{_bindir}
103
+find /usr/local/jvm/openjdk-1.8.0-internal/jre/lib/amd64 -iname \*.diz -delete
104
+mv /usr/local/jvm/openjdk-1.8.0-internal/* %{buildroot}%{_libdir}/jvm/OpenJDK-%{version}/
105
+
106
+%post
107
+alternatives --install %{_bindir}/javac javac %{_libdir}/jvm/OpenJDK-%{version}/bin/javac 2000 \
108
+  --slave %{_bindir}/appletviewer appletviewer %{_libdir}/jvm/OpenJDK-%{version}/bin/appletviewer \
109
+  --slave %{_bindir}/extcheck extcheck %{_libdir}/jvm/OpenJDK-%{version}/bin/extcheck \
110
+  --slave %{_bindir}/idlj idlj %{_libdir}/jvm/OpenJDK-%{version}/bin/idlj \
111
+  --slave %{_bindir}/jar jar %{_libdir}/jvm/OpenJDK-%{version}/bin/jar \
112
+  --slave %{_bindir}/jarsigner jarsigner %{_libdir}/jvm/OpenJDK-%{version}/bin/jarsigner \
113
+  --slave %{_bindir}/javadoc javadoc %{_libdir}/jvm/OpenJDK-%{version}/bin/javadoc \
114
+  --slave %{_bindir}/javah javah %{_libdir}/jvm/OpenJDK-%{version}/bin/javah \
115
+  --slave %{_bindir}/javap javap %{_libdir}/jvm/OpenJDK-%{version}/bin/javap \
116
+  --slave %{_bindir}/jcmd jcmd %{_libdir}/jvm/OpenJDK-%{version}/bin/jcmd \
117
+  --slave %{_bindir}/jconsole jconsole %{_libdir}/jvm/OpenJDK-%{version}/bin/jconsole \
118
+  --slave %{_bindir}/jdb jdb %{_libdir}/jvm/OpenJDK-%{version}/bin/jdb \
119
+  --slave %{_bindir}/jdeps jdeps %{_libdir}/jvm/OpenJDK-%{version}/bin/jdeps \
120
+  --slave %{_bindir}/jhat jhat %{_libdir}/jvm/OpenJDK-%{version}/bin/jhat \
121
+  --slave %{_bindir}/jinfo jinfo %{_libdir}/jvm/OpenJDK-%{version}/bin/jinfo \
122
+  --slave %{_bindir}/jmap jmap %{_libdir}/jvm/OpenJDK-%{version}/bin/jmap \
123
+  --slave %{_bindir}/jps jps %{_libdir}/jvm/OpenJDK-%{version}/bin/jps \
124
+  --slave %{_bindir}/jrunscript jrunscript %{_libdir}/jvm/OpenJDK-%{version}/bin/jrunscript \
125
+  --slave %{_bindir}/jsadebugd jsadebugd %{_libdir}/jvm/OpenJDK-%{version}/bin/jsadebugd \
126
+  --slave %{_bindir}/jstack jstack %{_libdir}/jvm/OpenJDK-%{version}/bin/jstack \
127
+  --slave %{_bindir}/jstat jstat %{_libdir}/jvm/OpenJDK-%{version}/bin/jstat \
128
+  --slave %{_bindir}/jstatd jstatd %{_libdir}/jvm/OpenJDK-%{version}/bin/jstatd \
129
+  --slave %{_bindir}/native2ascii native2ascii %{_libdir}/jvm/OpenJDK-%{version}/bin/native2ascii \
130
+  --slave %{_bindir}/rmic rmic %{_libdir}/jvm/OpenJDK-%{version}/bin/rmic \
131
+  --slave %{_bindir}/schemagen schemagen %{_libdir}/jvm/OpenJDK-%{version}/bin/schemagen \
132
+  --slave %{_bindir}/serialver serialver %{_libdir}/jvm/OpenJDK-%{version}/bin/serialver \
133
+  --slave %{_bindir}/wsgen wsgen %{_libdir}/jvm/OpenJDK-%{version}/bin/wsgen \
134
+  --slave %{_bindir}/wsimport wsimport %{_libdir}/jvm/OpenJDK-%{version}/bin/wsimport \
135
+  --slave %{_bindir}/xjc xjc %{_libdir}/jvm/OpenJDK-%{version}/bin/xjc
136
+
137
+%post -n openjre8
138
+alternatives --install %{_bindir}/java java %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/java 2000 \
139
+  --slave %{_libdir}/jvm/jre jre %{_libdir}/jvm/OpenJDK-%{version}/jre \
140
+  --slave %{_bindir}/jjs jjs %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/jjs \
141
+  --slave %{_bindir}/keytool keytool %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/keytool \
142
+  --slave %{_bindir}/orbd orbd %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/orbd \
143
+  --slave %{_bindir}/pack200 pack200 %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/pack200 \
144
+  --slave %{_bindir}/rmid rmid %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/rmid \
145
+  --slave %{_bindir}/rmiregistry rmiregistry %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/rmiregistry \
146
+  --slave %{_bindir}/servertool servertool %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/servertool \
147
+  --slave %{_bindir}/tnameserv tnameserv %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/tnameserv \
148
+  --slave %{_bindir}/unpack200 unpack200 %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/unpack200 
149
+
150
+%postun
151
+alternatives --remove javac %{_libdir}/jvm/OpenJDK-%{version}/bin/javac
152
+
153
+%postun -n openjre8
154
+alternatives --remove java %{_libdir}/jvm/OpenJDK-%{version}/jre/bin/java
155
+
156
+%clean
157
+rm -rf %{buildroot}/*
158
+
159
+%files
160
+%defattr(-,root,root)
161
+%{_libdir}/jvm/OpenJDK-%{version}/ASSEMBLY_EXCEPTION
162
+%{_libdir}/jvm/OpenJDK-%{version}/LICENSE
163
+%{_libdir}/jvm/OpenJDK-%{version}/release
164
+%{_libdir}/jvm/OpenJDK-%{version}/THIRD_PARTY_README
165
+%{_libdir}/jvm/OpenJDK-%{version}/lib
166
+%{_libdir}/jvm/OpenJDK-%{version}/include/
167
+%{_libdir}/jvm/OpenJDK-%{version}/bin/extcheck
168
+%{_libdir}/jvm/OpenJDK-%{version}/bin/idlj
169
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jar
170
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jarsigner
171
+%{_libdir}/jvm/OpenJDK-%{version}/bin/java-rmi.cgi
172
+%{_libdir}/jvm/OpenJDK-%{version}/bin/javac
173
+%{_libdir}/jvm/OpenJDK-%{version}/bin/javadoc
174
+%{_libdir}/jvm/OpenJDK-%{version}/bin/javah
175
+%{_libdir}/jvm/OpenJDK-%{version}/bin/javap
176
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jcmd
177
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jconsole
178
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jdb
179
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jdeps
180
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jhat
181
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jinfo
182
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jjs
183
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jmap
184
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jps
185
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jrunscript
186
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jsadebugd
187
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jstack
188
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jstat
189
+%{_libdir}/jvm/OpenJDK-%{version}/bin/jstatd
190
+%{_libdir}/jvm/OpenJDK-%{version}/bin/native2ascii
191
+%{_libdir}/jvm/OpenJDK-%{version}/bin/rmic
192
+%{_libdir}/jvm/OpenJDK-%{version}/bin/schemagen
193
+%{_libdir}/jvm/OpenJDK-%{version}/bin/serialver
194
+%{_libdir}/jvm/OpenJDK-%{version}/bin/wsgen
195
+%{_libdir}/jvm/OpenJDK-%{version}/bin/wsimport
196
+%{_libdir}/jvm/OpenJDK-%{version}/bin/xjc
197
+
198
+%files	-n openjre8
199
+%defattr(-,root,root)
200
+
201
+%{_libdir}/jvm/OpenJDK-%{version}/jre/
202
+%{_libdir}/jvm/OpenJDK-%{version}/bin/java
203
+%{_libdir}/jvm/OpenJDK-%{version}/bin/keytool
204
+%{_libdir}/jvm/OpenJDK-%{version}/bin/orbd
205
+%{_libdir}/jvm/OpenJDK-%{version}/bin/pack200
206
+%{_libdir}/jvm/OpenJDK-%{version}/bin/rmid
207
+%{_libdir}/jvm/OpenJDK-%{version}/bin/rmiregistry
208
+%{_libdir}/jvm/OpenJDK-%{version}/bin/servertool
209
+%{_libdir}/jvm/OpenJDK-%{version}/bin/tnameserv
210
+%{_libdir}/jvm/OpenJDK-%{version}/bin/unpack200
211
+%{_libdir}/jvm/OpenJDK-%{version}/lib/amd64/jli/
212
+%exclude %{_libdir}/jvm/OpenJDK-%{version}/lib/amd64/*.diz
213
+
214
+%files sample
215
+%defattr(-,root,root)
216
+%{_libdir}/jvm/OpenJDK-%{version}/sample/
217
+
218
+%files doc
219
+%defattr(-,root,root)
220
+%{_libdir}/jvm/OpenJDK-%{version}/man/
221
+%{_libdir}/jvm/OpenJDK-%{version}/demo
222
+
223
+%files src
224
+%defattr(-,root,root)
225
+%{_libdir}/jvm/OpenJDK-%{version}/src.zip
226
+
227
+%changelog
228
+*	Mon Apr 10 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.8.0.131-1
229
+-	Upgraded to version 1.8.0.131 and building Java from sources
230
+*   Tue Mar 28 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.112-2
231
+-   add java rpm macros
232
+*   Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.112-1
233
+-   Update to 1.8.0.112. addresses CVE-2016-5582 CVE-2016-5573
234
+*   Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.102-1
235
+-   Update to 1.8.0.102, minor fixes in url, spelling.
236
+-   addresses CVE-2016-3598, CVE-2016-3606, CVE-2016-3610
237
+*   Thu May 26 2016 Divya Thaluru <dthaluru@vmware.com> 1.8.0.92-3
238
+-	Added version constraint to runtime dependencies
239
+*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.92-2
240
+-	GA - Bump release of all rpms
241
+*   Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 1.8.0.92-1
242
+-	Updated to version 1.8.0.92
243
+*   Mon May 2 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.72-3
244
+-   Move tools like javac to openjdk
245
+*   Thu Apr 28 2016 Divya Thaluru <dthaluru@vmware.com> 1.8.0.72-2
246
+-   Adding openjre as run time dependency for openjdk package
247
+*   Fri Feb 26 2016 Kumar Kaushik <kaushikk@vmware.com> 1.8.0.72-1
248
+-   Updating Version.
249
+*	Mon Nov 16 2015 Sharath George <sharathg@vmware.com> 1.8.0.51-3
250
+-	Change to use /var/opt path
251
+*	Fri Sep 11 2015 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.8.0.51-2
252
+-	Split the openjdk into multiple sub-packages to reduce size. 
253
+*	Mon Aug 17 2015 Sharath George <sarahc@vmware.com> 1.8.0.51-1
254
+-	Moved to the next version
255
+*	Tue Jun 30 2015 Sarah Choi <sarahc@vmware.com> 1.8.0.45-2
256
+-	Add JRE path 
257
+*	Mon May 18 2015 Sharath George <sharathg@vmware.com> 1.8.0.45-1
258
+-	Initial build.	First version
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Google's data interchange format
2 2
 Name:           protobuf
3 3
 Version:        3.2.0
4
-Release:        3%{?dist}
4
+Release:        4%{?dist}
5 5
 License:        BSD-3-Clause
6 6
 Group:          Development/Libraries
7 7
 Vendor:         VMware, Inc.
... ...
@@ -68,10 +68,11 @@ This contains protobuf python3 libraries.
68 68
 %package        java
69 69
 Summary:        protobuf java
70 70
 Group:          Development/Libraries
71
-BuildRequires:  openjre >= 1.8.0.45
72
-BuildRequires:  openjdk >= 1.8.0.45
71
+BuildRequires:  chkconfig
72
+BuildRequires:  openjre8 >= 1.8.0.45
73
+BuildRequires:  openjdk8 >= 1.8.0.45
73 74
 BuildRequires:  apache-maven >= 3.3.3
74
-Requires:       openjre >= 1.8.0.45
75
+Requires:       openjre8 >= 1.8.0.45
75 76
 
76 77
 %description    java
77 78
 This contains protobuf java package.
... ...
@@ -141,6 +142,8 @@ popd
141 141
 %{_libdir}/java/protobuf/*.jar
142 142
 
143 143
 %changelog
144
+*   Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.2.0-4
145
+-   Renamed openjdk to openjdk8
144 146
 *   Fri Apr 28 2017 Siju Maliakkal <smaliakkal@vmware.com> 3.2.0-3
145 147
 -   Update python3 version
146 148
 *   Thu Apr 13 2017 Vinay Kulkarni <kulkarniv@vmware.com> 3.2.0-2
... ...
@@ -1,7 +1,7 @@
1 1
 Summary:        Highly reliable distributed coordination
2 2
 Name:           zookeeper
3 3
 Version:        3.4.10
4
-Release:        3%{?dist}
4
+Release:        4%{?dist}
5 5
 URL:            http://zookeeper.apache.org/
6 6
 License:        Apache License, Version 2.0
7 7
 Group:          Applications/System
... ...
@@ -15,7 +15,7 @@ Patch0:	        zookeeper-3.4.8-server.patch
15 15
 BuildRequires:  systemd
16 16
 Requires:       systemd
17 17
 Requires:       shadow
18
-Requires:       openjre
18
+Requires:       openjre8
19 19
 %description
20 20
 ZooKeeper is a centralized service for maintaining configuration information, naming, providing distributed synchronization, and providing group services. All of these kinds of services are used in some form or another by distributed applications. Each time they are implemented there is a lot of work that goes into fixing the bugs and race conditions that are inevitable. Because of the difficulty of implementing these kinds of services, applications initially usually skimp on them ,which make them brittle in the presence of change and difficult to manage. Even when done correctly, different implementations of these services lead to management complexity when the applications are deployed.
21 21
 
... ...
@@ -106,6 +106,8 @@ fi
106 106
 %{_prefix}
107 107
 
108 108
 %changelog
109
+*   Thu Jun 01 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.4.10-4
110
+-   Renamed openjdk to openjdk8.
109 111
 *   Wed May 31 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.4.10-3
110 112
 -   Provide preset to disable service by default
111 113
 *   Wed May 24 2017 Xiaolin Li <xiaolinl@vmware.com> 3.4.10-2
... ...
@@ -135,7 +135,7 @@
135 135
         "haveged",
136 136
         "vim-extra",
137 137
         "postgresql",
138
-        "openjdk",
138
+        "openjdk8",
139 139
         "apr",
140 140
         "apr-util",
141 141
         "httpd",
... ...
@@ -174,12 +174,12 @@
174 174
         "apr-util-ldap",
175 175
         "apr-util-pgsql",
176 176
         "apr-util-sqlite",
177
-        "openjre",
177
+        "openjre8",
178 178
         "sshpass",
179 179
         "iputils",
180
-        "openjdk-src",
181
-        "openjdk-sample",
182
-        "openjdk-doc",
180
+        "openjdk8-src",
181
+        "openjdk8-sample",
182
+        "openjdk8-doc",
183 183
         "haproxy",
184 184
         "cython",
185 185
         "python-lxml",
... ...
@@ -32,6 +32,8 @@ class SerializedSpecObjects(object):
32 32
         while not depQue.empty():
33 33
             specPkg = depQue.get()
34 34
             specName = self.getSpecName(specPkg)
35
+            if specName is None:
36
+                print specPkg + " is missing"
35 37
             specObj = self.mapSerializableSpecObjects[specName]
36 38
             for depPkg in specObj.installRequiresPackages[specPkg]:
37 39
                 if True == allDeps.has_key(depPkg):
... ...
@@ -150,7 +150,7 @@ class ToolChainUtils(object):
150 150
         for package in listOfToolChainPkgs:
151 151
             pkgUtils=PackageUtils(self.logName,self.logPath)
152 152
 	    print "DEBUG:" + package
153
-            if "openjre" in packageName or "openjdk" in packageName:
153
+            if "openjre8" in packageName or "openjdk8" in packageName:
154 154
                 rpmFile=self.findRPMFileInGivenLocation(package, constants.prevPublishXRPMRepo)
155 155
             else:
156 156
                 rpmFile=self.findRPMFileInGivenLocation(package, constants.prevPublishRPMRepo)
... ...
@@ -19,7 +19,7 @@ class constants(object):
19 19
     inputRPMSPath=""
20 20
     rpmCheck=False
21 21
     sourceRpmPath=""
22
-    noDepsPackageList=["texinfo","bzip2","gettext","nspr","xz","bison","openjdk","go"]
22
+    noDepsPackageList=["texinfo","bzip2","gettext","nspr","xz","bison","go"]
23 23
 
24 24
     # These packages will be built in first order as build-core-toolchain stage
25 25
     listCoreToolChainPackages=[
... ...
@@ -197,7 +197,7 @@ class constants(object):
197 197
         "cpio",
198 198
         "go"]
199 199
 
200
-    perPackageToolChain = dict.fromkeys(["openjdk", "openjdk-doc", "openjdk-src", "openjdk-sample", "openjre" ], [
200
+    perPackageToolChain = dict.fromkeys(["openjdk8", "openjdk8-doc", "openjdk8-src", "openjdk8-sample", "openjre8" ], [
201 201
         "glib-devel",
202 202
         "icu-devel",
203 203
 	"openjdk",
... ...
@@ -341,7 +341,19 @@ class constants(object):
341 341
         kernelversion = constants.specData.getVersion("linux")
342 342
         constants.specData.addMacro("KERNEL_VERSION",kernelversion)
343 343
 
344
-        #adding kernelrelease rpm macro
344
+	#adding openjre8 version rpm macro
345
+        java8version = constants.specData.getVersion("openjre8")
346
+        constants.specData.addMacro("JAVA8_VERSION",java8version)
347
+
348
+	#adding apache-ant version rpm macro
349
+        antversion = constants.specData.getVersion("apache-ant")
350
+        constants.specData.addMacro("ANT_VERSION", antversion)
351
+        
352
+	#adding apache-maven version rpm macro
353
+        mavenversion = constants.specData.getVersion("apache-maven")
354
+        constants.specData.addMacro("MAVEN_VERSION", mavenversion)
355
+
356
+	#adding kernelrelease rpm macro
345 357
         kernelrelease = constants.specData.getRelease("linux")
346 358
         constants.specData.addMacro("KERNEL_RELEASE",kernelrelease)
347 359