diff options
Diffstat (limited to 'meta-networking/recipes-connectivity')
58 files changed, 2494 insertions, 1342 deletions
diff --git a/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch index 93c836cf34..1bb5c638f0 100644 --- a/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch +++ b/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch @@ -17,7 +17,7 @@ c. keys-ssl.c: error: 'keys' defined but not used [-Werror=unused-variable] static struct pubkey keys[] = { Signed-off-by: Mike Frysinger <vapier@gentoo.org> -Upsteam-Status: Pending +Upstream-Status: Pending Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> --- utils/key2pub.py | 5 +++-- diff --git a/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch index aceb56df74..812e983798 100644 --- a/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch +++ b/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch @@ -1,6 +1,7 @@ +From 890f5bf2654b695a866262d72bfa9750af921a3b Mon Sep 17 00:00:00 2001 From: Ben Hutchings <ben@decadent.org.uk> Date: Sat, 23 Aug 2014 12:26:37 -0700 -Subject: Fix linking of libraries used by libreg +Subject: [PATCH] Fix linking of libraries used by libreg The math and crypto libraries are called by and need to be linked to libreg.so, not to the executables. @@ -9,10 +10,15 @@ Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027 Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> +--- + Makefile | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) +diff --git a/Makefile b/Makefile +index a3ead30..da2dcc3 100644 --- a/Makefile +++ b/Makefile -@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -peda +@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic CFLAGS += -Wall -g LDLIBREG += -lreg LDLIBS += $(LDLIBREG) @@ -21,16 +27,14 @@ Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> LIBREG += libreg.so LDFLAGS += -L ./ -@@ -40,7 +40,7 @@ all_noverify: $(LIBREG) crda intersect r +@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize ifeq ($(USE_OPENSSL),1) CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` -LDLIBS += `pkg-config --libs openssl` +LIBREGLDLIBS += `pkg-config --libs openssl` - ifeq ($(RUNTIME_PUBKEY_ONLY),1) - CFLAGS += -DRUNTIME_PUBKEY_ONLY -@@ -51,7 +51,7 @@ endif + $(LIBREG): keys-ssl.c else CFLAGS += -DUSE_GCRYPT @@ -39,7 +43,7 @@ Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> $(LIBREG): keys-gcrypt.c -@@ -121,7 +121,7 @@ keys-%.c: utils/key2pub.py $(wildcard $( +@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) $(LIBREG): regdb.h reglib.h reglib.c $(NQ) ' CC ' $@ @@ -48,3 +52,6 @@ Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> install-libreg-headers: $(NQ) ' INSTALL libreg-headers' +-- +2.7.4 + diff --git a/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.3.bb b/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb index cb3b5c22f5..885c6c0e2b 100644 --- a/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.3.bb +++ b/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb @@ -9,8 +9,8 @@ LIC_FILES_CHKSUM = "file://dhcpcd.c;endline=26;md5=77c40d671aff804ca91ea99556da8 SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz" -SRC_URI[md5sum] = "d4f2f3ed4964197dee7767219c33a9df" -SRC_URI[sha256sum] = "5abd12c4df2947d608f60a35227f9bf8ae8ab9de06ce975cdab1144d8f229b06" +SRC_URI[md5sum] = "2465624b62c1154f0e89dc69c42c849b" +SRC_URI[sha256sum] = "6f9674dc7e27e936cc787175404a6171618675ecfb6903ab9887b1b66a87d69e" inherit autotools-brokensep diff --git a/meta-networking/recipes-connectivity/kea/files/0001-Added-option-to-provide-kea-msg-compiler.patch b/meta-networking/recipes-connectivity/kea/files/0001-Added-option-to-provide-kea-msg-compiler.patch new file mode 100644 index 0000000000..b58a658b92 --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/0001-Added-option-to-provide-kea-msg-compiler.patch @@ -0,0 +1,235 @@ +From c7806af2957627151ef603ad4aa893ca1a4bf59e Mon Sep 17 00:00:00 2001 +From: Siyu Zhang <siyu.zhang@windriver.com> +Date: Sat, 10 Sep 2016 15:44:10 +0200 +Subject: [PATCH 1/1] Added option to provide kea-msg-compiler + +Upstream-Status: Inappropriate[oe specific] + +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + configure.ac | 18 ++++++++++++++++++ + src/bin/d2/Makefile.am | 2 +- + src/bin/dhcp4/Makefile.am | 2 +- + src/bin/dhcp6/Makefile.am | 2 +- + src/bin/lfc/Makefile.am | 2 +- + src/hooks/dhcp/user_chk/Makefile.am | 2 +- + src/lib/asiodns/Makefile.am | 2 +- + src/lib/config/Makefile.am | 2 +- + src/lib/dhcp_ddns/Makefile.am | 2 +- + src/lib/dhcpsrv/Makefile.am | 6 +++--- + src/lib/eval/Makefile.am | 2 +- + src/lib/hooks/Makefile.am | 2 +- + src/lib/log/Makefile.am | 8 +++++++- + src/lib/log/tests/Makefile.am | 2 +- + 14 files changed, 39 insertions(+), 15 deletions(-) + +diff --git a/configure.ac b/configure.ac +index ea41f08..edb5120 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -202,6 +202,24 @@ case "$host" in + esac + KEA_CXXFLAGS="$KEA_CXXFLAGS $MULTITHREADING_FLAG" + ++AC_MSG_CHECKING(whether kea-msg-compiler is provided) ++AC_ARG_WITH(msg-compiler, ++ AC_HELP_STRING([--with-msg-compiler=PATH], [use provided kea-msg-compiler instead of local build]), ++ [ ++ dnl TODO: Validate provided kea-msg-compiler ++ AC_SUBST([KEA_MSG_COMPILER], [${withval}]) ++ AC_MSG_RESULT(${withval})], ++ [ ++ AC_MSG_RESULT([no]) ++ if test x"$host" != x"$build" && test x"$host" == x"$target"; then ++ AC_MSG_ERROR(native kea-msg-compiler not provided for cross compilation: build=${build} host=${host} target=${target}) ++ else ++ AC_SUBST([KEA_MSG_COMPILER], ['$(top_builddir)/src/lib/log/compiler/kea-msg-compiler']) ++ with_msg_compiler=no ++ fi]) ++ ++AM_CONDITIONAL([HAVE_MSG_COMPILER], [test x"$with_msg_compiler" != x"no"]) ++ + # Disable -Werror by default. Only use it if specifically enabled. + # The usage of this flag is: + # +diff --git a/src/bin/d2/Makefile.am b/src/bin/d2/Makefile.am +index 0b4e7d5..40cc094 100644 +--- a/src/bin/d2/Makefile.am ++++ b/src/bin/d2/Makefile.am +@@ -53,7 +53,7 @@ spec_config.h: spec_config.h.pre + d2_messages.h d2_messages.cc: s-messages + + s-messages: d2_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/d2/d2_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/d2/d2_messages.mes + touch $@ + + BUILT_SOURCES = d2_messages.h d2_messages.cc +diff --git a/src/bin/dhcp4/Makefile.am b/src/bin/dhcp4/Makefile.am +index 8360677..57acb91 100644 +--- a/src/bin/dhcp4/Makefile.am ++++ b/src/bin/dhcp4/Makefile.am +@@ -47,7 +47,7 @@ spec_config.h: spec_config.h.pre + dhcp4_messages.h dhcp4_messages.cc: s-messages + + s-messages: dhcp4_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/dhcp4/dhcp4_messages.mes + touch $@ + + BUILT_SOURCES = spec_config.h dhcp4_messages.h dhcp4_messages.cc +diff --git a/src/bin/dhcp6/Makefile.am b/src/bin/dhcp6/Makefile.am +index 47155ae..d7ed722 100644 +--- a/src/bin/dhcp6/Makefile.am ++++ b/src/bin/dhcp6/Makefile.am +@@ -48,7 +48,7 @@ spec_config.h: spec_config.h.pre + dhcp6_messages.h dhcp6_messages.cc: s-messages + + s-messages: dhcp6_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/dhcp6/dhcp6_messages.mes + touch $@ + + BUILT_SOURCES = spec_config.h dhcp6_messages.h dhcp6_messages.cc +diff --git a/src/bin/lfc/Makefile.am b/src/bin/lfc/Makefile.am +index 7bfeb96..09a700e 100644 +--- a/src/bin/lfc/Makefile.am ++++ b/src/bin/lfc/Makefile.am +@@ -32,7 +32,7 @@ endif + lfc_messages.h lfc_messages.cc: s-messages + + s-messages: lfc_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/lfc/lfc_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/lfc/lfc_messages.mes + touch $@ + + BUILT_SOURCES = lfc_messages.h lfc_messages.cc +diff --git a/src/hooks/dhcp/user_chk/Makefile.am b/src/hooks/dhcp/user_chk/Makefile.am +index 41ad7b2..32a93412 100644 +--- a/src/hooks/dhcp/user_chk/Makefile.am ++++ b/src/hooks/dhcp/user_chk/Makefile.am +@@ -7,7 +7,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + # Define rule to build logging source files from message file + user_chk_messages.h user_chk_messages.cc: s-messages + s-messages: user_chk_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/hooks/dhcp/user_chk/user_chk_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/hooks/dhcp/user_chk/user_chk_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/asiodns/Makefile.am b/src/lib/asiodns/Makefile.am +index 24dfe05..60c9f80 100644 +--- a/src/lib/asiodns/Makefile.am ++++ b/src/lib/asiodns/Makefile.am +@@ -11,7 +11,7 @@ CLEANFILES = *.gcno *.gcda asiodns_messages.h asiodns_messages.cc s-messages + asiodns_messages.h asiodns_messages.cc: s-messages + + s-messages: asiodns_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/asiodns/asiodns_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/asiodns/asiodns_messages.mes + touch $@ + + BUILT_SOURCES = asiodns_messages.h asiodns_messages.cc +diff --git a/src/lib/config/Makefile.am b/src/lib/config/Makefile.am +index a89d530..26894ad 100644 +--- a/src/lib/config/Makefile.am ++++ b/src/lib/config/Makefile.am +@@ -7,7 +7,7 @@ AM_CPPFLAGS += $(BOOST_INCLUDES) + config_messages.h config_messages.cc: s-messages + + s-messages: config_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/config/config_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/config/config_messages.mes + touch $@ + + BUILT_SOURCES = config_messages.h config_messages.cc +diff --git a/src/lib/dhcp_ddns/Makefile.am b/src/lib/dhcp_ddns/Makefile.am +index 820f448..fe15533 100644 +--- a/src/lib/dhcp_ddns/Makefile.am ++++ b/src/lib/dhcp_ddns/Makefile.am +@@ -8,7 +8,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + dhcp_ddns_messages.h dhcp_ddns_messages.cc: s-messages + + s-messages: dhcp_ddns_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcp_ddns/dhcp_ddns_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/dhcpsrv/Makefile.am b/src/lib/dhcpsrv/Makefile.am +index db95dbd..6499b9f 100644 +--- a/src/lib/dhcpsrv/Makefile.am ++++ b/src/lib/dhcpsrv/Makefile.am +@@ -52,11 +52,11 @@ alloc_engine_messages.h alloc_engine_messages.cc dhcpsrv_messages.h \ + dhcpsrv_messages.cc hosts_messages.h hosts_messages.cc: s-messages + + s-messages: alloc_engine_messages.mes dhcpsrv_messages.mes hosts_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcpsrv/alloc_engine_messages.mes + touch $@ +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcpsrv/dhcpsrv_messages.mes + touch $@ +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/dhcpsrv/hosts_messages.mes + touch $@ + + # Tell Automake that the {alloc_engine,dhcpsrv,hosts}_messages.{cc,h} source files +diff --git a/src/lib/eval/Makefile.am b/src/lib/eval/Makefile.am +index e4968c1..f8464f8 100644 +--- a/src/lib/eval/Makefile.am ++++ b/src/lib/eval/Makefile.am +@@ -47,7 +47,7 @@ EXTRA_DIST += lexer.ll parser.yy + eval_messages.h eval_messages.cc: s-messages + + s-messages: eval_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/eval/eval_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/eval/eval_messages.mes + touch $@ + + # Tell Automake that the eval_messages.{cc,h} source files are created in the +diff --git a/src/lib/hooks/Makefile.am b/src/lib/hooks/Makefile.am +index 624e227..3458da8 100644 +--- a/src/lib/hooks/Makefile.am ++++ b/src/lib/hooks/Makefile.am +@@ -8,7 +8,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + hooks_messages.h hooks_messages.cc: s-messages + + s-messages: hooks_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/hooks/hooks_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/hooks/hooks_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/log/Makefile.am b/src/lib/log/Makefile.am +index e1185cd..22e9ce6 100644 +--- a/src/lib/log/Makefile.am ++++ b/src/lib/log/Makefile.am +@@ -1,4 +1,10 @@ +-SUBDIRS = interprocess . compiler tests ++SUBDIRS = interprocess . ++ ++if !HAVE_MSG_COMPILER ++SUBDIRS += compiler ++endif ++ ++SUBDIRS += tests + + AM_CPPFLAGS = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib + AM_CPPFLAGS += $(BOOST_INCLUDES) +diff --git a/src/lib/log/tests/Makefile.am b/src/lib/log/tests/Makefile.am +index 03806f9..caf9cab 100644 +--- a/src/lib/log/tests/Makefile.am ++++ b/src/lib/log/tests/Makefile.am +@@ -17,7 +17,7 @@ BUILT_SOURCES = log_test_messages.h log_test_messages.cc + log_test_messages.h log_test_messages.cc: s-messages + + s-messages: log_test_messages.mes +- $(AM_V_GEN) $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/log/tests/log_test_messages.mes ++ $(AM_V_GEN) @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/log/tests/log_test_messages.mes + touch $@ + + CLEANFILES += log_test_messages.h log_test_messages.cc s-messages +-- +1.8.4.2 + diff --git a/meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-fix-compile-error-about-kea-msg-compiler.patch b/meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-fix-compile-error-about-kea-msg-compiler.patch new file mode 100644 index 0000000000..e8a4ae41b5 --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-fix-compile-error-about-kea-msg-compiler.patch @@ -0,0 +1,72 @@ +From d800c6017962e358c8b2ada6803acb0f4011a763 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <Mingli.Yu@windriver.com> +Date: Fri, 16 Mar 2018 08:03:20 +0000 +Subject: [PATCH] Makefile.am: fix compile error about kea-msg-compiler + +fix compile error about kea-msg-compiler + +Upstream-Status: Inappropriate[oe specific] + +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + src/bin/agent/Makefile.am | 2 +- + src/hooks/dhcp/lease_cmds/Makefile.am | 2 +- + src/lib/http/Makefile.am | 2 +- + src/lib/process/Makefile.am | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/bin/agent/Makefile.am b/src/bin/agent/Makefile.am +index e67c572..b646325 100644 +--- a/src/bin/agent/Makefile.am ++++ b/src/bin/agent/Makefile.am +@@ -33,7 +33,7 @@ endif + ca_messages.h ca_messages.cc: s-messages + + s-messages: ca_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/bin/agent/ca_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/bin/agent/ca_messages.mes + touch $@ + + BUILT_SOURCES = ca_messages.h ca_messages.cc +diff --git a/src/hooks/dhcp/lease_cmds/Makefile.am b/src/hooks/dhcp/lease_cmds/Makefile.am +index 90abfda..cfd6779 100644 +--- a/src/hooks/dhcp/lease_cmds/Makefile.am ++++ b/src/hooks/dhcp/lease_cmds/Makefile.am +@@ -7,7 +7,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + # Define rule to build logging source files from message file + lease_cmds_messages.h lease_cmds_messages.cc: s-messages + s-messages: lease_cmds_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/hooks/dhcp/lease_cmds/lease_cmds_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/http/Makefile.am b/src/lib/http/Makefile.am +index 2b0eed5..db3bb0e 100644 +--- a/src/lib/http/Makefile.am ++++ b/src/lib/http/Makefile.am +@@ -8,7 +8,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + http_messages.h http_messages.cc: s-messages + + s-messages: http_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/http/http_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/http/http_messages.mes + touch $@ + + # Tell automake that the message files are built as part of the build process +diff --git a/src/lib/process/Makefile.am b/src/lib/process/Makefile.am +index c7746c6..71998ed 100644 +--- a/src/lib/process/Makefile.am ++++ b/src/lib/process/Makefile.am +@@ -19,7 +19,7 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS) + process_messages.h process_messages.cc: s-messages + + s-messages: process_messages.mes +- $(top_builddir)/src/lib/log/compiler/kea-msg-compiler $(top_srcdir)/src/lib/process/process_messages.mes ++ @KEA_MSG_COMPILER@ $(top_srcdir)/src/lib/process/process_messages.mes + touch $@ + + spec_config.h: spec_config.h.pre +-- +2.13.3 + diff --git a/meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-update-hooksdir-for-lease_cmds.patch b/meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-update-hooksdir-for-lease_cmds.patch new file mode 100644 index 0000000000..72fa113b00 --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/0001-Makefile.am-update-hooksdir-for-lease_cmds.patch @@ -0,0 +1,30 @@ +From 77ab10015512e9cc0c7a160bd6b534bf4174bc95 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <Mingli.Yu@windriver.com> +Date: Wed, 21 Mar 2018 06:01:38 +0000 +Subject: [PATCH] Makefile.am: update hooksdir for lease_cmds + +update hooksdir for lease_cmds + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + src/hooks/dhcp/lease_cmds/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/hooks/dhcp/lease_cmds/Makefile.am b/src/hooks/dhcp/lease_cmds/Makefile.am +index cfd6779..22cc4a9 100644 +--- a/src/hooks/dhcp/lease_cmds/Makefile.am ++++ b/src/hooks/dhcp/lease_cmds/Makefile.am +@@ -37,7 +37,7 @@ liblease_cmds_la_CXXFLAGS = $(AM_CXXFLAGS) + liblease_cmds_la_CPPFLAGS = $(AM_CPPFLAGS) + + # install the shared object into $(libdir)/hooks +-lib_hooksdir = $(libdir)/hooks ++lib_hooksdir = $(libdir)/kea/hooks + lib_hooks_LTLIBRARIES = libdhcp_lease_cmds.la + + libdhcp_lease_cmds_la_SOURCES = +-- +2.13.3 + diff --git a/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch b/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch new file mode 100644 index 0000000000..9262381d5b --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/0001-asiolink-fix-build-with-boost-1.66.patch @@ -0,0 +1,103 @@ +From 4fd11ef050438adeb1e0ae0d9d2d8ec3a2cb659c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bart=C5=82omiej=20Piotrowski?= <bpiotrowski@archlinux.org> +Date: Sat, 30 Dec 2017 14:40:24 +0100 +Subject: [PATCH] asiolink: fix build with boost 1.66 + +- use native_handle() for getting native socket type +- use io_context instead of io_service + +Upstream-Status: Backport + +Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> +--- + src/lib/asiolink/io_acceptor.h | 4 ++++ + src/lib/asiolink/io_service.h | 5 +++++ + src/lib/asiolink/tcp_socket.h | 4 ++++ + src/lib/asiolink/udp_socket.h | 4 ++++ + src/lib/asiolink/unix_domain_socket.cc | 4 ++++ + 5 files changed, 21 insertions(+) + +diff --git a/src/lib/asiolink/io_acceptor.h b/src/lib/asiolink/io_acceptor.h +index c493d3427..913a3280b 100644 +--- a/src/lib/asiolink/io_acceptor.h ++++ b/src/lib/asiolink/io_acceptor.h +@@ -47,7 +47,11 @@ public: + + /// @brief Returns file descriptor of the underlying socket. + virtual int getNative() const { ++#if BOOST_VERSION < 106600 + return (acceptor_->native()); ++#else ++ return (acceptor_->native_handle()); ++#endif + } + + /// @brief Opens acceptor socket given the endpoint. +diff --git a/src/lib/asiolink/io_service.h b/src/lib/asiolink/io_service.h +index e9e402d11..e0832b2c0 100644 +--- a/src/lib/asiolink/io_service.h ++++ b/src/lib/asiolink/io_service.h +@@ -11,7 +11,12 @@ + + namespace boost { + namespace asio { ++#if BOOST_VERSION < 106600 + class io_service; ++#else ++ class io_context; ++ typedef io_context io_service; ++#endif + } + } + +diff --git a/src/lib/asiolink/tcp_socket.h b/src/lib/asiolink/tcp_socket.h +index adf74d1f0..83b8264c8 100644 +--- a/src/lib/asiolink/tcp_socket.h ++++ b/src/lib/asiolink/tcp_socket.h +@@ -75,7 +75,11 @@ public: + + /// \brief Return file descriptor of underlying socket + virtual int getNative() const { ++#if BOOST_VERSION < 106600 + return (socket_.native()); ++#else ++ return (socket_.native_handle()); ++#endif + } + + /// \brief Return protocol of socket +diff --git a/src/lib/asiolink/udp_socket.h b/src/lib/asiolink/udp_socket.h +index 07ba44743..5b040cfe1 100644 +--- a/src/lib/asiolink/udp_socket.h ++++ b/src/lib/asiolink/udp_socket.h +@@ -61,7 +61,11 @@ public: + + /// \brief Return file descriptor of underlying socket + virtual int getNative() const { ++#if BOOST_VERSION < 106600 + return (socket_.native()); ++#else ++ return (socket_.native_handle()); ++#endif + } + + /// \brief Return protocol of socket +diff --git a/src/lib/asiolink/unix_domain_socket.cc b/src/lib/asiolink/unix_domain_socket.cc +index f17ec2e8f..d1ad9ec30 100644 +--- a/src/lib/asiolink/unix_domain_socket.cc ++++ b/src/lib/asiolink/unix_domain_socket.cc +@@ -287,7 +287,11 @@ UnixDomainSocket::UnixDomainSocket(IOService& io_service) + + int + UnixDomainSocket::getNative() const { ++#if BOOST_VERSION < 106600 + return (impl_->socket_.native()); ++#else ++ return (impl_->socket_.native_handle()); ++#endif + } + + int +-- +2.11.0 + diff --git a/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service new file mode 100644 index 0000000000..91aa2eb14f --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service @@ -0,0 +1,13 @@ +[Unit] +Description=Kea DHCP-DDNS Server +Wants=network-online.target +After=network-online.target +After=time-sync.target + +[Service] +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service b/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service new file mode 100644 index 0000000000..f32edcb90d --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service @@ -0,0 +1,13 @@ +[Unit] +Description=Kea DHCPv4 Server +Wants=network-online.target +After=network-online.target +After=time-sync.target + +[Service] +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service b/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service new file mode 100644 index 0000000000..26d2205e64 --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service @@ -0,0 +1,13 @@ +[Unit] +Description=Kea DHCPv6 Server +Wants=network-online.target +After=network-online.target +After=time-sync.target + +[Service] +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/kea/kea_1.3.0.bb b/meta-networking/recipes-connectivity/kea/kea_1.3.0.bb new file mode 100644 index 0000000000..946c1e17dd --- /dev/null +++ b/meta-networking/recipes-connectivity/kea/kea_1.3.0.bb @@ -0,0 +1,52 @@ +SUMMARY = "ISC Kea DHCP Server" +DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS." +HOMEPAGE = "http://kea.isc.org" +SECTION = "connectivity" +LICENSE = "MPL-2.0 & BSL-1.0 & Apache-2.0" +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=9310b19bc010f85f4ad19637f168f23f \ + file://ext/coroutine/LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c \ +" + +SRC_URI = "\ + http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ + file://0001-Added-option-to-provide-kea-msg-compiler.patch \ + file://0001-Makefile.am-fix-compile-error-about-kea-msg-compiler.patch \ + file://0001-asiolink-fix-build-with-boost-1.66.patch \ + file://0001-Makefile.am-update-hooksdir-for-lease_cmds.patch \ + file://kea-dhcp4.service \ + file://kea-dhcp6.service \ + file://kea-dhcp-ddns.service \ +" + +SRC_URI[md5sum] = "f93bf836fd555a221f9ed0d4520058db" +SRC_URI[sha256sum] = "6edfcdbf2526c218426a1d1a6a6694a4050c97bb8412953a230285d63415c391" + +inherit autotools systemd + +SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" +SYSTEMD_AUTO_ENABLE = "disable" + +do_install_append_class-target() { + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} + sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_system_unitdir}/kea-dhcp*service +} + +do_install_append() { + rm -rf "${D}${localstatedir}" +} + +PACKAGECONFIG_class-target ??= "kmc openssl log4cplus boost" +PACKAGECONFIG_class-native ??= "openssl log4cplus boost" + +PACKAGECONFIG[kmc] = "--with-msg-compiler=${STAGING_BINDIR_NATIVE}/kea-msg-compiler,,kea-native," +PACKAGECONFIG[openssl] = "--with-openssl=${STAGING_DIR_TARGET}${prefix},,openssl,openssl" +PACKAGECONFIG[log4cplus] = "--with-log4cplus=${STAGING_DIR_TARGET}${prefix},,log4cplus,log4cplus" +PACKAGECONFIG[boost] = "--with-boost-include=${STAGING_INCDIR} --with-boost-lib-dir=${STAGING_LIBDIR} --with-boost-libs=-lboost_system,,boost,boost" + +FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a" + +BBCLASSEXTEND += "native" diff --git a/meta-networking/recipes-connectivity/lftp/lftp_4.7.7.bb b/meta-networking/recipes-connectivity/lftp/lftp_4.8.3.bb index b6b65da736..c6e37277e4 100644 --- a/meta-networking/recipes-connectivity/lftp/lftp_4.7.7.bb +++ b/meta-networking/recipes-connectivity/lftp/lftp_4.8.3.bb @@ -9,17 +9,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2 \ file://fix-gcc-6-conflicts-signbit.patch \ " -SRC_URI[md5sum] = "3701e7675baa5619c92622eb141c8301" -SRC_URI[sha256sum] = "fe441f20a9a317cfb99a8b8e628ba0457df472b6d93964d17374d5b5ebdf9280" +SRC_URI[md5sum] = "12b1fcbf13f41e9cdb0903fc670fa1f1" +SRC_URI[sha256sum] = "c4159f056afee41866a6c2d639655bc351e6d3486bbe7758eaedb24f6a4239d5" inherit autotools gettext pkgconfig acpaths = "-I ./m4" -EXTRA_OECONF += "--with-modules" +EXTRA_OECONF += "--with-modules --disable-rpath" -PACKAGECONFIG ??= "libidn openssl zlib gnutls readline expat" -PACKAGECONFIG[libidn] = "--with-libidn, --without-libidn, libidn" +PACKAGECONFIG ??= "openssl zlib gnutls readline expat" PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl, openssl" PACKAGECONFIG[zlib] = "--with-zlib=${STAGING_INCDIR}/.., --without-zlib, zlib" PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" @@ -29,6 +28,6 @@ PACKAGECONFIG[expat] = "--with-expat=${STAGING_INCDIR}/.. --with-expat-inc=${STA do_install_append() { rm -rf ${D}${libdir}/charset.alias } - +FILES_${PN} += "${datadir}/icons/hicolor" FILES_${PN}-dbg += "${libdir}/lftp/${PV}/.debug" RDEPENDS_${PN} = "perl bash readline" diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.17.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb index fcfec6907d..736cce1b01 100644 --- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_1.3.17.bb +++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.8.0.bb @@ -15,23 +15,28 @@ understand what the code does. It features: \ platform abstraction and threading \ " -HOMEPAGE = "https://polarssl.org" -BUGTRACKER = "https://github.com/polarssl/polarssl/issues" +HOMEPAGE = "https://tls.mbed.org/" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://LICENSE;md5=751419260aa954499f7abaabaa882bbe" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a" SECTION = "libdevel" -SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-gpl.tgz" +SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz" -SRC_URI[md5sum] = "a6ed92fc377ef60f7c24d42b900e0dad" -SRC_URI[sha256sum] = "f5beb43e850283915e3e0f8d37495eade3bfb5beedfb61e7b8da70d4c68edb82" +SRC_URI[md5sum] = "2d4b0e2cb844efde1e73d3bcd9731fef" +SRC_URI[sha256sum] = "ab8b62b995781bcf22e87a265ed06267f87c3041198e996b44441223d19fa9c3" + +inherit cmake + +PACKAGECONFIG ??= "shared-libs programs" +PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-USE_SHARED_MBEDTLS_LIBRARY=OFF" +PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" + +EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}" -DEPENDS = "openssl" -RDEPENDS_${PN} += "libcrypto" PROVIDES += "polarssl" RPROVIDES_${PN} = "polarssl" -EXTRA_OECMAKE = "-DUSE_SHARED_POLARSSL_LIBRARY=on -DLIB_INSTALL_DIR=${baselib}" -inherit cmake +PACKAGES =+ "${PN}-programs" +FILES_${PN}-programs = "${bindir}/" diff --git a/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service b/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service new file mode 100644 index 0000000000..e7bfad0a93 --- /dev/null +++ b/meta-networking/recipes-connectivity/miniupnpd/files/miniupnpd.service @@ -0,0 +1,14 @@ +[Unit] +Description=Lightweight UPnP IGD daemon +Documentation=man:miniupnpd(8) +After=network.target + +[Service] +Type=forking +ExecStartPre=/etc/miniupnpd/iptables_init.sh +ExecStart=/usr/sbin/miniupnpd -f /etc/miniupnpd/miniupnpd.conf +ExecStopPost=/etc/miniupnpd/iptables_removeall.sh +PIDFile=/run/miniupnpd.pid + +[Install] +WantedBy=network.target diff --git a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb index c6f36e1375..04b5cd589c 100644 --- a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.bb +++ b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb @@ -5,16 +5,17 @@ the network." SECTION = "networking" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=aa71c78c373ccfe0ff207af0cd966d91" +LIC_FILES_CHKSUM = "file://LICENSE;md5=91ac00c6b9f5c106e89291e196fe0234" -inherit autotools gettext pkgconfig +inherit autotools gettext pkgconfig systemd DEPENDS += "iptables net-tools util-linux libmnl libnetfilter-conntrack" SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${P}.tar.gz;downloadfilename=${P}.tar.gz \ -" -SRC_URI[md5sum] = "1c07a215dd9b362e75a9efc05e2fb3b4" -SRC_URI[sha256sum] = "d96aa3a00e0f5490826bba3cb97e68cd27479e5839adac4b9bcb66eae786bfb7" + file://miniupnpd.service" + +SRC_URI[md5sum] = "b4c7c938915edeee6ca4c65dd021f212" +SRC_URI[sha256sum] = "860c15f2f8340fd69546b01cffe4c7fcff3e63a7bdfe5a2af6b2346f0e074bb6" IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" @@ -34,4 +35,9 @@ do_install() { install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN} install -d ${D}/${sysconfdir}/init.d install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ } + +SYSTEMD_SERVICE_${PN} = "miniupnpd.service" diff --git a/meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch b/meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch new file mode 100644 index 0000000000..a5aa277a08 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch @@ -0,0 +1,35 @@ +From 0be38301249d797ec1f59071cc868ceda6d4720a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> +Date: Tue, 12 Apr 2016 12:50:32 +0100 +Subject: [PATCH 1/2] config.mk: allow prefix / mandir / localedir from + environment +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We want to control them using OE environment variables. + +Upstream-Status: Inappropriate [embedded-specific] +Signed-off-by: André Draszik <andre.draszik@jci.com> +--- + config.mk | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/config.mk b/config.mk +index 71f17e5..81d9702 100644 +--- a/config.mk ++++ b/config.mk +@@ -249,7 +249,7 @@ ifeq ($(WITH_DOCS),yes) + endif + + INSTALL?=install +-prefix=/usr/local +-mandir=${prefix}/share/man +-localedir=${prefix}/share/locale ++prefix?=/usr/local ++mandir?=${prefix}/share/man ++localedir?=${prefix}/share/locale + STRIP?=strip +-- +2.15.1 + diff --git a/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch b/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch new file mode 100644 index 0000000000..c89dfe6bef --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch @@ -0,0 +1,975 @@ +From d9aeef8d95a325942cc92f4d72415771d75d904c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com> +Date: Tue, 12 Apr 2016 13:05:10 +0100 +Subject: [PATCH 2/2] uthash: remove in-tree version +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +We don't need it as we want to use the version provided by +meta-oe instead. + +Upstream-Status: Inappropriate [embedded-specific] +Signed-off-by: André Draszik <andre.draszik@jci.com> +--- + src/uthash.h | 948 ----------------------------------------------------------- + 1 file changed, 948 deletions(-) + delete mode 100644 src/uthash.h + +diff --git a/src/uthash.h b/src/uthash.h +deleted file mode 100644 +index 915a825..0000000 +--- a/src/uthash.h ++++ /dev/null +@@ -1,948 +0,0 @@ +-/* +-Copyright (c) 2003-2013, Troy D. Hanson http://troydhanson.github.com/uthash/ +-All rights reserved. +- +-Redistribution and use in source and binary forms, with or without +-modification, are permitted provided that the following conditions are met: +- +- * Redistributions of source code must retain the above copyright +- notice, this list of conditions and the following disclaimer. +- +-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +-IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +-TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +-PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER +-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +-*/ +- +-#ifndef UTHASH_H +-#define UTHASH_H +- +-#include <string.h> /* memcmp,strlen */ +-#include <stddef.h> /* ptrdiff_t */ +-#include <stdlib.h> /* exit() */ +- +-/* These macros use decltype or the earlier __typeof GNU extension. +- As decltype is only available in newer compilers (VS2010 or gcc 4.3+ +- when compiling c++ source) this code uses whatever method is needed +- or, for VS2008 where neither is available, uses casting workarounds. */ +-#ifdef _MSC_VER /* MS compiler */ +-#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ +-#define DECLTYPE(x) (decltype(x)) +-#else /* VS2008 or older (or VS2010 in C mode) */ +-#define NO_DECLTYPE +-#define DECLTYPE(x) +-#endif +-#else /* GNU, Sun and other compilers */ +-#define DECLTYPE(x) (__typeof(x)) +-#endif +- +-#ifdef NO_DECLTYPE +-#define DECLTYPE_ASSIGN(dst,src) \ +-do { \ +- char **_da_dst = (char**)(&(dst)); \ +- *_da_dst = (char*)(src); \ +-} while(0) +-#else +-#define DECLTYPE_ASSIGN(dst,src) \ +-do { \ +- (dst) = DECLTYPE(dst)(src); \ +-} while(0) +-#endif +- +-/* a number of the hash function use uint32_t which isn't defined on win32 */ +-#ifdef _MSC_VER +-typedef unsigned int uint32_t; +-typedef unsigned char uint8_t; +-#else +-#include <inttypes.h> /* uint32_t */ +-#endif +- +-#define UTHASH_VERSION 1.9.8 +- +-#ifndef uthash_fatal +-#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ +-#endif +-#ifndef uthash_malloc +-#define uthash_malloc(sz) malloc(sz) /* malloc fcn */ +-#endif +-#ifndef uthash_free +-#define uthash_free(ptr,sz) free(ptr) /* free fcn */ +-#endif +- +-#ifndef uthash_noexpand_fyi +-#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ +-#endif +-#ifndef uthash_expand_fyi +-#define uthash_expand_fyi(tbl) /* can be defined to log expands */ +-#endif +- +-/* initial number of buckets */ +-#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ +-#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ +-#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ +- +-/* calculate the element whose hash handle address is hhe */ +-#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) +- +-#define HASH_FIND(hh,head,keyptr,keylen,out) \ +-do { \ +- unsigned _hf_bkt,_hf_hashv; \ +- out=NULL; \ +- if (head) { \ +- HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ +- if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ +- HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ +- keyptr,keylen,out); \ +- } \ +- } \ +-} while (0) +- +-#ifdef HASH_BLOOM +-#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM) +-#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0) +-#define HASH_BLOOM_MAKE(tbl) \ +-do { \ +- (tbl)->bloom_nbits = HASH_BLOOM; \ +- (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ +- if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ +- memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ +- (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ +-} while (0) +- +-#define HASH_BLOOM_FREE(tbl) \ +-do { \ +- uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ +-} while (0) +- +-#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) +-#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) +- +-#define HASH_BLOOM_ADD(tbl,hashv) \ +- HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) +- +-#define HASH_BLOOM_TEST(tbl,hashv) \ +- HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) +- +-#else +-#define HASH_BLOOM_MAKE(tbl) +-#define HASH_BLOOM_FREE(tbl) +-#define HASH_BLOOM_ADD(tbl,hashv) +-#define HASH_BLOOM_TEST(tbl,hashv) (1) +-#define HASH_BLOOM_BYTELEN 0 +-#endif +- +-#define HASH_MAKE_TABLE(hh,head) \ +-do { \ +- (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ +- sizeof(UT_hash_table)); \ +- if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ +- memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ +- (head)->hh.tbl->tail = &((head)->hh); \ +- (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ +- (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ +- (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ +- (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ +- HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ +- if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ +- memset((head)->hh.tbl->buckets, 0, \ +- HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ +- HASH_BLOOM_MAKE((head)->hh.tbl); \ +- (head)->hh.tbl->signature = HASH_SIGNATURE; \ +-} while(0) +- +-#define HASH_ADD(hh,head,fieldname,keylen_in,add) \ +- HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) +- +-#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ +-do { \ +- replaced=NULL; \ +- HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ +- if (replaced!=NULL) { \ +- HASH_DELETE(hh,head,replaced); \ +- }; \ +- HASH_ADD(hh,head,fieldname,keylen_in,add); \ +-} while(0) +- +-#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ +-do { \ +- unsigned _ha_bkt; \ +- (add)->hh.next = NULL; \ +- (add)->hh.key = (char*)keyptr; \ +- (add)->hh.keylen = (unsigned)keylen_in; \ +- if (!(head)) { \ +- head = (add); \ +- (head)->hh.prev = NULL; \ +- HASH_MAKE_TABLE(hh,head); \ +- } else { \ +- (head)->hh.tbl->tail->next = (add); \ +- (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ +- (head)->hh.tbl->tail = &((add)->hh); \ +- } \ +- (head)->hh.tbl->num_items++; \ +- (add)->hh.tbl = (head)->hh.tbl; \ +- HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ +- (add)->hh.hashv, _ha_bkt); \ +- HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ +- HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ +- HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ +- HASH_FSCK(hh,head); \ +-} while(0) +- +-#define HASH_TO_BKT( hashv, num_bkts, bkt ) \ +-do { \ +- bkt = ((hashv) & ((num_bkts) - 1)); \ +-} while(0) +- +-/* delete "delptr" from the hash table. +- * "the usual" patch-up process for the app-order doubly-linked-list. +- * The use of _hd_hh_del below deserves special explanation. +- * These used to be expressed using (delptr) but that led to a bug +- * if someone used the same symbol for the head and deletee, like +- * HASH_DELETE(hh,users,users); +- * We want that to work, but by changing the head (users) below +- * we were forfeiting our ability to further refer to the deletee (users) +- * in the patch-up process. Solution: use scratch space to +- * copy the deletee pointer, then the latter references are via that +- * scratch pointer rather than through the repointed (users) symbol. +- */ +-#define HASH_DELETE(hh,head,delptr) \ +-do { \ +- unsigned _hd_bkt; \ +- struct UT_hash_handle *_hd_hh_del; \ +- if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ +- uthash_free((head)->hh.tbl->buckets, \ +- (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ +- HASH_BLOOM_FREE((head)->hh.tbl); \ +- uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ +- head = NULL; \ +- } else { \ +- _hd_hh_del = &((delptr)->hh); \ +- if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ +- (head)->hh.tbl->tail = \ +- (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ +- (head)->hh.tbl->hho); \ +- } \ +- if ((delptr)->hh.prev) { \ +- ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ +- (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ +- } else { \ +- DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ +- } \ +- if (_hd_hh_del->next) { \ +- ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ +- (head)->hh.tbl->hho))->prev = \ +- _hd_hh_del->prev; \ +- } \ +- HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ +- HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ +- (head)->hh.tbl->num_items--; \ +- } \ +- HASH_FSCK(hh,head); \ +-} while (0) +- +- +-/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ +-#define HASH_FIND_STR(head,findstr,out) \ +- HASH_FIND(hh,head,findstr,strlen(findstr),out) +-#define HASH_ADD_STR(head,strfield,add) \ +- HASH_ADD(hh,head,strfield,strlen(add->strfield),add) +-#define HASH_REPLACE_STR(head,strfield,add,replaced) \ +- HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) +-#define HASH_FIND_INT(head,findint,out) \ +- HASH_FIND(hh,head,findint,sizeof(int),out) +-#define HASH_ADD_INT(head,intfield,add) \ +- HASH_ADD(hh,head,intfield,sizeof(int),add) +-#define HASH_REPLACE_INT(head,intfield,add,replaced) \ +- HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) +-#define HASH_FIND_PTR(head,findptr,out) \ +- HASH_FIND(hh,head,findptr,sizeof(void *),out) +-#define HASH_ADD_PTR(head,ptrfield,add) \ +- HASH_ADD(hh,head,ptrfield,sizeof(void *),add) +-#define HASH_REPLACE_PTR(head,ptrfield,add) \ +- HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) +-#define HASH_DEL(head,delptr) \ +- HASH_DELETE(hh,head,delptr) +- +-/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. +- * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. +- */ +-#ifdef HASH_DEBUG +-#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) +-#define HASH_FSCK(hh,head) \ +-do { \ +- unsigned _bkt_i; \ +- unsigned _count, _bkt_count; \ +- char *_prev; \ +- struct UT_hash_handle *_thh; \ +- if (head) { \ +- _count = 0; \ +- for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ +- _bkt_count = 0; \ +- _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ +- _prev = NULL; \ +- while (_thh) { \ +- if (_prev != (char*)(_thh->hh_prev)) { \ +- HASH_OOPS("invalid hh_prev %p, actual %p\n", \ +- _thh->hh_prev, _prev ); \ +- } \ +- _bkt_count++; \ +- _prev = (char*)(_thh); \ +- _thh = _thh->hh_next; \ +- } \ +- _count += _bkt_count; \ +- if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ +- HASH_OOPS("invalid bucket count %d, actual %d\n", \ +- (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ +- } \ +- } \ +- if (_count != (head)->hh.tbl->num_items) { \ +- HASH_OOPS("invalid hh item count %d, actual %d\n", \ +- (head)->hh.tbl->num_items, _count ); \ +- } \ +- /* traverse hh in app order; check next/prev integrity, count */ \ +- _count = 0; \ +- _prev = NULL; \ +- _thh = &(head)->hh; \ +- while (_thh) { \ +- _count++; \ +- if (_prev !=(char*)(_thh->prev)) { \ +- HASH_OOPS("invalid prev %p, actual %p\n", \ +- _thh->prev, _prev ); \ +- } \ +- _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ +- _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ +- (head)->hh.tbl->hho) : NULL ); \ +- } \ +- if (_count != (head)->hh.tbl->num_items) { \ +- HASH_OOPS("invalid app item count %d, actual %d\n", \ +- (head)->hh.tbl->num_items, _count ); \ +- } \ +- } \ +-} while (0) +-#else +-#define HASH_FSCK(hh,head) +-#endif +- +-/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to +- * the descriptor to which this macro is defined for tuning the hash function. +- * The app can #include <unistd.h> to get the prototype for write(2). */ +-#ifdef HASH_EMIT_KEYS +-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ +-do { \ +- unsigned _klen = fieldlen; \ +- write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ +- write(HASH_EMIT_KEYS, keyptr, fieldlen); \ +-} while (0) +-#else +-#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) +-#endif +- +-/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ +-#ifdef HASH_FUNCTION +-#define HASH_FCN HASH_FUNCTION +-#else +-#define HASH_FCN HASH_JEN +-#endif +- +-/* The Bernstein hash function, used in Perl prior to v5.6 */ +-#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _hb_keylen=keylen; \ +- char *_hb_key=(char*)(key); \ +- (hashv) = 0; \ +- while (_hb_keylen--) { (hashv) = ((hashv) * 33) + *_hb_key++; } \ +- bkt = (hashv) & (num_bkts-1); \ +-} while (0) +- +- +-/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at +- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ +-#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _sx_i; \ +- char *_hs_key=(char*)(key); \ +- hashv = 0; \ +- for(_sx_i=0; _sx_i < keylen; _sx_i++) \ +- hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ +- bkt = hashv & (num_bkts-1); \ +-} while (0) +- +-#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _fn_i; \ +- char *_hf_key=(char*)(key); \ +- hashv = 2166136261UL; \ +- for(_fn_i=0; _fn_i < keylen; _fn_i++) \ +- hashv = (hashv * 16777619) ^ _hf_key[_fn_i]; \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _ho_i; \ +- char *_ho_key=(char*)(key); \ +- hashv = 0; \ +- for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ +- hashv += _ho_key[_ho_i]; \ +- hashv += (hashv << 10); \ +- hashv ^= (hashv >> 6); \ +- } \ +- hashv += (hashv << 3); \ +- hashv ^= (hashv >> 11); \ +- hashv += (hashv << 15); \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-#define HASH_JEN_MIX(a,b,c) \ +-do { \ +- a -= b; a -= c; a ^= ( c >> 13 ); \ +- b -= c; b -= a; b ^= ( a << 8 ); \ +- c -= a; c -= b; c ^= ( b >> 13 ); \ +- a -= b; a -= c; a ^= ( c >> 12 ); \ +- b -= c; b -= a; b ^= ( a << 16 ); \ +- c -= a; c -= b; c ^= ( b >> 5 ); \ +- a -= b; a -= c; a ^= ( c >> 3 ); \ +- b -= c; b -= a; b ^= ( a << 10 ); \ +- c -= a; c -= b; c ^= ( b >> 15 ); \ +-} while (0) +- +-#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned _hj_i,_hj_j,_hj_k; \ +- unsigned char *_hj_key=(unsigned char*)(key); \ +- hashv = 0xfeedbeef; \ +- _hj_i = _hj_j = 0x9e3779b9; \ +- _hj_k = (unsigned)keylen; \ +- while (_hj_k >= 12) { \ +- _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ +- + ( (unsigned)_hj_key[2] << 16 ) \ +- + ( (unsigned)_hj_key[3] << 24 ) ); \ +- _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ +- + ( (unsigned)_hj_key[6] << 16 ) \ +- + ( (unsigned)_hj_key[7] << 24 ) ); \ +- hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ +- + ( (unsigned)_hj_key[10] << 16 ) \ +- + ( (unsigned)_hj_key[11] << 24 ) ); \ +- \ +- HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ +- \ +- _hj_key += 12; \ +- _hj_k -= 12; \ +- } \ +- hashv += keylen; \ +- switch ( _hj_k ) { \ +- case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ +- case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ +- case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ +- case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ +- case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ +- case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ +- case 5: _hj_j += _hj_key[4]; \ +- case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ +- case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ +- case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ +- case 1: _hj_i += _hj_key[0]; \ +- } \ +- HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-/* The Paul Hsieh hash function */ +-#undef get16bits +-#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ +- || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) +-#define get16bits(d) (*((const uint16_t *) (d))) +-#endif +- +-#if !defined (get16bits) +-#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ +- +(uint32_t)(((const uint8_t *)(d))[0]) ) +-#endif +-#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- unsigned char *_sfh_key=(unsigned char*)(key); \ +- uint32_t _sfh_tmp, _sfh_len = keylen; \ +- \ +- int _sfh_rem = _sfh_len & 3; \ +- _sfh_len >>= 2; \ +- hashv = 0xcafebabe; \ +- \ +- /* Main loop */ \ +- for (;_sfh_len > 0; _sfh_len--) { \ +- hashv += get16bits (_sfh_key); \ +- _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \ +- hashv = (hashv << 16) ^ _sfh_tmp; \ +- _sfh_key += 2*sizeof (uint16_t); \ +- hashv += hashv >> 11; \ +- } \ +- \ +- /* Handle end cases */ \ +- switch (_sfh_rem) { \ +- case 3: hashv += get16bits (_sfh_key); \ +- hashv ^= hashv << 16; \ +- hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \ +- hashv += hashv >> 11; \ +- break; \ +- case 2: hashv += get16bits (_sfh_key); \ +- hashv ^= hashv << 11; \ +- hashv += hashv >> 17; \ +- break; \ +- case 1: hashv += *_sfh_key; \ +- hashv ^= hashv << 10; \ +- hashv += hashv >> 1; \ +- } \ +- \ +- /* Force "avalanching" of final 127 bits */ \ +- hashv ^= hashv << 3; \ +- hashv += hashv >> 5; \ +- hashv ^= hashv << 4; \ +- hashv += hashv >> 17; \ +- hashv ^= hashv << 25; \ +- hashv += hashv >> 6; \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +- +-#ifdef HASH_USING_NO_STRICT_ALIASING +-/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. +- * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. +- * MurmurHash uses the faster approach only on CPU's where we know it's safe. +- * +- * Note the preprocessor built-in defines can be emitted using: +- * +- * gcc -m64 -dM -E - < /dev/null (on gcc) +- * cc -## a.c (where a.c is a simple test file) (Sun Studio) +- */ +-#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) +-#define MUR_GETBLOCK(p,i) p[i] +-#else /* non intel */ +-#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0) +-#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1) +-#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2) +-#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3) +-#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) +-#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) +-#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) +-#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) +-#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) +-#else /* assume little endian non-intel */ +-#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) +-#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) +-#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) +-#endif +-#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ +- (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \ +- (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \ +- MUR_ONE_THREE(p)))) +-#endif +-#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) +-#define MUR_FMIX(_h) \ +-do { \ +- _h ^= _h >> 16; \ +- _h *= 0x85ebca6b; \ +- _h ^= _h >> 13; \ +- _h *= 0xc2b2ae35l; \ +- _h ^= _h >> 16; \ +-} while(0) +- +-#define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \ +-do { \ +- const uint8_t *_mur_data = (const uint8_t*)(key); \ +- const int _mur_nblocks = (keylen) / 4; \ +- uint32_t _mur_h1 = 0xf88D5353; \ +- uint32_t _mur_c1 = 0xcc9e2d51; \ +- uint32_t _mur_c2 = 0x1b873593; \ +- uint32_t _mur_k1 = 0; \ +- const uint8_t *_mur_tail; \ +- const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \ +- int _mur_i; \ +- for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \ +- _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \ +- _mur_k1 *= _mur_c1; \ +- _mur_k1 = MUR_ROTL32(_mur_k1,15); \ +- _mur_k1 *= _mur_c2; \ +- \ +- _mur_h1 ^= _mur_k1; \ +- _mur_h1 = MUR_ROTL32(_mur_h1,13); \ +- _mur_h1 = _mur_h1*5+0xe6546b64; \ +- } \ +- _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \ +- _mur_k1=0; \ +- switch((keylen) & 3) { \ +- case 3: _mur_k1 ^= _mur_tail[2] << 16; \ +- case 2: _mur_k1 ^= _mur_tail[1] << 8; \ +- case 1: _mur_k1 ^= _mur_tail[0]; \ +- _mur_k1 *= _mur_c1; \ +- _mur_k1 = MUR_ROTL32(_mur_k1,15); \ +- _mur_k1 *= _mur_c2; \ +- _mur_h1 ^= _mur_k1; \ +- } \ +- _mur_h1 ^= (keylen); \ +- MUR_FMIX(_mur_h1); \ +- hashv = _mur_h1; \ +- bkt = hashv & (num_bkts-1); \ +-} while(0) +-#endif /* HASH_USING_NO_STRICT_ALIASING */ +- +-/* key comparison function; return 0 if keys equal */ +-#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) +- +-/* iterate over items in a known bucket to find desired item */ +-#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ +-do { \ +- if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \ +- else out=NULL; \ +- while (out) { \ +- if ((out)->hh.keylen == keylen_in) { \ +- if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \ +- } \ +- if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \ +- else out = NULL; \ +- } \ +-} while(0) +- +-/* add an item to a bucket */ +-#define HASH_ADD_TO_BKT(head,addhh) \ +-do { \ +- head.count++; \ +- (addhh)->hh_next = head.hh_head; \ +- (addhh)->hh_prev = NULL; \ +- if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \ +- (head).hh_head=addhh; \ +- if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \ +- && (addhh)->tbl->noexpand != 1) { \ +- HASH_EXPAND_BUCKETS((addhh)->tbl); \ +- } \ +-} while(0) +- +-/* remove an item from a given bucket */ +-#define HASH_DEL_IN_BKT(hh,head,hh_del) \ +- (head).count--; \ +- if ((head).hh_head == hh_del) { \ +- (head).hh_head = hh_del->hh_next; \ +- } \ +- if (hh_del->hh_prev) { \ +- hh_del->hh_prev->hh_next = hh_del->hh_next; \ +- } \ +- if (hh_del->hh_next) { \ +- hh_del->hh_next->hh_prev = hh_del->hh_prev; \ +- } +- +-/* Bucket expansion has the effect of doubling the number of buckets +- * and redistributing the items into the new buckets. Ideally the +- * items will distribute more or less evenly into the new buckets +- * (the extent to which this is true is a measure of the quality of +- * the hash function as it applies to the key domain). +- * +- * With the items distributed into more buckets, the chain length +- * (item count) in each bucket is reduced. Thus by expanding buckets +- * the hash keeps a bound on the chain length. This bounded chain +- * length is the essence of how a hash provides constant time lookup. +- * +- * The calculation of tbl->ideal_chain_maxlen below deserves some +- * explanation. First, keep in mind that we're calculating the ideal +- * maximum chain length based on the *new* (doubled) bucket count. +- * In fractions this is just n/b (n=number of items,b=new num buckets). +- * Since the ideal chain length is an integer, we want to calculate +- * ceil(n/b). We don't depend on floating point arithmetic in this +- * hash, so to calculate ceil(n/b) with integers we could write +- * +- * ceil(n/b) = (n/b) + ((n%b)?1:0) +- * +- * and in fact a previous version of this hash did just that. +- * But now we have improved things a bit by recognizing that b is +- * always a power of two. We keep its base 2 log handy (call it lb), +- * so now we can write this with a bit shift and logical AND: +- * +- * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) +- * +- */ +-#define HASH_EXPAND_BUCKETS(tbl) \ +-do { \ +- unsigned _he_bkt; \ +- unsigned _he_bkt_i; \ +- struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ +- UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ +- _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ +- 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ +- if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ +- memset(_he_new_buckets, 0, \ +- 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ +- tbl->ideal_chain_maxlen = \ +- (tbl->num_items >> (tbl->log2_num_buckets+1)) + \ +- ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \ +- tbl->nonideal_items = 0; \ +- for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ +- { \ +- _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ +- while (_he_thh) { \ +- _he_hh_nxt = _he_thh->hh_next; \ +- HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \ +- _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ +- if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ +- tbl->nonideal_items++; \ +- _he_newbkt->expand_mult = _he_newbkt->count / \ +- tbl->ideal_chain_maxlen; \ +- } \ +- _he_thh->hh_prev = NULL; \ +- _he_thh->hh_next = _he_newbkt->hh_head; \ +- if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \ +- _he_thh; \ +- _he_newbkt->hh_head = _he_thh; \ +- _he_thh = _he_hh_nxt; \ +- } \ +- } \ +- uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ +- tbl->num_buckets *= 2; \ +- tbl->log2_num_buckets++; \ +- tbl->buckets = _he_new_buckets; \ +- tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ +- (tbl->ineff_expands+1) : 0; \ +- if (tbl->ineff_expands > 1) { \ +- tbl->noexpand=1; \ +- uthash_noexpand_fyi(tbl); \ +- } \ +- uthash_expand_fyi(tbl); \ +-} while(0) +- +- +-/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ +-/* Note that HASH_SORT assumes the hash handle name to be hh. +- * HASH_SRT was added to allow the hash handle name to be passed in. */ +-#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) +-#define HASH_SRT(hh,head,cmpfcn) \ +-do { \ +- unsigned _hs_i; \ +- unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ +- struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ +- if (head) { \ +- _hs_insize = 1; \ +- _hs_looping = 1; \ +- _hs_list = &((head)->hh); \ +- while (_hs_looping) { \ +- _hs_p = _hs_list; \ +- _hs_list = NULL; \ +- _hs_tail = NULL; \ +- _hs_nmerges = 0; \ +- while (_hs_p) { \ +- _hs_nmerges++; \ +- _hs_q = _hs_p; \ +- _hs_psize = 0; \ +- for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ +- _hs_psize++; \ +- _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ +- ((void*)((char*)(_hs_q->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- if (! (_hs_q) ) break; \ +- } \ +- _hs_qsize = _hs_insize; \ +- while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \ +- if (_hs_psize == 0) { \ +- _hs_e = _hs_q; \ +- _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ +- ((void*)((char*)(_hs_q->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- _hs_qsize--; \ +- } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \ +- _hs_e = _hs_p; \ +- if (_hs_p){ \ +- _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ +- ((void*)((char*)(_hs_p->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- } \ +- _hs_psize--; \ +- } else if (( \ +- cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ +- DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ +- ) <= 0) { \ +- _hs_e = _hs_p; \ +- if (_hs_p){ \ +- _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ +- ((void*)((char*)(_hs_p->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- } \ +- _hs_psize--; \ +- } else { \ +- _hs_e = _hs_q; \ +- _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ +- ((void*)((char*)(_hs_q->next) + \ +- (head)->hh.tbl->hho)) : NULL); \ +- _hs_qsize--; \ +- } \ +- if ( _hs_tail ) { \ +- _hs_tail->next = ((_hs_e) ? \ +- ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ +- } else { \ +- _hs_list = _hs_e; \ +- } \ +- if (_hs_e) { \ +- _hs_e->prev = ((_hs_tail) ? \ +- ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ +- } \ +- _hs_tail = _hs_e; \ +- } \ +- _hs_p = _hs_q; \ +- } \ +- if (_hs_tail){ \ +- _hs_tail->next = NULL; \ +- } \ +- if ( _hs_nmerges <= 1 ) { \ +- _hs_looping=0; \ +- (head)->hh.tbl->tail = _hs_tail; \ +- DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ +- } \ +- _hs_insize *= 2; \ +- } \ +- HASH_FSCK(hh,head); \ +- } \ +-} while (0) +- +-/* This function selects items from one hash into another hash. +- * The end result is that the selected items have dual presence +- * in both hashes. There is no copy of the items made; rather +- * they are added into the new hash through a secondary hash +- * hash handle that must be present in the structure. */ +-#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ +-do { \ +- unsigned _src_bkt, _dst_bkt; \ +- void *_last_elt=NULL, *_elt; \ +- UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ +- ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ +- if (src) { \ +- for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ +- for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ +- _src_hh; \ +- _src_hh = _src_hh->hh_next) { \ +- _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ +- if (cond(_elt)) { \ +- _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ +- _dst_hh->key = _src_hh->key; \ +- _dst_hh->keylen = _src_hh->keylen; \ +- _dst_hh->hashv = _src_hh->hashv; \ +- _dst_hh->prev = _last_elt; \ +- _dst_hh->next = NULL; \ +- if (_last_elt_hh) { _last_elt_hh->next = _elt; } \ +- if (!dst) { \ +- DECLTYPE_ASSIGN(dst,_elt); \ +- HASH_MAKE_TABLE(hh_dst,dst); \ +- } else { \ +- _dst_hh->tbl = (dst)->hh_dst.tbl; \ +- } \ +- HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ +- HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ +- (dst)->hh_dst.tbl->num_items++; \ +- _last_elt = _elt; \ +- _last_elt_hh = _dst_hh; \ +- } \ +- } \ +- } \ +- } \ +- HASH_FSCK(hh_dst,dst); \ +-} while (0) +- +-#define HASH_CLEAR(hh,head) \ +-do { \ +- if (head) { \ +- uthash_free((head)->hh.tbl->buckets, \ +- (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ +- HASH_BLOOM_FREE((head)->hh.tbl); \ +- uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ +- (head)=NULL; \ +- } \ +-} while(0) +- +-#define HASH_OVERHEAD(hh,head) \ +- (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ +- ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ +- (sizeof(UT_hash_table)) + \ +- (HASH_BLOOM_BYTELEN))) +- +-#ifdef NO_DECLTYPE +-#define HASH_ITER(hh,head,el,tmp) \ +-for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ +- el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) +-#else +-#define HASH_ITER(hh,head,el,tmp) \ +-for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ +- el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL)) +-#endif +- +-/* obtain a count of items in the hash */ +-#define HASH_COUNT(head) HASH_CNT(hh,head) +-#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0) +- +-typedef struct UT_hash_bucket { +- struct UT_hash_handle *hh_head; +- unsigned count; +- +- /* expand_mult is normally set to 0. In this situation, the max chain length +- * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If +- * the bucket's chain exceeds this length, bucket expansion is triggered). +- * However, setting expand_mult to a non-zero value delays bucket expansion +- * (that would be triggered by additions to this particular bucket) +- * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. +- * (The multiplier is simply expand_mult+1). The whole idea of this +- * multiplier is to reduce bucket expansions, since they are expensive, in +- * situations where we know that a particular bucket tends to be overused. +- * It is better to let its chain length grow to a longer yet-still-bounded +- * value, than to do an O(n) bucket expansion too often. +- */ +- unsigned expand_mult; +- +-} UT_hash_bucket; +- +-/* random signature used only to find hash tables in external analysis */ +-#define HASH_SIGNATURE 0xa0111fe1 +-#define HASH_BLOOM_SIGNATURE 0xb12220f2 +- +-typedef struct UT_hash_table { +- UT_hash_bucket *buckets; +- unsigned num_buckets, log2_num_buckets; +- unsigned num_items; +- struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ +- ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ +- +- /* in an ideal situation (all buckets used equally), no bucket would have +- * more than ceil(#items/#buckets) items. that's the ideal chain length. */ +- unsigned ideal_chain_maxlen; +- +- /* nonideal_items is the number of items in the hash whose chain position +- * exceeds the ideal chain maxlen. these items pay the penalty for an uneven +- * hash distribution; reaching them in a chain traversal takes >ideal steps */ +- unsigned nonideal_items; +- +- /* ineffective expands occur when a bucket doubling was performed, but +- * afterward, more than half the items in the hash had nonideal chain +- * positions. If this happens on two consecutive expansions we inhibit any +- * further expansion, as it's not helping; this happens when the hash +- * function isn't a good fit for the key domain. When expansion is inhibited +- * the hash will still work, albeit no longer in constant time. */ +- unsigned ineff_expands, noexpand; +- +- uint32_t signature; /* used only to find hash tables in external analysis */ +-#ifdef HASH_BLOOM +- uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ +- uint8_t *bloom_bv; +- char bloom_nbits; +-#endif +- +-} UT_hash_table; +- +-typedef struct UT_hash_handle { +- struct UT_hash_table *tbl; +- void *prev; /* prev element in app order */ +- void *next; /* next element in app order */ +- struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ +- struct UT_hash_handle *hh_next; /* next hh in bucket order */ +- void *key; /* ptr to enclosing struct's key */ +- unsigned keylen; /* enclosing struct's key len */ +- unsigned hashv; /* result of hash-fcn(key) */ +-} UT_hash_handle; +- +-#endif /* UTHASH_H */ +-- +2.15.1 + diff --git a/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init b/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init new file mode 100644 index 0000000000..d2a27b2732 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init @@ -0,0 +1,89 @@ +#! /bin/sh + +# Based on the Debian initscript for mosquitto + +### BEGIN INIT INFO +# Provides: mosquitto +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: mosquitto MQTT v3.1 message broker +# Description: +# This is a message broker that supports version 3.1 of the MQ Telemetry +# Transport (MQTT) protocol. +# +# MQTT provides a method of carrying out messaging using a publish/subscribe +# model. It is lightweight, both in terms of bandwidth usage and ease of +# implementation. This makes it particularly useful at the edge of the network +# where a sensor or other simple device may be implemented using an arduino for +# example. +### END INIT INFO + +set -e + +PIDFILE=@LOCALSTATEDIR@/run/mosquitto.pid +DAEMON=@SBINDIR@/mosquitto + +# start and stop the mosquitto MQTT message broker + +test -x ${DAEMON} || exit 0 + +umask 022 + +. @SYSCONFDIR@/init.d/functions + +export PATH="${PATH:+$PATH:}@SBINDIR@:@BASE_SBINDIR@" + +case "$1" in + start) + echo "Starting Mosquitto message broker" "mosquitto" + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} ; then + exit 0 + else + exit 1 + fi + ;; + stop) + echo "Stopping Mosquitto message broker" "mosquitto" + if start-stop-daemon --stop --quiet --oknodo --pidfile ${PIDFILE}; then + rm -f ${PIDFILE} + exit 0 + else + exit 1 + fi + ;; + + + reload|force-reload) + if [ -f ${PIDFILE} ] ; then + echo "Reloading configuration for mosquitto" + pid=`cat ${PIDFILE}` + kill -HUP $pid + else + echo "mosquitto does not seem to be running" + fi + ;; + + restart) + echo "Restarting Mosquitto message broker" "mosquitto" + if start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile ${PIDFILE}; then + rm -f ${PIDFILE} + fi + if start-stop-daemon --start --quiet --oknodo --background --make-pidfile --pidfile ${PIDFILE} --exec ${DAEMON} -- -c @SYSCONFDIR@/mosquitto/mosquitto.conf ; then + exit 0 + else + exit 1 + fi + ;; + + status) + status ${DAEMON} && exit 0 || exit $? + ;; + + *) + echo "Usage: $0 {start|stop|reload|force-reload|restart|status}" + exit 1 +esac + +exit 0 diff --git a/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.service b/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.service new file mode 100644 index 0000000000..25f68fae05 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.service @@ -0,0 +1,15 @@ +[Unit] +Description=Mosquitto - lightweight server implementation of the MQTT and MQTT-SN protocols +ConditionPathExists=/etc/mosquitto/mosquitto.conf +After=network.target + +[Service] +Type=simple +ExecStartPre=/bin/rm -f /var/run/mosquitto.pid +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/var/run/mosquitto.pid +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb new file mode 100644 index 0000000000..13ce3811d4 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.14.bb @@ -0,0 +1,83 @@ +SUMMARY = "Open source MQTT v3.1/3.1.1 implemention" +DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker that implements the MQ Telemetry Transport protocol version 3.1 and 3.1.1. MQTT provides a lightweight method of carrying out messaging using a publish/subscribe model. " +HOMEPAGE = "http://mosquitto.org/" +SECTION = "console/network" +LICENSE = "EPL-1.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \ + file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ + file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \ + file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \ +" +DEPENDS = "uthash" + +SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ + file://0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch \ + file://0002-uthash-remove-in-tree-version.patch \ + file://mosquitto.service \ + file://mosquitto.init \ +" + +SRC_URI[md5sum] = "6b0966e93f118bc71ad7b61600a6c2d3" +SRC_URI[sha256sum] = "156b1fa731d12baad4b8b22f7b6a8af50ba881fc711b81e9919ec103cf2942d1" + +inherit systemd update-rc.d useradd + +PACKAGECONFIG ??= "ssl uuid" + +PACKAGECONFIG[dns-srv] = ",,c-ares" +PACKAGECONFIG[ssl] = ",,openssl" +PACKAGECONFIG[uuid] = ",,util-linux" +EXTRA_OEMAKE = "${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \ + STRIP=/bin/true \ + WITH_DOCS=no \ + ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)}" + +export LIB_SUFFIX="${@d.getVar('baselib', True).replace('lib', '')}" + +do_compile() { + oe_runmake PREFIX=${prefix} +} + +do_install() { + oe_runmake install DESTDIR=${D} + install -d ${D}${libdir} + install -m 0644 lib/libmosquitto.a ${D}${libdir}/ + + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/mosquitto.service ${D}${systemd_unitdir}/system/ + + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${sysconfdir}/init.d/mosquitto +} + +PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" + +FILES_${PN} = "${sbindir}/mosquitto \ + ${bindir}/mosquitto_passwd \ + ${sysconfdir}/mosquitto \ + ${sysconfdir}/init.d \ + ${systemd_unitdir}/system/mosquitto.service \ +" + +FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" + +FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" + +FILES_${PN}-clients = "${bindir}/mosquitto_pub \ + ${bindir}/mosquitto_sub \ +" + +SYSTEMD_SERVICE_${PN} = "mosquitto.service" + +INITSCRIPT_NAME = "mosquitto" +INITSCRIPT_PARAMS = "defaults 30" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \ + --user-group mosquitto" diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb index cce3f91880..1b604ad529 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.8.bb @@ -26,7 +26,7 @@ USERADD_PARAM_${PN} = "--system nm-openvpn" FILES_${PN} += " \ ${libdir}/NetworkManager/*.so \ - ${libdir}/NetworkManager/VPN/nm-openvpn-service.name \ + ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ " FILES_${PN}-staticdev += " \ diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch deleted file mode 100644 index ced0c7cfff..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-adjust-net-headers-for-musl-compatibility.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 047d3bf96b510740f64687480333c378e414995f Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 15:57:05 -0700 -Subject: [PATCH 1/5] adjust net/ headers for musl compatibility - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libnm-core/nm-utils.c | 12 +++++++----- - libnm-core/nm-utils.h | 5 ++--- - src/platform/wifi/wifi-utils.h | 2 +- - 3 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c -index df75d56..868224e 100644 ---- a/libnm-core/nm-utils.c -+++ b/libnm-core/nm-utils.c -@@ -19,24 +19,26 @@ - * Copyright 2005 - 2014 Red Hat, Inc. - */ - --#include "nm-default.h" -- --#include "nm-utils.h" -- - #include <string.h> - #include <errno.h> - #include <stdlib.h> --#include <netinet/ether.h> - #include <arpa/inet.h> - #include <uuid/uuid.h> - #include <libintl.h> - #include <gmodule.h> - #include <sys/stat.h> -+//#include <net/if_arp.h> -+//#include <net/ethernet.h> -+#include <netinet/ether.h> -+ -+#include "nm-default.h" - -+#include "nm-utils.h" - #if WITH_JANSSON - #include <jansson.h> - #endif - -+ - #include "nm-common-macros.h" - #include "nm-utils-private.h" - #include "nm-setting-private.h" -diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h -index 407c14e..156ccae 100644 ---- a/libnm-core/nm-utils.h -+++ b/libnm-core/nm-utils.h -@@ -27,11 +27,10 @@ - - #include <glib.h> - --#include <netinet/in.h> -- - /* For ETH_ALEN and INFINIBAND_ALEN */ --#include <linux/if_ether.h> -+//#include <linux/if_ether.h> - #include <linux/if_infiniband.h> -+#include <netinet/in.h> - - #include "nm-core-enum-types.h" - #include "nm-setting-wireless-security.h" -diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h -index 8e2b93f..84f5ce9 100644 ---- a/src/platform/wifi/wifi-utils.h -+++ b/src/platform/wifi/wifi-utils.h -@@ -22,7 +22,7 @@ - #ifndef __WIFI_UTILS_H__ - #define __WIFI_UTILS_H__ - --#include <net/ethernet.h> -+//#include <net/ethernet.h> - - #include "nm-dbus-interface.h" - --- -2.12.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch deleted file mode 100644 index 26f380bf98..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-check-for-strndupa-before-using-it.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 05e8bd664d0244cb8ab4376b962830b97860f6bf Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 18:37:19 -0700 -Subject: [PATCH] check for strndupa before using it - -musl does not have strndupa - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - config.h.in | 4 ++++ - configure.ac | 1 + - src/systemd/src/basic/alloc-util.h | 12 ++++++++++++ - 3 files changed, 17 insertions(+) - -diff --git a/config.h.in b/config.h.in -index db8c135..c4229ed 100644 ---- a/config.h.in -+++ b/config.h.in -@@ -41,6 +41,10 @@ - */ - #undef HAVE_DCGETTEXT - -+/* Define to 1 if you have the declaration of `strndupa', and to 0 if you -+ don't. */ -+#undef HAVE_DECL_STRNDUPA -+ - /* Define to 1 if you have the <dlfcn.h> header file. */ - #undef HAVE_DLFCN_H - -diff --git a/configure.ac b/configure.ac -index 2630f8d..d0a57fd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -54,6 +54,7 @@ AC_SUBST(NM_VERSION) - - GIT_SHA_RECORD(NM_GIT_SHA) - -+AC_CHECK_DECLS([strndupa], [], [], [[#include <string.h>]]) - dnl - dnl Checks for typedefs, structures, and compiler characteristics. - dnl -diff --git a/src/systemd/src/basic/alloc-util.h b/src/systemd/src/basic/alloc-util.h -index ceeee51..924b59c 100644 ---- a/src/systemd/src/basic/alloc-util.h -+++ b/src/systemd/src/basic/alloc-util.h -@@ -25,6 +25,18 @@ - #include <string.h> - - #include "macro.h" -+#include "config.h" -+ -+#if !HAVE_DECL_STRNDUPA -+#define strndupa(s, n) \ -+ ({ \ -+ const char *__old = (s); \ -+ size_t __len = strnlen(__old, (n)); \ -+ char *__new = (char *)alloca(__len + 1); \ -+ __new[__len] = '\0'; \ -+ (char *)memcpy(__new, __old, __len); \ -+ }) -+#endif - - #define new(t, n) ((t*) malloc_multiply(sizeof(t), (n))) - --- -2.12.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch deleted file mode 100644 index bd194a61d2..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-add-systemd-resolved-backend.patch +++ /dev/null @@ -1,621 +0,0 @@ -From: Sjoerd Simons <sjoerd@luon.net> -Date: Sun, 21 Aug 2016 21:46:02 +0200 -Subject: [PATCH] dns/resolved: add systemd-resolved backend - -Add initial DNS backend that pushes DNS information into -systemd-resolved. Backend is choosen by default if the systems -resolv.conv is setup to pointing to one of the standard resolved -locations. - -This doesn't handle global dns configuration. - -Signed-off-by: Sjoerd Simons <sjoerd@luon.net> - -https://bugzilla.gnome.org/show_bug.cgi?id=762540 - -Upstream-Status: Backport - ---- - man/NetworkManager.conf.xml | 10 +- - src/Makefile.am | 2 + - src/dns-manager/nm-dns-manager.c | 43 ++- - src/dns-manager/nm-dns-systemd-resolved.c | 427 ++++++++++++++++++++++++++++++ - src/dns-manager/nm-dns-systemd-resolved.h | 45 ++++ - 5 files changed, 523 insertions(+), 4 deletions(-) - create mode 100644 src/dns-manager/nm-dns-systemd-resolved.c - create mode 100644 src/dns-manager/nm-dns-systemd-resolved.h - -diff --git a/man/NetworkManager.conf.xml b/man/NetworkManager.conf.xml -index 6295b82..0a67ae5 100644 ---- a/man/NetworkManager.conf.xml -+++ b/man/NetworkManager.conf.xml -@@ -275,10 +275,12 @@ no-auto-default=* - <varlistentry> - <term><varname>dns</varname></term> - <listitem><para>Set the DNS (<filename>resolv.conf</filename>) processing mode.</para> -- <para><literal>default</literal>: The default if the key is -- not specified. NetworkManager will update -+ <para><literal>default</literal>: NetworkManager will update - <filename>resolv.conf</filename> to reflect the nameservers -- provided by currently active connections.</para> -+ provided by currently active connections. This is the default -+ if the key is not specified, unless the system is configured -+ to use systemd-resolved; in this case the default is -+ <literal>systemd-resolved</literal></para> - <para><literal>dnsmasq</literal>: NetworkManager will run - dnsmasq as a local caching nameserver, using a "split DNS" - configuration if you are connected to a VPN, and then update -@@ -288,6 +290,8 @@ no-auto-default=* - to unbound and dnssec-triggerd, providing a "split DNS" - configuration with DNSSEC support. The <filename>/etc/resolv.conf</filename> - will be managed by dnssec-trigger daemon.</para> -+ <para><literal>systemd-resolved</literal>: NetworkManager will -+ push the DNS configuration to systemd-resolved</para> - <para><literal>none</literal>: NetworkManager will not - modify resolv.conf. This implies - <literal>rc-manager</literal> <literal>unmanaged</literal></para> -diff --git a/src/Makefile.am b/src/Makefile.am -index 8d29b19..10f63de 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -345,6 +345,8 @@ libNetworkManager_la_SOURCES = \ - \ - dns-manager/nm-dns-dnsmasq.c \ - dns-manager/nm-dns-dnsmasq.h \ -+ dns-manager/nm-dns-systemd-resolved.c \ -+ dns-manager/nm-dns-systemd-resolved.h \ - dns-manager/nm-dns-unbound.c \ - dns-manager/nm-dns-unbound.h \ - dns-manager/nm-dns-manager.c \ -diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c -index 5a758a9..38bc786 100644 ---- a/src/dns-manager/nm-dns-manager.c -+++ b/src/dns-manager/nm-dns-manager.c -@@ -45,6 +45,7 @@ - - #include "nm-dns-plugin.h" - #include "nm-dns-dnsmasq.h" -+#include "nm-dns-systemd-resolved.h" - #include "nm-dns-unbound.h" - - #if WITH_LIBSOUP -@@ -1588,6 +1589,37 @@ _check_resconf_immutable (NMDnsManagerResolvConfManager rc_manager) - - NM_DEFINE_SINGLETON_GETTER (NMDnsManager, nm_dns_manager_get, NM_TYPE_DNS_MANAGER); - -+static gboolean -+_resolvconf_resolved_managed (void) -+{ -+ static const char *const resolved_paths[] = { -+ "/run/systemd/resolve/resolv.conf", -+ "/lib/systemd/resolv.conf", -+ "/usr/lib/systemd/resolv.conf", -+ }; -+ GFile *f; -+ GFileInfo *info; -+ gboolean ret = FALSE; -+ -+ f = g_file_new_for_path (_PATH_RESCONF); -+ info = g_file_query_info (f, -+ G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK","\ -+ G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET, -+ G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS, -+ NULL, NULL); -+ -+ if (info && g_file_info_get_is_symlink (info)) { -+ ret = _nm_utils_strv_find_first ((gchar **) resolved_paths, -+ G_N_ELEMENTS (resolved_paths), -+ g_file_info_get_symlink_target (info)) >= 0; -+ } -+ -+ g_clear_object(&info); -+ g_clear_object(&f); -+ -+ return ret; -+} -+ - static void - init_resolv_conf_mode (NMDnsManager *self, gboolean force_reload_plugin) - { -@@ -1633,7 +1665,16 @@ again: - - rc_manager = _check_resconf_immutable (rc_manager); - -- if (nm_streq0 (mode, "dnsmasq")) { -+ if ( (!mode && _resolvconf_resolved_managed ()) -+ || nm_streq0 (mode, "systemd-resolved")) { -+ if ( force_reload_plugin -+ || !NM_IS_DNS_SYSTEMD_RESOLVED (priv->plugin)) { -+ _clear_plugin (self); -+ priv->plugin = nm_dns_systemd_resolved_new (); -+ plugin_changed = TRUE; -+ } -+ mode = "systemd-resolved"; -+ } else if (nm_streq0 (mode, "dnsmasq")) { - if (force_reload_plugin || !NM_IS_DNS_DNSMASQ (priv->plugin)) { - _clear_plugin (self); - priv->plugin = nm_dns_dnsmasq_new (); -diff --git a/src/dns-manager/nm-dns-systemd-resolved.c b/src/dns-manager/nm-dns-systemd-resolved.c -new file mode 100644 -index 0000000..6bdd5f6 ---- /dev/null -+++ b/src/dns-manager/nm-dns-systemd-resolved.c -@@ -0,0 +1,427 @@ -+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -+/* -+ * Copyright (C) 2010 Dan Williams <dcbw@redhat.com> -+ * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net> -+ * -+ * 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 2, 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, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ */ -+ -+#include "nm-default.h" -+ -+#include "nm-dns-systemd-resolved.h" -+ -+#include <stdlib.h> -+#include <unistd.h> -+#include <sys/types.h> -+#include <sys/wait.h> -+#include <arpa/inet.h> -+#include <sys/stat.h> -+#include <linux/if.h> -+ -+#include "nm-core-internal.h" -+#include "nm-platform.h" -+#include "nm-utils.h" -+#include "nm-ip4-config.h" -+#include "nm-ip6-config.h" -+#include "nm-bus-manager.h" -+#include "nm-manager.h" -+#include "nm-device.h" -+#include "NetworkManagerUtils.h" -+ -+G_DEFINE_TYPE (NMDnsSystemdResolved, nm_dns_systemd_resolved, NM_TYPE_DNS_PLUGIN) -+ -+#define NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE(o) \ -+ (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DNS_SYSTEMD_RESOLVED, \ -+ NMDnsSystemdResolvedPrivate)) -+ -+#define SYSTEMD_RESOLVED_DBUS_SERVICE "org.freedesktop.resolve1" -+#define SYSTEMD_RESOLVED_DBUS_PATH "/org/freedesktop/resolve1" -+ -+typedef struct { -+ int ifindex; -+ GList *configs; -+} InterfaceConfig; -+ -+typedef struct { -+ GDBusProxy *resolve; -+ GCancellable *init_cancellable; -+ GCancellable *update_cancellable; -+ GQueue dns_updates; -+ GQueue domain_updates; -+} NMDnsSystemdResolvedPrivate; -+ -+/*****************************************************************************/ -+ -+#define _NMLOG_DOMAIN LOGD_DNS -+#define _NMLOG_PREFIX_NAME "systemd-resolved" -+#define _NMLOG(level, ...) \ -+ G_STMT_START { \ -+ nm_log ((level), _NMLOG_DOMAIN, \ -+ "%s[%p]: " _NM_UTILS_MACRO_FIRST(__VA_ARGS__), \ -+ _NMLOG_PREFIX_NAME, \ -+ (self) \ -+ _NM_UTILS_MACRO_REST(__VA_ARGS__)); \ -+ } G_STMT_END -+ -+/*****************************************************************************/ -+ -+static void -+call_done (GObject *source, GAsyncResult *r, gpointer user_data) -+{ -+ GVariant *v; -+ GError *error = NULL; -+ NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data; -+ -+ v = g_dbus_proxy_call_finish (G_DBUS_PROXY (source), r, &error); -+ -+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -+ return; -+ -+ if (error != NULL) { -+ _LOGW ("Failed: %s\n", error->message); -+ g_error_free (error); -+ } -+} -+ -+static void -+add_interface_configuration (NMDnsSystemdResolved *self, -+ GArray *interfaces, -+ const NMDnsIPConfigData *data) -+{ -+ int i; -+ InterfaceConfig *ic = NULL; -+ int ifindex; -+ NMDevice *device; -+ -+ if (NM_IS_IP4_CONFIG (data->config)) -+ ifindex = nm_ip4_config_get_ifindex (data->config); -+ else if (NM_IS_IP6_CONFIG (data->config)) -+ ifindex = nm_ip6_config_get_ifindex (data->config); -+ else -+ g_return_if_reached (); -+ -+ device = nm_manager_get_device_by_ifindex (nm_manager_get (), ifindex); -+ -+ if (!nm_device_get_managed (device, FALSE)) -+ return; -+ -+ for (i = 0; i < interfaces->len; i++) { -+ InterfaceConfig *tic = &g_array_index (interfaces, InterfaceConfig, i); -+ if (ifindex == tic->ifindex) { -+ ic = tic; -+ break; -+ } -+ } -+ -+ if (!ic) { -+ g_array_set_size (interfaces, interfaces->len + 1); -+ ic = &g_array_index (interfaces, InterfaceConfig, -+ interfaces->len - 1); -+ ic->ifindex = ifindex; -+ } -+ -+ ic->configs = g_list_append (ic->configs, data->config); -+} -+ -+static void -+add_domain (GVariantBuilder *domains, -+ const char *domain, -+ gboolean never_default) -+{ -+ /* If this link is never the default (e.g. only used for resources on this -+ * network) add a routing domain. */ -+ g_variant_builder_add (domains, "(sb)", domain, never_default); -+} -+ -+static void -+update_add_ip6_config (NMDnsSystemdResolved *self, -+ GVariantBuilder *dns, -+ GVariantBuilder *domains, -+ const NMIP6Config *config) -+{ -+ guint i, n; -+ -+ n = nm_ip6_config_get_num_nameservers (config); -+ for (i = 0 ; i < n; i++) { -+ const struct in6_addr *ip; -+ -+ g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)")); -+ g_variant_builder_add (dns, "i", AF_INET6); -+ ip = nm_ip6_config_get_nameserver (config, i), -+ -+ g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, ip, 16, 1)); -+ g_variant_builder_close (dns); -+ } -+ -+ n = nm_ip6_config_get_num_searches (config); -+ if (n > 0) { -+ for (i = 0; i < n; i++) { -+ add_domain (domains, nm_ip6_config_get_search (config, i), -+ nm_ip6_config_get_never_default (config)); -+ } -+ } else { -+ n = nm_ip6_config_get_num_domains (config); -+ for (i = 0; i < n; i++) { -+ add_domain (domains, nm_ip6_config_get_domain (config, i), -+ nm_ip6_config_get_never_default (config)); -+ } -+ } -+} -+ -+static void -+update_add_ip4_config (NMDnsSystemdResolved *self, -+ GVariantBuilder *dns, -+ GVariantBuilder *domains, -+ const NMIP4Config *config) -+{ -+ guint i, n; -+ -+ n = nm_ip4_config_get_num_nameservers (config); -+ for (i = 0 ; i < n; i++) { -+ guint32 ns; -+ -+ g_variant_builder_open (dns, G_VARIANT_TYPE ("(iay)")); -+ g_variant_builder_add (dns, "i", AF_INET); -+ ns = nm_ip4_config_get_nameserver (config, i), -+ -+ g_variant_builder_add_value (dns, g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, &ns, 4, 1)); -+ g_variant_builder_close (dns); -+ } -+ -+ n = nm_ip4_config_get_num_searches (config); -+ if (n > 0) { -+ for (i = 0; i < n; i++) { -+ add_domain (domains, nm_ip4_config_get_search (config, i), -+ nm_ip4_config_get_never_default (config)); -+ } -+ } else { -+ n = nm_ip4_config_get_num_domains (config); -+ for (i = 0; i < n; i++) { -+ add_domain (domains, nm_ip4_config_get_domain (config, i), -+ nm_ip4_config_get_never_default (config)); -+ } -+ } -+} -+ -+static void -+free_pending_updates (NMDnsSystemdResolved *self) -+{ -+ NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); -+ GVariant *v; -+ -+ while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL) -+ g_variant_unref (v); -+ -+ while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL) -+ g_variant_unref (v); -+} -+ -+static void -+prepare_one_interface (NMDnsSystemdResolved *self, InterfaceConfig *ic) -+{ -+ NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); -+ GVariantBuilder dns, domains; -+ GList *l; -+ -+ g_variant_builder_init (&dns, G_VARIANT_TYPE ("(ia(iay))")); -+ g_variant_builder_add (&dns, "i", ic->ifindex); -+ g_variant_builder_open (&dns, G_VARIANT_TYPE ("a(iay)")); -+ -+ g_variant_builder_init (&domains, G_VARIANT_TYPE ("(ia(sb))")); -+ g_variant_builder_add (&domains, "i", ic->ifindex); -+ g_variant_builder_open (&domains, G_VARIANT_TYPE ("a(sb)")); -+ -+ for (l = ic->configs ; l != NULL ; l = g_list_next (l)) { -+ if (NM_IS_IP4_CONFIG (l->data)) -+ update_add_ip4_config (self, &dns, &domains, l->data); -+ else if (NM_IS_IP6_CONFIG (l->data)) -+ update_add_ip6_config (self, &dns, &domains, l->data); -+ else -+ g_assert_not_reached (); -+ } -+ g_variant_builder_close (&dns); -+ g_variant_builder_close (&domains); -+ -+ g_queue_push_tail (&priv->dns_updates, -+ g_variant_ref_sink (g_variant_builder_end (&dns))); -+ g_queue_push_tail (&priv->domain_updates, -+ g_variant_ref_sink (g_variant_builder_end (&domains))); -+} -+ -+static void -+send_updates (NMDnsSystemdResolved *self) -+{ -+ NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); -+ GVariant *v; -+ -+ nm_clear_g_cancellable (&priv->update_cancellable); -+ -+ if (!priv->resolve) -+ return; -+ -+ priv->update_cancellable = g_cancellable_new (); -+ -+ while ((v = g_queue_pop_head (&priv->dns_updates)) != NULL) { -+ g_dbus_proxy_call (priv->resolve, "SetLinkDNS", v, -+ G_DBUS_CALL_FLAGS_NONE, -+ -1, priv->update_cancellable, call_done, self); -+ g_variant_unref (v); -+ } -+ -+ while ((v = g_queue_pop_head (&priv->domain_updates)) != NULL) { -+ g_dbus_proxy_call (priv->resolve, "SetLinkDomains", v, -+ G_DBUS_CALL_FLAGS_NONE, -+ -1, priv->update_cancellable, call_done, self); -+ g_variant_unref (v); -+ } -+} -+ -+static gboolean -+update (NMDnsPlugin *plugin, -+ const NMDnsIPConfigData **configs, -+ const NMGlobalDnsConfig *global_config, -+ const char *hostname) -+{ -+ NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (plugin); -+ GArray *interfaces = g_array_new (TRUE, TRUE, sizeof (InterfaceConfig)); -+ const NMDnsIPConfigData **c; -+ int i; -+ -+ for (c = configs; *c != NULL; c++) -+ add_interface_configuration (self, interfaces, *c); -+ -+ free_pending_updates (self); -+ -+ for (i = 0; i < interfaces->len; i++) { -+ InterfaceConfig *ic = &g_array_index (interfaces, InterfaceConfig, i); -+ -+ prepare_one_interface (self, ic); -+ g_list_free (ic->configs); -+ } -+ -+ g_array_free (interfaces, TRUE); -+ -+ send_updates (self); -+ -+ return TRUE; -+} -+ -+/****************************************************************/ -+ -+static gboolean -+is_caching (NMDnsPlugin *plugin) -+{ -+ return TRUE; -+} -+ -+static const char * -+get_name (NMDnsPlugin *plugin) -+{ -+ return "systemd-resolved"; -+} -+ -+/****************************************************************/ -+ -+NMDnsPlugin * -+nm_dns_systemd_resolved_new (void) -+{ -+ return g_object_new (NM_TYPE_DNS_SYSTEMD_RESOLVED, NULL); -+} -+ -+static void -+resolved_proxy_created (GObject *source, GAsyncResult *r, gpointer user_data) -+{ -+ NMDnsSystemdResolved *self = (NMDnsSystemdResolved *) user_data; -+ NMDnsSystemdResolvedPrivate *priv; -+ gs_free_error GError *error = NULL; -+ GDBusProxy *resolve; -+ -+ resolve = g_dbus_proxy_new_finish (r, &error); -+ if ( !resolve -+ && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) -+ return; -+ -+ priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); -+ g_clear_object (&priv->init_cancellable); -+ if (!resolve) { -+ _LOGW ("failed to connect to resolved via DBus: %s", error->message); -+ g_signal_emit_by_name (self, NM_DNS_PLUGIN_FAILED); -+ return; -+ } -+ -+ priv->resolve = resolve; -+ send_updates (self); -+} -+ -+ -+static void -+nm_dns_systemd_resolved_init (NMDnsSystemdResolved *self) -+{ -+ NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); -+ NMBusManager *dbus_mgr; -+ GDBusConnection *connection; -+ -+ g_queue_init (&priv->dns_updates); -+ g_queue_init (&priv->domain_updates); -+ -+ dbus_mgr = nm_bus_manager_get (); -+ g_return_if_fail (dbus_mgr); -+ -+ connection = nm_bus_manager_get_connection (dbus_mgr); -+ g_return_if_fail (connection); -+ -+ priv->init_cancellable = g_cancellable_new (); -+ g_dbus_proxy_new (connection, -+ G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES | -+ G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS, -+ NULL, -+ SYSTEMD_RESOLVED_DBUS_SERVICE, -+ SYSTEMD_RESOLVED_DBUS_PATH, -+ SYSTEMD_RESOLVED_DBUS_SERVICE ".Manager", -+ priv->init_cancellable, -+ resolved_proxy_created, -+ self); -+} -+ -+static void -+dispose (GObject *object) -+{ -+ NMDnsSystemdResolved *self = NM_DNS_SYSTEMD_RESOLVED (object); -+ NMDnsSystemdResolvedPrivate *priv = NM_DNS_SYSTEMD_RESOLVED_GET_PRIVATE (self); -+ -+ free_pending_updates (self); -+ g_clear_object (&priv->resolve); -+ nm_clear_g_cancellable (&priv->init_cancellable); -+ nm_clear_g_cancellable (&priv->update_cancellable); -+ -+ G_OBJECT_CLASS (nm_dns_systemd_resolved_parent_class)->dispose (object); -+} -+ -+static void -+nm_dns_systemd_resolved_class_init (NMDnsSystemdResolvedClass *dns_class) -+{ -+ NMDnsPluginClass *plugin_class = NM_DNS_PLUGIN_CLASS (dns_class); -+ GObjectClass *object_class = G_OBJECT_CLASS (dns_class); -+ -+ g_type_class_add_private (dns_class, sizeof (NMDnsSystemdResolvedPrivate)); -+ -+ object_class->dispose = dispose; -+ -+ plugin_class->is_caching = is_caching; -+ plugin_class->update = update; -+ plugin_class->get_name = get_name; -+} -+ -diff --git a/src/dns-manager/nm-dns-systemd-resolved.h b/src/dns-manager/nm-dns-systemd-resolved.h -new file mode 100644 -index 0000000..45c64b3 ---- /dev/null -+++ b/src/dns-manager/nm-dns-systemd-resolved.h -@@ -0,0 +1,45 @@ -+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -+/* 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 2, 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, write to the Free Software Foundation, Inc., -+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -+ * -+ * Copyright (C) 2010 Red Hat, Inc. -+ * Copyright (C) 2016 Sjoerd Simons <sjoerd@luon.net> -+ */ -+ -+#ifndef __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ -+#define __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ -+ -+#include "nm-dns-plugin.h" -+ -+#define NM_TYPE_DNS_SYSTEMD_RESOLVED (nm_dns_systemd_resolved_get_type ()) -+#define NM_DNS_SYSTEMD_RESOLVED(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolved)) -+#define NM_DNS_SYSTEMD_RESOLVED_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass)) -+#define NM_IS_DNS_SYSTEMD_RESOLVED(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED)) -+#define NM_IS_DNS_SYSTEMD_RESOLVED_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_DNS_SYSTEMD_RESOLVED)) -+#define NM_DNS_SYSTEMD_RESOLVED_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_DNS_SYSTEMD_RESOLVED, NMDnsSystemdResolvedClass)) -+ -+typedef struct { -+ NMDnsPlugin parent; -+} NMDnsSystemdResolved; -+ -+typedef struct { -+ NMDnsPluginClass parent; -+} NMDnsSystemdResolvedClass; -+ -+GType nm_dns_systemd_resolved_get_type (void); -+ -+NMDnsPlugin *nm_dns_systemd_resolved_new (void); -+ -+#endif /* __NETWORKMANAGER_DNS_SYSTEMD_RESOLVED_H__ */ -+ diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch deleted file mode 100644 index ca7e4a496f..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 6f799f1f0e68cc7bf89c0a56aec5ecf46937619d Mon Sep 17 00:00:00 2001 -From: Ricardo Salveti <rsalveti@rsalveti.net> -Date: Thu, 15 Jun 2017 10:02:38 -0300 -Subject: [PATCH] dns/resolved: also check for /etc/resolv-conf.systemd - -OE specific resolv.conf path, so it can be enabled by default if available. - -Upstream-Status: Inappropriate [OE config specific] - -Signed-off-by: Ricardo Salveti <rsalveti@rsalveti.net> ---- - src/dns-manager/nm-dns-manager.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/dns-manager/nm-dns-manager.c b/src/dns-manager/nm-dns-manager.c -index c1d2bf7..d70d4b4 100644 ---- a/src/dns-manager/nm-dns-manager.c -+++ b/src/dns-manager/nm-dns-manager.c -@@ -1596,6 +1596,7 @@ _resolvconf_resolved_managed (void) - "/run/systemd/resolve/resolv.conf", - "/lib/systemd/resolv.conf", - "/usr/lib/systemd/resolv.conf", -+ "/etc/resolv-conf.systemd", - }; - GFile *f; - GFileInfo *info; --- -2.7.4 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch deleted file mode 100644 index 5c9ed92b80..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 7dd40db6606c3b3559365a03944cb99aee5ceabc Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> -Date: Thu, 4 Apr 2013 12:57:58 +0200 -Subject: [PATCH] don't try to run /sbin/dhclient to get the version number, - this break cross-compiling -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Upstream-Status: Inappropriate [build system specific] - -Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> ---- - configure.ac | 6 ------ - 1 files changed, 0 insertions(+), 6 deletions(-) - -diff --git a/configure.ac b/configure.ac -index cc66e9b..7163287 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -488,12 +488,6 @@ AS_IF([test -z "$with_dhcpcd"], with_dhcpcd=yes) - # Search and check the executables - if test "$with_dhclient" = "yes"; then - AC_PATH_PROGS(with_dhclient, dhclient, no, /sbin:/usr/sbin:/usr/local/sbin) -- if test "$with_dhclient" != "no"; then -- if ! $with_dhclient --version 2>&1 | grep -q "^isc-dhclient-4\."; then -- AC_MSG_WARN([Cannot use dhclient, version 4.x is required]) -- with_dhclient=no -- fi -- fi - fi - if test "$with_dhcpcd" = "yes"; then - AC_PATH_PROGS(with_dhcpcd, dhcpcd, no, /sbin:/usr/sbin:/usr/local/sbin) --- -1.7.6.5 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch new file mode 100644 index 0000000000..7194423192 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch @@ -0,0 +1,40 @@ +From 18f71c1b48730b8602826517f2b5b088283ae948 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 31 Mar 2017 16:48:00 -0700 +Subject: [PATCH 5/7] sd-lldp.h: Remove net/ethernet.h seems to be over + specified + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/systemd/src/libsystemd-network/sd-lldp.c | 1 + + src/systemd/src/systemd/sd-lldp.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/systemd/src/libsystemd-network/sd-lldp.c b/src/systemd/src/libsystemd-network/sd-lldp.c +index 31e2448..7721cc2 100644 +--- a/src/systemd/src/libsystemd-network/sd-lldp.c ++++ b/src/systemd/src/libsystemd-network/sd-lldp.c +@@ -21,6 +21,7 @@ + #include "nm-sd-adapt.h" + + #include <arpa/inet.h> ++#include <net/ethernet.h> + #include <linux/sockios.h> + + #include "sd-lldp.h" +diff --git a/src/systemd/src/systemd/sd-lldp.h b/src/systemd/src/systemd/sd-lldp.h +index 3f35eeb..61b0e45 100644 +--- a/src/systemd/src/systemd/sd-lldp.h ++++ b/src/systemd/src/systemd/sd-lldp.h +@@ -22,7 +22,7 @@ + ***/ + + #include <inttypes.h> +-#include <net/ethernet.h> ++//#include <net/ethernet.h> + #include <sys/types.h> + + #include "sd-event.h" +-- +2.14.1 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch deleted file mode 100644 index 4234e2be2d..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a9bfe6f2029d75caf28fcdf3e740843cf6359615 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 27 Jun 2017 07:31:25 -0700 -Subject: [PATCH 1/2] systemd: xlocale.h is dropped by newer glibc - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/systemd/src/basic/parse-util.c | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c -index 9c21e5a..dd95d1f 100644 ---- a/src/systemd/src/basic/parse-util.c -+++ b/src/systemd/src/basic/parse-util.c -@@ -25,11 +25,7 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> --#ifdef __GLIBC__ --#include <xlocale.h> --#else - #include <locale.h> --#endif - #include "alloc-util.h" - #include "extract-word.h" - #include "macro.h" --- -2.13.2 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch deleted file mode 100644 index aa57c832cb..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fix-nm-version-macro-includes.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 7274bbadd398a69b8babf47431f80d35e0228c42 Mon Sep 17 00:00:00 2001 -From: Adrian Freihofer <adrian.freihofer@gmail.com> -Date: Mon, 18 Jan 2016 08:53:26 +0100 -Subject: [PATCH] Fix nm-version-macro includes - -nm-version-macros.h cannot be found since include directive has -been changed from " to <. This breaks for example gnome-panel -build: -/usr/include/NetworkManager/NetworkManager.h:31:31: -fatal error: nm-version-macros.h: No such file or directory. ---- - libnm-core/nm-version.h | 2 +- - libnm-util/NetworkManager.h | 2 +- - libnm-util/nm-version.h | 2 +- - 3 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/libnm-core/nm-version.h b/libnm-core/nm-version.h -index 730330a..d751bc1 100644 ---- a/libnm-core/nm-version.h -+++ b/libnm-core/nm-version.h -@@ -23,7 +23,7 @@ - - #include <glib.h> - --#include <nm-version-macros.h> -+#include "nm-version-macros.h" - - /* Deprecation / Availability macros */ - -diff --git a/libnm-util/NetworkManager.h b/libnm-util/NetworkManager.h -index d83e4ab..3a964fc 100644 ---- a/libnm-util/NetworkManager.h -+++ b/libnm-util/NetworkManager.h -@@ -28,7 +28,7 @@ - - /* This header must not include glib or libnm. */ - --#include <nm-version-macros.h> -+#include "nm-version-macros.h" - - /* - * dbus services details -diff --git a/libnm-util/nm-version.h b/libnm-util/nm-version.h -index 63895dd..41101a4 100644 ---- a/libnm-util/nm-version.h -+++ b/libnm-util/nm-version.h -@@ -23,7 +23,7 @@ - - #include <glib.h> - --#include <nm-version-macros.h> -+#include "nm-version-macros.h" - - /* Deprecation / Availability macros */ - --- -2.5.0 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch new file mode 100644 index 0000000000..28848d3543 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch @@ -0,0 +1,25 @@ +From 583f0448fb7e9aba2b410c06eec6f420b41a6a0c Mon Sep 17 00:00:00 2001 +From: Pablo Saavedra <psaavedra@igalia.com> +Date: Tue, 13 Mar 2018 17:36:20 +0100 +Subject: [PATCH 7/7] Fixed configure.ac: Fix pkgconfig sysroot locations + +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 51e5eb6..c9d3e56 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -669,7 +669,7 @@ else + AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) + + AC_CHECK_TOOLS(READELF, [eu-readelf readelf]) +- JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson` ++ JANSSON_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=libdir jansson` + JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'` + + if test "$JANSSON_SONAME" = ""; then +-- +2.14.1 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch deleted file mode 100644 index 22bc6e8bda..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-socket-util.h-Include-linux-sockios.h-on-musl.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 98d7e3ae5b15e30af1bf5dd1d279e1a774bf2b86 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 16:05:05 -0700 -Subject: [PATCH 2/5] socket-util.h: Include linux/sockios.h on musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/systemd/src/basic/socket-util.h | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h -index 2536b08..76d6107 100644 ---- a/src/systemd/src/basic/socket-util.h -+++ b/src/systemd/src/basic/socket-util.h -@@ -29,6 +29,12 @@ - #include <linux/netlink.h> - #include <linux/if_packet.h> - -+#if !defined(__GLIBC__) -+/* SIOCGSTAMPNS from linux/asm-generic.h -+ * for src/systemd/src/libsystemd-network/sd-lldp.c */ -+#include <linux/sockios.h> -+#endif -+ - #include "macro.h" - #include "util.h" - --- -2.12.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch deleted file mode 100644 index e32b5c00dd..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-user-format-string-in-g_dbus_message_new_method_erro.patch +++ /dev/null @@ -1,67 +0,0 @@ -From adc0668b854289a11cfc29597b5566ba1869d17e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 27 Jun 2017 07:32:09 -0700 -Subject: [PATCH 2/2] user format string in g_dbus_message_new_method_error () - -This fixes format errors with -Werror=format-security - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/nm-manager.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/nm-manager.c b/src/nm-manager.c -index c3d65cd..e814912 100644 ---- a/src/nm-manager.c -+++ b/src/nm-manager.c -@@ -4871,6 +4871,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, - if (error || (result != NM_AUTH_CALL_RESULT_YES)) { - reply = g_dbus_message_new_method_error (pfd->message, - NM_PERM_DENIED_ERROR, -+ "%s", - (error_message = "Not authorized to perform this operation")); - if (error) - error_message = error->message; -@@ -4882,6 +4883,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, - if (!object) { - reply = g_dbus_message_new_method_error (pfd->message, - "org.freedesktop.DBus.Error.UnknownObject", -+ "%s", - (error_message = "Object doesn't exist.")); - goto done; - } -@@ -4890,6 +4892,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, - if (!nm_exported_object_get_interface_by_type (object, pfd->interface_type)) { - reply = g_dbus_message_new_method_error (pfd->message, - "org.freedesktop.DBus.Error.InvalidArgs", -+ "%s", - (error_message = "Object is of unexpected type.")); - goto done; - } -@@ -4905,6 +4908,7 @@ prop_set_auth_done_cb (NMAuthChain *chain, - if (global_dns && !nm_global_dns_config_is_internal (global_dns)) { - reply = g_dbus_message_new_method_error (pfd->message, - NM_PERM_DENIED_ERROR, -+ "%s", - (error_message = "Global DNS configuration already set via configuration file")); - goto done; - } -@@ -4949,6 +4953,7 @@ do_set_property_check (gpointer user_data) - if (!pfd->subject) { - reply = g_dbus_message_new_method_error (pfd->message, - NM_PERM_DENIED_ERROR, -+ "%s", - (error_message = "Could not determine request UID.")); - goto out; - } -@@ -4958,6 +4963,7 @@ do_set_property_check (gpointer user_data) - if (!chain) { - reply = g_dbus_message_new_method_error (pfd->message, - NM_PERM_DENIED_ERROR, -+ "%s", - (error_message = "Could not authenticate request.")); - goto out; - } --- -2.13.2 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch deleted file mode 100644 index 236914f756..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Define-ETH_ALEN.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 16c3dc7a407101243d2056d2c93e61dce1a05350 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 16:08:45 -0700 -Subject: [PATCH 3/5] Define ETH_ALEN - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - libnm-core/nm-utils.h | 1 + - src/platform/wifi/wifi-utils.h | 2 ++ - 2 files changed, 3 insertions(+) - -diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h -index 156ccae..68e222b 100644 ---- a/libnm-core/nm-utils.h -+++ b/libnm-core/nm-utils.h -@@ -29,6 +29,7 @@ - - /* For ETH_ALEN and INFINIBAND_ALEN */ - //#include <linux/if_ether.h> -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ - #include <linux/if_infiniband.h> - #include <netinet/in.h> - -diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h -index 84f5ce9..33a838d 100644 ---- a/src/platform/wifi/wifi-utils.h -+++ b/src/platform/wifi/wifi-utils.h -@@ -24,6 +24,8 @@ - - //#include <net/ethernet.h> - -+#define ETH_ALEN 6 /* Octets in one ethernet addr */ -+ - #include "nm-dbus-interface.h" - - typedef struct WifiData WifiData; --- -2.12.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch new file mode 100644 index 0000000000..92485f0441 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch @@ -0,0 +1,77 @@ +From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 22 Mar 2018 11:08:30 +0100 +Subject: [PATCH] Do not create settings settings/property documentation +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It was tried to get this work but gi / GirRepository could not be found by +python. Anyway it is not necessary for us to have the settings/property docs. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + Makefile.am | 18 ++---------------- + configure.ac | 4 ---- + 2 files changed, 2 insertions(+), 20 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 639921d..314a61d 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -961,9 +961,7 @@ endif + if HAVE_INTROSPECTION + + libnm_noinst_data = \ +- libnm/nm-property-docs.xml \ + libnm/nm-settings-docs-overrides.xml \ +- libnm/nm-settings-docs.xml \ + libnm/nm-settings-keyfile-docs.xml \ + libnm/nm-settings-ifcfg-rh-docs.xml + +@@ -3317,23 +3315,11 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_core_lib_h_pub_mkenums) + $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp + + clients_common_settings_doc_c = clients/common/settings-docs.c +-if HAVE_INTROSPECTION +-$(clients_common_settings_doc_c): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp +- $(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^) +-DISTCLEANFILES += $(clients_common_settings_doc_c) +-check-local-settings-docs: $(clients_common_settings_doc_c) +- @if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then \ +- if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)" ; then \ +- echo "The generated file \"$(builddir)/$(clients_common_settings_doc_c)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_c).in\". You probably should copy the generated file over to the source file. You can skip this test by setting \$$NMTST_NO_CHECK_SETTINGS_DOCS=yes"; \ +- false; \ +- fi;\ +- fi +-check_local += check-local-settings-docs +-else ++ + $(clients_common_settings_doc_c): $(clients_common_settings_doc_c).in clients/common/.dirstamp + $(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_c).in" "$(builddir)/$(clients_common_settings_doc_c)" + check-local-settings-docs: +-endif ++ + EXTRA_DIST += \ + $(clients_common_settings_doc_c) \ + $(clients_common_settings_doc_c).in +diff --git a/configure.ac b/configure.ac +index c9d3e56..407222e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1286,10 +1286,6 @@ GTK_DOC_CHECK(1.0) + # check if we can build setting property documentation + build_docs=no + if test -n "$INTROSPECTION_MAKEFILE"; then +- # If g-i is installed we know we have python, but we might not have pygobject +- if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then +- AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)]) +- fi + + AC_PATH_PROG(PERL, perl) + if test -z "$PERL"; then +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch deleted file mode 100644 index 27c9ae9624..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0004-Define-missing-features-to-cater-for-musl.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 2153109e60e362e0d09215d529bf00176f31a3e7 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 16:09:41 -0700 -Subject: [PATCH 4/5] Define missing features to cater for musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/systemd/sd-adapt/nm-sd-adapt.h | 2 +- - src/systemd/src/basic/parse-util.c | 5 ++++- - src/systemd/src/basic/stdio-util.h | 2 ++ - src/systemd/src/basic/util.h | 5 +++++ - src/systemd/src/systemd/sd-event.h | 4 ---- - 5 files changed, 12 insertions(+), 6 deletions(-) - -diff --git a/src/systemd/sd-adapt/nm-sd-adapt.h b/src/systemd/sd-adapt/nm-sd-adapt.h -index cf27c1a..72c1b89 100644 ---- a/src/systemd/sd-adapt/nm-sd-adapt.h -+++ b/src/systemd/sd-adapt/nm-sd-adapt.h -@@ -119,7 +119,7 @@ G_STMT_START { \ - # ifdef HAVE___SECURE_GETENV - # define secure_getenv __secure_getenv - # else --# error neither secure_getenv nor __secure_getenv is available -+# define secure_getenv getenv - # endif - #endif - -diff --git a/src/systemd/src/basic/parse-util.c b/src/systemd/src/basic/parse-util.c -index 2738663..9c21e5a 100644 ---- a/src/systemd/src/basic/parse-util.c -+++ b/src/systemd/src/basic/parse-util.c -@@ -25,8 +25,11 @@ - #include <stdio.h> - #include <stdlib.h> - #include <string.h> -+#ifdef __GLIBC__ - #include <xlocale.h> -- -+#else -+#include <locale.h> -+#endif - #include "alloc-util.h" - #include "extract-word.h" - #include "macro.h" -diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h -index bd1144b..c92e935 100644 ---- a/src/systemd/src/basic/stdio-util.h -+++ b/src/systemd/src/basic/stdio-util.h -@@ -19,7 +19,9 @@ - along with systemd; If not, see <http://www.gnu.org/licenses/>. - ***/ - -+#ifdef __GLIBC__ - #include <printf.h> -+#endif - #include <stdarg.h> - #include <stdio.h> - #include <sys/types.h> -diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h -index bb2fc31..fe074a5 100644 ---- a/src/systemd/src/basic/util.h -+++ b/src/systemd/src/basic/util.h -@@ -46,6 +46,11 @@ - #include "missing.h" - #include "time-util.h" - -+#if !defined(__GLIBC__) -+typedef int (*__compar_fn_t) (const void*, const void*); -+typedef __compar_fn_t comparison_fn_t; -+#endif -+ - size_t page_size(void) _pure_; - #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) - -diff --git a/src/systemd/src/systemd/sd-event.h b/src/systemd/src/systemd/sd-event.h -index cc26b7d..c7e0004 100644 ---- a/src/systemd/src/systemd/sd-event.h -+++ b/src/systemd/src/systemd/sd-event.h -@@ -69,11 +69,7 @@ typedef int (*sd_event_handler_t)(sd_event_source *s, void *userdata); - typedef int (*sd_event_io_handler_t)(sd_event_source *s, int fd, uint32_t revents, void *userdata); - typedef int (*sd_event_time_handler_t)(sd_event_source *s, uint64_t usec, void *userdata); - typedef int (*sd_event_signal_handler_t)(sd_event_source *s, const struct signalfd_siginfo *si, void *userdata); --#if defined __USE_POSIX199309 || defined __USE_XOPEN_EXTENDED - typedef int (*sd_event_child_handler_t)(sd_event_source *s, const siginfo_t *si, void *userdata); --#else --typedef void* sd_event_child_handler_t; --#endif - - int sd_event_default(sd_event **e); - --- -2.12.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch deleted file mode 100644 index f4a04c782c..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9e9e5814456ec23b9fc669d342bf9d8f7ee49fc2 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 31 Mar 2017 16:48:00 -0700 -Subject: [PATCH 5/5] sd-lldp.h: Remove net/ethernet.h seems to be over - specified - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/systemd/src/systemd/sd-lldp.h | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h -=================================================================== ---- NetworkManager-1.4.2.orig/src/systemd/src/systemd/sd-lldp.h -+++ NetworkManager-1.4.2/src/systemd/src/systemd/sd-lldp.h -@@ -22,7 +22,7 @@ - ***/ - - #include <inttypes.h> --#include <net/ethernet.h> -+//#include <net/ethernet.h> - #include <sys/types.h> - - #include "sd-event.h" -Index: NetworkManager-1.4.2/src/systemd/src/libsystemd-network/sd-lldp.c -=================================================================== ---- NetworkManager-1.4.2.orig/src/systemd/src/libsystemd-network/sd-lldp.c -+++ NetworkManager-1.4.2/src/systemd/src/libsystemd-network/sd-lldp.c -@@ -21,6 +21,7 @@ - #include "nm-sd-adapt.h" - - #include <arpa/inet.h> -+#include <net/ethernet.h> - - #include "sd-lldp.h" - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch new file mode 100644 index 0000000000..9d208e1fda --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch @@ -0,0 +1,53 @@ +From e92de7409a3e107f90d108a9c5d49bd0418296dd Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 22 Mar 2018 17:54:10 +0100 +Subject: [PATCH 1/4] Usual fix for musl libc +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Stolen from [1] and prettyfied slightly + +[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + src/systemd/src/basic/stdio-util.h | 2 ++ + src/systemd/src/basic/util.h | 5 +++++ + 2 files changed, 7 insertions(+) + +diff --git a/src/systemd/src/basic/stdio-util.h b/src/systemd/src/basic/stdio-util.h +index bd1144b..9eafacb 100644 +--- a/src/systemd/src/basic/stdio-util.h ++++ b/src/systemd/src/basic/stdio-util.h +@@ -19,7 +19,9 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + ++#if defined(__GLIBC__) + #include <printf.h> ++#endif + #include <stdarg.h> + #include <stdio.h> + #include <sys/types.h> +diff --git a/src/systemd/src/basic/util.h b/src/systemd/src/basic/util.h +index b31dfd1..9b7032c 100644 +--- a/src/systemd/src/basic/util.h ++++ b/src/systemd/src/basic/util.h +@@ -46,6 +46,11 @@ + #include "missing.h" + #include "time-util.h" + ++#if !defined(__GLIBC__) ++typedef int (*__compar_fn_t) (const void*, const void*); ++typedef __compar_fn_t comparison_fn_t; ++#endif ++ + size_t page_size(void) _pure_; + #define PAGE_ALIGN(l) ALIGN_TO((l), page_size()) + +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch new file mode 100644 index 0000000000..548cccb329 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch @@ -0,0 +1,35 @@ +From 57239fda56b68a8f3e413f7b6af5290ba0d86636 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 22 Mar 2018 18:18:06 +0100 +Subject: [PATCH 2/4] musl: dlopen is included so LD_LIBS="" instead of + LD_LIBS="none required" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Stolen from [1] and prettyfied slightly + +[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 487a266..96ae4f7 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -305,6 +305,7 @@ dnl + dnl Checks for libdl - on certain platforms its part of libc + dnl + AC_SEARCH_LIBS([dlopen], [dl dld], [], [ac_cv_search_dlopen=]) ++AS_IF([test "$ac_cv_search_dlopen" = "none required"],[ac_cv_search_dlopen=""]) + AC_SUBST([DL_LIBS], "$ac_cv_search_dlopen") + + PKG_CHECK_MODULES(GLIB, [gio-unix-2.0 >= 2.37.6 gmodule-2.0], +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch new file mode 100644 index 0000000000..5dd17b63b4 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch @@ -0,0 +1,72 @@ +From 714b4731a238653e9c7d885c0dee10677b0a4df3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 22 Mar 2018 18:24:07 +0100 +Subject: [PATCH 3/4] musl: network support +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Stolen from [1] and prettyfied slightly + +[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + libnm-core/nm-utils.h | 4 ++++ + src/platform/wifi/wifi-utils.h | 4 ++++ + src/systemd/src/basic/socket-util.h | 5 +++++ + 3 files changed, 13 insertions(+) + +diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h +index df9284b..2bcf4b8 100644 +--- a/libnm-core/nm-utils.h ++++ b/libnm-core/nm-utils.h +@@ -30,7 +30,11 @@ + #include <netinet/in.h> + + /* For ETH_ALEN and INFINIBAND_ALEN */ ++#if defined(__GLIBC__) + #include <linux/if_ether.h> ++#else ++#define ETH_ALEN 6 /* Octets in one ethernet addr */ ++#endif + #include <linux/if_infiniband.h> + + #include "nm-core-enum-types.h" +diff --git a/src/platform/wifi/wifi-utils.h b/src/platform/wifi/wifi-utils.h +index 705717b..da3edc4 100644 +--- a/src/platform/wifi/wifi-utils.h ++++ b/src/platform/wifi/wifi-utils.h +@@ -22,7 +22,11 @@ + #ifndef __WIFI_UTILS_H__ + #define __WIFI_UTILS_H__ + ++#if defined(__GLIBC__) + #include <net/ethernet.h> ++#else /* musl libc */ ++#define ETH_ALEN 6 /* Octets in one ethernet addr */ ++#endif + + #include "nm-dbus-interface.h" + +diff --git a/src/systemd/src/basic/socket-util.h b/src/systemd/src/basic/socket-util.h +index d7e2d85..d109c84 100644 +--- a/src/systemd/src/basic/socket-util.h ++++ b/src/systemd/src/basic/socket-util.h +@@ -29,6 +29,11 @@ + #include <linux/netlink.h> + #include <linux/if_infiniband.h> + #include <linux/if_packet.h> ++#if !defined(__GLIBC__) ++/* SIOCGSTAMPNS from linux/asm-generic.h ++ * for src/systemd/src/libsystemd-network/sd-lldp.c */ ++#include <linux/sockios.h> ++#endif + + #include "macro.h" + #include "missing.h" +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch new file mode 100644 index 0000000000..fc55ce85f6 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch @@ -0,0 +1,62 @@ +From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Thu, 22 Mar 2018 18:29:00 +0100 +Subject: [PATCH 4/4] musl: process-util +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Stolen from [1] and prettyfied slightly + +[1] https://github.com/voidlinux/void-packages/tree/master/srcpkgs/NetworkManager/patches + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + src/systemd/src/basic/process-util.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/systemd/src/basic/process-util.c b/src/systemd/src/basic/process-util.c +index 272030d..485f1db 100644 +--- a/src/systemd/src/basic/process-util.c ++++ b/src/systemd/src/basic/process-util.c +@@ -36,6 +36,9 @@ + #include <sys/wait.h> + #include <syslog.h> + #include <unistd.h> ++#ifndef __GLIBC__ ++#include <pthread.h> ++#endif + #if 0 /* NM_IGNORED */ + #if HAVE_VALGRIND_VALGRIND_H + #include <valgrind/valgrind.h> +@@ -1015,11 +1018,13 @@ static void reset_cached_pid(void) { + cached_pid = CACHED_PID_UNSET; + } + ++#ifdef __GLIBC__ + /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc + * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against + * libpthread, as it is part of glibc anyway. */ + extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void * __dso_handle); + extern void* __dso_handle __attribute__ ((__weak__)); ++#endif + + pid_t getpid_cached(void) { + pid_t current_value; +@@ -1042,7 +1047,11 @@ pid_t getpid_cached(void) { + + new_pid = getpid(); + ++#ifdef __GLIBC__ + if (__register_atfork(NULL, NULL, reset_cached_pid, __dso_handle) != 0) { ++#else ++ if (pthread_atfork(NULL, NULL, reset_cached_pid) != 0) { ++#endif + /* OOM? Let's try again later */ + cached_pid = CACHED_PID_UNSET; + return new_pid; +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch new file mode 100644 index 0000000000..752fe4f581 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch @@ -0,0 +1,77 @@ +From b3b4fe35018c98ad176719b2d9ffb867974fc7c3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Mon, 16 Apr 2018 14:45:44 +0200 +Subject: [PATCH] musl: avoid further conflicts by including net/ethernet.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + src/systemd/src/systemd/sd-dhcp-client.h | 2 ++ + src/systemd/src/systemd/sd-dhcp-lease.h | 2 ++ + src/systemd/src/systemd/sd-dhcp6-client.h | 2 ++ + src/systemd/src/systemd/sd-ipv4ll.h | 2 ++ + 4 files changed, 8 insertions(+) + +diff --git a/src/systemd/src/systemd/sd-dhcp-client.h b/src/systemd/src/systemd/sd-dhcp-client.h +index 5e46d8d..18a613f 100644 +--- a/src/systemd/src/systemd/sd-dhcp-client.h ++++ b/src/systemd/src/systemd/sd-dhcp-client.h +@@ -21,7 +21,9 @@ + ***/ + + #include <inttypes.h> ++#if defined(__GLIBC__) + #include <net/ethernet.h> ++#endif + #include <netinet/in.h> + #include <sys/types.h> + +diff --git a/src/systemd/src/systemd/sd-dhcp-lease.h b/src/systemd/src/systemd/sd-dhcp-lease.h +index 7ab99cc..85acdf2 100644 +--- a/src/systemd/src/systemd/sd-dhcp-lease.h ++++ b/src/systemd/src/systemd/sd-dhcp-lease.h +@@ -22,7 +22,9 @@ + ***/ + + #include <inttypes.h> ++#if defined(__GLIBC__) + #include <net/ethernet.h> ++#endif + #include <netinet/in.h> + #include <sys/types.h> + +diff --git a/src/systemd/src/systemd/sd-dhcp6-client.h b/src/systemd/src/systemd/sd-dhcp6-client.h +index 7819f0d..35f30ee 100644 +--- a/src/systemd/src/systemd/sd-dhcp6-client.h ++++ b/src/systemd/src/systemd/sd-dhcp6-client.h +@@ -21,7 +21,9 @@ + ***/ + + #include <inttypes.h> ++#if defined(__GLIBC__) + #include <net/ethernet.h> ++#endif + #include <sys/types.h> + + #include "sd-dhcp6-lease.h" +diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h +index 5ba9208..c90eca6 100644 +--- a/src/systemd/src/systemd/sd-ipv4ll.h ++++ b/src/systemd/src/systemd/sd-ipv4ll.h +@@ -20,7 +20,9 @@ + along with systemd; If not, see <http://www.gnu.org/licenses/>. + ***/ + ++#if defined(__GLIBC__) + #include <net/ethernet.h> ++#endif + #include <netinet/in.h> + + #include "sd-event.h" +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch new file mode 100644 index 0000000000..8ed7ee64fb --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch @@ -0,0 +1,47 @@ +From 6db6596e450062601d18b2ae812a4a58d2e03a53 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Mon, 16 Apr 2018 15:07:20 +0200 +Subject: [PATCH] Add a strndupa replacement for musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +--- + src/systemd/src/basic/in-addr-util.c | 1 + + src/systemd/src/basic/string-util.h | 5 +++++ + 2 files changed, 6 insertions(+) + +diff --git a/src/systemd/src/basic/in-addr-util.c b/src/systemd/src/basic/in-addr-util.c +index 2a02d90..a57c360 100644 +--- a/src/systemd/src/basic/in-addr-util.c ++++ b/src/systemd/src/basic/in-addr-util.c +@@ -30,6 +30,7 @@ + #include "in-addr-util.h" + #include "macro.h" + #include "parse-util.h" ++#include "string-util.h" + #include "util.h" + + bool in4_addr_is_null(const struct in_addr *a) { +diff --git a/src/systemd/src/basic/string-util.h b/src/systemd/src/basic/string-util.h +index 4c94b18..a6dc446 100644 +--- a/src/systemd/src/basic/string-util.h ++++ b/src/systemd/src/basic/string-util.h +@@ -44,6 +44,11 @@ + #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) + #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) + ++/* musl does not know strndupa */ ++#if !defined(__GLIBC__) ++#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) ++#endif ++ + int strcmp_ptr(const char *a, const char *b) _pure_; + + static inline bool streq_ptr(const char *a, const char *b) { +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb index d5f456f37b..09c5dbd188 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.4.4.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.10.6.bb @@ -5,11 +5,12 @@ SECTION = "net/misc" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=cbbffd568227ada506640fe950a4823b \ file://libnm-util/COPYING;md5=1c4fa765d6eb3cd2fbd84344a1b816cd \ - file://docs/api/html/license.html;md5=8eb8e72bab097b9d11763002cb003697 \ + file://docs/api/html/license.html;md5=77b9e362690c149da196aefe7712db30 \ " DEPENDS = " \ intltool-native \ + libxslt-native \ libnl \ dbus \ dbus-glib \ @@ -20,28 +21,25 @@ DEPENDS = " \ libnewt \ polkit \ jansson \ + curl \ " -inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection - -GI_DATA_ENABLED_libc-musl = "False" - -SRC_URI = "${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ - file://0001-don-t-try-to-run-sbin-dhclient-to-get-the-version-nu.patch \ - file://0002-Fix-nm-version-macro-includes.patch \ - file://0001-adjust-net-headers-for-musl-compatibility.patch \ - file://0002-socket-util.h-Include-linux-sockios.h-on-musl.patch \ - file://0003-Define-ETH_ALEN.patch \ - file://0004-Define-missing-features-to-cater-for-musl.patch \ - file://0005-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ - file://0001-check-for-strndupa-before-using-it.patch \ - file://0001-dns-resolved-add-systemd-resolved-backend.patch \ - file://0001-dns-resolved-also-check-for-etc-resolv-conf.systemd.patch \ - file://0001-systemd-xlocale.h-is-dropped-by-newer-glibc.patch \ - file://0002-user-format-string-in-g_dbus_message_new_method_erro.patch \ - " -SRC_URI[md5sum] = "63f1e0d6d7e9099499d062c84c927a75" -SRC_URI[sha256sum] = "829378f318cc008d138a23ca6a9191928ce75344e7e47a2f2c35f4ac82133309" +inherit gnomebase gettext systemd bluetooth bash-completion vala gobject-introspection gtk-doc + +SRC_URI = " \ + ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ + file://0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch \ + file://0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ + file://0003-Do-not-create-settings-settings-property-documentati.patch \ + file://musl/0001-musl-basic.patch \ + file://musl/0002-musl-dlopen-configure-ac.patch \ + file://musl/0003-musl-network-support.patch \ + file://musl/0004-musl-process-util.patch \ + file://musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch \ + file://musl/0006-Add-a-strndupa-replacement-for-musl.patch \ +" +SRC_URI[md5sum] = "de3c7147a693da6f80eb22f126086a14" +SRC_URI[sha256sum] = "6af0b1e856a3725f88791f55c4fbb04105dc0b20dbf182aaec8aad16481fac76" S = "${WORKDIR}/NetworkManager-${PV}" @@ -55,13 +53,21 @@ EXTRA_OECONF = " \ --with-nmtui=yes \ " +# gobject-introspection related +GI_DATA_ENABLED_libc-musl = "False" + +# stolen from https://github.com/voidlinux/void-packages/blob/master/srcpkgs/NetworkManager/template +CFLAGS_libc-musl_append = " \ + -DHAVE_SECURE_GETENV -Dsecure_getenv=getenv \ + -D__USE_POSIX199309 -DRTLD_DEEPBIND=0 \ +" + do_compile_prepend() { - export GIR_EXTRA_LIBS_PATH="${B}/libnm-util/.libs" + export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" } PACKAGECONFIG ??= "nss ifupdown netconfig dhclient dnsmasq \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', \ - bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', '${BLUEZ}', '', d)} \ ${@bb.utils.filter('DISTRO_FEATURES', 'wifi', d)} \ " @@ -73,7 +79,6 @@ PACKAGECONFIG[systemd] = " \ PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" # consolekit is not picked by shlibs, so add it to RDEPENDS too PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" -PACKAGECONFIG[concheck] = "--with-libsoup=yes,--with-libsoup=no,libsoup-2.4" PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" # Use full featured dhcp client instead of internal one @@ -101,6 +106,8 @@ FILES_${PN} += " \ ${libexecdir} \ ${libdir}/pppd/*/nm-pppd-plugin.so \ ${libdir}/NetworkManager/*.so \ + ${nonarch_libdir}/NetworkManager/VPN \ + ${nonarch_libdir}/NetworkManager/conf.d \ ${datadir}/polkit-1 \ ${datadir}/dbus-1 \ ${base_libdir}/udev/* \ diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch b/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch index 0ab3436fc5..0e89a9be01 100644 --- a/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch +++ b/meta-networking/recipes-connectivity/samba/samba/0001-packaging-Avoid-timeout-for-nmbd-if-started-offline-.patch @@ -13,16 +13,17 @@ If no network connection appears within DefaultTimeoutStartSec therefore get killed. Signed-off-by: Andreas Oberritter <obi@opendreambox.org> + --- packaging/systemd/nmb.service | 1 + 1 file changed, 1 insertion(+) diff --git a/packaging/systemd/nmb.service b/packaging/systemd/nmb.service -index 992c0cd..555c9ab 100644 +index 71c93d6..f3d2fc2 100644 --- a/packaging/systemd/nmb.service +++ b/packaging/systemd/nmb.service @@ -10,6 +10,7 @@ EnvironmentFile=-/etc/sysconfig/samba - ExecStart=/usr/sbin/nmbd $NMBDOPTIONS + ExecStart=/usr/sbin/nmbd --foreground --no-process-group $NMBDOPTIONS ExecReload=/usr/bin/kill -HUP $MAINPID LimitCORE=infinity +TimeoutStartSec=0 diff --git a/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch index c37cfcde44..8ca7a52ed8 100644 --- a/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch +++ b/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch @@ -1,13 +1,24 @@ -Don't check xsltproc manpages +From 2214c2d1e455a38c891d17e421b438e3f7c495d8 Mon Sep 17 00:00:00 2001 +From: Bian Naimeng <biannm@cn.fujitsu.com> +Date: Mon, 18 Apr 2016 17:00:53 -0400 +Subject: [PATCH] Don't check xsltproc manpages +Upstream-Status: Pending + Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> -Index: samba-4.4.2/lib/ldb/wscript -=================================================================== ---- samba-4.4.2.orig/lib/ldb/wscript -+++ samba-4.4.2/lib/ldb/wscript -@@ -65,7 +65,7 @@ def configure(conf): - conf.define('USING_SYSTEM_LDB', 1) +--- + lib/ldb/wscript | 2 +- + lib/talloc/wscript | 2 +- + lib/tdb/wscript | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/lib/ldb/wscript b/lib/ldb/wscript +index 5ea5231..d94086b 100644 +--- a/lib/ldb/wscript ++++ b/lib/ldb/wscript +@@ -98,7 +98,7 @@ def configure(conf): + conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2])) if conf.env.standalone_ldb: - conf.CHECK_XSLTPROC_MANPAGES() @@ -15,24 +26,24 @@ Index: samba-4.4.2/lib/ldb/wscript # we need this for the ldap backend if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): -Index: samba-4.4.2/lib/talloc/wscript -=================================================================== ---- samba-4.4.2.orig/lib/talloc/wscript -+++ samba-4.4.2/lib/talloc/wscript -@@ -56,7 +56,7 @@ def configure(conf): - if conf.env.standalone_talloc: - conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1 +diff --git a/lib/talloc/wscript b/lib/talloc/wscript +index df7e6be..b3305cf 100644 +--- a/lib/talloc/wscript ++++ b/lib/talloc/wscript +@@ -49,7 +49,7 @@ def configure(conf): + conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' + conf.env.TALLOC_VERSION = VERSION - conf.CHECK_XSLTPROC_MANPAGES() + #conf.CHECK_XSLTPROC_MANPAGES() - if not conf.env.disable_python: - # also disable if we don't have the python libs installed -Index: samba-4.4.2/lib/tdb/wscript -=================================================================== ---- samba-4.4.2.orig/lib/tdb/wscript -+++ samba-4.4.2/lib/tdb/wscript -@@ -92,7 +92,7 @@ def configure(conf): + conf.CHECK_HEADERS('sys/auxv.h') + conf.CHECK_FUNCS('getauxval') +diff --git a/lib/tdb/wscript b/lib/tdb/wscript +index 4782550..6bb3fa1 100644 +--- a/lib/tdb/wscript ++++ b/lib/tdb/wscript +@@ -89,7 +89,7 @@ def configure(conf): not conf.env.disable_tdb_mutex_locking): conf.define('USE_TDB_MUTEX_LOCKING', 1) @@ -41,3 +52,6 @@ Index: samba-4.4.2/lib/tdb/wscript if not conf.env.disable_python: # also disable if we don't have the python libs installed +-- +2.14.3 + diff --git a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch index 025ac2775f..6a7f8facc5 100644 --- a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch +++ b/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch @@ -6,6 +6,7 @@ Subject: [PATCH] Add config option without-valgrind Upstream-Status: Pending Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> + --- lib/replace/wscript | 4 +++- source3/wscript | 5 ++++- @@ -16,9 +17,9 @@ diff --git a/lib/replace/wscript b/lib/replace/wscript index f0040b1..aca73af 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -101,7 +101,9 @@ struct foo bar = { .y = 'X', .x = 1 }; - - conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H') +@@ -101,7 +101,9 @@ def configure(conf): + conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h') + conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h') - conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') + if not Options.options.disable_valgrind: @@ -26,12 +27,12 @@ index f0040b1..aca73af 100644 + conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h') conf.CHECK_HEADERS('sys/extattr.h sys/ea.h sys/proplist.h sys/cdefs.h') - conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h malloc.h') + conf.CHECK_HEADERS('utmp.h utmpx.h lastlog.h') diff --git a/source3/wscript b/source3/wscript index bac3dd5..a5c51ea 100644 --- a/source3/wscript +++ b/source3/wscript -@@ -1016,7 +1016,10 @@ syscall(SYS_setgroups32, 0, NULL); +@@ -1070,7 +1070,10 @@ syscall(SYS_setgroups32, 0, NULL); Logs.warn("--with-dnsupdate=yes but gssapi support not sufficient") else: conf.DEFINE('WITH_DNS_UPDATES', 1) @@ -44,12 +45,12 @@ index bac3dd5..a5c51ea 100644 if conf.CONFIG_SET('HAVE_VALGRIND_H') or conf.CONFIG_SET('HAVE_VALGRIND_VALGRIND_H'): conf.DEFINE('VALGRIND', '1') diff --git a/wscript b/wscript -index 7679c0f..681ac17 100644 +index 542a60c..22e6116 100644 --- a/wscript +++ b/wscript -@@ -72,6 +72,10 @@ def set_options(opt): - help=("Disable systemd integration"), - action='store_false', dest='enable_systemd') +@@ -86,6 +86,10 @@ def set_options(opt): + help=("Disable RELRO builds"), + action="store_false", dest='enable_relro') + opt.add_option('--without-valgrind', + help=("Disable use of the valgrind headers"), diff --git a/meta-networking/recipes-connectivity/samba/samba/samba-4.2.7-pam.patch b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch index 6b9ade920e..0cbacb6c0e 100644 --- a/meta-networking/recipes-connectivity/samba/samba/samba-4.2.7-pam.patch +++ b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch @@ -4,12 +4,11 @@ http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch Signed-off-by: Khem Raj <raj.khem@gmail.com> - -Index: samba-4.4.5/source3/wscript +Index: samba-4.7.0/source3/wscript =================================================================== ---- samba-4.4.5.orig/source3/wscript -+++ samba-4.4.5/source3/wscript -@@ -873,7 +873,7 @@ msg.msg_accrightslen = sizeof(fd); +--- samba-4.7.0.orig/source3/wscript ++++ samba-4.7.0/source3/wscript +@@ -875,7 +875,7 @@ msg.msg_accrightslen = sizeof(fd); if conf.env.with_iconv: conf.DEFINE('HAVE_ICONV', 1) @@ -18,10 +17,10 @@ Index: samba-4.4.5/source3/wscript use_pam=True conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): -@@ -945,6 +945,15 @@ int i; i = PAM_RADIO_TYPE; - if use_pam: - conf.DEFINE('WITH_PAM', 1) - conf.DEFINE('WITH_PAM_MODULES', 1) +@@ -952,6 +952,17 @@ int i; i = PAM_RADIO_TYPE; + "or headers not found. Use --without-pam to disable " + "PAM support."); + + else: + Logs.warn("PAM disabled") + use_pam=False @@ -31,6 +30,8 @@ Index: samba-4.4.5/source3/wscript + conf.undefine('PAM_RHOST') + conf.undefine('PAM_TTY') + conf.undefine('HAVE_PAM_PAM_APPL_H') - ++ ++ seteuid = False + # diff --git a/meta-networking/recipes-connectivity/samba/samba_4.7.0.bb b/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb index f33c1384bf..a8517c541e 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.7.0.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.7.6.bb @@ -26,23 +26,21 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://volatiles.03_samba \ " SRC_URI_append_libc-musl = " \ - file://samba-4.2.7-pam.patch \ + file://samba-pam.patch \ file://samba-4.3.9-remove-getpwent_r.patch \ " -SRC_URI[md5sum] = "cf5eaf34f510e3d5643c0dcfd49fcc40" -SRC_URI[sha256sum] = "bd16d169988eb513e685a87e9964a5210482498fa9b3a22aaa8287a061e3c936" - -#SRC_URI[md5sum] = "c6ee5c766016d59908c8fb672fbbd445" -#SRC_URI[sha256sum] = "9ef24393de08390f236cabccd6a420b5cea304e959cbf1a99ff317325db3ddfa" +SRC_URI[md5sum] = "0253021a45c479cec1e135b004a0177a" +SRC_URI[sha256sum] = "1eede30fc8ef6504e24602fb72b00baa0a7b73b59f16d25cb0771dc8c7c57d6e" inherit systemd waf-samba cpan-base perlnative update-rc.d # remove default added RDEPENDS on perl RDEPENDS_${PN}_remove = "perl" -#DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam" -DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libbsd libaio libpam" -DEPENDS += "libldb" +DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam" + +inherit distro_features_check +REQUIRED_DISTRO_FEATURES = "pam" DEPENDS_append_libc-musl = " libtirpc" CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" @@ -119,7 +117,7 @@ EXTRA_OECONF += "--enable-fhs \ --disable-rpath-install \ --with-shared-modules=${SAMBA4_MODULES} \ --bundled-libraries=${SAMBA4_LIBS} \ - ${@base_conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \ + ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \ --with-cluster-support \ --with-profiling-data \ --with-libiconv=${STAGING_DIR_HOST}${prefix} \ @@ -197,7 +195,7 @@ PACKAGES =+ "${PN}-python ${PN}-pidl \ ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ winbind \ ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ - smbclient" + smbclient ${PN}-client ${PN}-server ${PN}-test" python samba_populate_packages() { def module_hook(file, pkg, pattern, format, basename): @@ -294,3 +292,27 @@ FILES_smbclient = "${bindir}/cifsdd \ RDEPENDS_${PN}-pidl_append = " perl" FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse" + +RDEPENDS_${PN}-client = "\ + smbclient \ + winbind \ + registry-tools \ + ${PN}-pidl \ + " + +ALLOW_EMPTY_${PN}-client = "1" + +RDEPENDS_${PN}-server = "\ + ${PN} \ + winbind \ + registry-tools \ + " + +ALLOW_EMPTY_${PN}-server = "1" + +RDEPENDS_${PN}-test = "\ + ${PN}-ctdb-tests \ + ${PN}-testsuite \ + " + +ALLOW_EMPTY_${PN}-test = "1" diff --git a/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch b/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch index 1520553a45..047caec324 100644 --- a/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch +++ b/meta-networking/recipes-connectivity/snort/snort/0001-fix-do_package-failed-since-snort-2.9.7.0.patch @@ -1,4 +1,4 @@ -From 815e861721a9c43efddb78521147145ebc7569ca Mon Sep 17 00:00:00 2001 +From 4335c4c61877c0b65ff4ec767e8ad3ad8c73c32d Mon Sep 17 00:00:00 2001 From: Zhiquan Li <zhiquan.li@windriver.com> Date: Fri, 13 Nov 2015 17:40:24 +0800 Subject: [PATCH] fix do_package failed since snort 2.9.7.0 @@ -13,6 +13,7 @@ It's a rpm debugedit bug: Upstream-Status:Inappropriate [embedded specific] Signed-off-by: Zhiquan Li <zhiquan.li@windriver.com> + --- src/snort.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) @@ -30,6 +31,3 @@ index 8308e57..499d157 100644 #include "profiler.h" #include "rules.h" #include "treenodes.h" --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch b/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch index 54c2a9521b..2e28cd0486 100644 --- a/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch +++ b/meta-networking/recipes-connectivity/snort/snort/0001-libpcap-search-sysroot-for-headers.patch @@ -1,4 +1,4 @@ -From 4d7ebe3ed6cee72bc7db98bd408d22c10ef5dd82 Mon Sep 17 00:00:00 2001 +From 5875dea90f71350b7205788fbc67e3759077cefe Mon Sep 17 00:00:00 2001 From: Joe MacDonald <joe@deserted.net> Date: Wed, 20 Nov 2013 16:06:07 -0500 Subject: [PATCH] libpcap: search sysroot for headers @@ -9,15 +9,16 @@ the search path at the sysroot instead. Upstream-Status: Pending Signed-off-by: Joe MacDonald <joe@deserted.net> + --- - configure.in | 2 +- + configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in -index e52bb6c..8ded35d 100644 +index 62573a8..fded45b 100644 --- a/configure.in +++ b/configure.in -@@ -78,7 +78,7 @@ case "$host" in +@@ -69,7 +69,7 @@ case "$host" in linux="yes" AC_DEFINE([LINUX],[1],[Define if Linux]) AC_SUBST(extra_incl) @@ -26,6 +27,3 @@ index e52bb6c..8ded35d 100644 ;; *-hpux10*|*-hpux11*) AC_DEFINE([HPUX],[1],[Define if HP-UX 10 or 11]) --- -1.7.10.4 - diff --git a/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch b/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch index 39e5c9c03a..6aa0b736f9 100644 --- a/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch +++ b/meta-networking/recipes-connectivity/snort/snort/disable-dap-address-space-id.patch @@ -1,17 +1,27 @@ +From 5a53260a819e2873f58165e96852529719101c53 Mon Sep 17 00:00:00 2001 +From: Chunrong Guo <B40290@freescale.com> +Date: Mon, 4 Nov 2013 10:39:56 +0800 +Subject: [PATCH] snort: add recipe + Upstream-Status:Inappropriate [embedded specific] fix the below error: -checking for dap address space id... configure: +checking for dap address space id... configure: configure: error: cannot run test program while cross compiling - Signed-off-by: Chunrong Guo <B40290@freescale.com> ---- a/configure.in 2013-08-23 00:06:37.239361932 -0500 -+++ b/configure.in 2013-08-23 00:07:32.860266534 -0500 -@@ -679,23 +679,23 @@ +--- + configure.in | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) + +diff --git a/configure.in b/configure.in +index 6fe5d68..e7636ce 100644 +--- a/configure.in ++++ b/configure.in +@@ -698,23 +698,23 @@ if test "x$ac_cv_func_daq_dp_add_dc" = "xyes"; then - AC_CHECK_FUNCS([daq_hup_apply] [daq_acquire_with_meta]) + fi -AC_MSG_CHECKING([for daq address space ID]) -AC_RUN_IFELSE( @@ -48,5 +58,5 @@ Signed-off-by: Chunrong Guo <B40290@freescale.com> +# [DAQ version supports address space ID in header.]) +#fi - # any sparc platform has to have this one defined. - AC_MSG_CHECKING(for sparc) + AC_MSG_CHECKING([for daq flow ID]) + AC_RUN_IFELSE( diff --git a/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch b/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch index e6afcabaa8..04df37c94f 100644 --- a/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch +++ b/meta-networking/recipes-connectivity/snort/snort/disable-daq-flow-id.patch @@ -1,16 +1,26 @@ +From 5aa42a3137c657b5eddd4608343aa1854bd7cd27 Mon Sep 17 00:00:00 2001 +From: Zhiquan Li <zhiquan.li@windriver.com> +Date: Mon, 16 Nov 2015 10:23:00 +0800 +Subject: [PATCH] snort: 2.9.6.0 -> 2.9.7.5 + Upstream-Status:Inappropriate [embedded specific] fix the below error: checking for daq flow ID... configure: configure: error: cannot run test program while cross compiling +--- + configure.in | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) ---- a/configure.in 2015-10-28 10:36:42.918512690 +0800 -+++ b/configure.in 2015-10-28 10:37:36.738510048 +0800 -@@ -716,23 +716,23 @@ +diff --git a/configure.in b/configure.in +index e7636ce..2fbd298 100644 +--- a/configure.in ++++ b/configure.in +@@ -716,23 +716,23 @@ have_daq_address_space_id="yes" # [DAQ version supports address space ID in header.]) #fi - + -AC_MSG_CHECKING([for daq flow ID]) -AC_RUN_IFELSE( -[AC_LANG_PROGRAM( @@ -45,6 +55,6 @@ configure: error: cannot run test program while cross compiling +# AC_DEFINE([HAVE_DAQ_FLOW_ID],[1], +# [DAQ version supports flow ID in header.]) +#fi - + AC_MSG_CHECKING([for DAQ_VERDICT_RETRY]) AC_RUN_IFELSE( diff --git a/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch b/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch index 1a13298ca2..15958a72d0 100644 --- a/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch +++ b/meta-networking/recipes-connectivity/snort/snort/disable-daq-verdict-retry.patch @@ -1,16 +1,26 @@ +From b916443d43f2e1eeacfbed0033274a0270ef634d Mon Sep 17 00:00:00 2001 +From: Zhiquan Li <zhiquan.li@windriver.com> +Date: Mon, 16 Nov 2015 10:23:00 +0800 +Subject: [PATCH] snort: 2.9.6.0 -> 2.9.7.5 + Upstream-Status:Inappropriate [embedded specific] fix the below error: checking for DAQ_VERDICT_RETRY... configure: configure: error: cannot run test program while cross compiling +--- + configure.in | 34 +++++++++++++++++----------------- + 1 file changed, 17 insertions(+), 17 deletions(-) ---- a/configure.in 2015-10-28 10:45:18.174487395 +0800 -+++ b/configure.in 2015-10-28 10:45:47.586485951 +0800 -@@ -734,23 +734,23 @@ +diff --git a/configure.in b/configure.in +index 2fbd298..62573a8 100644 +--- a/configure.in ++++ b/configure.in +@@ -734,23 +734,23 @@ have_daq_flow_id="yes" # [DAQ version supports flow ID in header.]) #fi - + -AC_MSG_CHECKING([for DAQ_VERDICT_RETRY]) -AC_RUN_IFELSE( -[AC_LANG_PROGRAM( @@ -45,7 +55,6 @@ configure: error: cannot run test program while cross compiling +# AC_DEFINE([HAVE_DAQ_VERDICT_RETRY],[1], +# [DAQ version supports DAQ_VERDICT_RETRY in DAQ_Verdict.]) +#fi - + # any sparc platform has to have this one defined. AC_MSG_CHECKING(for sparc) - diff --git a/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch b/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch index 9dafe63459..79e9f076b1 100644 --- a/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch +++ b/meta-networking/recipes-connectivity/snort/snort/disable-inaddr-none.patch @@ -1,3 +1,8 @@ +From a1fdbced4166cb0f35d23b63a59312d86860485a Mon Sep 17 00:00:00 2001 +From: Chunrong Guo <B40290@freescale.com> +Date: Mon, 4 Nov 2013 10:39:56 +0800 +Subject: [PATCH] snort: add recipe + Upstream-Status: Inappropriate [embedded specific] fix the below error: @@ -6,10 +11,15 @@ configure: error: cannot run test program while cross compiling Signed-off-by: Chunrong Guo <B40290@freescale.com> +--- + configure.in | 50 ++++++++++++++++---------------------------------- + 1 file changed, 16 insertions(+), 34 deletions(-) ---- a/configure.in 2013-08-21 03:56:17.197414789 -0500 -+++ b/configure.in 2013-08-21 23:19:05.298553560 -0500 -@@ -281,25 +281,7 @@ +diff --git a/configure.in b/configure.in +index 20d15eb..6fe5d68 100644 +--- a/configure.in ++++ b/configure.in +@@ -274,25 +274,7 @@ AC_CHECK_TYPES([int8_t,int16_t,int32_t,int64_t]) AC_CHECK_TYPES([boolean]) # In case INADDR_NONE is not defined (like on Solaris) @@ -36,7 +46,7 @@ Signed-off-by: Chunrong Guo <B40290@freescale.com> AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> -@@ -397,21 +379,21 @@ +@@ -421,21 +403,21 @@ if test "x$LPCAP" = "xno"; then fi fi diff --git a/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch b/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch index 2becc06244..0404ea0fab 100644 --- a/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch +++ b/meta-networking/recipes-connectivity/snort/snort/fix-host-contamination-when-enable-static-daq.patch @@ -1,3 +1,8 @@ +From f46d096015d7402a37a59eb66b8f6b7fbf0cdff0 Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Wed, 24 May 2017 17:38:53 +0800 +Subject: [PATCH] snort: enable static daq + Upstream-Status: Inappropriate [embedded specific] When enable static daq for snort, it calls to daq-modules-config to get link @@ -5,7 +10,11 @@ library and library path. Library path is useless for oe and cause host contamination issue. So filter it. Signed-off-by: Kai Kang <kai.kang@windriver.com> + --- + configure.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/configure.in b/configure.in index fded45b..a247bb9 100644 --- a/configure.in diff --git a/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb index 2034b85fb5..21e77c5417 100644 --- a/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb +++ b/meta-networking/recipes-connectivity/snort/snort_2.9.7.5.bb @@ -4,8 +4,7 @@ SECTION = "net" LICENSE = "GPL-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" -DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native" -DEPENDS_append_libc-musl = " libtirpc" +DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native libtirpc" SRC_URI = " ${GENTOO_MIRROR}/${BP}.tar.gz;name=tarball \ file://snort.init \ @@ -48,8 +47,8 @@ PACKAGECONFIG ?= "openssl lzma" PACKAGECONFIG[openssl] = "--with-openssl-includes=${STAGING_INCDIR} --with-openssl-libraries=${STAGING_LIBDIR}, --without-openssl-includes --without-openssl-libraries, openssl," PACKAGECONFIG[lzma] = "--with-lzma-includes=${STAGING_INCDIR} --with-lzma-libraries=${STAGING_LIBDIR}, --without-lzma-includes --without-lzma-libraries, xz," -CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" -LDFLAGS_append_libc-musl = " -ltirpc" +CFLAGS += "-I${STAGING_INCDIR}/tirpc" +LDFLAGS += " -ltirpc" do_install_append() { install -d ${D}${sysconfdir}/snort/rules diff --git a/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb index bd55efce27..7eea5d135b 100644 --- a/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb +++ b/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb @@ -14,6 +14,8 @@ SRC_URI[sha256sum] = "3b8f0a1bf0d3642764e5f646e1f3bbc8b1eeec474a77392d9aeb486884 S = "${WORKDIR}/${BPN}" +inherit update-alternatives + EXTRA_OEMAKE = "-e MAKEFLAGS=" # comment out MakeInclude in Makefile which sets build environment @@ -30,3 +32,7 @@ do_install () { install -d ${D}/${base_sbindir} install -m 0755 ${S}/vconfig ${D}/${base_sbindir}/ } + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "vconfig" +ALTERNATIVE_LINK_NAME[vconfig] = "${base_sbindir}/vconfig" diff --git a/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb index 512619098a..dc9094d8bf 100644 --- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.12.0.bb +++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb @@ -12,15 +12,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" PROVIDES += "cyassl" RPROVIDES_${PN} = "cyassl" -SRC_URI = "https://github.com/wolfSSL/wolfssl/archive/v${PV}-stable.zip \ +S = "${WORKDIR}/git" +SRCREV = "1196a3b64d9fabffc8273b87f6f69ac0e75d2eb7" +SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https; \ file://0001-fix-no-rule-to-make-cyassl-options.h.patch \ " -SRC_URI[md5sum] = "f9caf558169ab650dc8200708799ebeb" -SRC_URI[sha256sum] = "b6d87d3e2c8757177d69aff373c91cf162f4a3944fae90fa10d086fd5f9542e7" - -S = "${WORKDIR}/wolfssl-${PV}-stable" - inherit autotools PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |