[Cluster-devel] conga conga.spec.in.in
kupcevic at sourceware.org
kupcevic at sourceware.org
Fri Aug 18 13:59:00 UTC 2006
CVSROOT: /cvs/cluster
Module name: conga
Changes by: kupcevic at sourceware.org 2006-08-18 13:59:00
Modified files:
. : conga.spec.in.in
Log message:
- Don't auto-start ricci after installation; enable it, but don't start it
- Fixes for the latest set of specfile complaints
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&r1=1.31&r2=1.32
--- conga/conga.spec.in.in 2006/08/16 06:34:19 1.31
+++ conga/conga.spec.in.in 2006/08/18 13:59:00 1.32
@@ -39,7 +39,7 @@
%if "%{include_zope_and_plone}" == "yes"
BuildRequires: python-devel >= 2.4.1
%endif
-BuildRequires: glibc-devel gcc-c++ libxml2-devel make
+BuildRequires: glibc-devel gcc-c++ libxml2-devel sed
BuildRequires: openssl-devel dbus-devel pam-devel
%description
@@ -62,22 +62,16 @@
popd
%endif
-
%build
-rm -rf $RPM_BUILD_ROOT
-#./configure --arch=%{_arch} --sbindir=%{_sbindir} --libdir=%{_libdir} --docdir=%{_docdir}
%configure --arch=%{_arch} \
--docdir=%{_docdir} \
--include_zope_and_plone=%{include_zope_and_plone}
-#make %{?_smp_mflags}
-make conga
-
+make %{?_smp_mflags} conga
%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install_conga
-
%clean
rm -rf $RPM_BUILD_ROOT
@@ -133,47 +127,44 @@
%{_localstatedir}/lib/luci
%pre -n luci
-if [ "B`/bin/grep luci\:x /etc/group`" = "B" ]; then
+if [ "B`/bin/grep luci\:x /etc/group`" == "B" ]; then
/usr/sbin/groupadd -r -f luci >/dev/null 2>&1
fi
-if [ "B`/bin/grep luci\:x /etc/passwd`" = "B" ]; then
+if [ "B`/bin/grep luci\:x /etc/passwd`" == "B" ]; then
/usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/luci -g luci luci >/dev/null 2>&1
fi
%post -n luci
-/sbin/chkconfig --list luci >/dev/null 2>&1
-if [ "1$?" != "10" ]; then
- /sbin/chkconfig --add luci
-fi
+/sbin/chkconfig --add luci
/sbin/service luci status >/dev/null 2>&1
LUCI_RUNNING=$?
-if [ "1$LUCI_RUNNING" = "10" ]; then
+if [ "$LUCI_RUNNING" == "0" ]; then
/sbin/service luci stop >/dev/null 2>&1
fi
if [ -e /var/lib/luci/var/luci_backup.xml ]; then
# restore luci database
/usr/sbin/luci_admin restore >/dev/null 2>&1
fi
-if [ ! -e /var/lib/luci/var/certs/privkey.pem ]; then
- # no privkey.pem => luci not initialized => admin has default password
+# set initial admin password (if not already set) to random value
+if [ "B`cat /var/lib/luci/.admin_password_has_been_set`" != "BTrue" ]; then
/usr/sbin/luci_admin password --random >/dev/null 2>&1
fi
-if [ "1$LUCI_RUNNING" = "10" ]; then
+if [ "$LUCI_RUNNING" == "0" ]; then
/sbin/service luci start >/dev/null 2>&1
fi
%preun -n luci
-if [ "$1" = "0" ]; then
+if [ "$1" == "0" ]; then
/sbin/service luci stop >/dev/null 2>&1
/sbin/chkconfig --del luci
fi
/sbin/service luci status >/dev/null 2>&1
LUCI_RUNNING=$?
-if [ "1$LUCI_RUNNING" = "10" ]; then
+if [ "$LUCI_RUNNING" == "0" ]; then
/sbin/service luci stop >/dev/null 2>&1
fi
/usr/sbin/luci_admin backup >/dev/null 2>&1
-if [ "1$LUCI_RUNNING" = "10" ]; then
+if [ "$LUCI_RUNNING" == "0" ]; then
/sbin/service luci start >/dev/null 2>&1
fi
@@ -211,7 +202,7 @@
Provides: ricci-modlog = %{version}-%{release}
Requires(pre): grep shadow-utils
-Requires(post): chkconfig initscripts util-linux sed SysVinit
+Requires(post): chkconfig initscripts util-linux
Requires(preun): chkconfig initscripts
Requires(postun): initscripts util-linux
@@ -253,40 +244,32 @@
%{_libexecdir}/ricci-modlog
%pre -n ricci
-if [ "B`/bin/grep ricci\:x /etc/group`" = "B" ]; then
+if [ "B`/bin/grep ricci\:x /etc/group`" == "B" ]; then
/usr/sbin/groupadd -r -f ricci >/dev/null 2>&1
fi
-if [ "B`/bin/grep ricci\:x /etc/passwd`" = "B" ]; then
+if [ "B`/bin/grep ricci\:x /etc/passwd`" == "B" ]; then
/usr/sbin/useradd -r -M -s /sbin/nologin -d /var/lib/ricci -g ricci ricci >/dev/null 2>&1
fi
%post -n ricci
-/sbin/chkconfig --list ricci >/dev/null 2>&1
-if [ "1$?" != "10" ]; then
- /sbin/chkconfig --add ricci
-fi
-/bin/kill -s SIGHUP `cat /var/run/messagebus.pid`
-/sbin/service oddjobd reload > /dev/null 2>&1
-
-# start ricci only if explicitly enabled (in current runlevel)
-RUNS=(`/sbin/runlevel`)
-RUNLEVEL=${RUNS[1]}
-STATE=`/sbin/chkconfig --list ricci | sed -e s,.*\\\t$RUNLEVEL:\\\\\(o[nf]f\\\?\\\\\).*,\\\1,`
-if [ "1$STATE" = "1on" ]; then
- /sbin/service ricci start > /dev/null 2>&1
-fi
+/sbin/chkconfig --add ricci
+/bin/kill -s SIGHUP `cat /var/run/messagebus.pid` >/dev/null 2>&1
+/sbin/service oddjobd reload >/dev/null 2>&1
%preun -n ricci
-/sbin/service ricci stop > /dev/null 2>&1
-if [ "1$1" = "10" ]; then
+if [ "$1" == "0" ]; then
+ /sbin/service ricci stop > /dev/null 2>&1
/sbin/chkconfig --del ricci
fi
%postun -n ricci
-if [ "1$1" = "10" ]; then
- /bin/kill -s SIGHUP `cat /var/run/messagebus.pid`
+if [ "$1" == "0" ]; then
+ /bin/kill -s SIGHUP `cat /var/run/messagebus.pid` > /dev/null 2>&1
/sbin/service oddjobd reload > /dev/null 2>&1
fi
+if [ "$1" == "1" ]; then
+ /sbin/service ricci condrestart > /dev/null 2>&1
+fi
@@ -296,6 +279,11 @@
%changelog
+* Fri Aug 18 2006 Stanko Kupcevic <kupcevic at redhat.com> 0.8-12
+- Don't auto-start ricci after installation, do it manually
+- Under certain circumstances, default luci password would not get reset
+- Many Luci improvements
+
* Wed Aug 16 2006 Stanko Kupcevic <kupcevic at redhat.com> 0.8-11.7
- Move ricci-modrpm, ricci-modlog, ricci-modstorage, ricci-modservice
from /usr/sbin to /usr/libexec
More information about the Cluster-devel
mailing list