]> git.pld-linux.org Git - packages/cassandra-bin.git/blobdiff - cassandra-bin.spec
Version 2.1.12. R: jre >= 1.7 C: java-jna. Release 1. Works for me.
[packages/cassandra-bin.git] / cassandra-bin.spec
index afe45fe3533a779318801b68d877ee51f6e2221b..80d8ed6dc8a2eb420442e2f33c00f7cc4f707f64 100644 (file)
@@ -4,29 +4,37 @@
 # TODO: Consider adding
 #              cassandra       -       memlock unlimited
 #   to /etc/security/limits.conf ?
+# TODO: C java-jna is only valid with openjdk8-jre ?
+#   cassandra running java from openjdk8-jre-8u66.b02-2.x86_64  fails with  java-jna-4.2.1-1.x86_64 but without clamis JNA to work in logs 
 
 %define        shname cassandra
 %include       /usr/lib/rpm/macros.java
 Summary:       Cassandra database binary package
 Summary(pl.UTF-8):     Binarna redystrybucja bazy danych Cassandra
 Name:          cassandra-bin
-Version:       0.8.10
+Version:       2.1.12
 Release:       1
 License:       ASF
 Group:         Applications/Databases
-# http://www.apache.org/dyn/closer.cgi?path=/cassandra/0.8.7/apache-cassandra-0.8.7-bin.tar.gz
-Source0:       http://ftp.tpnet.pl/vol/d1/apache//cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
-# Source0-md5: 27f825984d738dfba2846a63ade5b2c8
+Source0:       ftp://ftp.task.gda.pl/pub/www/apache/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
+# Source0-md5: 1155a502c30ec3797bee11b0412733c9
 Source1:       cassandra.in.sh
 Source2:       %{shname}.init
 Source3:       %{name}.tmpfiles
 Patch0:                %{name}-jamm_path_fix.patch
+Patch1:                %{name}-cqlsh_path_fix.patch
+Patch2:                %{name}-pld_logging.patch
 URL:           http://cassandra.apache.org/
+BuildRequires: python-distribute
 BuildRequires: rpm-javaprov
-BuildRequires: rpmbuild(macros) >= 1.300
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.710
 Requires(post,preun):  /sbin/chkconfig
+Requires:      python
+Requires:      python-modules
 Requires:      rc-scripts
-Suggests:      java-jna
+Requires:      jre >= 1.7 
+Conflicts:     java-jna
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -45,20 +53,40 @@ oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości.
 %prep
 %setup -q -n apache-cassandra-%{version}
 %patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+# current version of cqlsh supports only python 2.
+cd pylib
+%py_build %{?with_tests:test}
+cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,%{_sysconfdir}/%{shname},%{_bindir},%{_sbindir},%{_datadir}/%{shname}} \
        $RPM_BUILD_ROOT/var/{lib/%{shname}/{commitlog,conf,data,saved_caches},{log,run}/%{shname}} \
-       $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
+       $RPM_BUILD_ROOT%{systemdtmpfilesdir}
+
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
 
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
-cp -p bin/{*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
+rm bin/*.bat
+cp -p bin/{cqlsh,*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
 cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir}
 cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
-cp -p conf/{*.properties,cassandra-env.sh,cassandra.yaml,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
+# use bundled libs for python-cql - from cqlsh doc
+# cp -p %{SOURCE1} lib/cql-internal-only-1.4.2.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
+# cp -p %{SOURCE1} lib/thrift-python-internal-only-0.9.1.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
+cp -p %{SOURCE1} lib/*.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
+cp -p conf/{*.properties,*.yaml,*.xml,cassandra-env.sh,hotspot_compiler,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
+# ,triggers
+install -d $RPM_BUILD_ROOT/var/lib/%{shname}/conf/triggers
+cp -p conf/triggers/*.txt  $RPM_BUILD_ROOT/var/lib/%{shname}/conf/triggers
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{shname}.conf
 
-install %{SOURCE3} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{shname}.conf
+cd pylib
+%py_install
+cd ..
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -79,25 +107,35 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc CHANGES.txt LICENSE.txt README.txt NEWS.txt NOTICE.txt
+%doc CHANGES.txt LICENSE.txt NEWS.txt NOTICE.txt
 %attr(754,root,root) /etc/rc.d/init.d/cassandra
 %attr(755,root,root) %{_bindir}/cassandra-cli
+%attr(755,root,root) %{_bindir}/cqlsh
 %attr(755,root,root) %{_bindir}/nodetool
-# %attr(755,root,root) %{_bindir}/clustertool
-%attr(755,root,root) %{_bindir}/json2sstable
-%attr(755,root,root) %{_bindir}/sstable2json
-%attr(755,root,root) %{_bindir}/sstableloader
-# %attr(755,root,root) %{_bindir}/schematool
-# %attr(755,root,root) %{_bindir}/config-converter
+# %attr(755,root,root) %{_bindir}/json2sstable
+## %attr(755,root,root) %{_bindir}/sstable2json
+%attr(755,root,root) %{_bindir}/sstablescrub
 %attr(755,root,root) %{_bindir}/sstablekeys
+%attr(755,root,root) %{_bindir}/sstableloader
+## %attr(755,root,root) %{_bindir}/sstablesplit
+%attr(755,root,root) %{_bindir}/sstableupgrade
 %attr(755,root,root) %{_sbindir}/cassandra
 %{_datadir}/%{shname}
-/usr/lib/tmpfiles.d/%{shname}.conf
+%{systemdtmpfilesdir}/%{shname}.conf
 %attr(750,cassandra,cassandra) %dir /var/lib/%{shname}
 %attr(750,root,cassandra) %dir /var/lib/%{shname}/conf
 %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties
 %attr(755,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.sh
 %attr(640,root,cassandra) /var/lib/%{shname}/conf/*.txt
 %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml
+%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.xml
+%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/hotspot_compiler
+%attr(750,cassandra,cassandra) %dir /var/lib/%{shname}/conf/triggers
+%attr(640,root,cassandra) /var/lib/%{shname}/conf/triggers/*.txt
+
 %attr(750,cassandra,cassandra) %dir /var/log/%{shname}
 %attr(750,cassandra,cassandra) %dir /var/run/%{shname}
+%{py_sitescriptdir}/cqlshlib
+%if "%{py_ver}" > "2.4"
+       %{py_sitescriptdir}/cassandra_pylib-0.0.0-py*.egg-info
+%endif
This page took 0.206944 seconds and 4 git commands to generate.