From 2e3b00753c37c1f9c5392a5502cdf0da8d79b08b Mon Sep 17 00:00:00 2001 From: SJ Date: Fri, 25 Oct 2013 23:07:55 +0200 Subject: [PATCH] rpm fixes --- piler.spec | 13 +++++++++---- util/postinstall.sh.in | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/piler.spec b/piler.spec index 743cc9aa..1744783b 100644 --- a/piler.spec +++ b/piler.spec @@ -9,11 +9,10 @@ Release: %{release} License: gpl Group: Networking/Mail Source0: master.tar.gz -Source1: %{name}.init URL: http://www.mailpiler.org/ Buildroot: /tmp/aa BuildRequires: openssl-devel, tcp_wrappers, poppler-utils, libzip-devel, catdoc, mysql-devel, tnef, unrtf, tre-devel -Requires: mysql, openssl, tcp_wrappers, libzip +Requires: mysql, openssl, tcp_wrappers, libzip, poppler-utils, catdoc, tnef, unrtf, tre %description piler is an email archiving application. @@ -38,7 +37,9 @@ cp /usr/local/lib/libmariadb* /root/rpmbuild/BUILDROOT/piler-0.1.25-1.x86_64/usr %defattr(-,root,root) %dir /var/piler %dir /var/piler/tmp +%dir /var/piler/sphinx %dir /var/piler/store +%dir /var/piler/stat %dir /var/run/piler %attr(0655,piler,piler) /usr/local/bin/pileraget %attr(0655,piler,piler) /usr/local/bin/pilerexport @@ -49,7 +50,7 @@ cp /usr/local/lib/libmariadb* /root/rpmbuild/BUILDROOT/piler-0.1.25-1.x86_64/usr /etc/init.d/rc.piler /etc/init.d/rc.pilergetd /etc/init.d/rc.searchd -/usr/local/etc/piler.conf +%attr(0640,root,piler) /usr/local/etc/piler.conf /usr/local/etc/sphinx.conf.dist /usr/local/sbin/piler /usr/local/sbin/pilergetd @@ -81,8 +82,11 @@ if [ -d /var/piler ]; then chmod 755 /var/piler; fi %post +chown -R piler:piler /var/run/piler /var/piler +echo /usr/local/lib > /etc/ld.so.conf.d/piler.conf +ldconfig echo this is the postinstall stuff... - +echo run /usr/local/libexec/piler/postinstall.sh manually to configure piler %postun userdel piler @@ -93,3 +97,4 @@ groupdel piler * Fri Oct 25 2013 Janos Suto - First release of the rpm package based on build 846 + diff --git a/util/postinstall.sh.in b/util/postinstall.sh.in index cceb88a0..276ea6e3 100755 --- a/util/postinstall.sh.in +++ b/util/postinstall.sh.in @@ -225,7 +225,7 @@ gather_mysql_account() { gather_sphinx_data() { - if [ $INDEXER = "/usr/bin/indexer" ]; then SPHINXCFG="/etc/sphinx.conf"; fi + if [ $INDEXER = "/usr/bin/indexer" ]; then SPHINXCFG="/etc/sphinx/sphinx.conf"; fi if test -f /etc/sphinxsearch/sphinx.conf || test -f /etc/sphinxsearch/sphinx.conf.sample ; then SPHINXCFG="/etc/sphinxsearch/sphinx.conf"; fi