diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /meta-openembedded/meta-networking/recipes-daemons/opensaf | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-daemons/opensaf')
5 files changed, 375 insertions, 0 deletions
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 new file mode 100644 index 000000000..effe25c85 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch @@ -0,0 +1,123 @@ +From ab00d6f5793b2d850f975bcb6d5d0aa6d7a9eaa4 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 +++++++++++++++++++++++++++++++++++++++++++++ + 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 +@@ -52,10 +52,10 @@ AM_CPPFLAGS = \ + -pthread \ + -D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \ + $(CORE_INCLUDES) \ +- $(all_includes) ++ $(all_includes) @NOWARNINGS@ + +-AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror +-AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror ++AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@ ++AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@ + + 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 + fi + AC_SUBST(OSAF_HARDEN_FLAGS) + ++AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow]) ++AC_SUBST(NOWARNINGS) + ############################################# + # List the output Makefiles + ############################################# +Index: opensaf-5.18.02/m4/ax_check_compile_flag.m4 +=================================================================== +--- /dev/null ++++ opensaf-5.18.02/m4/ax_check_compile_flag.m4 +@@ -0,0 +1,74 @@ ++# =========================================================================== ++# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html ++# =========================================================================== ++# ++# SYNOPSIS ++# ++# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) ++# ++# DESCRIPTION ++# ++# Check whether the given FLAG works with the current language's compiler ++# or gives an error. (Warnings, however, are ignored) ++# ++# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on ++# success/failure. ++# ++# If EXTRA-FLAGS is defined, it is added to the current language's default ++# flags (e.g. CFLAGS) when the check is done. The check is thus made with ++# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to ++# force the compiler to issue an error when a bad flag is given. ++# ++# INPUT gives an alternative input source to AC_COMPILE_IFELSE. ++# ++# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this ++# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. ++# ++# LICENSE ++# ++# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> ++# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com> ++# ++# This program is free software: you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation, either version 3 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General ++# Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program. If not, see <https://www.gnu.org/licenses/>. ++# ++# As a special exception, the respective Autoconf Macro's copyright owner ++# gives unlimited permission to copy, distribute and modify the configure ++# scripts that are the output of Autoconf when processing the Macro. You ++# need not follow the terms of the GNU General Public License when using ++# or distributing such scripts, even though portions of the text of the ++# Macro appear in them. The GNU General Public License (GPL) does govern ++# all other use of the material that constitutes the Autoconf Macro. ++# ++# This special exception to the GPL applies to versions of the Autoconf ++# Macro released by the Autoconf Archive. When you make and distribute a ++# modified version of the Autoconf Macro, you may extend this special ++# exception to the GPL to apply to your modified version as well. ++ ++#serial 5 ++ ++AC_DEFUN([AX_CHECK_COMPILE_FLAG], ++[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF ++AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl ++AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ++ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS ++ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" ++ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], ++ [AS_VAR_SET(CACHEVAR,[yes])], ++ [AS_VAR_SET(CACHEVAR,[no])]) ++ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) ++AS_VAR_IF(CACHEVAR,yes, ++ [m4_default([$2], :)], ++ [m4_default([$3], :)]) ++AS_VAR_POPDEF([CACHEVAR])dnl ++])dnl AX_CHECK_COMPILE_FLAGS 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 new file mode 100644 index 000000000..5756a027b --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch @@ -0,0 +1,29 @@ +From 6248b717b4861d16b80235fd8e57d64e4f636428 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 + +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 +--- a/configure.ac ++++ b/configure.ac +@@ -553,7 +553,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then + if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then + OSAF_HARDEN_FLAGS="" + fi +- OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -zrelro -znow" ++ OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now" + 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 new file mode 100644 index 000000000..76c47c658 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-immpbe_dump.cc-Use-sys-wait.h-instead-of-wait.h.patch @@ -0,0 +1,34 @@ +From 508ea7c0d67243feb1684eaa83569cb687561d64 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 + +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 +--- a/src/imm/common/immpbe_dump.cc ++++ b/src/imm/common/immpbe_dump.cc +@@ -26,12 +26,12 @@ + #include <stdlib.h> + #include <stdio.h> + #include <time.h> +-#include <wait.h> + #include <unistd.h> + #include <iostream> + #include <sstream> + #include <stdint.h> + #include <sys/stat.h> ++#include <sys/wait.h> + #include <libgen.h> + + #include <saAis.h> +-- +2.14.1 + 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 new file mode 100644 index 000000000..4a2a825f9 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf/0001-src-Add-missing-header-limits.h-for-_POSIX_HOST_NAME.patch @@ -0,0 +1,122 @@ +From 6442b57a855e273aa5a3d93e8596783cea128073 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 + +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 - + src/mds/mds_dt_tcp_disc.h | 2 +- + src/mds/mds_dt_tipc.c | 1 - + src/mds/mds_dt_tipc.h | 2 +- + src/mds/mds_dt_trans.c | 1 - + src/ntf/ntfd/NtfLogger.cc | 2 +- + 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 +--- a/src/base/os_defs.h ++++ b/src/base/os_defs.h +@@ -47,17 +47,18 @@ + #include <sys/stat.h> + #include <sys/msg.h> /* Added for message-queues : PM : 28/10/03 */ + #include <syslog.h> +-#ifndef __USE_GNU ++#include <limits.h> ++#ifndef _GNU_SOURCE + struct msgbuf { + long int mtype; + char mtext[1]; + }; + #endif /* else defined in <sys/msg.h> */ + #include <sys/time.h> +-#include <sys/fcntl.h> + #include <sys/socket.h> + #include <netinet/in.h> + ++#include <fcntl.h> + #include <signal.h> + #include <pthread.h> + +diff --git a/src/mds/mds_dt_tcp.c b/src/mds/mds_dt_tcp.c +index 1407eb1ab..a87c22faa 100644 +--- a/src/mds/mds_dt_tcp.c ++++ b/src/mds/mds_dt_tcp.c +@@ -27,7 +27,6 @@ + + #include <stdlib.h> + #include <sched.h> +-#include <sys/poll.h> + #include <poll.h> + #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 +--- a/src/mds/mds_dt_tcp_disc.h ++++ b/src/mds/mds_dt_tcp_disc.h +@@ -24,7 +24,7 @@ + #include "base/ncssysf_tsk.h" + #include "base/ncssysf_mem.h" + #include "mds_dt_tcp_disc.h" +-#include "sys/poll.h" ++#include <poll.h> + + /* 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 +--- a/src/mds/mds_dt_tipc.c ++++ b/src/mds/mds_dt_tipc.c +@@ -35,7 +35,6 @@ + #include <stdbool.h> + #include <stdlib.h> + #include <sched.h> +-#include <sys/poll.h> + #include <poll.h> + #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 +--- a/src/mds/mds_dt_tipc.h ++++ b/src/mds/mds_dt_tipc.h +@@ -32,7 +32,7 @@ + #include <assert.h> + #include <string.h> + #include <sys/param.h> +-#include <sys/poll.h> ++#include <poll.h> + #include <netdb.h> + #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 +--- a/src/mds/mds_dt_trans.c ++++ b/src/mds/mds_dt_trans.c +@@ -26,7 +26,6 @@ + #include "mds_core.h" + #include "base/osaf_utility.h" + +-#include <sys/poll.h> + #include <poll.h> + + #define MDS_PROT_TCP 0xA0 +diff --git a/src/ntf/ntfd/NtfLogger.cc b/src/ntf/ntfd/NtfLogger.cc +index 84014b578..31b1ccc6c 100644 +--- a/src/ntf/ntfd/NtfLogger.cc ++++ b/src/ntf/ntfd/NtfLogger.cc +@@ -20,7 +20,7 @@ + * INCLUDE FILES + * ======================================================================== + */ +-#include <sys/poll.h> ++#include <poll.h> + + #include "base/osaf_utility.h" + #include <saAis.h> +-- +2.14.1 + 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.02.bb new file mode 100644 index 000000000..4b556ce8c --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-daemons/opensaf/opensaf_5.18.02.bb @@ -0,0 +1,67 @@ +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 \ +" +SRC_URI[md5sum] = "42064f5ddbc7f560bfc5ff93ea9eecc7" +SRC_URI[sha256sum] = "f9e24897f9cfd63bb3115f6275c706de1702d3d9bae2fc423227db72b23c37f0" + +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 --enable-ais-plm,,openhpi" + +PACKAGECONFIG_append = "${@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" + |