added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,100 @@
From fccbb85beb89b9ca35cac87fb553ef124a6c516b Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 13 Aug 2020 17:26:14 -0700
Subject: [PATCH] Avoid variable definition in header files
This can cause multiple definitions to be emitted into objects and link
fail as a result with gcc-10+ since it defaults to -fno-common, patch
moves the definitions to source files
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
control.h | 2 +-
providerMgr.c | 1 +
providerMgr.h | 2 +-
sfcBroker.c | 2 +-
trace.c | 1 +
trace.h | 2 +-
6 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/control.h b/control.h
index e41e4b9..5e15363 100644
--- a/control.h
+++ b/control.h
@@ -28,7 +28,7 @@ int getControlUNum(char *id, unsigned int *val);
int getControlULong(char *id, unsigned long *val);
int getControlNum(char *id, long *val);
int getControlBool(char *id, int *val);
-const char * sfcBrokerStart;
+extern const char * sfcBrokerStart;
#endif
/* MODELINES */
diff --git a/providerMgr.c b/providerMgr.c
index c38a7d3..ff6d38d 100644
--- a/providerMgr.c
+++ b/providerMgr.c
@@ -53,6 +53,7 @@
#define SFCB_ASM(x)
#endif
+sigset_t mask, old_mask;
static pthread_mutex_t resultsocketMutex = PTHREAD_MUTEX_INITIALIZER;
extern CMPIBroker *Broker;
diff --git a/providerMgr.h b/providerMgr.h
index 3cc7745..fbbfecd 100644
--- a/providerMgr.h
+++ b/providerMgr.h
@@ -398,7 +398,7 @@ BinResponseHdr **invokeProviders(BinRequestContext * binCtx, int *err,
BinResponseHdr *invokeProvider(BinRequestContext * ctx);
void freeResponseHeaders(BinResponseHdr ** resp,
BinRequestContext * ctx);
-sigset_t mask, old_mask;
+extern sigset_t mask, old_mask;
#endif
/* MODELINES */
diff --git a/sfcBroker.c b/sfcBroker.c
index ca043c9..85581f5 100644
--- a/sfcBroker.c
+++ b/sfcBroker.c
@@ -53,7 +53,7 @@
#endif
int sfcBrokerPid = 0;
-
+const char *sfcBrokerStart;
extern int sfcbUseSyslog;
extern void setExFlag(unsigned long f);
diff --git a/trace.c b/trace.c
index 438af46..23597e1 100644
--- a/trace.c
+++ b/trace.c
@@ -52,6 +52,7 @@ char *processName = NULL;
int providerProcess = 0;
int idleThreadId = 0;
int terminating = 0;
+int colorTrace;
int _sfcb_debug = 0;
unsigned long _sfcb_trace_mask = 0;
diff --git a/trace.h b/trace.h
index 2c6d8be..ea39850 100644
--- a/trace.h
+++ b/trace.h
@@ -130,7 +130,7 @@ typedef struct traceId {
#define CYAN 6
#define WHITE 7
void changeTextColor(int reset);
-int colorTrace;
+extern int colorTrace;
#define MAX_MSG_SIZE 1024 /* max length of trace message */
--
2.28.0

View File

@@ -0,0 +1,121 @@
From 394bf0f1ed07419d40f6024363cc1ffc7ef61bc6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 31 Aug 2017 21:56:25 -0700
Subject: [PATCH] Replace need for error.h when it does not exist
helps fixing build on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending
brokerUpc.c | 5 ++++-
configure.ac | 2 +-
httpAdapter.c | 4 +++-
support.c | 14 +++++++++++++-
trace.c | 4 +++-
5 files changed, 24 insertions(+), 5 deletions(-)
--- a/brokerUpc.c
+++ b/brokerUpc.c
@@ -20,8 +20,11 @@
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_ERROR_H
#include <error.h>
-
+#else
+#include <err.h>
+#endif
#include "support.h"
#include "native.h"
#include <sfcCommon/utilft.h>
--- a/configure.ac
+++ b/configure.ac
@@ -517,7 +517,7 @@ fi
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h zlib.h])
+AC_CHECK_HEADERS([error.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h zlib.h])
AC_CHECK_HEADERS([cmpi/cmpimacs.h cmpi/cmpift.h cmpi/cmpidt.h],[],[AC_MSG_ERROR([Could not find required CPMI header.])])
# Checks for typedefs, structures, and compiler characteristics.
--- a/httpAdapter.c
+++ b/httpAdapter.c
@@ -71,7 +71,9 @@
#ifdef HAVE_UDS
#include <grp.h>
#endif
-
+#ifndef __SOCKADDR_ARG
+# define __SOCKADDR_ARG struct sockaddr *__restrict
+#endif
/* should probably go into cimRequest.h */
#define CIM_PROTOCOL_ANY 0
#define CIM_PROTOCOL_CIM_XML 1
--- a/support.c
+++ b/support.c
@@ -27,16 +27,20 @@
* @sa native.h
*/
+#include "config.h"
#include <stdio.h>
#include <dlfcn.h>
#include "support.h"
#include <stdio.h>
#include <stdlib.h>
+#ifdef HAVE_ERROR_H
#include <error.h>
+#else
+#include <err.h>
+#endif
#include <errno.h>
#include "native.h"
#include "trace.h"
-#include "config.h"
#include "control.h"
#include <pthread.h>
@@ -331,17 +335,25 @@ loadQualifierDeclMI(const char *provider
_SFCB_RETURN(NULL);
};
+
/****************************************************************************/
/** Exits the program with a memory allocation error message in case the given
* condition holds.
*/
+#if HAVE_ERROR_H
#define __ALLOC_ERROR(cond) \
if ( cond ) { \
error_at_line ( -1, errno, __FILE__, __LINE__, \
"unable to allocate requested memory." ); \
}
-
+#else
+#define __ALLOC_ERROR(cond) \
+ if ( cond ) { \
+ err(1, "%s:%d: %s", __FILE__, __LINE__, \
+ "unable to allocate requested memory." ); \
+ }
+#endif
/**
* flag to ensure MM is initialized only once
*/
--- a/trace.c
+++ b/trace.c
@@ -279,7 +279,9 @@ _sfcb_trap(int tn)
}
#endif
}
-
+#ifndef SA_INTERRUPT
+# define SA_INTERRUPT 0x20000000 /* from GLIBC's <bits/sigaction.h> */
+#endif
sigHandler *
setSignal(int sn, sigHandler * sh, int flags)
{

View File

@@ -0,0 +1,72 @@
From 366c4a1c8b7724241ad2b703e48615ca5affa32e Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 1 Sep 2022 12:46:07 -0700
Subject: [PATCH] configure: Check for function from respective library in
AC_CHECK_LIB
This helps in doing correct checks especially with newer autoconf and
toolchain
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
configure.ac | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index d4915a1..6154514 100644
--- a/configure.ac
+++ b/configure.ac
@@ -332,8 +332,8 @@ if [test "$enable_tests"]; then
fi
if [test "$test_gcov" == "yes"]; then
- AC_CHECK_LIB(gcc,main)
- AC_CHECK_LIB(gcov,main)
+ AC_CHECK_LIB(gcc,_Unwind_GetIP)
+ AC_CHECK_LIB(gcov,gcov_write_summary)
AC_PATH_PROG(LCOV,lcov,yes,no)
AC_PATH_PROG(GENHTML,genhtml,yes,no)
if test "$LCOV" == "no" -o "$GENHTML" == "no" ; then
@@ -400,7 +400,7 @@ fi
if test "$enable_pam" == "yes"; then
AC_DEFINE(HAVE_PAM,,[PAM support enabled.])
- AC_CHECK_LIB(pam,main,[SFCB_LIBPAM=-lpam],[AC_MSG_ERROR(Could not find required pam library.)])
+ AC_CHECK_LIB(pam,pam_start,[SFCB_LIBPAM=-lpam],[AC_MSG_ERROR(Could not find required pam library.)])
SFCB_CONF_BASICAUTHLIB=sfcBasicPAMAuthentication
SFCB_CONF_DOBASICAUTH=true
else
@@ -470,16 +470,16 @@ if test "$HAVE_UNZIP" = "no" ; then
fi
# Checks for libraries.
-AC_CHECK_LIB(pthread,main)
-AC_CHECK_LIB(dl,main)
-AC_CHECK_LIB(z,main,[SFCB_LIBZ=-lz],[AC_MSG_ERROR([Could not find required libz])])
+AC_CHECK_LIB(pthread,pthread_create)
+AC_CHECK_LIB(dl,dlopen)
+AC_CHECK_LIB(z,inflate,[SFCB_LIBZ=-lz],[AC_MSG_ERROR([Could not find required libz])])
# Test for the newest function here to make sure it's up to date.
AC_CHECK_LIB(sfcUtil,invalid_uint,, \
[AC_MSG_ERROR([Function invalid_uint not found. Is the required version of sfcCommon installed?])])
if test "$enable_indications" = "yes" ; then
LOAD_INDICATION_PROVIDER=
AC_DEFINE(HAVE_INDICATIONS,1,[Indication support enabled.])
- AC_CHECK_LIB(curl,main)
+ AC_CHECK_LIB(curl,curl_easy_init)
else
LOAD_INDICATION_PROVIDER='#'
fi
@@ -487,7 +487,7 @@ fi
AC_SUBST(LOAD_INDICATION_PROVIDER)
if test "$enable_ssl" = "yes"; then
- AC_CHECK_LIB(ssl,main)
+ AC_CHECK_LIB(ssl,SSL_CTX_new)
SFCB_CONF_HTTPS=true
SFCB_CONF_HTTP=false
else
--
2.37.3

View File

@@ -0,0 +1,151 @@
From c5b15ae9636a3b73407372cce87eb40ea78a68ea Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 2 Sep 2022 15:51:31 -0700
Subject: [PATCH] include missing system headers
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
brokerEnc.c | 2 ++
brokerOs.c | 1 +
mlog.c | 1 +
mofc/backend_sfcb.c | 2 +-
sfcbdump.c | 1 +
sfcbdumpP32onI32.c | 1 +
sfcbsem.c | 1 +
trace.c | 3 ++-
trace.h | 3 ++-
9 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/brokerEnc.c b/brokerEnc.c
index 9115e71..889afcd 100644
--- a/brokerEnc.c
+++ b/brokerEnc.c
@@ -25,6 +25,8 @@
#include "constClass.h"
#include <sfcCommon/utilft.h>
+#include <string.h> /* strcasecmp */
+
extern const char *opGetClassNameChars(const CMPIObjectPath * cop);
extern const char *opGetNameSpaceChars(const CMPIObjectPath * cop);
extern CMPIConstClass *getConstClass(const char *ns, const char *cn);
diff --git a/brokerOs.c b/brokerOs.c
index 8d73a0b..b1427fd 100644
--- a/brokerOs.c
+++ b/brokerOs.c
@@ -22,6 +22,7 @@
#include <pthread.h>
#include "native.h"
#include <stdlib.h>
+#include <string.h> /* strcmp */
static char *
resolveFileName(const char *filename)
diff --git a/mlog.c b/mlog.c
index a2d9eb7..6d9cd29 100644
--- a/mlog.c
+++ b/mlog.c
@@ -26,6 +26,7 @@ const char *_mlog_id =
#include <syslog.h>
#include <stdarg.h>
#include <stdio.h>
+#include <string.h> /* strcat */
#include <errno.h>
#include <signal.h>
#include "trace.h" /* for setSignal() */
diff --git a/mofc/backend_sfcb.c b/mofc/backend_sfcb.c
index 614abcd..99d4061 100644
--- a/mofc/backend_sfcb.c
+++ b/mofc/backend_sfcb.c
@@ -29,7 +29,7 @@
#include "backend.h"
#include "objectpath.h"
#include <sys/utsname.h>
-
+#include <string.h>
extern CMPIStatus sfcb_simpleArrayAdd(CMPIArray * array, CMPIValue * val, CMPIType type);
extern CMPIObjectPath *getObjectPath(char *path, char **msg);
diff --git a/sfcbdump.c b/sfcbdump.c
index 8a9c335..aa8559c 100644
--- a/sfcbdump.c
+++ b/sfcbdump.c
@@ -23,6 +23,7 @@
#include <errno.h>
#include <stddef.h>
#include <getopt.h>
+#include <string.h> /* strerror */
#include "objectImpl.h"
#define BINARY_NAME argv[0]
diff --git a/sfcbdumpP32onI32.c b/sfcbdumpP32onI32.c
index ccf87dc..3540751 100644
--- a/sfcbdumpP32onI32.c
+++ b/sfcbdumpP32onI32.c
@@ -22,6 +22,7 @@
#include <fcntl.h>
#include <errno.h>
#include <stddef.h>
+#include <string.h>
#include <getopt.h>
#include "objectImpl.h"
#include <byteswap.h>
diff --git a/sfcbsem.c b/sfcbsem.c
index 3f8de7f..1e6358b 100644
--- a/sfcbsem.c
+++ b/sfcbsem.c
@@ -21,6 +21,7 @@
/* includes */
#include <stdio.h>
+#include <string.h>
#include <getopt.h>
#include <errno.h>
diff --git a/trace.c b/trace.c
index 23597e1..c4f8011 100644
--- a/trace.c
+++ b/trace.c
@@ -25,6 +25,7 @@
#include "native.h"
#include <string.h>
#include <time.h>
+#include <pthread.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -50,7 +51,7 @@
char *processName = NULL;
int providerProcess = 0;
-int idleThreadId = 0;
+pthread_t idleThreadId = 0;
int terminating = 0;
int colorTrace;
diff --git a/trace.h b/trace.h
index ea39850..52d408d 100644
--- a/trace.h
+++ b/trace.h
@@ -25,6 +25,7 @@
#include "mlog.h"
+#include <pthread.h>
extern unsigned long _sfcb_trace_mask;
/* use pointer indirect _sfcb_trace_mask to allow shared memory flag */
extern unsigned long *_ptr_sfcb_trace_mask;
@@ -162,7 +163,7 @@ extern sigHandler *setSignal(int sn, sigHandler * sh, int flags);
extern char *processName;
extern int providerProcess;
-extern int idleThreadId;
+extern pthread_t idleThreadId;
extern int terminating;
#endif
--
2.37.3

View File

@@ -0,0 +1,29 @@
From 446fb15f79499f52ce01ca759dbdcfe635519a82 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 27 Jun 2017 07:09:33 -0700
Subject: [PATCH] include stdint.h system header for UINT16_MAX
Fixes build error
error: 'UINT16_MAX' undeclared (first use in this function)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
interopServerProvider.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/interopServerProvider.c b/interopServerProvider.c
index 23ae182..532febe 100644
--- a/interopServerProvider.c
+++ b/interopServerProvider.c
@@ -33,6 +33,7 @@
#include <sfcCommon/utilft.h>
#include <stdio.h>
#include <stdlib.h>
+#include <stdint.h>
#include <ctype.h>
#include <string.h>
#include <sys/types.h>
--
2.13.2

View File

@@ -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);

View File

@@ -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

View File

@@ -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 <schuur@de.ibm.com>
.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

View File

@@ -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 ] &&

View File

@@ -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

View File

@@ -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

View File

@@ -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;

View File

@@ -0,0 +1,31 @@
From ad6ca4f392bf549239b1ed3b2b372070eb127e7f Mon Sep 17 00:00:00 2001
From: Robert Yang <liezhi.yang@windriver.com>
Date: Wed, 11 Jul 2018 11:06:04 +0800
Subject: [PATCH] Makefile.am: fix sfcbinst2mof_DEPENDENCIES
Fixed build with automake 1.16.1:
/path/to/i586-poky-linux/8.1.0/ld: cannot find -lsfcBrokerCore
collect2: error: ld returned 1 exit status
Upstream-Status: Pending
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
Makefile.am | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile.am b/Makefile.am
index 34ac319..47deed7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -360,6 +360,7 @@ sfcbproc_SOURCES=sfcbproc.c
sfcbinst2mof_SOURCES=sfcbinst2mof.c
sfcbinst2mof_LDADD = -lsfcFileRepository -lsfcBrokerCore
+sfcbinst2mof_DEPENDENCIES = libsfcBrokerCore.la libsfcFileRepository.la
sfcbtrace_SOURCES=sfcbtrace.c
sfcbtrace_LDADD = -lsfcBrokerCore
--
2.7.4

View File

@@ -0,0 +1,11 @@
[Unit]
Description=Small Footprint CIM Broker Service
After=syslog.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/sfcbd -d
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,89 @@
SUMMARY = "Small Footprint CIM Broker"
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)."
HOMEPAGE = "http://www.sblim.org"
SECTION = "Applications/System"
LICENSE = "EPL-1.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=f300afd598546add034364cd0a533261"
DEPENDS = "curl libpam openssl sblim-sfc-common unzip-native"
inherit features_check
REQUIRED_DISTRO_FEATURES = "pam"
SRC_URI = "http://downloads.sourceforge.net/sblim/${BP}.tar.bz2 \
file://sfcb.service \
file://sblim-sfcb-1.3.9-sfcbrepos-schema-location.patch \
file://sblim-sfcb-1.3.15-fix-provider-debugging.patch \
file://sblim-sfcb-1.3.16-maxMsgLen.patch \
file://sblim-sfcb-1.4.5-service.patch \
file://sblim-sfcb-1.3.16-multilib-man-cfg.patch \
file://sblim-sfcb-1.4.8-default-ecdh-curve-name.patch \
file://sblim-sfcb-1.4.9-fix-ftbfs.patch \
file://0001-include-stdint.h-system-header-for-UINT16_MAX.patch \
file://0001-Replace-need-for-error.h-when-it-does-not-exist.patch \
file://sblim-sfcb-1.4.9-fix-sfcbinst2mof.patch \
file://0001-Avoid-variable-definition-in-header-files.patch \
file://0001-configure-Check-for-function-from-respective-library.patch \
file://0001-include-missing-system-headers.patch \
"
SRC_URI[md5sum] = "28021cdabc73690a94f4f9d57254ce30"
SRC_URI[sha256sum] = "634a67b2f7ac3b386a79160eb44413d618e33e4e7fc74ae68b0240484af149dd"
CVE_CHECK_IGNORE += "\
CVE-2012-3381 \
"
inherit autotools
inherit systemd
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE:${PN} = "sblim-sfcb.service"
SYSTEMD_AUTO_ENABLE = "enable"
LDFLAGS:append = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}"
EXTRA_OECONF = '--enable-debug \
--enable-ssl \
--enable-pam \
--enable-ipv6 \
CFLAGS="${CFLAGS} -D_GNU_SOURCE"'
# make all with -j option is unsafe.
PARALLEL_MAKE = ""
INSANE_SKIP:${PN} = "dev-so"
CONFIG_SITE = "${WORKDIR}/config-site.${P}"
do_install() {
cp -f ${S}/sfcb.cfg.pre.in ${S}/sfcb.cfg
oe_runmake DESTDIR=${D} install
install -d ${D}${systemd_unitdir}/system
install -m 0644 ${WORKDIR}/sfcb.service ${D}${systemd_unitdir}/system/sblim-sfcb.service
install -d ${D}${sysconfdir}/init.d
mv ${D}${sysconfdir}/init.d/sfcb ${D}${sysconfdir}/init.d/sblim-sfcb
sed -i -e 's/\/var\/lock\/subsys\/sfcb/\/var\/lock\/subsys\/sblim-sfcb/g' ${D}${sysconfdir}/init.d/sblim-sfcb
rm -rf ${D}${libdir}/sfcb/*.la
}
pkg_postinst:${PN} () {
$INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
}
pkg_postinst_ontarget:${PN} () {
${datadir}/sfcb/genSslCert.sh ${sysconfdir}/sfcb
${bindir}/sfcbrepos -f
}
FILES:${PN} += "${libdir}/sfcb ${datadir}/sfcb"
FILES:${PN}-dbg += "${libdir}/sfcb/.debug"
RDEPENDS:${PN} = "perl bash"