]> git.pld-linux.org Git - packages/cassandra-bin.git/blame - cassandra-bin.spec
Version 2.1.16.
[packages/cassandra-bin.git] / cassandra-bin.spec
CommitLineData
4e6d3cb2 1# TODO: Fix .init cassandra status does not work now.
16c24e02
MK
2# TODO: Fix .init stop routine it is now subset of PLD default one
3# TODO: Fix of data/ cassandra created dirs/files privilages (now they are all readable)
f60c3231 4# TODO: Consider adding
4e6d3cb2 5# cassandra - memlock unlimited
16c24e02 6# to /etc/security/limits.conf ?
63a7728c
MK
7# TODO: C java-jna is only valid with openjdk8-jre ?
8# 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
3f05bde6 9
4e6d3cb2 10%define shname cassandra
f60c3231 11%include /usr/lib/rpm/macros.java
087ae4ed 12Summary: Cassandra database binary package
4e6d3cb2 13Summary(pl.UTF-8): Binarna redystrybucja bazy danych Cassandra
087ae4ed 14Name: cassandra-bin
59e906cd
MK
15Version: 2.1.16
16Release: 1
3f05bde6
MK
17License: ASF
18Group: Applications/Databases
b4f49f9b 19Source0: ftp://ftp.task.gda.pl/pub/www/apache/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
59e906cd 20# Source0-md5: cc11eadd767e0200d412b7a0bde6a9f5
087ae4ed
MK
21Source1: cassandra.in.sh
22Source2: %{shname}.init
687fc4b6 23Source3: %{name}.tmpfiles
40af29a9 24Patch0: %{name}-jamm_path_fix.patch
93a9c726 25Patch1: %{name}-cqlsh_path_fix.patch
5422f39a 26Patch2: %{name}-pld_logging.patch
3f05bde6 27URL: http://cassandra.apache.org/
fdc8d9a4 28BuildRequires: python-distribute
3f05bde6 29BuildRequires: rpm-javaprov
fdc8d9a4 30BuildRequires: rpm-pythonprov
8006c5d6 31BuildRequires: rpmbuild(macros) >= 1.710
f60c3231 32Requires(post,preun): /sbin/chkconfig
fdc8d9a4
MK
33Requires: python
34Requires: python-modules
f60c3231 35Requires: rc-scripts
63a7728c
MK
36Requires: jre >= 1.7
37Conflicts: java-jna
3f05bde6
MK
38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
087ae4ed
MK
41Cassandra brings together the distributed systems technologies from
42Dynamo and the data model from Google's BigTable. Like Dynamo,
43Cassandra is eventually consistent. Like BigTable, Cassandra provides
44a ColumnFamily-based data model richer than typical key/value systems.
3f05bde6
MK
45
46%description -l pl.UTF-8
4e6d3cb2
TP
47Cassandra łączy technologie systemów rozproszonych z Dynamo i model
48danych z googlowskiego BigTable. Tak jak Dynamo, Cassandra jest
087ae4ed 49ostatecznie spójna. Tak jak BigTable daje do dyspozycji model danych
4e6d3cb2 50oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości.
3f05bde6
MK
51
52%prep
b51a24b8 53%setup -q -n apache-cassandra-%{version}
40af29a9 54%patch0 -p1
93a9c726 55%patch1 -p1
5422f39a 56%patch2 -p1
93a9c726
MK
57
58%build
59# current version of cqlsh supports only python 2.
60cd pylib
271a98d0 61%py_build %{?with_tests:test}
93a9c726 62cd ..
3f05bde6 63
3f05bde6
MK
64%install
65rm -rf $RPM_BUILD_ROOT
4e6d3cb2 66install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,%{_sysconfdir}/%{shname},%{_bindir},%{_sbindir},%{_datadir}/%{shname}} \
687fc4b6 67 $RPM_BUILD_ROOT/var/{lib/%{shname}/{commitlog,conf,data,saved_caches},{log,run}/%{shname}} \
b4f49f9b 68 $RPM_BUILD_ROOT%{systemdtmpfilesdir}
4e6d3cb2 69
fdc8d9a4 70cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra
93a9c726
MK
71
72rm bin/*.bat
73cp -p bin/{cqlsh,*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir}
4e6d3cb2
TP
74cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir}
75cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
93a9c726 76# use bundled libs for python-cql - from cqlsh doc
0aa3a378
MK
77# cp -p %{SOURCE1} lib/cql-internal-only-1.4.2.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
78# cp -p %{SOURCE1} lib/thrift-python-internal-only-0.9.1.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
79cp -p %{SOURCE1} lib/*.zip $RPM_BUILD_ROOT%{_datadir}/%{shname}
5422f39a
MK
80cp -p conf/{*.properties,*.yaml,*.xml,cassandra-env.sh,hotspot_compiler,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
81# ,triggers
82install -d $RPM_BUILD_ROOT/var/lib/%{shname}/conf/triggers
83cp -p conf/triggers/*.txt $RPM_BUILD_ROOT/var/lib/%{shname}/conf/triggers
fdc8d9a4 84cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{shname}.conf
687fc4b6 85
93a9c726 86cd pylib
271a98d0 87%py_install
93a9c726
MK
88cd ..
89
3f05bde6
MK
90%clean
91rm -rf $RPM_BUILD_ROOT
92
93%pre
3f05bde6
MK
94%groupadd -g 259 -r cassandra
95%useradd -M -o -r -u 259 -d /var/lib/%{shname} -s /bin/sh -g cassandra -c "Cassandra Server" cassandra
96
f60c3231
ER
97%post
98/sbin/chkconfig --add cassandra
99%service cassandra restart
100
3f05bde6
MK
101%preun
102if [ "$1" = "0" ]; then
f60c3231
ER
103 %service cassandra stop
104 /sbin/chkconfig --del cassandra
3f05bde6
MK
105fi
106
3f05bde6
MK
107%files
108%defattr(644,root,root,755)
93a9c726 109%doc CHANGES.txt LICENSE.txt NEWS.txt NOTICE.txt
3f05bde6
MK
110%attr(754,root,root) /etc/rc.d/init.d/cassandra
111%attr(755,root,root) %{_bindir}/cassandra-cli
93a9c726 112%attr(755,root,root) %{_bindir}/cqlsh
3f05bde6 113%attr(755,root,root) %{_bindir}/nodetool
0aa3a378
MK
114# %attr(755,root,root) %{_bindir}/json2sstable
115## %attr(755,root,root) %{_bindir}/sstable2json
b4f49f9b 116%attr(755,root,root) %{_bindir}/sstablescrub
3f05bde6 117%attr(755,root,root) %{_bindir}/sstablekeys
b4f49f9b 118%attr(755,root,root) %{_bindir}/sstableloader
0aa3a378 119## %attr(755,root,root) %{_bindir}/sstablesplit
c187b9d9 120%attr(755,root,root) %{_bindir}/sstableupgrade
3f05bde6 121%attr(755,root,root) %{_sbindir}/cassandra
087ae4ed 122%{_datadir}/%{shname}
b4f49f9b 123%{systemdtmpfilesdir}/%{shname}.conf
3f05bde6
MK
124%attr(750,cassandra,cassandra) %dir /var/lib/%{shname}
125%attr(750,root,cassandra) %dir /var/lib/%{shname}/conf
087ae4ed
MK
126%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties
127%attr(755,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.sh
3f05bde6 128%attr(640,root,cassandra) /var/lib/%{shname}/conf/*.txt
087ae4ed 129%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml
5422f39a
MK
130%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.xml
131%attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/hotspot_compiler
132%attr(750,cassandra,cassandra) %dir /var/lib/%{shname}/conf/triggers
133%attr(640,root,cassandra) /var/lib/%{shname}/conf/triggers/*.txt
134
3f05bde6 135%attr(750,cassandra,cassandra) %dir /var/log/%{shname}
4e6d3cb2 136%attr(750,cassandra,cassandra) %dir /var/run/%{shname}
a2bbccde 137%{py_sitedir}/cqlshlib
93a9c726 138%if "%{py_ver}" > "2.4"
a2bbccde 139 %{py_sitedir}/cassandra_pylib-0.0.0-py*.egg-info
93a9c726 140%endif
This page took 1.785753 seconds and 4 git commands to generate.