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