Change-Id: Id368016b1a81274e8bdcfaec1a2057d98f11b622
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2664
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
... | ... |
@@ -1,7 +1,7 @@ |
1 | 1 |
Summary: Apache Ant |
2 | 2 |
Name: apache-ant |
3 | 3 |
Version: 1.10.1 |
4 |
-Release: 2%{?dist} |
|
4 |
+Release: 3%{?dist} |
|
5 | 5 |
License: Apache |
6 | 6 |
URL: http://ant.apache.org |
7 | 7 |
Group: Applications/System |
... | ... |
@@ -44,7 +44,7 @@ mkdir -p -m 700 %{buildroot}/var/opt |
44 | 44 |
|
45 | 45 |
cp -r /var/opt/apache-ant-%{version} %{buildroot}/var/opt |
46 | 46 |
|
47 |
-cp %{_builddir}/%{name}-%{version}/maven-ant-tasks-2.1.3/maven-ant-tasks-2.1.3.jar %{buildroot}/%{_libdir}/ |
|
47 |
+cp %{_builddir}/%{name}-%{version}/maven-ant-tasks-2.1.3/maven-ant-tasks-2.1.3.jar %{buildroot}/%{_libdir}/ |
|
48 | 48 |
|
49 | 49 |
MAVEN_ANT_TASKS_DIR=%{buildroot}/var/opt/%{name}-%{version}/maven-ant-tasks |
50 | 50 |
|
... | ... |
@@ -57,7 +57,10 @@ chmod 644 $MAVEN_ANT_TASKS_DIR/* |
57 | 57 |
|
58 | 58 |
install -d -m 755 %{buildroot}/etc/profile.d/ |
59 | 59 |
|
60 |
-echo 'export ANT_HOME=/var/opt/%{name}-%{version}' > %{buildroot}/etc/profile.d/%{name}.sh |
|
60 |
+cat >> %{buildroot}/etc/profile.d/%{name}.sh <<- "EOF" |
|
61 |
+export ANT_HOME=/var/opt/%{name}-%{version} |
|
62 |
+export PATH="$PATH:$ANT_HOME/bin" |
|
63 |
+EOF |
|
61 | 64 |
|
62 | 65 |
%files |
63 | 66 |
%defattr(-,root,root) |
... | ... |
@@ -67,8 +70,10 @@ echo 'export ANT_HOME=/var/opt/%{name}-%{version}' > %{buildroot}/etc/profile.d/ |
67 | 67 |
%{_sysconfdir}/profile.d/%{name}.sh |
68 | 68 |
|
69 | 69 |
%changelog |
70 |
-* Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.1-2 |
|
71 |
-- Renamed openjdk to openjdk8 |
|
70 |
+* Mon Jun 05 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.1-3 |
|
71 |
+- Fixed the profile.d/apache-ant.sh script to include ant in $PATH |
|
72 |
+* Thu May 18 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.10.1-2 |
|
73 |
+- Renamed openjdk to openjdk8 |
|
72 | 74 |
* Mon Apr 17 2017 Chang Lee <changlee@vmware.com> 1.10.1-1 |
73 | 75 |
- Updated Apache Ant to 1.10.1 |
74 | 76 |
* Fri Mar 31 2017 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-6 |
... | ... |
@@ -77,8 +82,8 @@ echo 'export ANT_HOME=/var/opt/%{name}-%{version}' > %{buildroot}/etc/profile.d/ |
77 | 77 |
- Updated JAVA_HOME path to point to latest JDK. |
78 | 78 |
* Tue Oct 04 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-4 |
79 | 79 |
- Updated JAVA_HOME path to point to latest JDK. |
80 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-3 |
|
81 |
-- GA - Bump release of all rpms |
|
80 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 1.9.6-3 |
|
81 |
+- GA - Bump release of all rpms |
|
82 | 82 |
* Fri May 20 2016 Divya Thaluru <dthaluru@vmware.com> 1.9.6-2 |
83 | 83 |
- Updated JAVA_HOME path to point to latest JDK. |
84 | 84 |
* Tue Feb 29 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 1.9.6-1 |
85 | 85 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,30 @@ |
0 |
+--- a/build.xml 2017-01-31 08:17:48.000000000 -0800 |
|
1 |
+@@ -414,11 +414,11 @@ |
|
2 |
+ <dependency groupId="org.jacoco" artifactId="org.jacoco.agent" version="${jacoco.version}"/> |
|
3 |
+ <dependency groupId="org.jacoco" artifactId="org.jacoco.ant" version="${jacoco.version}"/> |
|
4 |
+ |
|
5 |
++ <dependency groupId="org.jboss.byteman" artifactId="byteman-install" version="${byteman.version}" scope="test"/> |
|
6 |
+ <dependency groupId="org.jboss.byteman" artifactId="byteman" version="${byteman.version}"/> |
|
7 |
+ <dependency groupId="org.jboss.byteman" artifactId="byteman-submit" version="${byteman.version}"/> |
|
8 |
+ <dependency groupId="org.jboss.byteman" artifactId="byteman-bmunit" version="${byteman.version}"/> |
|
9 |
+ |
|
10 |
+- |
|
11 |
+ <dependency groupId="org.openjdk.jmh" artifactId="jmh-core" version="1.13"/> |
|
12 |
+ <dependency groupId="org.openjdk.jmh" artifactId="jmh-generator-annprocess" version="1.13"/> |
|
13 |
+ |
|
14 |
+@@ -539,9 +539,10 @@ |
|
15 |
+ version="${version}"/> |
|
16 |
+ <dependency groupId="org.jacoco" artifactId="org.jacoco.agent"/> |
|
17 |
+ <dependency groupId="org.jacoco" artifactId="org.jacoco.ant" /> |
|
18 |
+- <dependency groupId="org.jboss.byteman" artifactId="byteman"/> |
|
19 |
+- <dependency groupId="org.jboss.byteman" artifactId="byteman-submit"/> |
|
20 |
+- <dependency groupId="org.jboss.byteman" artifactId="byteman-bmunit"/> |
|
21 |
++ <dependency groupId="org.jboss.byteman" artifactId="byteman-install" scope="test"/> |
|
22 |
++ <dependency groupId="org.jboss.byteman" artifactId="byteman" scope="test"/> |
|
23 |
++ <dependency groupId="org.jboss.byteman" artifactId="byteman-submit" scope="test"/> |
|
24 |
++ <dependency groupId="org.jboss.byteman" artifactId="byteman-bmunit" scope="test"/> |
|
25 |
+ </artifact:pom> |
|
26 |
+ |
|
27 |
+ <artifact:pom id="test-deps-pom" |
|
28 |
+ |
0 | 29 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
0 |
+[Unit] |
|
1 |
+Description=Apache Cassandra |
|
2 |
+After=network.target |
|
3 |
+ |
|
4 |
+[Service] |
|
5 |
+EnvironmentFile=/etc/sysconfig/cassandra |
|
6 |
+Type=forking |
|
7 |
+PIDFile=/var/run/cassandra.pid |
|
8 |
+ExecStart=/usr/sbin/cassandra -f -p /var/run/cassandra.pid |
|
9 |
+User=cassandra |
|
10 |
+Group=cassandra |
|
11 |
+StandardError=journal |
|
12 |
+StandardOutput=journal |
|
13 |
+Restart=always |
|
14 |
+RestartSec=30 |
|
15 |
+LimitNOFILE=infinity |
|
16 |
+ |
|
17 |
+[Install] |
|
18 |
+WantedBy=multi-user.target |
0 | 19 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,122 @@ |
0 |
+#%global debug_package %{nil} |
|
1 |
+%global __os_install_post %{nil} |
|
2 |
+Summary: Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store |
|
3 |
+Name: cassandra |
|
4 |
+Version: 3.10 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+URL: http://cassandra.apache.org/ |
|
7 |
+License: Apache License, Version 2.0 |
|
8 |
+Group: Applications/System |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+Source0: https://repo1.maven.org/maven2/org/apache/cassandra/apache-cassandra/3.10/apache-%{name}-%{version}-src.tar.gz |
|
12 |
+%define sha1 apache-cassandra=fa2bbeb62f930f5ff6fccee60cfb837d0794633a |
|
13 |
+Source1: cassandra.service |
|
14 |
+Patch0: build-fix.patch |
|
15 |
+BuildRequires: apache-ant |
|
16 |
+BuildRequires: unzip zip |
|
17 |
+BuildRequires: openjdk8 >= %{JAVA8_VERSION} |
|
18 |
+Requires: openjre8 >= %{JAVA8_VERSION} |
|
19 |
+%description |
|
20 |
+Cassandra is a highly scalable, eventually consistent, distributed, structured key-value store. Cassandra brings together the distributed systems technologies from Dynamo and the log-structured storage engine from Google's BigTable. |
|
21 |
+ |
|
22 |
+%prep |
|
23 |
+%setup -qn apache-%{name}-%{version}-src |
|
24 |
+%patch0 -p1 |
|
25 |
+ |
|
26 |
+%build |
|
27 |
+source /etc/profile.d/apache-ant.sh |
|
28 |
+export JAVA_HOME=/usr/lib/jvm/OpenJDK-%{JAVA8_VERSION} |
|
29 |
+ant jar javadoc -Drelease=true |
|
30 |
+ |
|
31 |
+%install |
|
32 |
+mkdir -p %{buildroot}/var/opt/%{name}/data |
|
33 |
+mkdir -p %{buildroot}/var/log/%{name} |
|
34 |
+mkdir -p %{buildroot}%{_bindir} |
|
35 |
+mkdir -p %{buildroot}%{_sbindir} |
|
36 |
+mkdir -p %{buildroot}%{_datadir}/cassandra |
|
37 |
+mkdir -p %{buildroot}%{_sysconfdir}/cassandra |
|
38 |
+mkdir -p %{buildroot}%{_sysconfdir}/sysconfig |
|
39 |
+mkdir -p %{buildroot}/etc/profile.d |
|
40 |
+mkdir -p %{buildroot}/var/opt/cassandra |
|
41 |
+ |
|
42 |
+cp bin/%{name} %{buildroot}%{_sbindir} |
|
43 |
+cp bin/%{name}.in.sh %{buildroot}%{_datadir}/cassandra/ |
|
44 |
+cp bin/nodetool %{buildroot}%{_bindir}/ |
|
45 |
+cp bin/sstableloader %{buildroot}%{_bindir}/ |
|
46 |
+cp bin/sstablescrub %{buildroot}%{_bindir}/ |
|
47 |
+cp bin/sstableupgrade %{buildroot}%{_bindir}/ |
|
48 |
+cp bin/sstableutil %{buildroot}%{_bindir}/ |
|
49 |
+cp bin/sstableverify %{buildroot}%{_bindir}/ |
|
50 |
+cp bin/cqlsh %{buildroot}%{_bindir}/ |
|
51 |
+cp bin/cqlsh.py %{buildroot}%{_bindir}/ |
|
52 |
+cp conf/cassandra-env.sh %{buildroot}%{_sysconfdir}/cassandra/ |
|
53 |
+cp conf/cassandra.yaml %{buildroot}%{_sysconfdir}/cassandra/ |
|
54 |
+cp conf/cassandra-jaas.config %{buildroot}%{_sysconfdir}/cassandra/ |
|
55 |
+cp conf/cassandra-topology.properties %{buildroot}%{_sysconfdir}/cassandra/ |
|
56 |
+cp conf/jvm.options %{buildroot}%{_sysconfdir}/cassandra/ |
|
57 |
+cp conf/logback-tools.xml %{buildroot}%{_sysconfdir}/cassandra/ |
|
58 |
+cp conf/logback.xml %{buildroot}%{_sysconfdir}/cassandra/ |
|
59 |
+cp conf/metrics-reporter-config-sample.yaml %{buildroot}%{_sysconfdir}/cassandra/ |
|
60 |
+cp -r lib %{buildroot}/var/opt/cassandra/ |
|
61 |
+cp -r build %{buildroot}/var/opt/cassandra/ |
|
62 |
+cp tools/bin/cassandra-stress %{buildroot}%{_bindir} |
|
63 |
+cp tools/bin/cassandra-stressd %{buildroot}%{_bindir} |
|
64 |
+cp tools/bin/sstabledump %{buildroot}%{_bindir}/ |
|
65 |
+cp tools/bin/sstableexpiredblockers %{buildroot}%{_bindir}/sstableexpiredblockers |
|
66 |
+cp tools/bin/sstablelevelreset %{buildroot}%{_bindir}/sstablelevelreset |
|
67 |
+cp tools/bin/sstablemetadata %{buildroot}%{_bindir}/sstablemetadata |
|
68 |
+cp tools/bin/sstableofflinerelevel %{buildroot}%{_bindir}/sstableofflinerelevel |
|
69 |
+cp tools/bin/sstablerepairedset %{buildroot}%{_bindir}/sstablerepairedset |
|
70 |
+cp tools/bin/sstablesplit %{buildroot}%{_bindir}/sstablesplit |
|
71 |
+cp tools/bin/cassandra-stress %{buildroot}%{_bindir}/ |
|
72 |
+cp tools/bin/cassandra-stressd %{buildroot}%{_bindir}/ |
|
73 |
+ |
|
74 |
+ |
|
75 |
+ |
|
76 |
+mkdir -p %{buildroot}/lib/systemd/system |
|
77 |
+install -p -D -m 644 %{SOURCE1} %{buildroot}/lib/systemd/system/%{name}.service |
|
78 |
+ |
|
79 |
+cat >> %{buildroot}/etc/sysconfig/cassandra <<- "EOF" |
|
80 |
+CASSANDRA_HOME=/var/opt/cassandra/ |
|
81 |
+CASSANDRA_CONF=%{_sysconfdir}/cassandra/ |
|
82 |
+EOF |
|
83 |
+ |
|
84 |
+cat >> %{buildroot}/etc/profile.d/cassandra.sh <<- "EOF" |
|
85 |
+export CASSANDRA_HOME=/var/opt/cassandra/ |
|
86 |
+export CASSANDRA_CONF=%{_sysconfdir}/cassandra/ |
|
87 |
+EOF |
|
88 |
+ |
|
89 |
+%pre |
|
90 |
+getent group cassandra >/dev/null || /usr/sbin/groupadd -r cassandra |
|
91 |
+getent passwd cassandra >/dev/null || /usr/sbin/useradd --comment "Cassandra" --shell /bin/bash -M -r --groups cassandra --home /var/opt/%{name}/data cassandra |
|
92 |
+ |
|
93 |
+%post |
|
94 |
+%{_sbindir}/ldconfig |
|
95 |
+chown -R cassandra: /var/opt/cassandra |
|
96 |
+source /etc/profile.d/cassandra.sh |
|
97 |
+%systemd_post cassandra.service |
|
98 |
+ |
|
99 |
+%postun |
|
100 |
+%systemd_postun_with_restart cassandra.service |
|
101 |
+if [ $1 -eq 0 ] ; then |
|
102 |
+ /usr/sbin/userdel cassandra |
|
103 |
+ /usr/sbin/groupdel cassandra |
|
104 |
+fi |
|
105 |
+/sbin/ldconfig |
|
106 |
+ |
|
107 |
+%files |
|
108 |
+%defattr(-,root,root) |
|
109 |
+%doc README.asc CHANGES.txt NEWS.txt conf/cqlshrc.sample LICENSE.txt NOTICE.txt |
|
110 |
+%{_bindir}/* |
|
111 |
+%{_datadir}/cassandra |
|
112 |
+/var/opt/cassandra |
|
113 |
+%{_sbindir} |
|
114 |
+%{_sysconfdir}/cassandra |
|
115 |
+%{_sysconfdir}/sysconfig/cassandra |
|
116 |
+/etc/profile.d/cassandra.sh |
|
117 |
+/lib/systemd/system/cassandra.service |
|
118 |
+ |
|
119 |
+%changelog |
|
120 |
+* Mon May 08 2017 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 3.10-1 |
|
121 |
+- Initial build. First version |
... | ... |
@@ -369,7 +369,7 @@ class SpecParser(object): |
369 | 369 |
print "Error: Can not find match for sha1 "+value[0] |
370 | 370 |
return False |
371 | 371 |
if (len(matchedSources) > 1): |
372 |
- print "Error: Too many matches in sources: "+matchedSources+" for sha1 "+value[0] |
|
372 |
+ print "Error: Too many matched Sources:" + ' '.join(matchedSources) + " for sha1 "+value[0] |
|
373 | 373 |
return False |
374 | 374 |
pkg.checksums[sourceName] = value[1] |
375 | 375 |
return True; |