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