summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-04-25 17:27:35 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-04-27 12:02:12 -0400
commitbe327baf0e5d9db51787efba73d948d5002e9c6e (patch)
tree22e5c58ed637c4b3879034dc47524488e29abdf9 /meta-networking
parent26c812ece4120271a786a55abef463f9f65a25ad (diff)
downloadmeta-openembedded-be327baf0e5d9db51787efba73d948d5002e9c6e.tar.gz
opensaf: Upgrade to 5.2.0
Fix build with gcc7 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch43
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch127
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch29
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch43
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch11
-rw-r--r--meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb (renamed from meta-networking/recipes-daemons/opensaf/opensaf_5.0.0.bb)37
6 files changed, 215 insertions, 75 deletions
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch
new file mode 100644
index 000000000..1c88b81cd
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-Remove-unused-variables.patch
@@ -0,0 +1,43 @@
1From a441a75fbb8451268a8a57616c7158cddc1823aa Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 22 Apr 2017 12:40:19 -0700
4Subject: [PATCH] Remove unused variables
5
6Fixes build errors with gcc7 e.g.
7
8../opensaf-5.2.0/src/amf/amfd/imm.cc: In member function 'bool ImmObjCreate::immobj_update_required()':
9../opensaf-5.2.0/src/amf/amfd/imm.cc:2174:28: error: unused variable 'pos' [-Werror=unused-variable]
10 std::string::size_type pos;
11 ^~~
12../opensaf-5.2.0/src/amf/amfd/imm.cc:2215:28: error: unused variable 'pos' [-Werror=unused-variable]
13 std::string::size_type pos;
14 ^~~
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 src/amf/amfd/imm.cc | 2 --
19 1 file changed, 2 deletions(-)
20
21diff --git a/src/amf/amfd/imm.cc b/src/amf/amfd/imm.cc
22index 7932364..4f47b65 100644
23--- a/src/amf/amfd/imm.cc
24+++ b/src/amf/amfd/imm.cc
25@@ -2171,7 +2171,6 @@ bool ImmObjCreate::immobj_update_required() {
26 if (class_type == AVSV_SA_AMF_SI_ASSIGNMENT) {
27 std::string su_name;
28 std::string sisu_name;
29- std::string::size_type pos;
30 while ((attribute = attrValues_[i++]) != nullptr) {
31 if (!strcmp(attribute->attrName, "safSISU")) {
32 sisu_name = Amf::to_string(
33@@ -2212,7 +2211,6 @@ bool ImmObjCreate::immobj_update_required() {
34 } else if (class_type == AVSV_SA_AMF_CSI_ASSIGNMENT) {
35 std::string comp_name;
36 std::string csicomp_name;
37- std::string::size_type pos;
38 AVD_CSI *csi = nullptr;
39 AVD_COMP *comp = nullptr;
40 AVD_COMP_CSI_REL *compcsi = nullptr;
41--
422.12.2
43
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
new file mode 100644
index 000000000..512e246c5
--- /dev/null
+++ b/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Disable-format-overflow-if-supported-by-gc.patch
@@ -0,0 +1,127 @@
1From ab00d6f5793b2d850f975bcb6d5d0aa6d7a9eaa4 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 22 Apr 2017 12:34:37 -0700
4Subject: [PATCH] configure: Disable format-overflow if supported by gcc
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8 Makefile.am | 6 ++--
9 configure.ac | 2 ++
10 m4/ax_check_compile_flag.m4 | 74 +++++++++++++++++++++++++++++++++++++++++++++
11 3 files changed, 79 insertions(+), 3 deletions(-)
12 create mode 100644 m4/ax_check_compile_flag.m4
13
14diff --git a/Makefile.am b/Makefile.am
15index d63fbbb..1012a2c 100644
16--- a/Makefile.am
17+++ b/Makefile.am
18@@ -52,10 +52,10 @@ AM_CPPFLAGS = \
19 -pthread \
20 -D_GNU_SOURCE -DINTERNAL_VERSION_ID='"@INTERNAL_VERSION_ID@"' \
21 $(CORE_INCLUDES) \
22- $(all_includes)
23+ $(all_includes) @NOWARNINGS@
24
25-AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
26-AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror
27+AM_CFLAGS = -pipe -std=gnu11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
28+AM_CXXFLAGS = -pipe -std=gnu++11 @OSAF_HARDEN_FLAGS@ -Wall -Wformat=2 -Werror @NOWARNINGS@
29 AM_LDFLAGS = @OSAF_HARDEN_FLAGS@ -Wl,--as-needed -ldl -lrt -pthread -rdynamic
30 ACLOCAL_AMFLAGS = -I m4
31 OSAF_LIB_FLAGS =
32diff --git a/configure.ac b/configure.ac
33index 02771c6..b76b0fe 100644
34--- a/configure.ac
35+++ b/configure.ac
36@@ -557,6 +557,8 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
37 fi
38 AC_SUBST(OSAF_HARDEN_FLAGS)
39
40+AX_CHECK_COMPILE_FLAG([-Werror=format-overflow],[NOWARNINGS=-Wno-error=format-overflow])
41+AC_SUBST(NOWARNINGS)
42 #############################################
43 # List the output Makefiles
44 #############################################
45diff --git a/m4/ax_check_compile_flag.m4 b/m4/ax_check_compile_flag.m4
46new file mode 100644
47index 0000000..dcabb92
48--- /dev/null
49+++ b/m4/ax_check_compile_flag.m4
50@@ -0,0 +1,74 @@
51+# ===========================================================================
52+# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html
53+# ===========================================================================
54+#
55+# SYNOPSIS
56+#
57+# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT])
58+#
59+# DESCRIPTION
60+#
61+# Check whether the given FLAG works with the current language's compiler
62+# or gives an error. (Warnings, however, are ignored)
63+#
64+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
65+# success/failure.
66+#
67+# If EXTRA-FLAGS is defined, it is added to the current language's default
68+# flags (e.g. CFLAGS) when the check is done. The check is thus made with
69+# the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to
70+# force the compiler to issue an error when a bad flag is given.
71+#
72+# INPUT gives an alternative input source to AC_COMPILE_IFELSE.
73+#
74+# NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this
75+# macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG.
76+#
77+# LICENSE
78+#
79+# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
80+# Copyright (c) 2011 Maarten Bosmans <mkbosmans@gmail.com>
81+#
82+# This program is free software: you can redistribute it and/or modify it
83+# under the terms of the GNU General Public License as published by the
84+# Free Software Foundation, either version 3 of the License, or (at your
85+# option) any later version.
86+#
87+# This program is distributed in the hope that it will be useful, but
88+# WITHOUT ANY WARRANTY; without even the implied warranty of
89+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
90+# Public License for more details.
91+#
92+# You should have received a copy of the GNU General Public License along
93+# with this program. If not, see <https://www.gnu.org/licenses/>.
94+#
95+# As a special exception, the respective Autoconf Macro's copyright owner
96+# gives unlimited permission to copy, distribute and modify the configure
97+# scripts that are the output of Autoconf when processing the Macro. You
98+# need not follow the terms of the GNU General Public License when using
99+# or distributing such scripts, even though portions of the text of the
100+# Macro appear in them. The GNU General Public License (GPL) does govern
101+# all other use of the material that constitutes the Autoconf Macro.
102+#
103+# This special exception to the GPL applies to versions of the Autoconf
104+# Macro released by the Autoconf Archive. When you make and distribute a
105+# modified version of the Autoconf Macro, you may extend this special
106+# exception to the GPL to apply to your modified version as well.
107+
108+#serial 5
109+
110+AC_DEFUN([AX_CHECK_COMPILE_FLAG],
111+[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF
112+AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl
113+AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [
114+ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS
115+ _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1"
116+ AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])],
117+ [AS_VAR_SET(CACHEVAR,[yes])],
118+ [AS_VAR_SET(CACHEVAR,[no])])
119+ _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags])
120+AS_VAR_IF(CACHEVAR,yes,
121+ [m4_default([$2], :)],
122+ [m4_default([$3], :)])
123+AS_VAR_POPDEF([CACHEVAR])dnl
124+])dnl AX_CHECK_COMPILE_FLAGS
125--
1262.12.2
127
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch b/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-networking/recipes-daemons/opensaf/opensaf/0001-configure-Pass-linker-specific-options-with-Wl.patch
@@ -0,0 +1,29 @@
1From 6248b717b4861d16b80235fd8e57d64e4f636428 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 13 Apr 2017 17:39:07 -0700
4Subject: [PATCH] configure: Pass linker specific options with -Wl
5
6This helps make it pass the options to linker correctly
7and we can use non-gcc compilers
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 configure.ac | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/configure.ac b/configure.ac
15index df4fc58..02771c6 100644
16--- a/configure.ac
17+++ b/configure.ac
18@@ -553,7 +553,7 @@ if test -z "$OSAF_HARDEN_FLAGS"; then
19 if echo "${CFLAGS} ${CXXFLAGS}" | grep -q -- -O0; then
20 OSAF_HARDEN_FLAGS=""
21 fi
22- OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -zrelro -znow"
23+ OSAF_HARDEN_FLAGS="${OSAF_HARDEN_FLAGS} -fstack-protector --param ssp-buffer-size=4 -fPIE -pie -Wl,-z,relro,-z,now"
24 fi
25 AC_SUBST(OSAF_HARDEN_FLAGS)
26
27--
282.12.2
29
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch b/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
deleted file mode 100644
index 624cd2d7b..000000000
--- a/meta-networking/recipes-daemons/opensaf/opensaf/0001-plmcd-error-fix.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From f1813af4c154fb1d3950abbdf678c3a5a67222fc Mon Sep 17 00:00:00 2001
2From: Li xin <lixin.fnst@cn.fujitsu.com>
3Date: Thu, 25 Jun 2015 11:44:27 +0900
4Subject: [PATCH] plmcd: error fix
5
6ld: cannot find -lsystemd-daemon
7collect2: error: ld returned 1 exit status
8
9Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
10---
11 contrib/plmc/plmcd/Makefile.am | 2 +-
12 contrib/plmc/plmcd/Makefile.in | 2 +-
13 2 files changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/contrib/plmc/plmcd/Makefile.am b/contrib/plmc/plmcd/Makefile.am
16index 8d847f2..dd7913a 100644
17--- a/contrib/plmc/plmcd/Makefile.am
18+++ b/contrib/plmc/plmcd/Makefile.am
19@@ -32,7 +32,7 @@ plmcd_SOURCES = \
20 plmcd_LDFLAGS = -lpthread
21
22 if ENABLE_SYSTEMD
23-plmcd_LDFLAGS += -lsystemd-daemon
24+plmcd_LDFLAGS += -lsystemd
25 endif
26
27 plmcd_LDADD = \
28diff --git a/contrib/plmc/plmcd/Makefile.in b/contrib/plmc/plmcd/Makefile.in
29index 0185dc4..e40513a 100644
30--- a/contrib/plmc/plmcd/Makefile.in
31+++ b/contrib/plmc/plmcd/Makefile.in
32@@ -106,7 +106,7 @@ build_triplet = @build@
33 host_triplet = @host@
34 target_triplet = @target@
35 sbin_PROGRAMS = plmcd$(EXEEXT)
36-@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd-daemon
37+@ENABLE_SYSTEMD_TRUE@am__append_1 = -lsystemd
38 subdir = plmcd
39 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
40 am__aclocal_m4_deps = $(top_srcdir)/configure.ac
41--
421.8.4.2
43
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch b/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch
deleted file mode 100644
index 016b64f2e..000000000
--- a/meta-networking/recipes-daemons/opensaf/opensaf/install-samples-from-srcdir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
1--- opensaf-4.5.0.orig/Makefile.am 2014-12-31 14:45:54.088797989 +0800
2+++ opensaf-4.5.0/Makefile.am 2014-12-31 14:45:08.328796688 +0800
3@@ -219,7 +219,7 @@ install-data-local:
4 $(mkinstalldirs) $(DESTDIR)$(pkgpiddir)
5 $(mkinstalldirs) $(DESTDIR)$(lockdir)
6 $(mkinstalldirs) $(DESTDIR)$(pkglocalstatedir)
7- cp -R samples/ $(DESTDIR)$(pkgdatadir)
8+ cp -R $(srcdir)/samples/ $(DESTDIR)$(pkgdatadir)
9
10 install-data-hook:
11 @for i in $$(grep -lr -e 'xxLIBDIRxx' -e 'xxLOGDIRxx' -e 'xxCLCCLIDIRxx' $(DESTDIR)$(pkgimmxml_svcdir)/*.xml) ; do \
diff --git a/meta-networking/recipes-daemons/opensaf/opensaf_5.0.0.bb b/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
index 6ceb225e9..babf03e09 100644
--- a/meta-networking/recipes-daemons/opensaf/opensaf_5.0.0.bb
+++ b/meta-networking/recipes-daemons/opensaf/opensaf_5.2.0.bb
@@ -15,14 +15,17 @@ LICENSE = "LGPLv2.1"
15LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7" 15LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=a916467b91076e631dd8edb7424769c7"
16 16
17DEPENDS = "libxml2 python" 17DEPENDS = "libxml2 python"
18TOOLCHAIN = "gcc"
18 19
19SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \ 20SECURITY_CFLAGS = "${SECURITY_NO_PIE_CFLAGS}"
20 file://install-samples-from-srcdir.patch \
21 file://0001-plmcd-error-fix.patch \
22 "
23 21
24SRC_URI[md5sum] = "94cd1a4c0406e6a45bb04c003f8690e7" 22SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/releases/${BPN}-${PV}.tar.gz \
25SRC_URI[sha256sum] = "4b4188a0f3d0ed1ed0e3d77de27c45e2c96b437401de08e7df2ed9ecd54bb999" 23 file://0001-configure-Pass-linker-specific-options-with-Wl.patch \
24 file://0001-configure-Disable-format-overflow-if-supported-by-gc.patch \
25 file://0001-Remove-unused-variables.patch \
26"
27SRC_URI[md5sum] = "08991fd467ae9dcea3c8747be8e3981e"
28SRC_URI[sha256sum] = "903478244afe37e329be93050f1d48fa18c84ea17862134c4217b920e267a04a"
26 29
27inherit autotools useradd systemd pkgconfig 30inherit autotools useradd systemd pkgconfig
28 31
@@ -30,37 +33,29 @@ USERADD_PACKAGES = "${PN}"
30GROUPADD_PARAM_${PN} = "-f -r opensaf" 33GROUPADD_PARAM_${PN} = "-f -r opensaf"
31USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf" 34USERADD_PARAM_${PN} = "-r -g opensaf -d ${datadir}/opensaf/ -s ${sbindir}/nologin -c \"OpenSAF\" opensaf"
32 35
33SYSTEMD_SERVICE_${PN} += "opensafd.service plmcboot.service plmcd.service" 36SYSTEMD_SERVICE_${PN} += "opensafd.service"
34SYSTEMD_AUTO_ENABLE = "disable" 37SYSTEMD_AUTO_ENABLE = "disable"
35 38
36PACKAGECONFIG[systemd] = "--enable-systemd-daemon" 39PACKAGECONFIG[systemd] = ",,systemd"
37PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi" 40PACKAGECONFIG[openhpi] = "--with-hpi-interface=B03 --enable-ais-plm,,openhpi"
38 41
39EXTRA_OECONF += " --libdir=${libdir}/opensaf " 42PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
40EXTRA_OEMAKE += " -Wl,-rpath,${libdir}/opensaf "
41 43
42PKGLIBDIR="${libdir}/opensaf/opensaf" 44PKGLIBDIR="${libdir}"
43
44do_configure_prepend () {
45 ( cd ${S}; autoreconf -f -i -s )
46}
47 45
48do_install_append() { 46do_install_append() {
47 cp -av --no-preserve=ownership ${B}/lib/.libs/*.so* ${D}${libdir}
49 rm -fr "${D}${localstatedir}/lock" 48 rm -fr "${D}${localstatedir}/lock"
50 rm -fr "${D}${localstatedir}/run" 49 rm -fr "${D}${localstatedir}/run"
51 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}" 50 rmdir --ignore-fail-on-non-empty "${D}${localstatedir}"
52 install -d ${D}${systemd_unitdir}/system 51 rmdir --ignore-fail-on-non-empty "${D}${datadir}/java"
53 install -m 0644 ${B}/osaf/services/infrastructure/nid/config/opensafd.service \
54 ${D}${systemd_unitdir}/system
55 install -m 0644 ${B}/contrib/plmc/config/*.service ${D}/${systemd_unitdir}/system
56
57 if [ ! -d "${D}${sysconfdir}/init.d" ]; then 52 if [ ! -d "${D}${sysconfdir}/init.d" ]; then
58 install -d ${D}${sysconfdir}/init.d 53 install -d ${D}${sysconfdir}/init.d
59 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/ 54 install -m 0755 ${B}/osaf/services/infrastructure/nid/scripts/opensafd ${D}${sysconfdir}/init.d/
60 fi 55 fi
61} 56}
62 57
63FILES_${PN} += "${localstatedir}/run ${systemd_unitdir}/system/*.service" 58FILES_${PN} += "${systemd_unitdir}/system/*.service"
64FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a" 59FILES_${PN}-staticdev += "${PKGLIBDIR}/*.a"
65 60
66INSANE_SKIP_${PN} = "dev-so" 61INSANE_SKIP_${PN} = "dev-so"