[packages/cassandra-bin: 2/4] Added missing config files, proper log dirs.

matkor matkor at pld-linux.org
Wed Dec 9 16:18:17 CET 2015


commit 5422f39ae64480a34f229bbe0e6be9e0f97c9851
Author: Mateusz Korniak <matkor at pld-linux.org>
Date:   Wed Oct 21 16:31:06 2015 +0200

    Added missing config files, proper log dirs.

 cassandra-bin-pld_logging.patch | 20 ++++++++++++++++++++
 cassandra-bin.spec              | 15 ++++++++++++---
 2 files changed, 32 insertions(+), 3 deletions(-)
---
diff --git a/cassandra-bin.spec b/cassandra-bin.spec
index f3cbec4..93f9ec1 100644
--- a/cassandra-bin.spec
+++ b/cassandra-bin.spec
@@ -11,7 +11,7 @@ Summary:	Cassandra database binary package
 Summary(pl.UTF-8):	Binarna redystrybucja bazy danych Cassandra
 Name:		cassandra-bin
 Version:	2.1.11
-Release:	0.1
+Release:	0.3
 License:	ASF
 Group:		Applications/Databases
 Source0:	ftp://ftp.task.gda.pl/pub/www/apache/dist/cassandra/%{version}/apache-cassandra-%{version}-bin.tar.gz
@@ -21,6 +21,7 @@ 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
@@ -50,6 +51,7 @@ oparty na ColumnFamily, bogatszy niż typowe systemy klucza i wartości.
 %setup -q -n apache-cassandra-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 # current version of cqlsh supports only python 2.
@@ -73,8 +75,10 @@ cp -p %{SOURCE1} lib/*.jar $RPM_BUILD_ROOT%{_datadir}/%{shname}
 # 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,cassandra-env.sh,cassandra.yaml,README.txt} $RPM_BUILD_ROOT/var/lib/%{shname}/conf
-
+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
 
 cd pylib
@@ -125,6 +129,11 @@ fi
 %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
diff --git a/cassandra-bin-pld_logging.patch b/cassandra-bin-pld_logging.patch
new file mode 100644
index 0000000..ca20182
--- /dev/null
+++ b/cassandra-bin-pld_logging.patch
@@ -0,0 +1,20 @@
+--- apache-cassandra-2.1.11/conf/logback.xml.pld_logging	2015-10-21 16:21:19.880490844 +0200
++++ apache-cassandra-2.1.11/conf/logback.xml	2015-10-21 16:22:17.896836142 +0200
+@@ -20,9 +20,9 @@
+ <configuration scan="true">
+   <jmxConfigurator />
+   <appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
+-    <file>${cassandra.logdir}/system.log</file>
++	  <file>/var/log/cassandra/system.log</file>
+     <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
+-      <fileNamePattern>${cassandra.logdir}/system.log.%i.zip</fileNamePattern>
++	    <fileNamePattern>/var/log/cassandra/system.log.%i.zip</fileNamePattern>
+       <minIndex>1</minIndex>
+       <maxIndex>20</maxIndex>
+     </rollingPolicy>
+@@ -49,5 +49,4 @@
+     <appender-ref ref="STDOUT" />
+   </root>
+   
+-  <logger name="com.thinkaurelius.thrift" level="ERROR"/>
+ </configuration>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cassandra-bin.git/commitdiff/63a7728cfcffe9e7bd8607c789d5a16cba14efad



More information about the pld-cvs-commit mailing list