File sblim-sfcb.spec of Package sblim-sfcb
#
# spec file for package sblim-sfcb (Version 1.3.2)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Small Footprint CIM Broker
Name: sblim-sfcb
Version: 1.3.2
Release: 9.<RELEASE12>
Group: System/Management
License: Other uncritical OpenSource License; CPL 1.0
Url: http://sblim.sf.net/
Source0: %{name}-%{version}.tar.bz2
Source1: autoconfiscate.sh
%if 0%{?suse_version}
Source2: sblim-sfcb.init
%endif
Source3: autoconfiscate.sh-mofc
Source4: sfcb-pam.conf
Patch1: 0001-uds_auth.patch
Patch3: 0003-align.patch
Patch6: 0006-Werror.patch
Patch7: 0007-automake.patch
Patch8: 0008-enable-hex-trace-mask.patch
Patch9: 0009-clean-up-semaphore-array-index-calculation.patch
Patch11: 0011-check-prevent-various-buffer-overflows.patch
Patch15: 0015-fix-potential-memory-leak.patch
Patch16: 0016-check-result-from-_methProvider.patch
Patch17: 0017-abort-on-socket-error-with-better-error-msg.patch
Patch18: 0018-buffer-size-check-in-localConnectServer.patch
Patch19: 0019-internal_provider.patch
Patch100: 0100-check_length_sanity.patch
Patch110: 0110-2164750-sfcb_handle_malformed_requests.patch
Patch120: 0120-max_content_length.patch
Patch130: 0130-2169514-check_malloc.patch
Patch140: 0140-2169527-attrsOk_alloca_fix.patch
Patch150: 0150-2169607-strcpy.patch
Patch160: 0160-2158198-syslog.patch
Patch170: 0170-2172023-mlogf.patch
Patch180: 0180-2175507-alloca_sockaddr.patch
Patch190: 0190-2189391-fix-fork-race-in-getProcess.patch
Patch200: 0200-2192023-Fix-nsHt-deadlock.patch
Patch210: 0210-2185304-shutdown_deadlock_remove_mlogf.patch
Patch220: 0220-2189234-minimal-provider-count-is-3-4-with-interOpProvider.patch
Patch230: 0230-2169807-435882-xml-char-ref.patch
Patch240: 0240-msgqueue_unlink.patch
Patch250: 0250-bnc444403-access_control.patch
Patch260: 0260-2390100-mlogf-args.patch
Patch270: 0270-max_content_length2.patch
Patch280: 0280-decode64.patch
Patch290: 0290-bnc445795-2095972-startup_hang.patch
Patch300: 0300-bnc425457-2169514-limit_message_size.patch
Patch310: 0310-bnc457768-2433594-unaligned_access.patch
Patch320: 0320-bnc457366A-2140807-static_instances.patch
Patch330: 0330-bnc457366B-2441640-mofc_instance_migration.patch
Patch340: 0340-bnc458541-2479947-valueList.patch
Patch350: 0350-bnc466666-2093567-ref-quals.patch
Patch360: 0360-bnc470203-genSslCert-mktemp.patch
Provides: cimserver
Provides: cim-server
%if 0%{?suse_version} >= 1030
BuildRequires: libcurl-devel
%else
BuildRequires: curl-devel
%endif
BuildRequires: zlib-devel
BuildRequires: openssl-devel
BuildRequires: pam-devel
BuildRequires: cim-schema
BuildRequires: bison flex
Requires: curl
Requires: zlib
Requires: openssl
Requires: pam
# Added NWP - dependency on cim-schema instead of inbuilt schema
Requires: cim-schema
PreReq: /usr/sbin/groupadd /usr/sbin/groupmod
%description
Small Footprint CIM Broker (sfcb) is a CIM server conforming to the CIM
Operations over HTTP protocol. It is robust, with low resource
consumption and therefore specifically suited for embedded and resource
constrained environments. sfcb supports providers written against the
Common Manageability Programming Interface (CMPI).
%prep
%setup -q
%patch1 -p1 -b .0001-uds_auth.patch
%patch3 -p1 -b .0003-align.patch
%patch6 -p1 -b .0006-Werror.patch
%patch7 -p1 -b .0007-automake.patch
%patch8 -p1 -b .0008-enable-hex-trace-mask.patch
%patch9 -p1 -b .0009-clean-up-semaphore-array-index-calculation.patch
%patch11 -p1 -b .0011-check-prevent-various-buffer-overflows.patch
%patch15 -p1 -b .0015-fix-potential-memory-leak.patch
%patch16 -p1 -b .0016-check-result-from-_methProvider.patch
%patch17 -p1 -b .0017-abort-on-socket-error-with-better-error-msg.patch
%patch18 -p1 -b .0018-buffer-size-check-in-localConnectServer.patch
%patch19 -p0 -b .0019-internal_provider.patch
%patch100 -p0 -b .0100-check_length_sanity.patch
%patch110 -p0 -b .0110-2164750-sfcb_handle_malformed_requests.patch
%patch120 -p0 -b .0120-max_content_length.patch
%patch130 -p0 -b .0130-2169514-check_malloc.patch
%patch140 -p0 -b .0140-2169527-attrsOk_alloca_fix.patch
%patch150 -p0 -b .0150-2169607-strcpy.patch
%patch160 -p0 -b .0160-2158198-syslog.patch
%patch170 -p0 -b .0170-2172023-mlogf.patch
%patch180 -p0 -b .0180-2175507-alloca_sockaddr.patch
%patch190 -p1 -b .0190-2189391-fix-fork-race-in-getProcess.patch
%patch200 -p1 -b .0200-2192023-Fix-nsHt-deadlock.patch
%patch210 -p0 -b .0210-2185304
%patch220 -p1 -b .0220-2189234-minimal-provider-count-is-3-4-with-interOpProvider.patch
%patch230 -p0 -b .0230-2169807-435882-xml-char-ref.patch
%patch240 -p0 -b .0240-msgqueue_unlink.patch
%patch250 -p0 -b .0250-bnc444403-access_control.patch
%patch260 -p0 -b .0260-2390100-mlogf-args.patch
%patch270 -p0 -b .0270-max_content_length2.patch
%patch280 -p0 -b .0280-decode64.patch
%patch290 -p0 -b .0290-bnc445795-2095972-startup_hang.patch
%patch300 -p0 -b .0300-bnc425457-2169514-limit_message_size.patch
%patch310 -p0 -b .0310-bnc457768-2433594-unaligned_access.patch
%patch320 -p0 -b .0320-bnc457366A-2140807-static_instances.patch
cd mofc
%patch330 -p0 -b .0330-bnc457366B-2441640-mofc_instance_migration.patch
cd ..
%patch340 -p0 -b .0340-bnc458541-2479947-valueList.patch
%patch350 -p0 -b .0350-bnc466666-2093567-ref-quals.patch
%patch360 -p0 -b .0360-bnc470203-genSslCert-mktemp.patch
export PATCH_GET=0
%build
#autoreconf -f -i
cp %SOURCE1 .
cp %SOURCE3 mofc/autoconfiscate.sh
chmod +x mofc/autoconfiscate.sh
sh ./autoconfiscate.sh
#if test -d mofc; then cd mofc && autoreconf -f -i; fi
#%%configure --enable-debug --enable-ssl --enable-pam --enable-ipv6 CIMSCHEMA_SOURCE=%{SOURCE1} CIMSCHEMA_MOF=cimv216.mof CIMSCHEMA_SUBDIRS=y
mkdir -p m4
%configure --enable-debug --enable-ssl --enable-pam --enable-ipv6
make
%install
%makeinstall
# comment out - NWP - removing schema pkg
#make DESTDIR=$RPM_BUILD_ROOT install-cimschema
# remove docs from wrong dir. They are handled by %doc macro in files list
rm -r $RPM_BUILD_ROOT/usr/share/doc
# remove unused libtool files
rm -f $RPM_BUILD_ROOT/%{_libdir}/*a
# make the cmpi directory that sfcb will own - for SuSE Autobuild checks of rpm directory ownership
mkdir $RPM_BUILD_ROOT/%{_libdir}/cmpi
%if 0%{?suse_version}
# override the default-installed sfcb init script - use the one from Source2
# due to /etc/SuSE-release not available in autobuild, so won't install
# correct init script
install %SOURCE2 $RPM_BUILD_ROOT/etc/init.d/sfcb
ln -s /etc/init.d/sfcb $RPM_BUILD_ROOT/usr/sbin/rcsfcb
%endif
# Added NWP 5/14/08 - transition to using cim-schema rpm instead of internal-built schema
ln -sf /usr/share/mof/cim-current $RPM_BUILD_ROOT/%{_datadir}/sfcb/CIM
install -m 0644 %SOURCE4 $RPM_BUILD_ROOT/etc/pam.d/sfcb
echo "%defattr(-,root,root)" > _pkg_list
# Added NWP 5/14/08 - moved from 'files schema'
echo "%dir %{_datadir}/sfcb/" >> _pkg_list
find $RPM_BUILD_ROOT/%{_datadir}/sfcb -type f | grep -v $RPM_BUILD_ROOT/%{_datadir}/sfcb/CIM >> _pkg_list
# Added next line - NWP - declaring link to CIM as part of pkg
echo "%{_datadir}/sfcb/CIM" >> _pkg_list
# end add NWP
sed s?$RPM_BUILD_ROOT??g _pkg_list > _pkg_list_2
mv -f _pkg_list_2 _pkg_list
echo "%dir %{_libdir}/cmpi/" >> _pkg_list
echo "%dir %{_sysconfdir}/sfcb/" >> _pkg_list
echo "%config %{_sysconfdir}/sfcb/*" >> _pkg_list
echo "%config %{_sysconfdir}/pam.d/*" >> _pkg_list
echo "%doc README COPYING AUTHORS" >> _pkg_list
echo "%doc %{_datadir}/man/man1/*" >> _pkg_list
echo "%{_sysconfdir}/init.d/sfcb" >> _pkg_list
echo "%{_localstatedir}/lib/sfcb" >> _pkg_list
echo "%{_bindir}/*" >> _pkg_list
echo "%{_sbindir}/*" >> _pkg_list
echo "%{_libdir}/*.so*" >> _pkg_list
echo =======================================
cat _pkg_list
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%pre
/usr/sbin/groupadd -r sfcb >/dev/null 2>&1 || :
/usr/sbin/groupmod -A root sfcb >/dev/null 2>&1 || :
%post
test -n "$FIRST_ARG" || FIRST_ARG=$1
#removed NWP, placed into init script for first service startup
#%{_datadir}/sfcb/genSslCert.sh %{_sysconfdir}/sfcb
%if 0%{?suse_version}
%{fillup_and_insserv -f sfcb}
%endif
if test "$FIRST_ARG" -eq 1 ; then
sfcbrepos -f 2> /dev/null || :
fi
# else we do it in postun instead.
/sbin/ldconfig
exit 0
%preun
%stop_on_removal sfcb
%postun
test -n "$FIRST_ARG" || FIRST_ARG=$1
/sbin/ldconfig
if test "$FIRST_ARG" -ge 1 ; then
sfcbrepos -f 2> /dev/null || :
fi
%restart_on_update sfcb
%insserv_cleanup
%files -f _pkg_list
%changelog
* Wed Jan 28 2009 kkaempf@suse.de
- Fix tmp race during ssl cert gen (bnc#470203)
* Wed Jan 28 2009 bwhiteley@suse.de
- Fix missing qualifiers on REF params. (bnc#466666)
* Fri Jan 16 2009 kkaempf@suse.de
- Fix memory corruption (bnc#458641):
- check limit when parsing valueList, valueRefList and
keyBindings
- increase max valueList/valueRefList size to 512
- increase max keyBindings to 32
* Wed Jan 07 2009 bwhiteley@suse.de
- Restart sfcbd when package is upgraded (bnc#463993)
* Tue Jan 06 2009 bwhiteley@suse.de
- Fix output of /etc/init.d/sfcb status (bnc#463799)
* Mon Dec 22 2008 bwhiteley@suse.de
- Disabled sfcbd daemon by default (bnc#460650)
* Fri Dec 19 2008 npaxton@novell.com
- Preserve static instances during repository creation.
(bnc#457366, sblim tracker #2140807)
* Wed Dec 17 2008 bwhiteley@suse.de
- Improved patch for configurable access control. (bnc#444403)
* Tue Dec 16 2008 kkaempf@suse.de
- Adjust padding to siezof(void *) on ia64 (bnc#457768)
* Mon Dec 08 2008 bwhiteley@suse.de
- Fix location of docs (bnc#457195)
* Mon Dec 08 2008 bwhiteley@suse.de
- Adjust pam configuration to SUSE standard (bnc#457266)
* Sat Dec 06 2008 bwhiteley@suse.de
- Fix startup deadlock (bnc#445795, sblim tracker #2095972).
- Limit message size (bnc#425457, sblim tracker #2169514)
- Better fix for content length check (bnc#425457,
sblim tracker #2172888)
* Thu Dec 04 2008 bwhiteley@suse.de
- Configurable access control. (bnc#444403)
- Fix some calls to mlogf (sblim tracker #2390100, bnc#425457)
- Check for empty string in decode64 (sblim tracker #2391132,
bnc#425457)
* Thu Nov 20 2008 bwhiteley@suse.de
- Fix unix socket bind problem. (bnc#445334)
* Fri Nov 07 2008 bwhiteley@suse.de
- Better patch for HTTP connection close -- sblim tracker #2193250
- Handle more escaped chars in XML (bnc#435882, sblim#2169807)
* Wed Oct 29 2008 bwhiteley@suse.de
- Better patch for shutdown deadlock -- sblim tracker #2185304
* Wed Oct 22 2008 bwhiteley@suse.de
- The following bugs from the sblim tracker address bnc#425457
- [ 2164750 ] sfcb does not handle some malformed HTTP requests correctly
- [ 2172888 ] http content-length is not constrained
- [ 2169514 ] spRcvMsg doesn't check malloc return
- [ 2169527 ] Some XML parsing error strings do not have sufficient space
- [ 2169607 ] sqlLexer assumes line lengths under MAXBUF
- [ 2175426 ] possible int overflow
- [ 2158198 ] syslog call incorrect
- [ 2172023 ] mlogf call cleanups
- [ 2175507 ] sockaddr_un not allocated for localconnect server
- Some code cleanup.
- SBLIM tracker #2189391 fork() race condition in providerDrv.c:getProcess()
- SBLIM tracker #2192023 sfcb deadlocks on nsHt initialization
- SBLIM tracker #2185304 SFCB doesn't shut down properly a good portion
of the time.
- bnc:438758, SBLIM tracker #2189234 wrong minimal provider check
* Wed Oct 15 2008 kkaempf@suse.de
- help Buildservice executing shell scripts.
* Tue Oct 14 2008 kkaempf@suse.de
- Fix compiler warnings (on 64bit systems) (bnc#435043)
- Adapt for latest autotools
- Fix rpmlint warnings in .spec (%%preun/%%postun)
* Tue Oct 07 2008 schwab@suse.de
- Fix alignment.
- Rebuild configure to get fixed AC_FUNC_MKTIME.
- Don't run configure twice.
* Mon Oct 06 2008 bwhiteley@suse.de
- Update to official 1.3.2 release.
* Wed Aug 27 2008 bwhiteley@suse.de
- update to 1.3.2preview
- Added RTLD_GLOBAL to ldflags when loading providers.
* Mon Aug 18 2008 bwhiteley@suse.de
- don't remove buildroot in %%install
* Mon Aug 11 2008 bwhiteley@suse.de
- Added RequiredStart and RequiredStop to init script.
* Tue Jul 22 2008 bwhiteley@suse.de
- Fix SSL options to disable SSLv2 and weak ciphers.
- Fix XML parser to unescape newlines.
* Mon Jul 21 2008 bwhiteley@suse.de
- Fixed limited length error strings in XML.
* Thu May 29 2008 bwhiteley@suse.de
- Enhanced to support HTTP connections over unix domain sockets,
including unix socket peer credential authentication without
passwords.
- Changed authentication module to only allow users with uid 0
to log in.
* Fri May 16 2008 bwhiteley@suse.de
- Moved back to 1.3.0. 1.3.1 has problems. Removed schema
package, and placed a dependency on cim-schema package
instead.
* Tue May 13 2008 bwhiteley@suse.de
- Updated to 1.3.1. Other packaging changes.
* Fri May 02 2008 bwhiteley@suse.de
- Initial checkin