]>
Commit | Line | Data |
---|---|---|
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 ? |
3f05bde6 | 7 | |
4e6d3cb2 | 8 | %define shname cassandra |
f60c3231 | 9 | %include /usr/lib/rpm/macros.java |
087ae4ed | 10 | Summary: Cassandra database binary package |
4e6d3cb2 | 11 | Summary(pl.UTF-8): Binarna redystrybucja bazy danych Cassandra |
087ae4ed | 12 | Name: cassandra-bin |
f2527026 | 13 | Version: 0.8.9 |
40af29a9 | 14 | Release: 1 |
3f05bde6 MK |
15 | License: ASF |
16 | Group: Applications/Databases | |
7d92ab98 | 17 | # http://www.apache.org/dyn/closer.cgi?path=/cassandra/0.8.7/apache-cassandra-0.8.7-bin.tar.gz |
4e6d3cb2 | 18 | Source0: http://ftp.tpnet.pl/vol/d1/apache//cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz |
f2527026 | 19 | # Source0-md5: bce05ca64217f7317190e46428a6df3c |
087ae4ed MK |
20 | Source1: cassandra.in.sh |
21 | Source2: %{shname}.init | |
40af29a9 | 22 | Patch0: %{name}-jamm_path_fix.patch |
3f05bde6 MK |
23 | URL: http://cassandra.apache.org/ |
24 | BuildRequires: rpm-javaprov | |
25 | BuildRequires: rpmbuild(macros) >= 1.300 | |
f60c3231 ER |
26 | Requires(post,preun): /sbin/chkconfig |
27 | Requires: rc-scripts | |
dd8de5bc | 28 | Suggests: java-jna |
3f05bde6 MK |
29 | BuildArch: noarch |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %description | |
087ae4ed MK |
33 | Cassandra brings together the distributed systems technologies from |
34 | Dynamo and the data model from Google's BigTable. Like Dynamo, | |
35 | Cassandra is eventually consistent. Like BigTable, Cassandra provides | |
36 | a ColumnFamily-based data model richer than typical key/value systems. | |
3f05bde6 MK |
37 | |
38 | %description -l pl.UTF-8 | |
4e6d3cb2 TP |
39 | Cassandra łączy technologie systemów rozproszonych z Dynamo i model |
40 | danych z googlowskiego BigTable. Tak jak Dynamo, Cassandra jest | |
087ae4ed | 41 | ostatecznie spójna. Tak jak BigTable daje do dyspozycji model danych |
4e6d3cb2 | 42 | oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości. |
3f05bde6 MK |
43 | |
44 | %prep | |
b51a24b8 | 45 | %setup -q -n apache-cassandra-%{version} |
40af29a9 | 46 | %patch0 -p1 |
3f05bde6 | 47 | |
3f05bde6 MK |
48 | %install |
49 | rm -rf $RPM_BUILD_ROOT | |
4e6d3cb2 TP |
50 | install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,%{_sysconfdir}/%{shname},%{_bindir},%{_sbindir},%{_datadir}/%{shname}} \ |
51 | $RPM_BUILD_ROOT/var/{lib/%{shname}/{commitlog,conf,data,saved_caches},{log,run}/%{shname}} | |
52 | ||
3f05bde6 | 53 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/cassandra |
7d92ab98 | 54 | cp -p bin/{*sstable*,*tool,cassandra-cli} $RPM_BUILD_ROOT%{_bindir} |
4e6d3cb2 TP |
55 | cp -p bin/cassandra $RPM_BUILD_ROOT%{_sbindir} |
56 | cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname} | |
57 | cp -p conf/{*.properties,cassandra-env.sh,cassandra.yaml,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf | |
3f05bde6 MK |
58 | |
59 | %clean | |
60 | rm -rf $RPM_BUILD_ROOT | |
61 | ||
62 | %pre | |
3f05bde6 MK |
63 | %groupadd -g 259 -r cassandra |
64 | %useradd -M -o -r -u 259 -d /var/lib/%{shname} -s /bin/sh -g cassandra -c "Cassandra Server" cassandra | |
65 | ||
f60c3231 ER |
66 | %post |
67 | /sbin/chkconfig --add cassandra | |
68 | %service cassandra restart | |
69 | ||
3f05bde6 MK |
70 | %preun |
71 | if [ "$1" = "0" ]; then | |
f60c3231 ER |
72 | %service cassandra stop |
73 | /sbin/chkconfig --del cassandra | |
3f05bde6 MK |
74 | fi |
75 | ||
3f05bde6 MK |
76 | %files |
77 | %defattr(644,root,root,755) | |
78 | %doc CHANGES.txt LICENSE.txt README.txt NEWS.txt NOTICE.txt | |
79 | %attr(754,root,root) /etc/rc.d/init.d/cassandra | |
80 | %attr(755,root,root) %{_bindir}/cassandra-cli | |
81 | %attr(755,root,root) %{_bindir}/nodetool | |
7d92ab98 | 82 | # %attr(755,root,root) %{_bindir}/clustertool |
3f05bde6 MK |
83 | %attr(755,root,root) %{_bindir}/json2sstable |
84 | %attr(755,root,root) %{_bindir}/sstable2json | |
7d92ab98 MK |
85 | %attr(755,root,root) %{_bindir}/sstableloader |
86 | # %attr(755,root,root) %{_bindir}/schematool | |
87 | # %attr(755,root,root) %{_bindir}/config-converter | |
3f05bde6 MK |
88 | %attr(755,root,root) %{_bindir}/sstablekeys |
89 | %attr(755,root,root) %{_sbindir}/cassandra | |
087ae4ed | 90 | %{_datadir}/%{shname} |
3f05bde6 MK |
91 | %attr(750,cassandra,cassandra) %dir /var/lib/%{shname} |
92 | %attr(750,root,cassandra) %dir /var/lib/%{shname}/conf | |
087ae4ed MK |
93 | %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.properties |
94 | %attr(755,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.sh | |
3f05bde6 | 95 | %attr(640,root,cassandra) /var/lib/%{shname}/conf/*.txt |
087ae4ed | 96 | %attr(640,root,cassandra) %config(noreplace) %verify(not md5 mtime size) /var/lib/%{shname}/conf/*.yaml |
3f05bde6 | 97 | %attr(750,cassandra,cassandra) %dir /var/log/%{shname} |
4e6d3cb2 | 98 | %attr(750,cassandra,cassandra) %dir /var/run/%{shname} |