From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./conga.spec.in.in luci/site/Makefile ma ...
Date: 11 Aug 2007 04:16:21 -0000 [thread overview]
Message-ID: <20070811041621.11776.qmail@sourceware.org> (raw)
CVSROOT: /cvs/cluster
Module name: conga
Branch: RHEL5
Changes by: rmccabe at sourceware.org 2007-08-11 04:16:20
Modified files:
. : conga.spec.in.in
luci/site : Makefile
make : version.in
Log message:
Fix a longstanding bug that caused the luci database to not be restored properly upon upgrade unless a backup had been made previous to the upgrade.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.51&r2=1.45.2.52
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/Makefile.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.11.2.3&r2=1.11.2.4
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/make/version.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.21.2.21&r2=1.21.2.22
--- conga/conga.spec.in.in 2007/08/09 22:37:31 1.45.2.51
+++ conga/conga.spec.in.in 2007/08/11 04:16:19 1.45.2.52
@@ -134,18 +134,37 @@
%endif
%pre -n luci
-if ! /bin/grep ^luci\:x /etc/group >&/dev/null; then
+grep ^luci\:x /etc/group >&/dev/null
+if [ $? -ne 0 ]; then
/usr/sbin/groupadd -r -f luci >&/dev/null
fi
-if ! /bin/grep ^luci\:x /etc/passwd >&/dev/null; then
+
+grep ^luci\:x /etc/passwd >&/dev/null
+if [ $? -ne 0 ]; then
/usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/luci -g luci luci >&/dev/null
fi
+if [ $1 -gt 1 ]; then
+ # Package upgrade
+ /sbin/service luci status >&/dev/null
+ LUCI_RUNNING=$?
+ if [ $LUCI_RUNNING -eq 0 ]; then
+ /sbin/service luci stop >& /dev/null
+ # allow the zope machinery time to shut down
+ sleep 4
+ fi
+ /usr/sbin/luci_admin backup >&/dev/null
+ if [ $LUCI_RUNNING -eq 0 ]; then
+ /sbin/service luci start >& /dev/null
+ fi
+fi
+exit 0
+
%post -n luci
/sbin/chkconfig --add luci
/sbin/service luci status >&/dev/null
LUCI_RUNNING=$?
-if [ "$LUCI_RUNNING" == "0" ]; then
+if [ $LUCI_RUNNING -eq 0 ]; then
/sbin/service luci stop >&/dev/null
fi
if [ -f /var/lib/luci/var/luci_backup.xml ]; then
@@ -157,28 +176,30 @@
grep True /var/lib/luci/.default_password_has_been_reset >&/dev/null
if [ $? -ne 0 ]; then
/usr/sbin/luci_admin password --random >&/dev/null &&
- rm -f /var/lib/luci/var/Data.fs.index /var/lib/luci/var/Data.fs.tmp /var/lib/luci/var/Data.fs.old
- find %{_libdir}/luci/zope/var -print0 2>/dev/null | xargs -0 chown luci:
+ rm -f /var/lib/luci/var/Data.fs.index /var/lib/luci/var/Data.fs.tmp /var/lib/luci/var/Data.fs.old >& /dev/null
+ find %{_libdir}/luci/zope/var -print0 2>/dev/null | xargs -0 chown luci: >&/dev/null
fi
-if [ "$LUCI_RUNNING" == "0" ]; then
+if [ $LUCI_RUNNING -eq 0 ]; then
/sbin/service luci start >&/dev/null
fi
+exit 0
%preun -n luci
-if [ "$1" == "0" ]; then
+if [ $1 -eq 0 ]; then
+ # uninstall
/sbin/service luci stop >&/dev/null
/sbin/chkconfig --del luci
-fi
-/sbin/service luci status >&/dev/null
-LUCI_RUNNING=$?
-if [ "$LUCI_RUNNING" == "0" ]; then
- /sbin/service luci stop >&/dev/null
-fi
-/usr/sbin/luci_admin backup >&/dev/null
-if [ "$LUCI_RUNNING" == "0" ]; then
- /sbin/service luci start >&/dev/null
-fi
+ /sbin/service luci status >&/dev/null
+ LUCI_RUNNING=$?
+ if [ $LUCI_RUNNING -eq 0 ]; then
+ /sbin/service luci stop >&/dev/null
+ # allow the zope machinery time to shut down
+ sleep 4
+ fi
+ /usr/sbin/luci_admin backup >&/dev/null
+fi
+exit 0
@@ -257,18 +278,21 @@
if ! /bin/grep ^ricci\:x /etc/passwd >&/dev/null; then
/usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/ricci -g ricci ricci >&/dev/null
fi
+exit 0
%post -n ricci
DBUS_PID=`cat /var/run/messagebus.pid 2>/dev/null`
/bin/kill -s SIGHUP $DBUS_PID >&/dev/null
/sbin/service oddjobd reload >&/dev/null
/sbin/chkconfig --add ricci
+exit 0
%preun -n ricci
if [ "$1" == "0" ]; then
/sbin/service ricci stop >&/dev/null
/sbin/chkconfig --del ricci
fi
+exit 0
%postun -n ricci
if [ "$1" == "0" ]; then
@@ -279,7 +303,7 @@
if [ "$1" == "1" ]; then
/sbin/service ricci condrestart >&/dev/null
fi
-
+exit 0
--- conga/luci/site/Makefile 2007/07/16 22:10:27 1.11.2.3
+++ conga/luci/site/Makefile 2007/08/11 04:16:20 1.11.2.4
@@ -40,6 +40,8 @@
install:
install -d ${DESTDIR}/var/lib/luci
+ echo False > ${DESTDIR}/var/lib/luci/.default_password_has_been_reset
+ chmod 640 ${DESTDIR}/var/lib/luci/.default_password_has_been_reset
install -d ${DESTDIR}/var/lib/luci/bin
# install `find luci/bin -maxdepth 1 -type f` ${DESTDIR}/var/lib/luci/bin
--- conga/make/version.in 2007/08/08 21:24:12 1.21.2.21
+++ conga/make/version.in 2007/08/11 04:16:20 1.21.2.22
@@ -1,5 +1,5 @@
VERSION=0.10.0
-RELEASE=4_UNRELEASED
+RELEASE=4
# Remove "_UNRELEASED" at release time.
# Put release num at the beggining,
# so that after it gets released, it has
next reply other threads:[~2007-08-11 4:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-11 4:16 rmccabe [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-06-05 5:30 [Cluster-devel] conga ./conga.spec.in.in luci/site/Makefile ma rmccabe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070811041621.11776.qmail@sourceware.org \
--to=rmccabe@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).