From: Viktor M. <mih...@us...> - 2005-04-01 15:19:53
|
Update of /cvsroot/sblim/sfcb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15061 Modified Files: Makefile.am configure.ac getSchema.sh.pre.in sfcBroker.c sfcb.init-none sfcb.init-redhat sfcb.init-suse sfcb.spec.in Log Message: Bugs: 1174837, 1174668. Changed daemon name to sfcbd. Added install-cimschema target. This target is used in the RPM spec, to build an additional package sfcb-schema containing the DMTF CIM Schema V2.9. Index: configure.ac =================================================================== RCS file: /cvsroot/sblim/sfcb/configure.ac,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure.ac 1 Apr 2005 11:55:28 -0000 1.5 +++ configure.ac 1 Apr 2005 15:19:29 -0000 1.6 @@ -21,7 +21,7 @@ # Process this file with autoconf to produce a configure script. -AC_INIT(Small Footprint CIM Broker, 0.8.6e, sc...@de..., sfcb) +AC_INIT(Small Footprint CIM Broker, 0.8.7, sc...@de..., sfcb) AC_CONFIG_SRCDIR([providerDrv.c]) AM_INIT_AUTOMAKE Index: sfcBroker.c =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcBroker.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- sfcBroker.c 12 Mar 2005 00:43:00 -0000 1.4 +++ sfcBroker.c 1 Apr 2005 15:19:29 -0000 1.5 @@ -116,9 +116,9 @@ static void restartSfcBroker(void *p) { sleep(1); - printf("\n--- \n--- Restarting sfcBroker\n---\n"); + printf("\n--- \n--- Restarting sfcbd\n---\n"); - execvp("sfcBroker",restartArgv); + execvp("sfcbd",restartArgv); perror("--- execv for restart problem:"); abort(); } @@ -197,7 +197,7 @@ startHttp = 1; collectStat=0; - processName="sfcBroker"; + processName="sfcbd"; provPauseStr=getenv("SFCB_PAUSE_PROVIDER"); httpPauseStr=getenv("SFCB_PAUSE_CODEC"); currentProc=sfcBrokerPid=getpid(); @@ -286,8 +286,8 @@ if (getControlNum("providerTimeoutInterval", &provTimeoutInterval)) provTimeoutInterval = 10; - resultSockets=getSocketPair("sfcBroker result"); - sfcbSockets=getSocketPair("sfcBroker sfcb"); + resultSockets=getSocketPair("sfcbd result"); + sfcbSockets=getSocketPair("sfcbd sfcb"); initSem(dSockets,dSockets,pSockets); initProvProcCtl(pSockets); Index: sfcb.init-redhat =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.init-redhat,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sfcb.init-redhat 24 Mar 2005 12:44:45 -0000 1.3 +++ sfcb.init-redhat 1 Apr 2005 15:19:29 -0000 1.4 @@ -6,7 +6,7 @@ # # description: Small Footprint CIM Broker Service # -# processname: sfcBroker +# processname: sfcbd # # config: @sysconfdir@/sfcb/sfcb.cfg @@ -30,7 +30,7 @@ start() { echo -n "Starting sfcb: " - daemon @bindir@/sfcBroker -d && + daemon @bindir@/sfcbd -d && touch /var/lock/subsys/sfcb && return 0 || return 1 @@ -38,14 +38,14 @@ stop() { echo -n "Shutting down sfcb: " - killproc sfcBroker && + killproc sfcbd && rm -f /var/lock/subsys/sfcb && return 0 || return 1 } reload() { echo -n "Reloading sfcb configuration: " - killproc sfcBroker -HUP && + killproc sfcbd -HUP && return 0 || return 1 } @@ -57,7 +57,7 @@ stop ;; status) - status sfcBroker + status sfcbd ;; restart) stop Index: getSchema.sh.pre.in =================================================================== RCS file: /cvsroot/sblim/sfcb/getSchema.sh.pre.in,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- getSchema.sh.pre.in 15 Mar 2005 08:23:00 -0000 1.3 +++ getSchema.sh.pre.in 1 Apr 2005 15:19:29 -0000 1.4 @@ -3,7 +3,13 @@ trap "rm -f /tmp/cimv290.zip" exit -sfcbdir=@datadir@/sfcb +if test $# == 1; then + sfcbdir=$1 +elif test $# == 0; then + sfcbdir=@datadir@/sfcb +else + echo usage: $0 [schemadir] +fi if [ -x /usr/bin/curl ] then @@ -11,12 +17,15 @@ then echo "Fetching CIM Schema from DMTF homepage ..." [ -d $sfcbdir/CIM ] || mkdir -p $sfcbdir/CIM - /usr/bin/curl -o /tmp/cimv290.zip http://www.dmtf.org/standards/cim/cim_schema_v29/CIM_V2.9.0Final-MOFs.zip && - unzip -jd $sfcbdir/CIM /tmp/cimv290.zip && - exit 0 + if [ $? == 0 ]; then + /usr/bin/curl -o /tmp/cimv290.zip \ + http://www.dmtf.org/standards/cim/cim_schema_v29/CIM_V2.9.0Final-MOFs.zip && + unzip -jd $sfcbdir/CIM /tmp/cimv290.zip && + exit 0 + fi echo "Failed to fetch and install CIM schema" 1>&2 else - echo "CIM Schema already loaded" + echo "CIM Schema already present - nothing to do." exit 0 fi else Index: sfcb.spec.in =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.spec.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- sfcb.spec.in 24 Mar 2005 12:44:45 -0000 1.5 +++ sfcb.spec.in 1 Apr 2005 15:19:29 -0000 1.6 @@ -20,6 +20,13 @@ %Description Small Footprint CIM Broker. +%Package schema +Summary: CIM Schema Files +Copyright: (C) Distributed Management Task Force +Group: Systems Management/Base +%Description schema +DMTF CIM Schema files that can be used with the Small Footprint CIM Broker. + %prep %setup -T -b 0 -n %{name}-%{version} @@ -41,10 +48,26 @@ fi make DESTDIR=$RPM_BUILD_ROOT install +make DESTDIR=$RPM_BUILD_ROOT install-cimschema # remove unused libtool files rm -f $RPM_BUILD_ROOT/%{_libdir}/*a +echo "%defattr(-,root,root)" > _pkg_list + +find $RPM_BUILD_ROOT/%{_datadir}/%{name} -type f | grep -v $RPM_BUILD_ROOT/%{_datadir}/%{name}/CIM >> _pkg_list +sed s?$RPM_BUILD_ROOT??g _pkg_list > _pkg_list_2 +mv -f _pkg_list_2 _pkg_list +echo "%config %{_sysconfdir}/%{name}" >> _pkg_list +echo "%doc %{_datadir}/doc" >> _pkg_list +echo "%{_sysconfdir}/init.d/%{name}" >> _pkg_list +echo "%{_localstatedir}/lib/%{name}" >> _pkg_list +echo "%{_bindir}/*" >> _pkg_list +echo "%{_libdir}/*.so*" >> _pkg_list + +echo ======================================= +cat _pkg_list + %clean if [ `id -ur` != 0 ] then @@ -58,12 +81,7 @@ %postun /sbin/ldconfig -%files -%defattr(-,root,root) -%config %{_sysconfdir}/%{name} -%doc %{_datadir}/doc -%{_sysconfdir}/init.d/%{name} -%{_datadir}/%{name} -%{_localstatedir}/lib/%{name} -%{_bindir}/* -%{_libdir}/*.so* +%files schema +%{_datadir}/%{name}/CIM + +%files -f _pkg_list Index: sfcb.init-suse =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.init-suse,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sfcb.init-suse 24 Mar 2005 12:44:45 -0000 1.3 +++ sfcb.init-suse 1 Apr 2005 15:19:29 -0000 1.4 @@ -30,19 +30,19 @@ start() { echo -n "Starting sfcb: " - startproc @bindir@/sfcBroker -d + startproc @bindir@/sfcbd -d rcstatus -v } stop() { echo -n "Shutting down sfcb: " - killproc sfcBroker + killproc sfcbd rcstatus -v } reload() { echo -n "Reloading sfcb configuration: " - killproc -HUP sfcBroker + killproc -HUP sfcbd rcstatus -v } @@ -54,7 +54,7 @@ stop ;; status) - checkproc sfcBroker + checkproc sfcbd rc_status -v ;; restart) Index: Makefile.am =================================================================== RCS file: /cvsroot/sblim/sfcb/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 30 Mar 2005 12:30:51 -0000 1.7 +++ Makefile.am 1 Apr 2005 15:19:28 -0000 1.8 @@ -46,7 +46,7 @@ libsfcIndCIMXMLHandler.la bin_PROGRAMS = \ - sfcBroker + sfcbd libsfcBrokerCore_la_SOURCES = \ args.c \ @@ -139,7 +139,9 @@ cimXmlRequest.c libsfcCimXmlCodec_la_LIBADD=-lsfcBrokerCore -sfcBroker_LDADD=-lsfcBrokerCore -lsfcCimXmlCodec -lsfcHttpAdapter + +sfcbd_SOURCES=sfcBroker.c +sfcbd_LDADD=-lsfcBrokerCore -lsfcCimXmlCodec -lsfcHttpAdapter noinst_HEADERS=array.h httpComm.h control.h providerMgr.h \ constClass.h msgqueue.h providerRegister.h \ @@ -207,3 +209,7 @@ dist-hook: test -d "$(distdir)" && rm -rf `find $(distdir) -type d -name CVS` + +install-cimschema: getSchema.sh + test -d $(DESTDIR)$(pkgdatadir) || $(mkdir_p) $(DESTDIR)$(pkgdatadir) + sh getSchema.sh $(DESTDIR)$(pkgdatadir) Index: sfcb.init-none =================================================================== RCS file: /cvsroot/sblim/sfcb/sfcb.init-none,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- sfcb.init-none 24 Mar 2005 12:44:45 -0000 1.2 +++ sfcb.init-none 1 Apr 2005 15:19:29 -0000 1.3 @@ -21,21 +21,21 @@ start() { echo -n "Starting sfcb: " - @bindir@/sfcBroker -d && echo "done." && return 0 || + @bindir@/sfcbd -d && echo "done." && return 0 || echo "failed." return 1 } stop() { echo -n "Shutting down sfcb: " - killall -9 sfcBroker && echo "done." && return 0 || + killall -9 sfcbd && echo "done." && return 0 || echo "failed." return 1 } reload() { echo -n "Reloading sfcb configuration: " - killall -HUP sfcBroker && echo "done." && return 0 || + killall -HUP sfcbd && echo "done." && return 0 || echo "failed." return 1 } @@ -49,7 +49,7 @@ ;; status) echo -n "Checking SFCB status: " - ps --noheaders -C sfcBroker || echo "stopped." + ps --noheaders -C sfcbd || echo "stopped." ;; restart) stop |