diff options
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-connectivity')
112 files changed, 2367 insertions, 3521 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb new file mode 100644 index 00000000..75f30306 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb @@ -0,0 +1,27 @@ +SUMMARY = "Active Directory enrollment" +DESCRIPTION = "A helper library and tools for Active Directory client operations." + +HOMEPAGE = "http://cgit.freedesktop.org/realmd/adcli" +SECTION = "net" + +SRCREV = "cc3ef52884a48863a81acbfc741735fe09cd85f7" + +SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;branch=master \ + file://Fixed-build-error-on-musl.patch \ + " + +S = "${WORKDIR}/git" + +LICENSE = "LGPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6" + +inherit autotools xmlcatalog + +DEPENDS += "virtual/crypt krb5 openldap gettext libxslt xmlto libxml2-native \ + cyrus-sasl libxslt-native xmlto-native coreutils-native\ + " + +EXTRA_OECONF += "--disable-static \ + --disable-silent-rules \ + --disable-doc \ + " diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch new file mode 100644 index 00000000..87bcdfeb --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch @@ -0,0 +1,26 @@ +From 0e64782a45cba9753d1210ee7d7c9dbd42f74ceb Mon Sep 17 00:00:00 2001 +From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +Date: Fri, 12 Jul 2019 12:46:54 +0800 +Subject: [PATCH] Fixed build error on musl. + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> +--- + library/adutil.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/library/adutil.c b/library/adutil.c +index 9b0c47f..b673edd 100644 +--- a/library/adutil.c ++++ b/library/adutil.c +@@ -30,6 +30,7 @@ + #include <assert.h> + #include <ctype.h> + #include <errno.h> ++#include <endian.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-- +2.20.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch new file mode 100644 index 00000000..00115cfc --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch @@ -0,0 +1,81 @@ +Fix fail to enable bluetooth issue + +When launch blueman-manager while bluetooth is disable, it may fails +with error: + + Failed to enable bluetooth + +Because when get bluetooth status right after change its status, the +status may not be updated that plugin applet/KillSwitch.py sets the +bluetooth status via method of another dbus service which doesn't return +immediately. + +Provides a new dbus method for PowerManager which checks whether dbus +method SetBluetoothStatus() has finished. Then it makes sure to get +right bluetooth status. + +Upstream-Status: Inappropriate +Send to upstream but not accepted: +https://github.com/blueman-project/blueman/pull/1121 + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + blueman/Functions.py | 12 +++++++++++- + blueman/plugins/applet/PowerManager.py | 4 ++++ + 2 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/blueman/Functions.py b/blueman/Functions.py +index 3b76271..c5eeb27 100644 +--- a/blueman/Functions.py ++++ b/blueman/Functions.py +@@ -17,7 +17,7 @@ + # You should have received a copy of the GNU General Public License + # along with this program. If not, see <http://www.gnu.org/licenses/>. + # +-from time import sleep ++from time import sleep, time + import re + import os + import signal +@@ -86,6 +86,16 @@ def check_bluetooth_status(message, exitfunc): + return + + applet.SetBluetoothStatus('(b)', True) ++ ++ timeout = time() + 10 ++ while applet.GetRequestStatus(): ++ sleep(0.1) ++ if time() > timeout: ++ # timeout 5s has been set in applet/PowerManager.py ++ # so it should NOT reach timeout here ++ logging.warning('Should NOT reach timeout.') ++ break ++ + if not applet.GetBluetoothStatus(): + print('Failed to enable bluetooth') + exitfunc() +diff --git a/blueman/plugins/applet/PowerManager.py b/blueman/plugins/applet/PowerManager.py +index 8ec9fc4..29a0fb0 100644 +--- a/blueman/plugins/applet/PowerManager.py ++++ b/blueman/plugins/applet/PowerManager.py +@@ -48,6 +48,7 @@ class PowerManager(AppletPlugin): + self._add_dbus_signal("BluetoothStatusChanged", "b") + self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state) + self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status) ++ self._add_dbus_method("GetRequestStatus", (), "b", self.get_request_status) + + def on_unload(self): + self.parent.Plugins.Menu.unregister(self) +@@ -182,6 +183,9 @@ class PowerManager(AppletPlugin): + def get_bluetooth_status(self): + return self.current_state + ++ def get_request_status(self): ++ return self.request_in_progress ++ + def on_adapter_property_changed(self, _path, key, value): + if key == "Powered": + if value and not self.current_state: +-- +2.20.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.1.1.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.1.1.bb new file mode 100644 index 00000000..0ea7f6de --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_2.1.1.bb @@ -0,0 +1,60 @@ +DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager" +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "bluez5 python3-pygobject python3-cython-native python3-setuptools-native intltool-native" + +inherit autotools systemd gsettings python3native gtk-icon-cache + +SRC_URI = " \ + https://github.com/blueman-project/blueman/releases/download/${PV}/blueman-${PV}.tar.xz \ + file://0001-Search-for-cython3.patch \ + file://0002-fix-fail-to-enable-bluetooth.patch \ +" +SRC_URI[md5sum] = "9de89abb31be45bdbf11f7884764a2dc" +SRC_URI[sha256sum] = "f1eab2334e5a1587defa80900901048d14c2e8ffa8c0cff7240bc9937a61dbc3" + +EXTRA_OECONF = " \ + --disable-appindicator \ + --disable-runtime-deps-check \ + --disable-schemas-compile \ +" + +SYSTEMD_SERVICE_${PN} = "${BPN}-mechanism.service" +SYSTEMD_AUTO_ENABLE_${PN} = "disable" + +RRECOMENDS_${PN} += "adwaita-icon-theme" +RDEPENDS_${PN} += " \ + python3-core \ + python3-dbus \ + packagegroup-tools-bluetooth \ +" + +PACKAGECONFIG ??= "thunar" +PACKAGECONFIG[thunar] = "--enable-thunar-sendto,--disable-thunar-sendto" + +FILES_${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/Thunar \ + ${systemd_user_unitdir} \ + ${exec_prefix}${systemd_system_unitdir} \ + ${PYTHON_SITEPACKAGES_DIR} \ +" + +FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_blueman.a" + +# In code, path to python is a variable that is replaced with path to native version of it +# during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3. +# Replace it with #!/usr/bin/env python3 +do_install_append() { + sed -i "1s/.*/#!\/usr\/bin\/env python3/" ${D}${prefix}/libexec/blueman-rfcomm-watcher \ + ${D}${prefix}/libexec/blueman-mechanism \ + ${D}${bindir}/blueman-tray \ + ${D}${bindir}/blueman-services \ + ${D}${bindir}/blueman-sendto \ + ${D}${bindir}/blueman-report \ + ${D}${bindir}/blueman-manager \ + ${D}${bindir}/blueman-assistant \ + ${D}${bindir}/blueman-applet \ + ${D}${bindir}/blueman-adapters +} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_git.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_git.bb deleted file mode 100644 index 947db783..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/blueman/blueman_git.bb +++ /dev/null @@ -1,41 +0,0 @@ -DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -DEPENDS = "bluez5 python3-pygobject python3-cython-native python3-setuptools-native intltool-native" - -inherit autotools systemd gsettings python3native gtk-icon-cache - -SRC_URI = " \ - git://github.com/blueman-project/blueman.git \ - file://0001-Search-for-cython3.patch \ -" -SRCREV = "c4a03417e81e21543d4568e8e7f7de307582eb50" -PV = "2.0.5+git${SRCPV}" -S = "${WORKDIR}/git" - -EXTRA_OECONF = " \ - --disable-runtime-deps-check \ - --disable-schemas-compile \ -" - -SYSTEMD_SERVICE_${PN} = "${BPN}-mechanism.service" -SYSTEMD_AUTO_ENABLE_${PN} = "disable" - -RRECOMENDS_${PN} += "adwaita-icon-theme" -RDEPENDS_${PN} += " \ - python3-dbus \ - packagegroup-tools-bluetooth \ -" - -PACKAGECONFIG[thunar] = "--enable-thunar-sendto,--disable-thunar-sendto,,thunar" - -FILES_${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/Thunar \ - ${systemd_user_unitdir} \ - ${exec_prefix}${systemd_system_unitdir} \ - ${PYTHON_SITEPACKAGES_DIR} \ -" - -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_blueman.a" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch new file mode 100644 index 00000000..b78f0b32 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch @@ -0,0 +1,43 @@ +From c74f04dbab4d586287347b1d5517f36e2f0c3d8e Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 19 Dec 2019 15:52:34 -0800 +Subject: [PATCH] Use GNUInstallDirs instead of hard-coding paths + +Bump minimum cmake version to be >= 3.1 + +Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/22] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 51b354f..958e0eb 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required(VERSION 2.6) ++cmake_minimum_required(VERSION 3.1) + project(cannelloni) + + list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules") +@@ -60,6 +60,8 @@ set_target_properties ( cannelloni-common + SOVERSION 0 + ) + ++include(GNUInstallDirs) ++ + if(SCTP_SUPPORT) + add_library(sctpthread STATIC sctpthread.cpp) + target_link_libraries(sctpthread addsources sctp) +@@ -68,5 +70,5 @@ endif(SCTP_SUPPORT) + set_target_properties(addsources PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + target_link_libraries(cannelloni addsources cannelloni-common pthread) + +-install(TARGETS cannelloni DESTINATION bin) +-install(TARGETS cannelloni-common DESTINATION lib) ++install(TARGETS cannelloni DESTINATION ${CMAKE_INSTALL_BINDIR}) ++install(TARGETS cannelloni-common DESTINATION ${CMAKE_INSTALL_LIBDIR}) +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0002-include-missing-stdexcept-for-runtime_error.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0002-include-missing-stdexcept-for-runtime_error.patch new file mode 100644 index 00000000..55f28dd6 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni/0002-include-missing-stdexcept-for-runtime_error.patch @@ -0,0 +1,32 @@ +From 1788762863cd1f657697575f6e73a22e661ccb43 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 23 Dec 2019 10:32:54 -0800 +Subject: [PATCH 2/2] include missing <stdexcept> for runtime_error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Fixes +error: ‘runtime_error’ is not a member of ‘std’ + +Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/22] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + parser.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/parser.cpp b/parser.cpp +index 4afb9e0..5bcdbde 100644 +--- a/parser.cpp ++++ b/parser.cpp +@@ -2,6 +2,7 @@ + + #include <arpa/inet.h> + #include <string.h> ++#include <stdexcept> + + void parseFrames(uint16_t len, const uint8_t* buffer, std::function<canfd_frame*()> frameAllocator, + std::function<void(canfd_frame*, bool)> frameReceiver) +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb new file mode 100644 index 00000000..d4a62bd9 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb @@ -0,0 +1,20 @@ +SUMMARY = "a SocketCAN over Ethernet tunnel" +HOMEPAGE = "https://github.com/mguentner/cannelloni" +LICENSE = "GPLv2" + +SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https \ + file://0001-Use-GNUInstallDirs-instead-of-hard-coding-paths.patch \ + file://0002-include-missing-stdexcept-for-runtime_error.patch \ + " +SRCREV = "82aa49b417b96fe46bb3f017ae1bfea928f20f9a" + +PV = "20160414+${SRCPV}" + +LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +inherit cmake + +S = "${WORKDIR}/git" + +PACKAGECONFIG ??= "lksctp-tools" +PACKAGECONFIG[lksctp-tools] = "-DSCTP_SUPPORT=true, -DSCTP_SUPPORT=false, lksctp-tools" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch deleted file mode 100644 index 86533021..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb/0001-undefine-macro-before-redefining.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 59f65235a7a690f50d1686e9977908c053697d8c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 28 Aug 2018 22:59:13 -0700 -Subject: [PATCH] undefine macro before redefining - -Fixes -src/main.c:89:9: error: 'printf' macro redefined [-Werror,-Wmacro-redefined] - -Upstream-Stats: Submitted [https://github.com/civetweb/civetweb/pull/649] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/main.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/src/main.c b/src/main.c -index bbcb0aec..01191a3c 100644 ---- a/src/main.c -+++ b/src/main.c -@@ -86,6 +86,7 @@ - - #include "civetweb.h" - -+#undef printf - #define printf \ - DO_NOT_USE_THIS_FUNCTION__USE_fprintf /* Required for unit testing */ - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb index d681f7f3..2820f9fa 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb @@ -2,13 +2,12 @@ SUMMARY = "Civetweb embedded web server" HOMEPAGE = "https://github.com/civetweb/civetweb" LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.md;md5=6f28fdcba0dda735eed62bac6a397562" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=50bd1d7f135b50d7e218996ba28d0d88" -SRCREV = "19f31ba8dd8443e86c7028a4b4c37f4b299aa68c" -PV = "1.10+git${SRCPV}" +SRCREV = "4b440a339979852d5a51fb11a822952712231c23" +PV = "1.12+git${SRCPV}" SRC_URI = "git://github.com/civetweb/civetweb.git \ file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \ - file://0001-undefine-macro-before-redefining.patch \ " S = "${WORKDIR}/git" @@ -36,7 +35,7 @@ PACKAGECONFIG[cgi] = "-DCIVETWEB_DISABLE_CGI=OFF,-DCIVETWEB_DISABLE_CGI=ON," PACKAGECONFIG[cpp] = "-DCIVETWEB_ENABLE_CXX=ON,-DCIVETWEB_ENABLE_CXX=OFF," PACKAGECONFIG[debug] = "-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=ON,-DCIVETWEB_ENABLE_MEMORY_DEBUGGING=OFF," PACKAGECONFIG[ipv6] = "-DCIVETWEB_ENABLE_IPV6=ON,-DCIVETWEB_ENABLE_IPV6=OFF," -PACKAGECONFIG[server] = "-DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_INSTALL_EXECUTABLE=OFF," +PACKAGECONFIG[server] = "-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=ON -DCIVETWEB_INSTALL_EXECUTABLE=ON,-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=OFF -DCIVETWEB_INSTALL_EXECUTABLE=OFF," PACKAGECONFIG[ssl] = "-DCIVETWEB_ENABLE_SSL=ON -DCIVETWEB_SSL_OPENSSL_API_1_1=OFF -DCIVETWEB_ENABLE_SSL_DYNAMIC_LOADING=OFF,-DCIVETWEB_ENABLE_SSL=OFF,openssl (=1.0.2%)," PACKAGECONFIG[websockets] = "-DCIVETWEB_ENABLE_WEBSOCKETS=ON,-DCIVETWEB_ENABLE_WEBSOCKETS=OFF," diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch new file mode 100644 index 00000000..9125d0ab --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch @@ -0,0 +1,101 @@ +Imported from Gentoo +https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c50acec16bc7c33d6dc122c007d713e7fbecf9c + +Signed-off-by: Khem Raj <raj.khem@gmail.com> + +--- a/utils/key2pub.py ++++ b/utils/key2pub.py +@@ -1,22 +1,22 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + + import sys + try: + from M2Crypto import RSA +-except ImportError, e: ++except ImportError as e: + sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message) + sys.stderr.write('Please install the "M2Crypto" Python module.\n') + sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n') + sys.exit(1) + + def print_ssl_64(output, name, val): +- while val[0] == '\0': ++ while val[0:1] == b'\0': + val = val[1:] + while len(val) % 8: +- val = '\0' + val ++ val = b'\0' + val + vnew = [] + while len(val): +- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7])) ++ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8])) + val = val[8:] + vnew.reverse() + output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) +@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val): + output.write('};\n\n') + + def print_ssl_32(output, name, val): +- while val[0] == '\0': ++ while val[0:1] == b'\0': + val = val[1:] + while len(val) % 4: +- val = '\0' + val ++ val = b'\0' + val + vnew = [] + while len(val): +- vnew.append((val[0], val[1], val[2], val[3], )) ++ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4])) + val = val[4:] + vnew.reverse() + output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) +@@ -81,21 +81,21 @@ struct pubkey { + + static struct pubkey keys[] __attribute__((unused))= { + ''') +- for n in xrange(n + 1): ++ for n in range(n + 1): + output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) + output.write('};\n') + pass + + def print_gcrypt(output, name, val): + output.write('#include <stdint.h>\n') +- while val[0] == '\0': ++ while val[0:1] == b'\0': + val = val[1:] + output.write('static const uint8_t %s[%d] = {\n' % (name, len(val))) + idx = 0 + for v in val: + if not idx: + output.write('\t') +- output.write('0x%.2x, ' % ord(v)) ++ output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v))) + idx += 1 + if idx == 8: + idx = 0 +@@ -118,7 +118,7 @@ struct key_params { + + static const struct key_params keys[] __attribute__((unused))= { + ''') +- for n in xrange(n + 1): ++ for n in range(n + 1): + output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) + output.write('};\n') + +@@ -136,7 +136,7 @@ except IndexError: + mode = None + + if not mode in modes: +- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())) ++ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))) + sys.exit(2) + + output = open(outfile, 'w') +@@ -154,3 +154,5 @@ for f in files: + idx += 1 + + modes[mode][1](output, idx - 1) ++ ++output.close() diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb index d5d2ab68..b380eaf9 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb @@ -4,10 +4,7 @@ SECTION = "net" LICENSE = "copyleft-next-0.3.0" LIC_FILES_CHKSUM = "file://copyleft-next-0.3.0;md5=8743a2c359037d4d329a31e79eabeffe" -DEPENDS = "python-m2crypto-native python-typing-native python-native libnl \ - ${@oe.utils.conditional("DEFAULT_CRYPT", "gcrypt", "libgcrypt", "", d)} \ - ${@oe.utils.conditional("DEFAULT_CRYPT", "openssl", "openssl10", "", d)} \ - " +DEPENDS = "python3-m2crypto-native libnl libgcrypt" SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ file://do-not-run-ldconfig-if-destdir-is-set.patch \ @@ -17,19 +14,16 @@ SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ file://make.patch \ file://use-target-word-size-instead-of-host-s.patch \ file://fix-issues-when-USE_OPENSSL-1.patch \ + file://crda-4.14-python-3.patch \ " SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a" SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf" -inherit python-dir pythonnative siteinfo - -# "gcrypt" or "openssl" -DEFAULT_CRYPT ??= "gcrypt" +inherit python3-dir python3native siteinfo # Recursive make problem EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg' \ - UDEV_RULE_DIR=${nonarch_libdir}/udev/rules.d/" -EXTRA_OEMAKE_append = " ${@oe.utils.conditional("DEFAULT_CRYPT", "openssl", "USE_OPENSSL=1", "", d)}" + UDEV_RULE_DIR=${nonarch_base_libdir}/udev/rules.d/" TARGET_BITS = "${SITEINFO_BITS}" export TARGET_BITS diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.6.bb index 885c6c0e..1cb2af50 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_6.11.5.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.1.6.bb @@ -5,14 +5,17 @@ DESCRIPTION = "dhcpcd runs on your machine and silently configures your computer HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://dhcpcd.c;endline=26;md5=77c40d671aff804ca91ea99556da8e9b" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0531457992a97ecebc6975914a874a9d" -SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz" +UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/" -SRC_URI[md5sum] = "2465624b62c1154f0e89dc69c42c849b" -SRC_URI[sha256sum] = "6f9674dc7e27e936cc787175404a6171618675ecfb6903ab9887b1b66a87d69e" +SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \ + file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch" -inherit autotools-brokensep +SRC_URI[md5sum] = "e1eea03388d12c9ad21ecd7c135fdf8b" +SRC_URI[sha256sum] = "6c2934a3e1e67a5cfd5bb15b1efa71f65c00314ac1ccb5c50da8eae3a0b8147f" + +inherit pkgconfig autotools-brokensep PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch new file mode 100644 index 00000000..37d23444 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch @@ -0,0 +1,45 @@ +From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001 +From: Stefano Cappa <stefano.cappa.ks89@gmail.com> +Date: Sun, 13 Jan 2019 01:50:52 +0100 +Subject: [PATCH] remove INCLUDEDIR to prevent build issues + +Upstream-Status: Pending + +Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com> +--- + configure | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/configure b/configure +index 6c81e0db..32dea2b4 100755 +--- a/configure ++++ b/configure +@@ -20,7 +20,6 @@ BUILD= + HOST= + HOSTCC= + TARGET= +-INCLUDEDIR= + DEBUG= + FORK= + STATIC= +@@ -72,7 +71,6 @@ for x do + --mandir) MANDIR=$var;; + --datadir) DATADIR=$var;; + --with-ccopts|CFLAGS) CFLAGS=$var;; +- -I|--includedir) INCLUDEDIR="$INCLUDEDIR${INCLUDEDIR:+ }-I$var";; + CC) CC=$var;; + CPPFLAGS) CPPFLAGS=$var;; + PKG_CONFIG) PKG_CONFIG=$var;; +@@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then + echo "CPPFLAGS=" >>$CONFIG_MK + echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK + fi +-if [ -n "$INCLUDEDIR" ]; then +- echo "CPPFLAGS+= $INCLUDEDIR" >>$CONFIG_MK +-fi + if [ -n "$LDFLAGS" ]; then + echo "LDFLAGS=" >>$CONFIG_MK + echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK +-- +2.17.2 (Apple Git-113) + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch new file mode 100644 index 00000000..346a56a9 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch @@ -0,0 +1,74 @@ +From 630086cf1b3fba71822319a268d3711734cd6aa8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 31 Jan 2019 12:56:13 -0800 +Subject: [PATCH] linux-port: Rename pthread_mutex_t variable 'lock' + +lock is also used by libc++ in std namespace and using it here causes +clang to fail e.g. + +dibbler-client.cpp:47:25: error: reference to 'lock' is ambiguous + pthread_mutex_lock(&lock); + ^ +../../../../../../../workspace/sources/dibbler/Port-linux/dibbler-client.cpp:29:26: note: candidate found by name lookup is 'lock' +extern ::pthread_mutex_t lock; + ^ +/mnt/a/yoe/build/tmp/work/aarch64-yoe-linux/dibbler/1.0.1+1.0.2RC1+gitc4b0ed52e751da7823dd9a36e91f93a6310e5525-r0/recipe-sysroot/usr/include/c++/v1/mutex:446:1: note: candidate found by name lookup is 'std::__1::lock' +lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3) + +Upstream-Status: Submitted [https://github.com/tomaszmrugalski/dibbler/pull/37] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Port-linux/dibbler-client.cpp | 6 +++--- + Port-linux/lowlevel-linux-link-state.c | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/Port-linux/dibbler-client.cpp b/Port-linux/dibbler-client.cpp +index 78f34241..b5ebb9f0 100644 +--- a/Port-linux/dibbler-client.cpp ++++ b/Port-linux/dibbler-client.cpp +@@ -26,7 +26,7 @@ using namespace std; + + #define IF_RECONNECTED_DETECTED -1 + +-extern pthread_mutex_t lock; ++extern pthread_mutex_t dibbler_lock; + + TDHCPClient* ptr = 0; + +@@ -44,8 +44,8 @@ void signal_handler(int n) { + #ifdef MOD_CLNT_CONFIRM + void signal_handler_of_linkstate_change(int n) { + Log(Notice) << "Network switch off event detected. initiating CONFIRM." << LogEnd; +- pthread_mutex_lock(&lock); +- pthread_mutex_unlock(&lock); ++ pthread_mutex_lock(&dibbler_lock); ++ pthread_mutex_unlock(&dibbler_lock); + } + #endif + +diff --git a/Port-linux/lowlevel-linux-link-state.c b/Port-linux/lowlevel-linux-link-state.c +index 76293ea1..e6b94063 100644 +--- a/Port-linux/lowlevel-linux-link-state.c ++++ b/Port-linux/lowlevel-linux-link-state.c +@@ -34,7 +34,7 @@ volatile int * notifier = 0; + int isDone = 0; + pthread_t parent_id; + pthread_t ntid; +-pthread_mutex_t lock; ++pthread_mutex_t dibbler_lock; + + struct state { + int id; +@@ -86,9 +86,9 @@ void link_state_changed(int ifindex) + { + if (changed_links->cnt<16) + changed_links->ifindex[changed_links->cnt++] = ifindex; +- pthread_mutex_lock(&lock); ++ pthread_mutex_lock(&dibbler_lock); + *notifier = 1; /* notify that change has occured */ +- pthread_mutex_unlock(&lock); ++ pthread_mutex_unlock(&dibbler_lock); + pthread_kill(parent_id,SIGUSR1); + } else + { diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb index 8890e143..90051a31 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb @@ -9,7 +9,8 @@ SRCREV = "c4b0ed52e751da7823dd9a36e91f93a6310e5525" SRC_URI = "git://github.com/tomaszmrugalski/dibbler \ file://dibbler_fix_getSize_crash.patch \ - " + file://0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch \ + " PV = "1.0.1+1.0.2RC1+git${SRCREV}" S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/firewalld/files/firewalld.init b/external/meta-openembedded/meta-networking/recipes-connectivity/firewalld/files/firewalld.init new file mode 100644 index 00000000..08e8930b --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/firewalld/files/firewalld.init @@ -0,0 +1,48 @@ +#!/bin/sh + +### BEGIN INIT INFO +# Provides: firewalld +# Required-Start: $syslog $local_fs messagebus +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: +# Description: +### END INIT INFO + +. /etc/init.d/functions + +firewalld=/usr/sbin/firewalld +pidfile=/var/run/firewalld.pid + +case "$1" in + start) + echo -n "Starting firewalld: " + start-stop-daemon --start --quiet --exec $firewalld + echo "." + ;; + stop) + echo -n "Stopping firewalld: " + start-stop-daemon --stop --quiet --pidfile $pidfile + echo "." + ;; + restart) + echo -n "Stopping firewalld: " + start-stop-daemon --stop --quiet --pidfile $pidfile + echo "." + echo -n "Starting firewalld: " + start-stop-daemon --start --quiet --exec $firewalld + echo "." + ;; + reload) + echo -n "Reloading firewalld: " + firewall-cmd --reload + echo "." + ;; + status) + firewall-cmd --state + ;; + *) + echo "Usage: /etc/init.d/firewalld {start|stop|restart|reload|status}" >&2 + exit 1 +esac diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/firewalld/firewalld_0.7.3.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/firewalld/firewalld_0.7.3.bb new file mode 100644 index 00000000..4dea848f --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/firewalld/firewalld_0.7.3.bb @@ -0,0 +1,89 @@ +SUMMARY = "Dynamic firewall daemon with a D-Bus interface" +HOMEPAGE = "https://firewalld.org/" +BUGTRACKER = "https://github.com/firewalld/firewalld/issues" +UPSTREAM_CHECK_URI = "https://github.com/firewalld/firewalld/releases" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ + file://firewalld.init \ +" +SRC_URI[md5sum] = "05ec772cbdc0a2b3df081e4beca5599d" +SRC_URI[sha256sum] = "414c46202c12334cd5c986214e5e2575d18e743c5531a97ace1c0cd94341c60d" + +# glib-2.0-native is needed for GSETTINGS_RULES autoconf macro from gsettings.m4 +DEPENDS = "intltool-native glib-2.0-native libxslt-native docbook-xsl-stylesheets-native" + +inherit gettext autotools bash-completion python3native gsettings systemd update-rc.d + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" +PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd" + +PACKAGES += "${PN}-zsh-completion" + +# iptables, ip6tables, ebtables, and ipset *should* be unnecessary +# when the nftables backend is available, because nftables supersedes all of them. +# However we still need iptables and ip6tables to be available otherwise any +# application relying on "direct passthrough" rules (such as docker) will break. +# /etc/sysconfig/firewalld is a Red Hat-ism, only referenced by +# the Red Hat-specific init script which we aren't using, so we disable that. +EXTRA_OECONF = "\ + --with-nft=${sbindir}/nft \ + --without-ipset \ + --with-iptables=${sbindir}/iptables \ + --with-iptables-restore=${sbindir}/iptables-restore \ + --with-ip6tables=${sbindir}/ip6tables \ + --with-ip6tables-restore=${sbindir}/ip6tables-restore \ + --without-ebtables \ + --without-ebtables-restore \ + --disable-sysconfig \ + --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog \ +" + +INITSCRIPT_NAME = "firewalld" +SYSTEMD_SERVICE_${PN} = "firewalld.service" + +do_install_append() { + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + : + else + # firewalld ships an init script but it contains Red Hat-isms, replace it with our own + rm -rf ${D}${sysconfdir}/rc.d/ + install -d ${D}${sysconfdir}/init.d + install -m0755 ${WORKDIR}/firewalld.init ${D}${sysconfdir}/init.d/firewalld + fi + + # We ran ./configure with PYTHON pointed at the binary inside $STAGING_BINDIR_NATIVE + # so now we need to fix up any references to point at the proper path in the image. + # This hack is also in distutils.bbclass, but firewalld doesn't use distutils/setuptools. + if [ ${PN} != "${BPN}-native" ]; then + sed -i -e s:${STAGING_BINDIR_NATIVE}/python3-native/python3:${bindir}/python3:g \ + ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml + fi + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g \ + ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml +} + +FILES_${PN} += "\ + ${PYTHON_SITEPACKAGES_DIR}/firewall \ + ${nonarch_libdir}/firewalld \ + ${datadir}/dbus-1 \ + ${datadir}/polkit-1 \ + ${datadir}/metainfo \ +" +FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" + +RDEPENDS_${PN} = "\ + nftables \ + iptables \ + python3-core \ + python3-io \ + python3-fcntl \ + python3-shell \ + python3-syslog \ + python3-xml \ + python3-dbus \ + python3-slip-dbus \ + python3-decorator \ + python3-pygobject \ +" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-freeradius-correct-version-number-of-libssl-defect.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-freeradius-correct-version-number-of-libssl-defect.patch deleted file mode 100644 index 9e1f5b2e..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-freeradius-correct-version-number-of-libssl-defect.patch +++ /dev/null @@ -1,44 +0,0 @@ -From fecf974b63f72eeb12d3b43522e948ca2bc704d4 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Thu, 11 Oct 2018 09:45:52 +0800 -Subject: [PATCH] freeradius: correct version number of libssl defect - -Upstream-Status: Backport [https://github.com/FreeRADIUS/freeradius-server - /commit/ad039347beca4ded297813a1da6eabb61fcf2ddd] - -upstream have refactored this part code into -src/lib/tls/base.c, and problem also have fixed -by commit ad039347beca - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - src/main/tls.c | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/main/tls.c b/src/main/tls.c -index acbfe79..d9c91f1 100644 ---- a/src/main/tls.c -+++ b/src/main/tls.c -@@ -72,15 +72,15 @@ typedef struct libssl_defect { - static libssl_defect_t libssl_defects[] = - { - { -- .low = 0x01010101f, /* 1.1.0a */ -- .high = 0x01010101f, /* 1.1.0a */ -+ .low = 0x01010001f, /* 1.1.0a */ -+ .high = 0x01010001f, /* 1.1.0a */ - .id = "CVE-2016-6309", - .name = "OCSP status request extension", - .comment = "For more information see https://www.openssl.org/news/secadv/20160926.txt" - }, - { -- .low = 0x01010100f, /* 1.1.0 */ -- .high = 0x01010100f, /* 1.1.0 */ -+ .low = 0x010100000f, /* 1.1.0 */ -+ .high = 0x01010000f, /* 1.1.0 */ - .id = "CVE-2016-6304", - .name = "OCSP status request extension", - .comment = "For more information see https://www.openssl.org/news/secadv/20160922.txt" --- -2.7.4 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch new file mode 100644 index 00000000..d6302316 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch @@ -0,0 +1,58 @@ +From 733330888fff49e4d2b6c2121a6050fdd9f11a87 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Thu, 6 Feb 2020 09:32:04 +0800 +Subject: [PATCH] rlm_python3: add PY_INC_DIR in search dir + +The configure option --with-rlm-python3-include-dir is used to set +PY_INC_DIR which is never used and it fails to find Python.h, +so add it into search dir to fix it. + +Also remove SMART_LIBS from mod_flags because it introduces rpath +to LDFALGS which causes a do_package_qa error: + +ERROR: freeradius-3.0.20-r0 do_package_qa: QA Issue: package freeradius-python contains bad RPATH +/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/recipe-sysroot-native/usr/lib/python3.8/config in file +/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/packages-split/freeradius-python/usr/lib/rlm_python3.so.0.0.0 +package freeradius-python contains bad RPATH +/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/recipe-sysroot-native/usr/lib/python3.8/config in file +/buildarea/build/tmp/work/core2-64-poky-linux/freeradius/3.0.20-r0/packages-split/freeradius-python/usr/lib/rlm_python3.so.0.0.0 [rpaths] + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + src/modules/rlm_python3/configure.ac | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/modules/rlm_python3/configure.ac b/src/modules/rlm_python3/configure.ac +index a00320f..adbdf19 100644 +--- a/src/modules/rlm_python3/configure.ac ++++ b/src/modules/rlm_python3/configure.ac +@@ -95,7 +95,7 @@ if test x$with_[]modname != xno; then + + old_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $PY_CFLAGS" +- smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION" ++ smart_try_dir="$PY_PREFIX/include/python$PY_SYS_VERSION $PY_INC_DIR" + FR_SMART_CHECK_INCLUDE(Python.h) + CFLAGS=$old_CFLAGS + +@@ -114,13 +114,13 @@ if test x$with_[]modname != xno; then + + eval t=\${ac_cv_lib_${sm_lib_safe}_${sm_func_safe}} + if test "x$t" = "xyes"; then +- mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS $SMART_LIBS -lm" ++ mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS -lm" + targetname=modname + else + FR_SMART_CHECK_LIB(python${PY_SYS_VERSION}m, Py_Initialize) + eval t=\${ac_cv_lib_${sm_lib_safe}_${sm_func_safe}} + if test "x$t" = "xyes"; then +- mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS $SMART_LIBS -lm" ++ mod_ldflags="$PY_LIB_LOC $PY_EXTRA_LIBS -lm" + targetname=modname + else + targetname= +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch index 71b78090..47193587 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch @@ -1,20 +1,21 @@ -From 74eed61dec8702c89f3e121d577ea9db25c961a4 Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Mon, 11 Jan 2016 02:52:16 -0500 -Subject: [PATCH] configure.ac: add option for libcap +From 98a9eff357959d1113e33a615c2178751d5b2054 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 22 Aug 2019 10:50:21 +0800 +Subject: [PATCH 2/2] configure.ac: add option for libcap Upstream-Status: Pending Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - configure.ac | 37 ++++++++++++++++++++++++++++--------- - 1 file changed, 28 insertions(+), 9 deletions(-) + configure.ac | 36 +++++++++++++++++++++++++++--------- + 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac -index 066d3d7..6e4266b 100644 +index 65db61e..6486aac 100644 --- a/configure.ac +++ b/configure.ac -@@ -948,6 +948,23 @@ fi +@@ -977,6 +977,22 @@ fi dnl Set by FR_SMART_CHECKLIB LIBS="${old_LIBS}" @@ -34,11 +35,10 @@ index 066d3d7..6e4266b 100644 + esac ] +) + -+ dnl Check for cap dnl extra argument: --with-cap-lib-dir=DIR cap_lib_dir= -@@ -981,15 +998,17 @@ AC_ARG_WITH(cap-include-dir, +@@ -1010,15 +1026,17 @@ AC_ARG_WITH(cap-include-dir, ;; esac]) @@ -64,7 +64,7 @@ index 066d3d7..6e4266b 100644 + fi fi - VL_LIB_READLINE + dnl # -- -1.9.1 +2.7.4 diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch deleted file mode 100644 index 638d9507..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-issues-related-to-m4-include-path.patch +++ /dev/null @@ -1,186 +0,0 @@ -From 69cb6d4bb5dd56a48695c0581a7d853e427b0ea3 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Tue, 24 Jul 2018 14:54:41 +0800 -Subject: [PATCH] freeradius: Fixing issues related to m4 include path - -Upstream-Status: Submitted [1] - -[1]: https://github.com/FreeRADIUS/freeradius-server/pull/1428 - -Submmited by: Jorge Pereira <jpereiran@gmail.com> - -Update to version 3.0.17 - -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - src/modules/rlm_example/config.h.in | 35 +++-------------------------------- - src/modules/rlm_pam/config.h.in | 3 +++ - src/modules/rlm_perl/config.h.in | 3 +++ - src/modules/rlm_perl/configure.ac | 2 +- - src/modules/rlm_radutmp/config.h.in | 3 +++ - src/modules/rlm_ruby/configure.ac | 8 ++++---- - src/modules/rlm_smsotp/config.h.in | 3 +++ - src/modules/rlm_unix/config.h.in | 3 +++ - 8 files changed, 23 insertions(+), 37 deletions(-) - -diff --git a/src/modules/rlm_example/config.h.in b/src/modules/rlm_example/config.h.in -index 2a81ef5..4dbb8f4 100644 ---- a/src/modules/rlm_example/config.h.in -+++ b/src/modules/rlm_example/config.h.in -@@ -1,37 +1,5 @@ - /* config.h.in. Generated from configure.ac by autoheader. */ - --/* Define to 1 if you have the <inttypes.h> header file. */ --#undef HAVE_INTTYPES_H -- --/* Define to 1 if you have the <memory.h> header file. */ --#undef HAVE_MEMORY_H -- --/* Define to 1 if you have the `printf' function. */ --#undef HAVE_PRINTF -- --/* Define to 1 if you have the <stdint.h> header file. */ --#undef HAVE_STDINT_H -- --/* Define to 1 if you have the <stdio.h> header file. */ --#undef HAVE_STDIO_H -- --/* Define to 1 if you have the <stdlib.h> header file. */ --#undef HAVE_STDLIB_H -- --/* Define to 1 if you have the <strings.h> header file. */ --#undef HAVE_STRINGS_H -- --/* Define to 1 if you have the <string.h> header file. */ --#undef HAVE_STRING_H -- --/* Define to 1 if you have the <sys/stat.h> header file. */ --#undef HAVE_SYS_STAT_H -- --/* Define to 1 if you have the <sys/types.h> header file. */ --#undef HAVE_SYS_TYPES_H -- --/* Define to 1 if you have the <unistd.h> header file. */ --#undef HAVE_UNISTD_H - - /* Define to the address where bug reports for this package should be sent. */ - #undef PACKAGE_BUGREPORT -@@ -45,6 +13,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - -diff --git a/src/modules/rlm_pam/config.h.in b/src/modules/rlm_pam/config.h.in -index 32ef6ff..1ad20c5 100644 ---- a/src/modules/rlm_pam/config.h.in -+++ b/src/modules/rlm_pam/config.h.in -@@ -45,6 +45,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - -diff --git a/src/modules/rlm_perl/config.h.in b/src/modules/rlm_perl/config.h.in -index 989ed53..f80de9c 100644 ---- a/src/modules/rlm_perl/config.h.in -+++ b/src/modules/rlm_perl/config.h.in -@@ -12,5 +12,8 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION -diff --git a/src/modules/rlm_perl/configure.ac b/src/modules/rlm_perl/configure.ac -index 4b3ff42..69c79cb 100644 ---- a/src/modules/rlm_perl/configure.ac -+++ b/src/modules/rlm_perl/configure.ac -@@ -3,7 +3,7 @@ AC_INIT(rlm_perl.c) - AC_REVISION($Revision$) - AC_DEFUN(modname,[rlm_perl]) - --m4_include([ax_with_prog.m4]) -+m4_include([m4/ax_with_prog.m4]) - - if test x$with_[]modname != xno; then - AC_PROG_CC -diff --git a/src/modules/rlm_radutmp/config.h.in b/src/modules/rlm_radutmp/config.h.in -index 9a883cc..750b434 100644 ---- a/src/modules/rlm_radutmp/config.h.in -+++ b/src/modules/rlm_radutmp/config.h.in -@@ -42,6 +42,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - -diff --git a/src/modules/rlm_ruby/configure.ac b/src/modules/rlm_ruby/configure.ac -index 9306382..ae86a14 100644 ---- a/src/modules/rlm_ruby/configure.ac -+++ b/src/modules/rlm_ruby/configure.ac -@@ -3,15 +3,15 @@ AC_INIT(rlm_ruby.c) - AC_REVISION($Revision: 1.9 $) - AC_DEFUN(modname,[rlm_ruby]) - --m4_include([ax_with_prog.m4]) -+m4_include([m4/ax_with_prog.m4]) - - AC_DEFUN([AX_WITH_RUBY],[ - AX_WITH_PROG([RUBY],[ruby],[not-found],[${PATH}:/usr/bin:/usr/local/bin]) - ]) - --m4_include([ax_compare_version.m4]) --m4_include([ax_prog_ruby_version.m4]) --m4_include([ax_ruby_devel.m4]) -+m4_include([m4/ax_compare_version.m4]) -+m4_include([m4/ax_prog_ruby_version.m4]) -+m4_include([m4/ax_ruby_devel.m4]) - - targetname=modname - mod_cflags= -diff --git a/src/modules/rlm_smsotp/config.h.in b/src/modules/rlm_smsotp/config.h.in -index 5feaf91..9e69f85 100644 ---- a/src/modules/rlm_smsotp/config.h.in -+++ b/src/modules/rlm_smsotp/config.h.in -@@ -42,6 +42,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - -diff --git a/src/modules/rlm_unix/config.h.in b/src/modules/rlm_unix/config.h.in -index dcb9aa2..16107b8 100644 ---- a/src/modules/rlm_unix/config.h.in -+++ b/src/modules/rlm_unix/config.h.in -@@ -54,6 +54,9 @@ - /* Define to the one symbol short name of this package. */ - #undef PACKAGE_TARNAME - -+/* Define to the home page for this package. */ -+#undef PACKAGE_URL -+ - /* Define to the version of this package. */ - #undef PACKAGE_VERSION - --- -2.7.4 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch index 4eb61ff2..4265f9d0 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch @@ -1,7 +1,7 @@ -From 56ef434e454bcc82c162a83d9bcb076d4fc72b7f Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Thu, 9 Jan 2014 14:30:26 +0800 -Subject: [PATCH] Fix libtool detection +From bfe4d7ed72edc9d4ae1a0f0d2dd84367d6214886 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 22 Aug 2019 10:45:46 +0800 +Subject: [PATCH 1/2] Fix libtool detection Upstream-Status: pending @@ -16,18 +16,19 @@ Also patch autogen.sh so it uses autoreconf, which handles libtoolize better. Signed-off-by: Jesse Zhang <sen.zhang@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- autogen.sh | 5 +---- configure.ac | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh -index 3418673..e42c3d5 100755 +index a1d08a6..959182b 100755 --- a/autogen.sh +++ b/autogen.sh -@@ -5,10 +5,7 @@ parentdir=`dirname $0` - cd $parentdir +@@ -6,10 +6,7 @@ cd $parentdir parentdir=`pwd` + m4include="-I$parentdir -I$parentdir/m4 -Im4" -libtoolize -f -c -#aclocal @@ -38,10 +39,10 @@ index 3418673..e42c3d5 100755 mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`" mysubdirs=`echo $mysubdirs` diff --git a/configure.ac b/configure.ac -index e73e4ad..066d3d7 100644 +index a7abf00..65db61e 100644 --- a/configure.ac +++ b/configure.ac -@@ -205,6 +205,42 @@ dnl # See if we have Git. +@@ -220,6 +220,42 @@ dnl # See if we have Git. dnl # AC_CHECK_PROG(GIT, git, yes, no) @@ -85,5 +86,5 @@ index e73e4ad..066d3d7 100644 dnl AC_ARG_WITH(disablemodulefoo, dnl [ --without-rlm_foo Disables module compilation. Module list:] -- -1.8.3 +2.7.4 diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service index 899c4e49..2d766488 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/files/radiusd.service @@ -4,9 +4,8 @@ After=syslog.target network.target [Service] Type=forking -PIDFile=@STATEDIR@/run/radiusd/radiusd.pid -ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd @STATEDIR@/run/radiusd -ExecStartPre=-@BASE_BINDIR@/sh -c "if [ ! -f @SYSCONFDIR@/raddb/certs/server.pem ]; then sudo -u radiusd @SYSCONFDIR@/raddb/certs/bootstrap; fi" +PIDFile=/run/radiusd/radiusd.pid +ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd /run/radiusd ExecStartPre=@SBINDIR@/radiusd -C ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/raddb ExecReload=@SBINDIR@/radiusd -C diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.17.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb index c17d56de..005ca47d 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.17.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.20.bb @@ -13,12 +13,11 @@ LICENSE = "GPLv2 & LGPLv2+" LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a" DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc" -SRC_URI = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${PV}.tar.bz2 \ +SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x;lfs=0; \ file://freeradius \ file://volatiles.58_radiusd \ file://freeradius-enble-user-in-conf.patch \ file://freeradius-configure.ac-allow-cross-compilation.patch \ - file://freeradius-fix-issues-related-to-m4-include-path.patch \ file://freeradius-libtool-detection.patch \ file://freeradius-configure.ac-add-option-for-libcap.patch \ file://freeradius-avoid-searching-host-dirs.patch \ @@ -27,16 +26,20 @@ SRC_URI = "ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-${PV}.tar.b file://freeradius-fix-quoting-for-BUILT_WITH.patch \ file://freeradius-fix-error-for-expansion-of-macro.patch \ file://0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \ + file://0001-rlm_python3-add-PY_INC_DIR-in-search-dir.patch \ file://radiusd.service \ file://radiusd-volatiles.conf \ - file://0001-freeradius-correct-version-number-of-libssl-defect.patch \ " -SRC_URI[md5sum] = "1f4ad38f32101a7d50d818afa6f17339" -SRC_URI[sha256sum] = "3f03404b6e4a4f410e1f15ea2ababfec7f8a7ae8a49836d8a0c137436d913b96" + +SRCREV = "d94c953ab9602a238433ba18533111b845fd8e9e" PARALLEL_MAKE = "" -S = "${WORKDIR}/freeradius-server-${PV}" +S = "${WORKDIR}/git" + +LDFLAGS_append_powerpc = " -latomic" +LDFLAGS_append_mipsarch = " -latomic" +LDFLAGS_append_armv5 = " -latomic" EXTRA_OECONF = " --enable-strict-dependencies \ --with-docdir=${docdir}/freeradius-${PV} \ @@ -58,7 +61,11 @@ EXTRA_OECONF = " --enable-strict-dependencies \ --without-rlm_sql_iodbc \ --without-rlm_sql_oracle \ --without-rlm_sql_sybase \ + --without-rlm_sql_mongo \ --without-rlm_sqlhpwippool \ + --without-rlm_securid \ + --without-rlm_unbound \ + --without-rlm_python \ ac_cv_path_PERL=${bindir}/perl \ ax_cv_cc_builtin_choose_expr=no \ ax_cv_cc_builtin_types_compatible_p=no \ @@ -68,6 +75,7 @@ EXTRA_OECONF = " --enable-strict-dependencies \ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \ pcre libcap \ + openssl rlm-eap-fast rlm-eap-pwd \ " PACKAGECONFIG[krb5] = "--with-rlm_krb5,--without-rlm_krb5,krb5" @@ -80,16 +88,19 @@ PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,un PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgresql,postgresql" PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre" PACKAGECONFIG[perl] = "--with-perl=${STAGING_BINDIR_NATIVE}/perl-native/perl --with-rlm_perl,--without-rlm_perl,perl-native perl,perl" -PACKAGECONFIG[python] = "--with-rlm_python --with-rlm-python-bin=${STAGING_BINDIR_NATIVE}/python-native/python --with-rlm-python-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python,python-native python" +PACKAGECONFIG[python3] = "--with-rlm_python3 --with-rlm-python3-bin=${STAGING_BINDIR_NATIVE}/python3-native/python3 --with-rlm-python3-include-dir=${STAGING_INCDIR}/${PYTHON_DIR},--without-rlm_python3,python3-native python3" PACKAGECONFIG[rest] = "--with-rlm_rest,--without-rlm_rest,curl json-c" PACKAGECONFIG[ruby] = "--with-rlm_ruby,--without-rlm_ruby,ruby" +PACKAGECONFIG[openssl] = "--with-openssl, --without-openssl" +PACKAGECONFIG[rlm-eap-fast] = "--with-rlm_eap_fast, --without-rlm_eap_fast" +PACKAGECONFIG[rlm-eap-pwd] = "--with-rlm_eap_pwd, --without-rlm_eap_pwd" inherit useradd autotools-brokensep update-rc.d systemd # This is not a cpan or python based package, but it needs some definitions -# from cpan-base and python-dir bbclasses for building rlm_perl and rlm_python +# from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python # correctly. -inherit cpan-base python-dir +inherit cpan-base python3-dir # The modules subdirs also need to be processed by autoreconf. Use autogen.sh # in order to handle the subdirs correctly. @@ -136,23 +147,24 @@ do_install() { rm -f ${D}/${sbindir}/rc.radiusd chmod +x ${D}/${sysconfdir}/init.d/radiusd rm -rf ${D}/${localstatedir}/run/ + rm -rf ${D}/${localstatedir}/log/ install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd chown -R radiusd:radiusd ${D}/${sysconfdir}/raddb/ chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd # For systemd - install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system - sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - -e 's,@STATEDIR@,${localstatedir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${systemd_unitdir}/system/radiusd.service - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/radiusd.service ${D}${systemd_unitdir}/system + sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ + -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@STATEDIR@,${localstatedir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${systemd_unitdir}/system/radiusd.service + install -d ${D}${sysconfdir}/tmpfiles.d/ - install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/ + install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/radiusd.conf fi } @@ -162,7 +174,7 @@ pkg_postinst_${PN} () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; then # create /var/log/radius, /var/run/radiusd - systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd-volatiles.conf + systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/radiusd.conf elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then ${sysconfdir}/init.d/populate-volatile.sh update fi @@ -201,9 +213,9 @@ FILES_${PN}-perl = "${libdir}/rlm_perl.so* \ ${sysconfdir}/raddb/mods-available/perl \ " -FILES_${PN}-python = "${libdir}/rlm_python.so* \ - ${sysconfdir}/raddb/mods-config/python \ - ${sysconfdir}/raddb/mods-available/python \ +FILES_${PN}-python = "${libdir}/rlm_python3.so* \ + ${sysconfdir}/raddb/mods-config/python3 \ + ${sysconfdir}/raddb/mods-available/python3 \ " FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \ @@ -220,4 +232,6 @@ FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*" FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" RDEPENDS_${PN} += "perl" -RDEPENDS_${PN}-utils = "${PN}" +RDEPENDS_${PN}-utils = "${PN} perl" + +CLEANBROKEN = "1" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch deleted file mode 100644 index d4764f58..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/0001-rcp-fix-to-work-with-large-files.patch +++ /dev/null @@ -1,31 +0,0 @@ -Upstream-Status: Pending - -Subject: rcp: fix to work with large files - -When we copy file by rcp command, if the file > 2GB, it will fail. -The cause is that it used incorrect data type on file size in sink() of rcp. - -Signed-off-by: Chen Qi <Qi.Chen@windriver.com> ---- - src/rcp.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/rcp.c b/src/rcp.c -index 21f55b6..bafa35f 100644 ---- a/src/rcp.c -+++ b/src/rcp.c -@@ -876,9 +876,9 @@ sink (int argc, char *argv[]) - enum - { YES, NO, DISPLAYED } wrerr; - BUF *bp; -- off_t i, j; -+ off_t i, j, size; - int amt, count, exists, first, mask, mode, ofd, omode; -- int setimes, size, targisdir, wrerrno; -+ int setimes, targisdir, wrerrno; - char ch, *cp, *np, *targ, *vect[1], buf[BUFSIZ]; - const char *why; - --- -1.9.1 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch deleted file mode 100644 index 24c134fc..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch +++ /dev/null @@ -1,83 +0,0 @@ -Upstream: http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html - -Upstream-Status: Pending - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - ping/ping_common.h | 20 ++++++++++++++++++++ - 1 file changed, 20 insertions(+) - -diff --git a/ping/ping_common.h b/ping/ping_common.h -index 1dfd1b5..3bfbd12 100644 ---- a/ping/ping_common.h -+++ b/ping/ping_common.h -@@ -17,10 +17,14 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see `http://www.gnu.org/licenses/'. */ - -+#include <config.h> -+ - #include <netinet/in_systm.h> - #include <netinet/in.h> - #include <netinet/ip.h> -+#ifdef HAVE_IPV6 - #include <netinet/icmp6.h> -+#endif - #include <icmp.h> - #include <error.h> - #include <progname.h> -@@ -62,7 +66,12 @@ struct ping_stat - want to follow the traditional behaviour of ping. */ - #define DEFAULT_PING_COUNT 0 - -+#ifdef HAVE_IPV6 - #define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN) -+#else -+#define PING_HEADER_LEN (ICMP_MINLEN) -+#endif -+ - #define PING_TIMING(s) ((s) >= sizeof (struct timeval)) - #define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */ - -@@ -74,13 +83,20 @@ struct ping_stat - (t).tv_usec = ((i)%PING_PRECISION)*(1000000/PING_PRECISION) ;\ - } while (0) - -+#ifdef HAVE_IPV6 - /* FIXME: Adjust IPv6 case for options and their consumption. */ - #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \ - (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)) - -+#else -+#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN) -+#endif -+ -+#ifdef HAVE_IPV6 - typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest, - struct sockaddr_in6 * from, struct icmp6_hdr * icmp, - int datalen); -+#endif - - typedef int (*ping_efp) (int code, - void *closure, -@@ -89,13 +105,17 @@ typedef int (*ping_efp) (int code, - struct ip * ip, icmphdr_t * icmp, int datalen); - - union event { -+#ifdef HAVE_IPV6 - ping_efp6 handler6; -+#endif - ping_efp handler; - }; - - union ping_address { - struct sockaddr_in ping_sockaddr; -+#ifdef HAVE_IPV6 - struct sockaddr_in6 ping_sockaddr6; -+#endif - }; - - typedef struct ping_data PING; --- -2.8.3 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch deleted file mode 100644 index 3da4e9f5..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 552a7d64ad4a7188a9b7cd89933ae7caf7ebfe90 Mon Sep 17 00:00:00 2001 -From: Mike Frysinger <vapier at gentoo.org> -Date: Thu, 18 Nov 2010 16:59:14 -0500 -Subject: [PATCH gnulib] printf-parse: pull in features.h for __GLIBC__ - -Upstream-Status: Pending - -Signed-off-by: Mike Frysinger <vapier at gentoo.org> ---- - lib/printf-parse.h | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/lib/printf-parse.h b/lib/printf-parse.h -index 67a4a2a..3bd6152 100644 ---- a/lib/printf-parse.h -+++ b/lib/printf-parse.h -@@ -25,6 +25,9 @@ - - #include "printf-args.h" - -+#ifdef HAVE_FEATURES_H -+# include <features.h> /* for __GLIBC__ */ -+#endif - - /* Flags */ - #define FLAG_GROUP 1 /* ' flag */ --- -1.7.3.2 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch deleted file mode 100644 index b13bb922..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch +++ /dev/null @@ -1,14 +0,0 @@ -Upstream-Status: Pending - ---- inetutils-1.8/lib/wchar.in.h -+++ inetutils-1.8/lib/wchar.in.h -@@ -70,6 +70,9 @@ - /* The include_next requires a split double-inclusion guard. */ - #if @HAVE_WCHAR_H@ - # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ -+#else -+# include <stddef.h> -+# define MB_CUR_MAX 1 - #endif - - #undef _GL_ALREADY_INCLUDING_WCHAR_H diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch deleted file mode 100644 index 2592989a..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch +++ /dev/null @@ -1,26 +0,0 @@ -inetutils: define PATH_PROCNET_DEV if not already defined - -this prevents the following compilation error : -system/linux.c:401:15: error: 'PATH_PROCNET_DEV' undeclared (first use in this function) - -this patch comes from : - http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/ - -Upstream-Status: Inappropriate [not author] - -Signed-of-by: Eric Bénard <eric@eukrea.com> ---- -diff -Naur inetutils-1.9.orig/ifconfig/system/linux.c inetutils-1.9/ifconfig/system/linux.c ---- inetutils-1.9.orig/ifconfig/system/linux.c 2012-01-04 16:31:36.000000000 -0500 -+++ inetutils-1.9/ifconfig/system/linux.c 2012-01-04 16:40:53.000000000 -0500 -@@ -49,6 +49,10 @@ - #include "../ifconfig.h" - - -+#ifndef PATH_PROCNET_DEV -+ #define PATH_PROCNET_DEV "/proc/net/dev" -+#endif -+ - /* ARPHRD stuff. */ - - static void diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch deleted file mode 100644 index ff3abd86..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch +++ /dev/null @@ -1,40 +0,0 @@ -Only check security/pam_appl.h which is provided by package libpam when pam is -enabled. - -Upstream-Status: Pending - -Signed-off-by: Kai Kang <kai.kang@windriver.com> ---- -diff --git a/configure.ac b/configure.ac -index b35e672..e78a751 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -195,6 +195,19 @@ fi - - # See if we have libpam.a. Investigate PAM versus Linux-PAM. - if test "$with_pam" = yes ; then -+ AC_CHECK_HEADERS([security/pam_appl.h], [], [], [ -+#include <sys/types.h> -+#ifdef HAVE_NETINET_IN_SYSTM_H -+# include <netinet/in_systm.h> -+#endif -+#include <netinet/in.h> -+#ifdef HAVE_NETINET_IP_H -+# include <netinet/ip.h> -+#endif -+#ifdef HAVE_SYS_PARAM_H -+# include <sys/param.h> -+#endif -+]) - AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl) - AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam) - if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then -@@ -587,7 +600,7 @@ AC_HEADER_DIRENT - AC_CHECK_HEADERS([arpa/nameser.h errno.h fcntl.h features.h \ - glob.h memory.h netinet/ether.h netinet/in_systm.h \ - netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \ -- security/pam_appl.h shadow.h \ -+ shadow.h \ - stdarg.h stdlib.h string.h stropts.h sys/tty.h \ - sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \ - sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \ diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils deleted file mode 100644 index 30e81ef4..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rexec.xinetd.inetutils +++ /dev/null @@ -1,20 +0,0 @@ -# default: off -# description: -# Rexecd is the server for the rexec program. The server provides remote -# execution facilities with authentication based on user names and -# passwords. -# -service exec -{ - socket_type = stream - protocol = tcp - flags = NAMEINARGS - wait = no - user = root - group = root - log_on_success += USERID - log_on_failure += USERID - server = @SBINDIR@/tcpd - server_args = @SBINDIR@/in.rexecd - disable = yes -} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils deleted file mode 100644 index 21b55da9..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rlogin.xinetd.inetutils +++ /dev/null @@ -1,23 +0,0 @@ -# default: off -# description: -# Rlogind is a server for the rlogin program. The server provides remote -# execution with authentication based on privileged port numbers from trusted -# host -# -service login -{ - socket_type = stream - protocol = tcp - flags = NAMEINARGS - wait = no - user = root - group = root - log_on_success += USERID - log_on_failure += USERID - server = @SBINDIR@/tcpd - server_args = @SBINDIR@/in.rlogind -a - disable = yes -} - - - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils deleted file mode 100644 index 2b894a74..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/rsh.xinetd.inetutils +++ /dev/null @@ -1,21 +0,0 @@ -# default: off -# description: -# The rshd server is a server for the rcmd(3) routine and, -# consequently, for the rsh(1) program. The server provides -# remote execution facilities with authentication based on -# privileged port numbers from trusted hosts. -# -service shell -{ - socket_type = stream - protocol = tcp - flags = NAMEINARGS - wait = no - user = root - group = root - log_on_success += USERID - log_on_failure += USERID - server = @SBINDIR@/tcpd - server_args = @SBINDIR@/in.rshd -aL - disable = yes -} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils deleted file mode 100644 index 2d9a0408..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/telnet.xinetd.inetutils +++ /dev/null @@ -1,13 +0,0 @@ -# default: on -# description: The telnet server serves telnet sessions; it uses \ -# unencrypted username/password pairs for authentication. -service telnet -{ - disable = no - flags = REUSE - socket_type = stream - wait = no - user = root - server = @SBINDIR@/in.telnetd - log_on_failure += USERID -} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils deleted file mode 100644 index 67b44c43..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/tftpd.xinetd.inetutils +++ /dev/null @@ -1,19 +0,0 @@ -# default: off -# description: -# Tftpd is a server which supports the Internet Trivial File Transfer -# Pro-tocol (RFC 783). The TFTP server operates at the port indicated -# in the tftp service description; see services(5). -# -service tftp -{ - disable = yes - socket_type = dgram - protocol = udp - flags = IPv6 - wait = yes - user = root - group = root - server = @SBINDIR@/in.tftpd - server_args = /tftpboot -} - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch deleted file mode 100644 index 532a0e5c..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils/version.patch +++ /dev/null @@ -1,17 +0,0 @@ -Upstream-Status: Pending - -remove m4_esyscmd function - -Signed-off-by: Chunrong Guo <b40290@freescale.com> ---- inetutils-1.9.1/configure.ac 2012-01-06 22:05:05.000000000 +0800 -+++ inetutils-1.9.1/configure.ac 2012-11-12 14:01:11.732957019 +0800 -@@ -20,8 +20,7 @@ - - AC_PREREQ(2.59) - --AC_INIT([GNU inetutils], -- m4_esyscmd([build-aux/git-version-gen .tarball-version 's/inetutils-/v/;s/_/./g']), -+AC_INIT([GNU inetutils],[1.9.4], - [bug-inetutils@gnu.org]) - - AC_CONFIG_SRCDIR([src/inetd.c]) diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb deleted file mode 100644 index a27dbae2..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/inetutils/inetutils_1.9.4.bb +++ /dev/null @@ -1,206 +0,0 @@ -DESCRIPTION = "The GNU inetutils are a collection of common \ -networking utilities and servers including ftp, ftpd, rcp, \ -rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ -talkd, telnet, telnetd, tftp, tftpd, and uucpd." -HOMEPAGE = "http://www.gnu.org/software/inetutils" -SECTION = "net" -DEPENDS = "ncurses netbase readline virtual/crypt" - -LICENSE = "GPLv3" - -LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" - -SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.gz \ - file://version.patch \ - file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \ - file://inetutils-1.8-0003-wchar.patch \ - file://rexec.xinetd.inetutils \ - file://rlogin.xinetd.inetutils \ - file://rsh.xinetd.inetutils \ - file://telnet.xinetd.inetutils \ - file://tftpd.xinetd.inetutils \ - file://inetutils-1.9-PATH_PROCNET_DEV.patch \ - file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \ - file://0001-rcp-fix-to-work-with-large-files.patch \ -" - -SRC_URI[md5sum] = "04852c26c47cc8c6b825f2b74f191f52" -SRC_URI[sha256sum] = "be8f75eff936b8e41b112462db51adf689715658a1b09e0d6b05d11ec92cc616" - -inherit autotools gettext update-alternatives texinfo - -acpaths = "-I ./m4" - -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}" - -PACKAGECONFIG ??= "ftp uucpd \ - ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \ - " -PACKAGECONFIG[ftp] = "--enable-ftp,--disable-ftp,readline" -PACKAGECONFIG[uucpd] = "--enable-uucpd,--disable-uucpd,readline" -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no," -PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6," - -EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ - inetutils_cv_path_login=${base_bindir}/login \ - --with-libreadline-prefix=${STAGING_LIBDIR} \ - --enable-rpath=no \ -" - -EXTRA_OECONF_append_libc-musl = " --disable-rsh --disable-rcp --disable-rlogin " - -do_configure_prepend () { - export HELP2MAN='true' - cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath - rm -f ${S}/glob/configure* -} - -do_install_append () { - install -m 0755 -d ${D}${base_sbindir} - install -m 0755 -d ${D}${sbindir} - install -m 0755 -d ${D}${sysconfdir}/xinetd.d - if [ "${base_bindir}" != "${bindir}" ] ; then - install -m 0755 -d ${D}${base_bindir} - mv ${D}${bindir}/ping* ${D}${base_bindir}/ - mv ${D}${bindir}/hostname ${D}${base_bindir}/ - fi - mv ${D}${bindir}/ifconfig ${D}${base_sbindir}/ - mv ${D}${libexecdir}/syslogd ${D}${base_sbindir}/ - mv ${D}${libexecdir}/tftpd ${D}${sbindir}/in.tftpd - mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd - mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd - if [ -e ${D}${libexecdir}/rlogind ]; then - mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind - fi - if [ -e ${D}${libexecdir}/rshd ]; then - mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd - fi - if [ -e ${D}${libexecdir}/talkd ]; then - mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd - fi - mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd - mv ${D}${libexecdir}/* ${D}${bindir}/ - cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec - cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin - cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh - cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet - cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd - - sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/* - if [ -e ${D}${libdir}/charset.alias ]; then - rm -rf ${D}${libdir}/charset.alias - fi - rm -rf ${D}${libexecdir}/ - # remove usr/lib if empty - rmdir ${D}${libdir} || true -} - -PACKAGES =+ "${PN}-ping ${PN}-ping6 ${PN}-hostname ${PN}-ifconfig \ -${PN}-tftp ${PN}-logger ${PN}-traceroute ${PN}-syslogd \ -${PN}-ftp ${PN}-ftpd ${PN}-tftpd ${PN}-telnet ${PN}-telnetd ${PN}-inetd \ -${PN}-rsh ${PN}-rshd" - -# The packages tftpd, telnetd and rshd conflict with the ones -# provided by netkit, so add the corresponding -dbg packages -# for them to avoid the confliction between the dbg package -# of inetutils and netkit. -PACKAGES =+ "${PN}-tftpd-dbg ${PN}-telnetd-dbg ${PN}-rshd-dbg" -NOAUTOPACKAGEDEBUG = "1" - -ALTERNATIVE_PRIORITY = "79" -ALTERNATIVE_${PN} = "talk whois" -ALTERNATIVE_LINK_NAME[talkd] = "${sbindir}/in.talkd" -ALTERNATIVE_LINK_NAME[uucpd] = "${sbindir}/in.uucpd" - -ALTERNATIVE_PRIORITY_${PN}-logger = "60" -ALTERNATIVE_${PN}-logger = "logger" -ALTERNATIVE_${PN}-syslogd = "syslogd" -ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" - -ALTERNATIVE_${PN}-ftp = "ftp" -ALTERNATIVE_${PN}-ftpd = "ftpd" -ALTERNATIVE_${PN}-tftp = "tftp" -ALTERNATIVE_${PN}-tftpd = "tftpd" -ALTERNATIVE_LINK_NAME[tftpd] = "${sbindir}/tftpd" -ALTERNATIVE_TARGET[tftpd] = "${sbindir}/in.tftpd" - -ALTERNATIVE_${PN}-telnet = "telnet" -ALTERNATIVE_${PN}-telnetd = "telnetd" -ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd" -ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd" - -ALTERNATIVE_${PN}-rsh = "rcp rexec rlogin rsh" -ALTERNATIVE_${PN}-rshd = "rshd rexecd rlogind" -ALTERNATIVE_LINK_NAME[rshd] = "${sbindir}/rshd" -ALTERNATIVE_TARGET[rshd] = "${sbindir}/in.rshd" -ALTERNATIVE_LINK_NAME[rexecd] = "${sbindir}/rexecd" -ALTERNATIVE_TARGET[rexecd] = "${sbindir}/in.rexecd" -ALTERNATIVE_LINK_NAME[rlogind] = "${sbindir}/rlogind" -ALTERNATIVE_TARGET[rlogind] = "${sbindir}/in.rlogind" - -ALTERNATIVE_${PN}-inetd= "inetd" -ALTERNATIVE_${PN}-traceroute = "traceroute" - -ALTERNATIVE_${PN}-hostname = "hostname" -ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname" - -ALTERNATIVE_${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8" -ALTERNATIVE_LINK_NAME[hostname.1] = "${mandir}/man1/hostname.1" -ALTERNATIVE_LINK_NAME[dnsdomainname.1] = "${mandir}/man1/dnsdomainname.1" -ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1" -ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" - -ALTERNATIVE_${PN}-ifconfig = "ifconfig" -ALTERNATIVE_LINK_NAME[ifconfig] = "${base_sbindir}/ifconfig" - -ALTERNATIVE_${PN}-ping = "ping" -ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" - -ALTERNATIVE_${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}" -ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" - - -FILES_${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" -FILES_${PN}-ping = "${base_bindir}/ping.${BPN}" -FILES_${PN}-ping6 = "${base_bindir}/ping6.${BPN}" -FILES_${PN}-hostname = "${base_bindir}/hostname.${BPN}" -FILES_${PN}-ifconfig = "${base_sbindir}/ifconfig.${BPN}" -FILES_${PN}-traceroute = "${bindir}/traceroute.${BPN}" -FILES_${PN}-logger = "${bindir}/logger.${BPN}" - -FILES_${PN}-syslogd = "${base_sbindir}/syslogd.${BPN}" -RCONFLICTS_${PN}-syslogd = "rsyslog busybox-syslog sysklogd syslog-ng" - -FILES_${PN}-ftp = "${bindir}/ftp.${BPN}" - -FILES_${PN}-tftp = "${bindir}/tftp.${BPN}" -FILES_${PN}-telnet = "${bindir}/telnet.${BPN}" -FILES_${PN}-rsh = "${bindir}/rsh.${BPN} ${bindir}/rlogin.${BPN} ${bindir}/rexec.${BPN} ${bindir}/rcp.${BPN}" - -FILES_${PN}-rshd = "${sbindir}/in.rshd ${sbindir}/in.rlogind ${sbindir}/in.rexecd \ - ${sysconfdir}/xinetd.d/rsh ${sysconfdir}/xinetd.d/rlogin ${sysconfdir}/xinetd.d/rexec" -FILES_${PN}-rshd-dbg = "${sbindir}/.debug/in.rshd ${sbindir}/.debug/in.rlogind ${sbindir}/.debug/in.rexecd" -RDEPENDS_${PN}-rshd += "xinetd tcp-wrappers" -RCONFLICTS_${PN}-rshd += "netkit-rshd" -RPROVIDES_${PN}-rshd = "rshd" - -FILES_${PN}-ftpd = "${bindir}/ftpd.${BPN}" -FILES_${PN}-ftpd-dbg = "${bindir}/.debug/ftpd.${BPN}" -RDEPENDS_${PN}-ftpd += "xinetd" - -FILES_${PN}-tftpd = "${sbindir}/in.tftpd ${sysconfdir}/xinetd.d/tftpd" -FILES_${PN}-tftpd-dbg = "${sbindir}/.debug/in.tftpd" -RCONFLICTS_${PN}-tftpd += "netkit-tftpd" -RDEPENDS_${PN}-tftpd += "xinetd" - -FILES_${PN}-telnetd = "${sbindir}/in.telnetd ${sysconfdir}/xinetd.d/telnet" -FILES_${PN}-telnetd-dbg = "${sbindir}/.debug/in.telnetd" -RCONFLICTS_${PN}-telnetd += "netkit-telnetd" -RPROVIDES_${PN}-telnetd = "telnetd" -RDEPENDS_${PN}-telnetd += "xinetd" - -FILES_${PN}-inetd = "${bindir}/inetd.${BPN}" - -RDEPENDS_${PN} = "xinetd" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch deleted file mode 100644 index fb16ecbf..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 8ea2ee451a1af7c5b5c8f4b36c1f77d44442064d Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 7 Sep 2018 13:02:35 -0700 -Subject: [PATCH] Fix error: call of overloaded distance is ambiguous -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -The boost::iterators::distance function template is an adapted version -of std::distance for the Boost iterator traversal in 2.68 it has started -to fail with argument dependent lookup and compiler is erroring out - -with - -error: call of overloaded ‘distance' - -boost implementation of distance is protected against being found by ADL - -The way function is called in libdhcp means it will be found via ADL and -all namespaces will be considered which is providing problematic since -its getting it from both std:: and boost:: namespaces - -so let it not rely on ADL by qualifying then calls with std:: namespace - -Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/103] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/lib/dhcp/libdhcp++.cc | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc -index 330c02b..ced705d 100644 ---- a/src/lib/dhcp/libdhcp++.cc -+++ b/src/lib/dhcp/libdhcp++.cc -@@ -419,14 +419,14 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf, - // We previously did the lookup only for dhcp6 option space, but with the - // addition of S46 options, we now do it for every space. - range = idx.equal_range(opt_type); -- num_defs = distance(range.first, range.second); -+ num_defs = std::distance(range.first, range.second); - - // Standard option definitions do not include the definition for - // our option or we're searching for non-standard option. Try to - // find the definition among runtime option definitions. - if (num_defs == 0) { - range = runtime_idx.equal_range(opt_type); -- num_defs = distance(range.first, range.second); -+ num_defs = std::distance(range.first, range.second); - } - - OptionPtr opt; -@@ -538,14 +538,14 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf, - // may be standard options in other spaces (e.g. radius). So we now do - // the lookup for every space. - range = idx.equal_range(opt_type); -- num_defs = distance(range.first, range.second); -+ num_defs = std::distance(range.first, range.second); - - // Standard option definitions do not include the definition for - // our option or we're searching for non-standard option. Try to - // find the definition among runtime option definitions. - if (num_defs == 0) { - range = runtime_idx.equal_range(opt_type); -- num_defs = distance(range.first, range.second); -+ num_defs = std::distance(range.first, range.second); - } - - // Check if option unpacking must be deferred -@@ -638,7 +638,7 @@ size_t LibDHCP::unpackVendorOptions6(const uint32_t vendor_id, - idx->equal_range(opt_type); - // Get the number of returned option definitions for the - // option code. -- size_t num_defs = distance(range.first, range.second); -+ size_t num_defs = std::distance(range.first, range.second); - - if (num_defs > 1) { - // Multiple options of the same code are not supported -@@ -746,7 +746,7 @@ size_t LibDHCP::unpackVendorOptions4(const uint32_t vendor_id, const OptionBuffe - idx->equal_range(opt_type); - // Get the number of returned option definitions for - // the option code. -- size_t num_defs = distance(range.first, range.second); -+ size_t num_defs = std::distance(range.first, range.second); - - if (num_defs > 1) { - // Multiple options of the same code are not --- -2.18.0 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch new file mode 100644 index 00000000..d7ca9ff8 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch @@ -0,0 +1,34 @@ +From 9d6b8321c5b46199baca907f3d42bdcaaf1958a8 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Thu, 23 May 2019 23:59:42 -0700 +Subject: [PATCH] remove AC_TRY_RUN + +AC_TRY_RUN doesn't work in cross compile env, +use AC_COMPILE_IFELSE instead to fix below configure +error: + | checking for usuable C++11 regex... configure: error: in `/builddir/tmp/work/core2-64-poky-linux/kea/1.5.0-r0/build': + | configure: error: cannot run test program while cross compiling + +Upstream-Status: Inappropriate [oe specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index c880b77..dd40c7c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -580,7 +580,7 @@ AC_TRY_COMPILE([ + AC_MSG_RESULT(no)) + + AC_MSG_CHECKING(for usuable C++11 regex) +-AC_TRY_RUN([ ++AC_COMPILE_IFELSE([ + #include <regex> + #include <iostream> + int main() { +-- +2.21.0 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch deleted file mode 100644 index 381a3a7e..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch +++ /dev/null @@ -1,31 +0,0 @@ -From cd902b8b588681a27d5321f1ee078a1c8f6e6935 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 3/3] 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.18.0 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service index f32edcb9..b851ea71 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service @@ -6,7 +6,7 @@ After=time-sync.target [Service] ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf [Install] diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service index 26d2205e..0f9f0ef8 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service @@ -6,7 +6,7 @@ After=time-sync.target [Service] ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea +ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/lib/kea ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf [Install] diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.7.7.bb index 67de07b3..e25f8e6f 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/kea/kea_1.7.7.bb @@ -3,29 +3,42 @@ DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It HOMEPAGE = "http://kea.isc.org" SECTION = "connectivity" LICENSE = "MPL-2.0 & Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=1666a9c4bb55adbc8939d85643096bd3" +LIC_FILES_CHKSUM = "file://COPYING;md5=68d95543d2096459290a4e6b9ceccffa" DEPENDS += "kea-native" SRC_URI = "\ http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ - file://0003-Makefile.am-update-hooksdir-for-lease_cmds.patch \ - file://0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch \ + file://0001-remove-AC_TRY_RUN.patch \ file://kea-dhcp4.service \ file://kea-dhcp6.service \ file://kea-dhcp-ddns.service \ " -SRC_URI[md5sum] = "26eedd749101642757d788431605aaa5" -SRC_URI[sha256sum] = "c0f8ecb93657adfc5ab970c91706754e601084828493f053f159661d21b31128" +SRC_URI[md5sum] = "4f8d1251fd41ef2e822a4eb3f0797d46" +SRC_URI[sha256sum] = "0bba8b045672884a928ff4b2a8575ac5ba420eb6ba47a9338f1932bc38dcf866" inherit autotools systemd SYSTEMD_SERVICE_${PN} = "kea-dhcp4.service kea-dhcp6.service kea-dhcp-ddns.service" SYSTEMD_AUTO_ENABLE = "disable" +DEBUG_OPTIMIZATION_remove_mips = " -Og" +DEBUG_OPTIMIZATION_append_mips = " -O" +BUILD_OPTIMIZATION_remove_mips = " -Og" +BUILD_OPTIMIZATION_append_mips = " -O" + +DEBUG_OPTIMIZATION_remove_mipsel = " -Og" +DEBUG_OPTIMIZATION_append_mipsel = " -O" +BUILD_OPTIMIZATION_remove_mipsel = " -Og" +BUILD_OPTIMIZATION_append_mipsel = " -O" + do_configure_prepend_class-target() { mkdir -p ${B}/src/lib/log/compiler/ ln -sf ${STAGING_BINDIR_NATIVE}/kea-msg-compiler ${B}/src/lib/log/compiler/kea-msg-compiler + # replace abs_top_builddir to avoid introducing the build path + # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target + find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" + sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in } do_install_append_class-target() { @@ -44,9 +57,11 @@ PACKAGECONFIG ??= "openssl log4cplus boost" 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" +PACKAGECONFIG[boost] = "--with-boost-libs=-lboost_system,,boost,boost" FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" FILES_${PN} += "${libdir}/hooks/*.so" BBCLASSEXTEND += "native" + +PARALLEL_MAKEINST = "" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch deleted file mode 100644 index 952232b7..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- lftp-4.6.3a/src/NetAccess.cc.orig 2016-06-18 10:25:51.063358981 -0400 -+++ lftp-4.6.3a/src/NetAccess.cc 2016-06-18 10:26:04.143359209 -0400 -@@ -21,7 +21,7 @@ - - #include <errno.h> - #include <assert.h> --#include <math.h> -+#include <cmath> - #include <sys/types.h> - - #include "NetAccess.h" ---- lftp-4.6.3a/src/Speedometer.cc.orig 2016-06-18 10:24:58.895358073 -0400 -+++ lftp-4.6.3a/src/Speedometer.cc 2016-06-18 10:25:10.879358281 -0400 -@@ -18,7 +18,7 @@ - */ - - #include <config.h> --#include <math.h> -+#include <cmath> - #include <stdlib.h> - #include "Speedometer.h" - #include "misc.h" ---- lftp-4.6.3a/src/FileCopy.cc.orig 2016-06-18 10:24:15.939357325 -0400 -+++ lftp-4.6.3a/src/FileCopy.cc 2016-06-18 10:24:24.583357475 -0400 -@@ -36,7 +36,7 @@ - #include <sys/types.h> - #include <sys/stat.h> - #include <fcntl.h> --#include <math.h> -+#include <cmath> - #include <stddef.h> - #include "FileCopy.h" - #include "url.h" ---- lftp-4.6.3a/src/ResMgr.cc.orig 2016-06-18 10:23:31.387356549 -0400 -+++ lftp-4.6.3a/src/ResMgr.cc 2016-06-18 10:23:41.771356729 -0400 -@@ -23,7 +23,7 @@ - #include <ctype.h> - #include <unistd.h> - #include <stdlib.h> --#include <math.h> -+#include <cmath> - #include <sys/types.h> - #include <sys/stat.h> - #include <errno.h> diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.9.1.bb index bf793d91..79a380ad 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/lftp/lftp_4.9.1.bb @@ -6,11 +6,9 @@ SECTION = "console/network" LICENSE = "GPLv3" 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] = "a56b5047dbfda052df4c1dfd197aa092" -SRC_URI[sha256sum] = "a853edbd075b008c315679c7882b6dcc6821ed2365d2ed843a412acd3d40da0e" +SRC_URI = "http://lftp.yar.ru/ftp/lftp-${PV}.tar.bz2" +SRC_URI[md5sum] = "19ce64012bc722ad61667372fa262382" +SRC_URI[sha256sum] = "a692fd081c19e2cc045869ab721a4fb3d7571040849a4406c4042f735232414c" inherit autotools gettext pkgconfig diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb index 53ba25e2..5b27cfe1 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb @@ -1,7 +1,7 @@ SUMMARY = "dumb networking library" HOMEPAGE = "http://code.google.com/p/libdnet/" SECTION = "libs" -LICENSE = "BSD" +LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9" SRC_URI = "git://github.com/dugsong/libdnet.git;nobranch=1" @@ -11,8 +11,10 @@ UPSTREAM_CHECK_GITTAGREGEX = "libdnet-(?P<pver>\d+(\.\d+)+)" S = "${WORKDIR}/git" -inherit autotools +inherit autotools multilib_script acpaths = "-I ./config/" BBCLASSEXTEND = "native" + +MULTILIB_SCRIPTS = "${PN}:${bindir}/dnet-config" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.6.bb index ff3f7f0c..12ad3976 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.13.0.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.6.bb @@ -23,9 +23,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a" SECTION = "libs" SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz" - -SRC_URI[md5sum] = "659d96bb03012ca6db414a9137fcdbd6" -SRC_URI[sha256sum] = "593b4e4d2e1629fc407ab4750d69fa309a0ddb66565dc3deb5b60eddbdeb06da" +SRC_URI[md5sum] = "1f629a43c166de2eca808f3e30aa961d" +SRC_URI[sha256sum] = "66455e23a6190a30142cdc1113f7418158839331a9d8e6b0778631d077281770" inherit cmake @@ -40,3 +39,5 @@ RPROVIDES_${PN} = "polarssl" PACKAGES =+ "${PN}-programs" FILES_${PN}-programs = "${bindir}/" + +BBCLASSEXTEND = "native nativesdk" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch new file mode 100644 index 00000000..e33d8eac --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch @@ -0,0 +1,38 @@ +From 54698856e5602bbd9d61e855814c854a013b4840 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 22 Dec 2018 18:47:45 -0800 +Subject: [PATCH] Add OpenEmbedded cross compile case + +Upstream-Status: Submitted [https://github.com/miniupnp/miniupnp/pull/410] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + genconfig.sh | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +--- a/genconfig.sh ++++ b/genconfig.sh +@@ -103,6 +103,12 @@ if [ -f ../shared/tomato_version ]; then + OS_VERSION="Tomato $TOMATO_VER" + fi + ++# OpenEmbedded special case ++if [ -f ./os.openembedded ]; then ++ OS_NAME=OpenEmbedded ++ OS_VERSION=$(cat ./os.openembedded) ++fi ++ + ${RM} ${CONFIGFILE} + + echo "/* MiniUPnP Project" >> ${CONFIGFILE} +@@ -346,6 +352,11 @@ case $OS_NAME in + echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} + FW=iptables + ;; ++ OpenEmbedded) ++ OS_URL=http://www.openembedded.org/ ++ echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} ++ FW=iptables ++ ;; + AstLinux) + OS_URL=http://www.astlinux.org/ + echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb index 04b5cd58..a630d27b 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.0.20180203.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb @@ -5,22 +5,28 @@ the network." SECTION = "networking" LICENSE = "BSD-3-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=91ac00c6b9f5c106e89291e196fe0234" +LIC_FILES_CHKSUM = "file://LICENSE;md5=a1ed15843ce66639bcf9f109cf247870" 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 \ - file://miniupnpd.service" - -SRC_URI[md5sum] = "b4c7c938915edeee6ca4c65dd021f212" -SRC_URI[sha256sum] = "860c15f2f8340fd69546b01cffe4c7fcff3e63a7bdfe5a2af6b2346f0e074bb6" +SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;downloadfilename=${BP}.tar.gz \ + file://miniupnpd.service \ + file://0001-Add-OpenEmbedded-cross-compile-case.patch \ + " +SRC_URI[md5sum] = "340789edd49c113afe37834cc901a1e8" +SRC_URI[sha256sum] = "218fad7af31f3c22fb4c9db28a55a2a8b5067d41f5b38f52008a057a00d2206d" IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" +do_configure_prepend() { + echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded +} + do_compile() { cd ${S} + CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux config.h CONFIG_OPTIONS="${IPV6} --leasefile --vendorcfg" oe_runmake -f Makefile.linux } @@ -31,6 +37,7 @@ do_install() { install ${S}/netfilter/iptables_init.sh ${D}/${sysconfdir}/${BPN} install ${S}/netfilter/iptables_removeall.sh ${D}/${sysconfdir}/${BPN} install ${S}/netfilter/ip6tables_init.sh ${D}/${sysconfdir}/${BPN} + install ${S}/netfilter/miniupnpd_functions.sh ${D}/${sysconfdir}/${BPN} install ${S}/netfilter/ip6tables_removeall.sh ${D}/${sysconfdir}/${BPN} install -m 0644 -b ${S}/miniupnpd.conf ${D}/${sysconfdir}/${BPN} install -d ${D}/${sysconfdir}/init.d diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch deleted file mode 100644 index c89dfe6b..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/0002-uthash-remove-in-tree-version.patch +++ /dev/null @@ -1,975 +0,0 @@ -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/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch new file mode 100644 index 00000000..93ff6bcf --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/1571.patch @@ -0,0 +1,22 @@ +Upstream-Status: Submitted [https://github.com/eclipse/mosquitto/pull/1571] +From 3fe5468f1bdca1bff1d18cf43c9e338f41aa9e32 Mon Sep 17 00:00:00 2001 +From: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +Date: Wed, 22 Jan 2020 12:39:49 +0100 +Subject: [PATCH] Add dynamic symbols linking with cmake too + +Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> +--- + lib/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -89,6 +89,8 @@ + OUTPUT_NAME mosquitto + VERSION ${VERSION} + SOVERSION 1 ++ LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/linker.version ++ LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version" + ) + + install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/install-protocol.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/install-protocol.patch new file mode 100644 index 00000000..1397fc6a --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/install-protocol.patch @@ -0,0 +1,14 @@ +Description: Also install mqtt_protocol.h, as is done in Makefile +Author: Gianfranco Costamagna <locutusofborg@debian.org> +Bug-Debian: https://bugs.debian.org/951116 +Forwarded: https://github.com/eclipse/mosquitto/pull/1599 +Last-Update: 2020-02-15 + +--- a/lib/CMakeLists.txt ++++ b/lib/CMakeLists.txt +@@ -114,4 +114,4 @@ + install(TARGETS libmosquitto_static ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") + endif (WITH_STATIC_LIBRARIES) + +-install(FILES mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") ++install(FILES mqtt_protocol.h mosquitto.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init index 6a0c1276..9d5963c4 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init @@ -38,7 +38,7 @@ 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 + 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 diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.10.bb index 06c1d67d..31b5f678 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.5.1.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.10.bb @@ -1,5 +1,9 @@ -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. " +SUMMARY = "Open source MQTT implementation" +DESCRIPTION = "Mosquitto is an open source (Eclipse licensed) message broker \ +that implements the MQ Telemetry Transport protocol version 3.1, 3.1.1 and \ +5, providing both an MQTT broker and several command-line clients. 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" @@ -11,46 +15,35 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \ DEPENDS = "uthash" SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ - file://0002-uthash-remove-in-tree-version.patch \ file://mosquitto.init \ + file://1571.patch \ + file://install-protocol.patch \ " -SRC_URI[md5sum] = "f98c99998a36a234f3a9d9b402b991db" -SRC_URI[sha256sum] = "8557bc7ae34dfaf32a0fb56d2491b7a7f731269c88337227233013502df4d5b0" +SRC_URI[md5sum] = "960f963b81b7f93982d7511cd28082e5" +SRC_URI[sha256sum] = "92d1807717f0f6d57d1ac1207ffdb952e8377e916c7b0bb4718f745239774232" -inherit systemd update-rc.d useradd +inherit systemd update-rc.d useradd cmake -PACKAGECONFIG ??= "ssl uuid \ +PACKAGECONFIG ??= "ssl dlt websockets \ ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ " -PACKAGECONFIG[dns-srv] = "WITH_SRV=yes,WITH_SRV=no,c-ares" -PACKAGECONFIG[ssl] = "WITH_TLS=yes WITH_TLS_PSK=yes,WITH_TLS=no WITH_TLS_PSK=no,openssl" -PACKAGECONFIG[uuid] = "WITH_UUID=yes,WITH_UUID=no,util-linux" -PACKAGECONFIG[systemd] = "WITH_SYSTEMD=yes,WITH_SYSTEMD=no,systemd" -PACKAGECONFIG[websockets] = "WITH_WEBSOCKETS=yes,WITH_WEBSOCKETS=no,libwebsockets" - -EXTRA_OEMAKE = " \ - prefix=${prefix} \ - mandir=${mandir} \ - localedir=${localedir} \ - ${PACKAGECONFIG_CONFARGS} \ - STRIP=/bin/true \ - WITH_DOCS=no \ -" - -export LIB_SUFFIX = "${@d.getVar('baselib', True).replace('lib', '')}" +PACKAGECONFIG[dns-srv] = "-DWITH_SRV=ON,-DWITH_SRV=OFF,c-ares" +PACKAGECONFIG[ssl] = "-DWITH_TLS=ON -DWITH_TLS_PSK=ON -DWITH_EC=ON,-DWITH_TLS=OFF -DWITH_TLS_PSK=OFF -DWITH_EC_OFF,openssl" +PACKAGECONFIG[systemd] = "-DWITH_SYSTEMD=ON,-DWITH_SYSTEMD=OFF,systemd" +PACKAGECONFIG[websockets] = "-DWITH_WEBSOCKETS=ON,-DWITH_WEBSOCKETS=OFF,libwebsockets" +PACKAGECONFIG[dlt] = "-DWITH_DLT=ON,-DWITH_DLT=OFF,dlt-daemon" -do_install() { - oe_runmake 'DESTDIR=${D}' install +EXTRA_OECMAKE = " \ + -DWITH_BUNDLED_DEPS=OFF \ + -DWITH_ADNS=ON \ +" +do_install_append() { install -d ${D}${systemd_unitdir}/system/ install -m 0644 ${S}/service/systemd/mosquitto.service.notify ${D}${systemd_unitdir}/system/mosquitto.service - install -d ${D}${sysconfdir}/mosquitto - install -m 0644 ${D}${sysconfdir}/mosquitto/mosquitto.conf.example \ - ${D}${sysconfdir}/mosquitto/mosquitto.conf - install -d ${D}${sysconfdir}/init.d/ install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto sed -i -e 's,@SBINDIR@,${sbindir},g' \ @@ -73,12 +66,13 @@ FILES_${PN} = "${sbindir}/mosquitto \ CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" -FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" +FILES_libmosquitto1 = "${libdir}/libmosquitto.so.*" -FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" +FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.*" FILES_${PN}-clients = "${bindir}/mosquitto_pub \ ${bindir}/mosquitto_sub \ + ${bindir}/mosquitto_rr \ " FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.4.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb index fa6b43ac..8444f0b7 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.4.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb @@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755" SECTION = "libs/networking" SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https" -SRCREV = "e7f8a751316b942d8962cd0232c2d606c1d9a9db" +SRCREV = "1749fd7b039165a91b8d556b4df18e3e632ad830" S = "${WORKDIR}/git" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb new file mode 100644 index 00000000..77be27ff --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb @@ -0,0 +1,21 @@ +SUMMARY = "nanomsg-next-generation -- light-weight brokerless messaging" +DESCRIPTION = "NNG, like its predecessors nanomsg (and to some extent ZeroMQ), is a lightweight, broker-less library, offering a simple API to solve common recurring messaging problems, such as publish/subscribe, RPC-style request/reply, or service discovery." +HOMEPAGE = "https://github.com/nanomsg/nng" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a19b15be6e844b39a54de2ef665bd6de" + +SECTION = "libs/networking" + +SRCREV = "53ae1a5ab37fdfc9ad5c236df3eaf4dd63f0fee9" + +SRC_URI = "git://github.com/nanomsg/nng.git;branch=v1.2.x" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON" + +PACKAGECONFIG ??= "" + +PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb new file mode 100644 index 00000000..9f123c70 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/netplan/netplan_0.98.bb @@ -0,0 +1,59 @@ +SUMMARY = "The network configuration abstraction renderer" +DESCRIPTION = "Netplan is a utility for easily configuring networking on a \ +linux system. You simply create a YAML description of the required network \ +interfaces and what each should be configured to do. From this description \ +Netplan will generate all the necessary configuration for your chosen renderer \ +tool." +HOMEPAGE = "https://netplan.io" +SECTION = "net/misc" + +LICENSE = "GPLv3" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +S = "${WORKDIR}/git" +SRCREV = "5d22e9d22c4a3724d27b80b0cd9b898ae8f59d2b" +PV = "0.98+git${SRCPV}" + +SRC_URI = " \ + git://github.com/CanonicalLtd/netplan.git \ +" + +DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid" + +inherit pkgconfig systemd + +TARGET_CC_ARCH += "${LDFLAGS}" + +EXTRA_OEMAKE = "generate" +EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}" + +do_install() { + install -d ${D}${sbindir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan + install -m 755 ${S}/generate ${D}${base_libdir}/netplan/ + install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan + install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli + install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands + install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/ + ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan + + install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators + install -m 644 ${S}/src/netplan-wpa@.service ${D}${systemd_unitdir}/system/ + ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services + install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan + install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d + install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services + fi +} + +SYSTEMD_SERVICE_${PN} = "netplan-wpa@.service" +SYSTEMD_AUTO_ENABLE = "disable" + +PACKAGES += "${PN}-dbus" + +FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}" +FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.10.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.12.bb index 9159fcbf..d455a0f0 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.10.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.12.bb @@ -10,12 +10,23 @@ inherit gnomebase useradd gettext systemd SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz" -SRC_URI[md5sum] = "f118226ed2bfbacfd64ac4d1e0bd0383" -SRC_URI[sha256sum] = "ac86a7a539d78df90095676e9183f2d422fb93dbfe4b3afef22f81825d303d61" +SRC_URI[md5sum] = "e8b1210011ece18d0278310fbff45af5" +SRC_URI[sha256sum] = "0efda8878aaf0e6eb5071a053aea5d7f9d42aac097b3ff89e7cbc9233f815318" S = "${WORKDIR}/NetworkManager-openvpn-${PV}" -PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome" +# meta-gnome in layers is required using gnome: +PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret" + +do_configure_append() { + # network-manager-openvpn.metainfo.xml is created in source folder but + # compile expects it in build folder. As long as nobody comes up with a + # better solution just support build: + if [ -e ${S}/appdata/network-manager-openvpn.metainfo.xml ]; then + mkdir -p ${B}/appdata + cp -f ${S}/appdata/network-manager-openvpn.metainfo.xml ${B}/appdata/ + fi +} do_install_append () { rm -rf ${D}${libdir}/NetworkManager/*.la @@ -26,6 +37,7 @@ USERADD_PACKAGES = "${PN}" USERADD_PARAM_${PN} = "--system nm-openvpn" FILES_${PN} += " \ + ${datadir}/dbus-1 \ ${libdir}/NetworkManager/*.so \ ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ " diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch deleted file mode 100644 index 0c415bce..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 3f4b6319701834182304c4079119780f4ae5b49b Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 7 Nov 2018 11:30:44 -0800 -Subject: [PATCH] Do not include net/ethernet.h and linux/if_ether.h - -They conflict when used together especially with musl -removing them still keeps it working so it seems they are redundant - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - shared/n-acd/src/n-acd.c | 1 - - src/platform/wpan/nm-wpan-utils.h | 2 -- - src/settings/nm-settings-connection.h | 2 -- - 3 files changed, 5 deletions(-) - -diff --git a/shared/n-acd/src/n-acd.c b/shared/n-acd/src/n-acd.c -index 9164f95..9538e50 100644 ---- a/shared/n-acd/src/n-acd.c -+++ b/shared/n-acd/src/n-acd.c -@@ -23,7 +23,6 @@ - #include <errno.h> - #include <limits.h> - #include <linux/filter.h> --#include <linux/if_ether.h> - #include <linux/if_packet.h> - #include <net/ethernet.h> - #include <netinet/if_ether.h> -diff --git a/src/platform/wpan/nm-wpan-utils.h b/src/platform/wpan/nm-wpan-utils.h -index f7d0c03..e1c81f5 100644 ---- a/src/platform/wpan/nm-wpan-utils.h -+++ b/src/platform/wpan/nm-wpan-utils.h -@@ -20,8 +20,6 @@ - #ifndef __WPAN_UTILS_H__ - #define __WPAN_UTILS_H__ - --#include <net/ethernet.h> -- - #include "nm-dbus-interface.h" - #include "platform/nm-netlink.h" - -diff --git a/src/settings/nm-settings-connection.h b/src/settings/nm-settings-connection.h -index e796b71..c01fef6 100644 ---- a/src/settings/nm-settings-connection.h -+++ b/src/settings/nm-settings-connection.h -@@ -22,8 +22,6 @@ - #ifndef __NETWORKMANAGER_SETTINGS_CONNECTION_H__ - #define __NETWORKMANAGER_SETTINGS_CONNECTION_H__ - --#include <net/ethernet.h> -- - #include "nm-dbus-object.h" - #include "nm-connection.h" - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch index 351f264c..19c8c748 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch @@ -1,4 +1,4 @@ -From 583f0448fb7e9aba2b410c06eec6f420b41a6a0c Mon Sep 17 00:00:00 2001 +From 9bcf4c81a559d1e7deac47b2e510d7f1e5837a02 Mon Sep 17 00:00:00 2001 From: Pablo Saavedra <psaavedra@igalia.com> Date: Tue, 13 Mar 2018 17:36:20 +0100 Subject: [PATCH] Fixed configure.ac: Fix pkgconfig sysroot locations @@ -8,10 +8,10 @@ Subject: [PATCH] Fixed configure.ac: Fix pkgconfig sysroot locations 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 51e5eb6..c9d3e56 100644 +index 65ceffb..ad4b0fc 100644 --- a/configure.ac +++ b/configure.ac -@@ -572,7 +572,7 @@ if test "$have_jansson" = "yes"; then +@@ -561,7 +561,7 @@ if test "$have_jansson" = "yes"; then AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) AC_CHECK_TOOLS(READELF, [eu-readelf readelf]) @@ -20,6 +20,3 @@ index 51e5eb6..c9d3e56 100644 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/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch deleted file mode 100644 index 49a07353..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-sd-lldp.h-Remove-net-ethernet.h-seems-to-be-over-spe.patch +++ /dev/null @@ -1,39 +0,0 @@ -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] 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 -@@ -3,6 +3,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 -@@ -18,7 +18,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/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch index c50293c0..446637b2 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-Do-not-create-settings-settings-property-documentati.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch @@ -1,4 +1,4 @@ -From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001 +From 9eab96351a726e9ce6a15d158f743e35d73a8900 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 @@ -6,23 +6,29 @@ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +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 | 20 -------------------- + Makefile.am | 11 ----------- configure.ac | 5 ----- - 2 files changed, 25 deletions(-) + 2 files changed, 16 deletions(-) diff --git a/Makefile.am b/Makefile.am -index 1e100f6..d31e3c1 100644 +index d5cbcf5..2a1819a 100644 --- a/Makefile.am +++ b/Makefile.am -@@ -1115,9 +1115,7 @@ EXTRA_DIST += \ - if HAVE_INTROSPECTION +@@ -1473,9 +1473,7 @@ libnm/libnm.typelib: libnm/libnm.gir + INTROSPECTION_GIRS += libnm/NM-1.0.gir libnm_noinst_data = \ - libnm/nm-property-docs.xml \ @@ -31,7 +37,7 @@ index 1e100f6..d31e3c1 100644 libnm/nm-settings-keyfile-docs.xml \ libnm/nm-settings-ifcfg-rh-docs.xml -@@ -3692,27 +3690,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) +@@ -4236,18 +4234,9 @@ $(clients_common_libnmc_base_la_OBJECTS): $(libnm_lib_h_pub_mkenums) $(clients_common_libnmc_base_la_OBJECTS): clients/common/.dirstamp clients_common_settings_doc_h = clients/common/settings-docs.h @@ -40,16 +46,7 @@ index 1e100f6..d31e3c1 100644 - $(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^) -DISTCLEANFILES += $(clients_common_settings_doc_h) -check-local-settings-docs: $(clients_common_settings_doc_h) -- @if test -z "$$NMTST_NO_CHECK_SETTINGS_DOCS" ; then \ -- if ! cmp -s "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)" ; then \ -- if test "$$NM_TEST_REGENERATE" == 1 ; then \ -- cp -f "$(builddir)/$(clients_common_settings_doc_h)" "$(srcdir)/$(clients_common_settings_doc_h).in"; \ -- else \ -- echo "The generated file \"$(builddir)/$(clients_common_settings_doc_h)\" differs from the source file \"$(srcdir)/$(clients_common_settings_doc_h).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". You can also automatically copy the file by rerunning the test with \$$NM_TEST_REGENERATE=1 ; \ -- false; \ -- fi; \ -- fi;\ -- fi +- $(srcdir)/tools/check-settings-docs.sh "$(srcdir)" "$(builddir)" "$(clients_common_settings_doc_h)" -check_local += check-local-settings-docs -else $(clients_common_settings_doc_h): $(clients_common_settings_doc_h).in clients/common/.dirstamp @@ -60,10 +57,10 @@ index 1e100f6..d31e3c1 100644 $(clients_common_settings_doc_h) \ $(clients_common_settings_doc_h).in diff --git a/configure.ac b/configure.ac -index 79dc3b9..23d14a6 100644 +index ad4b0fc..0092092 100644 --- a/configure.ac +++ b/configure.ac -@@ -1195,11 +1195,6 @@ GTK_DOC_CHECK(1.0) +@@ -1201,11 +1201,6 @@ GTK_DOC_CHECK(1.0) # check if we can build setting property documentation build_docs=no if test -n "$INTROSPECTION_MAKEFILE"; then @@ -75,6 +72,3 @@ index 79dc3b9..23d14a6 100644 AC_PATH_PROG(PERL, perl) if test -z "$PERL"; then AC_MSG_ERROR([--enable-introspection requires perl]) --- -2.14.5 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch new file mode 100644 index 00000000..c23fc308 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch @@ -0,0 +1,165 @@ +From e7ed91c48e1a07527a860637a7865eb67ce34cf3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Tue, 2 Apr 2019 01:34:35 +0200 +Subject: [PATCH] Fix build with musl - systemd specific +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Networkmanager imported some code from systemd. This requires some adjustments +for musl. + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> + +--- + shared/systemd/src/basic/in-addr-util.c | 1 + + shared/systemd/src/basic/process-util.c | 9 +++++++++ + shared/systemd/src/basic/socket-util.h | 6 ++++++ + shared/systemd/src/basic/sort-util.h | 27 ++++--------------------- + shared/systemd/src/basic/stdio-util.h | 2 ++ + shared/systemd/src/basic/string-util.h | 5 +++++ + 6 files changed, 27 insertions(+), 23 deletions(-) + +diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c +index 91d687c..8388304 100644 +--- a/shared/systemd/src/basic/in-addr-util.c ++++ b/shared/systemd/src/basic/in-addr-util.c +@@ -15,6 +15,7 @@ + #include "in-addr-util.h" + #include "macro.h" + #include "parse-util.h" ++#include "string-util.h" + #include "random-util.h" + #include "strxcpyx.h" + #include "util.h" +diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c +index 1456167..42f51a0 100644 +--- a/shared/systemd/src/basic/process-util.c ++++ b/shared/systemd/src/basic/process-util.c +@@ -17,6 +17,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> +@@ -1123,11 +1126,13 @@ 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 _weak_; ++#endif + + pid_t getpid_cached(void) { + static bool installed = false; +@@ -1156,7 +1161,11 @@ pid_t getpid_cached(void) { + * only half-documented (glibc doesn't document it but LSB does — though only superficially) + * we'll check for errors only in the most generic fashion possible. */ + ++#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; +diff --git a/shared/systemd/src/basic/socket-util.h b/shared/systemd/src/basic/socket-util.h +index a0886e0..da47d14 100644 +--- a/shared/systemd/src/basic/socket-util.h ++++ b/shared/systemd/src/basic/socket-util.h +@@ -14,6 +14,12 @@ + #include <sys/types.h> + #include <sys/un.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_socket.h" + #include "sparse-endian.h" +diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h +index e029f86..1e8b6e1 100644 +--- a/shared/systemd/src/basic/sort-util.h ++++ b/shared/systemd/src/basic/sort-util.h +@@ -5,15 +5,10 @@ + + #include "macro.h" + +-void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, +- __compar_d_fn_t compar, void *arg); +- +-#define typesafe_bsearch_r(k, b, n, func, userdata) \ +- ({ \ +- const typeof(b[0]) *_k = k; \ +- int (*_func_)(const typeof(b[0])*, const typeof(b[0])*, typeof(userdata)) = func; \ +- xbsearch_r((const void*) _k, (b), (n), sizeof((b)[0]), (__compar_d_fn_t) _func_, userdata); \ +- }) ++#if !defined(__GLIBC__) ++typedef int (*__compar_fn_t) (const void*, const void*); ++typedef __compar_fn_t comparison_fn_t; ++#endif + + /** + * Normal bsearch requires base to be nonnull. Here were require +@@ -54,17 +49,3 @@ static inline void qsort_safe(void *base, size_t nmemb, size_t size, __compar_fn + int (*_func_)(const typeof(p[0])*, const typeof(p[0])*) = func; \ + qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ + }) +- +-static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { +- if (nmemb <= 1) +- return; +- +- assert(base); +- qsort_r(base, nmemb, size, compar, userdata); +-} +- +-#define typesafe_qsort_r(p, n, func, userdata) \ +- ({ \ +- int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ +- qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ +- }) +diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h +index c3b9448..e80a938 100644 +--- a/shared/systemd/src/basic/stdio-util.h ++++ b/shared/systemd/src/basic/stdio-util.h +@@ -1,7 +1,9 @@ + /* SPDX-License-Identifier: LGPL-2.1+ */ + #pragma once + ++#if defined(__GLIBC__) + #include <printf.h> ++#endif + #include <stdarg.h> + #include <stdio.h> + #include <sys/types.h> +diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h +index 04cc82b..2cf589a 100644 +--- a/shared/systemd/src/basic/string-util.h ++++ b/shared/systemd/src/basic/string-util.h +@@ -26,6 +26,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) { diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch deleted file mode 100644 index 00dda5b1..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-musl-basic.patch +++ /dev/null @@ -1,54 +0,0 @@ -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] 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 73c0327..e1ce64f 100644 ---- a/src/systemd/src/basic/stdio-util.h -+++ b/src/systemd/src/basic/stdio-util.h -@@ -1,7 +1,9 @@ - /* SPDX-License-Identifier: LGPL-2.1+ */ - #pragma once - -+#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 -@@ -28,6 +28,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/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch new file mode 100644 index 00000000..196a3358 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch @@ -0,0 +1,116 @@ +From 877fbb4e848629ff57371b5bdb0d56369abe9d81 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> +Date: Mon, 8 Apr 2019 23:10:43 +0200 +Subject: [PATCH] Fix build with musl +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The build issues caused by definition conflicts musl vs linux-libc headers +(error: redefinition of ...) can be reduced to two headers: + +1. netinet/if_ether.h <-> linux/if_ether.h: linux-libc header plays well with + glibc and musl headers in case libc's variant (netinet/if_ether.h) is + included BEFORE linux variant [1]. We add include at two positions: + 1. shared/nm-default.h: This is a global which used for networkmanager and + is included at the very beginning of all c-files. + 2. libnm-core/nm-utils.h: This file makes it into installation and is used + by dependent packages as network-manager-applet +2. net/if_arp. <-> linux/if_ether.h: linux-libc: Unfortunaly these files do + not play together in harmony. Therefore the libc variant is included early in + shared/nm-default.h and occurances linux/if_arp.h are removed. + +Note: +Be aware that this is still nasty business: We have to trust that musl headers +define same signatures as linux would do - just because musl-makers consider +linux-libc headers 'notoriously broken for userspace' [2] (search for +'error: redefinition of'). + +[1] http://lists.openembedded.org/pipermail/openembedded-core/2019-March/280440.html +[2] https://wiki.musl-libc.org/faq.html + +Upstream-Status: Pending + +Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> + +--- + clients/tui/nmt-device-entry.c | 1 - + libnm-core/nm-utils.h | 4 ++++ + shared/nm-default.h | 3 +++ + src/devices/nm-device.c | 2 +- + src/platform/nm-linux-platform.c | 1 - + 5 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/clients/tui/nmt-device-entry.c b/clients/tui/nmt-device-entry.c +index 4ab5932..915248c 100644 +--- a/clients/tui/nmt-device-entry.c ++++ b/clients/tui/nmt-device-entry.c +@@ -26,7 +26,6 @@ + #include "nmt-device-entry.h" + + #include <sys/socket.h> +-#include <linux/if_arp.h> + + #include "nmtui.h" + +diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h +index 5418a1e..f492da6 100644 +--- a/libnm-core/nm-utils.h ++++ b/libnm-core/nm-utils.h +@@ -10,6 +10,10 @@ + #error "Only <NetworkManager.h> can be included directly." + #endif + ++/* include as early as possible for musl */ ++#include <netinet/if_ether.h> ++/* #include <net/if_arp.h> - uncoment for broken dependents?? */ ++ + #include <glib.h> + + #include <netinet/in.h> +diff --git a/shared/nm-default.h b/shared/nm-default.h +index ace6ede..25357da 100644 +--- a/shared/nm-default.h ++++ b/shared/nm-default.h +@@ -182,6 +182,9 @@ + #endif + + #include <stdlib.h> ++/* include as early as possible for musl */ ++#include <netinet/if_ether.h> ++#include <net/if_arp.h> + + /*****************************************************************************/ + +diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c +index 3bbc975..4e8a3f6 100644 +--- a/src/devices/nm-device.c ++++ b/src/devices/nm-device.c +@@ -9,6 +9,7 @@ + #include "nm-device.h" + + #include <netinet/in.h> ++#include <net/if.h> + #include <unistd.h> + #include <sys/ioctl.h> + #include <signal.h> +@@ -17,7 +18,6 @@ + #include <arpa/inet.h> + #include <fcntl.h> + #include <linux/if_addr.h> +-#include <linux/if_arp.h> + #include <linux/rtnetlink.h> + #include <linux/pkt_sched.h> + +diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c +index 7abe4df..9f53147 100644 +--- a/src/platform/nm-linux-platform.c ++++ b/src/platform/nm-linux-platform.c +@@ -14,7 +14,6 @@ + #include <libudev.h> + #include <linux/fib_rules.h> + #include <linux/ip.h> +-#include <linux/if_arp.h> + #include <linux/if_bridge.h> + #include <linux/if_link.h> + #include <linux/if_tun.h> diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch deleted file mode 100644 index c162c1df..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-musl-dlopen-configure-ac.patch +++ /dev/null @@ -1,35 +0,0 @@ -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] 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 -@@ -235,6 +235,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/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch new file mode 100644 index 00000000..62252826 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-Fix-build-with-musl-for-n-dhcp4.patch @@ -0,0 +1,61 @@ +From aff5cded8847f3eee59f5cec22afb8630d401a85 Mon Sep 17 00:00:00 2001 +From: Adrian Freihofer <adrian.freihofer@siemens.com> +Date: Sat, 7 Mar 2020 14:22:36 +0100 +Subject: [PATCH 3/4] Fix build with musl for n-dhcp4 + +--- + shared/n-dhcp4/src/n-dhcp4-c-probe.c | 8 ++++++++ + shared/n-dhcp4/src/n-dhcp4-private.h | 4 ++++ + 2 files changed, 12 insertions(+) + +diff --git a/shared/n-dhcp4/src/n-dhcp4-c-probe.c b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +index e4477a7..75713c8 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-c-probe.c ++++ b/shared/n-dhcp4/src/n-dhcp4-c-probe.c +@@ -360,8 +360,12 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe + seed16v[1] = (u64 >> 16) ^ (u64 >> 0); + seed16v[2] = (u64 >> 32) ^ (u64 >> 16); + ++#ifdef __GLIBC__ + r = seed48_r(seed16v, &config->entropy); + c_assert(!r); ++#else ++ memcpy(config->entropy, seed16v, sizeof seed16v); ++#endif + } + + /** +@@ -375,10 +379,14 @@ static void n_dhcp4_client_probe_config_initialize_random_seed(NDhcp4ClientProbe + */ + uint32_t n_dhcp4_client_probe_config_get_random(NDhcp4ClientProbeConfig *config) { + long int result; ++#ifdef __GLIBC__ + int r; + + r = mrand48_r(&config->entropy, &result); + c_assert(!r); ++#else ++ result = jrand48(config->entropy); ++#endif + + return result; + }; +diff --git a/shared/n-dhcp4/src/n-dhcp4-private.h b/shared/n-dhcp4/src/n-dhcp4-private.h +index 436ee80..ffcb4b2 100644 +--- a/shared/n-dhcp4/src/n-dhcp4-private.h ++++ b/shared/n-dhcp4/src/n-dhcp4-private.h +@@ -267,7 +267,11 @@ struct NDhcp4ClientProbeConfig { + bool inform_only; + bool init_reboot; + struct in_addr requested_ip; ++#ifdef __GLIBC__ + struct drand48_data entropy; /* entropy pool */ ++#else ++ unsigned short entropy[3]; /* entropy pool */ ++#endif + uint64_t ms_start_delay; /* max ms to wait before starting probe */ + NDhcp4ClientProbeOption *options[UINT8_MAX + 1]; + int8_t request_parameters[UINT8_MAX + 1]; +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch deleted file mode 100644 index 9a58c0e3..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0003-musl-network-support.patch +++ /dev/null @@ -1,72 +0,0 @@ -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] 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/nm-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/nm-wifi-utils.h b/src/platform/wifi/nm-wifi-utils.h -index 705717b..da3edc4 100644 ---- a/src/platform/wifi/nm-wifi-utils.h -+++ b/src/platform/wifi/nm-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" - #include "nm-setting-wireless.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 -@@ -11,6 +11,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/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch new file mode 100644 index 00000000..55aa4d26 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-Fix-build-with-musl-systemd-specific.patch @@ -0,0 +1,26 @@ +From 80c7d3391510993cba1a7499bf33a5b2b115280d Mon Sep 17 00:00:00 2001 +From: Adrian Freihofer <adrian.freihofer@siemens.com> +Date: Sat, 7 Mar 2020 14:24:01 +0100 +Subject: [PATCH 4/4] Fix build with musl - systemd specific + +--- + src/systemd/src/libsystemd-network/sd-dhcp6-client.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +index e1150f9..2c63bac 100644 +--- a/src/systemd/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/systemd/src/libsystemd-network/sd-dhcp6-client.c +@@ -7,7 +7,9 @@ + + #include <errno.h> + #include <sys/ioctl.h> ++#ifdef __GLIBC__ /* musl supplies full set of userspace headers */ + #include <linux/if_arp.h> ++#endif + #include <linux/if_infiniband.h> + + #include "sd-dhcp6-client.h" +-- +2.24.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch deleted file mode 100644 index 9e5c9433..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0004-musl-process-util.patch +++ /dev/null @@ -1,62 +0,0 @@ -From d513c8bfc982dbd976617178b040c512c95710b6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Thu, 25 Oct 2018 09:57:07 +0200 -Subject: [PATCH] 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 1412f03..45f5049 100644 ---- a/src/systemd/src/basic/process-util.c -+++ b/src/systemd/src/basic/process-util.c -@@ -21,6 +21,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> -@@ -1153,11 +1156,13 @@ 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) { - static bool installed = false; -@@ -1186,7 +1191,11 @@ pid_t getpid_cached(void) { - * only half-documented (glibc doesn't document it but LSB does — though only superficially) - * we'll check for errors only in the most generic fashion possible. */ - -+#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.5 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch deleted file mode 100644 index 6bca95e1..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0005-musl-avoid-further-conflicts-by-including-net-ethern.patch +++ /dev/null @@ -1,77 +0,0 @@ -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 e388552..9c4dde8 100644 ---- a/src/systemd/src/systemd/sd-dhcp-client.h -+++ b/src/systemd/src/systemd/sd-dhcp-client.h -@@ -20,7 +20,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 2a60145..19d1814 100644 ---- a/src/systemd/src/systemd/sd-dhcp-lease.h -+++ b/src/systemd/src/systemd/sd-dhcp-lease.h -@@ -19,7 +19,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 fa36dca..2d25010 100644 ---- a/src/systemd/src/systemd/sd-dhcp6-client.h -+++ b/src/systemd/src/systemd/sd-dhcp6-client.h -@@ -20,7 +20,9 @@ - ***/ - - #include <inttypes.h> -+#if defined(__GLIBC__) - #include <net/ethernet.h> -+#endif - #include <stdbool.h> - #include <sys/types.h> - -diff --git a/src/systemd/src/systemd/sd-ipv4ll.h b/src/systemd/src/systemd/sd-ipv4ll.h -index 71bd4cf..1c667ba 100644 ---- a/src/systemd/src/systemd/sd-ipv4ll.h -+++ b/src/systemd/src/systemd/sd-ipv4ll.h -@@ -19,7 +19,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.5 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch deleted file mode 100644 index 023a4d9a..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0006-Add-a-strndupa-replacement-for-musl.patch +++ /dev/null @@ -1,47 +0,0 @@ -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 -@@ -13,6 +13,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 -@@ -26,6 +26,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/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd new file mode 100644 index 00000000..4fdd80d4 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd @@ -0,0 +1,110 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: network-manager +# Required-Start: $remote_fs dbus udev +# Required-Stop: $remote_fs dbus udev +# Should-Start: $syslog +# Should-Stop: $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: network connection manager +# Description: Daemon for automatically switching network +# connections to the best available connection. +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +DESC="network connection manager" +NAME="NetworkManager" + +DAEMON=/usr/sbin/$NAME + +PIDFILE=/run/$NAME/$NAME.pid + +SCRIPTNAME=/etc/init.d/network-manager + +. /etc/init.d/functions || exit 1 + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +log_daemon_msg() { + echo -n $* +} + +log_end_msg() { + if [ $1 -eq 0 ]; then + success + else + failure + fi + echo +} + +log_progress_msg () { + if [ -z "${1:-}" ]; then + return 1 + fi + echo -n " $@" +} + +# +# Function that starts the daemon/service. +# +d_start() { + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $DAEMON_OPTS +} + +# +# Function that stops the daemon/service. +# +d_stop() { + start-stop-daemon --stop --retry 5 --quiet --pidfile $PIDFILE \ + --exec $DAEMON +} + +d_reload() { + start-stop-daemon --stop --signal HUP --quiet --pidfile $PIDFILE \ + --exec $DAEMON +} + +case "$1" in + start) + log_daemon_msg "Starting $DESC" "$NAME" + d_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already started" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + d_stop + case "$?" in + 0) log_end_msg 0 ;; + 1) log_progress_msg "already stopped" + log_end_msg 0 ;; + *) log_end_msg 1 ;; + esac + ;; + reload|force-reload) + log_daemon_msg "Reloading $DESC" "$NAME" + d_reload + log_end_msg $? + ;; + restart) + $0 stop + $0 start + ;; + status) + status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb deleted file mode 100644 index f21600ed..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.14.4.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "NetworkManager" -HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" -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=2d56a1b0c42e388aa86aef59b154e8c3 \ -" - -DEPENDS = " \ - intltool-native \ - libxslt-native \ - libnl \ - libgudev \ - util-linux \ - libndp \ - libnewt \ - polkit \ - jansson \ - curl \ -" - -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://0001-Do-not-include-net-ethernet.h-and-linux-if_ether.h.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] = "54ce62f0aa18ef6c5e754eaac47494ac" -SRC_URI[sha256sum] = "35a3ede4c7d12d6212033c9e44cb82b7692f38063b53a067567f02f5937c8c18" - -UPSTREAM_CHECK_URI = "${GNOME_MIRROR}/NetworkManager/1.10/" -UPSTREAM_CHECK_REGEX = "NetworkManager\-(?P<pver>1\.10(\.\d+)+).tar.xz" - -S = "${WORKDIR}/NetworkManager-${PV}" - -EXTRA_OECONF = " \ - --disable-ifcfg-rh \ - --disable-more-warnings \ - --with-iptables=${sbindir}/iptables \ - --with-tests \ - --with-nmtui=yes \ - --with-udev-dir=${nonarch_base_libdir}/udev \ -" - -# 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/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" -} - -PACKAGECONFIG ??= "nss ifupdown dhclient dnsmasq \ - ${@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)} \ -" -PACKAGECONFIG[systemd] = " \ - --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd --enable-polkit, \ - --without-systemdsystemunitdir, \ - polkit \ -" -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[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 -PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client" -PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" -PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" -PACKAGECONFIG[glib] = "--with-libnm-glib,,dbus-glib-native dbus-glib" -PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" -PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,wpa-supplicant" -PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" -PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" - -PACKAGES =+ "libnmutil libnmglib libnmglib-vpn \ - ${PN}-nmtui ${PN}-nmtui-doc \ - ${PN}-adsl \ -" - -FILES_libnmutil += "${libdir}/libnm-util.so.*" -FILES_libnmglib += "${libdir}/libnm-glib.so.*" -FILES_libnmglib-vpn += "${libdir}/libnm-glib-vpn.so.*" - -FILES_${PN}-adsl = "${libdir}/NetworkManager/libnm-device-plugin-adsl.so" - -FILES_${PN} += " \ - ${libexecdir} \ - ${libdir}/NetworkManager/${PV}/*.so \ - ${nonarch_libdir}/NetworkManager/VPN \ - ${nonarch_libdir}/NetworkManager/conf.d \ - ${datadir}/polkit-1 \ - ${datadir}/dbus-1 \ - ${noarch_base_libdir}/udev/* \ - ${systemd_unitdir}/system \ - ${libdir}/pppd \ -" - -RRECOMMENDS_${PN} += "iptables \ - ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ -" -RCONFLICTS_${PN} = "connman" - -FILES_${PN}-dev += " \ - ${datadir}/NetworkManager/gdb-cmd \ - ${libdir}/pppd/*/*.la \ - ${libdir}/NetworkManager/*.la \ - ${libdir}/NetworkManager/${PV}/*.la \ -" - -FILES_${PN}-nmtui = " \ - ${bindir}/nmtui \ - ${bindir}/nmtui-edit \ - ${bindir}/nmtui-connect \ - ${bindir}/nmtui-hostname \ -" - -FILES_${PN}-nmtui-doc = " \ - ${mandir}/man1/nmtui* \ -" - -SYSTEMD_SERVICE_${PN} = "NetworkManager.service NetworkManager-dispatcher.service" - -do_install_append() { - rm -rf ${D}/run ${D}${localstatedir}/run -} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb new file mode 100644 index 00000000..33a2b7c0 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.22.10.bb @@ -0,0 +1,166 @@ +SUMMARY = "NetworkManager" +HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" +SECTION = "net/misc" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = " \ + intltool-native \ + libxslt-native \ + libnl \ + libgudev \ + util-linux \ + libndp \ + libnewt \ + jansson \ + curl \ +" + +inherit gnomebase gettext update-rc.d systemd bash-completion vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even + +SRC_URI = " \ + ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ + file://${BPN}.initd \ + file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ + file://0002-Do-not-create-settings-settings-property-documentati.patch \ +" +SRC_URI_append_libc-musl = " \ + file://musl/0001-Fix-build-with-musl-systemd-specific.patch \ + file://musl/0002-Fix-build-with-musl.patch \ + file://musl/0003-Fix-build-with-musl-for-n-dhcp4.patch \ + file://musl/0004-Fix-build-with-musl-systemd-specific.patch \ +" +SRC_URI[sha256sum] = "2b29ccc1531ba7ebba95a97f40c22b963838e8b6833745efe8e6fb71fd8fca77" + +S = "${WORKDIR}/NetworkManager-${PV}" + +EXTRA_OECONF = " \ + --disable-ifcfg-rh \ + --disable-more-warnings \ + --with-iptables=${sbindir}/iptables \ + --with-tests \ + --with-nmtui=yes \ + --with-udev-dir=${nonarch_base_libdir}/udev \ +" + +# stolen from https://github.com/void-linux/void-packages/blob/master/srcpkgs/NetworkManager/template +# avoids: +# | ../NetworkManager-1.16.0/libnm-core/nm-json.c:106:50: error: 'RTLD_DEEPBIND' undeclared (first use in this function); did you mean 'RTLD_DEFAULT'? +CFLAGS_append_libc-musl = " \ + -DRTLD_DEEPBIND=0 \ +" + +do_compile_prepend() { + export GIR_EXTRA_LIBS_PATH="${B}/libnm/.libs:${B}/libnm-glib/.libs:${B}/libnm-util/.libs" +} + +PACKAGECONFIG ??= "nss ifupdown dhclient dnsmasq \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', bb.utils.contains('DISTRO_FEATURES', 'x11', 'consolekit', '', d), d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'wifi polkit', d)} \ +" +PACKAGECONFIG[systemd] = " \ + --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \ + --without-systemdsystemunitdir, \ +" +PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" +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[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 +PACKAGECONFIG[dhclient] = "--with-dhclient=${base_sbindir}/dhclient,,,dhcp-client" +PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" +PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" +PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf" +PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" +PACKAGECONFIG[wifi] = "--enable-wifi=yes,--enable-wifi=no,,wpa-supplicant" +PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" +PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" +PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no" + +PACKAGES =+ " \ + ${PN}-nmtui ${PN}-nmtui-doc \ + ${PN}-adsl ${PN}-cloud-setup \ +" + +SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup" + +FILES_${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so" + +FILES_${PN}-cloud-setup = " \ + ${libexecdir}/nm-cloud-setup \ + ${systemd_system_unitdir}/nm-cloud-setup.service \ + ${systemd_system_unitdir}/nm-cloud-setup.timer \ + ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \ + ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \ +" +ALLOW_EMPTY_${PN}-cloud-setup = "1" +SYSTEMD_SERVICE_${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" + +FILES_${PN} += " \ + ${libexecdir} \ + ${libdir}/NetworkManager/${PV}/*.so \ + ${libdir}/NetworkManager \ + ${nonarch_libdir}/NetworkManager/conf.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ + ${nonarch_libdir}/NetworkManager/VPN \ + ${nonarch_libdir}/NetworkManager/system-connections \ + ${datadir}/polkit-1 \ + ${datadir}/dbus-1 \ + ${nonarch_base_libdir}/udev/* \ + ${systemd_system_unitdir} \ + ${libdir}/pppd \ +" + +RRECOMMENDS_${PN} += "iptables \ + ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ +" +RCONFLICTS_${PN} = "connman" + +FILES_${PN}-dev += " \ + ${datadir}/NetworkManager/gdb-cmd \ + ${libdir}/pppd/*/*.la \ + ${libdir}/NetworkManager/*.la \ + ${libdir}/NetworkManager/${PV}/*.la \ +" + +FILES_${PN}-nmtui = " \ + ${bindir}/nmtui \ + ${bindir}/nmtui-edit \ + ${bindir}/nmtui-connect \ + ${bindir}/nmtui-hostname \ +" + +FILES_${PN}-nmtui-doc = " \ + ${mandir}/man1/nmtui* \ +" + +INITSCRIPT_NAME = "network-manager" +SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}" + +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" + +do_install_append() { + install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager + + rm -rf ${D}/run ${D}${localstatedir}/run + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + # For read-only filesystem, do not create links during bootup + ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager + + # systemd v210 and newer do not need this rule file + rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules + fi +} diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch new file mode 100644 index 00000000..623ec101 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect/0001-trojans-tncc-wrapper.py-convert-to-python3.patch @@ -0,0 +1,71 @@ +From de78bcac5e1fd13de0371c8e14b062b8786ade56 Mon Sep 17 00:00:00 2001 +From: Max Krummenacher <max.krummenacher@toradex.com> +Date: Sun, 2 Feb 2020 15:53:05 +0000 +Subject: [PATCH] trojans/tncc-wrapper.py: convert to python3 + +Use 2to3 to convert the script to python3. + +Upstream-Status: Pending + +Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> +--- + trojans/tncc-wrapper.py | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/trojans/tncc-wrapper.py b/trojans/tncc-wrapper.py +index 0d4587bf..1a9a1f4d 100755 +--- a/trojans/tncc-wrapper.py ++++ b/trojans/tncc-wrapper.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python2 ++#!/usr/bin/python3 + + # Lifted from Russ Dill's juniper-vpn-wrap.py, thus: + # +@@ -18,19 +18,19 @@ + + import subprocess + import mechanize +-import cookielib ++import http.cookiejar + import getpass + import sys + import os + import zipfile +-import urllib ++import urllib.request, urllib.parse, urllib.error + import socket + import ssl + import errno + import argparse + import atexit + import signal +-import ConfigParser ++import configparser + import time + import binascii + import hmac +@@ -39,7 +39,7 @@ import hashlib + def mkdir_p(path): + try: + os.mkdir(path) +- except OSError, exc: ++ except OSError as exc: + if exc.errno == errno.EEXIST and os.path.isdir(path): + pass + else: +@@ -64,9 +64,9 @@ class Tncc: + if zipfile.ZipFile(self.tncc_jar, 'r').testzip() is not None: + raise Exception() + except: +- print 'Downloading tncc.jar...' ++ print('Downloading tncc.jar...') + mkdir_p(os.path.expanduser('~/.juniper_networks')) +- urllib.urlretrieve('https://' + self.vpn_host ++ urllib.request.urlretrieve('https://' + self.vpn_host + + '/dana-cached/hc/tncc.jar', self.tncc_jar) + + with zipfile.ZipFile(self.tncc_jar, 'r') as jar: +-- +2.20.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb index c944144e..597c1920 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb @@ -2,7 +2,14 @@ SUMMARY = "Open client for Cisco AnyConnect VPN" LICENSE = "LGPLv2.1" LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad" +SRC_URI = " \ + git://git.infradead.org/users/dwmw2/openconnect.git \ + file://0001-trojans-tncc-wrapper.py-convert-to-python3.patch \ +" +SRCREV = "ea73851969ae7a6ea54fdd2d2b8c94776af24b2a" + DEPENDS = "vpnc libxml2 krb5 gettext-native" +RDEPENDS_${PN} = "bash python3-core vpnc-script" PACKAGECONFIG ??= "gnutls lz4 libproxy" @@ -14,14 +21,9 @@ PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy," # not config defaults PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite," -PV = "7.08" - -SRCREV = "9697bea0e50952cab57063238b43a7099e498cbb" -SRC_URI = "git://git.infradead.org/users/dwmw2/openconnect.git" - S = "${WORKDIR}/git" inherit autotools pkgconfig -EXTRA_OECONF += "--with-vpnc-script=${SYSROOT_DESTDIR}${sysconfdir}/vpnc/vpnc-script \ +EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \ --disable-static" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.1.bb index 4e41aa57..91a6edd2 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.0.1.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.1.bb @@ -4,10 +4,10 @@ LICENSE = "Zlib" LIC_FILES_CHKSUM = "file://COPYING;md5=8d8bac174bf8422b151200e6cc78ebe4" -SRC_URI[md5sum] = "5fc644a65463031295c6b7dd51a0f1bd" -SRC_URI[sha256sum] = "bc36507506ad29bfdac941b0987ebd1cc9633c9a9291d7378e229e4515a0a517" +SRC_URI[md5sum] = "f638d854a3639fb37c0e06d1092a771e" +SRC_URI[sha256sum] = "aef1e34d98d7bec7cc368e0ca0f2e97493f9b5ebe6d7103f8f6460cfca3dc6fc" PYPI_PACKAGE = "python-networkmanager" -inherit pypi setuptools +inherit pypi setuptools3 -RDEPENDS_${PN} = "networkmanager python-dbus python-six" +RDEPENDS_${PN} = "networkmanager python3-dbus python3-six" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb index 4fe6893f..3a27c2c5 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb @@ -40,4 +40,4 @@ inherit autotools-brokensep EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644" # http://errors.yoctoproject.org/Errors/Details/186972/ -EXCLUDE_FROM_WORLD_libc-musl = "1" +COMPATIBLE_HOST_libc-musl = 'null' diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb index 98dc41a0..e3134e41 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/relayd/relayd_git.bb @@ -12,6 +12,8 @@ SRC_URI = "git://git.openwrt.org/project/relayd.git \ SRCREV = "ad0b25ad74345d367c62311e14b279f5ccb8ef13" PV = "0.0.1+git${SRCPV}" +UPSTREAM_CHECK_COMMITS = "1" + S = "${WORKDIR}/git" inherit cmake diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-Add-options-to-configure-the-use-of-libbsd.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-Add-options-to-configure-the-use-of-libbsd.patch new file mode 100644 index 00000000..80cdd395 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-Add-options-to-configure-the-use-of-libbsd.patch @@ -0,0 +1,103 @@ +From 1e8d31c138395122df4cc2a3e0edd6cd3fad736c Mon Sep 17 00:00:00 2001 +From: Peter Kjellerstedt <pkj@axis.com> +Date: Tue, 28 Apr 2020 02:05:33 +0200 +Subject: [PATCH] Add options to configure the use of libbsd + +Upstream-Status: Inappropriate [oe deterministic build specific] +Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> +--- + buildtools/wafsamba/wscript | 7 +++++++ + lib/crypto/wscript_configure | 2 +- + lib/replace/wscript | 29 +++++++++++++++-------------- + lib/texpect/wscript | 7 ++++++- + 4 files changed, 29 insertions(+), 16 deletions(-) + +diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript +index 7b8fb01..a8e4b0a 100644 +--- a/buildtools/wafsamba/wscript ++++ b/buildtools/wafsamba/wscript +@@ -88,6 +88,13 @@ def options(opt): + help=("Disable use of gettext"), + action="store_true", dest='disable_gettext', default=False) + ++ opt.add_option('--with-libbsd', ++ help=("Enable use of libbsd"), ++ action="store_true", dest='enable_libbsd') ++ opt.add_option('--without-libbsd', ++ help=("Disable use of libbsd"), ++ action="store_false", dest='enable_libbsd', default=False) ++ + gr = opt.option_group('developer options') + + gr.add_option('-C', +diff --git a/lib/crypto/wscript_configure b/lib/crypto/wscript_configure +index 09dfe04..e871718 100644 +--- a/lib/crypto/wscript_configure ++++ b/lib/crypto/wscript_configure +@@ -2,7 +2,7 @@ + from waflib import Options + from waflib import Errors, Logs + +-if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', ++if not Options.options.enable_libbsd or not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', + checklibc=True): + conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h', + checklibc=True) +diff --git a/lib/replace/wscript b/lib/replace/wscript +index 0020d2a..cd9228f 100644 +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -407,20 +407,21 @@ def configure(conf): + + strlcpy_in_bsd = False + +- # libbsd on some platforms provides strlcpy and strlcat +- if not conf.CHECK_FUNCS('strlcpy strlcat'): +- if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', +- checklibc=True): +- strlcpy_in_bsd = True +- if not conf.CHECK_FUNCS('getpeereid'): +- conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): +- conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') +- if not conf.CHECK_FUNCS('setproctitle_init'): +- conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') +- +- if not conf.CHECK_FUNCS('closefrom'): +- conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') ++ if Options.options.enable_libbsd: ++ # libbsd on some platforms provides strlcpy and strlcat ++ if not conf.CHECK_FUNCS('strlcpy strlcat'): ++ if conf.CHECK_FUNCS_IN('strlcpy strlcat', 'bsd', headers='bsd/string.h', ++ checklibc=True): ++ strlcpy_in_bsd = True ++ if not conf.CHECK_FUNCS('getpeereid'): ++ conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h') ++ if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'): ++ conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h') ++ if not conf.CHECK_FUNCS('setproctitle_init'): ++ conf.CHECK_FUNCS_IN('setproctitle_init', 'bsd', headers='sys/types.h bsd/unistd.h') ++ ++ if not conf.CHECK_FUNCS('closefrom'): ++ conf.CHECK_FUNCS_IN('closefrom', 'bsd', headers='bsd/unistd.h') + + conf.CHECK_CODE(''' + struct ucred cred; +diff --git a/lib/texpect/wscript b/lib/texpect/wscript +index e14c048..a91de59 100644 +--- a/lib/texpect/wscript ++++ b/lib/texpect/wscript +@@ -1,7 +1,12 @@ + #!/usr/bin/env python ++from waflib import Options + + def configure(conf): +- conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers='pty.h util.h bsd/libutil.h libutil.h') ++ hdrs = 'pty.h util.h' ++ if Options.options.enable_libbsd: ++ hdrs += ' bsd/libutil.h' ++ hdrs += ' libutil.h' ++ conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers=hdrs) + + def build(bld): + bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util replace', install=False) diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch deleted file mode 100644 index 4c94831d..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 0bc8bc4143a58f91f6d7ce228b6763f377fdf45a Mon Sep 17 00:00:00 2001 -From: Andrew Bartlett <abartlet@samba.org> -Date: Thu, 12 Jul 2018 12:34:56 +1200 -Subject: [PATCH] ldb: Refuse to build Samba against a newer minor version of - ldb - -Samba is not compatible with new versions of ldb (except release versions) - -Other users would not notice the breakages, but Samba makes many -more assuptions about the LDB internals than any other package. - -(Specifically, LDB 1.2 and 1.4 broke builds against released -Samba versions) - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=13519 - -Signed-off-by: Andrew Bartlett <abartlet@samba.org> -Reviewed-by: Gary Lockyer <gary@catalyst.net.nz> -(cherry picked from commit 52efa796538ae004ca62ea32fc8c833472991be6) ---- - lib/ldb/wscript | 32 ++++++++++++++++++++++---------- - 1 file changed, 22 insertions(+), 10 deletions(-) - -diff --git a/lib/ldb/wscript b/lib/ldb/wscript -index d94086b..2bb0832 100644 ---- a/lib/ldb/wscript -+++ b/lib/ldb/wscript -@@ -62,23 +62,33 @@ def configure(conf): - conf.env.standalone_ldb = conf.IN_LAUNCH_DIR() - - if not conf.env.standalone_ldb: -+ max_ldb_version = [int(x) for x in VERSION.split(".")] -+ max_ldb_version[2] = 999 -+ max_ldb_version_dots = "%d.%d.%d" % tuple(max_ldb_version) -+ - if conf.env.disable_python: -- if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION, -- onlyif='talloc tdb tevent', -- implied_deps='replace talloc tdb tevent'): -+ if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', -+ minversion=VERSION, -+ maxversion=max_ldb_version_dots, -+ onlyif='talloc tdb tevent', -+ implied_deps='replace talloc tdb tevent'): - conf.define('USING_SYSTEM_LDB', 1) - else: - using_system_pyldb_util = True -- if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', minversion=VERSION, -- onlyif='talloc tdb tevent', -- implied_deps='replace talloc tdb tevent ldb'): -+ if not conf.CHECK_BUNDLED_SYSTEM_PKG('pyldb-util', -+ minversion=VERSION, -+ maxversion=max_ldb_version_dots, -+ onlyif='talloc tdb tevent', -+ implied_deps='replace talloc tdb tevent ldb'): - using_system_pyldb_util = False - - # We need to get a pyldb-util for all the python versions - # we are building for - if conf.env['EXTRA_PYTHON']: - name = 'pyldb-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG'] -- if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION, -+ if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, -+ minversion=VERSION, -+ maxversion=max_ldb_version_dots, - onlyif='talloc tdb tevent', - implied_deps='replace talloc tdb tevent ldb'): - using_system_pyldb_util = False -@@ -86,9 +96,11 @@ def configure(conf): - if using_system_pyldb_util: - conf.define('USING_SYSTEM_PYLDB_UTIL', 1) - -- if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', minversion=VERSION, -- onlyif='talloc tdb tevent pyldb-util', -- implied_deps='replace talloc tdb tevent'): -+ if conf.CHECK_BUNDLED_SYSTEM_PKG('ldb', -+ minversion=VERSION, -+ maxversion=max_ldb_version_dots, -+ onlyif='talloc tdb tevent pyldb-util', -+ implied_deps='replace talloc tdb tevent'): - conf.define('USING_SYSTEM_LDB', 1) - - if conf.CONFIG_SET('USING_SYSTEM_LDB'): --- -2.18.0 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch new file mode 100644 index 00000000..de7f3118 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch @@ -0,0 +1,30 @@ +From 3a935c638605bfb392ca7780d22c08c1a0a71e71 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 5 Sep 2019 21:37:33 -0700 +Subject: [PATCH 1/2] lib/replace/wscript: Avoid generating nested main + function + +clang is not happy when it sees another main nested inside the main +function and fails the test for prctl syscall, therefore avoid adding +implicit main() here + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + lib/replace/wscript | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/replace/wscript b/lib/replace/wscript +index a7fd25d..d6767fc 100644 +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -137,6 +137,7 @@ def configure(conf): + } + ''', + 'HAVE_PRCTL', ++ addmain=False, + headers='sys/prctl.h', + msg='Checking for prctl syscall') + +-- +2.23.0 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch new file mode 100644 index 00000000..fb12a10e --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch @@ -0,0 +1,42 @@ +From fcb8ecd530b2d151e373974741601483326f7528 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 27 Jun 2019 11:09:47 +0800 +Subject: [PATCH] samba: fix musl lib without innetgr + +Upstream-Status: Pending + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + lib/util/access.c | 2 +- + source3/auth/user_util.c | 2 +- + 2 file changed, 2 insertion(+), 2 deletion(-) + +diff --git a/lib/util/access.c b/lib/util/access.c +index 7da0573..b94949e 100644 +--- a/lib/util/access.c ++++ b/lib/util/access.c +@@ -112,7 +112,7 @@ static bool string_match(const char *tok,const char *s) + return true; + } + } else if (tok[0] == '@') { /* netgroup: look it up */ +-#ifdef HAVE_NETGROUP ++#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR) + DATA_BLOB tmp; + char *mydomain = NULL; + char *hostname = NULL; +diff --git a/source3/auth/user_util.c b/source3/auth/user_util.c +index a76b5d4..30f523d 100644 +--- a/source3/auth/user_util.c ++++ b/source3/auth/user_util.c +@@ -148,7 +148,7 @@ static void store_map_in_gencache(TALLOC_CTX *ctx, const char *from, const char + + bool user_in_netgroup(TALLOC_CTX *ctx, const char *user, const char *ngname) + { +-#ifdef HAVE_NETGROUP ++#if defined(HAVE_NETGROUP) && defined(HAVE_INNETGR) + static char *my_yp_domain = NULL; + char *lowercase_user = NULL; + +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch new file mode 100644 index 00000000..23b35a81 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch @@ -0,0 +1,62 @@ +From 4b8463ff43f8983a706b181c5292491f9f954be1 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Fri, 25 Jan 2019 15:00:59 +0800 +Subject: [PATCH] waf: add support of cross_compile + +After upgrade, waf also upgraded + +on 1.5.19, for cross_compile, subprocess.Popen is set to be +samba_cross.cross_Popen, which will not execute testprog on +host, but only read result from cross-answers.txt which is +passed by option --cross-answer + +part of old code: + args = Utils.to_list(kw.get('exec_args', [])) + proc = Utils.pproc.Popen([lastprog] + args, stdout=Utils.pproc.PIPE, stderr=Utils.pproc.PIPE) + +but on new version, exec_args is not used and cause do_configure +failed with Exec format error + +fixed by append cross anser related args to cmd + +Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/merge_requests/211] + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + third_party/waf/waflib/Tools/c_config.py | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +diff --git a/third_party/waf/waflib/Tools/c_config.py b/third_party/waf/waflib/Tools/c_config.py +index 7608215..767cf33 100644 +--- a/third_party/waf/waflib/Tools/c_config.py ++++ b/third_party/waf/waflib/Tools/c_config.py +@@ -660,20 +660,21 @@ class test_exec(Task.Task): + """ + color = 'PINK' + def run(self): ++ args = self.generator.bld.kw.get('exec_args', []) + if getattr(self.generator, 'rpath', None): + if getattr(self.generator, 'define_ret', False): +- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()]) +- else: +- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()]) ++ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args) ++ else: ++ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args) + else: + env = self.env.env or {} + env.update(dict(os.environ)) + for var in ('LD_LIBRARY_PATH', 'DYLD_LIBRARY_PATH', 'PATH'): + env[var] = self.inputs[0].parent.abspath() + os.path.pathsep + env.get(var, '') + if getattr(self.generator, 'define_ret', False): +- self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()], env=env) ++ self.generator.bld.retval = self.generator.bld.cmd_and_log([self.inputs[0].abspath()] + args, env=env) + else: +- self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()], env=env) ++ self.generator.bld.retval = self.generator.bld.exec_command([self.inputs[0].abspath()] + args, env=env) + + @feature('test_exec') + @after_method('apply_link') +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch new file mode 100644 index 00000000..6fc84933 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch @@ -0,0 +1,58 @@ +From c62a6f32ab965de2ec77a614f20f04568116835b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 5 Sep 2019 21:39:05 -0700 +Subject: [PATCH 2/2] util_sec.c: Move __thread variable to global scope + +Make clang happy otherwise it complains about variable scope + +fixes + +source3/./lib/util_sec.c:470:4: error: '__thread' variables must have global storage + } __thread cache; + ^ + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + source3/lib/util_sec.c | 19 +++++++++++-------- + 1 file changed, 11 insertions(+), 8 deletions(-) + +diff --git a/source3/lib/util_sec.c b/source3/lib/util_sec.c +index 9408269..7390318 100644 +--- a/source3/lib/util_sec.c ++++ b/source3/lib/util_sec.c +@@ -444,6 +444,17 @@ void become_user_permanently(uid_t uid, gid_t gid) + assert_gid(gid, gid); + } + ++#ifdef HAVE___THREAD ++ struct cache_t { ++ bool active; ++ uid_t uid; ++ gid_t gid; ++ size_t setlen; ++ uintptr_t gidset; ++ }; ++ ++static __thread struct cache_t cache; ++#endif + /********************************************************** + Function to set thread specific credentials. Leave + saved-set uid/gid alone.Must be thread-safe code. +@@ -461,14 +472,6 @@ int set_thread_credentials(uid_t uid, + * available. + */ + #ifdef HAVE___THREAD +- static struct { +- bool active; +- uid_t uid; +- gid_t gid; +- size_t setlen; +- uintptr_t gidset; +- } __thread cache; +- + if (cache.active && + cache.uid == uid && + cache.gid == gid && +-- +2.23.0 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch index e112b3b4..3f2921ed 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch @@ -1,21 +1,32 @@ -Some modules such as dynamic library maybe cann't be imported while cross compile, -we just check whether does the module exist. +From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 25 Jun 2019 14:25:08 +0800 +Subject: [PATCH] do not import target module while cross compile + +Some modules such as dynamic library maybe cann't be imported +while cross compile, we just check whether does the module exist. Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> -Index: samba-4.4.2/buildtools/wafsamba/samba_bundled.py -=================================================================== ---- samba-4.4.2.orig/buildtools/wafsamba/samba_bundled.py -+++ samba-4.4.2/buildtools/wafsamba/samba_bundled.py -@@ -2,6 +2,7 @@ - - import sys - import Build, Options, Logs -+import imp, os - from Configure import conf - from samba_utils import TO_LIST +update to version 4.10.5, and switch to python3 +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + buildtools/wafsamba/samba_bundled.py | 27 +++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py +index 60ce7da..5468a36 100644 +--- a/buildtools/wafsamba/samba_bundled.py ++++ b/buildtools/wafsamba/samba_bundled.py +@@ -4,6 +4,7 @@ import sys + from waflib import Build, Options, Logs + from waflib.Configure import conf + from wafsamba import samba_utils ++import importlib.util, os -@@ -230,17 +231,32 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, li + def PRIVATE_NAME(bld, name, private_extension, private_library): + '''possibly rename a library to include a bundled extension''' +@@ -249,17 +250,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): # versions minversion = minimum_library_version(conf, libname, minversion) @@ -25,34 +36,32 @@ Index: samba-4.4.2/buildtools/wafsamba/samba_bundled.py - found = False - else: + # Find module in PYTHONPATH -+ stuff = imp.find_module(modulename, [os.environ["PYTHONPATH"]]) -+ if stuff: ++ spec = importlib.util._find_spec_from_path(modulename, [os.environ["PYTHONPATH"]]) ++ if spec: try: - version = m.__version__ - except AttributeError: -+ m = imp.load_module(modulename, stuff[0], stuff[1], stuff[2]) ++ module = importlib.util.module_from_spec(spec) ++ spec.loader.load_module(module) + except ImportError: found = False + + if conf.env.CROSS_COMPILE: + # Some modules such as dynamic library maybe cann't be imported + # while cross compile, we just check whether the module exist -+ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (stuff[1])) ++ Logs.warn('Cross module[%s] has been found, but can not be loaded.' % (spec.name)) + found = True else: - found = tuplize_version(version) >= tuplize_version(minversion) + try: -+ version = m.__version__ ++ version = module.__version__ + except AttributeError: + found = False + else: + found = tuplize_version(version) >= tuplize_version(minversion) -+ finally: -+ if stuff[0]: -+ stuff[0].close() -+ else: -+ found = False -+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname): Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) sys.exit(1) +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch index 6a7f8fac..46a6f062 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch @@ -1,54 +1,40 @@ -From 9a2d6315ff206b2a47100dfd85afe3af56576995 Mon Sep 17 00:00:00 2001 -From: Wenzong Fan <wenzong.fan@windriver.com> -Date: Thu, 10 Dec 2015 04:20:51 -0500 +From 87bc8e7eafc7d12a1d3a143ebb9e43cf5fbafb72 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 20 Jun 2019 14:11:16 +0800 Subject: [PATCH] Add config option without-valgrind Upstream-Status: Pending Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +Update patch to version 4.10.5 +Signed-off-by: Changqing Li <changqing.li@windriver.com> --- - lib/replace/wscript | 4 +++- - source3/wscript | 5 ++++- + lib/replace/wscript | 5 +++-- wscript | 4 ++++ - 3 files changed, 11 insertions(+), 2 deletions(-) + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/replace/wscript b/lib/replace/wscript -index f0040b1..aca73af 100644 +index a7fd25d..a19ae68 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -101,7 +101,9 @@ def configure(conf): +@@ -110,8 +110,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') +- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') +- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') + if not Options.options.disable_valgrind: -+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') -+ ++ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') ++ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') 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') -diff --git a/source3/wscript b/source3/wscript -index bac3dd5..a5c51ea 100644 ---- a/source3/wscript -+++ b/source3/wscript -@@ -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) -- conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') -+ -+ if not Options.options.disable_valgrind: -+ conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h') -+ - if Options.options.developer: - 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 542a60c..22e6116 100644 +index e38a8e9..38b7230 100644 --- a/wscript +++ b/wscript -@@ -86,6 +86,10 @@ def set_options(opt): +@@ -105,6 +105,10 @@ def options(opt): help=("Disable RELRO builds"), action="store_false", dest='enable_relro') @@ -58,7 +44,7 @@ index 542a60c..22e6116 100644 + gr = opt.option_group('developer options') - opt.tool_options('python') # options for disabling pyc or pyo compilation + opt.load('python') # options for disabling pyc or pyo compilation -- -1.9.1 +2.7.4 diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch index 894bc8bb..d07ec0df 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch @@ -1,15 +1,28 @@ -Index: samba-4.6.2/ctdb/tests/src/test_mutex_raw.c -=================================================================== ---- samba-4.6.2.orig/ctdb/tests/src/test_mutex_raw.c -+++ samba-4.6.2/ctdb/tests/src/test_mutex_raw.c -@@ -166,8 +166,10 @@ int main(int argc, const char **argv) - if (ret == 0) { - pthread_mutex_unlock(mutex); +From 062cf74b498c1d12fd76f9d9bca926ac806e0b99 Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Thu, 20 Jun 2019 14:15:18 +0800 +Subject: [PATCH] glibc only fix + +Signed-off-by: Changqing Li <changqing.li@windriver.com> +--- + ctdb/tests/src/test_mutex_raw.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/ctdb/tests/src/test_mutex_raw.c b/ctdb/tests/src/test_mutex_raw.c +index 926a525..814343f 100644 +--- a/ctdb/tests/src/test_mutex_raw.c ++++ b/ctdb/tests/src/test_mutex_raw.c +@@ -291,8 +291,10 @@ int main(int argc, const char **argv) + "failed\n"); + exit (EXIT_FAILURE); } +#ifdef __GLIBC__ } else if (ret == EBUSY) { - printf("pid=%u\n", mutex->__data.__owner); + printf("INFO: pid=%u\n", mutex->__data.__owner); +#endif } else if (ret == 0) { pthread_mutex_unlock(mutex); } +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf index a0b87c37..d6bde417 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba/smb.conf @@ -25,6 +25,10 @@ ## Browsing/Identification ### +# Prevent anonymous connections. Overriden if the user sets guest ok = yes +# on any share + restrict anonymous = 1 + # Change this to the workgroup/NT-domain name your Samba server will part of workgroup = WORKGROUP @@ -114,7 +118,7 @@ # This option controls how unsuccessful authentication attempts are mapped # to anonymous connections - map to guest = bad user + map to guest = never ########## Domains ########### diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.8.4.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.10.15.bb index f1aaeb83..2c74c27f 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.8.4.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/samba/samba_4.10.15.bb @@ -23,26 +23,30 @@ SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://dnsserver-4.7.0.patch \ file://smb_conf-4.7.0.patch \ file://volatiles.03_samba \ - file://0001-ldb-Refuse-to-build-Samba-against-a-newer-minor-vers.patch \ + file://0001-waf-add-support-of-cross_compile.patch \ + file://0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch \ + file://0002-util_sec.c-Move-__thread-variable-to-global-scope.patch \ + file://0001-Add-options-to-configure-the-use-of-libbsd.patch \ " SRC_URI_append_libc-musl = " \ file://samba-pam.patch \ file://samba-4.3.9-remove-getpwent_r.patch \ file://cmocka-uintptr_t.patch \ + file://0001-samba-fix-musl-lib-without-innetgr.patch \ " -SRC_URI[md5sum] = "ca5bfbebd8d9eb95506e16594b2bbee2" -SRC_URI[sha256sum] = "f5044d149e01894a08b1d114b8b69aed78171a7bb19608bd1fd771453b9a5406" +SRC_URI[md5sum] = "67e9f6b8c5140475641bf5121c93b3d4" +SRC_URI[sha256sum] = "0b8b62558b62fbb121015f28f40fae0f07522710b6bef77c508b51bb6914ced9" -UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.8(\.\d+)+).tar.gz" +UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.10(\.\d+)+).tar.gz" 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 libbsd libaio libpam" +DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 jansson" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" DEPENDS_append_libc-musl = " libtirpc" @@ -62,10 +66,14 @@ SYSTEMD_SERVICE_winbind = "winbind.service" # https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable" +#cross_compile cannot use preforked process, since fork process earlier than point subproces.popen +#to cross Popen +export WAF_NO_PREFORK="yes" + # Use krb5. Build active domain controller. # PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ - acl ad-dc cups gnutls ldap mitkrb5 \ + acl cups ad-dc gnutls ldap mitkrb5 \ " RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt" @@ -81,6 +89,10 @@ PACKAGECONFIG[zeroconf] = "--enable-avahi,--disable-avahi,avahi" PACKAGECONFIG[valgrind] = ",--without-valgrind,valgrind," PACKAGECONFIG[lttng] = "--with-lttng, --without-lttng,lttng-ust" PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" +PACKAGECONFIG[libunwind] = ", , libunwind" +PACKAGECONFIG[gpgme] = ",--without-gpgme,," +PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb," +PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd" # Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS, # And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to: @@ -92,7 +104,7 @@ PACKAGECONFIG[archive] = "--with-libarchive, --without-libarchive, libarchive" # We are now at 4.7.0, so take the above with a grain of salt. We do not need to know where # krb5kdc is unless ad-dc is enabled, but we tell configure anyhow. # -PACKAGECONFIG[ad-dc] = ",--without-ad-dc,," +PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,," PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5," @@ -105,7 +117,7 @@ SAMBA4_MODULES="${SAMBA4_IDMAP_MODULES},${SAMBA4_PDB_MODULES},${SAMBA4_AUTH_MODU # .so files so there will not be a conflict. This is not done consistantly, so be very careful # when adding to this list. # -SAMBA4_LIBS="heimdal,cmocka,ldb,pyldb-util,NONE" +SAMBA4_LIBS="heimdal,cmocka,NONE" EXTRA_OECONF += "--enable-fhs \ --with-piddir=/run \ @@ -166,8 +178,6 @@ do_install_append() { install -d ${D}${sysconfdir}/default install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba - # install ctdb config file and test cases - install -D -m 0644 ${S}/ctdb/tests/onnode/nodes ${D}${sysconfdir}/ctdb/nodes # the items are from ctdb/tests/run_tests.sh for d in onnode takeover tool eventscripts cunit simple complex; do testdir=${D}${datadir}/ctdb-tests/$d @@ -181,11 +191,21 @@ do_install_append() { sed -i 's:\(#!/bin/\)bash:\1sh:' ${D}${bindir}/onnode fi - chmod 0750 ${D}${sysconfdir}/sudoers.d + chmod 0750 ${D}${sysconfdir}/sudoers.d || true rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log + + for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate; do + if [ -f "${D}${sbindir}/$f" ]; then + sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${sbindir}/$f + fi + done + if [ -f "${D}${bindir}/samba-tool" ]; then + sed -i -e 's,${PYTHON},/usr/bin/env python3,g' ${D}${bindir}/samba-tool + fi + } -PACKAGES =+ "${PN}-python ${PN}-pidl \ +PACKAGES =+ "${PN}-python3 ${PN}-pidl \ ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ winbind \ ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ @@ -193,15 +213,15 @@ PACKAGES =+ "${PN}-python ${PN}-pidl \ python samba_populate_packages() { def module_hook(file, pkg, pattern, format, basename): - pn = d.getVar('PN', True) + pn = d.getVar('PN') d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg) - mlprefix = d.getVar('MLPREFIX', True) or '' + mlprefix = d.getVar('MLPREFIX') or '' pam_libdir = d.expand('${base_libdir}/security') pam_pkgname = mlprefix + 'pam-plugin%s' do_split_packages(d, pam_libdir, '^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=True) - libdir = d.getVar('libdir', True) + libdir = d.getVar('libdir') do_split_packages(d, libdir, '^lib(.*)\.so\..*$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True, allow_links=True) pkglibdir = '%s/samba' % libdir do_split_packages(d, pkglibdir, '^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True) @@ -214,22 +234,19 @@ python samba_populate_packages() { PACKAGESPLITFUNCS_prepend = "samba_populate_packages " PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*" -RDEPENDS_${PN} += "${PN}-base ${PN}-python ${PN}-dsdb-modules" -RDEPENDS_${PN}-python += "pytalloc python-tdb" +RDEPENDS_${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3" +RDEPENDS_${PN}-python3 += "pytalloc python3-tdb" FILES_${PN}-base = "${sbindir}/nmbd \ ${sbindir}/smbd \ ${sysconfdir}/init.d \ - ${localstatedir}/lib/samba \ - ${localstatedir}/nmbd \ - ${localstatedir}/spool/samba \ ${systemd_system_unitdir}/nmb.service \ ${systemd_system_unitdir}/smb.service" FILES_${PN}-ad-dc = "${sbindir}/samba \ ${systemd_system_unitdir}/samba.service \ ${libdir}/krb5/plugins/kdb/samba.so \ - " +" RDEPENDS_${PN}-ad-dc = "krb5-kdc" FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \ @@ -237,17 +254,21 @@ FILES_${PN}-ctdb-tests = "${bindir}/ctdb_run_tests \ ${sysconfdir}/ctdb/nodes \ ${datadir}/ctdb-tests \ ${datadir}/ctdb/tests \ + ${localstatedir}/lib/ctdb \ " FILES_${BPN}-common = "${sysconfdir}/default \ ${sysconfdir}/samba \ ${sysconfdir}/tmpfiles.d \ + ${localstatedir}/lib/samba \ + ${localstatedir}/spool/samba \ " FILES_${PN} += "${libdir}/vfs/*.so \ ${libdir}/charset/*.so \ ${libdir}/*.dat \ ${libdir}/auth/*.so \ + ${datadir}/ctdb/events/* \ " FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb" @@ -273,7 +294,7 @@ FILES_winbind = "${sbindir}/winbindd \ ${sysconfdir}/init.d/winbind \ ${systemd_system_unitdir}/winbind.service" -FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" +FILES_${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" FILES_smbclient = "${bindir}/cifsdd \ ${bindir}/rpcclient \ @@ -294,7 +315,7 @@ RDEPENDS_${PN}-client = "\ winbind \ registry-tools \ ${PN}-pidl \ - " + " ALLOW_EMPTY_${PN}-client = "1" @@ -302,7 +323,7 @@ RDEPENDS_${PN}-server = "\ ${PN} \ winbind \ registry-tools \ - " + " ALLOW_EMPTY_${PN}-server = "1" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb index fc304fae..5c7180b6 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb @@ -5,15 +5,13 @@ LICENSE = "GPLv2 & GPLv2+ " LIC_FILES_CHKSUM = "file://sethdlc.c;endline=10;md5=90f936879e9f8b755a138aeb348782eb" -SRC_URI = "https://www.kernel.org/pub/linux/utils/net/hdlc/${BPN}-1.18.tar.gz \ +SRC_URI = "https://www.kernel.org/pub/linux/utils/net/hdlc/${BP}.tar.gz \ file://sethdlc-fix-host-contamination.patch \ " SRC_URI[md5sum] = "9016878156a5eadb06c0bae71cc5c9ab" SRC_URI[sha256sum] = "21b1e2e1cb0e288b0ec8fcfd9fed449914e0f8e6fc273706bd5b3d4f6ab6b04e" -S = "${WORKDIR}/${BPN}-1.18" - PACKAGE_ARCH = "${MACHINE_ARCH}" DEPENDS = "virtual/kernel" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch new file mode 100644 index 00000000..87fd05bf --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch @@ -0,0 +1,60 @@ +From 65463a7c5cb2514b1523a81911810effffb75a79 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Fri, 28 Jun 2019 15:05:31 +0800 +Subject: [PATCH] configure.in: disable tirpc checking for fedora + +The Fedora 28+ does not have inbuilt SunRPC support in glibc and is +separately availble in tirpc package. So it enables tirpc checking for +fedora in configure. + +Drop this piece of code since we had specify '-ltirpc' in LDFLAGS +explicitly. Otherwise it will cause a compile-host-path QA issue if the +host is Fedora 28+: +cc1: warning: include location "/usr/include/tirpc" is unsafe for +cross-compilation [-Wpoison-system-directories] + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + configure.in | 24 ------------------------ + 1 file changed, 24 deletions(-) + +diff --git a/configure.in b/configure.in +index 8662cdd..0ff7e27 100644 +--- a/configure.in ++++ b/configure.in +@@ -895,30 +895,6 @@ if test "x$enable_dlclose" = "xno"; then + AC_DEFINE([DISABLE_DLCLOSE_FOR_VALGRIND_TESTING],[1],[Don't close opened shared objects for valgrind leak testing of dynamic libraries]) + fi + +-################################################## +-# Fedora 28+ does not have inbuilt SunRPC support# +-# in glibc and is separately availble in tirpc # +-# package. Make sure we've got the library and # +-# link it # +-################################################## +- +-if test -f /etc/fedora-release ; then +- DISTRO_VERSION=$(awk '{ print $3 }' /etc/fedora-release) +- if test $DISTRO_VERSION -ge 28 ; then +- TIRPC="" +- AC_CHECK_LIB(tirpc,bindresvport,, TIRPC="no") +- echo "$TIRPC" +- if test "x$TIRPC" = "xno"; then +- echo +- echo " ERROR! tirpc not found, get it by running " +- echo " yum install libtirpc-devel " +- exit +- fi +- LIBS="${LIBS} -ltirpc" +- extra_incl="-I/usr/include/tirpc" +- fi +-fi +- + Z_LIB="" + AC_CHECK_HEADERS(zlib.h,, Z_LIB="no") + if test "x$Z_LIB" = "xno"; then +-- +2.7.4 + diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch index 037962fb..30ec1743 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch @@ -226,7 +226,7 @@ index 4b3a5db..a6c5498 100644 -]])], -[have_daq_packet_trace="yes"], -[have_daq_packet_trace="no"]) -+have_daq_packet_trace="yes" ++have_daq_packet_trace="no" AC_MSG_RESULT($have_daq_packet_trace) if test "x$have_daq_packet_trace" = "xyes"; then AC_DEFINE([HAVE_DAQ_PKT_TRACE],[1], @@ -245,7 +245,7 @@ index 4b3a5db..a6c5498 100644 -]])], -[have_daq_verdict_reason="yes"], -[have_daq_verdict_reason="no"]) -+have_daq_verdict_reason="yes" ++have_daq_verdict_reason="no" AC_MSG_RESULT($have_daq_verdict_reason) if test "x$have_daq_verdict_reason" = "xyes"; then AC_DEFINE([HAVE_DAQ_VERDICT_REASON],[1], diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init index d8a00c43..0d90c9af 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/snort.init @@ -1,6 +1,6 @@ #!/bin/sh # -# Snort Startup Script modified for OpenEmbedded +# Snort Startup Script modified for OpenEmbedded # # Script variables @@ -30,16 +30,16 @@ fi start() { - [ -n "$LAN_INTERFACE" ] || return 0 # Check if log diratory is present. Otherwise, create it. if [ ! -d $LOGDIR/$DATE ]; then - mkdir -d $LOGDIR/$DATE + mkdir -p $LOGDIR/$DATE /bin/chown -R $USER:$USER $LOGDIR/$DATE - /bin/chmod -R 700 $LOGDIR/$DATE + /bin/chmod -R 700 $LOGDIR/$DATE fi /bin/echo "Starting $PROG: " + # Snort parameters # -D Run Snort in background (daemon) mode # -i <if> Listen on interface <if> @@ -64,7 +64,7 @@ stop() RETURN_VAL=$? /bin/echo "$PROG shutdown complete." [ -e $DEL_PID ] && rm -f $DEL_PID - [ -e $DEL_PID.lck ] && rm -f $DEL_PID.lck + [ -e $DEL_PID.lck ] && rm -f $DEL_PID.lck else /bin/echo "ERROR: PID in $PID file not found." RETURN_VAL=1 @@ -72,12 +72,13 @@ stop() return $RETURN_VAL } -status() { - if [ -s $PID ]; then - echo "$PROG is running as pid `cat $PID`:" - else - echo "$PROG is not running." - fi +status() +{ + if [ -s $PID ]; then + echo "$PROG is running as pid `cat $PID`:" + else + echo "$PROG is not running." + fi } restart() @@ -89,21 +90,21 @@ restart() } case "$1" in - start) - start - ;; - stop) - stop - ;; - status) - status - ;; - restart|reload) - restart - ;; - *) - /bin/echo "Usage: $0 {start|stop|status|restart|reload}" - RETURN_VAL=1 + start) + start + ;; + stop) + stop + ;; + status) + status + ;; + restart|reload) + restart + ;; + *) + /bin/echo "Usage: $0 {start|stop|status|restart|reload}" + RETURN_VAL=1 esac exit $RETURN_VAL diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort new file mode 100644 index 00000000..acf5f61a --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort/volatiles.99_snort @@ -0,0 +1,2 @@ +# <type> <owner> <group> <mode> <path> <linksource> +d root root 0755 /var/log/snort none diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.11.1.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.16.bb index a99138d3..d8073d86 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.11.1.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/snort/snort_2.9.16.bb @@ -8,13 +8,15 @@ DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native libtirpc bison-n SRC_URI = "https://www.snort.org/downloads/archive/snort/${BP}.tar.gz \ file://snort.init \ + file://volatiles.99_snort \ file://0001-libpcap-search-sysroot-for-headers.patch \ file://fix-host-contamination-when-enable-static-daq.patch \ file://disable-run-test-program-while-cross-compiling.patch \ + file://configure.in-disable-tirpc-checking-for-fedora.patch \ " -SRC_URI[md5sum] = "378e3938b2b5c8e358f942d0ffce18cc" -SRC_URI[sha256sum] = "9f6b3aeac5a109f55504bd370564ac431cb1773507929dc461626898f33f46cd" +SRC_URI[md5sum] = "1cec58babaea3420014d61a93e6e1545" +SRC_URI[sha256sum] = "9688d8edf1da09dec6574000fb3c0e62f99c56428587616e17c60103c0bcbad7" UPSTREAM_CHECK_URI = "https://www.snort.org/downloads" UPSTREAM_CHECK_REGEX = "snort-(?P<pver>\d+(\.\d+)+)\.tar" @@ -45,6 +47,7 @@ EXTRA_OECONF = " \ 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," +PACKAGECONFIG[appid] = "--enable-open-appid, --disable-open-appid, luajit, bash" CFLAGS += "-I${STAGING_INCDIR}/tirpc" LDFLAGS += " -ltirpc" @@ -69,10 +72,17 @@ do_install_append() { cp ${S}/preproc_rules/*.rules ${D}${sysconfdir}/snort/preproc_rules/ install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort - mkdir -p ${D}${localstatedir}/log/snort - install -d ${D}/var/log/snort - sed -i 's/-fdebug-prefix-map[^ ]*//g; s#${STAGING_DIR_TARGET}##g' ${D}${libdir}/pkgconfig/*.pc + install -d ${D}${sysconfdir}/default/volatiles + install -m 0644 ${WORKDIR}/volatiles.99_snort ${D}${sysconfdir}/default/volatiles/99_snort + + sed -i -e 's|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc +} + +pkg_postinst_${PN}() { + if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi } FILES_${PN} += " \ diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb index 19cfe46b..42fc2625 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb @@ -17,15 +17,18 @@ SRC_URI = " \ file://0004-lp1039729.patch \ file://0005-lp1191197.patch \ " + +UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" + SRC_URI[md5sum] = "3747b453d76709e5a99da209fc0bb5f5" SRC_URI[sha256sum] = "5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8" -inherit setuptools distro_features_check +inherit setuptools3 features_check RDEPENDS_${PN} = " \ iptables \ - python \ - python-modules \ + python3 \ + python3-modules \ " RRECOMMENDS_${PN} = " \ diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch deleted file mode 100644 index 8e5f4da3..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-Add-format-string-to-fprintf-call.patch +++ /dev/null @@ -1,26 +0,0 @@ -From a0ad5128d14b022239445e251cf4a9826e86aa96 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 27 Jun 2017 07:48:31 -0700 -Subject: [PATCH] Add format string to fprintf() call - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/vt.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/vt.c b/src/vt.c -index 795d393..a533d3d 100644 ---- a/src/vt.c -+++ b/src/vt.c -@@ -499,7 +499,7 @@ static int vt_cmd_dump_candidates(const struct vt_handle *vh, - } - llen += cmdlen; - -- ret = fprintf(vh->vh_stream, e->cmd); -+ ret = fprintf(vh->vh_stream, "%s", e->cmd); - if (ret < 0) - return ret; - --- -2.13.2 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch deleted file mode 100644 index 153bced3..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch +++ /dev/null @@ -1,38 +0,0 @@ -From f567740cf64978ac9db014c786b6d0267b244f33 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 4 Mar 2018 22:30:30 -0800 -Subject: [PATCH 1/2] replace SIGCLD with SIGCHLD and include sys/types.h - -Fixes -main.c:129:10: error: 'SIGCLD' undeclared (first use in this function); did you mean 'SIGCHLD'? - signal(SIGCLD, sig_child); - ^~~~~~ - SIGCHLD - -main.c:125:2: warning: implicit declaration of function 'umask' [-Wimplicit-function-declaration] - umask(0); - ^~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - src/main.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -Index: git/src/main.c -=================================================================== ---- git.orig/src/main.c -+++ git/src/main.c -@@ -133,9 +133,9 @@ static void daemon_start(int ignsigcld) - - if (ignsigcld) { - #ifdef SIGTSTP -- signal(SIGCLD, sig_child); -+ signal(SIGCHLD, sig_child); - #else -- signal(SIGCLD, SIG_IGN); -+ signal(SIGCHLD, SIG_IGN); - #endif - } - } diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch deleted file mode 100644 index d8355e25..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0001-support-openssl-1.1.x.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 62784e8b6df8ff3a907c1f816154808bea9d7064 Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Tue, 25 Sep 2018 14:38:14 +0800 -Subject: [PATCH] support openssl 1.1.x - -Long time no maintain from upstream since 2013 -(git://git.umip.org/umip/umip.git), backport a -fix from openSUSE - -Upstream-Status: Backport [openSUSE] -http://ftp.gwdg.de/pub/opensuse/source/distribution/leap/15.0/repo/oss/src/mipv6d-2.0.2.umip.0.4-lp150.1.2.src.rpm - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - src/keygen.c | 12 ++++++++++++ - src/mh.c | 17 ++++++++++++++++- - 2 files changed, 28 insertions(+), 1 deletion(-) - -diff --git a/src/keygen.c b/src/keygen.c -index e434a38..b902644 100644 ---- a/src/keygen.c -+++ b/src/keygen.c -@@ -172,6 +172,7 @@ static void build_kgen_token(struct in6_addr *addr, uint8_t *nonce, - uint8_t tmp[20]; - #ifdef HAVE_LIBCRYPTO - unsigned int len = 20; -+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL - HMAC_CTX ctx; - - HMAC_CTX_init(&ctx); -@@ -182,6 +183,17 @@ static void build_kgen_token(struct in6_addr *addr, uint8_t *nonce, - HMAC_Final(&ctx, tmp, &len); - HMAC_CTX_cleanup(&ctx); - #else -+ HMAC_CTX *ctx; -+ ctx = HMAC_CTX_new(); -+ HMAC_Init_ex(ctx, key_cn, sizeof(key_cn), EVP_sha1(), NULL); -+ HMAC_Update(ctx, (unsigned char *)addr, sizeof(*addr)); -+ HMAC_Update(ctx, nonce, NONCE_LENGTH); -+ HMAC_Update(ctx, &id, sizeof(id)); -+ HMAC_Final(ctx, tmp, &len); -+ HMAC_CTX_free(ctx); -+#endif // End of defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL -+ -+#else - HMAC_SHA1_CTX ctx; - - HMAC_SHA1_init(&ctx, key_cn, sizeof(key_cn)); -diff --git a/src/mh.c b/src/mh.c -index cba9a33..212eb5a 100644 ---- a/src/mh.c -+++ b/src/mh.c -@@ -518,9 +518,10 @@ static int calculate_auth_data(const struct iovec *iov, int iovlen, - - #ifdef HAVE_LIBCRYPTO - unsigned int len = HMAC_SHA1_HASH_LEN; -- HMAC_CTX ctx; - const EVP_MD *evp_md = EVP_sha1(); - -+#if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x1010006fL -+ HMAC_CTX ctx; - HMAC_CTX_init(&ctx); - HMAC_Init_ex(&ctx, key, HMAC_SHA1_KEY_SIZE, evp_md, NULL); - -@@ -532,6 +533,20 @@ static int calculate_auth_data(const struct iovec *iov, int iovlen, - HMAC_Final(&ctx, buf, &len); - HMAC_CTX_cleanup(&ctx); - #else -+ HMAC_CTX *ctx; -+ ctx = HMAC_CTX_new(); -+ HMAC_Init_ex(ctx, key, HMAC_SHA1_KEY_SIZE, evp_md, NULL); -+ -+ HMAC_Update(ctx, (uint8_t *)coa, sizeof(*coa)); -+ HMAC_Update(ctx, (uint8_t *)cn, sizeof(*coa)); -+ for (i = 0; i < iovlen; i++) { -+ HMAC_Update(ctx, (uint8_t *)iov[i].iov_base, iov[i].iov_len); -+ } -+ HMAC_Final(ctx, buf, &len); -+ HMAC_CTX_free(ctx); -+#endif -+ -+#else - HMAC_SHA1_CTX ctx; - - HMAC_SHA1_init(&ctx, key, HMAC_SHA1_KEY_SIZE); --- -2.7.4 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch deleted file mode 100644 index 90d12da1..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch +++ /dev/null @@ -1,143 +0,0 @@ -From 19b6cf8099e1974b5fc39086fc54103b0cbc2658 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sun, 4 Mar 2018 23:01:25 -0800 -Subject: [PATCH 2/2] replace PTHREAD_MUTEX_FAST_NP with PTHREAD_MUTEX_NORMAL - -PTHREAD_MUTEX_FAST_NP is not available on non-posix systems -e.g. musl - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Pending - - src/ha.c | 2 +- - src/icmp6.c | 2 +- - src/mh.c | 2 +- - src/mn.c | 2 +- - src/movement.c | 2 +- - src/mpdisc_ha.c | 2 +- - src/mpdisc_mn.c | 2 +- - src/tqueue.c | 2 +- - src/tunnelctl.c | 2 +- - 9 files changed, 9 insertions(+), 9 deletions(-) - -diff --git a/src/ha.c b/src/ha.c -index fbdcff0..b2f811e 100644 ---- a/src/ha.c -+++ b/src/ha.c -@@ -1246,7 +1246,7 @@ int ha_init(void) - { - pthread_mutexattr_t mattrs; - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&bu_worker_mutex, &mattrs) || - pthread_cond_init(&cond, NULL)) - return -1; -diff --git a/src/icmp6.c b/src/icmp6.c -index 3695135..6460634 100644 ---- a/src/icmp6.c -+++ b/src/icmp6.c -@@ -243,7 +243,7 @@ int icmp6_init(void) - return -1; - /* create ICMP listener thread */ - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&icmp6_sock.send_mutex, &mattrs) || - pthread_rwlock_init(&handler_lock, NULL) || - pthread_create(&icmp6_listener, NULL, icmp6_listen, NULL)) -diff --git a/src/mh.c b/src/mh.c -index 60e345e..7928f4c 100644 ---- a/src/mh.c -+++ b/src/mh.c -@@ -204,7 +204,7 @@ int mh_init(void) - return -1; - - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&mh_sock.send_mutex, &mattrs) || - pthread_rwlock_init(&handler_lock, NULL) || - pthread_create(&mh_listener, NULL, mh_listen, NULL)) -diff --git a/src/mn.c b/src/mn.c -index 092cfcb..8f7f448 100644 ---- a/src/mn.c -+++ b/src/mn.c -@@ -1478,7 +1478,7 @@ static struct home_addr_info *hai_copy(struct home_addr_info *conf_hai) - if (hai != NULL) { - pthread_mutexattr_t mattrs; - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - - memcpy(hai, conf_hai, sizeof(struct home_addr_info)); - -diff --git a/src/movement.c b/src/movement.c -index d985937..6400448 100644 ---- a/src/movement.c -+++ b/src/movement.c -@@ -2013,7 +2013,7 @@ int md_init(void) - int val; - - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&iface_lock, &mattrs)) - return -1; - -diff --git a/src/mpdisc_ha.c b/src/mpdisc_ha.c -index 40ba05f..fd7a90d 100644 ---- a/src/mpdisc_ha.c -+++ b/src/mpdisc_ha.c -@@ -559,7 +559,7 @@ int mpd_ha_init(void) - { - pthread_mutexattr_t mattrs; - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&mpa_lock, &mattrs) || - pthread_rwlock_init(&prefix_lock, NULL) || - hash_init(&mpa_hash, DOUBLE_ADDR, MPA_BUCKETS) < 0) -diff --git a/src/mpdisc_mn.c b/src/mpdisc_mn.c -index 4873bd6..ada02bd 100644 ---- a/src/mpdisc_mn.c -+++ b/src/mpdisc_mn.c -@@ -267,7 +267,7 @@ int mpd_mn_init(void) - { - pthread_mutexattr_t mattrs; - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&mps_lock, &mattrs)) - return -1; - if (hash_init(&mps_hash, DOUBLE_ADDR, MPS_BUCKETS) < 0) -diff --git a/src/tqueue.c b/src/tqueue.c -index 2f7aa0b..9c185b8 100644 ---- a/src/tqueue.c -+++ b/src/tqueue.c -@@ -65,7 +65,7 @@ int taskqueue_init(void) - { - pthread_mutexattr_t mattrs; - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&mutex, &mattrs) || - pthread_cond_init(&cond, NULL) || - pthread_create(&tq_runner, NULL, runner, NULL)) -diff --git a/src/tunnelctl.c b/src/tunnelctl.c -index 23fc20b..813b8ec 100644 ---- a/src/tunnelctl.c -+++ b/src/tunnelctl.c -@@ -433,7 +433,7 @@ int tunnelctl_init(void) - return -1; - - pthread_mutexattr_init(&mattrs); -- pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_FAST_NP); -+ pthread_mutexattr_settype(&mattrs, PTHREAD_MUTEX_NORMAL); - if (pthread_mutex_init(&tnl_lock, &mattrs)) - return -1; - --- -2.16.2 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch deleted file mode 100644 index dbf00826..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/add-dependency-to-support-parallel-compilation.patch +++ /dev/null @@ -1,23 +0,0 @@ -When "make -j10", the compilation will fail, -because scan.c has included gram.h, but gram.h was produced -after scan.c was compiled - -So add this dependency to ensure that gram.h is produced -before scan.c is produced. - -Upstream-Status: Inappropriate [upstream is not active] - -Signed-off-by: Roy.Li <RongQing.Li@windriver.com> -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - src/Makefile.am | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -81,3 +81,5 @@ CLEANFILES = gram.c gram.h \ - - DISTCLEANFILES = $(BUILT_SOURCES) - MAINTAINERCLEANFILES = Makefile.in -+ -+scan.c: gram.h diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d deleted file mode 100755 index ebd70a6c..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/sh -# -# mip6d Start script for the Mobile IPv6 daemon -# -# chkconfig: - 55 25 -# description: The mobile IPv6 daemon allows nodes to remain \ -# reachable while moving around in the IPv6 Internet. -# processname: mip6d -# config: /etc/mip6d.conf -# config: /etc/sysconfig/mip6d -# -### BEGIN INIT INFO -# Provides: mipv6-daemon -# Required-Start: $local_fs $remote_fs $network $named -# Required-Stop: $local_fs $remote_fs $network -# Should-Start: $syslog -# Should-Stop: $network $syslog -# Default-Start: -# Default-Stop: 0 1 6 -# Short-Description: Start and stop Mobile IPV6 daemon -# Description: The mobile IPv6 daemon allows nodes to remain -# reachable while moving around in the IPv6 Internet. -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -if [ -f /etc/sysconfig/mip6d ]; then - . /etc/sysconfig/mip6d -fi - -mip6d=/usr/sbin/mip6d -prog="mip6d" -lockfile=/var/lock/subsys/$prog - -start() { - [ -x $mip6d ] || exit 5 - echo -n $"Starting $prog: " - start-stop-daemon -S -x ${mip6d} && success || failure - retval=$? - echo - [ $retval -eq 0 ] && touch ${lockfile} - return $retval -} - -stop() { - echo -n $"Stopping $prog: " - start-stop-daemon -K -x $mip6d - retval=$? - echo - [ $retval -eq 0 ] && rm -f ${lockfile} - return $retval -} - -restart() { - stop - start -} - -reload() -{ - echo -n $"Reloading $prog configuration: " - killproc $mip6d -HUP - retval=$? - echo - return $retval -} - -force_reload() { - restart -} - -rh_status() { - status $prog -} - -rh_status_q() { - rh_status > /dev/null 2>&1 -} - -case "$1" in - start) - rh_status_q && exit 0 - $1 - ;; - stop) - rh_status_q || exit 0 - $1 - ;; - restart) - $1 - ;; - reload) - rh_status_q || exit 7 - $1 - ;; - force-reload) - force_reload - ;; - status) - rh_status - ;; - condrestart|try-restart) - rh_status_q || exit 0 - restart - ;; - *) - echo $"Usage: $prog {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" - exit 2 -esac - -exit $? diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d.service b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d.service deleted file mode 100644 index 2b5a5b9f..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip/mip6d.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=MIPL Mobile IPv6 -After=network.target - -[Service] -EnvironmentFile=-@SYSCONFDIR@/sysconfig/mip6d -ExecStart=@SBINDIR@/mip6d $ARGS - -[Install] -WantedBy=multi-user.target diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip_1.0.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip_1.0.bb deleted file mode 100644 index e2abc02c..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/umip/umip_1.0.bb +++ /dev/null @@ -1,43 +0,0 @@ -SUMMARY = "Mobile IPv6 and NEMO for Linux" -DESCRIPTION = "UMIP is an open source implementation of Mobile IPv6 and NEMO \ -Basic Support for Linux. It is released under the GPLv2 license. It supports \ -the following IETF RFC: RFC6275 (Mobile IPv6), RFC3963 (NEMO), RFC3776 and \ -RFC4877 (IPsec and IKEv2)." -HOMEPAGE = "http://umip.org/" -SECTION = "System Environment/Base" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=073dc31ccb2ebed70db54f1e8aeb4c33" -DEPENDS = "openssl ipsec-tools radvd indent-native bison-native" - -SRC_URI = "git://git.umip.org/umip/umip.git \ - file://add-dependency-to-support-parallel-compilation.patch \ - file://mip6d \ - file://mip6d.service \ - file://0001-Add-format-string-to-fprintf-call.patch \ - file://0001-replace-SIGCLD-with-SIGCHLD-and-include-sys-types.h.patch \ - file://0002-replace-PTHREAD_MUTEX_FAST_NP-with-PTHREAD_MUTEX_NOR.patch \ - file://0001-support-openssl-1.1.x.patch \ - " -SRCREV = "cbd441c5db719db554ff2b4fcb02fef88ae2f791" - -S = "${WORKDIR}/git" - -EXTRA_OECONF = "--enable-vt" - -inherit autotools-brokensep systemd update-rc.d - -INITSCRIPT_NAME = "mip6d" -INITSCRIPT_PARAMS = "start 64 . stop 36 0 1 2 3 4 5 6 ." - -SYSTEMD_SERVICE_${PN} = "mip6d.service" -SYSTEMD_AUTO_ENABLE = "disable" - -do_install_append() { - install -D -m 0755 ${WORKDIR}/mip6d ${D}${sysconfdir}/init.d/mip6d - install -D -m 0644 ${WORKDIR}/mip6d.service ${D}${systemd_system_unitdir}/mip6d.service - sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - -e 's,@SBINDIR@,${sbindir},g' \ - ${D}${systemd_system_unitdir}/mip6d.service -} - -RRECOMMENDS_${PN} = "kernel-module-mip6 kernel-module-ipv6" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb index ea217998..54e855a0 100644 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb @@ -28,6 +28,8 @@ PACKAGECONFIG ?= "gnutls" PACKAGECONFIG[gnutls] = ",,gnutls" PACKAGECONFIG[openssl] = ",,openssl" +PACKAGES =+ "${PN}-script" + S = "${WORKDIR}/git" inherit perlnative pkgconfig @@ -54,6 +56,8 @@ vpnc_sysroot_preprocess () { install -m 755 ${D}${sysconfdir}/vpnc/vpnc-script ${SYSROOT_DESTDIR}${sysconfdir}/vpnc } +FILES_${PN}-script = "${sysconfdir}/vpnc/vpnc-script" + CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf" -RDEPENDS_${PN} = "perl-module-io-file" +RDEPENDS_${PN} = "perl-module-io-file ${PN}-script" RRECOMMENDS_${PN} = "kernel-module-tun" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2018.10.24.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2018.10.24.bb deleted file mode 100644 index e1aa9a51..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/wireless-regdb/wireless-regdb_2018.10.24.bb +++ /dev/null @@ -1,42 +0,0 @@ -SUMMARY = "Wireless Central Regulatory Domain Database" -HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA" -SECTION = "net" -LICENSE = "ISC" -LIC_FILES_CHKSUM = "file://LICENSE;md5=07c4f6dea3845b02a18dc00c8c87699c" - -SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz" -SRC_URI[md5sum] = "b81bd1f6525a4806a707881aa3dda63f" -SRC_URI[sha256sum] = "0d3e845ac77d21aac9b88642c3dd043a83e3920d706b63d5e5c31dffdbec9116" - -inherit bin_package allarch - -do_install() { - install -d -m0755 ${D}${nonarch_libdir}/crda - install -d -m0755 ${D}${sysconfdir}/wireless-regdb/pubkeys - install -m 0644 regulatory.bin ${D}${nonarch_libdir}/crda/regulatory.bin - install -m 0644 sforshee.key.pub.pem ${D}${sysconfdir}/wireless-regdb/pubkeys/sforshee.key.pub.pem - - install -m 0644 -D regulatory.db ${D}${nonarch_base_libdir}/firmware/regulatory.db - install -m 0644 regulatory.db.p7s ${D}${nonarch_base_libdir}/firmware/regulatory.db.p7s -} - -# Install static regulatory DB in /lib/firmware for kernel to load. -# This requires Linux kernel >= v4.15. -# For kernel <= v4.14, inherit the kernel_wireless_regdb.bbclass in kernel's recipe. -PACKAGES =+ "${PN}-static" -RCONFLICTS_${PN} = "${PN}-static" - -FILES_${PN}-static = " \ - ${nonarch_base_libdir}/firmware/regulatory.db \ - ${nonarch_base_libdir}/firmware/regulatory.db.p7s \ -" - -# Native users might want to use the source of regulatory DB. -# This is for example used by Linux kernel <= v4.14 and kernel_wireless_regdb.bbclass. -do_install_append_class-native() { - install -m 0644 -D db.txt ${D}${libdir}/crda/db.txt -} - -RSUGGESTS_${PN} = "crda" - -BBCLASSEXTEND = "native" diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch b/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch deleted file mode 100644 index f304d933..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/files/0001-fix-no-rule-to-make-cyassl-options.h.patch +++ /dev/null @@ -1,27 +0,0 @@ -From fb490136cf8f2456cfe13b0b4f796e6c155e75dc Mon Sep 17 00:00:00 2001 -From: Dengke Du <dengke.du@windriver.com> -Date: Wed, 30 Aug 2017 03:02:32 -0400 -Subject: [PATCH] fix no rule to make cyassl/options.h - -Upstream-Status: Pending - -Signed-off-by: Dengke Du <dengke.du@windriver.com> ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure.ac b/configure.ac -index 395d75d..d4a3880 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3684,6 +3684,7 @@ AC_CONFIG_FILES([wolfssl/options.h]) - #fi - AC_CONFIG_FILES([support/wolfssl.pc]) - AC_CONFIG_FILES([rpm/spec]) -+AC_CONFIG_FILES([cyassl/options.h]) - - AX_CREATE_GENERIC_CONFIG - AX_AM_JOBSERVER([yes]) --- -2.8.1 - diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb deleted file mode 100644 index dc9094d8..00000000 --- a/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_3.14.4.bb +++ /dev/null @@ -1,24 +0,0 @@ -SUMMARY = "wolfSSL Lightweight, Embedded SSL Library" -DESCRIPTION = "wolfSSL, formerly CyaSSL, is a lightweight SSL library written in C and \ - optimized for embedded and RTOS environments. It can be \ - Up to 20 times smaller than OpenSSL while still supporting \ - a full TLS 1.2 client and server." -HOMEPAGE = "http://www.wolfssl.com/yaSSL/Products-wolfssl.html" -BUGTRACKER = "http://github.com/wolfssl/wolfssl/issues" -SECTION = "libs" -LICENSE = "GPLv2" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -PROVIDES += "cyassl" -RPROVIDES_${PN} = "cyassl" - -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 \ - " - -inherit autotools - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," diff --git a/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb b/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb new file mode 100644 index 00000000..db7b0d48 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.4.0.bb @@ -0,0 +1,21 @@ +SUMMARY = "wolfSSL Lightweight Embedded SSL/TLS Library" +DESCRIPTION = "wolfSSL, formerly CyaSSL, is a lightweight SSL library written \ + in C and optimized for embedded and RTOS environments. It can \ + be up to 20 times smaller than OpenSSL while still supporting \ + a full TLS client and server, up to TLS 1.3" +HOMEPAGE = "https://www.wolfssl.com/products/wolfssl" +BUGTRACKER = "https://github.com/wolfssl/wolfssl/issues" +SECTION = "libs" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +PROVIDES += "cyassl" +RPROVIDES_${PN} = "cyassl" + +SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https" +SRCREV = "e116c89a58af750421d82ece13f80516d2bde02e" +S = "${WORKDIR}/git" + +inherit autotools + +BBCLASSEXTEND += "native nativesdk" |