From 2552c8e916da4fee1195a9af9c109ebd820f4aaf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 20 Dec 2018 15:08:06 -0800 Subject: opensaf: Upgrade to 5.18.09 Degrade certain Werror into warnings to get it building with gcc >= 8 Signed-off-by: Khem Raj --- .../0001-Fix-string-overflow-in-snprintf.patch | 12 ++-- .../recipes-daemons/opensaf/opensaf_5.18.04.bb | 74 --------------------- .../recipes-daemons/opensaf/opensaf_5.18.09.bb | 75 ++++++++++++++++++++++ 3 files changed, 81 insertions(+), 80 deletions(-) delete mode 100644 meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb create mode 100644 meta-networking/recipes-daemons/opensaf/opensaf_5.18.09.bb (limited to 'meta-networking') diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch index db6796d05d..93c75777fe 100644 --- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch +++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Fix-string-overflow-in-snprintf.patch @@ -1,4 +1,4 @@ -From ae7178a78aba2e5766b70191617113487fd7ad0b Mon Sep 17 00:00:00 2001 +From 88661a60629894353512c53ed32f2b901f64149c Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 16 Apr 2018 18:29:17 -0700 Subject: [PATCH] Fix string overflow in snprintf @@ -53,7 +53,7 @@ index 81e521e..d53cc48 100644 TRACE_ENTER(); diff --git a/src/smf/smfd/SmfUpgradeCampaign.cc b/src/smf/smfd/SmfUpgradeCampaign.cc -index 45cdce8..6761bcf 100644 +index c30ea14..098f17a 100644 --- a/src/smf/smfd/SmfUpgradeCampaign.cc +++ b/src/smf/smfd/SmfUpgradeCampaign.cc @@ -447,7 +447,7 @@ SaAisErrorT SmfUpgradeCampaign::tooManyRestarts(bool *o_result) { @@ -66,11 +66,11 @@ index 45cdce8..6761bcf 100644 /* 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"); + attrsmfCampRestartCnt.SetAttributeName("smfCampRestartCnt"); + attrsmfCampRestartCnt.SetAttributeType("SA_IMM_ATTR_SAUINT32T"); char buf[5]; - snprintf(buf, 4, "%d", curCnt); + snprintf(buf, 4, "%hd", curCnt); - attrsmfCampRestartCnt.addValue(buf); - imoCampRestartInfo.addValue(attrsmfCampRestartCnt); + attrsmfCampRestartCnt.AddAttributeValue(buf); + imoCampRestartInfo.AddValue(attrsmfCampRestartCnt); diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb deleted file mode 100644 index c534c6206b..0000000000 --- a/meta-networking/recipes-daemons/opensaf/opensaf_5.18.04.bb +++ /dev/null @@ -1,74 +0,0 @@ -SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification" -DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \ -middleware consistent with Service Availability Forum (SA Forum) \ -specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \ -established by leading Communications and Enterprise Computing Companies to \ -facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \ -code base in commercial products. \ -The OpenSAF project was launched in mid 2007 and has been under development by \ -an informal group of supporters of the OpenSAF initiative. The OpenSAF \ -Foundation was founded on January 22nd 2008 with Emerson Network Power, \ -Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members." -HOMEPAGE = "http://www.opensaf.org" -SECTION = "admin" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" - -DEPENDS = "libxml2 python" -TOOLCHAIN = "gcc" - -SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" - -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ - file://0001-configure-Pass-linker-specific-options-with-Wl.patch \ - 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 \ - 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 - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "-f -r opensaf" -USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" - -SYSTEMD_SERVICE_${PN} += "opensafd.service" -SYSTEMD_AUTO_ENABLE = "disable" - -PACKAGECONFIG[systemd] = ",,systemd" -PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi" -PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi" - -PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" - -PKGLIBDIR="${libdir}" - -LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" - -do_install_append() { - cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir} - rm -fr "${D}${localstatedir}/lock" - rm -fr "${D}${localstatedir}/run" - rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" - rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" - if [ ! -d "${D}${sysconfdir}/init.d" ]; then - install -d ${D}${sysconfdir}/init.d - install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/ - fi -} - -FILES_${PN} += "${systemd_unitdir}/system/*.service" -FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a" - -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-networking/recipes-daemons/opensaf/opensaf_5.18.09.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.18.09.bb new file mode 100644 index 0000000000..f1aedc4def --- /dev/null +++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.18.09.bb @@ -0,0 +1,75 @@ +SUMMARY = "OpenSAF is an open source implementation of the SAF AIS specification" +DESCRIPTION = "OpenSAF is an open source project established to develop a base platform \ +middleware consistent with Service Availability Forum (SA Forum) \ +specifications, under the LGPLv2.1 license. The OpenSAF Foundation was \ +established by leading Communications and Enterprise Computing Companies to \ +facilitate the OpenSAF Project and to accelerate the adoption of the OpenSAF \ +code base in commercial products. \ +The OpenSAF project was launched in mid 2007 and has been under development by \ +an informal group of supporters of the OpenSAF initiative. The OpenSAF \ +Foundation was founded on January 22nd 2008 with Emerson Network Power, \ +Ericsson, Nokia Siemens Networks, HP and Sun Microsystems as founding members." +HOMEPAGE = "http://www.opensaf.org" +SECTION = "admin" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" + +DEPENDS = "libxml2 python" +TOOLCHAIN = "gcc" + +SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ + file://0001-configure-Pass-linker-specific-options-with-Wl.patch \ + 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 \ + 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] = "45044fde0b35eac057a5fa05c27b8040" +SRC_URI[sha256sum] = "230a0ea628ba278170a913746c39b2c8cd529d7dc25326b2e17b5c095cf94025" + +inherit autotools useradd systemd pkgconfig + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "-f -r opensaf" +USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" + +SYSTEMD_SERVICE_${PN} += "opensafd.service" +SYSTEMD_AUTO_ENABLE = "disable" + +PACKAGECONFIG[systemd] = ",,systemd" +PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03,,openhpi" +PACKAGECONFIG[plm] = "--enable-ais-plm,--disable-ais-plm,libvirt openhpi" + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" + +PKGLIBDIR="${libdir}" +CPPFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation" +CXXFLAGS += "-Wno-error=stringop-overflow= -Wno-error=stringop-truncation -Wno-error=format-truncation=" +LDFLAGS += "-Wl,--as-needed -latomic -Wl,--no-as-needed" + +do_install_append() { + cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir} + rm -fr "${D}${localstatedir}/lock" + rm -fr "${D}${localstatedir}/run" + rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" + rmdir --ignore-fail-on-non-empty "${D}${datadir}/java" + if [ ! -d "${D}${sysconfdir}/init.d" ]; then + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/ + fi +} + +FILES_${PN} += "${systemd_unitdir}/system/*.service" +FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a" + +INSANE_SKIP_${PN} = "dev-so" + +RDEPENDS_${PN} += "bash python" + +# http://errors.yoctoproject.org/Errors/Details/186970/ +EXCLUDE_FROM_WORLD_libc-musl = "1" -- cgit 1.2.3-korg