From 00c90f7f7e1f31bdad41f1409381dd1236602523 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 17 May 2022 05:06:14 -0400 Subject: [PATCH] import sblim-sfcb-1.4.9-25.el9 --- .gitignore | 4 + .sblim-sfcb.metadata | 4 + ...m-sfcb-1.3.15-fix-provider-debugging.patch | 12 + SOURCES/sblim-sfcb-1.3.16-maxMsgLen.patch | 14 + .../sblim-sfcb-1.3.16-multilib-man-cfg.patch | 41 ++ ...sfcb-1.3.9-sfcbrepos-schema-location.patch | 42 ++ SOURCES/sblim-sfcb-1.4.5-service.patch | 27 ++ ...m-sfcb-1.4.8-default-ecdh-curve-name.patch | 26 ++ SOURCES/sblim-sfcb-1.4.9-docdir-license.patch | 21 + SOURCES/sblim-sfcb-1.4.9-fix-ftbfs.patch | 12 + ...cb-1.4.9-fix-null-content-type-crash.patch | 47 ++ SOURCES/sblim-sfcb-1.4.9-fix-null-deref.patch | 13 + ...fcb-1.4.9-fix-ppc-optimization-level.patch | 12 + SOURCES/sfcb.service | 9 + SPECS/sblim-sfcb.spec | 428 ++++++++++++++++++ 15 files changed, 712 insertions(+) create mode 100644 .gitignore create mode 100644 .sblim-sfcb.metadata create mode 100644 SOURCES/sblim-sfcb-1.3.15-fix-provider-debugging.patch create mode 100644 SOURCES/sblim-sfcb-1.3.16-maxMsgLen.patch create mode 100644 SOURCES/sblim-sfcb-1.3.16-multilib-man-cfg.patch create mode 100644 SOURCES/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch create mode 100644 SOURCES/sblim-sfcb-1.4.5-service.patch create mode 100644 SOURCES/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch create mode 100644 SOURCES/sblim-sfcb-1.4.9-docdir-license.patch create mode 100644 SOURCES/sblim-sfcb-1.4.9-fix-ftbfs.patch create mode 100644 SOURCES/sblim-sfcb-1.4.9-fix-null-content-type-crash.patch create mode 100644 SOURCES/sblim-sfcb-1.4.9-fix-null-deref.patch create mode 100644 SOURCES/sblim-sfcb-1.4.9-fix-ppc-optimization-level.patch create mode 100644 SOURCES/sfcb.service create mode 100644 SPECS/sblim-sfcb.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53b555a --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +SOURCES/sblim-sfcb-1.4.9.tar.bz2 +SOURCES/sfcbdump.1.gz +SOURCES/sfcbinst2mof.1.gz +SOURCES/sfcbtrace.1.gz diff --git a/.sblim-sfcb.metadata b/.sblim-sfcb.metadata new file mode 100644 index 0000000..4a00209 --- /dev/null +++ b/.sblim-sfcb.metadata @@ -0,0 +1,4 @@ +8dd01ac4617d0d20990176011a5b444f77aaf8c3 SOURCES/sblim-sfcb-1.4.9.tar.bz2 +3cbf7595a4570de9608a20226a4a89fc90f50645 SOURCES/sfcbdump.1.gz +aa1fc9fef75470214332eefa06ca93b26448c561 SOURCES/sfcbinst2mof.1.gz +b3762122828bd8988049e18cf7cd6b6a3d8cf7f9 SOURCES/sfcbtrace.1.gz diff --git a/SOURCES/sblim-sfcb-1.3.15-fix-provider-debugging.patch b/SOURCES/sblim-sfcb-1.3.15-fix-provider-debugging.patch new file mode 100644 index 0000000..4fbecaa --- /dev/null +++ b/SOURCES/sblim-sfcb-1.3.15-fix-provider-debugging.patch @@ -0,0 +1,12 @@ +diff -up sblim-sfcb-1.4.5/providerDrv.c.orig sblim-sfcb-1.4.5/providerDrv.c +--- sblim-sfcb-1.4.5/providerDrv.c.orig 2013-09-04 12:59:22.140813239 +0200 ++++ sblim-sfcb-1.4.5/providerDrv.c 2013-09-04 12:59:40.511870274 +0200 +@@ -3585,7 +3585,7 @@ processProviderInvocationRequests(char * + rc = spRecvReq(&providerSockets.receive, &parms->requestor, + (void **) &parms->req, &rl, &mqg); + if (mqg.rdone) { +- int debug_break = 0; ++ volatile int debug_break = 0; + if (rc != 0) { + mlogf(M_ERROR,M_SHOW, "spRecvReq returned error %d. Skipping message.\n", rc); + free(parms); diff --git a/SOURCES/sblim-sfcb-1.3.16-maxMsgLen.patch b/SOURCES/sblim-sfcb-1.3.16-maxMsgLen.patch new file mode 100644 index 0000000..a0dd816 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.3.16-maxMsgLen.patch @@ -0,0 +1,14 @@ +diff -up sblim-sfcb-1.3.16/sfcb.cfg.pre.in.old sblim-sfcb-1.3.16/sfcb.cfg.pre.in +--- sblim-sfcb-1.3.16/sfcb.cfg.pre.in.old 2012-06-13 23:21:09.000000000 +0200 ++++ sblim-sfcb-1.3.16/sfcb.cfg.pre.in 2013-06-24 15:34:38.881992781 +0200 +@@ -113,8 +113,8 @@ provProcs: 32 + + ## Max message length, in bytes. This is a limit on the size of messages + ## written across sockets, for instance, between providers and SFCB. +-## Default is 10000000 +-maxMsgLen: 10000000 ++## Default is 100000000 ++maxMsgLen: 100000000 + + ## Location of the registration directory, where providerRegister can be found + ## Default is @localstatedir@/lib/sfcb/registration diff --git a/SOURCES/sblim-sfcb-1.3.16-multilib-man-cfg.patch b/SOURCES/sblim-sfcb-1.3.16-multilib-man-cfg.patch new file mode 100644 index 0000000..c8cece2 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.3.16-multilib-man-cfg.patch @@ -0,0 +1,41 @@ +diff -up sblim-sfcb-1.3.16/man/sfcbd.1.pre.in.orig sblim-sfcb-1.3.16/man/sfcbd.1.pre.in +--- sblim-sfcb-1.3.16/man/sfcbd.1.pre.in.orig 2014-02-26 14:05:32.213091734 +0100 ++++ sblim-sfcb-1.3.16/man/sfcbd.1.pre.in 2014-02-26 15:10:54.476196379 +0100 +@@ -151,7 +151,7 @@ Default=\fI@localstatedir@/lib/sfcb/regi + .TP + .B providerDirs + A space separated list of directories where sfcb is looking for provider +-libraries. Default=\fI@libdir@\ @libdir@/cmpi\fR ++libraries. Default=\fI/usr/lib\ /usr/lib/cmpi /usr/lib64\ /usr/lib64/cmpi\fR + .TP + .B providerSampleInterval + The interval in seconds at which the provider manager is checking for +@@ -275,11 +275,11 @@ SSL private key file for sfcb. + SSL client certificate / trust store for sfcb. + .SH LIBRARIES + .TP +-.I @libdir@/libsfc* ++.I /usr/lib/libsfc* /usr/lib64/libsfc* + Binaries for sfcb runtime libraries. + .TP +-.I @libdir@/cmpi/* +-Binaries for providers ++.I /usr/lib/cmpi/* /usr/lib64/cmpi/* ++Binaries for providers. + .SH AUTHOR + Adrian Schuur + .SH CONRIBUTORS +diff -up sblim-sfcb-1.3.16/sfcb.cfg.pre.in.orig sblim-sfcb-1.3.16/sfcb.cfg.pre.in +--- sblim-sfcb-1.3.16/sfcb.cfg.pre.in.orig 2014-02-26 15:35:43.133869718 +0100 ++++ sblim-sfcb-1.3.16/sfcb.cfg.pre.in 2014-02-26 15:38:12.794240532 +0100 +@@ -121,8 +121,8 @@ maxMsgLen: 100000000 + registrationDir: @localstatedir@/lib/sfcb/registration + + ## Locations to look for provider libraries. Delimit paths with a space. +-## Default is @libdir@/sfcb @libdir@ @libdir@/cmpi +-providerDirs: @libdir@/sfcb @libdir@ @libdir@/cmpi ++## Default is /usr/lib/sfcb /usr/lib64/sfcb /usr/lib /usr/lib64 /usr/lib/cmpi /usr/lib64/cmpi ++providerDirs: /usr/lib/sfcb /usr/lib64/sfcb /usr/lib /usr/lib64 /usr/lib/cmpi /usr/lib64/cmpi + + ## Enable the root/interop namespace (affects indications) + ## Default: true diff --git a/SOURCES/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch b/SOURCES/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch new file mode 100644 index 0000000..7f95a9d --- /dev/null +++ b/SOURCES/sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch @@ -0,0 +1,42 @@ +diff -up sblim-sfcb-1.3.9/man/sfcbrepos.1.pre.in.orig sblim-sfcb-1.3.9/man/sfcbrepos.1.pre.in +--- sblim-sfcb-1.3.9/man/sfcbrepos.1.pre.in.orig 2009-10-13 21:54:13.000000000 +0200 ++++ sblim-sfcb-1.3.9/man/sfcbrepos.1.pre.in 2010-09-06 14:01:57.294564062 +0200 +@@ -26,7 +26,7 @@ Supported command line options are: + .TP + \fB\-c\fR \fIschemadir\fR + Path to obtain the CIM Schema classes. +-Default is \fI@datadir@/sfcb\fR ++Default is \fI@datadir@/mof/cim-current\fR + .TP + \fB\-s\fR \fIstagingdir\fR + Path to sfcb staging area containing class MOFs and registration files +@@ -58,7 +58,7 @@ Alias of \fB-b\fR + Display usage information and exit. + .SH FILES + .TP +-\fI@datadir@/sfcb/CIM/CIM_Schema.mof\fR ++\fI@datadir@/mof/cim-current/CIM_Schema.mof\fR + CIM Schema + .TP + \fI@localstatedir@/lib/sfcb/registration/providerRegister\fR +diff -up sblim-sfcb-1.3.9/sfcbrepos.sh.in.orig sblim-sfcb-1.3.9/sfcbrepos.sh.in +--- sblim-sfcb-1.3.9/sfcbrepos.sh.in.orig 2009-12-22 01:18:29.000000000 +0100 ++++ sblim-sfcb-1.3.9/sfcbrepos.sh.in 2010-09-06 13:45:28.671491648 +0200 +@@ -59,7 +59,7 @@ then + echo -e "\t-X create repository in non-native format as specifed by argument" + echo -e "\t-s specify staging directory [@localstatedir@/lib/sfcb/stage]" + echo -e "\t-r specify repository directory [@localstatedir@/lib/sfcb/registration]" +- echo -e "\t-c specify directory containing CIM Schema MOFs [@datadir@/sfcb/CIM]" ++ echo -e "\t-c specify directory containing CIM Schema MOFs [@datadir@/mof/cim-current]" + echo -e "\t-t create tiny class repository by omitting inheritance information" + echo -e "\t-z compress repository with gzip" + echo +@@ -99,7 +99,7 @@ fi + + if [ -z "$cimschemadir" ] + then +- cimschemadir=${DESTDIR}@datadir@/sfcb/CIM ++ cimschemadir=${DESTDIR}@datadir@/mof/cim-current + fi + + if [ -d $stagingdir ] && [ -f $stagingdir/default.reg ] && diff --git a/SOURCES/sblim-sfcb-1.4.5-service.patch b/SOURCES/sblim-sfcb-1.4.5-service.patch new file mode 100644 index 0000000..eaccfa5 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.5-service.patch @@ -0,0 +1,27 @@ +diff -up sblim-sfcb-1.4.6/Makefile.in.orig sblim-sfcb-1.4.6/Makefile.in +--- sblim-sfcb-1.4.6/Makefile.in.orig 2013-10-07 10:43:34.783228137 +0200 ++++ sblim-sfcb-1.4.6/Makefile.in 2013-10-07 10:44:30.178533289 +0200 +@@ -627,7 +627,6 @@ initdir = $(sysconfdir)/init.d + pamdir = $(sysconfdir)/pam.d + sfcblibdir = $(libdir)/sfcb + cmpilibdir = $(libdir)/cmpi +-systemddir = $(DESTDIR)@SYSTEMDDIR@ + MANFILES = man/genSslCert.1 man/getSchema.1 man/sfcbd.1 man/sfcbmof.1 \ + man/sfcbrepos.1 man/sfcbstage.1 man/sfcbunstage.1 man/sfcbuuid.1 \ + man/wbemcat.1 man/xmltest.1 +@@ -2366,7 +2365,6 @@ unittest: + cd test && sh check_all.sh + + install-data-local: +- if test -d $(systemddir); then cp $(srcdir)/sblim-sfcb.service $(systemddir); fi; + test -d $(DESTDIR)$(sfcbstatedir)/registration/repository || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/registration/repository + test -d $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop + test -d $(DESTDIR)$(sfcbstatedir)/stage/regs || $(mkdir_p) $(DESTDIR)$(sfcbstatedir)/stage/regs +@@ -2384,7 +2382,6 @@ install-data-local: + uninstall-local: + rm -f $(DESTDIR)$(sfcbstatedir)/stage/default.reg + rm -f $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop/10_interop.mof +- rm -f $(systemddir)/sblim-sfcb.service + @INDICATIONS_TRUE@ rm -f $(DESTDIR)$(sfcbstatedir)/stage/mofs/root/interop/20_indication.mof + @INDICATIONS_TRUE@ rm -f $(DESTDIR)$(sfcbstatedir)/stage/mofs/indication.mof + @DOCS_TRUE@ rm -rf $(DESTDIR)$(sfcbdocdir)/html diff --git a/SOURCES/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch b/SOURCES/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch new file mode 100644 index 0000000..3268d49 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.8-default-ecdh-curve-name.patch @@ -0,0 +1,26 @@ +diff -up sblim-sfcb-1.4.8/control.c.orig sblim-sfcb-1.4.8/control.c +--- sblim-sfcb-1.4.8/control.c.orig 2014-03-27 00:46:28.000000000 +0100 ++++ sblim-sfcb-1.4.8/control.c 2014-05-15 12:31:38.304169409 +0200 +@@ -170,7 +170,7 @@ static Control init[] = { + {"sslCertList", CTL_STRING, SFCB_CONFDIR "/clist.pem", {0}}, + {"sslCiphers", CTL_STRING, "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH", {0}}, + {"sslDhParamsFilePath", CTL_STRING, NULL, {0}}, +- {"sslEcDhCurveName", CTL_STRING, "secp224r1", {0}}, ++ {"sslEcDhCurveName", CTL_STRING, "secp384r1", {0}}, + {"enableSslCipherServerPref", CTL_BOOL, NULL, {.b=0}}, + + {"registrationDir", CTL_STRING, SFCB_STATEDIR "/registration", {0}}, +diff -up sblim-sfcb-1.4.8/sfcb.cfg.pre.in.orig sblim-sfcb-1.4.8/sfcb.cfg.pre.in +--- sblim-sfcb-1.4.8/sfcb.cfg.pre.in.orig 2014-05-15 12:31:59.188244865 +0200 ++++ sblim-sfcb-1.4.8/sfcb.cfg.pre.in 2014-05-15 12:32:45.554408412 +0200 +@@ -293,8 +293,8 @@ sslCiphers: ALL:!ADH:!LOW:!EXP:!MD5:@STR + ## environment. If this value is not set, the indicated default is in effect. + ## If the value is set but the curve name is not recognized by the underlying + ## openssl implementation, SFCB will abort. +-## Default is secp224r1 +-#sslEcDhCurveName: secp224r1 ++## Default is secp384r1 ++#sslEcDhCurveName: secp384r1 + + ## When set to true, sets the SSL_OP_CIPHER_SERVER_PREFERENCE flag for the ssl + ## context, to enforce server's preference instead of the client preference for diff --git a/SOURCES/sblim-sfcb-1.4.9-docdir-license.patch b/SOURCES/sblim-sfcb-1.4.9-docdir-license.patch new file mode 100644 index 0000000..1262628 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.9-docdir-license.patch @@ -0,0 +1,21 @@ +diff -up sblim-sfcb-1.4.9/Makefile.in.orig sblim-sfcb-1.4.9/Makefile.in +--- sblim-sfcb-1.4.9/Makefile.in.orig 2018-10-11 10:03:54.533549400 +0200 ++++ sblim-sfcb-1.4.9/Makefile.in 2018-10-11 10:04:12.199570473 +0200 +@@ -619,7 +619,7 @@ top_srcdir = @top_srcdir@ + # + # + AUTOMAKE_OPTIONS = no-dist-gzip dist-bzip2 +-sfcbdocdir = $(datadir)/doc/sfcb-$(VERSION) ++sfcbdocdir = $(datadir)/doc/sblim-sfcb + sfcbdatadir = $(datadir)/sfcb + sfcbconfdir = $(sysconfdir)/sfcb + sfcbstatedir = $(localstatedir)/lib/sfcb +@@ -908,7 +908,7 @@ dist_sfcbdata_DATA = default.reg 10_inte + nodist_bin_SCRIPTS = sfcbrepos sfcbstage sfcbunstage sfcbuuid + dist_bin_SCRIPTS = wbemcat xmltest + init_SCRIPTS = sfcb +-sfcbdoc_DATA = README AUTHORS COPYING ++sfcbdoc_DATA = README AUTHORS + sfcbconf_DATA = sfcb.cfg + @PAM_TRUE@dist_pam_DATA = pam/sfcb + @DOCS_TRUE@noinst_DATA = doc/html/index.html diff --git a/SOURCES/sblim-sfcb-1.4.9-fix-ftbfs.patch b/SOURCES/sblim-sfcb-1.4.9-fix-ftbfs.patch new file mode 100644 index 0000000..9548b3c --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.9-fix-ftbfs.patch @@ -0,0 +1,12 @@ +diff -up sblim-sfcb-1.4.9/control.c.orig sblim-sfcb-1.4.9/control.c +--- sblim-sfcb-1.4.9/control.c.orig 2015-07-13 15:06:21.331660336 +0200 ++++ sblim-sfcb-1.4.9/control.c 2015-07-13 15:08:38.031308917 +0200 +@@ -83,7 +83,7 @@ long httpReqHandlerTimeout; + * Kindly null terminate, always, even if might overwrite + * the last char of the truncated string. + */ +-inline char *strncpy_kind(char *to, char *from, size_t size) { ++char *strncpy_kind(char *to, char *from, size_t size) { + strncpy(to, from, size); + *(to + size - 1) = '\0'; + return to; diff --git a/SOURCES/sblim-sfcb-1.4.9-fix-null-content-type-crash.patch b/SOURCES/sblim-sfcb-1.4.9-fix-null-content-type-crash.patch new file mode 100644 index 0000000..4009126 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.9-fix-null-content-type-crash.patch @@ -0,0 +1,47 @@ +Author: Adam Majer +Summary: Fix crash caused by NULL content_type + +Also, allow requests with Content-Type set to text/xml + +==31976== Invalid read of size 1 +==31976== at 0x5883DEB: scanCimXmlRequest (cimXmlParserProcessed.c:1739) +==31976== by 0x588C88E: handleCimRequest (cimRequest.c:1850) +==31976== by 0x4E3D95A: doHttpRequest (httpAdapter.c:1399) +==31976== by 0x4E3EC96: handleHttpRequest (httpAdapter.c:1741) +==31976== by 0x4E3EC96: acceptRequest (httpAdapter.c:2022) +==31976== by 0x4E40B0C: httpDaemon (httpAdapter.c:2464) +==31976== by 0x404866: startHttpd (sfcBroker.c:540) +==31976== by 0x4038B3: main (sfcBroker.c:1062) +==31976== Address 0x0 is not stack'd, malloc'd or (recently) free'd +==31976== +==31976== +==31976== Process terminating with default action of signal 11 (SIGSEGV): dumping core +==31976== Access not within mapped region at address 0x0 +==31976== at 0x5883DEB: scanCimXmlRequest (cimXmlParserProcessed.c:1739) +==31976== by 0x588C88E: handleCimRequest (cimRequest.c:1850) +==31976== by 0x4E3D95A: doHttpRequest (httpAdapter.c:1399) +==31976== by 0x4E3EC96: handleHttpRequest (httpAdapter.c:1741) +==31976== by 0x4E3EC96: acceptRequest (httpAdapter.c:2022) +==31976== by 0x4E40B0C: httpDaemon (httpAdapter.c:2464) +==31976== by 0x404866: startHttpd (sfcBroker.c:540) +==31976== by 0x4038B3: main (sfcBroker.c:1062) + +(gdb) p *ctx +$3 = {cimDoc = 0x69058c0 "", principal = 0x0, host = 0x69054d9 "xxx.xx.xxx.xxx:5989", contentType = 0x0, teTrailers = 0, + sessionId = 1, role = 0x0, cimDocLength = 0, commHndl = 0xffefffab0, chunkFncs = 0x5044798 , + className = 0x0, operation = 0, verb = 0x6905480 "POST", path = 0x6905485 "/"} + +Index: sblim-sfcb-1.4.8/httpAdapter.c +=================================================================== +--- sblim-sfcb-1.4.8.orig/httpAdapter.c ++++ sblim-sfcb-1.4.8/httpAdapter.c +@@ -1047,7 +1047,7 @@ doHttpRequest(CommHndl conn_fd) + + inBuf.authorization = ""; + inBuf.protocol = "HTTP/1.1"; +- inBuf.content_type = NULL; ++ inBuf.content_type = "application/xml"; + inBuf.content_length = UINT_MAX; + inBuf.host = NULL; + inBuf.useragent = ""; + diff --git a/SOURCES/sblim-sfcb-1.4.9-fix-null-deref.patch b/SOURCES/sblim-sfcb-1.4.9-fix-null-deref.patch new file mode 100644 index 0000000..353c2f8 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.9-fix-null-deref.patch @@ -0,0 +1,13 @@ +diff -up sblim-sfcb-1.4.9/providerMgr.c.orig sblim-sfcb-1.4.9/providerMgr.c +--- sblim-sfcb-1.4.9/providerMgr.c.orig 2014-11-25 02:43:12.000000000 +0100 ++++ sblim-sfcb-1.4.9/providerMgr.c 2015-08-24 11:57:18.945280460 +0200 +@@ -355,6 +355,9 @@ lookupProviders(long type, char *classNa + + _SFCB_ENTER(TRACE_PROVIDERMGR, "lookupProviders"); + ++ if (className == NULL) ++ _SFCB_RETURN(NULL); ++ + id = malloc(strlen(nameSpace) + strlen(className) + 8); + strcpy(id, nameSpace); + strcat(id, "|"); diff --git a/SOURCES/sblim-sfcb-1.4.9-fix-ppc-optimization-level.patch b/SOURCES/sblim-sfcb-1.4.9-fix-ppc-optimization-level.patch new file mode 100644 index 0000000..f1ebb45 --- /dev/null +++ b/SOURCES/sblim-sfcb-1.4.9-fix-ppc-optimization-level.patch @@ -0,0 +1,12 @@ +diff -up sblim-sfcb-1.4.9/configure.orig sblim-sfcb-1.4.9/configure +--- sblim-sfcb-1.4.9/configure.orig 2018-09-26 09:43:18.678547933 +0200 ++++ sblim-sfcb-1.4.9/configure 2018-09-26 09:43:31.603560105 +0200 +@@ -5426,8 +5426,6 @@ case $host_cpu in + $as_echo "#define SFCB_IX86 1" >>confdefs.h + + ;; +- powerpc*) CFLAGS="$CFLAGS -O0" +- ;; + esac + + diff --git a/SOURCES/sfcb.service b/SOURCES/sfcb.service new file mode 100644 index 0000000..1fa6714 --- /dev/null +++ b/SOURCES/sfcb.service @@ -0,0 +1,9 @@ +[Unit] +Description=Small Footprint CIM Broker Service +After=syslog.target + +[Service] +ExecStart=/usr/sbin/sfcbd + +[Install] +WantedBy=multi-user.target diff --git a/SPECS/sblim-sfcb.spec b/SPECS/sblim-sfcb.spec new file mode 100644 index 0000000..6539d40 --- /dev/null +++ b/SPECS/sblim-sfcb.spec @@ -0,0 +1,428 @@ +# +# $Id: sblim-sfcb.spec,v 1.5 2010/06/23 10:31:02 vcrhonek Exp $ +# +# Package spec for sblim-sfcb +# + +Name: sblim-sfcb +Summary: Small Footprint CIM Broker +URL: http://sblim.wiki.sourceforge.net/ +Version: 1.4.9 +Release: 25%{?dist} +License: EPL-1.0 +Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 +Source1: sfcb.service +# Missing man pages +Source2: sfcbdump.1.gz +Source3: sfcbinst2mof.1.gz +Source4: sfcbtrace.1.gz +# Patch0: changes schema location to the path we use +Patch0: sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch +# Patch1: Fix provider debugging - variable for stopping wait-for-debugger +# loop must be volatile +Patch1: sblim-sfcb-1.3.15-fix-provider-debugging.patch +# Patch2: increase default value of maxMsgLen in sfcb.cfg +Patch2: sblim-sfcb-1.3.16-maxMsgLen.patch +# Patch3: we'll install own service file +Patch3: sblim-sfcb-1.4.5-service.patch +# Patch4: fixes multilib issue with man page and config file +Patch4: sblim-sfcb-1.3.16-multilib-man-cfg.patch +# Patch5: change default ecdh curve name, as the original is not enabled +# in openssl on Fedora, rhbz#1097794 +Patch5: sblim-sfcb-1.4.8-default-ecdh-curve-name.patch +Patch6: sblim-sfcb-1.4.9-fix-ftbfs.patch +# Patch7: fix possible null pointer dereference (CVE-2015-5185), rhbz#1255802 +Patch7: sblim-sfcb-1.4.9-fix-null-deref.patch +# Patch8: fix null pointer (DoS) vulnerability via POST request to /cimom +# (CVE-2018-6644), patch by Adam Majer, rhbz#1543826 +Patch8: sblim-sfcb-1.4.9-fix-null-content-type-crash.patch +# Patch9: removes decrease of optimization level to -O0 on ppc64le +Patch9: sblim-sfcb-1.4.9-fix-ppc-optimization-level.patch +# Patch10: fixes docdir name and removes install of COPYING with license +# which is included through %%license +Patch10: sblim-sfcb-1.4.9-docdir-license.patch +Provides: cim-server = 0 +Requires: cim-schema +Requires: sblim-sfcCommon +BuildRequires: make +BuildRequires: libcurl-devel +BuildRequires: perl-generators +BuildRequires: zlib-devel +BuildRequires: openssl-devel +BuildRequires: pam-devel +BuildRequires: cim-schema +BuildRequires: bison flex +BuildRequires: sblim-cmpi-devel +BuildRequires: systemd +BuildRequires: sblim-sfcCommon-devel +BuildRequires: openslp-devel +BuildRequires: gcc +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%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 -T -b 0 -n %{name}-%{version} +%patch0 -p1 -b .sfcbrepos-schema-location +%patch1 -p1 -b .fix-provider-debugging +%patch2 -p1 -b .maxMsgLen +%patch3 -p1 -b .service +%patch4 -p1 -b .multilib-man-cfg +%patch5 -p1 -b .default-ecdh-curve-name +%patch6 -p1 -b .fix-ftbfs +%patch7 -p1 -b .fix-null-deref +%patch8 -p1 -b .fix-null-content-type-crash +%patch9 -p1 -b .fix-ppc-optimization-level +%patch10 -p1 -b .docdir-license + +%build +%configure --enable-debug --enable-uds --enable-ssl --enable-pam --enable-ipv6 \ + --enable-slp --enable-large_volume_support --enable-optimized-enumeration --enable-relax-mofsyntax \ + CFLAGS="$CFLAGS -D_GNU_SOURCE -fPIE -DPIE -fcommon" LDFLAGS="$LDFLAGS -Wl,-z,now -pie" + +make + +%install +make DESTDIR=$RPM_BUILD_ROOT install +rm $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/sfcb +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} +install -p -m644 %{SOURCE1} $RPM_BUILD_ROOT/%{_unitdir}/sblim-sfcb.service +# install man pages +mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/ +cp %{SOURCE2} %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT/%{_mandir}/man1/ +# remove unused static libraries and so files +rm -f $RPM_BUILD_ROOT/%{_libdir}/sfcb/*.la + +echo "%%license COPYING" > _pkg_list +find $RPM_BUILD_ROOT/%{_datadir}/sfcb -type f | grep -v $RPM_BUILD_ROOT/%{_datadir}/sfcb/CIM >> _pkg_list +sed -i s?$RPM_BUILD_ROOT??g _pkg_list > _pkg_list_2 +echo "%config(noreplace) %{_sysconfdir}/sfcb/*" >> _pkg_list +echo "%config(noreplace) %{_sysconfdir}/pam.d/*" >> _pkg_list +echo "%doc %{_datadir}/doc/sblim-sfcb/[!COPYING]*" >> _pkg_list +echo "%{_datadir}/man/man1/*" >> _pkg_list +echo "%{_unitdir}/sblim-sfcb.service" >> _pkg_list +echo "%{_localstatedir}/lib/sfcb" >> _pkg_list +echo "%{_bindir}/*" >> _pkg_list +echo "%{_sbindir}/*" >> _pkg_list +echo "%{_libdir}/sfcb/*.so.*" >> _pkg_list +echo "%{_libdir}/sfcb/*.so" >> _pkg_list + +cat _pkg_list + +%pre +/usr/bin/getent group sfcb >/dev/null || /usr/sbin/groupadd -r sfcb +/usr/sbin/usermod -a -G sfcb root > /dev/null 2>&1 || : + +%post +%{_datadir}/sfcb/genSslCert.sh %{_sysconfdir}/sfcb &>/dev/null || : +/sbin/ldconfig +%{_bindir}/sfcbrepos -f > /dev/null 2>&1 +%systemd_post sblim-sfcb.service + +%preun +%systemd_preun sblim-sfcb.service + +%postun +/sbin/ldconfig +%systemd_postun_with_restart sblim-sfcb.service +if [ $1 -eq 0 ]; then + /usr/sbin/groupdel sfcb > /dev/null 2>&1 || :; +fi; + +%files -f _pkg_list + +%changelog +* Thu Jan 27 2022 Vitezslav Crhonek - 1.4.9-25 +- Change build flags, fix errors during the start of the service + +* Tue Aug 10 2021 Mohan Boddu - 1.4.9-24 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jun 16 2021 Mohan Boddu - 1.4.9-23 +- Rebuilt for RHEL 9 BETA for openssl 3.0 + Related: rhbz#1971065 + +* Fri Apr 16 2021 Mohan Boddu - 1.4.9-22 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Wed Jan 27 2021 Fedora Release Engineering - 1.4.9-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 1.4.9-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Wed Jul 08 2020 Vitezslav Crhonek - 1.4.9-19 +- Fix sfcbrepos redirection + +* Wed Feb 12 2020 Vitezslav Crhonek - 1.4.9-18 +- Fixes multiple definiton of variables (FTBFS with GCC 10) + Resolves: #1800074 + +* Thu Jan 30 2020 Fedora Release Engineering - 1.4.9-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Jul 26 2019 Fedora Release Engineering - 1.4.9-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Feb 02 2019 Fedora Release Engineering - 1.4.9-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Oct 11 2018 Vitezslav Crhonek - 1.4.9-14 +- Don't decrease optimization level to -O0 on ppc64le +- Use %%license for file which contains the text of the license +- Change versioned docdir to unversioned and rename the docdir to match + the package name +- Remove %%defattr + +* Mon Oct 08 2018 Vitezslav Crhonek - 1.4.9-13 +- Fix license tag + +* Sat Jul 14 2018 Fedora Release Engineering - 1.4.9-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Feb 27 2018 Vitezslav Crhonek - 1.4.9-11 +- Add BuildRequires gcc + +* Wed Feb 14 2018 Vitezslav Crhonek - 1.4.9-10 +- Fix null pointer (DoS) vulnerability via POST request to /cimom (CVE-2018-6644) + (patch by Adam Majer) + Resolves: #1543825 + +* Fri Feb 09 2018 Fedora Release Engineering - 1.4.9-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Aug 03 2017 Fedora Release Engineering - 1.4.9-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.4.9-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.4.9-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 1.4.9-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Aug 24 2015 Vitezslav Crhonek - 1.4.9-4 +- Fix possible null pointer dereference (CVE-2015-5185) + Resolves: #1255587 + +* Mon Jul 13 2015 Vitezslav Crhonek - 1.4.9-3 +- Fix sblim-sfcb FTBFS in rawhide + Resolves: #1239986 + +* Fri Jun 19 2015 Fedora Release Engineering - 1.4.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Tue Dec 02 2014 Vitezslav Crhonek - 1.4.9-1 +- Update to sblim-sfcb-1.4.9 +- Silence sfcbrepos in %%post + +* Mon Aug 18 2014 Fedora Release Engineering - 1.4.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1.4.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Thu May 15 2014 Vitezslav Crhonek - 1.4.8-2 +- Fix SFCB fails to start: Failure setting ECDH curve name (secp224r1) + Resolves: #1097794 + +* Thu Mar 27 2014 Vitezslav Crhonek - 1.4.8-1 +- Update to sblim-sfcb-1.4.8 + +* Mon Mar 24 2014 Vitezslav Crhonek - 1.4.7-3 +- Fix multilib issue with man page and config file + +* Tue Jan 21 2014 Vitezslav Crhonek - 1.4.7-2 +- Add few configure options, build require openslp-devel + +* Thu Jan 02 2014 Vitezslav Crhonek - 1.4.7-1 +- Update to sblim-sfcb-1.4.7 + +* Wed Oct 09 2013 Vitezslav Crhonek - 1.4.6-2 +- Add version to cim-server virtual provides + +* Mon Oct 07 2013 Vitezslav Crhonek - 1.4.6-1 +- Update to sblim-sfcb-1.4.6 + +* Thu Sep 05 2013 Vitezslav Crhonek - 1.4.5-1 +- Update to sblim-sfcb-1.4.5 + +* Tue Aug 13 2013 Vitezslav Crhonek - 1.3.16-9 +- Build require systemd for unitdir macro + Resolves: #988777 + +* Sat Aug 03 2013 Petr Pisar - 1.3.16-8 +- Perl 5.18 rebuild + +* Tue Jul 23 2013 Vitezslav Crhonek - 1.3.16-7 +- Fix CIM clients are sometimes getting HTTP/1.1 501 Not Implemented + (patch by Tomas Bzatek) + Resolves: #968397 + +* Wed Jul 17 2013 Petr Pisar - 1.3.16-6 +- Perl 5.18 rebuild + +* Mon Jun 24 2013 Vitezslav Crhonek - 1.3.16-5 +- Increase default maxMsgLen + Resolves: #967940 + +* Mon Jun 17 2013 Vitezslav Crhonek - 1.3.16-4 +- Create missing man pages +- Add support for EmbeddedInstance qualifier + Resolves: #919377 + +* Mon May 20 2013 Vitezslav Crhonek - 1.3.16-3 +- Fix indCIMXmlHandler crash in IndCIMXMLHandlerInvokeMethod with Embedded Instances + Resolves: #957747 +- Fix sfcb creates invalid XML with embedded object inside embedded object + Resolves: #957742 + +* Tue Jan 29 2013 Vitezslav Crhonek - 1.3.16-2 +- Fix URL in the spec file +- Remove unused devel part from the spec file +- Full relro support + +* Tue Jan 08 2013 Vitezslav Crhonek - 1.3.16-1 +- Update to sblim-sfcb-1.3.16 +- Fix provider debugging (patch by Radek Novacek) + +* Thu Nov 29 2012 Vitezslav Crhonek - 1.3.15-5 +- Comment patches + +* Thu Sep 06 2012 Vitezslav Crhonek - 1.3.15-4 +- Fix issues found by fedora-review utility in the spec file + +* Thu Aug 23 2012 Vitezslav Crhonek - 1.3.15-3 +- Use new systemd-rpm macros + Resolves: #850307 + +* Sat Jul 21 2012 Fedora Release Engineering - 1.3.15-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 19 2012 Vitezslav Crhonek - 1.3.15-1 +- Update to sblim-sfcb-1.3.15 + +* Thu Jun 07 2012 Vitezslav Crhonek - 1.3.14-2 +- Remove SysV init script + +* Wed Apr 04 2012 Vitezslav Crhonek - 1.3.14-1 +- Update to sblim-sfcb-1.3.14 + +* Sat Jan 14 2012 Fedora Release Engineering - 1.3.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Oct 12 2011 Vitezslav Crhonek - 1.3.13-1 +- Update to sblim-sfcb-1.3.13 + +* Wed Sep 07 2011 Vitezslav Crhonek - 1.3.12-1 +- Update to sblim-sfcb-1.3.12 + +* Wed Jun 15 2011 Vitezslav Crhonek - 1.3.11-2 +- Remove sfcb system group in post uninstall scriptlet +- Fix minor rpmlint warnings + +* Thu May 26 2011 Vitezslav Crhonek - 1.3.11-1 +- Update to sblim-sfcb-1.3.11 + +* Mon May 9 2011 Bill Nottingham - 1.3.10-5 +- fix systemd scriptlets for upgrade + +* Wed Feb 09 2011 Fedora Release Engineering +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Fri Jan 7 2011 Praveen K Paladugu - 1.3.10-3 +- Added the required scripting to manage the service with systemd + +* Fri Jan 7 2011 Praveen K Paladugu - 1.3.10-2 +- Following the BZ#660072, added sfcb.service file for compliance with systemd +- Since sfcb's PAM authentication requires, the user to be in group sfcb, +- added the root user to "sfcb" group in %%pre section. + +* Mon Dec 6 2010 Vitezslav Crhonek - 1.3.10-1 +- Update to sblim-sfcb-1.3.10 +- Fix CMGetCharPtr macro (patch by Kamil Dudka) + +* Mon Sep 6 2010 Vitezslav Crhonek - 1.3.9-1 +- Update to sblim-sfcb-1.3.9 +- Compile with --enable-uds, i. e. enable unix domain socket local + connect functionality +- Create sfcb system group (used by basic authentication with PAM) + in pre install scriptlet +- Fix default location where sfcbrepos is looking for schema files + and simplify sfcbrepos command in post install sciptlet +- Add missing soname files + +* Wed Jun 23 2010 Vitezslav Crhonek - 1.3.8-1 +- Update to sblim-sfcb-1.3.8 +- Fix unmatched calls of closeLogging() and startLogging() + +* Thu Apr 22 2010 Vitezslav Crhonek - 1.3.7-3 +- Fix initscript + +* Mon Mar 22 2010 Vitezslav Crhonek - 1.3.7-2 +- Make sblim-sfcb post install scriptlet silent +- Fix value.c + +* Wed Mar 3 2010 - 1.3.7-1 +- Update to sblim-sfcb-1.3.7 +- Fix dist tag in Release field + +* Tue Sep 22 2009 - 1.3.4-8 +- Removed the devel package and moved the init script to right directory + +* Wed Sep 16 2009 - 1.3.4-7 +- Modified the spec based on Praveen's comments + +* Thu Sep 10 2009 - 1.3.4-6 +- Fixed the incoherent init script problem by renaming the init script + +* Thu Sep 03 2009 - 1.3.4-5 +- added the devel package to fit in all the development files +- Made changes to the initscript not to start the service by default + +* Thu Jul 02 2009 - 1.3.4-4 +- added build requires for flex, bison, cim-schema suggested by Sean Swehla +- added sfcbrepos directive to post section + +* Thu Jun 18 2009 - 1.3.4-3 +- re-ordered the top so that the name comes first +- added the la files to the package list +- removed the smp flags from make because that causes a build break +- updated spec file to remove schema and require the cim-schema package +- change provides statement to cim-server as suggested by Matt Domsch +- updated to upstream version 1.3.4 which was released Jun 15 2009 + +* Thu Oct 09 2008 - 1.3.2-2 +- updated spec file based on comments from Srini Ramanatha as below: +- updated the Release line to add dist to be consistent with sblim-sfcc +- updated the source URL + +* Wed Oct 08 2008 - 1.3.2-1 +- updated upstream version and added CFLAGS to configure to work +- around http://sources.redhat.com/bugzilla/show_bug.cgi?id=6545 + +* Fri Aug 08 2008 - 1.3.0-1 +- updated buildrequires to require libcurl-devel rather than curl-devel +- removed requires to allow rpm to automatically generate the requires +- removed echo to stdout +- removed paranoia check around cleaning BuildRoot per Fedora MUST requirements +- changed group to supress rpmlint complaint +- added chkconfig to enable sfcb by default when it is installed +- added patch0 to enable 1.3.0 to build on Fedora 9 + +* Fri Feb 09 2007 - 1.2.1-0 +- Updated for 1.2.1 content, enabled SSL, indications + +* Wed Aug 31 2005 - 0.9.0b-0 +- Support for man pages added