[icinga-checkins] icinga.org: icinga-web/mfriedrich/fixes: copy schema sqls to /etc/ icinga-web/schema, enable cache cleaning in %post (on upgrade)

git at icinga.org git at icinga.org
Mon Feb 20 19:24:47 CET 2012


Module: icinga-web
Branch: mfriedrich/fixes
Commit: ffcf8f5af850ec0287ac8d34304dd655c6bfc9a7
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=ffcf8f5af850ec0287ac8d34304dd655c6bfc9a7

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Feb 20 19:06:49 2012 +0100

copy schema sqls to /etc/icinga-web/schema, enable cache cleaning in %post (on upgrade)

refs #2217
refs #2116
refs #2115

---

 icinga-web.spec |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/icinga-web.spec b/icinga-web.spec
index dcd4ae4..1a50305 100644
--- a/icinga-web.spec
+++ b/icinga-web.spec
@@ -83,10 +83,9 @@ Icinga Web for Icinga Core, uses Icinga IDOUtils DB as data source.
     INSTALL_OPTS_CACHE="" \
     INIT_OPTS=""
 
-# uncomment to copy icinga-web db sqls for upgrading
-#  cp -r etc/schema %{buildroot}%{_sysconfdir}/icinga-web/schema
-# set in %files then:
-#  %{_sysconfdir}/icinga-web/schema
+# copy icinga-web db schemas for upgrading
+%{__mkdir} -p %{buildroot}/%{_sysconfdir}/icinga-web/schema
+%{__cp} -r etc/schema/* %{buildroot}%{_sysconfdir}/icinga-web/schema
 
 ##############################
 %pre
@@ -106,8 +105,8 @@ Icinga Web for Icinga Core, uses Icinga IDOUtils DB as data source.
 %post
 ##############################
 
-# clean config cache
-# %{__rm} -rf %{_datadir}/icinga-web/app/cache/config/*.php
+# clean config cache, e.g. after upgrading
+%{__rm} -rf %{cachedir}/config/*.php
 
 ##############################
 %clean
@@ -136,6 +135,8 @@ Icinga Web for Icinga Core, uses Icinga IDOUtils DB as data source.
 %config(noreplace) %{_sysconfdir}/icinga-web/reporting.xml
 %config(noreplace) %{_sysconfdir}/icinga-web/translation.xml
 %config(noreplace) %{_sysconfdir}/icinga-web/sla.xml
+# sql schemas
+%{_sysconfdir}/icinga-web/schema
 # logs+cache
 %attr(2775,%{apacheuser},%{apachegroup}) %dir %{logdir}
 %attr(-,%{apacheuser},%{apachegroup}) %{cachedir}
@@ -146,6 +147,8 @@ Icinga Web for Icinga Core, uses Icinga IDOUtils DB as data source.
 ##############################
 * Mon Feb 20 2012 Michael Friedrich <michael.friedrich at univie.ac.at> - 1.6.2-1
 - bump to 1.6.2
+- copy schema files to /etc/icinga-web/schema
+- clean config cache in %post (important for upgrades)
 
 * Mon Dec 12 2011 Michael Friedrich <michael.friedrich at univie.ac.at> - 1.6.1-1
 - bump to 1.6.1





More information about the icinga-checkins mailing list