diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-12-17 04:11:34 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-01-09 02:21:44 +0300 |
commit | 1a4b7ee28bf7413af6513fb45ad0d0736048f866 (patch) | |
tree | 79f6d8ea698cab8f2eaf4f54b793d2ca7a1451ce /meta-openembedded/meta-networking/recipes-daemons | |
parent | 5b9ede0403237c7dace972affa65cf64a1aadd0e (diff) | |
download | openbmc-1a4b7ee28bf7413af6513fb45ad0d0736048f866.tar.xz |
reset upstream subtrees to yocto 2.6
Reset the following subtrees on thud HEAD:
poky: 87e3a9739d
meta-openembedded: 6094ae18c8
meta-security: 31dc4e7532
meta-raspberrypi: a48743dc36
meta-xilinx: c42016e2e6
Also re-apply backports that didn't make it into thud:
poky:
17726d0 systemd-systemctl-native: handle Install wildcards
meta-openembedded:
4321a5d libtinyxml2: update to 7.0.1
042f0a3 libcereal: Add native and nativesdk classes
e23284f libcereal: Allow empty package
030e8d4 rsyslog: curl-less build with fmhttp PACKAGECONFIG
179a1b9 gtest: update to 1.8.1
Squashed OpenBMC subtree compatibility updates:
meta-aspeed:
Brad Bishop (1):
aspeed: add yocto 2.6 compatibility
meta-ibm:
Brad Bishop (1):
ibm: prepare for yocto 2.6
meta-ingrasys:
Brad Bishop (1):
ingrasys: set layer compatibility to yocto 2.6
meta-openpower:
Brad Bishop (1):
openpower: set layer compatibility to yocto 2.6
meta-phosphor:
Brad Bishop (3):
phosphor: set layer compatibility to thud
phosphor: libgpg-error: drop patches
phosphor: react to fitimage artifact rename
Ed Tanous (4):
Dropbear: upgrade options for latest upgrade
yocto2.6: update openssl options
busybox: remove upstream watchdog patch
systemd: Rebase CONFIG_CGROUP_BPF patch
Change-Id: I7b1fe71cca880d0372a82d94b5fd785323e3a9e7
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons')
63 files changed, 1620 insertions, 1015 deletions
diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch new file mode 100644 index 000000000..f3f25f461 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/0001-Do-not-hardcode-path-for-pkg.m4.patch @@ -0,0 +1,28 @@ +From 6d24365f0828185fd1bb4d199209ca07eb95c41d Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 24 Aug 2018 06:24:36 +0000 +Subject: [PATCH] Do not hardcode path for pkg.m4 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.in b/configure.in +index 50aed15..f81767c 100644 +--- a/configure.in ++++ b/configure.in +@@ -12,7 +12,7 @@ define([AC_CACHE_SAVE], )dnl + AC_INIT(.autofs-5.1.4) + + # for pkg-config macros +-m4_include([/usr/share/aclocal/pkg.m4]) ++m4_include([pkg.m4]) + + # + # autofs installs by default in /usr +-- +1.9.1 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch deleted file mode 100644 index 18ce19385..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/autofs-5.1.2-libtirpc-as-need.patch +++ /dev/null @@ -1,39 +0,0 @@ -From b31decac4acb194b020c621d2d11019f636a45e0 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 24 Apr 2017 20:41:25 -0700 -Subject: [PATCH] autofs: Upgrade to 5.1.2 release - -Make configure compatible with -Wl,--as-needed following -https://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed#Failure_in_..2Fconfigure - -2016-07-05 Martin von Gagern - ---- - aclocal.m4 | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/aclocal.m4 b/aclocal.m4 -index 0e4a624..2e620cd 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -415,9 +415,9 @@ AC_DEFUN([AF_CHECK_LIBTIRPC], - [ - # save current flags - af_check_libtirpc_save_cflags="$CFLAGS" --af_check_libtirpc_save_ldflags="$LDFLAGS" -+af_check_libtirpc_save_libs="$LIBS" - CFLAGS="$CFLAGS -I=/usr/include/tirpc" --LDFLAGS="$LDFLAGS -ltirpc" -+LIBS="$LIBS -ltirpc" - - AC_TRY_LINK( - [ #include <rpc/rpc.h> ], -@@ -440,7 +440,7 @@ AC_CHECK_FUNCS([getrpcbyname getservbyname]) - - # restore flags - CFLAGS="$af_check_libtirpc_save_cflags" --LDFLAGS="$af_check_libtirpc_save_ldflags" -+LIBS="$af_check_libtirpc_save_libs" - ]) - - AC_DEFUN([AF_WITH_LIBTIRPC], diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch deleted file mode 100644 index 0a2d502b8..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs/libtirpc.patch +++ /dev/null @@ -1,35 +0,0 @@ -From cb6a4f61adb027f2366318f2c08c8264ebf39218 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 5 Jan 2013 19:53:10 -0800 - ---- - Makefile.rules | 2 +- - aclocal.m4 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/Makefile.rules b/Makefile.rules -index 6fa3e02..709dd04 100644 ---- a/Makefile.rules -+++ b/Makefile.rules -@@ -46,7 +46,7 @@ CFLAGS += -D_REENTRANT -D_FILE_OFFSET_BITS=64 - LIBS += -lpthread - - ifdef TIRPCLIB --CFLAGS += -I/usr/include/tirpc -+CFLAGS += -I=/usr/include/tirpc - LIBS += $(TIRPCLIB) - endif - -diff --git a/aclocal.m4 b/aclocal.m4 -index 2a9a802..0e4a624 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -416,7 +416,7 @@ AC_DEFUN([AF_CHECK_LIBTIRPC], - # save current flags - af_check_libtirpc_save_cflags="$CFLAGS" - af_check_libtirpc_save_ldflags="$LDFLAGS" --CFLAGS="$CFLAGS -I/usr/include/tirpc" -+CFLAGS="$CFLAGS -I=/usr/include/tirpc" - LDFLAGS="$LDFLAGS -ltirpc" - - AC_TRY_LINK( diff --git a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.4.bb index 68c64fdb0..8a1bcad28 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.2.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/autofs/autofs_5.1.4.bb @@ -13,7 +13,6 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ file://autofs-5.0.7-include-linux-nfs.h-directly-in-rpc_sub.patch \ file://no-bash.patch \ file://cross.patch \ - file://libtirpc.patch \ file://autofs-5.0.7-do-not-check-for-modprobe.patch \ file://fix_disable_ldap.patch \ file://autofs-5.0.7-fix-lib-deps.patch \ @@ -24,12 +23,14 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/autofs-${PV}.tar.gz \ file://fix-the-YACC-rule-to-fix-a-building-failure.patch \ file://0001-Define-__SWORD_TYPE-and-_PATH_NSSWITCH_CONF.patch \ file://0002-Replace-__S_IEXEC-with-S_IEXEC.patch \ - file://autofs-5.1.2-libtirpc-as-need.patch \ file://pkgconfig-libnsl.patch \ file://0001-modules-lookup_multi.c-Replace-__S_IEXEC-with-S_IEXE.patch \ + file://0001-Do-not-hardcode-path-for-pkg.m4.patch \ " -SRC_URI[md5sum] = "28cf88f99eff553a8500659ba5d45a76" -SRC_URI[sha256sum] = "0d57e4138c2ec8058ca92164d035546f68ce4af93acb893369993d67c7056a10" +SRC_URI[md5sum] = "17bc9d371cf39d99f400ebadfc2289bb" +SRC_URI[sha256sum] = "8d1c9964c8286ccb08262ad47c60bb6343492902def5399fd36d79a0ccb0e718" + +UPSTREAM_CHECK_URI = "${KERNELORG_MIRROR}/linux/daemons/autofs/v5/" INITSCRIPT_NAME = "autofs" INITSCRIPT_PARAMS = "defaults" @@ -46,16 +47,18 @@ EXTRA_OECONF += "--disable-mount-locking \ --enable-ignore-busy --with-openldap=no \ --with-sasl=no --with-libtirpc \ --with-path=${STAGING_BINDIR_NATIVE} \ + --with-fifodir=${localstatedir}/run \ + --with-flagdir=${localstatedir}/run \ " CACHED_CONFIGUREVARS = "ac_cv_path_RANLIB=${RANLIB} \ ac_cv_path_RPCGEN=rpcgen \ " do_configure_prepend () { - sed -e "s:filagdir:flagdir:" -i ${S}/configure.in if [ ! -e ${S}/acinclude.m4 ]; then cp ${S}/aclocal.m4 ${S}/acinclude.m4 fi + cp ${STAGING_DATADIR_NATIVE}/aclocal/pkg.m4 . } do_install_append () { diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch new file mode 100644 index 000000000..c89822c36 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch @@ -0,0 +1,41 @@ +From 6515f3e7656d97d40a6a1cf4eb3ada193a698309 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Wed, 12 Sep 2018 23:18:12 +0800 +Subject: [PATCH] Allow saslauthd to be built outside of source tree while + configuring with `--enable-ldapdb' + +[snip] +| powerpc-wrs-linux-gcc [snip] -I../common +|../../git/saslauthd/lak.c:58:10: fatal error: crypto-compat.h: +No such file or directory +[snip] + +The crypto-compat.h locates in git/common/, it should be | +`-I../../git/common' + +Remove useless `-I$(top_srcdir)/../include' which was incorrectly +added by commit `faae590 cleanup misc INCLUDES for different build paths' + +Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + saslauthd/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/saslauthd/Makefile.am b/saslauthd/Makefile.am +index d7244be..864b29b 100644 +--- a/saslauthd/Makefile.am ++++ b/saslauthd/Makefile.am +@@ -34,7 +34,7 @@ saslcache_SOURCES = saslcache.c + + EXTRA_DIST = saslauthd.8 saslauthd.mdoc include \ + getnameinfo.c getaddrinfo.c LDAP_SASLAUTHD +-AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_srcdir)/../include -I$(top_builddir)/common ++AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir)/common -I$(top_srcdir)/common + DEFS = @DEFS@ -DSASLAUTHD_CONF_FILE_DEFAULT=\"@sysconfdir@/saslauthd.conf\" -I. -I$(srcdir) -I.. + + +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch new file mode 100644 index 000000000..bf232ac27 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0001-makeinit.sh-fix-parallel-build-issue.patch @@ -0,0 +1,95 @@ +From bb693db0e1d1d693e8ca31fcbc4f46d1674eeca1 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Thu, 13 Sep 2018 14:20:57 +0800 +Subject: [PATCH] makeinit.sh: fix parallel build issue + +While building plugins, each <plugin>.c requires a <plugin>_init.c, +and the <plugin>_init.c is dynamically generated by makeinit.sh. + +But the makeinit.sh generates all *_init.c (13 mechanism plugins, +3 auxprop plugins) at one time, if there are multiple plugins, +there will be multiple makeinit.sh invoking. + +It caused a parallel issue, the *_init.c files will be generated +repeatedly. + +It occasionally generate dapdb_init.c incorrectly +[snip plugins/ldapdb_init.c] +SASL_CANONUSER_PLUG_INIT( ldapdb ) +SASL_CANONUSER_PLUG_INIT( ldapdb ) +SASL_CANONUSER_PLUG_INIT( ldapdb ) +[snip plugins/ldapdb_init.c] + +Let makeinit.sh generate the expected <plugin>_init.c which +is exactly required by <plugin>.c. + +Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl/pull/532] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + plugins/Makefile.am | 2 +- + plugins/makeinit.sh | 19 ++++++++++++++----- + 2 files changed, 15 insertions(+), 6 deletions(-) + +diff --git a/plugins/Makefile.am b/plugins/Makefile.am +index 929f6a4..81e7f0b 100644 +--- a/plugins/Makefile.am ++++ b/plugins/Makefile.am +@@ -149,4 +149,4 @@ passdss_init.c sasldb_init.c sql_init.c ldapdb_init.c + CLEANFILES=$(init_src) + + ${init_src}: $(srcdir)/makeinit.sh +- $(SHELL) $(srcdir)/makeinit.sh ++ $(SHELL) $(srcdir)/makeinit.sh $@ +diff --git a/plugins/makeinit.sh b/plugins/makeinit.sh +index cc65f7d..3131877 100644 +--- a/plugins/makeinit.sh ++++ b/plugins/makeinit.sh +@@ -1,7 +1,9 @@ ++plugin_init="$1" + # mechanism plugins + for mech in anonymous crammd5 digestmd5 scram gssapiv2 kerberos4 login ntlm otp passdss plain srp gs2; do ++ if [ ${plugin_init} = "${mech}_init.c" ];then + +-echo " ++ echo " + #include <config.h> + + #include <string.h> +@@ -43,13 +45,16 @@ BOOL APIENTRY DllMain( HANDLE hModule, + + SASL_CLIENT_PLUG_INIT( $mech ) + SASL_SERVER_PLUG_INIT( $mech ) +-" > ${mech}_init.c ++" > ${mech}_init.c ++ echo "generating $1" ++ fi # End of `if [ ${plugin_init} = "${mech}_init.c" ];then' + done + + # auxprop plugins + for auxprop in sasldb sql ldapdb; do ++ if [ ${plugin_init} = "${auxprop}_init.c" ];then + +-echo " ++ echo " + #include <config.h> + + #include <string.h> +@@ -86,8 +91,12 @@ BOOL APIENTRY DllMain( HANDLE hModule, + #endif + + SASL_AUXPROP_PLUG_INIT( $auxprop ) +-" > ${auxprop}_init.c ++" > ${auxprop}_init.c ++ echo "generating $1" ++ fi # End of `if [ ${plugin_init} = "${auxprop}_init.c" ];then' + done + + # ldapdb is also a canon_user plugin +-echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c ++if [ ${plugin_init} = "ldapdb_init.c" ];then ++ echo "SASL_CANONUSER_PLUG_INIT( ldapdb )" >> ldapdb_init.c ++fi +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch new file mode 100644 index 000000000..68d09c385 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch @@ -0,0 +1,28 @@ +From 98082f81da1b49876081ff1ab340e952755f985a Mon Sep 17 00:00:00 2001 +From: OBATA Akio <obache@users.noreply.github.com> +Date: Fri, 11 May 2018 18:36:26 +0900 +Subject: [PATCH] configure.ac: fix condition for suppliment snprintf + implementation + +$sasl_cv_snprintf means requremnt of suppliment snprintf +implementation, not existence of system snprintf implementation, + +Upstream-Status: Submitted [https://github.com/cyrusimap/cyrus-sasl/pull/512] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index ac59f14..9804e98 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1264,7 +1264,7 @@ SNPRINTFOBJS="" + LTSNPRINTFOBJS="" + AC_CHECK_FUNC(snprintf, [AC_DEFINE(HAVE_SNPRINTF,[],[Does the system have snprintf()?])], [sasl_cv_snprintf=yes]) + AC_CHECK_FUNC(vsnprintf, [AC_DEFINE(HAVE_VSNPRINTF,[],[Does the system have vsnprintf()?])], [sasl_cv_snprintf=yes]) +-if test $sasl_cv_snprintf = no; then ++if test $sasl_cv_snprintf = yes; then + AC_LIBOBJ(snprintf) + SNPRINTFOBJS="snprintf.o" + LTSNPRINTFOBJS="snprintf.lo" diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch index 3fa8431c3..f172362f4 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/Fix-hardcoded-libdir.patch @@ -1,25 +1,26 @@ -Fix hardcoded libdir. +From 188ad4497947259811ad32faeee95c20f9a44046 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Fri, 19 Jul 2013 14:29:31 +0800 +Subject: [PATCH] Fix hardcoded libdir. -Upstream-Status: Pending +Upstream-Status: Pending Signed-off-by: Roy.Li <rongqing.li@windriver.com> + --- - plugins/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + plugins/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Makefile.am b/plugins/Makefile.am -index b00915f..25262a1 100644 +index 2b02a52..929f6a4 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am -@@ -62,7 +62,7 @@ plugindir = @plugindir@ +@@ -65,7 +65,7 @@ LIB_MYSQL = @LIB_MYSQL@ - common_sources = plugin_common.c plugin_common.h + plugindir = @plugindir@ -sasldir = $(prefix)/lib/sasl2 +sasldir = $(libdir)/sasl2 sasl_LTLIBRARIES = @SASL_MECHS@ EXTRA_LTLIBRARIES = libplain.la libanonymous.la libkerberos4.la libcrammd5.la \ libgs2.la libgssapiv2.la libdigestmd5.la liblogin.la libsrp.la libotp.la \ --- -1.7.4.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch index 6407721ae..aa271b8fb 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/avoid-to-call-AC_TRY_RUN.patch @@ -1,4 +1,7 @@ -Avoid to call AC_TRY_RUN +From 288430d3c2d3f36a4c9d40c4fffa85288f44549a Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Tue, 25 Jun 2013 09:22:59 +0800 +Subject: [PATCH] Avoid to call AC_TRY_RUN Upstream-Status: Inappropriate [configuration] @@ -6,18 +9,20 @@ Avoid to call AC_TRY_RUN to check if GSSAPI libraries support SPNEGO on cross-compile environment by definition AC_ARG_ENABLE enable-spnego Signed-off-by: Roy.Li <rongqing.li@windriver.com> + --- - cmulocal/sasl2.m4 | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) + m4/sasl2.m4 | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) -diff --git a/cmulocal/sasl2.m4 b/cmulocal/sasl2.m4 -index 3c2841a..a5ecf81 100644 ---- a/cmulocal/sasl2.m4 -+++ b/cmulocal/sasl2.m4 -@@ -281,6 +281,17 @@ if test "$gssapi" != no; then - +diff --git a/m4/sasl2.m4 b/m4/sasl2.m4 +index 56e0504..cf62607 100644 +--- a/m4/sasl2.m4 ++++ b/m4/sasl2.m4 +@@ -314,7 +314,18 @@ if test "$gssapi" != no; then cmu_save_LIBS="$LIBS" LIBS="$LIBS $GSSAPIBASE_LIBS" + +- AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) + AC_ARG_ENABLE([spnego], + [AC_HELP_STRING([--enable-spnego=<DIR>], + [enable SPNEGO support in GSSAPI libraries [no]])], @@ -29,10 +34,11 @@ index 3c2841a..a5ecf81 100644 + elif test "$spnego" = yes; then + AC_DEFINE(HAVE_GSS_SPNEGO,,[Define if your GSSAPI implementation supports SPNEGO]) + else - AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) ++ AC_MSG_CHECKING([for SPNEGO support in GSSAPI libraries]) AC_TRY_RUN([ #ifdef HAVE_GSSAPI_H -@@ -308,7 +319,7 @@ int main(void) + #include <gssapi.h> +@@ -341,7 +352,7 @@ int main(void) AC_MSG_RESULT(yes) ], AC_MSG_RESULT(no)) LIBS="$cmu_save_LIBS" @@ -41,6 +47,3 @@ index 3c2841a..a5ecf81 100644 else AC_MSG_RESULT([disabled]) fi --- -1.7.10.4 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff deleted file mode 100644 index 8eff5a8bd..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0009_sasldb_al.diff +++ /dev/null @@ -1,14 +0,0 @@ -Author: Fabian Fagerholm <fabbe@debian.org> -Description: Fix linking with libsasldb.a when saslauthd is built with sasldb -support. ---- a/saslauthd/configure.in -+++ b/saslauthd/configure.in -@@ -77,7 +77,7 @@ if test "$authsasldb" != no; then - AC_DEFINE(AUTH_SASLDB,[],[Include SASLdb Support]) - SASL_DB_PATH_CHECK() - SASL_DB_CHECK() -- SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.al" -+ SASL_DB_LIB="$SASL_DB_LIB ../sasldb/.libs/libsasldb.a" - fi - - AC_ARG_ENABLE(httpform, [ --enable-httpform enable HTTP form authentication [[no]] ], diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff index 2e5b1750d..0479acfb0 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/debian_patches_0014_avoid_pic_overwrite.diff @@ -1,27 +1,28 @@ -Author: Fabian Fagerholm <fabbe@debian.org> +From 1a5f3004e9081eab6263a29cd5be792f06441e36 Mon Sep 17 00:00:00 2001 +From: Fabian Fagerholm <fabbe@debian.org> +Date: Wed, 24 Jul 2013 11:38:25 -0400 +Subject: [PATCH] cyrus-sasl: Add patches from Debian to fix linking + Description: This patch makes sure the non-PIC version of libsasldb.a, which is created out of non-PIC objects, is not going to overwrite the PIC version, which is created out of PIC objects. The PIC version is placed in .libs, and the non-PIC version in the current directory. This ensures that both non-PIC and PIC versions are available in the correct locations. + +--- + lib/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index a158ca3..3137e19 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am -@@ -78,7 +78,7 @@ endif +@@ -99,7 +99,7 @@ endif libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) @echo adding static plugins and dependencies - $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) + $(AR) cru $@ $(SASL_STATIC_OBJS) - @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ + @for i in ./libsasl2.la ../common/libplugin_common.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ if test ! -f $$i; then continue; fi; . $$i; \ for j in $$dependency_libs foo; do \ ---- a/sasldb/Makefile.am -+++ b/sasldb/Makefile.am -@@ -63,6 +63,6 @@ libsasldb_a_SOURCES = - EXTRA_libsasldb_a_SOURCES = - - libsasldb.a: libsasldb.la $(SASL_DB_BACKEND_STATIC) -- $(AR) cru .libs/$@ $(SASL_DB_BACKEND_STATIC) -+ $(AR) cru $@ $(SASL_DB_BACKEND_STATIC) - - diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch deleted file mode 100644 index ecbab845d..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl/sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 92d72789c811b0d55f624a8bac5ccc4412f5996e Mon Sep 17 00:00:00 2001 -From: Ken Murchison <murch@andrew.cmu.edu> -Date: Thu, 20 Dec 2012 18:14:50 -0500 -Subject: [PATCH] sasl.h: #include <stddef.h> for size_t on NetBSD - -This patch was imported from git://git.cyrusimap.org/cyrus-sasl -commit 67a188693796a14e3a76ac603104807fbbfddfc4 - -Upstream-Status: Backport - -Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> ---- - include/sasl.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/include/sasl.h b/include/sasl.h -index fef4d51..8b8a63f 100755 ---- a/include/sasl.h -+++ b/include/sasl.h -@@ -121,6 +121,8 @@ - #ifndef SASL_H - #define SASL_H 1 - -+#include <stddef.h> /* For size_t */ -+ - /* Keep in sync with win32/common.mak */ - #define SASL_VERSION_MAJOR 2 - #define SASL_VERSION_MINOR 1 --- -1.8.3.2 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb index 6dbff87dd..594e55da1 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.26.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/cyrus-sasl/cyrus-sasl_2.1.27.bb @@ -1,55 +1,56 @@ SUMMARY = "Generic client/server library for SASL authentication" SECTION = "libs" HOMEPAGE = "http://asg.web.cmu.edu/sasl/" -DEPENDS = "openssl db" +DEPENDS = "openssl db groff-native" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=3f55e0974e3d6db00ca6f57f2d206396" -SRC_URI = "ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-${PV}.tar.gz \ - file://avoid-to-call-AC_TRY_RUN.patch \ - file://Fix-hardcoded-libdir.patch \ - file://debian_patches_0009_sasldb_al.diff \ - file://debian_patches_0014_avoid_pic_overwrite.diff \ - file://sasl.h-include-stddef.h-for-size_t-on-NetBSD.patch \ - file://saslauthd.service \ - file://saslauthd.conf \ -" +SRCREV = "e41cfb986c1b1935770de554872247453fdbb079" + +SRC_URI = "git://github.com/cyrusimap/cyrus-sasl;protocol=https \ + file://avoid-to-call-AC_TRY_RUN.patch \ + file://Fix-hardcoded-libdir.patch \ + file://debian_patches_0014_avoid_pic_overwrite.diff \ + file://saslauthd.service \ + file://saslauthd.conf \ + file://0004-configure.ac-fix-condition-for-suppliment-snprintf-i.patch \ + file://0001-Allow-saslauthd-to-be-built-outside-of-source-tree-w.patch \ + file://0001-makeinit.sh-fix-parallel-build-issue.patch \ + " + +UPSTREAM_CHECK_URI = "https://github.com/cyrusimap/cyrus-sasl/archives" -inherit autotools-brokensep pkgconfig useradd systemd +S = "${WORKDIR}/git" + +inherit autotools pkgconfig useradd systemd EXTRA_OECONF += "--with-dblib=berkeley \ - --with-bdb-libdir=${STAGING_LIBDIR} \ - --with-bdb-incdir=${STAGING_INCDIR} \ - --with-bdb=db-5.3 \ - --with-plugindir="${libdir}/sasl2" \ + --with-plugindir='${libdir}/sasl2' \ andrew_cv_runpath_switch=none" PACKAGECONFIG ??= "ntlm \ - ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 ldap pam', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'ldap pam', d)} \ " PACKAGECONFIG[gssapi] = "--enable-gssapi=yes,--enable-gssapi=no,krb5," PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam," PACKAGECONFIG[opie] = "--with-opie,--without-opie,opie," PACKAGECONFIG[des] = "--with-des,--without-des,," PACKAGECONFIG[ldap] = "--with-ldap=${STAGING_LIBDIR} --enable-ldapdb,--without-ldap --disable-ldapdb,openldap," -PACKAGECONFIG[ntlm] = "--with-ntlm,--without-ntlm,," -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[ntlm] = "--enable-ntlm=yes,--enable-ntlm=no,," CFLAGS += "-fPIC" do_configure_prepend () { - rm -f acinclude.m4 config/libtool.m4 - # make it be able to work with db 5.0 version local sed_files="sasldb/db_berkeley.c utils/dbconverter-2.c" for sed_file in $sed_files; do - sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' $sed_file + sed -i 's#DB_VERSION_MAJOR == 4.*#(&) || DB_VERSION_MAJOR == 5#' ${S}/$sed_file done } do_compile_prepend () { cd include - ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} makemd5.c -o makemd5 + ${BUILD_CC} ${BUILD_CFLAGS} ${BUILD_LDFLAGS} ${S}/include/makemd5.c -o makemd5 touch makemd5.o makemd5.lo makemd5 cd .. } diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch index 3cd5259fa..952e4f0d0 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool/0003-musl-fixes.patch @@ -12,10 +12,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 4 files changed, 208 insertions(+), 6 deletions(-) create mode 100644 net/ppp_defs.h -diff --git a/cli/cli_readline.c b/cli/cli_readline.c -index 2812e6e..542935c 100644 ---- a/cli/cli_readline.c -+++ b/cli/cli_readline.c +Index: ippool-1.3/cli/cli_readline.c +=================================================================== +--- ippool-1.3.orig/cli/cli_readline.c ++++ ippool-1.3/cli/cli_readline.c @@ -17,13 +17,14 @@ * Boston, MA 02110-1301 USA * @@ -33,7 +33,7 @@ index 2812e6e..542935c 100644 #include <signal.h> #include <readline/readline.h> -@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_handlers(void) +@@ -630,7 +631,7 @@ static void cli_rl_uninstall_signal_hand static int cli_rl_install_signal_handlers(void) { @@ -42,11 +42,11 @@ index 2812e6e..542935c 100644 rl_catch_signals = 0; rl_clear_signals(); -diff --git a/ippool_api.c b/ippool_api.c -index 2c10c47..d1127a9 100644 ---- a/ippool_api.c -+++ b/ippool_api.c -@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT *xprt) +Index: ippool-1.3/ippool_api.c +=================================================================== +--- ippool-1.3.orig/ippool_api.c ++++ ippool-1.3/ippool_api.c +@@ -181,10 +181,13 @@ int ippool_api_rpc_check_request(SVCXPRT * non-loopback interface, reject the request. */ if ((!ippool_opt_remote_rpc) && @@ -63,210 +63,10 @@ index 2c10c47..d1127a9 100644 } svcerr_auth(xprt, AUTH_TOOWEAK); return -EPERM; -diff --git a/net/ppp_defs.h b/net/ppp_defs.h -new file mode 100644 -index 0000000..b06eda5 ---- /dev/null -+++ b/net/ppp_defs.h -@@ -0,0 +1,194 @@ -+/* $Id: ppp_defs.h,v 1.17 2002/12/06 09:49:15 paulus Exp $ */ -+ -+/* -+ * ppp_defs.h - PPP definitions. -+ * -+ * Copyright (c) 1984 Paul Mackerras. All rights reserved. -+ * -+ * Redistribution and use in source and binary forms, with or without -+ * modification, are permitted provided that the following conditions -+ * are met: -+ * -+ * 1. Redistributions of source code must retain the above copyright -+ * notice, this list of conditions and the following disclaimer. -+ * -+ * 2. Redistributions in binary form must reproduce the above copyright -+ * notice, this list of conditions and the following disclaimer in -+ * the documentation and/or other materials provided with the -+ * distribution. -+ * -+ * 3. The name(s) of the authors of this software must not be used to -+ * endorse or promote products derived from this software without -+ * prior written permission. -+ * -+ * 4. Redistributions of any form whatsoever must retain the following -+ * acknowledgment: -+ * "This product includes software developed by Paul Mackerras -+ * <paulus@samba.org>". -+ * -+ * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO -+ * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -+ * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY -+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN -+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#ifndef _PPP_DEFS_H_ -+#define _PPP_DEFS_H_ -+ -+/* -+ * The basic PPP frame. -+ */ -+#define PPP_HDRLEN 4 /* octets for standard ppp header */ -+#define PPP_FCSLEN 2 /* octets for FCS */ -+ -+/* -+ * Packet sizes -+ * -+ * Note - lcp shouldn't be allowed to negotiate stuff outside these -+ * limits. See lcp.h in the pppd directory. -+ * (XXX - these constants should simply be shared by lcp.c instead -+ * of living in lcp.h) -+ */ -+#define PPP_MTU 1500 /* Default MTU (size of Info field) */ -+#define PPP_MAXMTU 65535 - (PPP_HDRLEN + PPP_FCSLEN) -+#define PPP_MINMTU 64 -+#define PPP_MRU 1500 /* default MRU = max length of info field */ -+#define PPP_MAXMRU 65000 /* Largest MRU we allow */ -+#define PPP_MINMRU 128 -+ -+#define PPP_ADDRESS(p) (((u_char *)(p))[0]) -+#define PPP_CONTROL(p) (((u_char *)(p))[1]) -+#define PPP_PROTOCOL(p) ((((u_char *)(p))[2] << 8) + ((u_char *)(p))[3]) -+ -+/* -+ * Significant octet values. -+ */ -+#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */ -+#define PPP_UI 0x03 /* Unnumbered Information */ -+#define PPP_FLAG 0x7e /* Flag Sequence */ -+#define PPP_ESCAPE 0x7d /* Asynchronous Control Escape */ -+#define PPP_TRANS 0x20 /* Asynchronous transparency modifier */ -+ -+/* -+ * Protocol field values. -+ */ -+#define PPP_IP 0x21 /* Internet Protocol */ -+#define PPP_AT 0x29 /* AppleTalk Protocol */ -+#define PPP_IPX 0x2b /* IPX protocol */ -+#define PPP_VJC_COMP 0x2d /* VJ compressed TCP */ -+#define PPP_VJC_UNCOMP 0x2f /* VJ uncompressed TCP */ -+#define PPP_IPV6 0x57 /* Internet Protocol Version 6 */ -+#define PPP_COMP 0xfd /* compressed packet */ -+#define PPP_IPCP 0x8021 /* IP Control Protocol */ -+#define PPP_ATCP 0x8029 /* AppleTalk Control Protocol */ -+#define PPP_IPXCP 0x802b /* IPX Control Protocol */ -+#define PPP_IPV6CP 0x8057 /* IPv6 Control Protocol */ -+#define PPP_CCP 0x80fd /* Compression Control Protocol */ -+#define PPP_ECP 0x8053 /* Encryption Control Protocol */ -+#define PPP_LCP 0xc021 /* Link Control Protocol */ -+#define PPP_PAP 0xc023 /* Password Authentication Protocol */ -+#define PPP_LQR 0xc025 /* Link Quality Report protocol */ -+#define PPP_CHAP 0xc223 /* Cryptographic Handshake Auth. Protocol */ -+#define PPP_CBCP 0xc029 /* Callback Control Protocol */ -+#define PPP_EAP 0xc227 /* Extensible Authentication Protocol */ -+ -+/* -+ * Values for FCS calculations. -+ */ -+#define PPP_INITFCS 0xffff /* Initial FCS value */ -+#define PPP_GOODFCS 0xf0b8 /* Good final FCS value */ -+#define PPP_FCS(fcs, c) (((fcs) >> 8) ^ fcstab[((fcs) ^ (c)) & 0xff]) -+ -+/* -+ * A 32-bit unsigned integral type. -+ */ -+ -+#if !defined(__BIT_TYPES_DEFINED__) && !defined(_BITYPES) \ -+ && !defined(__FreeBSD__) && (NS_TARGET < 40) -+#ifdef UINT32_T -+typedef UINT32_T u_int32_t; -+#else -+typedef unsigned int u_int32_t; -+typedef unsigned short u_int16_t; -+#endif -+#endif -+ -+/* -+ * Extended asyncmap - allows any character to be escaped. -+ */ -+typedef u_int32_t ext_accm[8]; -+ -+/* -+ * What to do with network protocol (NP) packets. -+ */ -+enum NPmode { -+ NPMODE_PASS, /* pass the packet through */ -+ NPMODE_DROP, /* silently drop the packet */ -+ NPMODE_ERROR, /* return an error */ -+ NPMODE_QUEUE /* save it up for later. */ -+}; -+ -+/* -+ * Statistics. -+ */ -+struct pppstat { -+ unsigned int ppp_ibytes; /* bytes received */ -+ unsigned int ppp_ipackets; /* packets received */ -+ unsigned int ppp_ierrors; /* receive errors */ -+ unsigned int ppp_obytes; /* bytes sent */ -+ unsigned int ppp_opackets; /* packets sent */ -+ unsigned int ppp_oerrors; /* transmit errors */ -+}; -+ -+struct vjstat { -+ unsigned int vjs_packets; /* outbound packets */ -+ unsigned int vjs_compressed; /* outbound compressed packets */ -+ unsigned int vjs_searches; /* searches for connection state */ -+ unsigned int vjs_misses; /* times couldn't find conn. state */ -+ unsigned int vjs_uncompressedin; /* inbound uncompressed packets */ -+ unsigned int vjs_compressedin; /* inbound compressed packets */ -+ unsigned int vjs_errorin; /* inbound unknown type packets */ -+ unsigned int vjs_tossed; /* inbound packets tossed because of error */ -+}; -+ -+struct ppp_stats { -+ struct pppstat p; /* basic PPP statistics */ -+ struct vjstat vj; /* VJ header compression statistics */ -+}; -+ -+struct compstat { -+ unsigned int unc_bytes; /* total uncompressed bytes */ -+ unsigned int unc_packets; /* total uncompressed packets */ -+ unsigned int comp_bytes; /* compressed bytes */ -+ unsigned int comp_packets; /* compressed packets */ -+ unsigned int inc_bytes; /* incompressible bytes */ -+ unsigned int inc_packets; /* incompressible packets */ -+ unsigned int ratio; /* recent compression ratio << 8 */ -+}; -+ -+struct ppp_comp_stats { -+ struct compstat c; /* packet compression statistics */ -+ struct compstat d; /* packet decompression statistics */ -+}; -+ -+/* -+ * The following structure records the time in seconds since -+ * the last NP packet was sent or received. -+ */ -+struct ppp_idle { -+ time_t xmit_idle; /* time since last NP packet sent */ -+ time_t recv_idle; /* time since last NP packet received */ -+}; -+ -+#ifndef __P -+#ifdef __STDC__ -+#define __P(x) x -+#else -+#define __P(x) () -+#endif -+#endif -+ -+#endif /* _PPP_DEFS_H_ */ -diff --git a/usl/usl.h b/usl/usl.h -index cdc16db..88d2714 100644 ---- a/usl/usl.h -+++ b/usl/usl.h +Index: ippool-1.3/usl/usl.h +=================================================================== +--- ippool-1.3.orig/usl/usl.h ++++ ippool-1.3/usl/usl.h @@ -38,6 +38,10 @@ #include "usl_fsm.h" #include "usl_list.h" @@ -278,6 +78,3 @@ index cdc16db..88d2714 100644 #define USL_VERSION "0.6" #ifdef DEBUG --- -2.13.3 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb index 6e4748357..6fa46904b 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/ippool/ippool_1.3.bb @@ -24,8 +24,6 @@ SRC_URI = "https://sourceforge.net/projects/openl2tp/files/${BPN}/${PV}/${BPN}-$ file://0001-read-returns-ssize_t.patch \ file://0002-Mark-first-element-of-a-string-as-null.patch \ file://0003-cli-Mark-return-of-strtol-as-long-int.patch \ - " -SRC_URI_append_libc-musl = "\ file://0002-link-with-libtirpc.patch \ file://0003-musl-fixes.patch \ " @@ -36,8 +34,7 @@ SRC_URI[sha256sum] = "d3eab7d6cad5da8ccc9d1e31d5303e27a39622c07bdb8fa3618eea3144 inherit systemd -DEPENDS = "readline ppp ncurses gzip-native" -DEPENDS_append_libc-musl = " libtirpc" +DEPENDS = "readline ppp ncurses gzip-native rpcsvc-proto-native libtirpc" RDEPENDS_${PN} = "rpcbind" EXTRA_OEMAKE = "CC='${CC}' AS='${AS}' LD='${LD}' AR='${AR}' NM='${NM}' STRIP='${STRIP}'" @@ -45,8 +42,7 @@ EXTRA_OEMAKE += "PPPD_VERSION=${PPPD_VERSION} SYS_LIBDIR=${libdir}" # enable self tests EXTRA_OEMAKE += "IPPOOL_TEST=y" -CPPFLAGS += "${SELECTED_OPTIMIZATION}" -CPPFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" +CPPFLAGS += "${SELECTED_OPTIMIZATION} -I${STAGING_INCDIR}/tirpc" SYSTEMD_SERVICE_${PN} = "ippool.service" SYSTEMD_AUTO_ENABLE = "disable" diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch deleted file mode 100644 index f5e1bec8a..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch +++ /dev/null @@ -1,25 +0,0 @@ -From cfee58d5863a535b61aa54690ae205b876f57944 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Feb 2018 22:53:29 -0800 -Subject: [PATCH 1/2] libopeniscsiusr: Include limit.h for PATH_MAX - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libopeniscsiusr/iface.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libopeniscsiusr/iface.c b/libopeniscsiusr/iface.c -index 79898df..a48ef36 100644 ---- a/libopeniscsiusr/iface.c -+++ b/libopeniscsiusr/iface.c -@@ -30,6 +30,7 @@ - #include <netdb.h> - #include <assert.h> - #include <inttypes.h> -+#include <limits.h> - - #include "libopeniscsiusr/libopeniscsiusr.h" - #include "misc.h" --- -2.16.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch deleted file mode 100644 index 174aa50d2..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0001-qedi.c-Removed-unused-linux-ethtool.h.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 197713ad7e3e944102bbd792e1ab9ec4a67100c0 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Feb 2018 23:25:21 -0800 -Subject: [PATCH 1/4] qedi.c: Removed unused linux/ethtool.h - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - iscsiuio/src/unix/libs/qedi.c | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/iscsiuio/src/unix/libs/qedi.c b/iscsiuio/src/unix/libs/qedi.c -index b81fecd..24cb89a 100644 ---- a/iscsiuio/src/unix/libs/qedi.c -+++ b/iscsiuio/src/unix/libs/qedi.c -@@ -49,7 +49,6 @@ - #include <arpa/inet.h> - #include <linux/types.h> - #include <linux/sockios.h> --#include <linux/ethtool.h> - #include <linux/netlink.h> - #include <sys/mman.h> - #include <sys/ioctl.h> --- -2.16.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch deleted file mode 100644 index aecede6ee..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 2b39f85dcf020647544002cb0b0e734748391dfb Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Feb 2018 23:27:25 -0800 -Subject: [PATCH 2/4] idbm.c: Include fcnl.h for O_RDWR and O_CREAT definitions - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - usr/idbm.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/usr/idbm.c b/usr/idbm.c -index 5532202..0a51b85 100644 ---- a/usr/idbm.c -+++ b/usr/idbm.c -@@ -27,6 +27,7 @@ - #include <errno.h> - #include <dirent.h> - #include <limits.h> -+#include <fcntl.h> - #include <sys/stat.h> - #include <sys/file.h> - --- -2.16.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch deleted file mode 100644 index 836ed6048..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 29571f71692e28ce9a17d1450097a98492f3b465 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Feb 2018 22:54:04 -0800 -Subject: [PATCH 2/2] libopeniscsiusr: Add CFLAGS to linker cmdline - -This will ensure that -fPIC is passed to linker as -well - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libopeniscsiusr/Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libopeniscsiusr/Makefile b/libopeniscsiusr/Makefile -index 8b9b523..4f1d0d6 100644 ---- a/libopeniscsiusr/Makefile -+++ b/libopeniscsiusr/Makefile -@@ -49,7 +49,7 @@ LIBADD = - all: $(LIBS) $(LIBS_MAJOR) $(TESTS) doc - - $(LIBS): $(OBJS) -- $(CC) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD) -+ $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname=$@ -o $@ $(OBJS) $(LIBADD) - ln -sf $@ $(DEVLIB) - - $(LIBS_MAJOR): $(LIBS) --- -2.16.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch deleted file mode 100644 index 0ce155f7a..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9b7a32903b56ce4d41f264a345ca59a0b00d53b3 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Feb 2018 23:28:33 -0800 -Subject: [PATCH 3/4] bnx2x.c: Reorder the includes to avoid duplicate defines - with musl - -including nic.h before linux/ethtool.h avoids redefinitions of -eth structs - -/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/ -usr/include/netinet/if_ether.h:104:8: error: redefinition of 'struct ethhdr' - struct ethhdr { - ^~~~~~ -In file included from /mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0. -876-r0/recipe-sysroot/usr/include/linux/ethtool.h:19:0, - from qedi.c:52: -/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-musleabi/iscsi-initiator-utils/2.0.876-r0/recipe-sysroot/ -usr/include/linux/if_ether.h:154:8: note: originally defined here - struct ethhdr { - ^~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - iscsiuio/src/unix/libs/bnx2x.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/iscsiuio/src/unix/libs/bnx2x.c b/iscsiuio/src/unix/libs/bnx2x.c -index 3df6d5f..62530d1 100644 ---- a/iscsiuio/src/unix/libs/bnx2x.c -+++ b/iscsiuio/src/unix/libs/bnx2x.c -@@ -36,6 +36,7 @@ - * bnx2x.c - bnx2x user space driver - * - */ -+#include "nic.h" - #include <errno.h> - #include <stdio.h> - #include <string.h> -@@ -58,7 +59,6 @@ - #include "bnx2x.h" - #include "cnic.h" - #include "logger.h" --#include "nic.h" - #include "nic_id.h" - #include "nic_utils.h" - #include "options.h" --- -2.16.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch deleted file mode 100644 index 57bdc8cb6..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/files/0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6f9c1a04d250388d1574cfaf20a1ff66a64beb48 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Feb 2018 23:42:12 -0800 -Subject: [PATCH 4/4] fwparam_ppc.c: Do not use __compar_fn_t - -__compar_fn_t is not defined in musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - utils/fwparam_ibft/fwparam_ppc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/utils/fwparam_ibft/fwparam_ppc.c b/utils/fwparam_ibft/fwparam_ppc.c -index c298b8c..391faa2 100644 ---- a/utils/fwparam_ibft/fwparam_ppc.c -+++ b/utils/fwparam_ibft/fwparam_ppc.c -@@ -356,7 +356,7 @@ static int loop_devs(const char *devtree) - * Sort the nics into "natural" order. The proc fs - * device-tree has them in somewhat random, or reversed order. - */ -- qsort(niclist, nic_count, sizeof(char *), (__compar_fn_t)nic_cmp); -+ qsort(niclist, nic_count, sizeof(char *), nic_cmp); - - snprintf(prefix, sizeof(prefix), "%s/%s", devtree, "aliases"); - dev_count = 0; --- -2.16.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb index 823227c46..e6a87a38a 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.876.bb @@ -11,25 +11,21 @@ DEPENDS = "openssl flex-native bison-native open-isns util-linux" LIC_FILES_CHKSUM = "file://COPYING;md5=393a5ca445f6965873eca0259a17f833" -SRCREV ?= "24580adc4c174bbc5dde3ae7594a46d57635e906" +SRCREV ?= "bd79e4ed1004a6035d2538a308c5930890421a22" SRC_URI = "git://github.com/open-iscsi/open-iscsi \ - file://initd.debian \ - file://99_iscsi-initiator-utils \ - file://iscsi-initiator \ - file://iscsi-initiator.service \ - file://iscsi-initiator-targets.service \ - file://set_initiatorname \ - file://0001-libopeniscsiusr-Include-limit.h-for-PATH_MAX.patch \ - file://0002-libopeniscsiusr-Add-CFLAGS-to-linker-cmdline.patch \ - file://0001-qedi.c-Removed-unused-linux-ethtool.h.patch \ - file://0002-idbm.c-Include-fcnl.h-for-O_RDWR-and-O_CREAT-definit.patch \ - file://0003-bnx2x.c-Reorder-the-includes-to-avoid-duplicate-defi.patch \ - file://0004-fwparam_ppc.c-Do-not-use-__compar_fn_t.patch \ -" + file://initd.debian \ + file://99_iscsi-initiator-utils \ + file://iscsi-initiator \ + file://iscsi-initiator.service \ + file://iscsi-initiator-targets.service \ + file://set_initiatorname \ + " S = "${WORKDIR}/git" B = "${WORKDIR}/build" +PV .= "+git${SRCPV}" + inherit update-rc.d systemd autotools EXTRA_OECONF = " \ diff --git a/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb b/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb index 36417b72a..31c50ff6b 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/keepalived/keepalived_1.4.2.bb @@ -16,7 +16,7 @@ SRC_URI[sha256sum] = "4e2d7cc01a6ee29a3955f5c622d47704ba7d9dd758189f15e9def016a2 DEPENDS = "libnfnetlink openssl" -inherit autotools pkgconfig systemd update-rc.d +inherit autotools pkgconfig systemd PACKAGECONFIG ??= "libnl snmp \ ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ @@ -41,8 +41,5 @@ do_install_append() { FILES_${PN} += "${datadir}/snmp/mibs/KEEPALIVED-MIB.txt" -INITSCRIPT_NAME = "keepalived" -INITSCRIPT_PARAMS = "remove" - SYSTEMD_SERVICE_${PN} = "keepalived.service" SYSTEMD_AUTO_ENABLE ?= "disable" diff --git a/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher.bb b/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher.bb new file mode 100644 index 000000000..050a93824 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/networkd-dispatcher/networkd-dispatcher.bb @@ -0,0 +1,34 @@ +python __anonymous() { + features = d.getVar('DISTRO_FEATURES') + if not features or 'systemd' not in features: + raise bb.parse.SkipPackage('networkd-dispatcher needs systemd in DISTRO_FEATURES') +} + +SUMMARY = "Dispatcher service for systemd-networkd connection status changes" +DESCRIPTION = "This daemon is similar to NetworkManager-dispatcher, but is much \ +more limited in the types of events it supports due to the limited nature of \ +systemd-networkd(8)." +AUTHOR = "Clayton Craft and others" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d" + +RDEPENDS_${PN} = "systemd python3 python3-pygobject python3-dbus" + +SRC_URI = "git://gitlab.com/craftyguy/networkd-dispatcher.git;protocol=https" +SRCREV = "c7e25623a161b64618ea778541c064d2a1df086b" +PV = "1.7+git${SRCPV}" + +S = "${WORKDIR}/git" + +# Nothing to build, just a python script to install +do_configure[noexec] = "1" +do_compile[noexec] = "1" + +do_install() { + install -D -m 0755 ${S}/networkd-dispatcher ${D}${sbindir}/networkd-dispatcher + install -D -m 0644 ${S}/networkd-dispatcher.service ${D}/${systemd_system_unitdir}/networkd-dispatcher.service + install -D -m 0644 ${S}/networkd-dispatcher.conf ${D}/${sysconfdir}/conf.d/networkd-dispatcher.conf +} + +FILES_${PN} += "${systemd_system_unitdir}/networkd-dispatcher.service" diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch new file mode 100644 index 000000000..ab9b25fed --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Do-not-poke-at-build-host-s-etc-os-release.patch @@ -0,0 +1,27 @@ +From 2bc5c6367a7f70ca5bff177ec95bcad3b1c2b66b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 6 Sep 2018 18:15:10 -0700 +Subject: [PATCH] Do not poke at build host's /etc/os-release + +During cross compile we are interested in target distro and not host +distro therefore do not check for it. + +Upstream-Status: Inappropriate [Cross compile specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: openhpi-3.8.0/configure.ac +=================================================================== +--- openhpi-3.8.0.orig/configure.ac ++++ openhpi-3.8.0/configure.ac +@@ -194,7 +194,6 @@ AC_SUBST(JSON_C_LIB) + AC_SUBST(JSON_C_INCLUDE) + AC_CHECK_LIB([rabbitmq],[amqp_new_connection],[RABBITMQ_LIB=-lrabbitmq],[RABBITMQ_LIB=]) + AC_SUBST(RABBITMQ_LIB) +-AC_CHECK_FILE([/etc/os-release],[DISTRO=`grep "^ID=" /etc/os-release | awk -F"\"" '{ print $2 }'`]) + + AC_CHECK_HEADERS([amqp.h],[have_rabbitmq=yes],[have_rabbitmq=no]) + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch deleted file mode 100644 index 4f493f7b8..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-Fix-build-failures-with-gcc7.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 398c6db66c643ed6133cc2b028ab1e27a17c5295 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 1 May 2017 19:10:09 +0000 -Subject: [PATCH] Fix build failures with gcc7 - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - plugins/ipmidirect/ipmi_mc_vendor.cpp | 2 +- - plugins/ipmidirect/ipmi_resource.cpp | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/plugins/ipmidirect/ipmi_mc_vendor.cpp b/plugins/ipmidirect/ipmi_mc_vendor.cpp -index 2c6c090..557771c 100644 ---- a/plugins/ipmidirect/ipmi_mc_vendor.cpp -+++ b/plugins/ipmidirect/ipmi_mc_vendor.cpp -@@ -322,7 +322,7 @@ cIpmiMcVendor::CreateResources( cIpmiDomain *domain, cIpmiMc *source_mc, cIpmiSd - if ( addr.m_channel != source_mc->GetChannel() ) - stdlog << "WARNING : SDR channel " << addr.m_channel << " NOT equal to MC channel " << source_mc->GetChannel() << "\n"; - -- if ( FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) == false ) { -+ if ( !FindOrCreateResource( domain, source_mc, fru_id, sdr, sdrs ) ) { - return false; - } - } -diff --git a/plugins/ipmidirect/ipmi_resource.cpp b/plugins/ipmidirect/ipmi_resource.cpp -index c438e74..2552673 100644 ---- a/plugins/ipmidirect/ipmi_resource.cpp -+++ b/plugins/ipmidirect/ipmi_resource.cpp -@@ -73,7 +73,7 @@ cIpmiResource::SendCommandReadLock( const cIpmiMsg &msg, cIpmiMsg &rsp, - - domain->ReadLock(); - -- if ( domain->VerifyResource( resource ) == false ) -+ if ( !domain->VerifyResource( resource ) ) - return SA_ERR_HPI_NOT_PRESENT; - - return rv; -@@ -91,7 +91,7 @@ cIpmiResource::SendCommandReadLock( cIpmiRdr *rdr, const cIpmiMsg &msg, cIpmiMsg - - domain->ReadLock(); - -- if ( domain->VerifyRdr( rdr ) == false ) -+ if ( !domain->VerifyRdr( rdr ) ) - return SA_ERR_HPI_NOT_PRESENT; - - return rv; --- -1.9.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch new file mode 100644 index 000000000..c78ec28de --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-include-iostream-for-cout.patch @@ -0,0 +1,41 @@ +From 8f47adc3b9085d589e62cb5eb560dd23a703036a Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 8 Sep 2018 12:47:49 -0700 +Subject: [PATCH] include iostream for cout + +End cout with endl + +Fixes +plugins/dynamic_simulator/thread.cpp:241:3: error: 'cout' was not declared in this scope + cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined" + ^~~~ + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + plugins/dynamic_simulator/thread.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp +index b971502..61eaf42 100644 +--- a/plugins/dynamic_simulator/thread.cpp ++++ b/plugins/dynamic_simulator/thread.cpp +@@ -26,7 +26,7 @@ + */ + + #include "thread.h" +-#include <stdio.h> ++#include <iostream> + #include <sys/time.h> + #include <errno.h> + +@@ -238,7 +238,7 @@ cThreadLock::cThreadLock() + pthread_mutexattr_settype( &attr, PTHREAD_MUTEX_RECURSIVE ); + pthread_mutex_init( &m_lock, &attr ); + pthread_mutexattr_destroy( &attr ); +- cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined" ++ std::cout<<"PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP is Defined"<<std::endl; + } + #else + static pthread_mutex_t lock_tmpl = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch deleted file mode 100644 index 4d56f6535..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-ipmidirect-Replace-__STRING.patch +++ /dev/null @@ -1,31 +0,0 @@ -From be40b3f11460cf495bbbef45692e7763afda0c2b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 17:56:31 -0700 -Subject: [PATCH] ipmidirect: Replace __STRING - -__STRING is not universally available e.g. -musl does not define it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - plugins/ipmidirect/t/test.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/plugins/ipmidirect/t/test.h b/plugins/ipmidirect/t/test.h -index 8d71381..978d5ff 100644 ---- a/plugins/ipmidirect/t/test.h -+++ b/plugins/ipmidirect/t/test.h -@@ -22,7 +22,7 @@ TestFunction( const char *str, const char *file, int line, bool expr ) - } - - --#define Test(expr) TestFunction( __STRING(expr), __FILE__, __LINE__, expr ) -+#define Test(expr) TestFunction( #expr, __FILE__, __LINE__, expr ) - - - static int --- -2.14.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch deleted file mode 100644 index 0f033ac85..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch +++ /dev/null @@ -1,47 +0,0 @@ -From be665d9513cca7e8b64c79ae424cf44ac166b052 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 14 Sep 2017 17:07:58 -0700 -Subject: [PATCH] plugins: Check for PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - before use - -musl does not define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -so we can not assume that all Linux systems support PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -its a glibc specific define so check for it being defined before using it - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - plugins/dynamic_simulator/thread.cpp | 2 +- - plugins/ipmidirect/thread.cpp | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/plugins/dynamic_simulator/thread.cpp b/plugins/dynamic_simulator/thread.cpp -index d663be0..9210fd7 100644 ---- a/plugins/dynamic_simulator/thread.cpp -+++ b/plugins/dynamic_simulator/thread.cpp -@@ -229,7 +229,7 @@ cThread::Exit( void *rv ) - /** - * Constructor - **/ --#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__) -+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - cThreadLock::cThreadLock() - { - pthread_mutexattr_t attr; -diff --git a/plugins/ipmidirect/thread.cpp b/plugins/ipmidirect/thread.cpp -index 5c52557..48e83fa 100644 ---- a/plugins/ipmidirect/thread.cpp -+++ b/plugins/ipmidirect/thread.cpp -@@ -167,7 +167,7 @@ cThread::Exit( void *rv ) - // cThreadLock - ////////////////////////////////////////////////// - --#if ( defined(__sun) && defined(__SVR4) ) || defined(__FreeBSD__) -+#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - cThreadLock::cThreadLock() - { - pthread_mutexattr_t attr; --- -2.14.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch new file mode 100644 index 000000000..2cefd55be --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/0001-session-close-socket.patch @@ -0,0 +1,37 @@ +From b8bc6bfdb5e7fb5b46d3a830e04632939bee6b98 Mon Sep 17 00:00:00 2001 +From: Catalin Enache <catalin.enache@windriver.com> +Date: Fri, 9 Feb 2018 16:35:11 +0200 +Subject: [PATCH] saHpiSessionClose: close socket + +saHpiSessionClose leaks file descriptors + +Upstream issue: https://github.com/open-hpi/openhpi/issues/1918 + +Upstream-Status: Pending + +Signed-off-by: Catalin Enache <catalin.enache@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + baselib/session.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/baselib/session.cpp b/baselib/session.cpp +index c5edfc8..4ece1b7 100644 +--- a/baselib/session.cpp ++++ b/baselib/session.cpp +@@ -126,6 +126,12 @@ cSession::cSession() + + cSession::~cSession() + { ++ cClientStreamSock * sock; ++ gpointer ptr = wrap_g_static_private_get( &m_sockets ); ++ if ( ptr ) { ++ sock = reinterpret_cast<cClientStreamSock *>(ptr); ++ sock->Close(); ++ } + wrap_g_static_private_free( &m_sockets ); + } + +-- +2.10.2 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch index 0549d5977..5eff86b4d 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/c++11.patch @@ -1,11 +1,21 @@ -Index: openhpi-3.6.1/configure.ac -=================================================================== ---- openhpi-3.6.1.orig/configure.ac -+++ openhpi-3.6.1/configure.ac -@@ -44,6 +44,7 @@ AC_PROG_CPP - AC_PROG_INSTALL - AC_PROG_LN_S +From ed51168dfd6844deeaebf7d5f6c65898aafb6299 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 27 Aug 2017 12:12:04 -0700 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index c29a31f..f7fe0f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -46,6 +46,7 @@ AC_PROG_LN_S AC_PROG_MAKE_SET + AC_PROG_AWK + AC_PROG_GREP +AX_CXX_COMPILE_STDCXX_11([noext],[mandatory]) enabled_non32bit="no" diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch index 9b35a0cce..7958a07c6 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/clang-c++11.patch @@ -1,3 +1,7 @@ +Support build with Clang + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> Index: openhpi-3.6.1/plugins/dynamic_simulator/new_sim.cpp =================================================================== --- openhpi-3.6.1.orig/plugins/dynamic_simulator/new_sim.cpp @@ -1273,16 +1277,3 @@ Index: openhpi-3.6.1/plugins/ipmidirect/ipmi.cpp static SaErrorT IpmiResetWatchdog(void *hnd, -Index: openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h -=================================================================== ---- openhpi-3.6.1.orig/plugins/ipmidirect/ipmi_auth.h -+++ openhpi-3.6.1/plugins/ipmidirect/ipmi_auth.h -@@ -32,7 +32,7 @@ class cIpmiAuthSg - { - public: - void *data; /* NULL to terminate. */ -- int len; -+ unsigned int len; - }; - - diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch new file mode 100644 index 000000000..3161140df --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/cross_899198.patch @@ -0,0 +1,98 @@ +From: Helmut Grohne <helmut@subdivi.de> +Subject: fix cross compilation + +The OH_SET_SIZES macro relies on the usual autoconf sizeof cache variables +during cross compilation, but it never ensure that they are initialized. + +pkg-config must be called with $ac_tool_prefix and PKG_PROG_PKG_CONFIG takes +care of that. Setting PKG_CONFIG_PATH breaks the pkg-config-cross-wrapper. +Don't do that. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: openhpi-3.8.0/acinclude.m4 +=================================================================== +--- openhpi-3.8.0.orig/acinclude.m4 ++++ openhpi-3.8.0/acinclude.m4 +@@ -22,30 +22,39 @@ AC_DEFUN([OH_SET_SIZES], + + if test "x$cross_compiling" != "xno"; then + if test "x$OH_SIZEOF_UCHAR" = x; then ++ AC_CHECK_SIZEOF([unsigned char]) + OH_SIZEOF_UCHAR=$ac_cv_sizeof_uchar + fi + if test "x$OH_SIZEOF_USHORT" = x; then ++ AC_CHECK_SIZEOF([unsigned short]) + OH_SIZEOF_USHORT=$ac_cv_sizeof_ushort + fi + if test "x$OH_SIZEOF_UINT" = x; then ++ AC_CHECK_SIZEOF([unsigned int]) + OH_SIZEOF_UINT=$ac_cv_sizeof_uint + fi + if test "x$OH_SIZEOF_CHAR" = x; then ++ AC_CHECK_SIZEOF([char]) + OH_SIZEOF_CHAR=$ac_cv_sizeof_char + fi + if test "x$OH_SIZEOF_SHORT" = x; then ++ AC_CHECK_SIZEOF([short]) + OH_SIZEOF_SHORT=$ac_cv_sizeof_short + fi + if test "x$OH_SIZEOF_INT" = x; then ++ AC_CHECK_SIZEOF([int]) + OH_SIZEOF_INT=$ac_cv_sizeof_int + fi + if test "x$OH_SIZEOF_LLONG" = x; then ++ AC_CHECK_SIZEOF([long long]) + OH_SIZEOF_LLONG=$ac_cv_sizeof_longlong + fi + if test "x$OH_SIZEOF_FLOAT" = x; then ++ AC_CHECK_SIZEOF([float]) + OH_SIZEOF_FLOAT=$ac_cv_sizeof_float + fi + if test "x$OH_SIZEOF_DOUBLE" = x; then ++ AC_CHECK_SIZEOF([double]) + OH_SIZEOF_DOUBLE=$ac_cv_sizeof_double + fi + else +Index: openhpi-3.8.0/configure.ac +=================================================================== +--- openhpi-3.8.0.orig/configure.ac ++++ openhpi-3.8.0/configure.ac +@@ -87,9 +87,9 @@ have_rtas_lib=no + + dnl Check for GLIB + +-AC_CHECK_PROG([found_pkg_config],[pkg-config],[yes]) ++PKG_PROG_PKG_CONFIG + +-if test "x$found_pkg_config" != "xyes"; then ++if test "x$PKG_CONFIG" = "x"; then + OH_CHECK_FAIL(pkg-config,pkg-config) + fi + PKG_CFG_SETPATH +@@ -105,7 +105,7 @@ GLIB=glib-2.0 + GTHREAD=gthread-2.0 + GMODULE=gmodule-2.0 + +-if pkg-config --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then ++if $PKG_CONFIG --atleast-version $GLIB_REQUIRED_VERSION $GLIB; then + : + else + AC_MSG_ERROR([ +@@ -268,12 +268,12 @@ dnl + dnl We really need to make ipmi enablement be contigent on OpenIPMI + dnl + +-if PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --atleast-version 1.4.20 OpenIPMI; then ++if $PKG_CONFIG --atleast-version 1.4.20 OpenIPMI; then + have_openipmi=yes + AC_CHECK_LIB([OpenIPMI], [ipmi_smi_setup_con], [have_openipmi=yes]) +- OPENIPMI_CFLAGS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --cflags OpenIPMI` ++ OPENIPMI_CFLAGS=`$PKG_CONFIG --cflags OpenIPMI` + AC_SUBST(OPENIPMI_CFLAGS) +- OPENIPMI_LIBS=`PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig pkg-config --libs OpenIPMI` ++ OPENIPMI_LIBS=`$PKG_CONFIG --libs OpenIPMI` + AC_SUBST(OPENIPMI_LIBS) + fi + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/no-md2.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/no-md2.patch new file mode 100644 index 000000000..c4dd23e79 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/no-md2.patch @@ -0,0 +1,37 @@ +Description: Fix FTBFS with OpenSSL 1.1 by honouring OPENSSL_NO_MD2 +Author: Adrian Bunk <bunk@debian.org> +Bug-Debian: https://bugs.debian.org/859543 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +Index: openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp +=================================================================== +--- openhpi-3.8.0.orig/plugins/ipmidirect/ipmi_auth.cpp ++++ openhpi-3.8.0/plugins/ipmidirect/ipmi_auth.cpp +@@ -21,6 +21,7 @@ + #include "ipmi_auth.h" + #include <string.h> + #include <errno.h> ++#include <openssl/opensslconf.h> + + + cIpmiAuth * +@@ -32,7 +33,7 @@ IpmiAuthFactory( tIpmiAuthType type ) + return new cIpmiAuthNone; + + case eIpmiAuthTypeMd2: +-#ifdef HAVE_OPENSSL_MD2_H ++#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2) + return new cIpmiAuthMd2; + #else + break; +@@ -78,7 +79,7 @@ cIpmiAuthNone::Check( cIpmiAuthSg /*d*/[ + } + + +-#ifdef HAVE_OPENSSL_MD2_H ++#if defined(HAVE_OPENSSL_MD2_H) && !defined(OPENSSL_NO_MD2) + #include <openssl/md2.h> + + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch new file mode 100644 index 000000000..ca522bcc6 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-3.6.1-ssl.patch @@ -0,0 +1,20 @@ +Link with libssl + +fixed build with openssl-1.1.x + +Taken from Fedora +https://src.fedoraproject.org/rpms/openhpi/c/be77f5484b0206f8946a85b29424ea10bf863063 + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Unknown + +diff -up openhpi-3.6.1/ssl/Makefile.am.than openhpi-3.6.1/ssl/Makefile.am +--- openhpi-3.6.1/ssl/Makefile.am.than 2017-02-21 12:21:12.114814698 -0500 ++++ openhpi-3.6.1/ssl/Makefile.am 2017-02-21 12:22:44.576454262 -0500 +@@ -19,5 +19,5 @@ lib_LTLIBRARIES = libopenhpi_ssl.la + libopenhpi_ssl_la_SOURCES = oh_ssl.c oh_ssl.h + + libopenhpi_ssl_la_LDFLAGS = -version-info @HPI_LIB_VERSION@ +-libopenhpi_ssl_la_LIBADD = @CRYPTO_LIB@ ++libopenhpi_ssl_la_LIBADD = -lssl @CRYPTO_LIB@ + diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch deleted file mode 100644 index cc21ff8c7..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-hpi-shell-thread-fix.patch +++ /dev/null @@ -1,29 +0,0 @@ -commit e9f9a73c9dba8dd59f3d6c3acd9988ec8361d55a -Author: Aws Ismail <aws.ismail@windriver.com> -Date: Mon Dec 17 16:23:45 2012 -0500 - - Correct dangling g_thread_exit in session.c - - hpi_shell's session.c has its progress_bar - thread created using pthread_create but - exited using g_thread_exit. Use pthread_exit - instead to avoid unpredictable GLIB thread - errors. - - Upstream-Status: Pending - - Signed-off-by: Aws Ismail <aws.ismail@windriver.com> - -Index: openhpi-3.6.1/hpi_shell/session.c -=================================================================== ---- openhpi-3.6.1.orig/hpi_shell/session.c -+++ openhpi-3.6.1/hpi_shell/session.c -@@ -73,7 +73,7 @@ static void* progress_bar(void *unused) - if (i < (PROGRESS_BUF_SIZE - mes_len - 1)) i++; - t++; - }; -- g_thread_exit(0); -+ pthread_exit(0); - return (void *)1; - } - diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch index c848b3502..160eeede6 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-libxml2-cross-compile.patch @@ -1,4 +1,7 @@ -Fix libxml2 for cross-compiling +From afe545e77f9d841b7777d859e7e8108492fece96 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Wed, 26 Apr 2017 16:22:00 +0800 +Subject: [PATCH] Fix libxml2 for cross-compiling Use proper XML2_INCLUDE path when cross-compiling @@ -6,16 +9,20 @@ Upstream-Status: Pending Signed-of-by: Aws Ismail <aws.ismail@windriver.com> -Index: openhpi-3.6.1/configure.ac -=================================================================== ---- openhpi-3.6.1.orig/configure.ac -+++ openhpi-3.6.1/configure.ac -@@ -177,7 +177,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/ +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 6242cbf..4fb6b69 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -179,7 +179,7 @@ AC_CHECK_HEADERS([openssl/md2.h openssl/md5.h openssl/bio.h openssl/ssl.h openss dnl xml is used for XML-based communication in ilo2_ribcl and oa_soap AC_CHECK_LIB([xml2],[xmlParseMemory],[XML2_LIB=-lxml2],[XML2_LIB=]) --AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE]) -+AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE]) +-AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="-I/usr/include/libxml2"],[XML2_INCLUDE=]) ++AC_CHECK_HEADERS([libxml2/libxml/xmlexports.h],[XML2_INCLUDE="$XML2_INCLUDE"],[XML2_INCLUDE=]) AC_SUBST(XML2_LIB) AC_SUBST(XML2_INCLUDE) diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch index 95b0abc91..293c8d91f 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-netsnmp-cross-compile.patch @@ -13,36 +13,33 @@ Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> configure | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) -diff --git a/acinclude.m4 b/acinclude.m4 -index 82c33f6..727e461 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 +Index: openhpi-3.8.0/acinclude.m4 +=================================================================== +--- openhpi-3.8.0.orig/acinclude.m4 ++++ openhpi-3.8.0/acinclude.m4 @@ -160,8 +160,8 @@ AC_DEFUN([OH_CHECK_NETSNMP], ], [ have_netsnmp=yes -- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` +- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'` - SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` + SNMPFLAGS="" + SNMPLIBS="" AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no. No SNMP based plugins can be built!)]) -diff --git a/configure b/configure -index 00067bc..36b913c 100755 ---- a/configure -+++ b/configure -@@ -15949,8 +15949,8 @@ _ACEOF +Index: openhpi-3.8.0/configure +=================================================================== +--- openhpi-3.8.0.orig/configure ++++ openhpi-3.8.0/configure +@@ -16062,8 +16062,8 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_netsnmp=yes -- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/-O\S*//g'` +- SNMPFLAGS=`${net_snmp_config:-net-snmp-config} --cflags | perl -p -e 's/ -O\S*//g'` - SNMPLIBS=`${net_snmp_config:-net-snmp-config} --libs` + SNMPFLAGS="" + SNMPLIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } --- -1.9.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch index 3e09180d4..472318b80 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/files/openhpi-use-serial-tests-config-needed-by-ptest.patch @@ -1,4 +1,4 @@ -From 36fbaa27e7299f63c1324b0ad22b970e9365d6a7 Mon Sep 17 00:00:00 2001 +From 5e0ae172586f5aeb270a8f9b012dd3e36536a2a9 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Wed, 24 Dec 2014 10:54:59 +0800 Subject: [PATCH] openhpi: use serial-tests config needed by ptest @@ -9,17 +9,18 @@ serial-tests is required to generate those targets. Upstream-Status: Inappropriate [default automake behavior incompatible with ptest] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> + --- - configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -Index: openhpi-3.6.1/configure.ac -=================================================================== ---- openhpi-3.6.1.orig/configure.ac -+++ openhpi-3.6.1/configure.ac -@@ -7,7 +7,7 @@ dnl various hacks by Sean Dague <http: +diff --git a/configure.ac b/configure.ac +index 89d8104..c29a31f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -7,7 +7,7 @@ dnl various hacks by Sean Dague <http://dague.net/sean> 4/23/03 AC_PREREQ(2.57) - AC_INIT(openhpi, 3.6.1) + AC_INIT(openhpi, 3.8.0) AC_CONFIG_SRCDIR(openhpi.spec.in) -AM_INIT_AUTOMAKE([1.8]) +AM_INIT_AUTOMAKE([1.8 serial-tests]) diff --git a/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb b/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb index ecf71d70f..c4b3309f7 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.6.1.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/openhpi/openhpi_3.8.0.bb @@ -20,7 +20,8 @@ SECTION = "net" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=e3c772a32386888ccb5ae1c0ba95f1a4" -DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs autoconf-archive-native" +DEPENDS = "net-snmp libxml2 ncurses openssl glib-2.0 popt e2fsprogs \ + autoconf-archive-native os-release" SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://openhpi.init \ @@ -32,22 +33,23 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz \ file://openhpi-glib-cross-compile.patch \ file://openhpi-linkfix.patch \ file://openhpi-fix-host-gcc.patch \ - file://openhpi-hpi-shell-thread-fix.patch \ file://openhpi-fix-testfail-errors.patch \ file://openhpi-add-libnetsnmp-when-link.patch \ file://openhpi-invalide-session.patch \ file://openhpi-use-serial-tests-config-needed-by-ptest.patch \ file://openhpi-fix-alignment-issue.patch \ - file://0001-Fix-build-failures-with-gcc7.patch \ file://c++11.patch \ file://clang-c++11.patch \ file://fix-narrowing-warning.patch \ - file://0001-plugins-Check-for-PTHREAD_RECURSIVE_MUTEX_INITIALIZE.patch \ - file://0001-ipmidirect-Replace-__STRING.patch \ + file://0001-session-close-socket.patch \ + file://openhpi-3.6.1-ssl.patch \ + file://0001-Do-not-poke-at-build-host-s-etc-os-release.patch \ + file://cross_899198.patch \ + file://no-md2.patch \ + file://0001-include-iostream-for-cout.patch \ " - -SRC_URI[md5sum] = "4718b16e0f749b5ad214a9b04f45dd23" -SRC_URI[sha256sum] = "e0a810cb401c4bdcfc9551f2e6afd5a8ca4b411f5ee3bc60c19f82fd6e84a3dc" +SRC_URI[md5sum] = "fffda3deea8a0d3671a72eea9d13a4df" +SRC_URI[sha256sum] = "c94332a29160dd75cb799c027e614690c00263b0fabed87417707bec04c38723" inherit autotools pkgconfig ptest update-rc.d systemd @@ -63,6 +65,8 @@ PACKAGECONFIG[sysfs] = "--enable-sysfs,--disable-sysfs,sysfsutils," PACKAGECONFIG[libgcrypt] = "--enable-encryption,--disable-encryption,libgcrypt," PACKAGECONFIG[non32bit] = "--enable-non32bit-int,--disable-non32bit-int,," +export DISTRO + do_install_append () { install -m 0755 -d ${D}${sysconfdir}/${BPN} install -m 0755 ${S}/openhpiclient.conf.example ${D}${sysconfdir}/${BPN}/openhpiclient.conf diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch new file mode 100644 index 000000000..30fdb8bf1 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Catch-std-ifstream-failure-by-reference.patch @@ -0,0 +1,67 @@ +From 38c5343f84799fc5041575f3ec808f7476b6eea3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 16 Apr 2018 14:33:35 -0700 +Subject: [PATCH] Catch std::ifstream::failure by reference + +Fixes +error: catching polymorphic type 'class std::ios_base::failure' by value +[-Werror=catch-value=] + } catch (std::ofstream::failure) { + ^~~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/base/conf.cc | 4 ++-- + src/dtm/dtmnd/dtm_main.cc | 2 +- + src/dtm/dtmnd/multicast.cc | 2 +- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/base/conf.cc b/src/base/conf.cc +index d5755a1..4820357 100644 +--- a/src/base/conf.cc ++++ b/src/base/conf.cc +@@ -189,7 +189,7 @@ std::string Conf::ReadFile(const std::string& path_name, + try { + str.open(path_name); + str >> contents; +- } catch (std::ifstream::failure) { ++ } catch (std::ifstream::failure& e) { + contents.clear(); + } + return (str.fail() || contents.empty()) ? default_contents : contents; +@@ -203,7 +203,7 @@ void Conf::WriteFileAtomically(const std::string& path_name, + try { + str.open(tmp_file, std::ofstream::out | std::ofstream::trunc); + str << contents << std::endl; +- } catch (std::ofstream::failure) { ++ } catch (std::ofstream::failure& e) { + success = false; + } + str.close(); +diff --git a/src/dtm/dtmnd/dtm_main.cc b/src/dtm/dtmnd/dtm_main.cc +index 585e11e..5cf6ad7 100644 +--- a/src/dtm/dtmnd/dtm_main.cc ++++ b/src/dtm/dtmnd/dtm_main.cc +@@ -367,7 +367,7 @@ void UpdateNodeIdFile(DTM_INTERNODE_CB *cb) { + try { + str.open(PKGLOCALSTATEDIR "/node_id", std::ofstream::out); + str << std::hex << node_id << std::endl; +- } catch (std::ofstream::failure) { ++ } catch (std::ofstream::failure& e) { + } + str.close(); + } +diff --git a/src/dtm/dtmnd/multicast.cc b/src/dtm/dtmnd/multicast.cc +index cadc002..7c25fea 100644 +--- a/src/dtm/dtmnd/multicast.cc ++++ b/src/dtm/dtmnd/multicast.cc +@@ -199,7 +199,7 @@ bool Multicast::GetPeersFromFile(const std::string &path_name) { + } + } + } +- } catch (std::ifstream::failure) { ++ } catch (std::ifstream::failure& e) { + LOG_ER("Caught std::ifstream::failure when reading file '%s', peers=%zu", + path_name.c_str(), static_cast<size_t>(peers_.size())); + peers_.clear(); diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch new file mode 100644 index 000000000..db6796d05 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch @@ -0,0 +1,76 @@ +From ae7178a78aba2e5766b70191617113487fd7ad0b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 16 Apr 2018 18:29:17 -0700 +Subject: [PATCH] Fix string overflow in snprintf + +Fixes errors like +error: '%s' dir +ective output may be truncated writing up to 255 bytes into a region of size 32 [-Werror=forma +t-truncation=] + snprintf(reinterpret_cast<char *>(Healthy.key), sizeof(Healthy.key), "%s", + ^~~~ + hlth_str); + ~~~~~~~~ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/log/logd/lgs_util.cc | 4 ++-- + src/rde/rded/rde_amf.cc | 2 +- + src/smf/smfd/SmfUpgradeCampaign.cc | 4 ++-- + 3 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/log/logd/lgs_util.cc b/src/log/logd/lgs_util.cc +index ac93d5a..cce80f3 100644 +--- a/src/log/logd/lgs_util.cc ++++ b/src/log/logd/lgs_util.cc +@@ -200,12 +200,12 @@ char *lgs_get_time(time_t *time_in) { + + stringSize = 5 * sizeof(char); + snprintf(srcString, (size_t)stringSize, "%d", +- (timeStampData->tm_year + START_YEAR)); ++ (timeStampData->tm_year + START_YEAR) & 0x4dU); + + strncpy(timeStampString, srcString, stringSize); + + stringSize = 3 * sizeof(char); +- snprintf(srcString, (size_t)stringSize, "%02d", (timeStampData->tm_mon + 1)); ++ snprintf(srcString, (size_t)stringSize, "%02d", (timeStampData->tm_mon + 1) & 0x2dU); + + strncat(timeStampString, srcString, stringSize); + +diff --git a/src/rde/rded/rde_amf.cc b/src/rde/rded/rde_amf.cc +index 81e521e..d53cc48 100644 +--- a/src/rde/rded/rde_amf.cc ++++ b/src/rde/rded/rde_amf.cc +@@ -102,7 +102,7 @@ static uint32_t rde_amf_healthcheck_start(RDE_AMF_CB *rde_amf_cb) { + SaAmfHealthcheckKeyT Healthy; + SaNameT SaCompName; + char *phlth_ptr; +- char hlth_str[256]; ++ char hlth_str[32]; + + TRACE_ENTER(); + +diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc b/src/smf/smfd/SmfUpgradeCampaign.cc +index 45cdce8..6761bcf 100644 +--- a/src/smf/smfd/SmfUpgradeCampaign.cc ++++ b/src/smf/smfd/SmfUpgradeCampaign.cc +@@ -447,7 +447,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { + TRACE_ENTER(); + SaAisErrorT rc = SA_AIS_OK; + SaImmAttrValuesT_2 **attributes; +- int curCnt = 0; ++ short int curCnt = 0; + + /* Read the SmfCampRestartInfo object smfCampRestartCnt attr */ + std::string obj = "smfRestartInfo=info," + +@@ -473,7 +473,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { + attrsmfCampRestartCnt.setName("smfCampRestartCnt"); + attrsmfCampRestartCnt.setType("SA_IMM_ATTR_SAUINT32T"); + char buf[5]; +- snprintf(buf, 4, "%d", curCnt); ++ snprintf(buf, 4, "%hd", curCnt); + attrsmfCampRestartCnt.addValue(buf); + imoCampRestartInfo.addValue(attrsmfCampRestartCnt); + diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch index effe25c85..be0a58767 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch @@ -1,20 +1,21 @@ -From ab00d6f5793b2d850f975bcb6d5d0aa6d7a9eaa4 Mon Sep 17 00:00:00 2001 +From c2668f7f2ea82a61115b7cae56ed081b41ff5153 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sat, 22 Apr 2017 12:34:37 -0700 Subject: [PATCH] configure: Disable format-overflow if supported by gcc Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- - Makefile.am | 6 ++-- - configure.ac | 2 ++ - m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++ + Makefile.am | 6 +-- + configure.ac | 2 + + m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 m4/ax_check_compile_flag.m4 -Index: opensaf-5.18.02/Makefile.am -=================================================================== ---- opensaf-5.18.02.orig/Makefile.am -+++ opensaf-5.18.02/Makefile.am +diff --git a/Makefile.am b/Makefile.am +index b3d6553..5607fc2 100644 +--- a/Makefile.am ++++ b/Makefile.am @@ -52,10 +52,10 @@ AM_CPPFLAGS = \ -pthread \ -D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \ @@ -29,11 +30,11 @@ Index: opensaf-5.18.02/Makefile.am if ENABLE_GCOV AM_CFLAGS += --coverage -Index: opensaf-5.18.02/configure.ac -=================================================================== ---- opensaf-5.18.02.orig/configure.ac -+++ opensaf-5.18.02/configure.ac -@@ -593,6 +593,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then +diff --git a/configure.ac b/configure.ac +index 5b86730..47d1002 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -600,6 +600,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then fi AC_SUBST(OSAF_HARDEN_FLAGS) @@ -42,10 +43,11 @@ Index: opensaf-5.18.02/configure.ac ############################################# # List the output Makefiles ############################################# -Index: opensaf-5.18.02/m4/ax_check_compile_flag.m4 -=================================================================== +diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4 +new file mode 100644 +index 0000000..dcabb92 --- /dev/null -+++ opensaf-5.18.02/m4/ax_check_compile_flag.m4 ++++ b/m4/ax_check_compile_flag.m4 @@ -0,0 +1,74 @@ +# =========================================================================== +# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch index 5756a027b..e4bbb4c3c 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch @@ -1,4 +1,4 @@ -From 6248b717b4861d16b80235fd8e57d64e4f636428 Mon Sep 17 00:00:00 2001 +From 979b2b6a1aa574a26e8b736049c4207d568f60f3 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Thu, 13 Apr 2017 17:39:07 -0700 Subject: [PATCH] configure: Pass linker specific options with -Wl @@ -7,15 +7,16 @@ This helps make it pass the options to linker correctly and we can use non-gcc compilers Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index df4fc58..02771c6 100644 +index 12a5d5c..5b86730 100644 --- a/configure.ac +++ b/configure.ac -@@ -553,7 +553,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then +@@ -596,7 +596,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then OSAF_HARDEN_FLAGS="" fi @@ -24,6 +25,3 @@ index df4fc58..02771c6 100644 fi AC_SUBST(OSAF_HARDEN_FLAGS) --- -2.12.2 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch index 76c47c658..e40d2b319 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch @@ -1,4 +1,4 @@ -From 508ea7c0d67243feb1684eaa83569cb687561d64 Mon Sep 17 00:00:00 2001 +From c21f77d592415f316138c05f581192a1f061e735 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 15 Sep 2017 10:09:03 -0700 Subject: [PATCH] immpbe_dump.cc: Use sys/wait.h instead of wait.h @@ -7,12 +7,13 @@ Fixes redirecting incorrect #include <wait.h> to <sys/wait.h> Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- src/imm/common/immpbe_dump.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imm/common/immpbe_dump.cc b/src/imm/common/immpbe_dump.cc -index 100222f37..33e47ce3c 100644 +index e6b3cc5..3956028 100644 --- a/src/imm/common/immpbe_dump.cc +++ b/src/imm/common/immpbe_dump.cc @@ -26,12 +26,12 @@ @@ -27,8 +28,5 @@ index 100222f37..33e47ce3c 100644 #include <sys/stat.h> +#include <sys/wait.h> #include <libgen.h> - - #include <saAis.h> --- -2.14.1 - + #include <set> + #include <vector> diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch index 4a2a825f9..e4a3975da 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch @@ -1,4 +1,4 @@ -From 6442b57a855e273aa5a3d93e8596783cea128073 Mon Sep 17 00:00:00 2001 +From 7fb393c66df33110fef0cbabac7d304f12eb82e4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Fri, 15 Sep 2017 09:39:40 -0700 Subject: [PATCH] src: Add missing header limits.h for _POSIX_HOST_NAME_MAX @@ -7,6 +7,7 @@ Use _GNU_SOURCE instead of libc internal __USE_GNU Do not use the deprecated headers under include/sys Signed-off-by: Khem Raj <raj.khem@gmail.com> + --- src/base/os_defs.h | 5 +++-- src/mds/mds_dt_tcp.c | 1 - @@ -18,7 +19,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> 7 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/base/os_defs.h b/src/base/os_defs.h -index 50a9bf5fc..af6842863 100644 +index a570c43..3559b19 100644 --- a/src/base/os_defs.h +++ b/src/base/os_defs.h @@ -47,17 +47,18 @@ @@ -43,7 +44,7 @@ index 50a9bf5fc..af6842863 100644 #include <pthread.h> diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c -index 1407eb1ab..a87c22faa 100644 +index 1407eb1..a87c22f 100644 --- a/src/mds/mds_dt_tcp.c +++ b/src/mds/mds_dt_tcp.c @@ -27,7 +27,6 @@ @@ -55,7 +56,7 @@ index 1407eb1ab..a87c22faa 100644 #include <sys/types.h> #include <unistd.h> diff --git a/src/mds/mds_dt_tcp_disc.h b/src/mds/mds_dt_tcp_disc.h -index a6249d73e..574f52681 100644 +index a6249d7..574f526 100644 --- a/src/mds/mds_dt_tcp_disc.h +++ b/src/mds/mds_dt_tcp_disc.h @@ -24,7 +24,7 @@ @@ -68,7 +69,7 @@ index a6249d73e..574f52681 100644 /* mds_indentifire + mds_version + msg_type + scope_type + server_type + server_instance_lower + server_instance_upper + sub_ref_val + sub_ref_val + diff --git a/src/mds/mds_dt_tipc.c b/src/mds/mds_dt_tipc.c -index 37745e7f0..9b3255567 100644 +index 7714175..a0ed3b6 100644 --- a/src/mds/mds_dt_tipc.c +++ b/src/mds/mds_dt_tipc.c @@ -35,7 +35,6 @@ @@ -80,7 +81,7 @@ index 37745e7f0..9b3255567 100644 #include <sys/types.h> #include <unistd.h> diff --git a/src/mds/mds_dt_tipc.h b/src/mds/mds_dt_tipc.h -index e73a11b09..401d208c2 100644 +index e73a11b..401d208 100644 --- a/src/mds/mds_dt_tipc.h +++ b/src/mds/mds_dt_tipc.h @@ -32,7 +32,7 @@ @@ -93,7 +94,7 @@ index e73a11b09..401d208c2 100644 #include <errno.h> #include <fcntl.h> diff --git a/src/mds/mds_dt_trans.c b/src/mds/mds_dt_trans.c -index 6f621e04e..5aacbd33e 100644 +index 6f621e0..5aacbd3 100644 --- a/src/mds/mds_dt_trans.c +++ b/src/mds/mds_dt_trans.c @@ -26,7 +26,6 @@ @@ -105,7 +106,7 @@ index 6f621e04e..5aacbd33e 100644 #define MDS_PROT_TCP 0xA0 diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc -index 84014b578..31b1ccc6c 100644 +index fd17c58..1120008 100644 --- a/src/ntf/ntfd/NtfLogger.cc +++ b/src/ntf/ntfd/NtfLogger.cc @@ -20,7 +20,7 @@ @@ -117,6 +118,3 @@ index 84014b578..31b1ccc6c 100644 #include "base/osaf_utility.h" #include <saAis.h> --- -2.14.1 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch new file mode 100644 index 000000000..f98e28da9 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0002-Fix-format-truncation-errors.patch @@ -0,0 +1,100 @@ +From c5034fe42df8923bcefc10e163151997d70b6241 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 16 Apr 2018 14:56:47 -0700 +Subject: [PATCH] Fix format-truncation errors + +Fixes errors with gcc8 eg. +error: '%u' directive output may be truncated writing between 1 and 10 bytes into a region of size between 0 and 254 [-Werror=format-truncation=] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- + src/base/daemon.c | 4 ++-- + src/mds/mds_c_db.c | 8 ++++---- + src/mds/mds_core.h | 4 ++-- + src/mds/mds_dt2c.h | 2 +- + 4 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/src/base/daemon.c b/src/base/daemon.c +index 361dd8d..4001b73 100644 +--- a/src/base/daemon.c ++++ b/src/base/daemon.c +@@ -95,11 +95,11 @@ static int __create_pidfile(const char *pidfile) + { + FILE *file = NULL; + int fd, rc = 0; +- char pidfiletmp[NAME_MAX] = {0}; ++ char pidfiletmp[NAME_MAX+12] = {0}; + pid_t pid; + + pid = getpid(); +- snprintf(pidfiletmp, NAME_MAX, "%s.%u.tmp", pidfile, pid); ++ snprintf(pidfiletmp, NAME_MAX+12, "%s.%u.tmp", pidfile, pid); + + /* open the file and associate a stream with it */ + if (((fd = open(pidfiletmp, O_RDWR | O_CREAT, 0644)) == -1) || +diff --git a/src/mds/mds_c_db.c b/src/mds/mds_c_db.c +index e6b95cd..3d4a222 100644 +--- a/src/mds/mds_c_db.c ++++ b/src/mds/mds_c_db.c +@@ -124,10 +124,10 @@ void get_adest_details(MDS_DEST adest, char *adest_details) + } + + if (remote == true) +- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, ++ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, + "<rem_nodeid[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); + else +- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, ++ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, + "<nodeid[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); + + m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details); +@@ -207,10 +207,10 @@ void get_subtn_adest_details(MDS_PWE_HDL pwe_hdl, MDS_SVC_ID svc_id, + } + + if (remote == true) +- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, ++ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, + "<rem_node[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); + else +- snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN, ++ snprintf(adest_details, MDS_MAX_PROCESS_NAME_LEN+24, + "<node[0x%" PRIx32 "]:%s>", ncs_node_id, process_name); + done: + m_MDS_LOG_DBG("MDS:DB: adest_details: %s ", adest_details); +diff --git a/src/mds/mds_core.h b/src/mds/mds_core.h +index 37696d4..7f5225d 100644 +--- a/src/mds/mds_core.h ++++ b/src/mds/mds_core.h +@@ -163,7 +163,7 @@ typedef struct mds_subscription_results_info { + uint32_t msg_snd_cnt; /* Message send count to this destination */ + uint32_t msg_rcv_cnt; /* Message rcv count from this destination */ + char sub_adest_details +- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[slotno]:processname[pid]> */ ++ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[slotno]:processname[pid]> */ + + } MDS_SUBSCRIPTION_RESULTS_INFO; + +@@ -194,7 +194,7 @@ typedef struct mds_subscription_info { + count is grater than ZERO bcast (multi-unicast) */ + uint32_t prev_ver_sub_count; + char sub_adest_details +- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[slotno]:processname[pid]> */ ++ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[slotno]:processname[pid]> */ + + } MDS_SUBSCRIPTION_INFO; + +diff --git a/src/mds/mds_dt2c.h b/src/mds/mds_dt2c.h +index 012999c..006b722 100644 +--- a/src/mds/mds_dt2c.h ++++ b/src/mds/mds_dt2c.h +@@ -143,7 +143,7 @@ typedef struct mdtm_send_req { + */ + MDS_DEST adest; /* MDTM to do local/remote routing, destination adest */ + char sub_adest_details +- [MDS_MAX_PROCESS_NAME_LEN]; /* <node[nodeid]:processname[pid]> */ ++ [MDS_MAX_PROCESS_NAME_LEN+24]; /* <node[nodeid]:processname[pid]> */ + MDS_SEND_PRIORITY_TYPE pri; + MDS_CLIENT_MSG_FORMAT_VER + msg_fmt_ver; /* message format version specification */ diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch new file mode 100644 index 000000000..497bb07d8 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0008-check-for-size-before-using-strncpy.patch @@ -0,0 +1,33 @@ +From 29510dd81e3a5e96151afdb0702863cbfd640766 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 22 Jun 2018 18:58:59 -0700 +Subject: [PATCH] check for size before using strncpy + +ensures that size is never execeding the string length +that execPath can hold + +Fixes +error: '__builtin___strncpy_chk' specified size between 18446744071562067968 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Werror=stringop-overflow=] + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/imm/immnd/immnd_proc.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/imm/immnd/immnd_proc.c b/src/imm/immnd/immnd_proc.c +index 015932a..c8f115e 100644 +--- a/src/imm/immnd/immnd_proc.c ++++ b/src/imm/immnd/immnd_proc.c +@@ -1902,6 +1902,10 @@ static int immnd_forkPbe(IMMND_CB *cb) + LOG_ER("Pathname too long: %u max is 1023", newLen); + return -1; + } ++ if (execDirLen > 1023 || execDirLen < 0) { ++ LOG_ER("Execdir name too long: %u max is 1023", execDirLen); ++ return -1; ++ } + + strncpy(execPath, cb->mProgName, execDirLen); + execPath[execDirLen] = 0; diff --git a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.02.bb b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb index 4b556ce8c..c534c6206 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.02.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb @@ -24,9 +24,13 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \ file://0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch \ file://0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch \ -" -SRC_URI[md5sum] = "42064f5ddbc7f560bfc5ff93ea9eecc7" -SRC_URI[sha256sum] = "f9e24897f9cfd63bb3115f6275c706de1702d3d9bae2fc423227db72b23c37f0" + file://0001-Catch-std-ifstream-failure-by-reference.patch \ + file://0002-Fix-format-truncation-errors.patch \ + file://0001-Fix-string-overflow-in-snprintf.patch \ + file://0008-check-for-size-before-using-strncpy.patch \ + " +SRC_URI[md5sum] = "21836e43b13ad33bed9bd0ed391e5a6e" +SRC_URI[sha256sum] = "e55dc2645487fb22938e8386b99eef6eb7aff43a246ce3e92488daf6ee46247a" inherit autotools useradd systemd pkgconfig @@ -38,9 +42,10 @@ SYSTEMD_SERVICE_${PN} += "opensafd.service" SYSTEMD_AUTO_ENABLE = "disable" PACKAGECONFIG[systemd] = ",,systemd" -PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi" +PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi" +PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi" -PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" PKGLIBDIR="${libdir}" @@ -65,3 +70,5 @@ INSANE_SKIP_${PN} = "dev-so" RDEPENDS_${PN} += "bash python" +# http://errors.yoctoproject.org/Errors/Details/186970/ +EXCLUDE_FROM_WORLD_libc-musl = "1" diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch b/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch deleted file mode 100644 index 6b86e3925..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 63619acf25151d4dade6d65732722ec4a710a5ac Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 15 Jul 2017 09:54:25 -0700 -Subject: [PATCH] Check for glibc before setting CANT_USE_SEND_RECV_MSG - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/util/sys_defs.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/util/sys_defs.h b/src/util/sys_defs.h -index f720e2a..7314c63 100644 ---- a/src/util/sys_defs.h -+++ b/src/util/sys_defs.h -@@ -813,7 +813,7 @@ extern int initgroups(const char *, int); - #define KERNEL_VERSION(a,b,c) (LINUX_VERSION_CODE + 1) - #endif - #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0)) \ -- || (__GLIBC__ < 2) -+ || (defined(__GLIBC__) && (__GLIBC__ < 2)) - #define CANT_USE_SEND_RECV_MSG - #define DEF_SMTP_CACHE_DEMAND 0 - #else --- -2.13.3 - diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch b/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch new file mode 100644 index 000000000..565098400 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/postfix/files/0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch @@ -0,0 +1,58 @@ +From 4caa18feb70f8f3d133657c1250a53f4e292bb42 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Fri, 12 Oct 2018 12:38:02 +0800 +Subject: [PATCH] makedefs: add -lnsl and -lresolv to SYSLIBS by default + +We don't need to check libnsl.so and libresolv.so since the libnsl2 is +specified in DEPENDS and libresolv.so is from c libarary. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + makedefs | 22 ++-------------------- + 1 file changed, 2 insertions(+), 20 deletions(-) + +diff --git a/makedefs b/makedefs +index 2683bce..8f1b3f4 100644 +--- a/makedefs ++++ b/makedefs +@@ -484,16 +484,7 @@ case "$SYSTEM.$RELEASE" in + SYSLIBS="$SYSLIBS -ldb" + ;; + esac +- for name in nsl resolv $GDBM_LIBS +- do +- for lib in $BUILD_SYSROOT_NSL_PATH +- do +- test -e $lib/lib$name.a -o -e $lib/lib$name.so && { +- SYSLIBS="$SYSLIBS -l$name" +- break +- } +- done +- done ++ SYSLIBS="$SYSLIBS -lnsl -lresolv" + # Kernel 2.4 added IPv6 + case "$RELEASE" in + 2.[0-3].*) CCARGS="$CCARGS -DNO_IPV6";; +@@ -561,16 +552,7 @@ EOF + SYSLIBS="$SYSLIBS -ldb" + ;; + esac +- for name in nsl resolv +- do +- for lib in $BUILD_SYSROOT_NSL_PATH +- do +- test -e $lib/lib$name.a -o -e $lib/lib$name.so && { +- SYSLIBS="$SYSLIBS -l$name" +- break +- } +- done +- done ++ SYSLIBS="$SYSLIBS -lnsl -lresolv" + SYSLIBS="$SYSLIBS -ldl" + : ${SHLIB_SUFFIX=.so} + : ${SHLIB_CFLAGS=-fPIC} +-- +2.7.4 + diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc index 09447d50a..3d4f1df43 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc @@ -6,14 +6,13 @@ has a definite Sendmail-ish flavor, but the inside is completely different." HOMEPAGE= "http://www.postfix.org" SECTION = "mail" -DEPENDS = "db icu libpcre openssl postfix-native \ +DEPENDS = "db icu libpcre libnsl2 openssl postfix-native \ ${@bb.utils.contains('DISTRO_FEATURES', 'ldap', 'openldap', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'sasl', 'cyrus-sasl', '', d)} \ " -DEPENDS_class-native = "db-native icu-native openssl-native libpcre-native" -LICENSE = "IPL-1.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354" +LICENSE = "IPL-1.0 | EPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a" SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ file://makedefs.patch \ @@ -77,7 +76,6 @@ export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${C export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}" export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf" -export CCARGS-nonis_libc-musl = "-DNO_NIS" # OPT,DEBUG is aready in CFLAGS # ignore the OPTS="CC=$CC" in Makefile it will not use the CC=$CC $CCARGS EXTRA_OEMAKE += "OPT= DEBUG= OPTS= " @@ -99,27 +97,9 @@ do_compile () { "s:\$(SHELL) makedefs):\$(SHELL) makedefs $SYSTEM $RELEASE):" \ ${S}/Makefile.in export BUILD_SYSROOT="${STAGING_DIR_HOST}" - export BUILD_SYSROOT_NSL_PATH="${STAGING_BASELIBDIR} \ - ${STAGING_LIBDIR}" else # native build export BUILD_SYSROOT="${STAGING_DIR_NATIVE}" - - # ubuntu x86 host: /lib/x86_64-linux-gnu(64) /lib/i386-linux-gnu (32) - # on 64 bits, 32 libs in i386-linux-gnu - # let makedefs finds nsl and resolv libs, host CC will link - # the correct libraries - BUILD_SYSROOT_NSL_PATH="$(${CC} -print-search-dirs 2>/dev/null | \ - sed -n '/^libraries: =/s/libraries: =//p' | \ - sed -e 's/:/\n/g' | xargs -n1 readlink -f | \ - grep -v 'gcc\|/[0-9.]\+$' | sort -u)" - if [ -z "$BUILD_SYSROOT_NSL_PATH" ]; then - BUILD_SYSROOT_NSL_PATH="/usr/lib64 /lib64 \ - /lib/x86_64-linux-gnu \ - /usr/lib /lib \ - /lib/i386-linux-gnu" - fi - export BUILD_SYSROOT_NSL_PATH fi oe_runmake makefiles @@ -207,6 +187,8 @@ do_install () { chown :postdrop ${D}${sbindir}/postdrop chmod g+s ${D}${sbindir}/postqueue chmod g+s ${D}${sbindir}/postdrop + + rm -rf ${D}/etc/postfix/makedefs.out } do_install_append_class-native() { @@ -214,14 +196,12 @@ do_install_append_class-native() { ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq } -do_install_append_class-target() { - # Remove references to buildmachine paths in target makedefs.out - sed -i 's:-fdebug-prefix-map[^ ]*::g; s:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out -} - -ALTERNATIVE_${PN} = "sendmail" +ALTERNATIVE_${PN} += "sendmail mailq newaliases" +ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" +ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail" + ALTERNATIVE_PRIORITY = "120" ALTERNATIVE_${PN}-doc += "mailq.1 newaliases.1 sendmail.1" @@ -248,10 +228,10 @@ pkg_postinst_${PN} () { # This can fail depending on host setup if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX} - exit 0 + else + touch $D/etc/postfix/virtual_alias + postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias fi - touch $D/etc/postfix/virtual_alias - postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias fi } diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb deleted file mode 100644 index 89af406ac..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb +++ /dev/null @@ -1,9 +0,0 @@ -require postfix.inc - -SRC_URI += "file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \ - file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ - file://postfix-install.patch \ - file://icu-config.patch \ - " -SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0" -SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576" diff --git a/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb new file mode 100644 index 000000000..6718b7ef9 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb @@ -0,0 +1,12 @@ +require postfix.inc + +SRC_URI += "file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ + file://postfix-install.patch \ + file://icu-config.patch \ + file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \ + " + +SRC_URI[md5sum] = "4381c6492f415e4a69cf5099d4acea76" +SRC_URI[sha256sum] = "54f514dae42b5275cb4bc9c69283f16c06200b71813d0bb696568c4ba7ae7e3b" + +UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz" diff --git a/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb b/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb index c1f150405..e5c561646 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/pure-ftpd/pure-ftpd_1.0.42.bb @@ -5,7 +5,7 @@ SECTION = "net" LICENSE = "BSD" LIC_FILES_CHKSUM = "file://COPYING;md5=90352fb2bfe17f4261687a0d6e09f489" -DEPENDS = "libcap" +DEPENDS = "libcap virtual/crypt" SRC_URI = "http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-${PV}.tar.gz \ diff --git a/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc b/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc index 06d16a4ce..59a07d78d 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc +++ b/meta-openembedded/meta-networking/recipes-daemons/radvd/radvd.inc @@ -20,7 +20,7 @@ SRC_URI = "http://v6web.litech.org/radvd/dist/radvd-${PV}.tar.gz \ file://volatiles.03_radvd \ file://radvd.default" -inherit autotools update-rc.d useradd pkgconfig systemd +inherit autotools useradd pkgconfig systemd SYSTEMD_SERVICE_${PN} = "radvd.service" SYSTEMD_AUTO_ENABLE = "disable" @@ -36,7 +36,7 @@ do_install_append () { sed -i 's!/var/!${localstatedir}/!g' ${D}${sysconfdir}/init.d/radvd sed -i 's!^PATH=.*!PATH=${base_sbindir}:${base_bindir}:${sbindir}:${bindir}!' ${D}${sysconfdir}/init.d/radvd - install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/volatiles.03_radvd + install -m 0644 ${WORKDIR}/volatiles.03_radvd ${D}${sysconfdir}/default/volatiles/03_radvd # Install systemd service files install -d ${D}${systemd_unitdir}/system @@ -54,9 +54,6 @@ do_install_append () { done } -INITSCRIPT_NAME = "radvd" -INITSCRIPT_PARAMS = "defaults 20 80" - USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system --home ${localstatedir}/run/radvd/ -M -g nogroup radvd" diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch new file mode 100644 index 000000000..001d9e906 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch @@ -0,0 +1,506 @@ +From 01a44c96dbd04936e9cb2501745a834a0b09d504 Mon Sep 17 00:00:00 2001 +From: Amos Jeffries <yadij@users.noreply.github.com> +Date: Sun, 13 May 2018 06:57:41 +0000 +Subject: [PATCH] Bug 4843 pt1: ext_edirectory_userip_acl refactoring for GCC-8 + (#204) + +Proposed changes to this helper to fix strcat / strncat buffer +overread / overflow issues. + +The approach takes three parts: + +* adds a makeHexString function to replace many for-loops + catenating bits of strings together with hex conversion into a + second buffer. Replacing with a snprintf() and buffer overflow + handling. + +* a copy of Ip::Address::lookupHostIp to convert the input + string into IP address binary format, then generate the hex + string using the above new hex function instead of looped + sub-string concatenations across several buffers. + This removes all the "00" and "0000" strncat() calls and + allows far simpler code even with added buffer overflow + handling. + +* replace multiple string part concatenations with a few simpler + calls to snprintf() for all the search_ip buffer constructions. + Adding buffer overflow handling as needed for the new calls. +--- +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport + + .../ext_edirectory_userip_acl.cc | 376 ++++++------------ + 1 file changed, 120 insertions(+), 256 deletions(-) + +diff --git a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc +index 63609e4..ad16bfd 100644 +--- a/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc ++++ b/helpers/external_acl/eDirectory_userip/ext_edirectory_userip_acl.cc +@@ -67,6 +67,9 @@ + #ifdef HAVE_LDAP_H + #include <ldap.h> + #endif ++#ifdef HAVE_NETDB_H ++#include <netdb.h> ++#endif + + #ifdef HELPER_INPUT_BUFFER + #define EDUI_MAXLEN HELPER_INPUT_BUFFER +@@ -714,11 +717,14 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) + + /* Copy details - dn and pw CAN be NULL for anonymous and/or TLS */ + if (dn != NULL) { ++ if (strlen(dn) >= sizeof(l->dn)) ++ return LDAP_ERR_OOB; /* DN too large */ ++ + if ((l->basedn[0] != '\0') && (strstr(dn, l->basedn) == NULL)) { + /* We got a basedn, but it's not part of dn */ +- xstrncpy(l->dn, dn, sizeof(l->dn)); +- strncat(l->dn, ",", 1); +- strncat(l->dn, l->basedn, strlen(l->basedn)); ++ const int x = snprintf(l->dn, sizeof(l->dn)-1, "%s,%s", dn, l->basedn); ++ if (x < 0 || static_cast<size_t>(x) >= sizeof(l->dn)) ++ return LDAP_ERR_OOB; /* DN too large */ + } else + xstrncpy(l->dn, dn, sizeof(l->dn)); + } +@@ -778,24 +784,73 @@ BindLDAP(edui_ldap_t *l, char *dn, char *pw, unsigned int t) + } + } + ++// XXX: duplicate (partial) of Ip::Address::lookupHostIp ++/** ++ * Convert the IP address string representation in src to ++ * its binary representation. ++ * ++ * \return binary representation of the src IP address. ++ * Must be free'd using freeaddrinfo(). ++ */ ++static struct addrinfo * ++makeIpBinary(const char *src) ++{ ++ struct addrinfo want; ++ memset(&want, 0, sizeof(want)); ++ want.ai_flags = AI_NUMERICHOST; // prevent actual DNS lookups! ++ ++ struct addrinfo *dst = nullptr; ++ if (getaddrinfo(src, nullptr, &want, &dst) != 0) { ++ // not an IP address ++ /* free any memory getaddrinfo() dynamically allocated. */ ++ if (dst) ++ freeaddrinfo(dst); ++ return nullptr; ++ } ++ ++ return dst; ++} ++ ++/** ++ * Convert srcLen bytes from src into HEX and store into dst, which ++ * has a maximum content size of dstSize including c-string terminator. ++ * The dst value produced will be a 0-terminated c-string. ++ * ++ * \retval N length of dst written (excluding c-string terminator) ++ * \retval -11 (LDAP_ERR_OOB) buffer overflow detected ++ */ ++static int ++makeHexString(char *dst, const int dstSize, const char *src, const int srcLen) ++{ ++ // HEX encoding doubles the amount of bytes/octets copied ++ if ((srcLen*2) >= dstSize) ++ return LDAP_ERR_OOB; // cannot copy that many ++ ++ *dst = 0; ++ ++ for (int k = 0; k < srcLen; ++k) { ++ int c = static_cast<int>(src[k]); ++ if (c < 0) ++ c = c + 256; ++ char hexc[4]; ++ const int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); ++ if (hlen < 0 || static_cast<size_t>(hlen) > sizeof(hexc)) // should be impossible ++ return LDAP_ERR_OOB; ++ strcat(dst, hexc); ++ } ++ return strlen(dst); ++} ++ + /* + * ConvertIP() - <edui_ldap_t> <ip> + * + * Take an IPv4 address in dot-decimal or IPv6 notation, and convert to 2-digit HEX stored in l->search_ip + * This is the networkAddress that we search LDAP for. +- * +- * PENDING -- CHANGE OVER TO inet*_pton, but inet6_pton does not provide the correct syntax +- * + */ + static int + ConvertIP(edui_ldap_t *l, char *ip) + { +- char bufa[EDUI_MAXLEN], bufb[EDUI_MAXLEN], obj[EDUI_MAXLEN]; +- char hexc[4], *p; + void *y, *z; +- size_t s; +- long x; +- int i, j, t, swi; /* IPv6 "::" cut over toggle */ + if (l == NULL) return LDAP_ERR_NULL; + if (ip == NULL) return LDAP_ERR_PARAM; + if (!(l->status & LDAP_INIT_S)) return LDAP_ERR_INIT; /* Not initalized */ +@@ -831,183 +886,22 @@ ConvertIP(edui_ldap_t *l, char *ip) + l->status |= (LDAP_IPV4_S); + z = NULL; + } +- s = strlen(ip); +- *(bufa) = '\0'; +- *(bufb) = '\0'; +- *(obj) = '\0'; +- /* StringSplit() will zero out bufa & obj at each call */ +- memset(l->search_ip, '\0', sizeof(l->search_ip)); +- xstrncpy(bufa, ip, sizeof(bufa)); /* To avoid segfaults, use bufa instead of ip */ +- swi = 0; +- if (l->status & LDAP_IPV6_S) { +- /* Search for :: in string */ +- if ((bufa[0] == ':') && (bufa[1] == ':')) { +- /* bufa starts with a ::, so just copy and clear */ +- xstrncpy(bufb, bufa, sizeof(bufb)); +- *(bufa) = '\0'; +- ++swi; /* Indicates that there is a bufb */ +- } else if ((bufa[0] == ':') && (bufa[1] != ':')) { +- /* bufa starts with a :, a typo so just fill in a ':', cat and clear */ +- bufb[0] = ':'; +- strncat(bufb, bufa, strlen(bufa)); +- *(bufa) = '\0'; +- ++swi; /* Indicates that there is a bufb */ +- } else { +- p = strstr(bufa, "::"); +- if (p != NULL) { +- /* Found it, break bufa down and split into bufb here */ +- *(bufb) = '\0'; +- i = strlen(p); +- memcpy(bufb, p, i); +- *p = '\0'; +- bufb[i] = '\0'; +- ++swi; /* Indicates that there is a bufb */ +- } +- } +- } +- s = strlen(bufa); +- if (s < 1) +- s = strlen(bufb); +- while (s > 0) { +- if ((l->status & LDAP_IPV4_S) && (swi == 0)) { +- /* Break down IPv4 address */ +- t = StringSplit(bufa, '.', obj, sizeof(obj)); +- if (t > 0) { +- errno = 0; +- x = strtol(obj, (char **)NULL, 10); +- if (((x < 0) || (x > 255)) || ((errno != 0) && (x == 0)) || ((obj[0] != '0') && (x == 0))) +- return LDAP_ERR_OOB; /* Out of bounds -- Invalid address */ +- memset(hexc, '\0', sizeof(hexc)); +- int hlen = snprintf(hexc, sizeof(hexc), "%02X", (int)x); +- strncat(l->search_ip, hexc, hlen); +- } else +- break; /* reached end of octet */ +- } else if (l->status & LDAP_IPV6_S) { +- /* Break down IPv6 address */ +- if (swi > 1) +- t = StringSplit(bufb, ':', obj, sizeof(obj)); /* After "::" */ +- else +- t = StringSplit(bufa, ':', obj, sizeof(obj)); /* Before "::" */ +- /* Convert octet by size (t) - and fill 0's */ +- switch (t) { /* IPv6 is already in HEX, copy contents */ +- case 4: +- hexc[0] = (char) toupper((int)obj[0]); +- i = (int)hexc[0]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[1] = (char) toupper((int)obj[1]); +- i = (int)hexc[1]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[2] = '\0'; +- strncat(l->search_ip, hexc, 2); +- hexc[0] = (char) toupper((int)obj[2]); +- i = (int)hexc[0]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[1] = (char) toupper((int)obj[3]); +- i = (int)hexc[1]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[2] = '\0'; +- strncat(l->search_ip, hexc, 2); +- break; +- case 3: +- hexc[0] = '0'; +- hexc[1] = (char) toupper((int)obj[0]); +- i = (int)hexc[1]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[2] = '\0'; +- strncat(l->search_ip, hexc, 2); +- hexc[0] = (char) toupper((int)obj[1]); +- i = (int)hexc[0]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[1] = (char) toupper((int)obj[2]); +- i = (int)hexc[1]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[2] = '\0'; +- strncat(l->search_ip, hexc, 2); +- break; +- case 2: +- strncat(l->search_ip, "00", 2); +- hexc[0] = (char) toupper((int)obj[0]); +- i = (int)hexc[0]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[1] = (char) toupper((int)obj[1]); +- i = (int)hexc[1]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[2] = '\0'; +- strncat(l->search_ip, hexc, 2); +- break; +- case 1: +- strncat(l->search_ip, "00", 2); +- hexc[0] = '0'; +- hexc[1] = (char) toupper((int)obj[0]); +- i = (int)hexc[1]; +- if (!isxdigit(i)) +- return LDAP_ERR_OOB; /* Out of bounds */ +- hexc[2] = '\0'; +- strncat(l->search_ip, hexc, 2); +- break; +- default: +- if (t > 4) +- return LDAP_ERR_OOB; +- break; +- } +- /* Code to pad the address with 0's between a '::' */ +- if ((strlen(bufa) == 0) && (swi == 1)) { +- /* We are *AT* the split, pad in some 0000 */ +- t = strlen(bufb); +- /* How many ':' exist in bufb ? */ +- j = 0; +- for (i = 0; i < t; ++i) { +- if (bufb[i] == ':') +- ++j; +- } +- --j; /* Preceding "::" doesn't count */ +- t = 8 - (strlen(l->search_ip) / 4) - j; /* Remainder */ +- if (t > 0) { +- for (i = 0; i < t; ++i) +- strncat(l->search_ip, "0000", 4); +- } +- } +- } +- if ((bufa[0] == '\0') && (swi > 0)) { +- s = strlen(bufb); +- ++swi; +- } else +- s = strlen(bufa); +- } +- s = strlen(l->search_ip); + +- /* CHECK sizes of address, truncate or pad */ +- /* if "::" is at end of ip, then pad another block or two */ +- while ((l->status & LDAP_IPV6_S) && (s < 32)) { +- strncat(l->search_ip, "0000", 4); +- s = strlen(l->search_ip); +- } +- if ((l->status & LDAP_IPV6_S) && (s > 32)) { +- /* Too long, truncate */ +- l->search_ip[32] = '\0'; +- s = strlen(l->search_ip); +- } +- /* If at end of ip, and its not long enough, then pad another block or two */ +- while ((l->status & LDAP_IPV4_S) && (s < 8)) { +- strncat(l->search_ip, "00", 2); +- s = strlen(l->search_ip); +- } +- if ((l->status & LDAP_IPV4_S) && (s > 8)) { +- /* Too long, truncate */ +- l->search_ip[8] = '\0'; +- s = strlen(l->search_ip); ++ size_t s = LDAP_ERR_INVALID; ++ if (struct addrinfo *dst = makeIpBinary(ip)) { ++ if (dst->ai_family == AF_INET6) { ++ struct sockaddr_in6 *sia = reinterpret_cast<struct sockaddr_in6 *>(dst->ai_addr); ++ const char *ia = reinterpret_cast<const char *>(sia->sin6_addr.s6_addr); ++ s = makeHexString(l->search_ip, sizeof(l->search_ip), ia, 16); // IPv6 = 16-byte address ++ ++ } else if (dst->ai_family == AF_INET) { ++ struct sockaddr_in *sia = reinterpret_cast<struct sockaddr_in *>(dst->ai_addr); ++ const char *ia = reinterpret_cast<const char *>(&(sia->sin_addr)); ++ s = makeHexString(l->search_ip, sizeof(l->search_ip), ia, 4); // IPv4 = 4-byte address ++ } // else leave s with LDAP_ERR_INVALID value ++ freeaddrinfo(dst); + } + +- /* Completed, s is length of address in HEX */ + return s; + } + +@@ -1099,48 +993,42 @@ SearchFilterLDAP(edui_ldap_t *l, char *group) + } + if (group == NULL) { + /* No groupMembership= to add, yay! */ +- xstrncpy(bufa, "(&", sizeof(bufa)); +- strncat(bufa, edui_conf.search_filter, strlen(edui_conf.search_filter)); + /* networkAddress */ +- snprintf(bufb, sizeof(bufb), "(|(networkAddress=1\\23%s)", bufc); + if (l->status & LDAP_IPV4_S) { +- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s))", \ +- bufc, bufc); +- strncat(bufb, bufd, ln); ++ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s)", bufc, bufc); ++ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) ++ return LDAP_ERR_OOB; ++ + } else if (l->status & LDAP_IPV6_S) { +- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s))", \ +- bufc, bufc); +- strncat(bufb, bufd, ln); +- } else +- strncat(bufb, ")", 1); +- strncat(bufa, bufb, strlen(bufb)); +- strncat(bufa, ")", 1); ++ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s)", bufc, bufc); ++ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) ++ return LDAP_ERR_OOB; ++ } ++ const int x = snprintf(bufa, sizeof(bufa), "(&%s(|(networkAddress=1\\23%s)%s))", edui_conf.search_filter, bufc, bufd); ++ if (x < 0 || static_cast<size_t>(x) >= sizeof(bufa)) ++ return LDAP_ERR_OOB; ++ + } else { + /* Needs groupMembership= to add... */ +- xstrncpy(bufa, "(&(&", sizeof(bufa)); +- strncat(bufa, edui_conf.search_filter, strlen(edui_conf.search_filter)); + /* groupMembership -- NOTE: Squid *MUST* provide "cn=" from squid.conf */ +- snprintf(bufg, sizeof(bufg), "(groupMembership=%s", group); + if ((l->basedn[0] != '\0') && (strstr(group, l->basedn) == NULL)) { +- strncat(bufg, ",", 1); +- strncat(bufg, l->basedn, strlen(l->basedn)); ++ const int ln = snprintf(bufg, sizeof(bufg), ",%s", l->basedn); ++ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) ++ return LDAP_ERR_OOB; + } +- strncat(bufg, ")", 1); +- strncat(bufa, bufg, strlen(bufg)); + /* networkAddress */ +- snprintf(bufb, sizeof(bufb), "(|(networkAddress=1\\23%s)", bufc); + if (l->status & LDAP_IPV4_S) { +- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s))", \ +- bufc, bufc); +- strncat(bufb, bufd, ln); ++ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=8\\23\\00\\00%s)(networkAddress=9\\23\\00\\00%s)", bufc, bufc); ++ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) ++ return LDAP_ERR_OOB; + } else if (l->status & LDAP_IPV6_S) { +- int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s))", \ +- bufc, bufc); +- strncat(bufb, bufd, ln); +- } else +- strncat(bufb, ")", 1); +- strncat(bufa, bufb, strlen(bufb)); +- strncat(bufa, "))", 2); ++ const int ln = snprintf(bufd, sizeof(bufd), "(networkAddress=10\\23\\00\\00%s)(networkAddress=11\\23\\00\\00%s)", bufc, bufc); ++ if (ln < 0 || static_cast<size_t>(ln) >= sizeof(bufd)) ++ return LDAP_ERR_OOB; ++ } ++ const int x = snprintf(bufa, sizeof(bufa), "(&(&%s(groupMembership=%s%s)(|(networkAddress=1\\23%s)%s)))", edui_conf.search_filter, group, bufg, bufc, bufd); ++ if (x < 0 || static_cast<size_t>(x) >= sizeof(bufa)) ++ return LDAP_ERR_OOB; + } + s = strlen(bufa); + xstrncpy(l->search_filter, bufa, sizeof(l->search_filter)); +@@ -1212,10 +1100,10 @@ static int + SearchIPLDAP(edui_ldap_t *l) + { + ber_len_t i, x; +- ber_len_t j, k; +- ber_len_t y, z; +- int c; +- char bufa[EDUI_MAXLEN], bufb[EDUI_MAXLEN], hexc[4]; ++ ber_len_t j; ++ ber_len_t z; ++ char bufa[EDUI_MAXLEN]; ++ char bufb[EDUI_MAXLEN]; + LDAPMessage *ent; + if (l == NULL) return LDAP_ERR_NULL; + if (l->lp == NULL) return LDAP_ERR_POINTER; +@@ -1273,19 +1161,11 @@ SearchIPLDAP(edui_ldap_t *l) + /* bufa is the address, just compare it */ + if (!(l->status & LDAP_IPV4_S) || (l->status & LDAP_IPV6_S)) + break; /* Not looking for IPv4 */ +- for (k = 0; k < z; ++k) { +- c = (int) bufa[k]; +- if (c < 0) +- c = c + 256; +- int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); +- if (k == 0) +- xstrncpy(bufb, hexc, sizeof(bufb)); +- else +- strncat(bufb, hexc, hlen); +- } +- y = strlen(bufb); ++ const int blen = makeHexString(bufb, sizeof(bufb), bufa, z); ++ if (blen < 0) ++ return blen; + /* Compare value with IP */ +- if (memcmp(l->search_ip, bufb, y) == 0) { ++ if (memcmp(l->search_ip, bufb, blen) == 0) { + /* We got a match! - Scan 'ber' for 'cn' values */ + z = ldap_count_values_len(ber); + for (j = 0; j < z; ++j) { +@@ -1308,19 +1188,11 @@ SearchIPLDAP(edui_ldap_t *l) + /* bufa + 2 is the address (skip 2 digit port) */ + if (!(l->status & LDAP_IPV4_S) || (l->status & LDAP_IPV6_S)) + break; /* Not looking for IPv4 */ +- for (k = 2; k < z; ++k) { +- c = (int) bufa[k]; +- if (c < 0) +- c = c + 256; +- int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); +- if (k == 2) +- xstrncpy(bufb, hexc, sizeof(bufb)); +- else +- strncat(bufb, hexc, hlen); +- } +- y = strlen(bufb); ++ const int blen = makeHexString(bufb, sizeof(bufb), &bufa[2], z); ++ if (blen < 0) ++ return blen; + /* Compare value with IP */ +- if (memcmp(l->search_ip, bufb, y) == 0) { ++ if (memcmp(l->search_ip, bufb, blen) == 0) { + /* We got a match! - Scan 'ber' for 'cn' values */ + z = ldap_count_values_len(ber); + for (j = 0; j < z; ++j) { +@@ -1343,19 +1215,11 @@ SearchIPLDAP(edui_ldap_t *l) + /* bufa + 2 is the address (skip 2 digit port) */ + if (!(l->status & LDAP_IPV6_S)) + break; /* Not looking for IPv6 */ +- for (k = 2; k < z; ++k) { +- c = (int) bufa[k]; +- if (c < 0) +- c = c + 256; +- int hlen = snprintf(hexc, sizeof(hexc), "%02X", c); +- if (k == 2) +- xstrncpy(bufb, hexc, sizeof(bufb)); +- else +- strncat(bufb, hexc, hlen); +- } +- y = strlen(bufb); ++ const int blen = makeHexString(bufb, sizeof(bufb), &bufa[2], z); ++ if (blen < 0) ++ return blen; + /* Compare value with IP */ +- if (memcmp(l->search_ip, bufb, y) == 0) { ++ if (memcmp(l->search_ip, bufb, blen) == 0) { + /* We got a match! - Scan 'ber' for 'cn' values */ + z = ldap_count_values_len(ber); + for (j = 0; j < z; ++j) { diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch deleted file mode 100644 index f482f8088..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 27e10667bf27baf5f119a791e3473bb9435a786a Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 23 Apr 2017 10:28:28 -0700 -Subject: [PATCH] SquidNew: use noexcept instead of throw for C++11 compilers - -Fixes errors with gcc7 which is more pedantic about c++11 -conformance regarding deprecated features - -include/SquidNew.h:21:51: error: dynamic exception specifications are deprecated in C++11 -_SQUID_EXTERNNEW_ void *operator new[] (size_t size) throw (std::bad_alloc) - ^~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - include/SquidNew.h | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/SquidNew.h b/include/SquidNew.h -index 39fcee0..c960347 100644 ---- a/include/SquidNew.h -+++ b/include/SquidNew.h -@@ -18,19 +18,19 @@ - */ - #include <new> - --_SQUID_EXTERNNEW_ void *operator new(size_t size) throw (std::bad_alloc) -+_SQUID_EXTERNNEW_ void *operator new(size_t size) noexcept(false) - { - return xmalloc(size); - } --_SQUID_EXTERNNEW_ void operator delete (void *address) throw() -+_SQUID_EXTERNNEW_ void operator delete (void *address) noexcept(true) - { - xfree(address); - } --_SQUID_EXTERNNEW_ void *operator new[] (size_t size) throw (std::bad_alloc) -+_SQUID_EXTERNNEW_ void *operator new[] (size_t size) noexcept(false) - { - return xmalloc(size); - } --_SQUID_EXTERNNEW_ void operator delete[] (void *address) throw() -+_SQUID_EXTERNNEW_ void operator delete[] (void *address) noexcept(true) - { - xfree(address); - } diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-smblib-fix-buffer-over-read.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-smblib-fix-buffer-over-read.patch new file mode 100644 index 000000000..c8f0c47bd --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/files/0002-smblib-fix-buffer-over-read.patch @@ -0,0 +1,39 @@ +From a6b1e0fd14311587186e40d09bff5c8c3aada2e4 Mon Sep 17 00:00:00 2001 +From: Amos Jeffries <squid3@treenet.co.nz> +Date: Sat, 25 Jul 2015 05:53:16 -0700 +Subject: [PATCH] smblib: fix buffer over-read + +When parsing SMB LanManager packets with invalid protocol ID and the +default set of Squid supported protocols. It may access memory outside +the buffer storing protocol names. + +smblib is only used by already deprecated helpers which are deprecated +due to far more significant NTLM protocol issues. It will also only +result in packets being rejected later with invalid protocol names. So +this is a minor bug rather than a vulnerability. + + Detected by Coverity Scan. Issue 1256165 +--- +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Backport + + lib/smblib/smblib-util.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/lib/smblib/smblib-util.c b/lib/smblib/smblib-util.c +index 6139ae2..e722cbb 100644 +--- a/lib/smblib/smblib-util.c ++++ b/lib/smblib/smblib-util.c +@@ -204,7 +204,11 @@ int SMB_Figure_Protocol(const char *dialects[], int prot_index) + { + int i; + +- if (dialects == SMB_Prots) { /* The jobs is easy, just index into table */ ++ // prot_index may be a value outside the table SMB_Types[] ++ // which holds data at offsets 0 to 11 ++ int ourType = (prot_index < 0 || prot_index > 11); ++ ++ if (ourType && dialects == SMB_Prots) { /* The jobs is easy, just index into table */ + + return(SMB_Types[prot_index]); + } else { /* Search through SMB_Prots looking for a match */ diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch b/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch deleted file mode 100644 index 2feca4986..000000000 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/files/gcc7-fixes.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 660fce9cfa00a57e5b7cec46116a31e21595c306 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 19 Jun 2017 23:47:01 -0700 -Subject: [PATCH] squid: Upgrade to 3.5.26 - -../../squid-3.5.26/src/DiskIO/DiskThreads/aiops.cc: In function 'void squidaio_init()': ../../squid-3.5.26/src/DiskIO/DiskThreads/DiskThreads.h:30:50: error: '*' in boolean context, suggest '&&' instead [-Werror=int-in-bool-context] #define NUMTHREADS (Config.cacheSwap.n_configured*16) - -Upstream-Status: Backport - ---- - src/DiskIO/DiskThreads/aiops.cc | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc -index b44adfa..e11f948 100644 ---- a/src/DiskIO/DiskThreads/aiops.cc -+++ b/src/DiskIO/DiskThreads/aiops.cc -@@ -290,7 +290,7 @@ squidaio_init(void) - /* Create threads and get them to sit in their wait loop */ - squidaio_thread_pool = memPoolCreate("aio_thread", sizeof(squidaio_thread_t)); - -- assert(NUMTHREADS); -+ assert(NUMTHREADS != 0); - - for (i = 0; i < NUMTHREADS; ++i) { - threadp = (squidaio_thread_t *)squidaio_thread_pool->alloc(); diff --git a/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.26.bb b/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.27.bb index 3ee96abb7..1557c4b2d 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.26.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/squid/squid_3.5.27.bb @@ -21,16 +21,16 @@ SRC_URI = "http://www.squid-cache.org/Versions/v${MAJ_VER}/${MIN_VER}/${BPN}-${P file://volatiles.03_squid \ file://set_sysroot_patch.patch \ file://squid-don-t-do-squid-conf-tests-at-build-time.patch \ - file://0001-SquidNew-use-noexcept-instead-of-throw-for-C-11-comp.patch \ file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch \ - file://gcc7-fixes.patch \ file://0001-tools.cc-fixed-unused-result-warning.patch \ + file://0001-Bug-4843-pt1-ext_edirectory_userip_acl-refactoring-f.patch \ + file://0002-smblib-fix-buffer-over-read.patch \ " SRC_URI_remove_toolchain-clang = "file://0001-configure-Check-for-Wno-error-format-truncation-comp.patch" -SRC_URI[md5sum] = "dc1830cd361e077814aa39bcc3691d8b" -SRC_URI[sha256sum] = "41d8845863dcd026c856508cd1599d417c8947ffd96e86e24085f9893cb8b8c2" +SRC_URI[md5sum] = "c17a3ed3a40cd59c23f48b8539dafcd8" +SRC_URI[sha256sum] = "467da134eaf0f7962ba5881793d106772fb05fefa4aea7d9569eec0412c52433" LIC_FILES_CHKSUM = "file://COPYING;md5=c492e2d6d32ec5c1aad0e0609a141ce9 \ file://errors/COPYRIGHT;md5=8861130fae91400bcf99b66f133172b3 \ @@ -50,6 +50,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('TARGET_ARCH', 'powerpc', 'noatomics', ' PACKAGECONFIG[libnetfilter-conntrack] = "--with-netfilter-conntrack=${includedir}, --without-netfilter-conntrack, libnetfilter-conntrack" PACKAGECONFIG[noatomics] = "squid_cv_gnu_atomics=no,squid_cv_gnu_atomics=yes,," PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," +PACKAGECONFIG[werror] = "--enable-strict-error-checking,--disable-strict-error-checking," BASIC_AUTH = "DB SASL LDAP" diff --git a/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb b/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb index d7b1dfaad..a51a8c31c 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/vblade/vblade_22.bb @@ -16,6 +16,8 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/aoetools/${BP}.tar.gz \ SRC_URI[md5sum] = "510d98ba0f231284a5fbe2da11cb2d6e" SRC_URI[sha256sum] = "a990378f273f10eb431e42954a871aed52714035bbab28c54cef600c458356bb" +UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/aoetools/files/vblade/" + inherit autotools-brokensep update-rc.d systemd do_install() { diff --git a/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb b/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb index 7a2035601..2e3e0e884 100644 --- a/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb +++ b/meta-openembedded/meta-networking/recipes-daemons/vsftpd/vsftpd_3.0.3.bb @@ -24,6 +24,9 @@ SRC_URI = "https://security.appspot.com/downloads/vsftpd-${PV}.tar.gz \ file://0001-sysdeputil.c-Fix-with-musl-which-does-not-have-utmpx.patch \ " +UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/v/vsftpd/" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)\.orig\.tar" + LIC_FILES_CHKSUM = "file://COPYING;md5=a6067ad950b28336613aed9dd47b1271 \ file://COPYRIGHT;md5=04251b2eb0f298dae376d92454f6f72e \ file://LICENSE;md5=654df2042d44b8cac8a5654fc5be63eb" @@ -44,7 +47,7 @@ inherit update-rc.d useradd systemd CONFFILES_${PN} = "${sysconfdir}/vsftpd.conf" LDFLAGS_append =" -lcrypt -lcap" - +CFLAGS_append_libc-musl = " -D_GNU_SOURCE -include fcntl.h" EXTRA_OEMAKE = "-e MAKEFLAGS=" do_configure() { |