Change-Id: I3732d37e4aeb9f53551c5b8c651ff8d8d31854b9
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2407
Reviewed-by: Divya Thaluru <dthaluru@vmware.com>
Tested-by: Divya Thaluru <dthaluru@vmware.com>
... | ... |
@@ -1,22 +1,23 @@ |
1 | 1 |
Summary: Apache Ant |
2 | 2 |
Name: apache-ant |
3 | 3 |
Version: 1.9.6 |
4 |
-Release: 5%{?dist} |
|
4 |
+Release: 6%{?dist} |
|
5 | 5 |
License: Apache |
6 | 6 |
URL: http://ant.apache.org |
7 | 7 |
Group: Applications/System |
8 | 8 |
Vendor: VMware, Inc. |
9 | 9 |
Distribution: Photon |
10 |
-BuildArch: noarch |
|
10 |
+BuildArch: noarch |
|
11 | 11 |
Source0: http://apache.mirrors.lucidnetworks.net//ant/source/%{name}-%{version}-src.tar.gz |
12 | 12 |
%define sha1 apache-ant=de7c2287bca23fc32007b28e56c28f330cf7be26 |
13 | 13 |
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 |
-Requires: openjre >= 1.8.0.112, python2 |
|
18 |
-BuildRequires: openjre >= 1.8.0.45 |
|
19 |
-BuildRequires: openjdk >= 1.8.0.45 |
|
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} |
|
20 | 21 |
%define _prefix /var/opt/apache-ant-%{version} |
21 | 22 |
%define _bindir %{_prefix}/bin |
22 | 23 |
%define _libdir %{_prefix}/lib |
... | ... |
@@ -36,7 +37,7 @@ cp -v ./hamcrest-1.3/hamcrest-core-1.3.jar ./lib/optional |
36 | 36 |
|
37 | 37 |
mkdir -p -m 700 $ANT_DIST_DIR |
38 | 38 |
|
39 |
-export JAVA_HOME=/var/opt/OpenJDK-1.8.0.112-bin |
|
39 |
+export JAVA_HOME=%{_java_home} |
|
40 | 40 |
|
41 | 41 |
./bootstrap.sh && ./build.sh -Ddist.dir=$ANT_DIST_DIR |
42 | 42 |
|
... | ... |
@@ -59,13 +60,20 @@ cp %{_builddir}/%{name}-%{version}/maven-ant-tasks-2.1.3/README.txt $MAVEN_ANT_T |
59 | 59 |
chown -R root:root $MAVEN_ANT_TASKS_DIR |
60 | 60 |
chmod 644 $MAVEN_ANT_TASKS_DIR/* |
61 | 61 |
|
62 |
+install -d -m 755 %{buildroot}/etc/profile.d/ |
|
63 |
+ |
|
64 |
+echo 'export ANT_HOME=/var/opt/%{name}-%{version}' > %{buildroot}/etc/profile.d/%{name}.sh |
|
65 |
+ |
|
62 | 66 |
%files |
63 | 67 |
%defattr(-,root,root) |
64 | 68 |
%{_bindir}/* |
65 | 69 |
%{_libdir}/* |
66 | 70 |
%{_prefix}/maven-ant-tasks/* |
71 |
+%{_sysconfdir}/profile.d/%{name}.sh |
|
67 | 72 |
|
68 | 73 |
%changelog |
74 |
+* Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-6 |
|
75 |
+- use java rpm macros to determine versions |
|
69 | 76 |
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-5 |
70 | 77 |
- Updated JAVA_HOME path to point to latest JDK. |
71 | 78 |
* Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-4 |
... | ... |
@@ -1,19 +1,24 @@ |
1 | 1 |
Summary: Apache Maven |
2 | 2 |
Name: apache-maven |
3 | 3 |
Version: 3.3.9 |
4 |
-Release: 7%{?dist} |
|
4 |
+Release: 8%{?dist} |
|
5 | 5 |
License: Apache |
6 | 6 |
URL: http://maven.apache.org |
7 | 7 |
Group: Applications/System |
8 | 8 |
Vendor: VMware, Inc. |
9 | 9 |
Distribution: Photon |
10 |
-BuildArch: noarch |
|
10 |
+BuildArch: noarch |
|
11 | 11 |
Source0: http://apache.mirrors.lucidnetworks.net//maven/source/%{name}-%{version}-src.tar.gz |
12 | 12 |
%define sha1 apache-maven=1912316078f1f7041dd8cd2580f210d30f898162 |
13 |
-Requires: openjre >= 1.8.0.112 |
|
14 |
-BuildRequires: openjre >= 1.8.0.45, openjdk >= 1.8.0.45, apache-ant >= 1.9.6, wget >= 1.15 |
|
15 | 13 |
|
16 |
-%define _prefix /var/opt/apache-maven-3.3.9 |
|
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 |
|
19 |
+BuildRequires: wget >= 1.15 |
|
20 |
+ |
|
21 |
+%define _prefix /var/opt/apache-maven-%{version} |
|
17 | 22 |
%define _bindir %{_prefix}/bin |
18 | 23 |
%define _libdir %{_prefix}/lib |
19 | 24 |
|
... | ... |
@@ -26,22 +31,23 @@ The Maven package contains binaries for a build system |
26 | 26 |
find . -name build.xml | xargs sed -i 's/timeout="600000"/timeout="1200000"/g' |
27 | 27 |
|
28 | 28 |
%build |
29 |
-MAVEN_DIST_DIR=/var/opt/apache-maven-3.3.9 |
|
29 |
+MAVEN_DIST_DIR=%{_prefix} |
|
30 | 30 |
|
31 |
-export JAVA_HOME=/var/opt/OpenJDK-1.8.0.112-bin |
|
32 |
-export ANT_HOME=/var/opt/apache-ant-1.9.6 |
|
31 |
+export JAVA_HOME=%{_java_home} |
|
32 |
+export ANT_HOME=%{_ant_home} |
|
33 | 33 |
export PATH=$PATH:$ANT_HOME/bin |
34 | 34 |
|
35 | 35 |
sed -i 's/www.opensource/opensource/g' DEPENDENCIES |
36 | 36 |
ant -Dmaven.home=$MAVEN_DIST_DIR |
37 | 37 |
|
38 | 38 |
%install |
39 |
+MAVEN_DIST_DIR=%{_prefix} |
|
39 | 40 |
|
40 |
-[ %{buildroot} != "/"] && rm -rf %{buildroot}/* |
|
41 |
+[ %{buildroot} != "/" ] && rm -rf %{buildroot}/* |
|
41 | 42 |
|
42 | 43 |
mkdir -p -m 700 %{buildroot}/var/opt |
43 | 44 |
|
44 |
-cp -r /var/opt/apache-maven-3.3.9 %{buildroot}/var/opt |
|
45 |
+cp -r "$MAVEN_DIST_DIR" %{buildroot}/var/opt |
|
45 | 46 |
|
46 | 47 |
install -d -m 755 %{buildroot}/etc/profile.d/ |
47 | 48 |
|
... | ... |
@@ -63,6 +69,8 @@ echo 'export MAVEN_OPTS=-Xms256m' >> %{buildroot}/etc/profile.d/%{name}.sh |
63 | 63 |
%{_prefix}/conf/toolchains.xml |
64 | 64 |
|
65 | 65 |
%changelog |
66 |
+* Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.3.9-8 |
|
67 |
+- use java rpm macros to determine versions |
|
66 | 68 |
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 3.3.9-7 |
67 | 69 |
- Updated JAVA_HOME path to point to latest JDK. |
68 | 70 |
* Thu Oct 27 2016 Alexey Makhalov <amakhalov@vmware.com> 3.3.9-6 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Apache Commons Daemon |
2 | 2 |
Name: commons-daemon |
3 | 3 |
Version: 1.0.15 |
4 |
-Release: 8%{?dist} |
|
4 |
+Release: 9%{?dist} |
|
5 | 5 |
License: Apache |
6 | 6 |
URL: http://commons.apache.org/proper/commons-daemon |
7 | 7 |
Group: Applications/System |
... | ... |
@@ -10,8 +10,12 @@ 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 |
-Requires: openjre >= 1.8.0.112 |
|
14 |
-BuildRequires: openjre >= 1.8.0.45, openjdk >= 1.8.0.45, apache-ant >= 1.9.6 |
|
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 |
|
15 | 19 |
|
16 | 20 |
%define _prefix /var/opt/%{name}-%{version} |
17 | 21 |
%define _bindir %{_prefix}/bin |
... | ... |
@@ -23,8 +27,8 @@ The JNA package contains libraries for interop from Java to native libraries. |
23 | 23 |
|
24 | 24 |
%setup -q -n %{name}-%{version}-src |
25 | 25 |
%build |
26 |
-ANT_HOME=/var/opt/apache-ant-1.9.6 |
|
27 |
-export JAVA_HOME=/var/opt/OpenJDK-1.8.0.112-bin |
|
26 |
+ANT_HOME=%{_ant_home} |
|
27 |
+export JAVA_HOME=%{_java_home} |
|
28 | 28 |
|
29 | 29 |
$ANT_HOME/bin/ant dist |
30 | 30 |
|
... | ... |
@@ -39,7 +43,7 @@ cd $CURDIR |
39 | 39 |
|
40 | 40 |
%install |
41 | 41 |
|
42 |
-ANT_HOME=/var/opt/apache-ant-1.9.6 |
|
42 |
+ANT_HOME=%{_ant_home} |
|
43 | 43 |
DIST_DIR=%{buildroot}%{_prefix} |
44 | 44 |
|
45 | 45 |
[ %{buildroot} != "/"] && rm -rf %{buildroot}/* |
... | ... |
@@ -58,6 +62,8 @@ chmod -R 755 $DIST_DIR |
58 | 58 |
%{_prefix}/*.jar |
59 | 59 |
|
60 | 60 |
%changelog |
61 |
+* Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0.15-9 |
|
62 |
+- use java rpm macros to determine versions |
|
61 | 63 |
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0.15-8 |
62 | 64 |
- Updated JAVA_HOME path to point to latest JDK. |
63 | 65 |
* Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.0.15-7 |
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Java Native Access |
2 | 2 |
Name: jna |
3 | 3 |
Version: 4.4.0 |
4 |
-Release: 1%{?dist} |
|
4 |
+Release: 2%{?dist} |
|
5 | 5 |
License: Apache |
6 | 6 |
URL: http://github.com/twall/jna |
7 | 7 |
Group: Applications/System |
... | ... |
@@ -10,8 +10,12 @@ Distribution: Photon |
10 | 10 |
BuildArch: x86_64 |
11 | 11 |
Source0: https://github.com/java-native-access/jna/archive/%{version}/%{name}-%{version}.tar.gz |
12 | 12 |
%define sha1 jna=d9b54e98393a696f458468bc8f3167f701a9ea9f |
13 |
-Requires: openjre >= 1.8.0.112 |
|
14 |
-BuildRequires: openjre >= 1.8.0.45, openjdk >= 1.8.0.45, apache-ant >= 1.9.6 |
|
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 |
|
15 | 19 |
|
16 | 20 |
%define _prefix /var/opt/jna-4.4.0 |
17 | 21 |
|
... | ... |
@@ -30,8 +34,8 @@ Sources for JNA |
30 | 30 |
|
31 | 31 |
%setup -q |
32 | 32 |
%build |
33 |
-ANT_HOME=/var/opt/apache-ant-1.9.6 |
|
34 |
-export JAVA_HOME=/var/opt/OpenJDK-1.8.0.112-bin |
|
33 |
+ANT_HOME=%{_ant_home} |
|
34 |
+export JAVA_HOME=%{_java_home} |
|
35 | 35 |
|
36 | 36 |
#disabling all tests |
37 | 37 |
$ANT_HOME/bin/ant -Dcflags_extra.native=-DNO_JAWT -Dtests.exclude-patterns="**/*.java" -Drelease=true |
... | ... |
@@ -39,7 +43,7 @@ $ANT_HOME/bin/ant -Dcflags_extra.native=-DNO_JAWT -Dtests.exclude-patterns="**/* |
39 | 39 |
|
40 | 40 |
%install |
41 | 41 |
|
42 |
-ANT_HOME=/var/opt/apache-ant-1.9.6 |
|
42 |
+ANT_HOME=%{_ant_home} |
|
43 | 43 |
JNA_DIST_DIR=%{buildroot}%{_prefix} |
44 | 44 |
|
45 | 45 |
[ %{buildroot} != "/"] && rm -rf %{buildroot}/* |
... | ... |
@@ -66,6 +70,8 @@ $ANT_HOME/bin/ant -Ddist=$JNA_DIST_DIR dist -Drelease=true |
66 | 66 |
%{_prefix}/*.aar |
67 | 67 |
|
68 | 68 |
%changelog |
69 |
+* Tue Apr 04 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.4.0-2 |
|
70 |
+- use java rpm macros to determine versions |
|
69 | 71 |
* Mon Apr 03 2017 Divya Thaluru <dthaluru@vmware.com> 4.4.0-1 |
70 | 72 |
- Updated package to version 4.4.0 |
71 | 73 |
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 4.2.1-6 |
72 | 74 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,9 @@ |
0 |
+#java rpm macros |
|
1 |
+%_java_exports /etc/profile.d/java-exports.sh |
|
2 |
+%_java_home %( [[ -f "%{_java_exports}" ]] && echo `cat "%{_java_exports}" | grep -m1 JAVA_HOME | cut -d'=' -f2` ) |
|
3 |
+#ant |
|
4 |
+%_ant_exports /etc/profile.d/apache-ant.sh |
|
5 |
+%_ant_home %( [[ -f "%{_ant_exports}" ]] && echo `cat "%{_ant_exports}" | grep -m1 ANT_HOME | cut -d'=' -f2` ) |
|
6 |
+#maven |
|
7 |
+%_maven_exports /etc/profile.d/apache-maven.sh |
|
8 |
+%_maven_home %( [[ -f "%{_maven_exports}" ]] && echo `cat "%{_maven_exports}" | grep -m1 MAVEN_HOME | cut -d'=' -f2` ) |
... | ... |
@@ -2,7 +2,7 @@ |
2 | 2 |
Summary: OpenJDK |
3 | 3 |
Name: openjdk |
4 | 4 |
Version: 1.8.0.112 |
5 |
-Release: 1%{?dist} |
|
5 |
+Release: 2%{?dist} |
|
6 | 6 |
License: GNU GPL |
7 | 7 |
URL: https://openjdk.java.net |
8 | 8 |
Group: Development/Tools |
... | ... |
@@ -10,6 +10,7 @@ Vendor: VMware, Inc. |
10 | 10 |
Distribution: Photon |
11 | 11 |
Source0: http://anduin.linuxfromscratch.org/files/BLFS/OpenJDK/OpenJDK-%{version}-x86_64-bin.tar.xz |
12 | 12 |
%define sha1 OpenJDK=c14a20158e16a8877940cfa6dbdf0900d4099a4a |
13 |
+Source1: macros.java |
|
13 | 14 |
Requires: openjre = %{version}-%{release} |
14 | 15 |
AutoReqProv: no |
15 | 16 |
%description |
... | ... |
@@ -49,6 +50,8 @@ Requires: %{name} = %{version}-%{release} |
49 | 49 |
%build |
50 | 50 |
|
51 | 51 |
%install |
52 |
+install -vdm755 %{buildroot}%{_rpmconfigdir}/macros.d |
|
53 |
+install -m 644 %{SOURCE1} %{buildroot}/%{_rpmconfigdir}/macros.d/ |
|
52 | 54 |
install -vdm755 %{buildroot}/var/opt/OpenJDK-%{version}-bin |
53 | 55 |
mv -v %{_builddir}/OpenJDK-%{version}-x86_64-bin/* %{buildroot}/var/opt/OpenJDK-%{version}-bin/ |
54 | 56 |
chown -R root:root %{buildroot}/var/opt/OpenJDK-%{version}-bin |
... | ... |
@@ -121,6 +124,7 @@ rm -rf %{buildroot}/* |
121 | 121 |
/var/opt/OpenJDK-%{version}-bin/bin/unpack200 |
122 | 122 |
/var/opt/OpenJDK-%{version}-bin/lib/amd64/jli/ |
123 | 123 |
/etc/profile.d/java-exports.sh |
124 |
+%{_rpmconfigdir}/macros.d/macros.java |
|
124 | 125 |
|
125 | 126 |
%files sample |
126 | 127 |
%defattr(-,root,root) |
... | ... |
@@ -136,6 +140,8 @@ rm -rf %{buildroot}/* |
136 | 136 |
/var/opt/OpenJDK-%{version}-bin/src.zip |
137 | 137 |
|
138 | 138 |
%changelog |
139 |
+* Tue Mar 28 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.112-2 |
|
140 |
+- add java rpm macros |
|
139 | 141 |
* Wed Dec 21 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.112-1 |
140 | 142 |
- Update to 1.8.0.112. addresses CVE-2016-5582 CVE-2016-5573 |
141 | 143 |
* Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.8.0.102-1 |