diff options
Diffstat (limited to 'meta-networking/recipes-connectivity')
205 files changed, 6080 insertions, 3383 deletions
diff --git a/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb b/meta-networking/recipes-connectivity/adcli/adcli_0.9.2.bb index 75f303068b..c5dcccbac5 100644 --- a/meta-networking/recipes-connectivity/adcli/adcli_0.8.2.bb +++ b/meta-networking/recipes-connectivity/adcli/adcli_0.9.2.bb @@ -4,18 +4,16 @@ DESCRIPTION = "A helper library and tools for Active Directory client operations HOMEPAGE = "http://cgit.freedesktop.org/realmd/adcli" SECTION = "net" -SRCREV = "cc3ef52884a48863a81acbfc741735fe09cd85f7" +SRCREV = "8e88e3590a19006362ea8b8dfdc18bb88b3cb3b5" -SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;branch=master \ - file://Fixed-build-error-on-musl.patch \ - " +SRC_URI = "git://gitlab.freedesktop.org/realmd/adcli;protocol=https;branch=master" S = "${WORKDIR}/git" -LICENSE = "LGPLv2+" +LICENSE = "LGPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=23c2a5e0106b99d75238986559bb5fc6" -inherit autotools xmlcatalog +inherit autotools xmlcatalog DEPENDS += "virtual/crypt krb5 openldap gettext libxslt xmlto libxml2-native \ cyrus-sasl libxslt-native xmlto-native coreutils-native\ diff --git a/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch b/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch deleted file mode 100644 index 87bcdfebd7..0000000000 --- a/meta-networking/recipes-connectivity/adcli/files/Fixed-build-error-on-musl.patch +++ /dev/null @@ -1,26 +0,0 @@ -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/meta-networking/recipes-connectivity/autossh/autossh_1.4g.bb b/meta-networking/recipes-connectivity/autossh/autossh_1.4g.bb new file mode 100644 index 0000000000..de7e2d3e01 --- /dev/null +++ b/meta-networking/recipes-connectivity/autossh/autossh_1.4g.bb @@ -0,0 +1,31 @@ +DESCRIPTION = "autossh is a program to start a copy of ssh and monitor it, restarting it as necessary should it die or stop passing traffic" +HOMEPAGE = "https://www.harding.motd.ca/autossh/" + +LICENSE = "BSD-1-Clause & BSD-4-Clause" +LIC_FILES_CHKSUM = "file://autossh.c;beginline=7;endline=22;md5=9ae0c9b04856148d77984ef58536732b \ + file://daemon.h;beginline=7;endline=36;md5=839bb7bf781ff48da4a3fec2a62a1a47" + +SRC_URI = "https://www.harding.motd.ca/autossh/${BP}.tgz" +SRC_URI[md5sum] = "2b804bc1bf6d2f2afaa526d02df7c0a2" +SRC_URI[sha256sum] = "5fc3cee3361ca1615af862364c480593171d0c54ec156de79fc421e31ae21277" + +RDEPENDS:${PN} = "ssh" + +CFLAGS:prepend = "-I${WORKDIR}/build " + +inherit autotools + +EXTRA_OECONF="--with-ssh=/usr/bin/ssh" + +do_compile:append() { + cp ${WORKDIR}/autossh-${PV}/CHANGES ${WORKDIR}/build + cp ${WORKDIR}/autossh-${PV}/README ${WORKDIR}/build + cp ${WORKDIR}/autossh-${PV}/autossh.host ${WORKDIR}/build + cp ${WORKDIR}/autossh-${PV}/rscreen ${WORKDIR}/build + cp ${WORKDIR}/autossh-${PV}/autossh.1 ${WORKDIR}/build + cp ${WORKDIR}/autossh-${PV}/autossh.spec ${WORKDIR}/build +} + +do_install:append() { + rm -rf ${D}${datadir}/examples +} diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0002-test-test_x509.c-fix-potential-overflow-issue.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0002-test-test_x509.c-fix-potential-overflow-issue.patch new file mode 100644 index 0000000000..e0e5c13588 --- /dev/null +++ b/meta-networking/recipes-connectivity/bearssl/bearssl/0002-test-test_x509.c-fix-potential-overflow-issue.patch @@ -0,0 +1,43 @@ +From 542380a13f178d97851751b57054a6b5be555d1c Mon Sep 17 00:00:00 2001 +From: Jens Rehsack <sno@netbsd.org> +Date: Thu, 13 Aug 2020 16:16:44 +0200 +Subject: [PATCH 2/2] test/test_x509.c: fix potential overflow issue + +Instead of doing a memcpy() which does static overflow checking, use +snprintf() for string copying which does the check dynamically. + +Fixes: +| In file included from .../recipe-sysroot/usr/include/string.h:519, +| from test/test_x509.c:27: +| In function 'memcpy', +| inlined from 'parse_keyvalue' at test/test_x509.c:845:2, +| inlined from 'process_conf_file' at test/test_x509.c:1360:7, +| inlined from 'main' at test/test_x509.c:2038:2: +| .../recipe-sysroot/usr/include/bits/string_fortified.h:34:10: warning: '__builtin_memcpy' specified bound 4294967295 exceeds maximum object size 2147483647 [-Wstringop-overflow=] +| 34 | return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); +| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Signed-off-by: Jens Rehsack <sno@netbsd.org> +--- +Upstream-Status: Pending + + test/test_x509.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/test/test_x509.c b/test/test_x509.c +index 2c61cf5..76f6ab9 100644 +--- a/test/test_x509.c ++++ b/test/test_x509.c +@@ -842,8 +842,7 @@ parse_keyvalue(HT *d) + return -1; + } + name = xmalloc(u + 1); +- memcpy(name, buf, u); +- name[u] = 0; ++ snprintf(name, u, "%s", buf); + if (HT_get(d, name) != NULL) { + xfree(name); + return -1; +-- +2.17.1 + diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb new file mode 100644 index 0000000000..39569e9d06 --- /dev/null +++ b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb @@ -0,0 +1,52 @@ +SUMMARY = "BearSSL is an implementation of the SSL/TLS protocol (RFC 5246) written in C" +DESCRIPTION = "BearSSL is an implementation of the SSL/TLS protocol (RFC \ +5246) written in C. It aims at offering the following features: \ + * Be correct and secure. In particular, insecure protocol versions and \ + choices of algorithms are not supported, by design; cryptographic \ + algorithm implementations are constant-time by default. \ + * Be small, both in RAM and code footprint. For instance, a minimal \ + server implementation may fit in about 20 kilobytes of compiled code \ + and 25 kilobytes of RAM. \ + * Be highly portable. BearSSL targets not only “big” operating systems \ + like Linux and Windows, but also small embedded systems and even special \ + contexts like bootstrap code. \ + * Be feature-rich and extensible. SSL/TLS has many defined cipher suites \ + and extensions; BearSSL should implement most of them, and allow extra \ + algorithm implementations to be added afterwards, possibly from third \ + parties." +HOMEPAGE = "https://bearssl.org" + +SECTION = "libs" + +inherit lib_package + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1fc37e1037ae673975fbcb96a98f7191" + +PV .= "+git" +SRCREV = "79c060eea3eea1257797f15ea1608a9a9923aa6f" +SRC_URI = "git://www.bearssl.org/git/BearSSL;protocol=https;branch=master \ + file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \ + " + +SONAME = "libbearssl.so.6" +# without compile errors like +# <..>/ld: build/obj/ghash_pclmul.o: warning: relocation against `br_ghash_pclmul' in read-only section `.text' +CFLAGS += "-fPIC" + +EXTRA_OEMAKE += 'CC="${CC}" CFLAGS="${CFLAGS}" LDDLL="${CCLD} ${LDFLAGS}" LD="${CCLD}" LDFLAGS="${LDFLAGS}" \ + BEARSSLDLL=build/${SONAME} \ + LDDLLFLAGS="-shared -Wl,-soname,${SONAME}" \ + ${@ "STATICLIB=no" if d.getVar('DISABLE_STATIC') != "" else "" } \ +' + +S = "${WORKDIR}/git" + +do_install() { + install -d ${D}/${bindir} ${D}/${libdir} ${D}/${includedir} + install -m 0755 ${B}/build/brssl ${D}/${bindir} + oe_libinstall -C ${B}/build libbearssl ${D}/${libdir} + for inc in ${S}/inc/*.h; do + install -m 0644 "${inc}" ${D}/${includedir} + done +} diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch b/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch index 269174b2f6..913566dce9 100644 --- a/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch +++ b/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch @@ -1,31 +1,24 @@ -From 77db892cdee265e971270c06ca1ffbaeea6449a3 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Tue, 26 Jun 2018 00:27:40 +0200 Subject: [PATCH] Search for cython3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Upstream-Status: Pending +Upstream-Status: Inappropriate -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> +Signed-off-by: Markus Volk <f_l_k@gmx.net> --- - configure.ac | 2 +- + meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/configure.ac b/configure.ac -index 727089d1..6b565cdc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -58,7 +58,7 @@ AC_SUBST([PYGOBJECT_LIBS]) +--- a/module/meson.build 2022-02-10 08:49:35.000000000 +0100 ++++ b/module/meson.build 2022-03-29 12:58:03.456193737 +0200 +@@ -1,4 +1,4 @@ +-cython = find_program('cython', required: true) ++cython = find_program('cython3', required: true) - AC_ARG_VAR([CYTHONEXEC], [Cython compiler]) - if test "x$CYTHONEXEC" = "x"; then -- AC_PATH_PROG([CYTHONEXEC],[cython]) -+ AC_PATH_PROG([CYTHONEXEC],[cython3]) - fi - AC_SUBST([CYTHONEXEC]) - AC_MSG_CHECKING([for cython executable]) + blueman_c = custom_target( + 'blueman_c', + -- 2.14.3 diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch new file mode 100644 index 0000000000..cc448b4ffd --- /dev/null +++ b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-add-pythoninstalldir-option.patch @@ -0,0 +1,50 @@ +From 37f24a9bd62f0a8f3e37eaddd33f2f0c9d3aaa0a Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Fri, 1 Apr 2022 23:12:17 -0700 +Subject: [PATCH] meson: add pythoninstalldir option + +In case of cross build, using host python to determine the python +site-packages directory for target is not feasible, add a new option +pythoninstalldir to fix the issue. + +Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/1699] + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + meson.build | 7 ++++++- + meson_options.txt | 1 + + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index e12d0ce6..e84457a5 100644 +--- a/meson.build ++++ b/meson.build +@@ -26,7 +26,12 @@ pkgdatadir = join_paths([prefix, get_option('datadir'), package_name]) + bindir = join_paths([prefix, get_option('bindir')]) + libexecdir = join_paths([prefix, get_option('libexecdir')]) + schemadir = join_paths(['share', 'glib-2.0', 'schemas']) +-pythondir = pyinstall.get_install_dir() ++pythoninstalldir = get_option('pythoninstalldir') ++if pythoninstalldir != '' ++ pythondir = join_paths([prefix, pythoninstalldir]) ++else ++ pythondir = join_paths([prefix, python.sysconfig_path('purelib')]) ++endif + + if get_option('policykit') + have_polkit = 'True' +diff --git a/meson_options.txt b/meson_options.txt +index 177d9ab8..3e397d8e 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -2,6 +2,7 @@ option('runtime_deps_check', type: 'boolean', value: true, description: 'Disable + option('dhcp-config-path', type: 'string', value: '/etc/dhcp3/dhcpd.conf', description: 'Set dhcp3 server configuration path') + option('policykit', type: 'boolean', value: true, description: 'Enable policykit support') + option('pulseaudio', type: 'boolean', value: true, description: 'Enable PulseAudio support') ++option('pythoninstalldir', type: 'string', description: 'Path to python site-packages dir relative to ${prefix}') + option('systemdsystemunitdir', type: 'string', description: 'Path to systemd system unit dir relative to ${prefix}') + option('systemduserunitdir', type: 'string', description: 'Path to systemd user unit dir relative to ${prefix}') + option('sendto-plugins', type: 'array', choices: ['Caja', 'Nemo', 'Nautilus'], value: ['Caja', 'Nemo', 'Nautilus'], description: 'Install sendto plugins for various filemanagers') +-- +2.34.1 + diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch b/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch new file mode 100644 index 0000000000..282d821374 --- /dev/null +++ b/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch @@ -0,0 +1,72 @@ +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 | 10 ++++++++++ + blueman/plugins/applet/PowerManager.py | 4 ++++ + 2 files changed, 14 insertions(+) + +diff --git a/blueman/Functions.py b/blueman/Functions.py +index 3917f42..b4d5eae 100644 +--- a/blueman/Functions.py ++++ b/blueman/Functions.py +@@ -80,6 +80,16 @@ def check_bluetooth_status(message: str, exitfunc: Callable[[], Any]) -> None: + return + + applet.SetBluetoothStatus('(b)', True) ++ ++ timeout = time.time() + 10 ++ while applet.GetRequestStatus(): ++ time.sleep(0.1) ++ if time.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 c2f7bc3..bf6c99f 100644 +--- a/blueman/plugins/applet/PowerManager.py ++++ b/blueman/plugins/applet/PowerManager.py +@@ -63,6 +63,7 @@ class PowerManager(AppletPlugin, StatusIconProvider): + 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) -> None: + self.parent.Plugins.Menu.unregister(self) +@@ -196,6 +197,9 @@ class PowerManager(AppletPlugin, StatusIconProvider): + def get_bluetooth_status(self) -> bool: + return self.current_state + ++ def get_request_status(self): ++ return self.request_in_progress ++ + def on_adapter_property_changed(self, _path: str, key: str, value: Any) -> None: + if key == "Powered": + if value and not self.current_state: +-- +2.31.1 + diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.1.1.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.1.1.bb deleted file mode 100644 index 36de2af1d6..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman_2.1.1.bb +++ /dev/null @@ -1,58 +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 = " \ - https://github.com/blueman-project/blueman/releases/download/${PV}/blueman-${PV}.tar.xz \ - file://0001-Search-for-cython3.patch \ -" -SRC_URI[md5sum] = "9de89abb31be45bdbf11f7884764a2dc" -SRC_URI[sha256sum] = "f1eab2334e5a1587defa80900901048d14c2e8ffa8c0cff7240bc9937a61dbc3" - -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-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/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb new file mode 100644 index 0000000000..0374d23f0c --- /dev/null +++ b/meta-networking/recipes-connectivity/blueman/blueman_2.3.5.bb @@ -0,0 +1,88 @@ +DESCRIPTION = "Blueman is a GTK+ Bluetooth Manager" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" + +DEPENDS = "gtk+3 glib-2.0 bluez5 python3-pygobject python3-cython-native" + +inherit meson gettext systemd gsettings pkgconfig python3native gtk-icon-cache useradd features_check + +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" + +SRC_URI = " \ + git://github.com/blueman-project/blueman.git;protocol=https;branch=2-3-stable \ + file://0001-Search-for-cython3.patch \ + file://0002-fix-fail-to-enable-bluetooth.patch \ + file://0001-meson-add-pythoninstalldir-option.patch \ +" +S = "${WORKDIR}/git" +SRCREV = "c85e7afb8d6547d4c35b7b639124de8e999c3650" + +EXTRA_OEMESON = "-Druntime_deps_check=false -Dpythoninstalldir=${@noprefix('PYTHON_SITEPACKAGES_DIR', d)}" + +SYSTEMD_SERVICE:${PN} = "${BPN}-mechanism.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" + +RRECOMMENDS:${PN} += "adwaita-icon-theme" +RDEPENDS:${PN} += " \ + python3-core \ + python3-ctypes \ + python3-dbus \ + python3-pygobject \ + python3-terminal \ + python3-fcntl \ + packagegroup-tools-bluetooth \ +" + +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'polkit pulseaudio ', d)} \ + thunar \ +" +PACKAGECONFIG[thunar] = "-Dthunar-sendto=true,-Dthunar-sendto=false" +PACKAGECONFIG[pulseaudio] = "-Dpulseaudio=true,-Dpulseaudio=false" +PACKAGECONFIG[polkit] = "-Dpolicykit=true,-Dpolicykit=false" + +FILES:${PN} += " \ + ${datadir} \ + ${systemd_user_unitdir} \ + ${PYTHON_SITEPACKAGES_DIR} \ +" + +# 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-adapters \ + ${D}${bindir}/blueman-applet \ + ${D}${bindir}/blueman-manager \ + ${D}${bindir}/blueman-sendto \ + ${D}${bindir}/blueman-services \ + ${D}${bindir}/blueman-tray +} + +do_install:append() { + install -d ${D}${datadir}/polkit-1/rules.d + cat >${D}${datadir}/polkit-1/rules.d/51-blueman.rules <<EOF +/* Allow users in wheel group to use blueman feature requiring root without authentication */ +polkit.addRule(function(action, subject) { + if ((action.id == "org.blueman.network.setup" || + action.id == "org.blueman.dhcp.client" || + action.id == "org.blueman.rfkill.setstate" || + action.id == "org.blueman.pppd.pppconnect") && + subject.isInGroup("wheel")) { + + return polkit.Result.YES; + } +}); +EOF +} + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --user-group --home-dir ${sysconfdir}/polkit-1 --shell /bin/nologin polkitd" + +do_install:append() { + # Fix up permissions on polkit rules.d to work with rpm4 constraints + chmod 700 ${D}/${datadir}/polkit-1/rules.d + chown polkitd:root ${D}/${datadir}/polkit-1/rules.d +} diff --git a/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch b/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch new file mode 100644 index 0000000000..93b367a77b --- /dev/null +++ b/meta-networking/recipes-connectivity/bluepy/bluepy/0001-bluepy-Fix-username-issue-with-tarballs.patch @@ -0,0 +1,32 @@ +From 318a0e7dfaa0f5f233a20c0b347948c8004cf6af Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 20 Oct 2021 14:02:09 -0700 +Subject: [PATCH] bluepy: Fix username issue with tarballs + +Fixes +Cannot change ownership to uid 1000, gid 1000: Operation not permitted + +Upstream-Status: Submitted [https://github.com/IanHarvey/bluepy/pull/462] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + bluepy/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/bluepy/Makefile ++++ b/bluepy/Makefile +@@ -30,13 +30,13 @@ bluepy-helper: $(LOCAL_SRCS) $(IMPORT_SR + $(CC) -L. $(CFLAGS) $(CPPFLAGS) -o $@ $(LOCAL_SRCS) $(IMPORT_SRCS) $(LDLIBS) + + $(IMPORT_SRCS): bluez-src.tgz +- tar xzf $< ++ tar xzf $< --no-same-owner + touch $(IMPORT_SRCS) + + .PHONY: bluez-tarfile + + bluez-tarfile: +- (cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH)) ++ (cd ..; tar czf bluepy/bluez-src.tgz $(BLUEZ_PATH) --no-same-owner) + + GET_SERVICES=get_services.py + diff --git a/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb b/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb new file mode 100644 index 0000000000..5b784d9a04 --- /dev/null +++ b/meta-networking/recipes-connectivity/bluepy/bluepy_git.bb @@ -0,0 +1,20 @@ +DESCRIPTION = "Python interface to Bluetooth LE on Linux" +HOMEPAGE = "https://github.com/IanHarvey/bluepy" +SECTION = "devel/python" +LICENSE = "GPL-2.0-only & PD" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=59e0d45ea684dda215889aa1b5acd001" +DEPENDS = "glib-2.0" +SRCREV = "7ad565231a97c304c0eff45f2649cd005e69db09" +PV = "1.3.0+git" + +SRC_URI = "git://github.com/IanHarvey/bluepy.git;protocol=https;branch=master \ + file://0001-bluepy-Fix-username-issue-with-tarballs.patch \ + " + +S = "${WORKDIR}/git" + +inherit setuptools3 pkgconfig + +RDEPENDS:${PN} = "bluez5" + +TARGET_CC_ARCH += "${LDFLAGS}" diff --git a/meta-networking/recipes-connectivity/bluez-tools/bluez-tools/fix-memory-leaks.patch b/meta-networking/recipes-connectivity/bluez-tools/bluez-tools/fix-memory-leaks.patch new file mode 100644 index 0000000000..22e1fac855 --- /dev/null +++ b/meta-networking/recipes-connectivity/bluez-tools/bluez-tools/fix-memory-leaks.patch @@ -0,0 +1,768 @@ +Upstream-Status: Submitted [https://github.com/khvzak/bluez-tools/pull/48] + +From e5db2eec2591f0109f0eb7c2631055210b55f2f5 Mon Sep 17 00:00:00 2001 +Message-Id: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Sat, 7 Nov 2020 01:07:24 -0500 +Subject: [PATCH 1/9] Remove memory leaks and overall restructure + manager_find_adapter + +--- + src/lib/manager.c | 61 +++++++++++++++++++++++++++++++++-------------- + 1 file changed, 43 insertions(+), 18 deletions(-) + +diff --git a/src/lib/manager.c b/src/lib/manager.c +index 5286a3a..2263afc 100644 +--- a/src/lib/manager.c ++++ b/src/lib/manager.c +@@ -136,43 +136,68 @@ const gchar *manager_find_adapter(Manager *self, const gchar *pattern, GError ** + GVariant *ifaces_and_properties; + GVariantIter i; + ++ gchar *pattern_lowercase = g_ascii_strdown(pattern, -1); ++ + g_variant_iter_init(&i, objects); +- while (g_variant_iter_next(&i, "{&o@a{sa{sv}}}", &object_path, &ifaces_and_properties)) ++ gboolean still_looking = TRUE; ++ while (still_looking && g_variant_iter_next(&i, "{&o@a{sa{sv}}}", &object_path, &ifaces_and_properties)) + { + const gchar *interface_name; +- GVariant *properties; + GVariantIter ii; ++ GVariant* properties; + g_variant_iter_init(&ii, ifaces_and_properties); + while (g_variant_iter_next(&ii, "{&s@a{sv}}", &interface_name, &properties)) + { +- if (g_strstr_len(g_ascii_strdown(interface_name, -1), -1, "adapter")) ++ gchar *interface_name_lowercase = g_ascii_strdown(interface_name, -1); ++ if (strstr(interface_name_lowercase, "adapter")) + { +- const gchar *object_base_name = g_path_get_basename(object_path); +- if (g_strstr_len(g_ascii_strdown(object_base_name, -1), -1, g_ascii_strdown(pattern, -1))) ++ g_free(interface_name_lowercase); ++ ++ gchar *object_base_name_original = g_path_get_basename(object_path); ++ gchar *object_base_name = g_ascii_strdown(interface_name, -1); ++ g_free(object_base_name_original); ++ ++ if (strstr(object_base_name, pattern_lowercase)) + { +- const gchar *retVal = g_strdup(object_path); +- g_variant_unref(properties); +- g_variant_unref(ifaces_and_properties); +- g_variant_unref(objects); +- return retVal; ++ still_looking = FALSE; ++ g_free(object_base_name); ++ break; + } +- const gchar *address = g_variant_get_string(g_variant_lookup_value(properties, "Address", NULL), NULL); +- if (g_strstr_len(g_ascii_strdown(address, -1), -1, g_ascii_strdown(pattern, -1))) ++ ++ g_free(object_base_name); ++ ++ const gchar *address_original = g_variant_get_string(g_variant_lookup_value(properties, "Address", NULL), NULL); ++ gchar *address = g_ascii_strdown(address_original, -1); ++ ++ if (strstr(address, pattern_lowercase)) + { +- gchar *retVal = g_strdup(object_path); +- g_variant_unref(properties); +- g_variant_unref(ifaces_and_properties); +- g_variant_unref(objects); +- return retVal; ++ still_looking = FALSE; ++ g_free(address); ++ break; + } ++ g_free(address); + } ++ else ++ { ++ g_free(interface_name_lowercase); ++ } ++ + g_variant_unref(properties); + } ++ + g_variant_unref(ifaces_and_properties); + } + g_variant_unref(objects); ++ g_free(pattern_lowercase); + +- return NULL; ++ if (still_looking) ++ { ++ return NULL; ++ } ++ else ++ { ++ return object_path; ++ } + } + + GPtrArray *manager_get_adapters(Manager *self) +-- +2.34.1 + + +From 163fcc94f1bc7c8f238e78adb03af914a566d979 Mon Sep 17 00:00:00 2001 +Message-Id: <163fcc94f1bc7c8f238e78adb03af914a566d979.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Sat, 7 Nov 2020 22:12:21 -0500 +Subject: [PATCH 2/9] Replace manager_default_adapter with + manager_find_adapter(..., NULL, ...) + +--- + src/lib/helpers.c | 57 ++++++++++++++++++----------------------------- + src/lib/manager.c | 51 +++++++++--------------------------------- + src/lib/manager.h | 1 - + 3 files changed, 33 insertions(+), 76 deletions(-) + +diff --git a/src/lib/helpers.c b/src/lib/helpers.c +index d7e95f9..99561b5 100644 +--- a/src/lib/helpers.c ++++ b/src/lib/helpers.c +@@ -159,52 +159,39 @@ Adapter *find_adapter(const gchar *name, GError **error) + + Manager *manager = g_object_new(MANAGER_TYPE, NULL); + +- // If name is null or empty - return default adapter +- if (name == NULL || strlen(name) == 0) ++ // Try to find by id ++ adapter_path = (gchar *) manager_find_adapter(manager, name, error); ++ ++ // Found ++ if (adapter_path) + { +- adapter_path = (gchar *) manager_default_adapter(manager, error); +- if (adapter_path) +- { +- // adapter = g_object_new(ADAPTER_TYPE, "DBusObjectPath", adapter_path, NULL); +- adapter = adapter_new(adapter_path); +- } ++ // adapter = g_object_new(ADAPTER_TYPE, "DBusObjectPath", adapter_path, NULL); ++ adapter = adapter_new(adapter_path); + } + else + { +- // Try to find by id +- adapter_path = (gchar *) manager_find_adapter(manager, name, error); +- +- // Found +- if (adapter_path) ++ // Try to find by name ++ const GPtrArray *adapters_list = manager_get_adapters(manager); ++ g_assert(adapters_list != NULL); ++ for (int i = 0; i < adapters_list->len; i++) + { ++ adapter_path = g_ptr_array_index(adapters_list, i); + // adapter = g_object_new(ADAPTER_TYPE, "DBusObjectPath", adapter_path, NULL); + adapter = adapter_new(adapter_path); +- } +- else +- { +- // Try to find by name +- const GPtrArray *adapters_list = manager_get_adapters(manager); +- g_assert(adapters_list != NULL); +- for (int i = 0; i < adapters_list->len; i++) ++ adapter_path = NULL; ++ ++ if (g_strcmp0(name, adapter_get_name(adapter, error)) == 0) + { +- adapter_path = g_ptr_array_index(adapters_list, i); +- // adapter = g_object_new(ADAPTER_TYPE, "DBusObjectPath", adapter_path, NULL); +- adapter = adapter_new(adapter_path); +- adapter_path = NULL; +- +- if (g_strcmp0(name, adapter_get_name(adapter, error)) == 0) ++ if (*error) + { +- if (error) +- { +- g_error_free(*error); +- *error = NULL; +- } +- break; ++ g_error_free(*error); ++ *error = NULL; + } +- +- g_object_unref(adapter); +- adapter = NULL; ++ break; + } ++ ++ g_object_unref(adapter); ++ adapter = NULL; + } + } + +diff --git a/src/lib/manager.c b/src/lib/manager.c +index 2263afc..891fc45 100644 +--- a/src/lib/manager.c ++++ b/src/lib/manager.c +@@ -84,45 +84,6 @@ GVariant *manager_get_managed_objects(Manager *self, GError **error) + return retVal; + } + +-const gchar *manager_default_adapter(Manager *self, GError **error) +-{ +- g_assert(MANAGER_IS(self)); +- +- GVariant *objects = NULL; +- objects = manager_get_managed_objects(self, error); +- if (objects == NULL) +- return NULL; +- +- const gchar *object_path; +- GVariant *ifaces_and_properties; +- GVariantIter i; +- +- g_variant_iter_init(&i, objects); +- while (g_variant_iter_next(&i, "{&o@a{sa{sv}}}", &object_path, &ifaces_and_properties)) +- { +- const gchar *interface_name; +- GVariant *properties; +- GVariantIter ii; +- g_variant_iter_init(&ii, ifaces_and_properties); +- while (g_variant_iter_next(&ii, "{&s@a{sv}}", &interface_name, &properties)) +- { +- if (g_strstr_len(g_ascii_strdown(interface_name, -1), -1, "adapter")) +- { +- const gchar *retVal = g_strdup(object_path); +- g_variant_unref(properties); +- g_variant_unref(ifaces_and_properties); +- g_variant_unref(objects); +- return retVal; +- } +- g_variant_unref(properties); +- } +- g_variant_unref(ifaces_and_properties); +- } +- g_variant_unref(objects); +- +- return NULL; +-} +- + const gchar *manager_find_adapter(Manager *self, const gchar *pattern, GError **error) + { + g_assert(MANAGER_IS(self)); +@@ -136,7 +97,11 @@ const gchar *manager_find_adapter(Manager *self, const gchar *pattern, GError ** + GVariant *ifaces_and_properties; + GVariantIter i; + +- gchar *pattern_lowercase = g_ascii_strdown(pattern, -1); ++ gchar *pattern_lowercase = NULL; ++ if (pattern != NULL) ++ { ++ pattern_lowercase = g_ascii_strdown(pattern, -1); ++ } + + g_variant_iter_init(&i, objects); + gboolean still_looking = TRUE; +@@ -153,6 +118,12 @@ const gchar *manager_find_adapter(Manager *self, const gchar *pattern, GError ** + { + g_free(interface_name_lowercase); + ++ if (!pattern_lowercase) ++ { ++ still_looking = FALSE; ++ break; ++ } ++ + gchar *object_base_name_original = g_path_get_basename(object_path); + gchar *object_base_name = g_ascii_strdown(interface_name, -1); + g_free(object_base_name_original); +diff --git a/src/lib/manager.h b/src/lib/manager.h +index 0c9e052..b651812 100644 +--- a/src/lib/manager.h ++++ b/src/lib/manager.h +@@ -54,7 +54,6 @@ extern "C" { + * Method definitions. + */ + GVariant *manager_get_managed_objects(Manager *self, GError **error); +- const gchar *manager_default_adapter(Manager *self, GError **error); + const gchar *manager_find_adapter(Manager *self, const gchar *pattern, GError **error); + GPtrArray *manager_get_adapters(Manager *self); + const gchar **manager_get_devices(Manager *self, const gchar *adapter_pattern); +-- +2.34.1 + + +From b463d9cfc2390ca6352c16e6f6e113cf42d0f688 Mon Sep 17 00:00:00 2001 +Message-Id: <b463d9cfc2390ca6352c16e6f6e113cf42d0f688.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Sat, 7 Nov 2020 23:38:42 -0500 +Subject: [PATCH 3/9] Fix remaining g_ascii_strdown leaks + +--- + src/lib/helpers.c | 2 +- + src/lib/manager.c | 5 ++++- + src/lib/properties.c | 4 ++-- + 3 files changed, 7 insertions(+), 4 deletions(-) + +diff --git a/src/lib/helpers.c b/src/lib/helpers.c +index 99561b5..b61bc07 100644 +--- a/src/lib/helpers.c ++++ b/src/lib/helpers.c +@@ -242,7 +242,7 @@ Device *find_device(Adapter *adapter, const gchar *name, GError **error) + + if(g_variant_lookup(properties, "Address", "s", &address)) + { +- if(g_strcmp0(g_ascii_strdown(address, -1), g_ascii_strdown(name, -1)) == 0) ++ if(name && address && g_ascii_strcasecmp(address, name) == 0) + { + device = device_new(object_path); + } +diff --git a/src/lib/manager.c b/src/lib/manager.c +index 891fc45..d506ae6 100644 +--- a/src/lib/manager.c ++++ b/src/lib/manager.c +@@ -200,8 +200,11 @@ GPtrArray *manager_get_adapters(Manager *self) + g_variant_iter_init(&ii, ifaces_and_properties); + while (g_variant_iter_next(&ii, "{&s@a{sv}}", &interface_name, &properties)) + { +- if (g_strstr_len(g_ascii_strdown(interface_name, -1), -1, "adapter")) ++ char* interface_name_lowercase = g_ascii_strdown(interface_name, -1); ++ if (strstr(interface_name_lowercase, "adapter")) + g_ptr_array_add(adapter_array, (gpointer) g_strdup(object_path)); ++ ++ g_free(interface_name_lowercase); + g_variant_unref(properties); + } + g_variant_unref(ifaces_and_properties); +diff --git a/src/lib/properties.c b/src/lib/properties.c +index 8b913d5..70a7640 100644 +--- a/src/lib/properties.c ++++ b/src/lib/properties.c +@@ -205,12 +205,12 @@ static void _properties_create_gdbus_proxy(Properties *self, GError **error) + { + if(self->priv->dbus_type && self->priv->dbus_service_name && self->priv->dbus_object_path) + { +- if(g_ascii_strcasecmp(g_ascii_strdown(self->priv->dbus_type, -1), "system") == 0) ++ if(g_ascii_strcasecmp(self->priv->dbus_type, "system") == 0) + { + g_assert(system_conn != NULL); + self->priv->proxy = g_dbus_proxy_new_sync(system_conn, G_DBUS_PROXY_FLAGS_NONE, NULL, self->priv->dbus_service_name, self->priv->dbus_object_path, PROPERTIES_DBUS_INTERFACE, NULL, error); + } +- else if(g_ascii_strcasecmp(g_ascii_strdown(self->priv->dbus_type, -1), "session") == 0) ++ else if(g_ascii_strcasecmp(self->priv->dbus_type, "session") == 0) + { + g_assert(session_conn != NULL); + self->priv->proxy = g_dbus_proxy_new_sync(session_conn, G_DBUS_PROXY_FLAGS_NONE, NULL, self->priv->dbus_service_name, self->priv->dbus_object_path, PROPERTIES_DBUS_INTERFACE, NULL, error); +-- +2.34.1 + + +From 7ca191164a3a3d8867b1a4af7cd349dc53569fa3 Mon Sep 17 00:00:00 2001 +Message-Id: <7ca191164a3a3d8867b1a4af7cd349dc53569fa3.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Sun, 8 Nov 2020 14:04:36 -0500 +Subject: [PATCH 4/9] Don't leak g_variant_lookup_value results in bt-obex + +--- + src/bt-obex.c | 23 ++++++++++++++++------- + 1 file changed, 16 insertions(+), 7 deletions(-) + +diff --git a/src/bt-obex.c b/src/bt-obex.c +index 8aacb40..0f044a5 100644 +--- a/src/bt-obex.c ++++ b/src/bt-obex.c +@@ -213,15 +213,24 @@ static void _obex_opp_client_object_manager_handler(GDBusConnection *connection, + g_hash_table_insert(_transfers, g_strdup(interface_object_path), t); + + ObexTransferInfo *info = g_malloc0(sizeof(ObexTransferInfo)); +- info->filesize = g_variant_get_uint64(g_variant_lookup_value(properties, "Size", NULL)); +- info->filename = g_strdup(g_variant_get_string(g_variant_lookup_value(properties, "Name", NULL), NULL)); +- info->status = g_strdup(g_variant_get_string(g_variant_lookup_value(properties, "Status", NULL), NULL)); +- ObexSession *session = obex_session_new(g_variant_get_string(g_variant_lookup_value(properties, "Session", NULL), NULL)); +- ++ ++ GVariant* size_variant = g_variant_lookup_value(properties, "Size", NULL); ++ GVariant* name_variant = g_variant_lookup_value(properties, "Name", NULL); ++ GVariant* status_variant = g_variant_lookup_value(properties, "Status", NULL); ++ GVariant* session_variant = g_variant_lookup_value(properties, "Session", NULL); ++ ++ info->filesize = g_variant_get_uint64(size_variant); ++ info->filename = g_variant_dup_string(name_variant, NULL); ++ info->status = g_variant_dup_string(status_variant, NULL); ++ ObexSession *session = obex_session_new(g_variant_get_string(session_variant, NULL)); + info->obex_root = g_strdup(obex_session_get_root(session, NULL)); +- ++ ++ g_variant_unref(size_variant); ++ g_variant_unref(name_variant); ++ g_variant_unref(status_variant); ++ g_variant_unref(session_variant); + g_object_unref(session); +- ++ + g_hash_table_insert(_transfer_infos, g_strdup(interface_object_path), info); + if(g_strcmp0(info->status, "queued") == 0) + g_print("[Transfer#%s] Waiting...\n", info->filename); +-- +2.34.1 + + +From 7100380b710b36f8e31748ac5bf0e6ffb7c4eed7 Mon Sep 17 00:00:00 2001 +Message-Id: <7100380b710b36f8e31748ac5bf0e6ffb7c4eed7.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Thu, 12 Nov 2020 21:41:55 -0500 +Subject: [PATCH 5/9] Correctly free temporary values in bt-obex + +--- + src/bt-obex.c | 35 +++++++++++++++++++++++++---------- + src/lib/helpers.c | 3 ++- + 2 files changed, 27 insertions(+), 11 deletions(-) + +diff --git a/src/bt-obex.c b/src/bt-obex.c +index 0f044a5..547186b 100644 +--- a/src/bt-obex.c ++++ b/src/bt-obex.c +@@ -70,25 +70,32 @@ static void _obex_server_object_manager_handler(GDBusConnection *connection, con + const gchar *interface_object_path = g_variant_get_string(g_variant_get_child_value(parameters, 0), NULL); + GVariant *interfaces_and_properties = g_variant_get_child_value(parameters, 1); + GVariant *properties = NULL; +- ++ + if(g_variant_lookup(interfaces_and_properties, OBEX_TRANSFER_DBUS_INTERFACE, "@a{sv}", &properties)) + { + g_print("[OBEX Server] Transfer started\n"); + ObexTransfer *t = obex_transfer_new(interface_object_path); + g_hash_table_insert(_transfers, g_strdup(interface_object_path), t); +- ++ ++ GVariant* size_variant = g_variant_lookup_value(properties, "Size", NULL); ++ GVariant* status_variant = g_variant_lookup_value(properties, "Status", NULL); ++ GVariant* session_variant = g_variant_lookup_value(properties, "Session", NULL); ++ + ObexTransferInfo *info = g_malloc0(sizeof(ObexTransferInfo)); +- info->filesize = g_variant_get_uint64(g_variant_lookup_value(properties, "Size", NULL)); +- info->status = g_strdup(g_variant_get_string(g_variant_lookup_value(properties, "Status", NULL), NULL)); +- ObexSession *session = obex_session_new(g_variant_get_string(g_variant_lookup_value(properties, "Session", NULL), NULL)); +- ++ info->filesize = g_variant_get_uint64(size_variant); ++ info->status = g_strdup(g_variant_get_string(status_variant, NULL)); ++ ++ ObexSession *session = obex_session_new(g_variant_get_string(session_variant, NULL)); + info->obex_root = g_strdup(obex_session_get_root(session, NULL)); +- + g_object_unref(session); ++ ++ g_variant_unref(size_variant); ++ g_variant_unref(status_variant); ++ g_variant_unref(session_variant); + + g_hash_table_insert(_transfer_infos, g_strdup(interface_object_path), info); + } +- ++ + if(g_variant_lookup(interfaces_and_properties, OBEX_SESSION_DBUS_INTERFACE, "@a{sv}", &properties)) + { + g_print("[OBEX Server] OBEX session opened\n"); +@@ -177,7 +184,12 @@ static void _obex_server_properties_handler(GDBusConnection *connection, const g + { + g_print("[OBEX Server] Transfer succeeded\n"); + ObexTransferInfo *info = g_hash_table_lookup(_transfer_infos, object_path); +- g_rename(g_build_filename(info->obex_root, info->filename, NULL), g_build_filename(_root_path, info->filename, NULL)); ++ ++ gchar* old_name = g_build_filename(info->obex_root, info->filename, NULL); ++ gchar* new_name = g_build_filename(_root_path, info->filename, NULL); ++ g_rename(old_name, new_name); ++ g_free(old_name); ++ g_free(new_name); + } + else if(g_strcmp0(status, "error") == 0) + { +@@ -202,7 +214,8 @@ static void _obex_opp_client_object_manager_handler(GDBusConnection *connection, + { + if(g_strcmp0(signal_name, "InterfacesAdded") == 0) + { +- const gchar *interface_object_path = g_variant_get_string(g_variant_get_child_value(parameters, 0), NULL); ++ GVariant* interface_value = g_variant_get_child_value(parameters, 0); ++ const gchar *interface_object_path = g_variant_get_string(interface_value, NULL); + GVariant *interfaces_and_properties = g_variant_get_child_value(parameters, 1); + GVariant *properties = NULL; + +@@ -242,6 +255,8 @@ static void _obex_opp_client_object_manager_handler(GDBusConnection *connection, + } + + g_variant_unref(interfaces_and_properties); ++ g_variant_unref(interface_value); ++ + if(properties) + g_variant_unref(properties); + } +diff --git a/src/lib/helpers.c b/src/lib/helpers.c +index b61bc07..d9e2257 100644 +--- a/src/lib/helpers.c ++++ b/src/lib/helpers.c +@@ -171,7 +171,7 @@ Adapter *find_adapter(const gchar *name, GError **error) + else + { + // Try to find by name +- const GPtrArray *adapters_list = manager_get_adapters(manager); ++ GPtrArray *adapters_list = manager_get_adapters(manager); + g_assert(adapters_list != NULL); + for (int i = 0; i < adapters_list->len; i++) + { +@@ -193,6 +193,7 @@ Adapter *find_adapter(const gchar *name, GError **error) + g_object_unref(adapter); + adapter = NULL; + } ++ g_ptr_array_unref(adapters_list); + } + + g_object_unref(manager); +-- +2.34.1 + + +From 860fb6e19a7bc272722c36a980004044bc9906e5 Mon Sep 17 00:00:00 2001 +Message-Id: <860fb6e19a7bc272722c36a980004044bc9906e5.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Thu, 12 Nov 2020 21:45:51 -0500 +Subject: [PATCH 6/9] Use g_hash_table_new_full() instead of manual freeing + +--- + src/bt-obex.c | 56 +++++++++++++++++---------------------------------- + 1 file changed, 18 insertions(+), 38 deletions(-) + +diff --git a/src/bt-obex.c b/src/bt-obex.c +index 547186b..413c12d 100644 +--- a/src/bt-obex.c ++++ b/src/bt-obex.c +@@ -55,6 +55,14 @@ struct _ObexTransferInfo { + gchar *status; + }; + ++static void obex_transfer_info_free(ObexTransferInfo* info) ++{ ++ g_free(info->filename); ++ g_free(info->obex_root); ++ g_free(info->status); ++ g_free(info); ++} ++ + static void sigterm_handler(int sig) + { + g_message("%s received", sig == SIGTERM ? "SIGTERM" : "SIGINT"); +@@ -117,10 +125,7 @@ static void _obex_server_object_manager_handler(GDBusConnection *connection, con + if(g_strcmp0(*inf, OBEX_TRANSFER_DBUS_INTERFACE) == 0) + { + g_print("[OBEX Server] OBEX transfer closed\n"); +- ObexTransfer *transfer = g_hash_table_lookup(_transfers, interface_object_path); + g_hash_table_remove(_transfers, interface_object_path); +- g_object_unref(transfer); +- g_free(g_hash_table_lookup(_transfer_infos, interface_object_path)); + g_hash_table_remove(_transfer_infos, interface_object_path); + } + +@@ -272,10 +277,7 @@ static void _obex_opp_client_object_manager_handler(GDBusConnection *connection, + if(g_strcmp0(*inf, OBEX_TRANSFER_DBUS_INTERFACE) == 0) + { + // g_print("[OBEX Client] OBEX transfer closed\n"); +- ObexTransfer *transfer = g_hash_table_lookup(_transfers, interface_object_path); + g_hash_table_remove(_transfers, interface_object_path); +- g_object_unref(transfer); +- g_free(g_hash_table_lookup(_transfer_infos, interface_object_path)); + g_hash_table_remove(_transfer_infos, interface_object_path); + if (g_main_loop_is_running(mainloop)) + g_main_loop_quit(mainloop); +@@ -514,8 +516,8 @@ int main(int argc, char *argv[]) + exit_if_error(error); + } + +- _transfers = g_hash_table_new(g_str_hash, g_str_equal); +- _transfer_infos = g_hash_table_new(g_str_hash, g_str_equal); ++ _transfers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref); ++ _transfer_infos = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)obex_transfer_info_free); + + ObexAgentManager *manager = obex_agent_manager_new(); + +@@ -552,21 +554,10 @@ int main(int argc, char *argv[]) + g_hash_table_iter_init(&iter, _transfers); + while (g_hash_table_iter_next(&iter, &key, &value)) + { +- ObexTransfer *t = OBEX_TRANSFER(value); +- obex_transfer_cancel(t, NULL); // skip errors +- g_object_unref(t); +- g_hash_table_iter_remove(&iter); +- } +- g_hash_table_unref(_transfers); +- +- // Remove transfer information +- g_hash_table_iter_init(&iter, _transfer_infos); +- while (g_hash_table_iter_next(&iter, &key, &value)) +- { +- g_free(value); +- g_hash_table_iter_remove(&iter); ++ obex_transfer_cancel(OBEX_TRANSFER(value), NULL); + } + g_hash_table_unref(_transfers); ++ g_hash_table_unref(_transfer_infos); + + g_dbus_connection_signal_unsubscribe(session_conn, obex_server_object_id); + g_dbus_connection_signal_unsubscribe(session_conn, obex_server_properties_id); +@@ -588,8 +579,8 @@ int main(int argc, char *argv[]) + exit_if_error(error); + } + +- _transfers = g_hash_table_new(g_str_hash, g_str_equal); +- _transfer_infos = g_hash_table_new(g_str_hash, g_str_equal); ++ _transfers = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_object_unref); ++ _transfer_infos = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free); + + gchar * files_to_send[] = {NULL, NULL}; + files_to_send[0] = g_path_is_absolute(opp_file_arg) ? g_strdup(opp_file_arg) : get_absolute_path(opp_file_arg); +@@ -663,24 +654,13 @@ int main(int argc, char *argv[]) + g_hash_table_iter_init(&iter, _transfers); + while (g_hash_table_iter_next(&iter, &key, &value)) + { +- ObexTransfer *t = OBEX_TRANSFER(value); +- obex_transfer_cancel(t, NULL); // skip errors +- g_object_unref(t); +- g_hash_table_iter_remove(&iter); ++ obex_transfer_cancel(OBEX_TRANSFER(value), NULL); + } + g_hash_table_unref(_transfers); +- +- // Remove transfer information objects +- g_hash_table_iter_init(&iter, _transfer_infos); +- while (g_hash_table_iter_next(&iter, &key, &value)) +- { +- g_free(value); +- g_hash_table_iter_remove(&iter); +- } +- g_hash_table_unref(_transfers); +- +- g_object_unref(client); + ++ g_hash_table_unref(_transfer_infos); ++ g_object_unref(client); ++ g_object_unref(session); + g_variant_unref(device_dict); + + g_free(src_address); +-- +2.34.1 + + +From 9804eb7e5996c52cc542eef59ba3b5f4d0b0b2f9 Mon Sep 17 00:00:00 2001 +Message-Id: <9804eb7e5996c52cc542eef59ba3b5f4d0b0b2f9.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Thu, 12 Nov 2020 21:51:34 -0500 +Subject: [PATCH 7/9] Don't set filesize if we don't know the size + +I only meant to fix the g_variant_unref warning, but fixing all of them +works too! +--- + src/bt-obex.c | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/src/bt-obex.c b/src/bt-obex.c +index 413c12d..219d458 100644 +--- a/src/bt-obex.c ++++ b/src/bt-obex.c +@@ -90,14 +90,22 @@ static void _obex_server_object_manager_handler(GDBusConnection *connection, con + GVariant* session_variant = g_variant_lookup_value(properties, "Session", NULL); + + ObexTransferInfo *info = g_malloc0(sizeof(ObexTransferInfo)); +- info->filesize = g_variant_get_uint64(size_variant); + info->status = g_strdup(g_variant_get_string(status_variant, NULL)); + + ObexSession *session = obex_session_new(g_variant_get_string(session_variant, NULL)); + info->obex_root = g_strdup(obex_session_get_root(session, NULL)); + g_object_unref(session); + +- g_variant_unref(size_variant); ++ if (size_variant != NULL) ++ { ++ info->filesize = g_variant_get_uint64(size_variant); ++ g_variant_unref(size_variant); ++ } ++ else ++ { ++ info->filesize = 0; ++ } ++ + g_variant_unref(status_variant); + g_variant_unref(session_variant); + +-- +2.34.1 + + +From 9566f84464d486983ec597945bc4d5d1594ed830 Mon Sep 17 00:00:00 2001 +Message-Id: <9566f84464d486983ec597945bc4d5d1594ed830.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Sun, 15 Nov 2020 16:18:36 -0500 +Subject: [PATCH 8/9] Fix a use-after-free in bt-obex + +--- + src/bt-obex.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bt-obex.c b/src/bt-obex.c +index 219d458..7dc5d6b 100644 +--- a/src/bt-obex.c ++++ b/src/bt-obex.c +@@ -626,7 +626,7 @@ int main(int argc, char *argv[]) + mainloop = g_main_loop_new(NULL, FALSE); + + ObexClient *client = obex_client_new(); +- const gchar *session_path = obex_client_create_session(client, dst_address, device_dict, &error); ++ const gchar *session_path = obex_client_create_session(client, dst_address, g_variant_ref(device_dict), &error); + exit_if_error(error); + ObexSession *session = obex_session_new(session_path); + ObexObjectPush *oop = obex_object_push_new(obex_session_get_dbus_object_path(session)); +-- +2.34.1 + + +From 5271a4c6419b54a0b18070d39bfc69fae2819c00 Mon Sep 17 00:00:00 2001 +Message-Id: <5271a4c6419b54a0b18070d39bfc69fae2819c00.1710791277.git.joerg.sommer@navimatix.de> +In-Reply-To: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +References: <e5db2eec2591f0109f0eb7c2631055210b55f2f5.1710791277.git.joerg.sommer@navimatix.de> +From: thatlittlegit <personal@thatlittlegit.tk> +Date: Sat, 21 Nov 2020 13:09:46 -0500 +Subject: [PATCH 9/9] Fix running sdptool if it isn't in $PATH + +--- + src/bt-device.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/bt-device.c b/src/bt-device.c +index a739b98..948a10c 100644 +--- a/src/bt-device.c ++++ b/src/bt-device.c +@@ -331,9 +331,9 @@ static GHashTable *_bt_device_sdp_browse(const gchar *device_path, const gchar * + } + + if(pattern == NULL || strlen(pattern) == 0) +- execl("/bin/sdptool", "/bin/sdptool", "browse", "--xml", device_path, (char *) 0); ++ execlp("sdptool", "sdptool", "browse", "--xml", device_path, (char *) 0); + else +- execl("/bin/sdptool", "/bin/sdptool", "browse", "--xml", "--uuid", pattern, device_path, (char *) 0); ++ execlp("sdptool", "sdptool", "browse", "--xml", "--uuid", pattern, device_path, (char *) 0); + + } + if(pid == -1) +-- +2.34.1 + diff --git a/meta-networking/recipes-connectivity/bluez-tools/bluez-tools/obex-file-fix-null-check.patch b/meta-networking/recipes-connectivity/bluez-tools/bluez-tools/obex-file-fix-null-check.patch new file mode 100644 index 0000000000..231f3b0b71 --- /dev/null +++ b/meta-networking/recipes-connectivity/bluez-tools/bluez-tools/obex-file-fix-null-check.patch @@ -0,0 +1,41 @@ +Upstream-Status: Submitted [https://github.com/khvzak/bluez-tools/pull/47] + +From f9bc83d46f131037f7fa5195a506b65560199d0d Mon Sep 17 00:00:00 2001 +Message-Id: <f9bc83d46f131037f7fa5195a506b65560199d0d.1710791715.git.joerg.sommer@navimatix.de> +From: George Talusan <george.talusan@gmail.com> +Date: Mon, 26 Oct 2020 21:35:51 -0400 +Subject: [PATCH] fix null checks + +--- + src/lib/bluez/obex/obex_file_transfer.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/lib/bluez/obex/obex_file_transfer.c b/src/lib/bluez/obex/obex_file_transfer.c +index 2d3dafe..91c41d6 100644 +--- a/src/lib/bluez/obex/obex_file_transfer.c ++++ b/src/lib/bluez/obex/obex_file_transfer.c +@@ -194,7 +194,7 @@ GVariant *obex_file_transfer_get_file(ObexFileTransfer *self, const gchar *targe + g_assert(OBEX_FILE_TRANSFER_IS(self)); + GVariant *ret = NULL; + GVariant *proxy_ret = g_dbus_proxy_call_sync(self->priv->proxy, "GetFile", g_variant_new ("(ss)", targetfile, sourcefile), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); +- if (proxy_ret != NULL) ++ if (proxy_ret == NULL) + return NULL; + ret = g_variant_ref_sink(proxy_ret); + g_variant_unref(proxy_ret); +@@ -228,9 +228,9 @@ GVariant *obex_file_transfer_put_file(ObexFileTransfer *self, const gchar *sourc + g_assert(OBEX_FILE_TRANSFER_IS(self)); + GVariant *ret = NULL; + GVariant *proxy_ret = g_dbus_proxy_call_sync(self->priv->proxy, "PutFile", g_variant_new ("(ss)", targetfile, sourcefile), G_DBUS_CALL_FLAGS_NONE, -1, NULL, error); +- if (proxy_ret != NULL) ++ if (proxy_ret == NULL) + return NULL; + ret = g_variant_ref_sink(proxy_ret); + g_variant_unref(proxy_ret); + return ret; +-} +\ No newline at end of file ++} +-- +2.34.1 + diff --git a/meta-networking/recipes-connectivity/bluez-tools/bluez-tools_git.bb b/meta-networking/recipes-connectivity/bluez-tools/bluez-tools_git.bb new file mode 100644 index 0000000000..22005632c2 --- /dev/null +++ b/meta-networking/recipes-connectivity/bluez-tools/bluez-tools_git.bb @@ -0,0 +1,24 @@ +SUMMARY = "Bluez Tools" +DESCRIPTION = "\ + Additional tools for bluez5 to list, manage, and show inforations about \ + adapters, agents, devices, network connections, and obex. \ +" +HOMEPAGE = "https://github.com/khvzak/bluez-tools" +BUGTRACKER = "https://github.com/khvzak/bluez-tools/issues" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" + +DEPENDS = "dbus-glib glib-2.0 readline" + +SRC_URI = "\ + git://github.com/khvzak/bluez-tools.git;protocol=https;branch=master \ + file://fix-memory-leaks.patch \ + file://obex-file-fix-null-check.patch \ +" +SRCREV = "f65321736475429316f07ee94ec0deac8e46ec4a" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +RDEPENDS:${PN} = "bluez5" diff --git a/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch b/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch new file mode 100644 index 0000000000..71f447c94b --- /dev/null +++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni/0001-include-bits-stdc-.h-only-when-using-libstdc.patch @@ -0,0 +1,37 @@ +From 7aed36765ae44b41ede7e139da0a11b3696f2e06 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 13 Nov 2023 00:07:23 -0800 +Subject: [PATCH] include bits/stdc++.h only when using libstdc++ + +We have other c++ runtime implementations e.g. llvm's libc++ which does +not provide this header bits/stdc++.h, therefore make sure that this +header is only included when using libstdc++ + +Fixes +| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux/cannelloni/1.1.0/git/tcpthread.cpp:27:10: fatal error: 'bits/stdc++.h' file not found +| 27 | #include <bits/stdc++.h> +| | ^~~~~~~~~~~~~~~ + +Upstream-Status: Submitted [https://github.com/mguentner/cannelloni/pull/56] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + tcpthread.cpp | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tcpthread.cpp b/tcpthread.cpp +index a1b3047..bb5a7b2 100644 +--- a/tcpthread.cpp ++++ b/tcpthread.cpp +@@ -24,7 +24,9 @@ + #include <cstdint> + #include <cstdio> + ++#ifdef __GLIBCXX__ + #include <bits/stdc++.h> ++#endif + + #include <linux/can.h> + #include <string.h> +-- +2.42.1 + diff --git a/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb index df75e6342e..dfa7437ba8 100644 --- a/meta-networking/recipes-connectivity/cannelloni/cannelloni_git.bb +++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb @@ -1,11 +1,11 @@ SUMMARY = "a SocketCAN over Ethernet tunnel" HOMEPAGE = "https://github.com/mguentner/cannelloni" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" -SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https" -SRCREV = "44080bb021d1a143e6906f2ec4610513c4e1cece" - -PV = "20160414+${SRCPV}" +SRC_URI = "git://github.com/mguentner/cannelloni.git;protocol=https;branch=master \ + file://0001-include-bits-stdc-.h-only-when-using-libstdc.patch \ + " +SRCREV = "3d4fb8c8b07f6d7c62b2bdad7e5a94de61c9a29b" LIC_FILES_CHKSUM = "file://gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" diff --git a/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb b/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb index c8fe24c637..f5a699d5be 100644 --- a/meta-networking/recipes-connectivity/civetweb/civetweb_git.bb +++ b/meta-networking/recipes-connectivity/civetweb/civetweb_1.16.bb @@ -2,11 +2,11 @@ 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=ce6ce6eb1b2fd59ee6bab219470442a3" -SRCREV = "ce8f6d38a60eb16c996afee1e5340f76ef4d0923" -PV = "1.11+git${SRCPV}" -SRC_URI = "git://github.com/civetweb/civetweb.git \ +SRCREV = "d7ba35bbb649209c66e582d5a0244ba988a15159" + +SRC_URI = "git://github.com/civetweb/civetweb.git;branch=master;protocol=https \ file://0001-Unittest-Link-librt-and-libm-using-l-option.patch \ " @@ -23,6 +23,7 @@ EXTRA_OECMAKE = " \ -DCIVETWEB_ENABLE_LUA=OFF \ -DCIVETWEB_ENABLE_ASAN=OFF \ -DCIVETWEB_BUILD_TESTING=OFF \ + -DCIVETWEB_SSL_OPENSSL_API_3_0=ON \ " # Building with ninja fails on missing third_party/lib/libcheck.a (which @@ -39,4 +40,9 @@ PACKAGECONFIG[server] = "-DCIVETWEB_ENABLE_SERVER_EXECUTABLE=ON -DCIVETWEB_INSTA 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," +do_install:append() { + sed -i -e 's|${RECIPE_SYSROOT_NATIVE}||g' \ + -e 's|${RECIPE_SYSROOT}||g' ${D}${libdir}/cmake/civetweb/civetweb-targets.cmake +} + BBCLASSEXTEND = "native" diff --git a/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch b/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch deleted file mode 100644 index 16800d5066..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/0001-Makefile-respect-LDFLAGS-for-libreg.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 1e1a78b7b4fa1662b4447aa19c15b1e839b7e9db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= <s.mueller-klieser@phytec.de> -Date: Wed, 24 Aug 2016 10:58:45 +0200 -Subject: [PATCH] Makefile: respect LDFLAGS for libreg -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Signed-off-by: Stefan Müller-Klieser <s.mueller-klieser@phytec.de> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 2879896..1650db8 100644 ---- a/Makefile -+++ b/Makefile -@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) - - $(LIBREG): regdb.h reglib.h reglib.c - $(NQ) ' CC ' $@ -- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS) -+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LDFLAGS) $(LIBREGLDLIBS) - - install-libreg-headers: - $(NQ) ' INSTALL libreg-headers' --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch b/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch deleted file mode 100644 index 3ef35ee549..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/do-not-run-ldconfig-if-destdir-is-set.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Ben Hutchings <ben@decadent.org.uk> -Date: Sat, 23 Aug 2014 12:27:34 -0700 -Subject: crda: Do not run ldconfig if DESTDIR is set - -Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126028.html] - -Signed-off-by: Ben Hutchings <ben@decadent.org.uk> -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> - ---- a/Makefile -+++ b/Makefile -@@ -132,7 +132,9 @@ install-libreg: - $(NQ) ' INSTALL libreg' - $(Q)mkdir -p $(DESTDIR)/$(LIBDIR) - $(Q)cp $(LIBREG) $(DESTDIR)/$(LIBDIR)/ -+ifndef DESTDIR - $(Q)ldconfig -+endif - - %.o: %.c regdb.h $(LIBREG) - $(NQ) ' CC ' $@ diff --git a/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch b/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch deleted file mode 100644 index 747804d345..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/fix-gcc-6-unused-variables.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- crda-3.18/utils/key2pub.py.orig 2016-06-18 09:54:23.671326113 -0400 -+++ crda-3.18/utils/key2pub.py 2016-06-18 09:54:34.387326300 -0400 -@@ -115,7 +115,7 @@ - .n = _n, .len_n = sizeof(_n), \ - } - --static const struct key_params keys[] = { -+static const struct key_params keys[] __attribute__((unused))= { - ''') - for n in xrange(n + 1): - output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) diff --git a/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch b/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch deleted file mode 100644 index 1bb5c638f0..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/fix-issues-when-USE_OPENSSL-1.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 8d2164a090f17286ea8291f30a123595cf447dc3 Mon Sep 17 00:00:00 2001 -From: Haiqing Bai <Haiqing.Bai@windriver.com> -Date: Wed, 30 Nov 2016 10:27:36 +0800 -Subject: [PATCH] crda: fix issues when 'USE_OPENSSL=1'. - -Fxed the below issues if configured with 'USE_OPENSSL=1': -a. keys-ssl.c uses BN_ULONG but doesn't include the openssl headers leading - to build failures: - keys-ssl.c:2:8: error: unknown type name 'BN_ULONG' - static BN_ULONG e_0[1] = { - -b. The large unqualified constants also break building: - keys-ssl.c:8:2: warning: overflow in implicit constant conversion [-Woverflow] - 0x63a2705416a0d8e1, 0xdc9fca11c8ba757b, - -c. keys-ssl.c: error: 'keys' defined but not used [-Werror=unused-variable] - static struct pubkey keys[] = { - -Signed-off-by: Mike Frysinger <vapier@gentoo.org> -Upstream-Status: Pending -Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> ---- - utils/key2pub.py | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/utils/key2pub.py b/utils/key2pub.py -index 401d58a..3ae00b8 100755 ---- a/utils/key2pub.py -+++ b/utils/key2pub.py -@@ -24,7 +24,7 @@ def print_ssl_64(output, name, val): - for v1, v2, v3, v4, v5, v6, v7, v8 in vnew: - if not idx: - output.write('\t') -- output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2x, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8))) -+ output.write('0x%.2x%.2x%.2x%.2x%.2x%.2x%.2x%.2xULL, ' % (ord(v1), ord(v2), ord(v3), ord(v4), ord(v5), ord(v6), ord(v7), ord(v8))) - idx += 1 - if idx == 2: - idx = 0 -@@ -60,6 +60,7 @@ def print_ssl_32(output, name, val): - def print_ssl(output, name, val): - import os - output.write('#include <stdint.h>\n') -+ output.write('#include <openssl/bn.h>\n') - if os.getenv('TARGET_BITS') == '64': - return print_ssl_64(output, name, val) - else: -@@ -78,7 +79,7 @@ struct pubkey { - - #define KEYS(e,n) { KEY(e), KEY(n), } - --static struct pubkey keys[] = { -+static struct pubkey keys[] __attribute__((unused))= { - ''') - for n in xrange(n + 1): - output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch b/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch deleted file mode 100644 index 812e983798..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/fix-linking-of-libraries-used-by-reglib.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 890f5bf2654b695a866262d72bfa9750af921a3b Mon Sep 17 00:00:00 2001 -From: Ben Hutchings <ben@decadent.org.uk> -Date: Sat, 23 Aug 2014 12:26:37 -0700 -Subject: [PATCH] Fix linking of libraries used by libreg - -The math and crypto libraries are called by and need to be linked to -libreg.so, not to the executables. - -Upstream-Status: Backport [http://www.spinics.net/lists/linux-wireless/msg126027.html] - -Signed-off-by: Ben Hutchings <ben@decadent.org.uk> -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> ---- - Makefile | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/Makefile b/Makefile -index a3ead30..da2dcc3 100644 ---- a/Makefile -+++ b/Makefile -@@ -30,7 +30,7 @@ CFLAGS += -std=gnu99 -Wall -Werror -pedantic - CFLAGS += -Wall -g - LDLIBREG += -lreg - LDLIBS += $(LDLIBREG) --LDLIBS += -lm -+LIBREGLDLIBS += -lm - LIBREG += libreg.so - LDFLAGS += -L ./ - -@@ -40,13 +40,13 @@ all_noverify: $(LIBREG) crda intersect regdbdump db2rd optimize - - ifeq ($(USE_OPENSSL),1) - CFLAGS += -DUSE_OPENSSL -DPUBKEY_DIR=\"$(RUNTIME_PUBKEY_DIR)\" `pkg-config --cflags openssl` --LDLIBS += `pkg-config --libs openssl` -+LIBREGLDLIBS += `pkg-config --libs openssl` - - $(LIBREG): keys-ssl.c - - else - CFLAGS += -DUSE_GCRYPT --LDLIBS += -lgcrypt -+LIBREGLDLIBS += -lgcrypt - - $(LIBREG): keys-gcrypt.c - -@@ -116,7 +116,7 @@ keys-%.c: utils/key2pub.py $(wildcard $(PUBKEY_DIR)/*.pem) - - $(LIBREG): regdb.h reglib.h reglib.c - $(NQ) ' CC ' $@ -- $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ -+ $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LIBREGLDLIBS) - - install-libreg-headers: - $(NQ) ' INSTALL libreg-headers' --- -2.7.4 - diff --git a/meta-networking/recipes-connectivity/crda/crda/make.patch b/meta-networking/recipes-connectivity/crda/crda/make.patch deleted file mode 100644 index 0b737852c2..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/make.patch +++ /dev/null @@ -1,25 +0,0 @@ -These headers are not related to any Make rule but they do appear in -compiling of libreg.so, specifying .h files in compiler cmdline is flagged -as error by clang - -| clang-4.0: error: cannot specify -o when generating multiple output files -| make: *** [libreg.so] Error 1 - -This is how we see headers in cmdline --O2 -fpic -std=gnu -99 -Wall -Werror -pedantic -Wall -g -DUSE_GCRYPT -DCONFIG_LIBNL30 `pkg-config --cflags libnl-3.0` -o libreg.so -shared -Wl,-soname,libreg.so -regdb.h reglib.h reglib.c keys-gcrypt.c -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -L ./ -lm -lgcrypt - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/Makefile.kk 2016-11-15 04:54:53.338670000 +0000 -+++ a/Makefile 2016-11-15 04:55:07.718670000 +0000 -@@ -114,7 +114,7 @@ keys-%.c: utils/key2pub.py $(wildcard $( - $(NQ) ' Trusted pubkeys:' $(wildcard $(PUBKEY_DIR)/*.pem) - $(Q)./utils/key2pub.py --$* $(wildcard $(PUBKEY_DIR)/*.pem) $@ - --$(LIBREG): regdb.h reglib.h reglib.c -+$(LIBREG): reglib.c - $(NQ) ' CC ' $@ - $(Q)$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -shared -Wl,-soname,$(LIBREG) $^ $(LDFLAGS) $(LIBREGLDLIBS) - diff --git a/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch b/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch deleted file mode 100644 index 100b765f2d..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/use-target-word-size-instead-of-host-s.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c1c42513edd27c97341f2033af77c13a4724eb8f Mon Sep 17 00:00:00 2001 -From: Haiqing Bai <Haiqing.Bai@windriver.com> -Date: Fri, 25 Nov 2016 16:48:01 +0800 -Subject: [PATCH] crda: Use target word size instead of host's. - -In key2pub.py, the codes check the wordsize -of the host machine but not the target's, this fix -fetches the wordsize of target from the build system. - -Upstream-Status: Pending -Signed-off-by: Haiqing Bai <Haiqing.Bai@windriver.com> ---- - utils/key2pub.py | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/utils/key2pub.py b/utils/key2pub.py -index 3e84cd2..401d58a 100755 ---- a/utils/key2pub.py -+++ b/utils/key2pub.py -@@ -58,9 +58,9 @@ def print_ssl_32(output, name, val): - output.write('};\n\n') - - def print_ssl(output, name, val): -- import struct -+ import os - output.write('#include <stdint.h>\n') -- if len(struct.pack('@L', 0)) == 8: -+ if os.getenv('TARGET_BITS') == '64': - return print_ssl_64(output, name, val) - else: - return print_ssl_32(output, name, val) --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/crda/crda_3.18.bb b/meta-networking/recipes-connectivity/crda/crda_3.18.bb deleted file mode 100644 index c93905ea7c..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda_3.18.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "Wireless Central Regulatory Domain Agent" -HOMEPAGE = "http://wireless.kernel.org/en/developers/Regulatory/CRDA" -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 libgcrypt" - -SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ - file://do-not-run-ldconfig-if-destdir-is-set.patch \ - file://fix-linking-of-libraries-used-by-reglib.patch \ - file://fix-gcc-6-unused-variables.patch \ - file://0001-Makefile-respect-LDFLAGS-for-libreg.patch \ - file://make.patch \ - file://use-target-word-size-instead-of-host-s.patch \ - file://fix-issues-when-USE_OPENSSL-1.patch \ -" -SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a" -SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf" - -inherit python-dir pythonnative 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/" -TARGET_BITS = "${SITEINFO_BITS}" -export TARGET_BITS - -do_compile() { - oe_runmake all_noverify -} - -do_install() { - oe_runmake SBINDIR=${sbindir}/ install -} - -RDEPENDS_${PN} = "udev wireless-regdb" diff --git a/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb index 42ffb17a1f..66ad83f711 100644 --- a/meta-networking/recipes-connectivity/daq/daq_2.0.6.bb +++ b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb @@ -1,34 +1,32 @@ SUMMARY = "The dump DAQ test the various inline mode features " HOMEPAGE = "http://www.snort.org" SECTION = "libs" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=f9ce51a65dd738dc1ae631d8b21c40e0" PARALLEL_MAKE = "" -DEPENDS = "libpcap libpcre libdnet bison-native" +DEPENDS = "libpcap libpcre libdnet bison-native libnetfilter-queue" SRC_URI = "http://fossies.org/linux/misc/daq-${PV}.tar.gz \ file://disable-run-test-program-while-cross-compiling.patch \ file://0001-correct-the-location-of-unistd.h.patch \ " - +SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e" # these 2 create undeclared dependency on libdnet and libnetfilter-queue from meta-networking # this error from test-dependencies script: # daq/daq/latest lost dependency on libdnet libmnl libnetfilter-queue libnfnetlink # # never look to /usr/local lib while cross compiling -EXTRA_OECONF = "--disable-nfq-module --disable-ipq-module --includedir=${includedir} \ +EXTRA_OECONF = "--enable-nfq-module --disable-ipq-module --includedir=${includedir} \ --with-libpcap-includes=${STAGING_INCDIR} --with-dnet-includes=${STAGING_LIBDIR}" PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," -SRC_URI[md5sum] = "2cd6da422a72c129c685fc4bb848c24c" -SRC_URI[sha256sum] = "b40e1d1273e08aaeaa86e69d4f28d535b7e53bdb3898adf539266b63137be7cb" - -inherit autotools +inherit autotools multilib_script +MULTILIB_SCRIPTS += "${PN}:${bindir}/daq-modules-config " DISABLE_STATIC = "" diff --git a/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch b/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch index 4798a77f55..7587d44336 100644 --- a/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch +++ b/meta-networking/recipes-connectivity/daq/files/0001-correct-the-location-of-unistd.h.patch @@ -1,12 +1,15 @@ -From 10e7d4e4bfcb70344d18f0d4ce36068475747f25 Mon Sep 17 00:00:00 2001 +From b7d54de51553f6d09906c355bd0dd326890c8fe4 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 29 Mar 2017 15:59:43 -0700 Subject: [PATCH] correct the location of unistd.h +Upstream-Status: Pending + Signed-off-by: Khem Raj <raj.khem@gmail.com> --- os-daq-modules/daq_ipfw.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + os-daq-modules/daq_nfq.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/os-daq-modules/daq_ipfw.c b/os-daq-modules/daq_ipfw.c index 016beb0..c2a4175 100644 @@ -24,6 +27,22 @@ index 016beb0..c2a4175 100644 #include <netinet/in.h> #include <sys/socket.h> +diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c +index 33021c0..4de94b6 100644 +--- a/os-daq-modules/daq_nfq.c ++++ b/os-daq-modules/daq_nfq.c +@@ -24,10 +24,10 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <unistd.h> + + #include <sys/types.h> + #include <sys/time.h> +-#include <sys/unistd.h> + + #include <netinet/ip.h> + -- -2.12.1 +2.25.1 diff --git a/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch b/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch index a100b7cb83..cb986b85da 100644 --- a/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch +++ b/meta-networking/recipes-connectivity/daq/files/disable-run-test-program-while-cross-compiling.patch @@ -1,4 +1,4 @@ -Upstream-Status:Inappropriate [embedded specific] +Upstream-Status: Inappropriate [embedded specific] fix the below error: configure: error: cannot run test program while cross compiling diff --git a/meta-networking/recipes-connectivity/daq/libdaq/0001-example-Use-lm-for-the-fst-module.patch b/meta-networking/recipes-connectivity/daq/libdaq/0001-example-Use-lm-for-the-fst-module.patch new file mode 100644 index 0000000000..7147c042a1 --- /dev/null +++ b/meta-networking/recipes-connectivity/daq/libdaq/0001-example-Use-lm-for-the-fst-module.patch @@ -0,0 +1,32 @@ +From 9357da2a5a829f7a0620e6c19835a65b7b02a8fb Mon Sep 17 00:00:00 2001 +From: Khawaja Shaheryar <behzadshaheryar@gmail.com> +Date: Tue, 20 Feb 2024 21:03:26 +0500 +Subject: [PATCH] example: Use -lm for the fst module + +If -lm is not passed in Makefile.am, the following is seen +| arm-yoe-linux-gnueabi-ld.lld: error: undefined symbol: ceilf +| >>> referenced by math.h:632 (/usr/include/c++/v1/math.h:632) +| >>> libdaq_static_fst_la-daq_fst.o:(std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<std::__1::__hash_value_type<FstKey, FstNode*>, void*>*>, bool> std::__1::__hash_table<std::__1::__hash_value_type<FstKey, FstNode*>, std::__1::__unordered_map_hasher<FstKey, std::__1::__hash_value_type<FstKey, FstNode*>, FstKeyHash, std::__1::equal_to<FstKey>, true>, std::__1::__unordered_map_equal<FstKey, std::__1::__hash_value_type<FstKey, FstNode*>, std::__1::equal_to<FstKey>, FstKeyHash, true>, std::__1::allocator<std::__1::__hash_value_type<FstKey, FstNode*>>>::__emplace_unique_key_args<FstKey, std::__1::pair<FstKey const, FstNode*>>(FstKey const&, std::__1::pair<FstKey const, FstNode*>&&)) in archive ../modules/fst/.libs/libdaq_static_fst.a + +Upstream-Status: Pending + +Signed-off-by: Khawaja Shaheryar <behzadshaheryar@gmail.com> +--- + example/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/example/Makefile.am b/example/Makefile.am +index 0d5ca31..1eaa9e8 100644 +--- a/example/Makefile.am ++++ b/example/Makefile.am +@@ -31,6 +31,7 @@ endif + if BUILD_FST_MODULE + daqtest_static_CFLAGS += -DBUILD_FST_MODULE + daqtest_static_LDADD += ${top_builddir}/modules/fst/libdaq_static_fst.la $(DAQ_FST_LIBS) ++daqtest_static_LDFLAGS += -lm + endif + if BUILD_NETMAP_MODULE + daqtest_static_CFLAGS += -DBUILD_NETMAP_MODULE +-- +2.34.1 + diff --git a/meta-networking/recipes-connectivity/daq/libdaq_3.0.14.bb b/meta-networking/recipes-connectivity/daq/libdaq_3.0.14.bb new file mode 100644 index 0000000000..74964e0741 --- /dev/null +++ b/meta-networking/recipes-connectivity/daq/libdaq_3.0.14.bb @@ -0,0 +1,18 @@ +SUMMARY = "LibDAQ: The Data AcQuisition Library" +DESCRIPTION = "LibDAQ is a pluggable abstraction layer for interacting with a data source (traditionally a network interface or network data plane)." +HOMEPAGE = "http://www.snort.org" +SECTION = "libs" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=79258250506422d064560a7b95b2d53e" + +DEPENDS = "libdnet libpcap" + +inherit autotools pkgconfig + +SRC_URI = "git://github.com/snort3/libdaq.git;protocol=https;branch=master \ + file://0001-example-Use-lm-for-the-fst-module.patch" +SRCREV = "4e68d7ba6940df9a1503599d7b177029112d6b6a" + +S = "${WORKDIR}/git" + +FILES:${PN} += "${libdir}/daq/*.so" diff --git a/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb b/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb new file mode 100644 index 0000000000..e5f7e0334f --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/dhcp-relay_4.4.3p1.bb @@ -0,0 +1,72 @@ +SECTION = "console/network" +SUMMARY = "Internet Software Consortium DHCP Relay Agent" +DESCRIPTION = "A DHCP relay agent passes DHCP requests from one \ +LAN to another, so that a DHCP server is not needed on every LAN." + +HOMEPAGE = "http://www.isc.org/" + +LICENSE = "MPL-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=c463f4afde26d9eb60f14f50aeb85f8f" + +DEPENDS = "openssl libcap zlib" + +SRC_URI = "https://downloads.isc.org/isc/dhcp/4.4.3-P1/dhcp-4.4.3-P1.tar.gz \ + file://default-relay \ + file://init-relay \ + file://dhcrelay.service \ + file://0001-Makefile.am-only-build-dhcrelay.patch \ + file://0002-bind-Makefile.in-disable-backtrace.patch \ + file://0003-bind-Makefile.in-regenerate-configure.patch \ + " + +SRC_URI[sha256sum] = "0ac416bb55997ca8632174fd10737fd61cdb8dba2752160a335775bc21dc73c7" + +UPSTREAM_CHECK_URI = "http://ftp.isc.org/isc/dhcp/" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+\.\d+\.(\d+?))/" + +S = "${WORKDIR}/dhcp-4.4.3-P1" + +inherit autotools-brokensep systemd pkgconfig + +SYSTEMD_SERVICE:${PN} = "dhcrelay.service" +SYSTEMD_AUTO_ENABLE:${PN} = "disable" + +CFLAGS += "-D_GNU_SOURCE -fcommon" +LDFLAGS:append = " -pthread" + +BIND_EXTRA_CONFIG = "\ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ +" + +EXTRA_OECONF = "--with-bind-extra-config="${BIND_EXTRA_CONFIG}" \ + --enable-paranoia \ + --disable-static \ + --enable-libtool \ + --with-randomdev=/dev/random \ + " + +# Enable shared libs per dhcp README +do_configure:prepend () { + cp configure.ac+lt configure.ac +} + +do_install:append () { + install -Dm 0644 ${WORKDIR}/default-relay ${D}${sysconfdir}/default/dhcp-relay + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/dhcrelay.service ${D}${systemd_unitdir}/system + sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/dhcrelay.service + sed -i -e 's,@SYSCONFDIR@,${sysconfdir},g' ${D}${systemd_unitdir}/system/dhcrelay.service + else + install -d ${D}${sysconfdir}/init.d + install -m 0755 ${WORKDIR}/init-relay ${D}${sysconfdir}/init.d/dhcp-relay + fi +} + +PARALLEL_MAKE = "" + +# dhcp-relay contains a bundled "bind", thus their dev packages conflict each other +RCONFLICTS:${PN}-dev = "bind-dev" diff --git a/meta-networking/recipes-connectivity/dhcp/files/0001-Makefile.am-only-build-dhcrelay.patch b/meta-networking/recipes-connectivity/dhcp/files/0001-Makefile.am-only-build-dhcrelay.patch new file mode 100644 index 0000000000..5320d7c9e9 --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/files/0001-Makefile.am-only-build-dhcrelay.patch @@ -0,0 +1,30 @@ +From 4fd67b6adb7c1d8524ba17d1a0b3894f901555a9 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Thu, 13 May 2021 15:23:16 +0800 +Subject: [PATCH] Makefile.am: only build dhcrelay + +Drop client and server build as we don't need them. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index ed692a5..34f9772 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -38,7 +38,7 @@ endif + + # Use an autoconf substitution vs an automake conditional here + # to fool automake when the bind directory does not exist. +-SUBDIRS = @BINDSUBDIR@ includes tests common omapip client dhcpctl relay server ++SUBDIRS = @BINDSUBDIR@ includes common omapip relay + + DIST_SUBDIRS = $(SUBDIRS) keama + +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/dhcp/files/0002-bind-Makefile.in-disable-backtrace.patch b/meta-networking/recipes-connectivity/dhcp/files/0002-bind-Makefile.in-disable-backtrace.patch new file mode 100644 index 0000000000..631a640ecc --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/files/0002-bind-Makefile.in-disable-backtrace.patch @@ -0,0 +1,31 @@ +From 6c6bbfe6b33e5c7e46a4260d656593dbe610fd8a Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Tue, 8 Jun 2021 10:13:57 +0800 +Subject: [PATCH] bind/Makefile.in: disable backtrace + +Fixes build error for qemuarm on musl: +libisc.so: undefined reference to `_Unwind_GetIP' + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + bind/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bind/Makefile.in b/bind/Makefile.in +index 2e60091..533d55c 100644 +--- a/bind/Makefile.in ++++ b/bind/Makefile.in +@@ -22,7 +22,7 @@ prefix = @prefix@ + exec_prefix = @exec_prefix@ + + bindconfig = --without-openssl --without-libxml2 --without-libjson \ +- --without-gssapi --disable-threads --without-lmdb \ ++ --without-gssapi --disable-threads --without-lmdb --disable-backtrace \ + --includedir=@includedir@ --libdir=@libdir@ --without-python\ + @BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report + +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/dhcp/files/0003-bind-Makefile.in-regenerate-configure.patch b/meta-networking/recipes-connectivity/dhcp/files/0003-bind-Makefile.in-regenerate-configure.patch new file mode 100644 index 0000000000..71be0276a3 --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/files/0003-bind-Makefile.in-regenerate-configure.patch @@ -0,0 +1,30 @@ +From 6ca1b224032355521b35471d222d0b09c08369a0 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Thu, 27 May 2021 11:38:36 +0800 +Subject: [PATCH] bind/Makefile.in: regenerate configure + +Run autogen.sh to regenerate configure. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + bind/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/bind/Makefile.in b/bind/Makefile.in +index 533d55c..fdffe15 100644 +--- a/bind/Makefile.in ++++ b/bind/Makefile.in +@@ -55,7 +55,7 @@ bind1: + else \ + echo Configuring BIND libraries for DHCP. ; \ + rm -rf ${cleandirs} ${cleanfiles} ; \ +- (cd ${bindsrcdir} && \ ++ (cd ${bindsrcdir} && ./autogen.sh && \ + ./configure ${bindconfig} > ${binddir}/configure.log); \ + fi + +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/dhcp/files/default-relay b/meta-networking/recipes-connectivity/dhcp/files/default-relay new file mode 100644 index 0000000000..7961f014be --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/files/default-relay @@ -0,0 +1,12 @@ +# Defaults for dhcp-relay initscript +# sourced by /etc/init.d/dhcp-relay + +# What servers should the DHCP relay forward requests to? +# e.g: SERVERS="192.168.0.1" +SERVERS="" + +# On what interfaces should the DHCP relay (dhrelay) serve DHCP requests? +INTERFACES="" + +# Additional options that are passed to the DHCP relay daemon? +OPTIONS="" diff --git a/meta-networking/recipes-connectivity/dhcp/files/dhcrelay.service b/meta-networking/recipes-connectivity/dhcp/files/dhcrelay.service new file mode 100644 index 0000000000..15ff927d34 --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/files/dhcrelay.service @@ -0,0 +1,10 @@ +[Unit] +Description=DHCP Relay Agent Daemon +After=network.target + +[Service] +EnvironmentFile=@SYSCONFDIR@/default/dhcp-relay +ExecStart=@SBINDIR@/dhcrelay -d --no-pid -q $SERVERS + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/dhcp/files/init-relay b/meta-networking/recipes-connectivity/dhcp/files/init-relay new file mode 100644 index 0000000000..019a7e84cf --- /dev/null +++ b/meta-networking/recipes-connectivity/dhcp/files/init-relay @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $Id: dhcp3-relay,v 1.1 2004/04/16 15:41:08 ml Exp $ +# + +# It is not safe to start if we don't have a default configuration... +if [ ! -f /etc/default/dhcp-relay ]; then + echo "/etc/default/dhcp-relay does not exist! - Aborting..." + echo "create this file to fix the problem." + exit 1 +fi + +# Read init script configuration (interfaces the daemon should listen on +# and the DHCP server we should forward requests to.) +. /etc/default/dhcp-relay + +# Build command line for interfaces (will be passed to dhrelay below.) +IFCMD="" +if test "$INTERFACES" != ""; then + for I in $INTERFACES; do + IFCMD=${IFCMD}"-i "${I}" " + done +fi + +DHCRELAYPID=/var/run/dhcrelay.pid + +case "$1" in + start) + start-stop-daemon -S -x /usr/sbin/dhcrelay -- -q $OPTIONS $IFCMD $SERVERS + ;; + stop) + start-stop-daemon -K -x /usr/sbin/dhcrelay + ;; + restart | force-reload) + $0 stop + sleep 2 + $0 start + ;; + *) + echo "Usage: /etc/init.d/dhcp-relay {start|stop|restart|force-reload}" + exit 1 +esac + +exit 0 diff --git a/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.0.2.bb b/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.0.2.bb deleted file mode 100644 index 79d1dada04..0000000000 --- a/meta-networking/recipes-connectivity/dhcpcd/dhcpcd_8.0.2.bb +++ /dev/null @@ -1,26 +0,0 @@ -SECTION = "console/network" -SUMMARY = "dhcpcd - a DHCP client" -DESCRIPTION = "dhcpcd runs on your machine and silently configures your computer to work on the attached networks without trouble and mostly without configuration." - -HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" - -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0531457992a97ecebc6975914a874a9d" - -UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/" - -SRC_URI = "http://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \ - file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch" -SRC_URI[md5sum] = "c0375a1f725f1c191b43af60e4f7175b" -SRC_URI[sha256sum] = "33a26ad561546cd2cfe1e6de6352a85df72b41c37def8c7eb00e90e57c627a5c" - -inherit pkgconfig autotools-brokensep - -PACKAGECONFIG ?= "udev ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" - -PACKAGECONFIG[udev] = "--with-udev,--without-udev,udev,udev" -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6" - -EXTRA_OECONF = "--enable-ipv4" - -FILES_${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" diff --git a/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch b/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch deleted file mode 100644 index 37d2344438..0000000000 --- a/meta-networking/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch +++ /dev/null @@ -1,45 +0,0 @@ -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/meta-networking/recipes-connectivity/dibbler/dibbler/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch new file mode 100644 index 0000000000..d48d7265d4 --- /dev/null +++ b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch @@ -0,0 +1,125 @@ +From 9e9d94566d39eef3e4606f806aa418bf5534fab9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Jan 2023 22:04:31 -0800 +Subject: [PATCH 1/2] Define alignof using _Alignof when using C11 or newer + +WG14 N2350 made very clear that it is an UB having type definitions +within "offsetof" [1]. This patch enhances the implementation of macro +alignof to use builtin "_Alignof" to avoid undefined behavior on +when using std=c11 or newer + +clang 16+ has started to flag this [2] + +Fixes build when using -std >= gnu11 and using clang16+ + +Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it +may support C11, exclude those compilers too + +[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm +[2] https://reviews.llvm.org/D133574 + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Misc/md5-coreutils.c | 12 +++++++++++- + Misc/sha1.c | 12 +++++++++++- + Misc/sha256.c | 12 +++++++++++- + Misc/sha512.c | 12 +++++++++++- + 4 files changed, 44 insertions(+), 4 deletions(-) + +diff --git a/Misc/md5-coreutils.c b/Misc/md5-coreutils.c +index d6503e02..2ffb6050 100644 +--- a/Misc/md5-coreutils.c ++++ b/Misc/md5-coreutils.c +@@ -154,7 +154,17 @@ md5_process_bytes (const void *buffer, size_t len, struct md5_ctx *ctx) + if (len >= 64) + { + #if !_STRING_ARCH_unaligned +-# define alignof(type) offsetof (struct { char c; type x; }, x) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. ++ clang versions < 8.0.0 have the same bug. */ ++# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define alignof(type) offsetof (struct { char c; type x; }, x) ++# else ++# define alignof(type) _Alignof(type) ++# endif + # define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) + if (UNALIGNED_P (buffer)) + while (len > 64) +diff --git a/Misc/sha1.c b/Misc/sha1.c +index 18ceb845..a170efe3 100644 +--- a/Misc/sha1.c ++++ b/Misc/sha1.c +@@ -149,7 +149,17 @@ sha1_process_bytes (const void *buffer, size_t len, struct sha1_ctx *ctx) + if (len >= 64) + { + #if !_STRING_ARCH_unaligned +-# define alignof(type) offsetof (struct { char c; type x; }, x) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. ++ clang versions < 8.0.0 have the same bug. */ ++# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define alignof(type) offsetof (struct { char c; type x; }, x) ++# else ++# define alignof(type) _Alignof(type) ++# endif + # define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) + if (UNALIGNED_P (buffer)) + while (len > 64) +diff --git a/Misc/sha256.c b/Misc/sha256.c +index 68292326..da59e81d 100644 +--- a/Misc/sha256.c ++++ b/Misc/sha256.c +@@ -372,7 +372,17 @@ sha256_process_bytes (const void *buffer, size_t len, struct sha256_ctx *ctx) + if (len >= 64) + { + #if !_STRING_ARCH_unaligned +-# define alignof(type) offsetof (struct { char c; type x; }, x) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. ++ clang versions < 8.0.0 have the same bug. */ ++# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define alignof(type) offsetof (struct { char c; type x; }, x) ++# else ++# define alignof(type) _Alignof(type) ++# endif + # define UNALIGNED_P(p) (((size_t) p) % alignof (uint32_t) != 0) + if (UNALIGNED_P (buffer)) + while (len > 64) +diff --git a/Misc/sha512.c b/Misc/sha512.c +index db86c659..38e162fc 100644 +--- a/Misc/sha512.c ++++ b/Misc/sha512.c +@@ -190,7 +190,17 @@ sha512_process_bytes (const void *buffer, size_t len, struct sha512_ctx *ctx) + if (len >= 128) + { + #if !_STRING_ARCH_unaligned +-# define alignof(type) offsetof (struct { char c; type x; }, x) ++/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023 ++ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. ++ clang versions < 8.0.0 have the same bug. */ ++# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \ ++ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \ ++ && !defined __clang__) \ ++ || (defined __clang__ && __clang_major__ < 8)) ++# define alignof(type) offsetof (struct { char c; type x; }, x) ++# else ++# define alignof(type) _Alignof(type) ++# endif + # define UNALIGNED_P(p) (((size_t) p) % alignof (uint64_t) != 0) + if (UNALIGNED_P (buffer)) + while (len > 128) +-- +2.39.0 + diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch deleted file mode 100644 index 346a56a9ad..0000000000 --- a/meta-networking/recipes-connectivity/dibbler/dibbler/0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch +++ /dev/null @@ -1,74 +0,0 @@ -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/meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch new file mode 100644 index 0000000000..884be404b5 --- /dev/null +++ b/meta-networking/recipes-connectivity/dibbler/dibbler/0001-port-linux-Re-order-header-includes.patch @@ -0,0 +1,33 @@ +From cbb33e1548fe526c3e7dead294617bde1f087ae3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 24 Aug 2022 16:40:38 -0700 +Subject: [PATCH] port-linux: Re-order header includes + +linux/if.h when included before net/if.h casues duplicate definitions + +Upstream-Status: Inappropriate [Upstream is Dead] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Port-linux/interface.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Port-linux/interface.c b/Port-linux/interface.c +index 18777e91..19aefb2b 100644 +--- a/Port-linux/interface.c ++++ b/Port-linux/interface.c +@@ -25,7 +25,6 @@ + #include <sys/types.h> + #include <sys/socket.h> + #include <sys/ioctl.h> +-#include <linux/if.h> + #include <syslog.h> + #include <string.h> + #include <errno.h> +@@ -42,6 +41,7 @@ + #include <stdarg.h> + #include <linux/sockios.h> + #include <linux/if_ether.h> ++#include <linux/if.h> + + int interface_auto_up = 0; + int interface_do_message = 0; diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler/0002-make-Do-not-enforce-c99.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/0002-make-Do-not-enforce-c99.patch new file mode 100644 index 0000000000..8889130a3b --- /dev/null +++ b/meta-networking/recipes-connectivity/dibbler/dibbler/0002-make-Do-not-enforce-c99.patch @@ -0,0 +1,50 @@ +From e826206c58bbaa1c256f55b103d5eb7b0182f152 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 15 Jan 2023 22:05:53 -0800 +Subject: [PATCH 2/2] make: Do not enforce c99 + +Latest gcc/clang from OE defaults to c11 or newer and stickly to c99 +means we can not use _AlignOf + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + Misc/Makefile.am | 4 +--- + Port-linux/Makefile.am | 1 - + 2 files changed, 1 insertion(+), 4 deletions(-) + +diff --git a/Misc/Makefile.am b/Misc/Makefile.am +index d881525a..8d71d2d4 100644 +--- a/Misc/Makefile.am ++++ b/Misc/Makefile.am +@@ -6,8 +6,6 @@ endif + + noinst_LIBRARIES = libMisc.a + +-libMisc_a_CFLAGS = -std=c99 +- + libMisc_a_CPPFLAGS = -I$(top_srcdir) + + libMisc_a_SOURCES = addrpack.c +@@ -27,4 +25,4 @@ libMisc_a_SOURCES += lowlevel-posix.c + + libMisc_a_SOURCES += hmac-sha-md5.h hmac-sha-md5.c + libMisc_a_SOURCES += md5-coreutils.c md5.h +-libMisc_a_SOURCES += sha1.c sha1.h sha256.c sha256.h sha512.c sha512.h +\ No newline at end of file ++libMisc_a_SOURCES += sha1.c sha1.h sha256.c sha256.h sha512.c sha512.h +diff --git a/Port-linux/Makefile.am b/Port-linux/Makefile.am +index 72b0a5e3..635998ea 100644 +--- a/Port-linux/Makefile.am ++++ b/Port-linux/Makefile.am +@@ -1,6 +1,5 @@ + noinst_LIBRARIES = libLowLevel.a + +-libLowLevel_a_CFLAGS = -std=c99 + libLowLevel_a_CPPFLAGS = -I$(top_srcdir)/Misc + + libLowLevel_a_SOURCES = daemon.cpp daemon.h ethtool-kernel.h ethtool-local.h interface.c interface.h ip_common.h iproute.c libnetlink.c libnetlink.h ll_map.c ll_map.h ll_types.c lowlevel-linux.c lowlevel-linux-link-state.c lowlevel-options-linux.c rtm_map.h rt_names.h utils.c utils.h +-- +2.39.0 + diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch b/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch index 42d2627a1a..439ef1177d 100644 --- a/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch +++ b/meta-networking/recipes-connectivity/dibbler/dibbler/dibbler_fix_getSize_crash.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Index: git/ClntMessages/ClntMsgRequest.cpp =================================================================== --- git.orig/ClntMessages/ClntMsgRequest.cpp diff --git a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb index 90051a319a..34f8a7e3e5 100644 --- a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb +++ b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb @@ -2,14 +2,16 @@ SUMMARY = "Dibbler DHCPv6 client" DESCRIPTION = "Dibbler is a portable DHCPv6 implementation. It supports stateful as well as stateless autoconfiguration for IPv6." HOMEPAGE = "http://klub.com.pl/dhcpv6" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://LICENSE;md5=7236695bb6d4461c105d685a8b61c4e3" -SRCREV = "c4b0ed52e751da7823dd9a36e91f93a6310e5525" +SRCREV = "a7c6cf58a88a510cb00841351e75030ce78d36bf" -SRC_URI = "git://github.com/tomaszmrugalski/dibbler \ +SRC_URI = "git://github.com/tomaszmrugalski/dibbler;branch=master;protocol=https \ file://dibbler_fix_getSize_crash.patch \ - file://0001-linux-port-Rename-pthread_mutex_t-variable-lock.patch \ + file://0001-port-linux-Re-order-header-includes.patch \ + file://0001-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ + file://0002-make-Do-not-enforce-c99.patch \ " PV = "1.0.1+1.0.2RC1+git${SRCREV}" @@ -30,9 +32,12 @@ inherit autotools DEPENDS += "flex-native" +CPPFLAGS += "-D_GNU_SOURCE -Dregister=''" +LDFLAGS += "-pthread" + PACKAGES =+ "${PN}-requestor ${PN}-client ${PN}-relay ${PN}-server" -FILES_${PN}-client = "${sbindir}/${PN}-client" -FILES_${PN}-relay = "${sbindir}/${PN}-relay" -FILES_${PN}-requestor = "${sbindir}/${PN}-requestor" -FILES_${PN}-server = "${sbindir}/${PN}-server" +FILES:${PN}-client = "${sbindir}/${PN}-client" +FILES:${PN}-relay = "${sbindir}/${PN}-relay" +FILES:${PN}-requestor = "${sbindir}/${PN}-requestor" +FILES:${PN}-server = "${sbindir}/${PN}-server" diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb b/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb index 51e220c9e7..42ecf9bac4 100644 --- a/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb +++ b/meta-networking/recipes-connectivity/ez-ipupdate/ez-ipupdate_3.0.11b7.bb @@ -1,15 +1,16 @@ SUMMARY = "daemon that sends updates when your IP changes" HOMEPAGE = "http://sourceforge.net/projects/ez-ipupdate/" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=7783169b4be06b54e86730eb01bc3a31" SRC_URI = "http://sourceforge.net/projects/ez-ipupdate/files/${BPN}/${PV}/${BPN}-${PV}.tar.gz \ - file://Makefile.am.patch \ - file://cache_file.c.patch \ - file://conf_file.c.patch \ - file://wformat.patch \ - " + file://Makefile.am.patch \ + file://cache_file.c.patch \ + file://conf_file.c.patch \ + file://wformat.patch \ + file://0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch \ + " SRC_URI[md5sum] = "525be4550b4461fdf105aed8e753b020" SRC_URI[sha256sum] = "a15ec0dc0b78ec7578360987c68e43a67bc8d3591cbf528a323588830ae22c20" diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/files/0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch b/meta-networking/recipes-connectivity/ez-ipupdate/files/0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch new file mode 100644 index 0000000000..b2a2ebdae3 --- /dev/null +++ b/meta-networking/recipes-connectivity/ez-ipupdate/files/0001-ez-ipupdate-Include-time.h-for-time-API-prototype.patch @@ -0,0 +1,44 @@ +From 6c8fe883df993b9e7987c8f1c849962f8007a373 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 29 Aug 2022 12:50:37 -0700 +Subject: [PATCH] ez-ipupdate: Include time.h for time() API prototype + +Fix printf format specifiers for snprintf + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + ez-ipupdate.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/ez-ipupdate.c b/ez-ipupdate.c +index 15a4c13..5cbe7f3 100644 +--- a/ez-ipupdate.c ++++ b/ez-ipupdate.c +@@ -38,6 +38,8 @@ + # include <config.h> + #endif + ++#include <time.h> ++ + // you man very well need to edit this, don't worry though, email is only sent + // if bad things happend and it has to exit when in daemon mode. + #define SEND_EMAIL_CMD "mail" +@@ -2483,7 +2485,7 @@ int DHS_update_entry(void) + p += strlen(p); + limit = BUFFER_SIZE - 1 - strlen(buf); + +- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf)); ++ snprintf(buf, BUFFER_SIZE, "Content-length: %lu\015\012", strlen(putbuf)); + output(buf); + snprintf(buf, BUFFER_SIZE, "\015\012"); + output(buf); +@@ -2620,7 +2622,7 @@ int DHS_update_entry(void) + p += strlen(p); + limit = BUFFER_SIZE - 1 - strlen(buf); + +- snprintf(buf, BUFFER_SIZE, "Content-length: %d\015\012", strlen(putbuf)); ++ snprintf(buf, BUFFER_SIZE, "Content-length: %lu\015\012", strlen(putbuf)); + output(buf); + snprintf(buf, BUFFER_SIZE, "\015\012"); + output(buf); diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch b/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch index d80ed3e29d..dde233121a 100644 --- a/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch +++ b/meta-networking/recipes-connectivity/ez-ipupdate/files/Makefile.am.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Remove EXTRASRC and EXTRAOBJ from obj list --- ez-ipupdate-3.0.11b7/Makefile.am.orig 2014-07-02 13:47:50.758034983 -0600 diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch b/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch index de5eb3a6d1..0199cb1278 100644 --- a/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch +++ b/meta-networking/recipes-connectivity/ez-ipupdate/files/cache_file.c.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Dont assume errno type --- ez-ipupdate-3.0.11b7/cache_file.c.orig 2014-07-02 14:01:07.126029412 -0600 diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch b/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch index 02218a39ea..6325c1873f 100644 --- a/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch +++ b/meta-networking/recipes-connectivity/ez-ipupdate/files/conf_file.c.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Dont assume errno type --- ez-ipupdate-3.0.11b7/conf_file.c.orig 2014-07-02 14:01:19.174029328 -0600 diff --git a/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch b/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch index 1de267f083..3b791559d5 100644 --- a/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch +++ b/meta-networking/recipes-connectivity/ez-ipupdate/files/wformat.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + Index: ez-ipupdate-3.0.11b7/ez-ipupdate.c =================================================================== --- ez-ipupdate-3.0.11b7.orig/ez-ipupdate.c diff --git a/meta-networking/recipes-connectivity/firewalld/files/0001-fix-building-in-a-separate-directory-outside-the-sou.patch b/meta-networking/recipes-connectivity/firewalld/files/0001-fix-building-in-a-separate-directory-outside-the-sou.patch deleted file mode 100644 index 28d5902429..0000000000 --- a/meta-networking/recipes-connectivity/firewalld/files/0001-fix-building-in-a-separate-directory-outside-the-sou.patch +++ /dev/null @@ -1,68 +0,0 @@ -firewalld: fix building in a separate directory outside the source tree - -Upstream-Status: Accepted [https://github.com/firewalld/firewalld/pull/456] -Signed-off-by: Dan Callaghan <dan.callaghan@opengear.com> - ---- a/config/Makefile.am -+++ b/config/Makefile.am -@@ -377,11 +377,11 @@ install-config: - $(MKDIR_P) $(DESTDIR)$(sconfdir)/zones - $(MKDIR_P) $(DESTDIR)$(sconfdir)/helpers - $(MKDIR_P) $(DESTDIR)$(prefixlibdir) -- cp -r icmptypes $(DESTDIR)$(prefixlibdir) -- cp -r ipsets $(DESTDIR)$(prefixlibdir) -- cp -r services $(DESTDIR)$(prefixlibdir) -- cp -r zones $(DESTDIR)$(prefixlibdir) -- cp -r helpers $(DESTDIR)$(prefixlibdir) -+ cp -r $(srcdir)/icmptypes $(DESTDIR)$(prefixlibdir) -+ cp -r $(srcdir)/ipsets $(DESTDIR)$(prefixlibdir) -+ cp -r $(srcdir)/services $(DESTDIR)$(prefixlibdir) -+ cp -r $(srcdir)/zones $(DESTDIR)$(prefixlibdir) -+ cp -r $(srcdir)/helpers $(DESTDIR)$(prefixlibdir) - - uninstall-config: - rmdir $(DESTDIR)$(sconfdir)/icmptypes ---- a/doc/xml/Makefile.am -+++ b/doc/xml/Makefile.am -@@ -69,7 +69,8 @@ edit = sed \ - -e 's|\@PREFIX\@|$(prefix)|' \ - -e 's|\@SYSCONFDIR\@|$(sysconfdir)|' \ - -e 's|\@PACKAGE_STRING\@|$(PACKAGE_STRING)|' \ -- -e 's|\@IFCFGDIR\@|$(IFCFGDIR)|' -+ -e 's|\@IFCFGDIR\@|$(IFCFGDIR)|' \ -+ -e 's|@SRCDIR@|$(srcdir)|' - - transform-man.xsl: transform-man.xsl.in - $(edit) $< >$@ ---- a/doc/xml/firewall-cmd.xml.in -+++ b/doc/xml/firewall-cmd.xml.in -@@ -1,10 +1,10 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" - [ --<!ENTITY authors SYSTEM "authors.xml"> --<!ENTITY seealso SYSTEM "seealso.xml"> --<!ENTITY notes SYSTEM "notes.xml"> --<!ENTITY errorcodes SYSTEM "errorcodes.xml"> -+<!ENTITY authors SYSTEM "@SRCDIR@/authors.xml"> -+<!ENTITY seealso SYSTEM "@SRCDIR@/seealso.xml"> -+<!ENTITY notes SYSTEM "@SRCDIR@/notes.xml"> -+<!ENTITY errorcodes SYSTEM "@SRCDIR@/errorcodes.xml"> - ]> - - <!-- ---- a/doc/xml/firewalld.xml.in -+++ b/doc/xml/firewalld.xml.in -@@ -1,9 +1,9 @@ - <?xml version="1.0" encoding="utf-8"?> - <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" - [ --<!ENTITY authors SYSTEM "authors.xml"> --<!ENTITY seealso SYSTEM "seealso.xml"> --<!ENTITY notes SYSTEM "notes.xml"> -+<!ENTITY authors SYSTEM "@SRCDIR@/authors.xml"> -+<!ENTITY seealso SYSTEM "@SRCDIR@/seealso.xml"> -+<!ENTITY notes SYSTEM "@SRCDIR@/notes.xml"> - ]> - - <!-- diff --git a/meta-networking/recipes-connectivity/firewalld/files/firewalld.init b/meta-networking/recipes-connectivity/firewalld/files/firewalld.init deleted file mode 100644 index 08e8930b97..0000000000 --- a/meta-networking/recipes-connectivity/firewalld/files/firewalld.init +++ /dev/null @@ -1,48 +0,0 @@ -#!/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/meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb b/meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb deleted file mode 100644 index 5955072f15..0000000000 --- a/meta-networking/recipes-connectivity/firewalld/firewalld_0.6.4.bb +++ /dev/null @@ -1,84 +0,0 @@ -SUMMARY = "Dynamic firewall daemon with a D-Bus interface" -HOMEPAGE = "https://firewalld.org/" -BUGTRACKER = "https://github.com/firewalld/firewalld/issues" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ - file://0001-fix-building-in-a-separate-directory-outside-the-sou.patch \ - file://firewalld.init \ -" -SRC_URI[md5sum] = "e63bdd65a4d2f6338f60b31e91bb5525" -SRC_URI[sha256sum] = "5a82a72fd9ad4cbbfb805bae615faa9b91a27855245de0fef3bcb06439394852" - -# glib-2.0-native is needed for GSETTINGS_RULES autoconf macro from gsettings.m4 -# xmlto-native is needed to populate /etc/xml/catalog.xml in the sysroot so that xsltproc finds the docbook xslt -DEPENDS = "intltool-native glib-2.0-native libxslt-native docbook-xsl-stylesheets-native xmlto-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_unitdir}/system/,--disable-systemd" - -# 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 \ -" - -INITSCRIPT_NAME = "firewalld" -SYSTEMD_SERVICE = "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 \ - ${datadir}/polkit-1 \ - ${datadir}/metainfo \ -" - -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/meta-networking/recipes-connectivity/freeradius/files/0001-Add-autogen.sh.patch b/meta-networking/recipes-connectivity/freeradius/files/0001-Add-autogen.sh.patch new file mode 100644 index 0000000000..e1228c2ebe --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0001-Add-autogen.sh.patch @@ -0,0 +1,46 @@ +From 3be3b9a1345942d1578ec73efa9b2e3c41bd67c5 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Fri, 21 Jan 2022 13:22:24 +0800 +Subject: [PATCH] Add autogen.sh + +The autogen.sh has been removed since 3.0.22[1]. But we still need it in +do_configure. Add it back. + +[1] https://github.com/FreeRADIUS/freeradius-server/commit/2e9b6227efd19e2b0926541aa26874908e7b7314 + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + autogen.sh | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + create mode 100755 autogen.sh + +diff --git a/autogen.sh b/autogen.sh +new file mode 100755 +index 0000000000..959182b39e +--- /dev/null ++++ b/autogen.sh +@@ -0,0 +1,19 @@ ++#!/bin/sh -e ++ ++parentdir=`dirname $0` ++ ++cd $parentdir ++parentdir=`pwd` ++m4include="-I$parentdir -I$parentdir/m4 -Im4" ++ ++autoreconf -Wcross --verbose --install --force ++ ++mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`" ++mysubdirs=`echo $mysubdirs` ++ ++for F in $mysubdirs ++do ++ echo "Configuring in $F..." ++ (cd $F && grep "^AC_CONFIG_HEADER" configure.ac > /dev/null || exit 0; autoheader $m4include) ++ (cd $F && autoconf $m4include) ++done +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch b/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch deleted file mode 100644 index db8caab12e..0000000000 --- a/meta-networking/recipes-connectivity/freeradius/files/0001-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 66e8bcdcca8971b5c43c31755d56d7f675d8b5ff Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 16 Jun 2017 20:10:49 -0700 -Subject: [PATCH] rlm_mschap: Use includedir instead of hardcoding /usr/include - -OE QA flags it correctly as a voilation of cross compilation -namespace - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/modules/rlm_mschap/configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: freeradius-server-3.0.14/src/modules/rlm_mschap/configure.ac -=================================================================== ---- freeradius-server-3.0.14.orig/src/modules/rlm_mschap/configure.ac -+++ freeradius-server-3.0.14/src/modules/rlm_mschap/configure.ac -@@ -72,7 +72,7 @@ if test x$with_[]modname != xno; then - mod_ldflags="-framework DirectoryService" - fi - -- smart_try_dir="$winbind_include_dir /usr/include/samba-4.0" -+ smart_try_dir="$winbind_include_dir =/usr/include/samba-4.0" - FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h> - #include <stdbool.h>]) - if test "x$ac_cv_header_wbclient_h" != "xyes"; then diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch b/meta-networking/recipes-connectivity/freeradius/files/0002-Enable-and-change-user-and-group-of-freeradius-serve.patch index 4a62bf1fa2..c57ee93c33 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-enble-user-in-conf.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0002-Enable-and-change-user-and-group-of-freeradius-serve.patch @@ -1,4 +1,8 @@ -Enable and change user and group of freeradius server to radiusd +From 2a74c10836c0d2d19248ca40d113936f4a56b039 Mon Sep 17 00:00:00 2001 +From: "Roy.Li" <rongqing.li@windriver.com> +Date: Sun, 8 Jan 2023 22:47:11 +0800 +Subject: [PATCH] Enable and change user and group of freeradius server to + radiusd Upstream-Status: Inappropriate [configuration] @@ -9,10 +13,10 @@ Signed-off-by: Jackie Huang <jackie.huang@windriver.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in -index c62f4ff..0b4a84e 100644 +index 154b50d610..4594d6d2d2 100644 --- a/raddb/radiusd.conf.in +++ b/raddb/radiusd.conf.in -@@ -436,8 +436,8 @@ security { +@@ -557,8 +557,8 @@ security { # member. This can allow for some finer-grained access # controls. # @@ -24,5 +28,5 @@ index c62f4ff..0b4a84e 100644 # Core dumps are a bad thing. This should only be set to # 'yes' if you're debugging a problem with the server. -- -1.9.1 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/0003-configure.ac-allow-cross-compilation.patch b/meta-networking/recipes-connectivity/freeradius/files/0003-configure.ac-allow-cross-compilation.patch new file mode 100644 index 0000000000..3635412d3b --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0003-configure.ac-allow-cross-compilation.patch @@ -0,0 +1,39 @@ +From ba1390a80662ff2ab7bfda978cde7df9a871f6ae Mon Sep 17 00:00:00 2001 +From: Changqing Li <changqing.li@windriver.com> +Date: Tue, 24 Jul 2018 15:03:39 +0800 +Subject: [PATCH] configure.ac: allow cross-compilation + +The checking OpenSSL library and header version consistency will +always fail in cross compiling, skip the check and give a warning +instead for cross compiling. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> + +Update to new version 3.0.17 to fix patch warning +Signed-off-by: Changqing Li <changqing.li@windriver.com> + +Rebased for 3.2.3 +Signed-off-by: Randy MacLeod <randy.macleod@windriver.com> +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> + +--- + src/modules/rlm_krb5/configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac +index 9ee6379ea4..1dad481da8 100644 +--- a/src/modules/rlm_krb5/configure.ac ++++ b/src/modules/rlm_krb5/configure.ac +@@ -143,7 +143,8 @@ if test "$krb5threadsafe" != "no"; then + FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe) + if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then + AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])], +- [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])]) ++ [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])], ++ [AC_MSG_WARN(cross compiling: not checking)]) + fi + else + krb5threadsafe="" diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch b/meta-networking/recipes-connectivity/freeradius/files/0004-Fix-libtool-detection.patch index 4265f9d0de..479e1ba76f 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-detection.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0004-Fix-libtool-detection.patch @@ -1,9 +1,7 @@ -From bfe4d7ed72edc9d4ae1a0f0d2dd84367d6214886 Mon Sep 17 00:00:00 2001 +From 5ba3d140842268cbbdd983266efecb1fba5bdd59 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 +Subject: [PATCH] Fix libtool detection Use LT_INIT instead of the deprecated AC_PROG_LIBTOOL to detect libtool, so it can work with our libtoolize and libtool. @@ -12,37 +10,20 @@ Simplify the detection of ltdl. It will find the ltdl from the sysroot; the switch --with-system-libltdl is no longer needed. The code is copied from pulseaudio configure.ac, together with the comment paragraph. -Also patch autogen.sh so it uses autoreconf, which handles libtoolize better. +Upstream-Status: Inappropriate [embedded specific] 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(-) + 1 file changed, 36 insertions(+) -diff --git a/autogen.sh b/autogen.sh -index a1d08a6..959182b 100755 ---- a/autogen.sh -+++ b/autogen.sh -@@ -6,10 +6,7 @@ cd $parentdir - parentdir=`pwd` - m4include="-I$parentdir -I$parentdir/m4 -Im4" - --libtoolize -f -c --#aclocal --autoheader --autoconf -+autoreconf -Wcross --verbose --install --force - - mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`" - mysubdirs=`echo $mysubdirs` diff --git a/configure.ac b/configure.ac -index a7abf00..65db61e 100644 +index ad8bc8cdda..ef8fced680 100644 --- a/configure.ac +++ b/configure.ac -@@ -220,6 +220,42 @@ dnl # See if we have Git. +@@ -321,6 +321,42 @@ dnl # See if we have Git. dnl # AC_CHECK_PROG(GIT, git, yes, no) @@ -86,5 +67,5 @@ index a7abf00..65db61e 100644 dnl AC_ARG_WITH(disablemodulefoo, dnl [ --without-rlm_foo Disables module compilation. Module list:] -- -2.7.4 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch b/meta-networking/recipes-connectivity/freeradius/files/0005-configure.ac-add-option-for-libcap.patch index 4719358722..8ef3c4bdf9 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-add-option-for-libcap.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0005-configure.ac-add-option-for-libcap.patch @@ -1,7 +1,7 @@ -From 98a9eff357959d1113e33a615c2178751d5b2054 Mon Sep 17 00:00:00 2001 +From 9548dc5e1a6c835cd4f387ba384d8f3f14c3fc8b 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 +Subject: [PATCH] configure.ac: add option for libcap Upstream-Status: Pending @@ -12,10 +12,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com> 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac -index 65db61e..6486aac 100644 +index ef8fced680..263098f7fd 100644 --- a/configure.ac +++ b/configure.ac -@@ -977,6 +977,22 @@ fi +@@ -1161,6 +1161,22 @@ fi dnl Set by FR_SMART_CHECKLIB LIBS="${old_LIBS}" @@ -38,7 +38,7 @@ index 65db61e..6486aac 100644 dnl Check for cap dnl extra argument: --with-cap-lib-dir=DIR cap_lib_dir= -@@ -1010,15 +1026,17 @@ AC_ARG_WITH(cap-include-dir, +@@ -1194,15 +1210,17 @@ AC_ARG_WITH(cap-include-dir, ;; esac]) @@ -66,5 +66,5 @@ index 65db61e..6486aac 100644 dnl # -- -2.7.4 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/0006-Avoid-searching-host-dirs.patch b/meta-networking/recipes-connectivity/freeradius/files/0006-Avoid-searching-host-dirs.patch new file mode 100644 index 0000000000..510136da1f --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0006-Avoid-searching-host-dirs.patch @@ -0,0 +1,223 @@ +From 8fe25b30b6fbb3170705f4468eb4c92eef3a968f Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Mon, 4 Jan 2016 01:44:04 -0500 +Subject: [PATCH] Avoid searching host dirs + +Don't search the hardcoded host dirs to avoid +host contamination. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> + +Rebased for 3.2.3 +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + m4/fr_smart_check_include.m4 | 2 +- + m4/fr_smart_check_lib.m4 | 22 ---------------------- + src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++--- + src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +- + src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++-- + src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++-- + 9 files changed, 15 insertions(+), 37 deletions(-) + +diff --git a/m4/fr_smart_check_include.m4 b/m4/fr_smart_check_include.m4 +index e7d4443f9c..2b69704f98 100644 +--- a/m4/fr_smart_check_include.m4 ++++ b/m4/fr_smart_check_include.m4 +@@ -9,7 +9,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'` + old_CPPFLAGS="$CPPFLAGS" + smart_include= + dnl # The default directories we search in (in addition to the compilers search path) +-smart_include_dir="/usr/local/include /opt/include" ++smart_include_dir="" + + dnl # Our local versions + _smart_try_dir= +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac +index 0d94ee9bf6..6108e62054 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac +@@ -58,14 +58,14 @@ AC_ARG_WITH(ibmdb2-dir, + esac]) + + dnl Check for SQLConnect in -ldb2 +-smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib" ++smart_try_dir="$ibmdb2_lib_dir" + FR_SMART_CHECK_LIB(db2, SQLConnect) + if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then + FR_MODULE_FAIL([libdb2]) + fi + + dnl Check for sqlcli.h +-smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include" ++smart_try_dir="$ibmdb2_include_dir" + FR_SMART_CHECK_INCLUDE(sqlcli.h) + if test "x$ac_cv_header_sqlcli_h" != xyes; then + FR_MODULE_FAIL([sqlcli.h]) +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac +index 5aa7b4b6ee..2eda5b6cc5 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac +@@ -58,14 +58,14 @@ AC_ARG_WITH(firebird-dir, + esac]) + + dnl Check for isc_attach_database in -lfbclient +-smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib" ++smart_try_dir="$firebird_lib_dir" + FR_SMART_CHECK_LIB(fbclient, isc_attach_database) + if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then + FR_MODULE_FAIL([libfbclient]) + fi + + dnl Check for ibase.h +-smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include" ++smart_try_dir="$firebird_include_dir" + FR_SMART_CHECK_INCLUDE(ibase.h) + if test "x$ac_cv_header_ibase_h" != xyes; then + FR_MODULE_FAIL([ibase.h]) +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac +index d96216aca8..88cbc469f7 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac +@@ -58,14 +58,14 @@ AC_ARG_WITH(iodbc-dir, + esac]) + + dnl Check for SQLConnect in -liodbc +-smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc" ++smart_try_dir="$iodbc_lib_dir" + FR_SMART_CHECK_LIB(iodbc, SQLConnect) + if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then + FR_MODULE_FAIL([libiodbc]) + fi + + dnl Check for isql.h +-smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include" ++smart_try_dir="$iodbc_include_dir" + FR_SMART_CHECK_INCLUDE(isql.h) + if test "x$ac_cv_header_isql_h" != xyes; then + FR_MODULE_FAIL([isql.h]) +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac +index d36aecbda6..201a623d4e 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac +@@ -138,7 +138,7 @@ fi + + dnl # Check for libmysqlclient_r + if test "x$have_a_libmysqlclient" != "xyes"; then +- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql" ++ smart_try_dir="$mysql_lib_dir" + FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init) + if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then + have_a_libmysqlclient='yes' +@@ -147,7 +147,7 @@ fi + + dnl # Check for libmysqlclient + if test "x$have_a_libmysqlclient" != "xyes"; then +- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql" ++ smart_try_dir="$mysql_lib_dir" + FR_SMART_CHECK_LIB(mysqlclient, mysql_init) + if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then + have_a_libmysqlclient='yes' +@@ -242,7 +242,7 @@ if test "x$have_mysql_h" != "xyes"; then + fi + + if test "x$have_mysql_h" != "xyes"; then +- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include" ++ smart_try_dir="$mysql_include_dir" + FR_SMART_CHECK_INCLUDE(mysql/mysql.h) + if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then + AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>]) +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac +index f31b7d2c5a..67bbf66df5 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac +@@ -66,7 +66,7 @@ dnl ############################################################ + dnl # Check for header files + dnl ############################################################ + +-smart_try_dir="$oracle_include_dir /usr/local/instaclient/include" ++smart_try_dir="$oracle_include_dir" + + if test "x$ORACLE_HOME" != "x"; then + smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include" +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac +index 46587e4099..b41c51bda7 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac +@@ -43,7 +43,7 @@ AC_ARG_WITH(rlm-sql-postgresql-include-dir, + ;; + esac]) + +-smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql" ++smart_try_dir="$rlm_sql_postgresql_include_dir" + FR_SMART_CHECK_INCLUDE(libpq-fe.h) + if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then + FR_MODULE_FAIL([libpq-fe.h]) +@@ -95,7 +95,7 @@ else + ]) + fi + +-smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib" ++smart_try_dir="$rlm_sql_postgresql_lib_dir" + FR_SMART_CHECK_LIB(pq, PQconnectdb) + if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then + FR_MODULE_FAIL([libpq]) +diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac +index 3bdfae6032..ce68c312c6 100644 +--- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac ++++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac +@@ -58,14 +58,14 @@ AC_ARG_WITH(unixodbc-dir, + esac]) + + dnl Check for SQLConnect in -lodbc +-smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib" ++smart_try_dir="$unixodbc_lib_dir" + FR_SMART_CHECK_LIB(odbc, SQLConnect) + if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then + FR_MODULE_FAIL([libodbc]) + fi + + dnl Check for sql.h +-smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include" ++smart_try_dir="$unixodbc_include_dir" + FR_SMART_CHECK_INCLUDE(sql.h) + if test "x$ac_cv_header_sql_h" != xyes; then + FR_MODULE_FAIL([sql.h]) +diff --git a/m4/fr_smart_check_lib.m4 b/m4/fr_smart_check_lib.m4 +index 16ac5b3c5e..0f5e9fc6d6 100644 +--- a/m4/fr_smart_check_lib.m4 ++++ b/m4/fr_smart_check_lib.m4 +@@ -64,28 +64,6 @@ if test "x$smart_lib" = "x"; then + LIBS="$old_LIBS" + fi + +-dnl # +-dnl # Try to guess possible locations. +-dnl # +-if test "x$smart_lib" = "x"; then +- for try in /usr/local/lib /opt/lib; do +- AC_MSG_CHECKING([for $2 in -l$1 in $try]) +- LIBS="-l$1 $old_LIBS" +- CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" +- AC_TRY_LINK([extern char $2();], +- [$2()], +- [ +- smart_lib="-l$1" +- smart_ldflags="-L$try -Wl,-rpath,$try" +- AC_MSG_RESULT(yes) +- break +- ], +- [AC_MSG_RESULT(no)]) +- done +- LIBS="$old_LIBS" +- CPPFLAGS="$old_CPPFLAGS" +-fi +- + dnl # + dnl # Found it, set the appropriate variable. + dnl # diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch b/meta-networking/recipes-connectivity/freeradius/files/0007-rlm_python-add-PY_INC_DIR-in-search-dir.patch index 675940dd6c..78259d7d74 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-rlm_python-add-PY_INC_DIR.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0007-rlm_python-add-PY_INC_DIR-in-search-dir.patch @@ -1,14 +1,14 @@ -From a0bf65e04d2bbd3271cab94bd5ac93f8e877bfc5 Mon Sep 17 00:00:00 2001 +From e4ff7a2a9834e2589bc7bdda4b74f5bc962b15e6 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Wed, 27 Jan 2016 05:07:19 -0500 Subject: [PATCH] rlm_python: add PY_INC_DIR in search dir -Upstream-Status: Pending - configure option --with-rlm-python-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. +Upstream-Status: Inappropriate [embedded specific] + Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- @@ -16,18 +16,15 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/rlm_python/configure.ac b/src/modules/rlm_python/configure.ac -index 831a33a..c3792d8 100644 +index c79c327064..5f4d274990 100644 --- a/src/modules/rlm_python/configure.ac +++ b/src/modules/rlm_python/configure.ac -@@ -93,7 +93,7 @@ if test x$with_[]modname != xno; then +@@ -103,7 +103,7 @@ FR_MODULE_TEST_PASS_DO([ - 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 + 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 --- -2.10.2 - diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch b/meta-networking/recipes-connectivity/freeradius/files/0008-libtool-do-not-use-jlibtool.patch index 1954586b2b..559b857b63 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-libtool-do-not-use-jlibtool.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0008-libtool-do-not-use-jlibtool.patch @@ -1,4 +1,4 @@ -From 16bf899447fc1524ffc3c79e1d35380e5285a552 Mon Sep 17 00:00:00 2001 +From d0fa5b259c2dc942d0a43a9cf1bfc32f40c184f9 Mon Sep 17 00:00:00 2001 From: Jackie Huang <jackie.huang@windriver.com> Date: Thu, 7 Jan 2016 22:37:30 -0800 Subject: [PATCH] libtool: do not use jlibtool @@ -7,7 +7,7 @@ jlibtool is hardcoded to be used but we need to use our libtool, so fix the makfiles to make it compatible with our libtool. -Upstream-Status: Inappropriate [oe specific] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Yi Zhao <yi.zhao@windriver.com> @@ -19,7 +19,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Make.inc.in b/Make.inc.in -index 7a77625..fd8aa3e 100644 +index 05f82776ff..e78f3fe9dc 100644 --- a/Make.inc.in +++ b/Make.inc.in @@ -57,7 +57,7 @@ CPPFLAGS = @CPPFLAGS@ @@ -31,7 +31,7 @@ index 7a77625..fd8aa3e 100644 ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ -@@ -163,7 +163,7 @@ ANALYZE.c := @clang_path@ +@@ -168,7 +168,7 @@ ANALYZE.c := @clang_path@ # ifeq "$(USE_SHARED_LIBS)" "yes" TESTBINDIR = ./$(BUILD_DIR)/bin/local @@ -41,10 +41,10 @@ index 7a77625..fd8aa3e 100644 TESTBINDIR = ./$(BUILD_DIR)/bin TESTBIN = ./$(BUILD_DIR)/bin diff --git a/scripts/boiler.mk b/scripts/boiler.mk -index bccec5e..926a13e 100644 +index 2ce0c18f34..567cc0f22f 100644 --- a/scripts/boiler.mk +++ b/scripts/boiler.mk -@@ -266,6 +266,7 @@ define COMPILE_C_CMDS +@@ -272,6 +272,7 @@ define COMPILE_C_CMDS $(Q)$(ECHO) CC $< $(Q)$(strip ${COMPILE.c} -o $@ -c -MD ${CPPFLAGS} ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} \ $(addprefix -I, ${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} $<) @@ -52,7 +52,7 @@ index bccec5e..926a13e 100644 endef else # -@@ -281,6 +282,7 @@ define COMPILE_C_CMDS +@@ -287,6 +288,7 @@ define COMPILE_C_CMDS $(Q)cppcheck --enable=style -q ${CHECKFLAGS} $(filter -isystem%,${SRC_CFLAGS}) \ $(filter -I%,${SRC_CFLAGS}) $(filter -D%,${SRC_CFLAGS}) ${INCDIRS} \ $(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS} --suppress=variableScope --suppress=invalidscanf $< @@ -61,7 +61,7 @@ index bccec5e..926a13e 100644 endif diff --git a/scripts/install.mk b/scripts/install.mk -index 9164115..e38c1ed 100644 +index 916411563b..e38c1ed697 100644 --- a/scripts/install.mk +++ b/scripts/install.mk @@ -46,7 +46,7 @@ define ADD_INSTALL_RULE.exe @@ -116,10 +116,10 @@ index 9164115..e38c1ed 100644 diff --git a/scripts/libtool.mk b/scripts/libtool.mk -index 57915e1..2cb2f7d 100644 +index 381127ec2d..e83d7e6ad7 100644 --- a/scripts/libtool.mk +++ b/scripts/libtool.mk -@@ -55,7 +55,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL" +@@ -60,7 +60,9 @@ ifeq "${LIBTOOL}" "JLIBTOOL" # Tell GNU Make to use this value, rather than anything specified # on the command line. override LIBTOOL := ${JLIBTOOL} @@ -130,7 +130,7 @@ index 57915e1..2cb2f7d 100644 # When using libtool, it produces a '.libs' directory. Ensure that it # is removed on "make clean", too. -@@ -69,11 +71,19 @@ clean: .libs_clean +@@ -74,11 +76,19 @@ clean: .libs_clean # Re-define compilers and linkers # OBJ_EXT = lo @@ -156,5 +156,5 @@ index 57915e1..2cb2f7d 100644 # LIBTOOL_ENDINGS - Given a library ending in ".a" or ".so", replace that -- -2.10.2 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch b/meta-networking/recipes-connectivity/freeradius/files/0009-Fix-quoting-for-BUILD_WITH.patch index b0929c4b07..9386675e46 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-quoting-for-BUILT_WITH.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0009-Fix-quoting-for-BUILD_WITH.patch @@ -1,4 +1,7 @@ -Fix quoting for BUILD_WITH +From 3e701d6274924adaed568e22af2362aa5af1f055 Mon Sep 17 00:00:00 2001 +From: Peter Seebach <peter.seebach@windriver.com> +Date: Sun, 8 Jan 2023 23:01:28 +0800 +Subject: [PATCH] Fix quoting for BUILD_WITH The escaped quotes are to make the -D values produce strings which can be used to display these values. However, if the values are more @@ -16,7 +19,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/libfreeradius-server.mk b/src/main/libfreeradius-server.mk -index 4495f72..07c28f1 100644 +index 4495f72481..07c28f1968 100644 --- a/src/main/libfreeradius-server.mk +++ b/src/main/libfreeradius-server.mk @@ -18,5 +18,5 @@ SOURCES := conffile.c \ @@ -27,7 +30,7 @@ index 4495f72..07c28f1 100644 +SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\"" endif diff --git a/src/main/unittest.mk b/src/main/unittest.mk -index 09f3938..ed33952 100644 +index edd4f133a7..b5b44d5e11 100644 --- a/src/main/unittest.mk +++ b/src/main/unittest.mk @@ -21,5 +21,5 @@ TGT_PREREQS += libfreeradius-eap.a @@ -38,7 +41,7 @@ index 09f3938..ed33952 100644 +SRC_CFLAGS += -DBUILT_WITH_CPPFLAGS="\"$(CPPFLAGS)\"" -DBUILT_WITH_CFLAGS="\"$(CFLAGS)\"" -DBUILT_WITH_LDFLAGS="\"$(LDFLAGS)\"" -DBUILT_WITH_LIBS="\"$(LIBS)\"" endif diff --git a/src/modules/rlm_eap/radeapclient.mk b/src/modules/rlm_eap/radeapclient.mk -index 6068f54..7d3c556 100644 +index 6068f54813..7d3c55625b 100644 --- a/src/modules/rlm_eap/radeapclient.mk +++ b/src/modules/rlm_eap/radeapclient.mk @@ -23,7 +23,7 @@ SRC_CFLAGS += -DWITH_EAPCLIENT @@ -51,5 +54,5 @@ index 6068f54..7d3c556 100644 endif -- -2.10.2 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch b/meta-networking/recipes-connectivity/freeradius/files/0010-fix-error-for-expansion-of-macro-in-thread.h.patch index af1bff051f..051b66af8f 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-fix-error-for-expansion-of-macro.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0010-fix-error-for-expansion-of-macro-in-thread.h.patch @@ -1,4 +1,4 @@ -From 5b6d8b14f2696fcf1dca119212f9d0a0fa04defd Mon Sep 17 00:00:00 2001 +From 30ce5ccd62446349d432ff65d3fe8d46872423c8 Mon Sep 17 00:00:00 2001 From: Yi Zhao <yi.zhao@windriver.com> Date: Wed, 18 Jan 2017 14:59:39 +0800 Subject: [PATCH] fix error for expansion of macro in thread.h @@ -22,7 +22,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com> 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/include/threads.h b/src/include/threads.h -index e36d81d..2bcb6aa 100644 +index e36d81dac0..2bcb6aadcb 100644 --- a/src/include/threads.h +++ b/src/include/threads.h @@ -89,7 +89,7 @@ static _t __fr_thread_local_init_##_n(pthread_destructor_t func)\ @@ -57,5 +57,5 @@ index e36d81d..2bcb6aa 100644 #endif #endif -- -2.10.2 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch b/meta-networking/recipes-connectivity/freeradius/files/0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch new file mode 100644 index 0000000000..efa5c53c9f --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch @@ -0,0 +1,28 @@ +From f0e764826e3a85488047f7f4e94ebf91460d2c12 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 16 Jun 2017 20:10:49 -0700 +Subject: [PATCH] rlm_mschap: Use includedir instead of hardcoding /usr/include + +OE QA flags it correctly as a voilation of cross compilation +namespace + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/modules/rlm_mschap/configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/rlm_mschap/configure.ac b/src/modules/rlm_mschap/configure.ac +index 953336f475..77a18af55d 100644 +--- a/src/modules/rlm_mschap/configure.ac ++++ b/src/modules/rlm_mschap/configure.ac +@@ -77,7 +77,7 @@ else + FR_MODULE_FEATURE([opendirectory], [without opendirectory support]) + fi + +-smart_try_dir="$winbind_include_dir /usr/include/samba-4.0" ++smart_try_dir="$winbind_include_dir =/usr/include/samba-4.0" + FR_SMART_CHECK_INCLUDE(wbclient.h, [#include <stdint.h> + #include <stdbool.h>]) + if test "x$ac_cv_header_wbclient_h" != "xyes"; then diff --git a/meta-networking/recipes-connectivity/freeradius/files/0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch b/meta-networking/recipes-connectivity/freeradius/files/0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch new file mode 100644 index 0000000000..cbac989284 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch @@ -0,0 +1,55 @@ +From 0f9f18fc330fe88080be13e43f300fbf7ba4a85a Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Mon, 13 Jul 2020 07:01:45 +0000 +Subject: [PATCH] raddb/certs/Makefile: fix the existed certificate error + +Fixes: + # ./bootstrap + [snip] +openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key 'whatever' -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf +Using configuration from ./client.cnf +Check that the request matches the signature +Signature ok +ERROR:There is already a certificate for /C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org +The matching entry has the following details +Type :Valid +Expires on :200908024833Z +Serial Number :02 +File name :unknown +Subject Name :/C=FR/ST=Radius/O=Example Inc./CN=user@example.org/emailAddress=user@example.org +make: *** [Makefile:128: client.crt] Error 1 + +Add the check to fix the above error and it does the same for server.crt. + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + raddb/certs/Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile +index c9fbc9e864..d064fe252d 100644 +--- a/raddb/certs/Makefile ++++ b/raddb/certs/Makefile +@@ -92,7 +92,7 @@ server.csr server.key: server.cnf + chmod g+r server.key + + server.crt: ca.key ca.pem server.csr +- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf ++ @[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf + + server.p12: server.crt + $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER) +@@ -117,7 +117,7 @@ client.csr client.key: client.cnf + chmod g+r client.key + + client.crt: ca.key ca.pem client.csr +- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf ++ @[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf + + client.p12: client.crt + $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT) +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/0013-raddb-certs-Makefile-fix-the-occasional-verification.patch b/meta-networking/recipes-connectivity/freeradius/files/0013-raddb-certs-Makefile-fix-the-occasional-verification.patch new file mode 100644 index 0000000000..287e47adcc --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0013-raddb-certs-Makefile-fix-the-occasional-verification.patch @@ -0,0 +1,136 @@ +From bb1cb2ffc7a31c0a2bb2de51ef82d304b0a107c3 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Wed, 5 Aug 2020 07:23:11 +0000 +Subject: [PATCH] raddb/certs/Makefile: fix the occasional verification failure + +Fixes: + # cd /etc/raddb/certs + # ./bootstrap +[snip] +chmod g+r ca.key +openssl pkcs12 -in server.p12 -out server.pem -passin pass:'whatever' -passout pass:'whatever' +chmod g+r server.pem +C = FR, ST = Radius, O = Example Inc., CN = Example Server Certificate, emailAddress = admin@example.org +error 7 at 0 depth lookup: certificate signature failure +140066667427072:error:04067084:rsa routines:rsa_ossl_public_decrypt:data too large for modulus:../openssl-1.1.1g/crypto/rsa/rsa_ossl.c:553: +140066667427072:error:0D0C5006:asn1 encoding routines:ASN1_item_verify:EVP lib:../openssl-1.1.1g/crypto/asn1/a_verify.c:170: +error server.pem: verification failed +make: *** [Makefile:107: server.vrfy] Error 2 + +It seems the ca.pem mismatchs server.pem which results in failing to +execute "openssl verify -CAfile ca.pem server.pem", so add to check +the file to avoid inconsistency. + +Upstream-Status: Pending + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + raddb/certs/Makefile | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile +index d064fe252d..86f4547804 100644 +--- a/raddb/certs/Makefile ++++ b/raddb/certs/Makefile +@@ -59,7 +59,7 @@ passwords.mk: server.cnf ca.cnf client.cnf inner-server.cnf + # + ###################################################################### + dh: +- $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE) ++ @[ -f dh ] || $(OPENSSL) dhparam -out dh -2 $(DH_KEY_SIZE) + + ###################################################################### + # +@@ -69,17 +69,17 @@ dh: + ca.key ca.pem: ca.cnf + @[ -f index.txt ] || $(MAKE) index.txt + @[ -f serial ] || $(MAKE) serial +- $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \ ++ @[ -f ca.pem ] || $(OPENSSL) req -new -x509 -keyout ca.key -out ca.pem \ + -days $(CA_DEFAULT_DAYS) -config ./ca.cnf \ + -passin pass:$(PASSWORD_CA) -passout pass:$(PASSWORD_CA) + chmod g+r ca.key + + ca.der: ca.pem +- $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der ++ @[ -f ca.der ] || $(OPENSSL) x509 -inform PEM -outform DER -in ca.pem -out ca.der + + ca.crl: ca.pem +- $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA) +- $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl ++ @[ -f ca-crl.pem ] || $(OPENSSL) ca -gencrl -keyfile ca.key -cert ca.pem -config ./ca.cnf -out ca-crl.pem -key $(PASSWORD_CA) ++ @[ -f ca.crl ] || $(OPENSSL) crl -in ca-crl.pem -outform der -out ca.crl + rm ca-crl.pem + + ###################################################################### +@@ -88,18 +88,18 @@ ca.crl: ca.pem + # + ###################################################################### + server.csr server.key: server.cnf +- $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf ++ @[ -f server.csr ] || $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf + chmod g+r server.key + + server.crt: ca.key ca.pem server.csr + @[ -f server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key $(PASSWORD_CA) -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf + + server.p12: server.crt +- $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER) ++ @[ -f server.p12 ] || $(OPENSSL) pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER) + chmod g+r server.p12 + + server.pem: server.p12 +- $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER) ++ @[ -f server.pem ] || $(OPENSSL) pkcs12 -in server.p12 -out server.pem -passin pass:$(PASSWORD_SERVER) -passout pass:$(PASSWORD_SERVER) + chmod g+r server.pem + + .PHONY: server.vrfy +@@ -113,19 +113,19 @@ server.vrfy: ca.pem + # + ###################################################################### + client.csr client.key: client.cnf +- $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf ++ @[ -f client.csr ] || $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf + chmod g+r client.key + + client.crt: ca.key ca.pem client.csr + @[ -f client.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key $(PASSWORD_CA) -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf + + client.p12: client.crt +- $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT) ++ @[ -f client.p12 ] || $(OPENSSL) pkcs12 -export -in client.crt -inkey client.key -out client.p12 -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT) + chmod g+r client.p12 + cp client.p12 $(USER_NAME).p12 + + client.pem: client.p12 +- $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT) ++ @[ -f client.pem ] || $(OPENSSL) pkcs12 -in client.p12 -out client.pem -passin pass:$(PASSWORD_CLIENT) -passout pass:$(PASSWORD_CLIENT) + chmod g+r client.pem + cp client.pem $(USER_NAME).pem + +@@ -140,18 +140,18 @@ client.vrfy: ca.pem client.pem + # + ###################################################################### + inner-server.csr inner-server.key: inner-server.cnf +- $(OPENSSL) req -new -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf ++ @[ -f inner-server.csr] || $(OPENSSL) req -new -out inner-server.csr -keyout inner-server.key -config ./inner-server.cnf + chmod g+r inner-server.key + + inner-server.crt: ca.key ca.pem inner-server.csr +- $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf ++ @[ -f inner-server.crt ] || $(OPENSSL) ca -batch -keyfile ca.key -cert ca.pem -in inner-server.csr -key $(PASSWORD_CA) -out inner-server.crt -extensions xpserver_ext -extfile xpextensions -config ./inner-server.cnf + + inner-server.p12: inner-server.crt +- $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12 -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER) ++ @[ -f inner-server.p12 ] || $(OPENSSL) pkcs12 -export -in inner-server.crt -inkey inner-server.key -out inner-server.p12 -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER) + chmod g+r inner-server.p12 + + inner-server.pem: inner-server.p12 +- $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER) ++ @[ -f inner-server.pem ] || $(OPENSSL) pkcs12 -in inner-server.p12 -out inner-server.pem -passin pass:$(PASSWORD_INNER) -passout pass:$(PASSWORD_INNER) + chmod g+r inner-server.pem + + .PHONY: inner-server.vrfy +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/0014-Workaround-error-with-autoconf-2.7.patch b/meta-networking/recipes-connectivity/freeradius/files/0014-Workaround-error-with-autoconf-2.7.patch new file mode 100644 index 0000000000..17eadc7e59 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0014-Workaround-error-with-autoconf-2.7.patch @@ -0,0 +1,42 @@ +From c591da4a361496eec93625cf8c4f89bddfedaca7 Mon Sep 17 00:00:00 2001 +From: Hongxu Jia <hongxu.jia@windriver.com> +Date: Sun, 7 Feb 2021 16:02:36 +0800 +Subject: [PATCH] Workaround error with autoconf 2.7 + +While using autoconf 2.7, the AM_MISSING_PROG caused unexpected error: +... +configure.ac: error: required file 'missing' not found +... + +Since these tools were explicitly added by autotools bbclass, +remove the testing to workaround the error with autoconf 2.7 + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> +--- + configure.ac | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 263098f7fd..fc296832d8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -878,14 +878,6 @@ fi + + AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers) + +-dnl # +-dnl # FIXME This is truly gross. +-dnl # +-missing_dir=`cd $ac_aux_dir && pwd` +-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +- + AC_PATH_PROG(DIRNAME,dirname) + AC_PATH_PROG(GREP,grep) + +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/0015-bootstrap-check-commands-of-openssl-exist.patch b/meta-networking/recipes-connectivity/freeradius/files/0015-bootstrap-check-commands-of-openssl-exist.patch new file mode 100644 index 0000000000..d1d0111607 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0015-bootstrap-check-commands-of-openssl-exist.patch @@ -0,0 +1,44 @@ +From 78494ea005bd38324953b05176d6eb2c3f55af2c Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Sun, 8 Jan 2023 23:21:24 +0800 +Subject: [PATCH] bootstrap: check commands of openssl exist + +It calls openssl commands dhparam and pkcs12 in script bootstrap. These +commands are configurable based on configure options 'no-dh' and +'no-des', and may not be provided by openssl. So check existence of +these commands. If not, abort running of script bootstrap. + +1. https://github.com/openssl/openssl/blob/master/apps/build.info#L37 +2. https://github.com/openssl/openssl/blob/master/apps/build.info#L22 + +Upstream-Status: Denied [https://github.com/FreeRADIUS/freeradius-server/pull/4059] + The maintainer commented in the pull that the script could + be run on a host which provides these openssl commands. + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + raddb/certs/bootstrap | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap +index 57de8cf0d7..4641c71700 100755 +--- a/raddb/certs/bootstrap ++++ b/raddb/certs/bootstrap +@@ -13,6 +13,14 @@ + umask 027 + cd `dirname $0` + ++# check commands of openssl exist ++for cmd in dhparam pkcs12; do ++ if ! openssl ${cmd} -help >/dev/null 2>&1; then ++ echo "Error: command ${cmd} is not supported by openssl." ++ exit 1 ++ fi ++done ++ + make -h > /dev/null 2>&1 + + # +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/0016-version.c-don-t-print-build-flags.patch b/meta-networking/recipes-connectivity/freeradius/files/0016-version.c-don-t-print-build-flags.patch new file mode 100644 index 0000000000..2d67fdef05 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0016-version.c-don-t-print-build-flags.patch @@ -0,0 +1,41 @@ +From cbbb62ddda5c189c225f96bf6b599b3b3e8c8252 Mon Sep 17 00:00:00 2001 +From: Mingli Yu <mingli.yu@windriver.com> +Date: Wed, 3 Aug 2022 16:44:29 +0800 +Subject: [PATCH] version.c: don't print build flags + +Don't print the build flags to avoid collecting the build environment info. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + src/main/version.c | 13 ------------- + 1 file changed, 13 deletions(-) + +diff --git a/src/main/version.c b/src/main/version.c +index f1f1e87810..3ffcbb25a0 100644 +--- a/src/main/version.c ++++ b/src/main/version.c +@@ -589,19 +589,6 @@ void version_print(void) + DEBUG2(" unknown"); + #endif + +- DEBUG2("Compilation flags:"); +-#ifdef BUILT_WITH_CPPFLAGS +- DEBUG2(" cppflags : " BUILT_WITH_CPPFLAGS); +-#endif +-#ifdef BUILT_WITH_CFLAGS +- DEBUG2(" cflags : " BUILT_WITH_CFLAGS); +-#endif +-#ifdef BUILT_WITH_LDFLAGS +- DEBUG2(" ldflags : " BUILT_WITH_LDFLAGS); +-#endif +-#ifdef BUILT_WITH_LIBS +- DEBUG2(" libs : " BUILT_WITH_LIBS); +-#endif + DEBUG2(" "); + } + INFO("FreeRADIUS Version " RADIUSD_VERSION_STRING); +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/0017-Add-acinclude.m4-to-include-required-macros.patch b/meta-networking/recipes-connectivity/freeradius/files/0017-Add-acinclude.m4-to-include-required-macros.patch new file mode 100644 index 0000000000..f5c399e584 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/files/0017-Add-acinclude.m4-to-include-required-macros.patch @@ -0,0 +1,61 @@ +From 40abff4062d0521cf2b2a8a4660a3d2933f86f9d Mon Sep 17 00:00:00 2001 +From: Robert Yang <liezhi.yang@windriver.com> +Date: Mon, 1 Apr 2024 09:09:07 +0000 +Subject: [PATCH] Add acinclude.m4 to include required macros + +* These micro files are in the m4 directories, but the aclocal didn't + add them to aclocal.m4 automatically, so add them to acinclude.m4 + manually. + +* The runlog.m4 is added for python.m4. + +Upstream-Status: Inappropriate [OE Specific] + +Signed-off-by: Robert Yang <liezhi.yang@windriver.com> +--- + acinclude.m4 | 8 ++++++++ + m4/runlog.m4 | 17 +++++++++++++++++ + 2 files changed, 25 insertions(+) + create mode 100644 acinclude.m4 + create mode 100644 m4/runlog.m4 + +diff --git a/acinclude.m4 b/acinclude.m4 +new file mode 100644 +index 0000000000..118b7f0e5f +--- /dev/null ++++ b/acinclude.m4 +@@ -0,0 +1,8 @@ ++m4_include([m4/fr_init_module.m4]) ++m4_include([m4/ax_with_prog.m4]) ++m4_include([m4/runlog.m4]) ++m4_include([m4/python.m4]) ++m4_include([m4/ax_compare_version.m4]) ++m4_include([m4/libcurl_check_config.m4]) ++m4_include([m4/ax_ruby_devel.m4]) ++m4_include([m4/ax_prog_ruby_version.m4]) +diff --git a/m4/runlog.m4 b/m4/runlog.m4 +new file mode 100644 +index 0000000000..690efc3258 +--- /dev/null ++++ b/m4/runlog.m4 +@@ -0,0 +1,17 @@ ++## -*- Autoconf -*- ++# Copyright (C) 2001-2018 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# AM_RUN_LOG(COMMAND) ++# ------------------- ++# Run COMMAND, save the exit status in ac_status, and log it. ++# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) ++AC_DEFUN([AM_RUN_LOG], ++[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ++ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ++ ac_status=$? ++ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD ++ (exit $ac_status); }]) +-- +2.35.5 + diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch deleted file mode 100644 index 9c997661fc..0000000000 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-avoid-searching-host-dirs.patch +++ /dev/null @@ -1,197 +0,0 @@ -From dc41591d5ceb18900ec85894f8f7b7bb44bb3bd9 Mon Sep 17 00:00:00 2001 -From: Jackie Huang <jackie.huang@windriver.com> -Date: Mon, 4 Jan 2016 01:44:04 -0500 -Subject: [PATCH] avoid searching host dirs - -Don't search the hardcoded host dirs to avoid -host contamination. - -Upstream-Status: Inappropriate [cross-compile specific] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> ---- - acinclude.m4 | 4 ++-- - src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac | 4 ++-- - src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac | 4 ++-- - src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac | 4 ++-- - src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac | 6 +++--- - src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac | 2 +- - src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac | 4 ++-- - src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac | 4 ++-- - 8 files changed, 16 insertions(+), 16 deletions(-) - -diff --git a/acinclude.m4 b/acinclude.m4 -index da48acc..b513ae1 100644 ---- a/acinclude.m4 -+++ b/acinclude.m4 -@@ -178,7 +178,7 @@ if test "x$smart_lib" = "x"; then - FR_LOCATE_DIR(smart_lib_dir,[lib$1${libltdl_cv_shlibext}]) - FR_LOCATE_DIR(smart_lib_dir,[lib$1.a]) - -- for try in $smart_lib_dir /usr/local/lib /opt/lib; do -+ for try in $smart_lib_dir; do - AC_MSG_CHECKING([for $2 in -l$1 in $try]) - LIBS="-l$1 $old_LIBS" - CPPFLAGS="-L$try -Wl,-rpath,$try $old_CPPFLAGS" -@@ -218,7 +218,7 @@ ac_safe=`echo "$1" | sed 'y%./+-%__pm%'` - old_CPPFLAGS="$CPPFLAGS" - smart_include= - dnl # The default directories we search in (in addition to the compilers search path) --smart_include_dir="/usr/local/include /opt/include" -+smart_include_dir= - - dnl # Our local versions - _smart_try_dir= -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac -index 75c851a..a262d71 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_db2/configure.ac -@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then - esac]) - - dnl Check for SQLConnect in -ldb2 -- smart_try_dir="$ibmdb2_lib_dir /usr/local/db2/lib /usr/IBMdb2/V7.1/lib" -+ smart_try_dir="$ibmdb2_lib_dir" - FR_SMART_CHECK_LIB(db2, SQLConnect) - if test "x$ac_cv_lib_db2_SQLConnect" != xyes; then - fail="$fail libdb2" - fi - - dnl Check for sqlcli.h -- smart_try_dir="$ibmdb2_include_dir /usr/local/db2/include /usr/IBMdb2/V7.1/include" -+ smart_try_dir="$ibmdb2_include_dir" - FR_SMART_CHECK_INCLUDE(sqlcli.h) - if test "x$ac_cv_header_sqlcli_h" != xyes; then - fail="$fail sqlcli.h" -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac -index 4da57b3..752b043 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_firebird/configure.ac -@@ -56,14 +56,14 @@ if test x$with_[]modname != xno; then - esac]) - - dnl Check for isc_attach_database in -lfbclient -- smart_try_dir="$firebird_lib_dir /usr/lib/firebird2/lib /usr/local/firebird/lib" -+ smart_try_dir="$firebird_lib_dir" - FR_SMART_CHECK_LIB(fbclient, isc_attach_database) - if test "x$ac_cv_lib_fbclient_isc_attach_database" != xyes; then - fail="$fail libfbclient" - fi - - dnl Check for ibase.h -- smart_try_dir="$firebird_include_dir /usr/lib/firebird2/include /usr/local/firebird/include" -+ smart_try_dir="$firebird_include_dir" - FR_SMART_CHECK_INCLUDE(ibase.h) - if test "x$ac_cv_header_ibase_h" != xyes; then - fail="$fail ibase.h" -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac -index ba6304f..3393557 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_iodbc/configure.ac -@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then - esac]) - - dnl Check for SQLConnect in -liodbc -- smart_try_dir="$iodbc_lib_dir /usr/lib /usr/lib/iodbc /usr/local/lib/iodbc /usr/local/iodbc/lib/iodbc" -+ smart_try_dir="$iodbc_lib_dir" - FR_SMART_CHECK_LIB(iodbc, SQLConnect) - if test "x$ac_cv_lib_iodbc_SQLConnect" != xyes; then - fail="$fail libiodbc" - fi - - dnl Check for isql.h -- smart_try_dir="$iodbc_include_dir /usr/include /usr/include/iodbc /usr/local/iodbc/include" -+ smart_try_dir="$iodbc_include_dir" - FR_SMART_CHECK_INCLUDE(isql.h) - if test "x$ac_cv_header_isql_h" != xyes; then - fail="$fail isql.h" -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac -index 1401677..2e7db44 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_mysql/configure.ac -@@ -136,7 +136,7 @@ if test x$with_[]modname != xno; then - - dnl # Check for libmysqlclient_r - if test "x$have_a_libmysqlclient" != "xyes"; then -- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql" -+ smart_try_dir="$mysql_lib_dir" - FR_SMART_CHECK_LIB(mysqlclient_r, mysql_init) - if test "x$ac_cv_lib_mysqlclient_r_mysql_init" = "xyes"; then - have_a_libmysqlclient='yes' -@@ -145,7 +145,7 @@ if test x$with_[]modname != xno; then - - dnl # Check for libmysqlclient - if test "x$have_a_libmysqlclient" != "xyes"; then -- smart_try_dir="$mysql_lib_dir /usr/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib/mysql" -+ smart_try_dir="$mysql_lib_dir" - FR_SMART_CHECK_LIB(mysqlclient, mysql_init) - if test "x$ac_cv_lib_mysqlclient_mysql_init" = "xyes"; then - have_a_libmysqlclient='yes' -@@ -189,7 +189,7 @@ if test x$with_[]modname != xno; then - fi - - if test "x$have_mysql_h" != "xyes"; then -- smart_try_dir="$mysql_include_dir /usr/local/include /usr/local/mysql/include" -+ smart_try_dir="$mysql_include_dir" - FR_SMART_CHECK_INCLUDE(mysql/mysql.h) - if test "x$ac_cv_header_mysql_mysql_h" = "xyes"; then - AC_DEFINE(HAVE_MYSQL_MYSQL_H, [], [Define if you have <mysql/mysql.h>]) -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac -index 3178462..5cbc8c2 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_oracle/configure.ac -@@ -63,7 +63,7 @@ if test x$with_[]modname != xno; then - dnl # Check for header files - dnl ############################################################ - -- smart_try_dir="$oracle_include_dir /usr/local/instaclient/include" -+ smart_try_dir="$oracle_include_dir" - - if test "x$ORACLE_HOME" != "x"; then - smart_try_dir="${smart_try_dir} ${ORACLE_HOME}/include" -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac -index 4f9a890..e1cf811 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_postgresql/configure.ac -@@ -41,7 +41,7 @@ if test x$with_[]modname != xno; then - esac ] - ) - -- smart_try_dir="$rlm_sql_postgresql_include_dir /usr/include/postgresql /usr/local/pgsql/include /usr/include/pgsql" -+ smart_try_dir="$rlm_sql_postgresql_include_dir" - FR_SMART_CHECK_INCLUDE(libpq-fe.h) - if test "x$ac_cv_header_libpqmfe_h" != "xyes"; then - fail="$fail libpq-fe.h" -@@ -76,7 +76,7 @@ if test x$with_[]modname != xno; then - ]) - fi - -- smart_try_dir="$rlm_sql_postgresql_lib_dir /usr/lib /usr/local/pgsql/lib" -+ smart_try_dir="$rlm_sql_postgresql_lib_dir" - FR_SMART_CHECK_LIB(pq, PQconnectdb) - if test "x$ac_cv_lib_pq_PQconnectdb" != "xyes"; then - fail="$fail libpq" -diff --git a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac -index 3545387..c543ed4 100644 ---- a/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac -+++ b/src/modules/rlm_sql/drivers/rlm_sql_unixodbc/configure.ac -@@ -57,14 +57,14 @@ if test x$with_[]modname != xno; then - esac]) - - dnl Check for SQLConnect in -lodbc -- smart_try_dir="$unixodbc_lib_dir /usr/local/unixodbc/lib" -+ smart_try_dir="$unixodbc_lib_dir" - FR_SMART_CHECK_LIB(odbc, SQLConnect) - if test "x$ac_cv_lib_odbc_SQLConnect" != xyes; then - fail="$fail libodbc" - fi - - dnl Check for sql.h -- smart_try_dir="$unixodbc_include_dir /usr/local/unixodbc/include" -+ smart_try_dir="$unixodbc_include_dir" - FR_SMART_CHECK_INCLUDE(sql.h) - if test "x$ac_cv_header_sql_h" != xyes; then - fail="$fail sql.h" --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch b/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch deleted file mode 100644 index 38e7c36227..0000000000 --- a/meta-networking/recipes-connectivity/freeradius/files/freeradius-configure.ac-allow-cross-compilation.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 0780b7053fb0d33d721aa70ab2ecd75299e5ba31 Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Tue, 24 Jul 2018 15:03:39 +0800 -Subject: [PATCH] configure.ac: allow cross-compilation - -The checking OpenSSL library and header version consistency will -always fail in cross compiling, skip the check and give a warning -instead for cross compiling. - -Upstream-Status: Inappropriate[embedded specific] - -Signed-off-by: Jackie Huang <jackie.huang@windriver.com> -Signed-off-by: Yi Zhao <yi.zhao@windriver.com> - -update to new version 3.0.17 to fix patch warning -Signed-off-by: Changqing Li <changqing.li@windriver.com> ---- - src/modules/rlm_krb5/configure.ac | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/modules/rlm_krb5/configure.ac b/src/modules/rlm_krb5/configure.ac -index efc9f29..98a97e4 100644 ---- a/src/modules/rlm_krb5/configure.ac -+++ b/src/modules/rlm_krb5/configure.ac -@@ -137,7 +137,8 @@ if test x$with_[]modname != xno; then - FR_SMART_CHECK_LIB(krb5, krb5_is_thread_safe) - if test "x$ac_cv_lib_krb5_krb5_is_thread_safe" = xyes; then - AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <krb5.h>]], [[return krb5_is_thread_safe() ? 0 : 1]])], -- [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])]) -+ [krb5threadsafe="-DKRB5_IS_THREAD_SAFE"], [AC_MSG_WARN([[libkrb5 is not threadsafe]])], -+ [AC_MSG_WARN(cross compiling: not checking)]) - fi - else - krb5threadsafe="" --- -2.7.4 - diff --git a/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf b/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf index fa62962975..f3619dddb6 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf +++ b/meta-networking/recipes-connectivity/freeradius/files/radiusd-volatiles.conf @@ -1,2 +1,2 @@ d /var/log/radius 0755 radiusd radiusd - -d /var/run/radiusd 0755 radiusd radiusd - +d /run/radiusd 0755 radiusd radiusd - diff --git a/meta-networking/recipes-connectivity/freeradius/files/radiusd.service b/meta-networking/recipes-connectivity/freeradius/files/radiusd.service index 8dae0df5bd..7969bfb690 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/radiusd.service +++ b/meta-networking/recipes-connectivity/freeradius/files/radiusd.service @@ -4,10 +4,11 @@ After=syslog.target network.target [Service] Type=forking -PIDFile=@STATEDIR@/run/radiusd/radiusd.pid -ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd @STATEDIR@/run/radiusd +EnvironmentFile=-/etc/sysconfig/radiusd +PIDFile=/run/radiusd/radiusd.pid +ExecStartPre=-@BASE_BINDIR@/chown -R radiusd:radiusd /run/radiusd ExecStartPre=@SBINDIR@/radiusd -C -ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/raddb +ExecStart=@SBINDIR@/radiusd -d @SYSCONFDIR@/${MLPREFIX}raddb ExecReload=@SBINDIR@/radiusd -C ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.19.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.19.bb deleted file mode 100644 index ded1a67fff..0000000000 --- a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.19.bb +++ /dev/null @@ -1,230 +0,0 @@ -DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \ -protocol, as defined in RFC 2865 (and others). It allows Network Access \ -Servers (NAS boxes) to perform authentication for dial-up users. There are \ -also RADIUS clients available for Web servers, firewalls, Unix logins, and \ -more. Using RADIUS allows authentication and authorization for a network to \ -be centralized, and minimizes the amount of re-configuration which has to be \ -done when adding or deleting new users." - -SUMMARY = "High-performance and highly configurable RADIUS server" -HOMEPAGE = "http://www.freeradius.org/" -SECTION = "System/Servers" -LICENSE = "GPLv2 & LGPLv2+" -LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a" -DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc" - -SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.0.x; \ - file://freeradius \ - file://volatiles.58_radiusd \ - file://freeradius-enble-user-in-conf.patch \ - file://freeradius-configure.ac-allow-cross-compilation.patch \ - file://freeradius-libtool-detection.patch \ - file://freeradius-configure.ac-add-option-for-libcap.patch \ - file://freeradius-avoid-searching-host-dirs.patch \ - file://freeradius-rlm_python-add-PY_INC_DIR.patch \ - file://freeradius-libtool-do-not-use-jlibtool.patch \ - 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://radiusd.service \ - file://radiusd-volatiles.conf \ -" - -SRCREV = "ab4c767099f263a7cd4109bcdca80ee74210a769" - -PARALLEL_MAKE = "" - -S = "${WORKDIR}/git" - -LDFLAGS_append_powerpc = " -latomic" -LDFLAGS_append_mipsarch = " -latomic" - -EXTRA_OECONF = " --enable-strict-dependencies \ - --with-docdir=${docdir}/freeradius-${PV} \ - --with-openssl-includes=${STAGING_INCDIR} \ - --with-openssl-libraries=${STAGING_LIBDIR} \ - --without-rlm_ippool \ - --without-rlm_cache_memcached \ - --without-rlm_counter \ - --without-rlm_couchbase \ - --without-rlm_dbm \ - --without-rlm_eap_tnc \ - --without-rlm_eap_ikev2 \ - --without-rlm_opendirectory \ - --without-rlm_redis \ - --without-rlm_rediswho \ - --without-rlm_sql_db2 \ - --without-rlm_sql_firebird \ - --without-rlm_sql_freetds \ - --without-rlm_sql_iodbc \ - --without-rlm_sql_oracle \ - --without-rlm_sql_sybase \ - --without-rlm_sqlhpwippool \ - --without-rlm_securid \ - --without-rlm_unbound \ - ac_cv_path_PERL=${bindir}/perl \ - ax_cv_cc_builtin_choose_expr=no \ - ax_cv_cc_builtin_types_compatible_p=no \ - ax_cv_cc_builtin_bswap64=no \ - ax_cv_cc_bounded_attribute=no \ -" - -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" -PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam" -PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" -PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap" -PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5" -PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3" -PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc" -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[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 -# correctly. -inherit cpan-base python-dir - -# The modules subdirs also need to be processed by autoreconf. Use autogen.sh -# in order to handle the subdirs correctly. -do_configure () { - ./autogen.sh - - # the configure of rlm_perl needs this to get correct - # mod_cflags and mod_ldflags - if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then - export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" - fi - - oe_runconf - - # we don't need dhcpclient - sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk -} - -INITSCRIPT_NAME = "radiusd" - -SYSTEMD_SERVICE_${PN} = "radiusd.service" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd" - -do_install() { - rm -rf ${D} - mkdir -p ${D}/${sysconfdir}/logrotate.d - mkdir -p ${D}/${sysconfdir}/pam.d - mkdir -p ${D}/${sysconfdir}/init.d - mkdir -p ${D}/${localstatedir}/lib/radiusd - mkdir -p ${D}${sysconfdir}/default/volatiles - - export LD_LIBRARY_PATH=${D}/${libdir} - oe_runmake install R=${D} INSTALLSTRIP="" - - # remove unsupported config files - rm -f ${D}/${sysconfdir}/raddb/experimental.conf - - # remove scripts that required Perl(DBI) - rm -rf ${D}/${bindir}/radsqlrelay - - cp -f ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd - rm -f ${D}/${sbindir}/rc.radiusd - chmod +x ${D}/${sysconfdir}/init.d/radiusd - rm -rf ${D}/${localstatedir}/run/ - 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}${sysconfdir}/tmpfiles.d/ - install -m 0644 ${WORKDIR}/radiusd-volatiles.conf ${D}${sysconfdir}/tmpfiles.d/ - fi -} - -# This is only needed when we install/update on a running target. -# -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 - elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then - ${sysconfdir}/init.d/populate-volatile.sh update - fi - - # Fix ownership for /etc/raddb/*, /var/lib/radiusd - chown -R radiusd:radiusd ${sysconfdir}/raddb - chown -R radiusd:radiusd ${localstatedir}/lib/radiusd - fi -} - -# We really need the symlink :( -INSANE_SKIP_${PN} = "dev-so" -INSANE_SKIP_${PN}-krb5 = "dev-so" -INSANE_SKIP_${PN}-ldap = "dev-so" -INSANE_SKIP_${PN}-mysql = "dev-so" -INSANE_SKIP_${PN}-perl = "dev-so" -INSANE_SKIP_${PN}-postgresql = "dev-so" -INSANE_SKIP_${PN}-python = "dev-so" -INSANE_SKIP_${PN}-unixodbc = "dev-so" - -PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \ - ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc" - -FILES_${PN}-utils = "${bindir}/*" - -FILES_${PN}-ldap = "${libdir}/rlm_ldap.so* \ - ${sysconfdir}/raddb/mods-available/ldap \ -" - -FILES_${PN}-krb5 = "${libdir}/rlm_krb5.so* \ - ${sysconfdir}/raddb/mods-available/krb5 \ -" - -FILES_${PN}-perl = "${libdir}/rlm_perl.so* \ - ${sysconfdir}/raddb/mods-config/perl \ - ${sysconfdir}/raddb/mods-available/perl \ -" - -FILES_${PN}-python = "${libdir}/rlm_python.so* \ - ${sysconfdir}/raddb/mods-config/python \ - ${sysconfdir}/raddb/mods-available/python \ -" - -FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \ - ${sysconfdir}/raddb/mods-config/sql/*/mysql \ - ${sysconfdir}/raddb/mods-available/sql \ -" - -FILES_${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \ - ${sysconfdir}/raddb/mods-config/sql/*/postgresql \ -" - -FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*" - -FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" - -RDEPENDS_${PN} += "perl" -RDEPENDS_${PN}-utils = "${PN} perl" diff --git a/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.3.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.3.bb new file mode 100644 index 0000000000..7ea63a65d3 --- /dev/null +++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.3.bb @@ -0,0 +1,298 @@ +DESCRIPTION = "FreeRADIUS is an Internet authentication daemon, which implements the RADIUS \ +protocol, as defined in RFC 2865 (and others). It allows Network Access \ +Servers (NAS boxes) to perform authentication for dial-up users. There are \ +also RADIUS clients available for Web servers, firewalls, Unix logins, and \ +more. Using RADIUS allows authentication and authorization for a network to \ +be centralized, and minimizes the amount of re-configuration which has to be \ +done when adding or deleting new users." + +SUMMARY = "High-performance and highly configurable RADIUS server" +HOMEPAGE = "http://www.freeradius.org/" +SECTION = "System/Servers" +LICENSE = "GPL-2.0-only & LGPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=eb723b61539feef013de476e68b5c50a" +DEPENDS = "openssl-native openssl libidn libtool libpcap libtalloc" + +SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.2.x;lfs=0;;protocol=https \ + file://freeradius \ + file://volatiles.58_radiusd \ + file://radiusd.service \ + file://radiusd-volatiles.conf \ + file://0001-Add-autogen.sh.patch \ + file://0002-Enable-and-change-user-and-group-of-freeradius-serve.patch \ + file://0003-configure.ac-allow-cross-compilation.patch \ + file://0004-Fix-libtool-detection.patch \ + file://0005-configure.ac-add-option-for-libcap.patch \ + file://0006-Avoid-searching-host-dirs.patch \ + file://0007-rlm_python-add-PY_INC_DIR-in-search-dir.patch \ + file://0008-libtool-do-not-use-jlibtool.patch \ + file://0009-Fix-quoting-for-BUILD_WITH.patch \ + file://0010-fix-error-for-expansion-of-macro-in-thread.h.patch \ + file://0011-rlm_mschap-Use-includedir-instead-of-hardcoding-usr-.patch \ + file://0012-raddb-certs-Makefile-fix-the-existed-certificate-err.patch \ + file://0013-raddb-certs-Makefile-fix-the-occasional-verification.patch \ + file://0014-Workaround-error-with-autoconf-2.7.patch \ + file://0015-bootstrap-check-commands-of-openssl-exist.patch \ + file://0016-version.c-don-t-print-build-flags.patch \ + file://0017-Add-acinclude.m4-to-include-required-macros.patch \ +" + +raddbdir = "${sysconfdir}/${MLPREFIX}raddb" + +SRCREV = "db3d1924d9a2e8d37c43872932621f69cfdbb099" + +UPSTREAM_CHECK_GITTAGREGEX = "release_(?P<pver>\d+(\_\d+)+)" + +CVE_STATUS[CVE-2002-0318] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." +CVE_STATUS[CVE-2011-4966] = "fixed-version: The CPE in the NVD database doesn't reflect correctly the vulnerable versions." + +PARALLEL_MAKE = "" + +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} \ + --with-openssl-includes=${STAGING_INCDIR} \ + --with-openssl-libraries=${STAGING_LIBDIR} \ + --with-raddbdir=${raddbdir} \ + --without-rlm_ippool \ + --without-rlm_cache_memcached \ + --without-rlm_counter \ + --without-rlm_couchbase \ + --without-rlm_dbm \ + --without-rlm_eap_tnc \ + --without-rlm_eap_ikev2 \ + --without-rlm_opendirectory \ + --without-rlm_redis \ + --without-rlm_rediswho \ + --without-rlm_cache_redis \ + --without-rlm_sql_db2 \ + --without-rlm_sql_firebird \ + --without-rlm_sql_freetds \ + --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 \ + ax_cv_cc_builtin_bswap64=no \ + ax_cv_cc_bounded_attribute=no \ +" + +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" +PACKAGECONFIG[pam] = "--with-rlm_pam,--without-rlm_pam,libpam" +PACKAGECONFIG[libcap] = "--with-libcap,--without-libcap,libcap" +PACKAGECONFIG[ldap] = "--with-rlm_ldap,--without-rlm_ldap,openldap" +PACKAGECONFIG[mysql] = "--with-rlm_sql_mysql,--without-rlm_sql_mysql,mysql5" +PACKAGECONFIG[sqlite] = "--with-rlm_sql_sqlite,--without-rlm_sql_sqlite,sqlite3" +PACKAGECONFIG[unixodbc] = "--with-rlm_sql_unixodbc,--without-rlm_sql_unixodbc,unixodbc" +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[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 --without-rlm_json,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 multilib_script multilib_header + +MULTILIB_SCRIPTS = "${PN}:${sbindir}/checkrad" + +# This is not a cpan or python based package, but it needs some definitions +# from cpan-base and python3-dir bbclasses for building rlm_perl and rlm_python +# correctly. +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. +do_configure() { + ./autogen.sh + + # the configure of rlm_perl needs this to get correct + # mod_cflags and mod_ldflags + if ${@bb.utils.contains('PACKAGECONFIG', 'perl', 'true', 'false', d)}; then + export PERL5LIB="${STAGING_LIBDIR}${PERL_OWN_DIR}/perl/${@get_perl_version(d)}" + fi + + oe_runconf + + # we don't need dhcpclient + sed -i -e 's/dhcpclient.mk//' ${S}/src/modules/proto_dhcp/all.mk +} + +INITSCRIPT_NAME = "radiusd" + +SYSTEMD_SERVICE:${PN} = "radiusd.service" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd" + +do_install() { + rm -rf ${D} + install -d ${D}/${sysconfdir}/logrotate.d + install -d ${D}/${sysconfdir}/pam.d + install -d ${D}/${localstatedir}/lib/radiusd + + export LD_LIBRARY_PATH=${D}/${libdir} + oe_runmake install R=${D} INSTALLSTRIP="" + + # remove unsupported config files + rm -f ${D}/${raddbdir}/experimental.conf + + # remove scripts that required Perl(DBI) + rm -rf ${D}/${bindir}/radsqlrelay + + rm -f ${D}/${sbindir}/rc.radiusd + rm -rf ${D}/${localstatedir}/run/ + rm -rf ${D}/${localstatedir}/log/ + + chown -R radiusd:radiusd ${D}/${raddbdir} + chown -R radiusd:radiusd ${D}/${localstatedir}/lib/radiusd + + # For sysvinit + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -d ${D}${sysconfdir}/init.d + install -d ${D}${sysconfdir}/default/volatiles + install -m 0755 ${WORKDIR}/freeradius ${D}/etc/init.d/radiusd + install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd + fi + + # For systemd + 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/radiusd.conf + fi + + oe_multilib_header freeradius/autoconf.h + oe_multilib_header freeradius/missing.h + oe_multilib_header freeradius/radpaths.h +} + +# This is only needed when we install/update on a running target. +# +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.conf + elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then + ${sysconfdir}/init.d/populate-volatile.sh update + fi + + # Fix ownership for /etc/raddb/*, /var/lib/radiusd + chown -R radiusd:radiusd ${raddbdir} + chown -R radiusd:radiusd ${localstatedir}/lib/radiusd + + # for radiusd.service with multilib + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${sysconfdir}/sysconfig + echo "MLPREFIX=${MLPREFIX}" > ${sysconfdir}/sysconfig/radiusd + fi + else + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d $D${sysconfdir}/sysconfig + echo "MLPREFIX=${MLPREFIX}" > $D${sysconfdir}/sysconfig/radiusd + fi + fi +} + +pkg_postrm:${PN} () { + # only try to remove ${sysconfdir}/sysconfig/radiusd for systemd + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'false', 'true', d)}; then + exit 0 + fi + + if [ -d ${sysconfdir}/raddb ]; then + exit 0 + fi + for variant in ${MULTILIB_GLOBAL_VARIANTS}; do + if [ -d ${sysconfdir}/${variant}-raddb ]; then + exit 0 + fi + done + + rm -f ${sysconfdir}/sysconfig/radiusd + rmdir --ignore-fail-on-non-empty ${sysconfdir}/sysconfig +} + +# We really need the symlink :( +INSANE_SKIP:${PN} = "dev-so" +INSANE_SKIP:${PN}-krb5 = "dev-so" +INSANE_SKIP:${PN}-ldap = "dev-so" +INSANE_SKIP:${PN}-mysql = "dev-so" +INSANE_SKIP:${PN}-perl = "dev-so" +INSANE_SKIP:${PN}-postgresql = "dev-so" +INSANE_SKIP:${PN}-python = "dev-so" +INSANE_SKIP:${PN}-unixodbc = "dev-so" + +PACKAGES =+ "${PN}-utils ${PN}-ldap ${PN}-krb5 ${PN}-perl \ + ${PN}-python ${PN}-mysql ${PN}-postgresql ${PN}-unixodbc" + +FILES:${PN}-utils = "${bindir}/*" + +FILES:${PN}-ldap = "${libdir}/rlm_ldap.so* \ + ${raddbdir}/mods-available/ldap \ +" + +FILES:${PN}-krb5 = "${libdir}/rlm_krb5.so* \ + ${raddbdir}/mods-available/krb5 \ +" + +FILES:${PN}-perl = "${libdir}/rlm_perl.so* \ + ${raddbdir}/mods-config/perl \ + ${raddbdir}/mods-available/perl \ +" + +FILES:${PN}-python = "${libdir}/rlm_python3.so* \ + ${raddbdir}/mods-config/python3 \ + ${raddbdir}/mods-available/python3 \ +" + +FILES:${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \ + ${raddbdir}/mods-config/sql/*/mysql \ + ${raddbdir}/mods-available/sql \ +" + +FILES:${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \ + ${raddbdir}/mods-config/sql/*/postgresql \ +" + +FILES:${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*" + +FILES:${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" + +RDEPENDS:${PN} += "perl" +RDEPENDS:${PN}-utils = "${PN} perl" +RDEPENDS:${PN}-krb5 = "${PN}" +RDEPENDS:${PN}-ldap = "${PN}" +RDEPENDS:${PN}-mysql = "${PN}" +RDEPENDS:${PN}-perl = "${PN}" +RDEPENDS:${PN}-postgresql = "${PN}" +RDEPENDS:${PN}-python = "${PN}" +RDEPENDS:${PN}-unixodbc = "${PN}" + +CLEANBROKEN = "1" diff --git a/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch b/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch deleted file mode 100644 index d7ca9ff8fa..0000000000 --- a/meta-networking/recipes-connectivity/kea/files/0001-remove-AC_TRY_RUN.patch +++ /dev/null @@ -1,34 +0,0 @@ -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/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch b/meta-networking/recipes-connectivity/kea/files/0003-Makefile.am-update-hooksdir-for-lease_cmds.patch deleted file mode 100644 index 381a3a7eb8..0000000000 --- a/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/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service deleted file mode 100644 index 91aa2eb14f..0000000000 --- a/meta-networking/recipes-connectivity/kea/files/kea-dhcp-ddns.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Kea DHCP-DDNS Server -Wants=network-online.target -After=network-online.target -After=time-sync.target - -[Service] -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea -ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf - -[Install] -WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service b/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service deleted file mode 100644 index f32edcb90d..0000000000 --- a/meta-networking/recipes-connectivity/kea/files/kea-dhcp4.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Kea DHCPv4 Server -Wants=network-online.target -After=network-online.target -After=time-sync.target - -[Service] -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea -ExecStart=@SBINDIR@/kea-dhcp4 -c @SYSCONFDIR@/kea/kea-dhcp4.conf - -[Install] -WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service b/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service deleted file mode 100644 index 26d2205e64..0000000000 --- a/meta-networking/recipes-connectivity/kea/files/kea-dhcp6.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Kea DHCPv6 Server -Wants=network-online.target -After=network-online.target -After=time-sync.target - -[Service] -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ -ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea -ExecStart=@SBINDIR@/kea-dhcp6 -c @SYSCONFDIR@/kea/kea-dhcp6.conf - -[Install] -WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/kea/kea_1.5.0.bb b/meta-networking/recipes-connectivity/kea/kea_1.5.0.bb deleted file mode 100644 index fb166df607..0000000000 --- a/meta-networking/recipes-connectivity/kea/kea_1.5.0.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "ISC Kea DHCP Server" -DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS." -HOMEPAGE = "http://kea.isc.org" -SECTION = "connectivity" -LICENSE = "MPL-2.0 & Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=2ed44ce4e0bbfdc1abfa6bf949b7ba3a" - -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-remove-AC_TRY_RUN.patch \ - file://kea-dhcp4.service \ - file://kea-dhcp6.service \ - file://kea-dhcp-ddns.service \ -" -SRC_URI[md5sum] = "591d38e5fcc0251a8812e8bb1337578a" -SRC_URI[sha256sum] = "edce4fab68ca7af607cf7f5bc86596e04fe0ef4b8e88906e339cdefcf21daaec" - -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 -} - -do_install_append_class-target() { - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} - sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \ - -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${systemd_system_unitdir}/kea-dhcp*service -} - -do_install_append() { - rm -rf "${D}${localstatedir}" -} - -PACKAGECONFIG ??= "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" - -FILES_${PN}-staticdev += "${libdir}/kea/hooks/*.a ${libdir}/hooks/*.a" -FILES_${PN} += "${libdir}/hooks/*.so" - -BBCLASSEXTEND += "native" diff --git a/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch b/meta-networking/recipes-connectivity/lftp/files/fix-gcc-6-conflicts-signbit.patch deleted file mode 100644 index 952232b7a7..0000000000 --- a/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/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb b/meta-networking/recipes-connectivity/lftp/lftp_4.9.2.bb index bf793d91d3..bf3e18dce7 100644 --- a/meta-networking/recipes-connectivity/lftp/lftp_4.8.4.bb +++ b/meta-networking/recipes-connectivity/lftp/lftp_4.9.2.bb @@ -3,14 +3,12 @@ DESCRIPTION = "LFTP is a sophisticated file transfer program with \ FISH, SFTP, HTTPS and FTPS protocols" HOMEPAGE = "http://lftp.yar.ru/" SECTION = "console/network" -LICENSE = "GPLv3" +LICENSE = "GPL-3.0-only" 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] = "42ec1793c386702bc2734ffbc8a5cff1" +SRC_URI[sha256sum] = "8a07cbf4df09b107fe3fc41d133ee2f6cea6ef4c33ccf06c8448ad058cd96b7e" inherit autotools gettext pkgconfig @@ -25,9 +23,9 @@ PACKAGECONFIG[gnutls] = "--with-gnutls, --without-gnutls, gnutls" PACKAGECONFIG[readline] = "--with-readline=${STAGING_INCDIR}/.. --with-readline-inc=${STAGING_INCDIR} --with-readline-lib=-lreadline, --with-readline=no, readline" PACKAGECONFIG[expat] = "--with-expat=${STAGING_INCDIR}/.. --with-expat-inc=${STAGING_INCDIR} --with-expat-lib=-lexpat, , expat" -do_install_append() { +do_install:append() { rm -rf ${D}${libdir}/charset.alias } -FILES_${PN} += "${datadir}/icons/hicolor" -FILES_${PN}-dbg += "${libdir}/lftp/${PV}/.debug" -RDEPENDS_${PN} = "perl bash readline" +FILES:${PN} += "${datadir}/icons/hicolor" +FILES:${PN}-dbg += "${libdir}/lftp/${PV}/.debug" +RDEPENDS:${PN} = "perl bash readline" diff --git a/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb b/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb deleted file mode 100644 index 53ba25e239..0000000000 --- a/meta-networking/recipes-connectivity/libdnet/libdnet_1.12.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "dumb networking library" -HOMEPAGE = "http://code.google.com/p/libdnet/" -SECTION = "libs" -LICENSE = "BSD" -LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9" - -SRC_URI = "git://github.com/dugsong/libdnet.git;nobranch=1" -SRCREV = "12fca29a6d4e99d1b923d6820887fe7b24226904" - -UPSTREAM_CHECK_GITTAGREGEX = "libdnet-(?P<pver>\d+(\.\d+)+)" - -S = "${WORKDIR}/git" - -inherit autotools - -acpaths = "-I ./config/" - -BBCLASSEXTEND = "native" diff --git a/meta-networking/recipes-connectivity/libdnet/libdnet_1.18.0.bb b/meta-networking/recipes-connectivity/libdnet/libdnet_1.18.0.bb new file mode 100644 index 0000000000..75aaf521c4 --- /dev/null +++ b/meta-networking/recipes-connectivity/libdnet/libdnet_1.18.0.bb @@ -0,0 +1,22 @@ +SUMMARY = "dumb networking library" +HOMEPAGE = "https://github.com/ofalk/libdnet" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9" + +SRC_URI = "git://github.com/ofalk/libdnet.git;nobranch=1;protocol=https" + +SRCREV = "3dfbe889b1f65077efe579da34fc1d6819fcb7f3" + +UPSTREAM_CHECK_GITTAGREGEX = "libdnet-(?P<pver>\d+(\.\d+)+)" + +S = "${WORKDIR}/git" + +inherit autotools multilib_script pkgconfig + +DEPENDS += "libcheck" + +EXTRA_AUTORECONF += "-I ./config" +BBCLASSEXTEND = "native" + +MULTILIB_SCRIPTS = "${PN}:${bindir}/dnet-config" diff --git a/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch new file mode 100644 index 0000000000..e778e8158b --- /dev/null +++ b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch @@ -0,0 +1,29 @@ +From 16d07a82242c3263ec0038c9b4c97355795d2dd9 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sat, 19 Mar 2022 23:16:51 -0700 +Subject: [PATCH] pyiec61850: Use CMAKE_INSTALL_LIBDIR from GNUInstallDirs in + cmake + +This ensures that it gets installed in platform specified system libdir +all platforms do not use /usr/lib as assumed here e.g. ppc64 uses lib64 + +Upstream-Status: Submitted [https://github.com/mz-automation/libiec61850/pull/376] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + pyiec61850/CMakeLists.txt | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +--- a/pyiec61850/CMakeLists.txt ++++ b/pyiec61850/CMakeLists.txt +@@ -31,7 +31,9 @@ endif() + + swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS}) + +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) +-install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) ++include(GNUInstallDirs) ++ ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) ++install(TARGETS _iec61850 LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}//python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) + + add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) diff --git a/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch new file mode 100644 index 0000000000..3f0490cb80 --- /dev/null +++ b/meta-networking/recipes-connectivity/libiec61850/files/0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch @@ -0,0 +1,39 @@ +From d4ddfc7a350011b7944ed8d6bca80f164dfd1387 Mon Sep 17 00:00:00 2001 +From: Romain Naour <romain.naour@smile.fr> +Date: Fri, 10 Jul 2020 17:08:34 +0200 +Subject: [PATCH] pyiec61850: don't break CMAKE_INSTALL_PATH by trying to find + python modules install path (site-packages) + +https://stackoverflow.com/questions/1242904/finding-python-site-packages-directory-with-cmake + +Signed-off-by: Romain Naour <romain.naour@smile.fr> +--- +Upstream-Status: Pending + + pyiec61850/CMakeLists.txt | 11 ++--------- + 1 file changed, 2 insertions(+), 9 deletions(-) + +diff --git a/pyiec61850/CMakeLists.txt b/pyiec61850/CMakeLists.txt +index 159ef4b..d1732a1 100644 +--- a/pyiec61850/CMakeLists.txt ++++ b/pyiec61850/CMakeLists.txt +@@ -31,14 +31,7 @@ endif() + + swig_link_libraries(iec61850 ${PYTHON_LIBRARIES} ${LIBS}) + +-# Finding python modules install path +-execute_process( +- COMMAND ${PYTHON_EXECUTABLE} -c +- "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib())" +- OUTPUT_VARIABLE PYTHON_SITE_DIR +-) +- +-install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION ${PYTHON_SITE_DIR}) +-install(TARGETS _iec61850 LIBRARY DESTINATION ${PYTHON_SITE_DIR}) ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/iec61850.py DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) ++install(TARGETS _iec61850 LIBRARY DESTINATION /usr/lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages) + + add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) +-- +2.31.1 + diff --git a/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.1.bb b/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.1.bb new file mode 100644 index 0000000000..63476d3495 --- /dev/null +++ b/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.1.bb @@ -0,0 +1,38 @@ +SUMMARY = "Open source iec61850 implementation" +DESCRIPTION = "IEC 61850 is an international standard for \ +communication systems in Substation Automation Systems \ +(SAS) and management of Decentralized Energy Resources \ +(DER). It is seen as one of the communication standards \ +of the emerging Smart Grid. \ +The project libIEC61850 provides a server and client \ +library for the IEC 61850/MMS, IEC 61850/GOOSE and IEC \ +61850-9-2/Sampled Values communication protocols \ +written in C. It is available under the GPLv3 license." +HOMEPAGE = "http://libiec61850.com" +SECTION = "console/network" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" +DEPENDS = "swig-native python3" +SRCREV = "210cf30897631fe2006ac50483caf8fd616622a2" + +SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.5;protocol=https \ + file://0001-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \ + file://0001-pyiec61850-Use-CMAKE_INSTALL_LIBDIR-from-GNUInstallD.patch \ +" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig python3-dir python3native siteinfo + +EXTRA_OECMAKE = " \ + -DBUILD_EXAMPLES=OFF \ + -DBUILD_PYTHON_BINDINGS=ON \ +" + +RDEPENDS:${PN}-python = " python3-core " +RDEPENDS:${PN} = " python3-core " + +FILES:${PN} += " \ + ${PYTHON_SITEPACKAGES_DIR}/iec61850.py \ + ${PYTHON_SITEPACKAGES_DIR}/_iec61850.so \ +" diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls/run-ptest b/meta-networking/recipes-connectivity/mbedtls/mbedtls/run-ptest new file mode 100644 index 0000000000..059ab4ecbb --- /dev/null +++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls/run-ptest @@ -0,0 +1,17 @@ +#!/bin/sh + +ptestdir=$(dirname "$(readlink -f "$0")") +cd "$ptestdir"/tests || exit + +tests=$(find * -type f -name 'test_suite_*') + +for f in $tests +do + if test -x ./"$f"; then + if ./"$f" > ./"$f".out 2> ./"$f".err; then + echo "PASS: $f" + else + echo "FAIL: $f" + fi + fi +done diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.2.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.2.bb deleted file mode 100644 index b0bd942ee8..0000000000 --- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.16.2.bb +++ /dev/null @@ -1,41 +0,0 @@ -SUMMARY = "Lightweight crypto and SSL/TLS library" -DESCRIPTION = "mbedtls is a lean open source crypto library \ -for providing SSL and TLS support in your programs. It offers \ -an intuitive API and documented header files, so you can actually \ -understand what the code does. It features: \ - \ - - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ - Camellia and XTEA \ - - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ - - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ - - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ - ECDSA and ECDH \ - - SSL v3 and TLS 1.0, 1.1 and 1.2 \ - - Abstraction layers for ciphers, hashes, public key operations, \ - platform abstraction and threading \ -" - -HOMEPAGE = "https://tls.mbed.org/" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=302d50a6369f5f22efdb674db908167a" - -SECTION = "libs" - -SRC_URI = "https://tls.mbed.org/download/mbedtls-${PV}-apache.tgz" -SRC_URI[md5sum] = "37cdec398ae9ebdd4640df74af893c95" -SRC_URI[sha256sum] = "a6834fcd7b7e64b83dfaaa6ee695198cb5019a929b2806cb0162e049f98206a4" - -inherit cmake - -PACKAGECONFIG ??= "shared-libs programs" -PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-USE_SHARED_MBEDTLS_LIBRARY=OFF" -PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" - -EXTRA_OECMAKE = "-DENABLE_TESTING=OFF -DLIB_INSTALL_DIR:STRING=${libdir}" - -PROVIDES += "polarssl" -RPROVIDES_${PN} = "polarssl" - -PACKAGES =+ "${PN}-programs" -FILES_${PN}-programs = "${bindir}/" diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb new file mode 100644 index 0000000000..301e655989 --- /dev/null +++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.8.bb @@ -0,0 +1,80 @@ +SUMMARY = "Lightweight crypto and SSL/TLS library" +DESCRIPTION = "mbedtls is a lean open source crypto library \ +for providing SSL and TLS support in your programs. It offers \ +an intuitive API and documented header files, so you can actually \ +understand what the code does. It features: \ + \ + - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ + Camellia and XTEA \ + - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ + - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ + - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ + ECDSA and ECDH \ + - SSL v3 and TLS 1.0, 1.1 and 1.2 \ + - Abstraction layers for ciphers, hashes, public key operations, \ + platform abstraction and threading \ +" + +HOMEPAGE = "https://tls.mbed.org/" + +LICENSE = "Apache-2.0 | GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=379d5819937a6c2f1ef1630d341e026d" + +SECTION = "libs" + +S = "${WORKDIR}/git" +SRCREV = "5a764e5555c64337ed17444410269ff21cb617b1" +SRC_URI = "git://github.com/Mbed-TLS/mbedtls.git;protocol=https;branch=mbedtls-2.28 \ + file://run-ptest \ + " + +inherit cmake update-alternatives ptest + +PACKAGECONFIG ??= "shared-libs programs ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF" +PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" +PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF" +# Make X.509 and TLS calls use PSA +# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md +PACKAGECONFIG[psa] = "" +PACKAGECONFIG[tests] = "-DENABLE_TESTING=ON,-DENABLE_TESTING=OFF" + +EXTRA_OECMAKE = "-DLIB_INSTALL_DIR:STRING=${libdir}" + +# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS +CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}" + +PROVIDES += "polarssl" +RPROVIDES:${PN} = "polarssl" + +PACKAGES =+ "${PN}-programs" +FILES:${PN}-programs = "${bindir}/" + +ALTERNATIVE:${PN}-programs = "hello" +ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "mbed_tls" + +CVE_STATUS[CVE-2021-43666] = "backported-patch: Fix merged upstream https://github.com/Mbed-TLS/mbedtls/pull/5310" +CVE_STATUS[CVE-2021-45451] = "backported-patch: Fix merged upstream https://github.com/Mbed-TLS/mbedtls/commit/9a4a9c66a48edfe9ece03c7e4a53310adf73a86c" + +# Strip host paths from autogenerated test files +do_compile:append() { + sed -i 's+${S}/++g' ${B}/tests/*.c 2>/dev/null || : + sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || : +} + +# Export source files/headers needed by Arm Trusted Firmware +sysroot_stage_all:append() { + sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library" + sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include" +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ + find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete + cp -fR ${S}/tests/data_files ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb new file mode 100644 index 0000000000..92a2de82a3 --- /dev/null +++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.0.bb @@ -0,0 +1,82 @@ +SUMMARY = "Lightweight crypto and SSL/TLS library" +DESCRIPTION = "mbedtls is a lean open source crypto library \ +for providing SSL and TLS support in your programs. It offers \ +an intuitive API and documented header files, so you can actually \ +understand what the code does. It features: \ + \ + - Symmetric algorithms, like AES, Blowfish, Triple-DES, DES, ARC4, \ + Camellia and XTEA \ + - Hash algorithms, like SHA-1, SHA-2, RIPEMD-160 and MD5 \ + - Entropy pool and random generators, like CTR-DRBG and HMAC-DRBG \ + - Public key algorithms, like RSA, Elliptic Curves, Diffie-Hellman, \ + ECDSA and ECDH \ + - SSL v3 and TLS 1.0, 1.1 and 1.2 \ + - Abstraction layers for ciphers, hashes, public key operations, \ + platform abstraction and threading \ +" + +HOMEPAGE = "https://tls.mbed.org/" + +LICENSE = "Apache-2.0 | GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=379d5819937a6c2f1ef1630d341e026d" + +SECTION = "libs" + +S = "${WORKDIR}/git" +SRC_URI = "git://github.com/Mbed-TLS/mbedtls.git;protocol=https;branch=master \ + git://github.com/Mbed-TLS/mbedtls-framework.git;protocol=https;branch=main;destsuffix=git/framework;name=framework \ + file://run-ptest" + +SRCREV = "2ca6c285a0dd3f33982dd57299012dacab1ff206" +SRCREV_framework = "750634d3a51eb9d61b59fd5d801546927c946588" +SRCREV_FORMAT .= "_framework" + +UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" + +inherit cmake update-alternatives ptest + +PACKAGECONFIG ??= "shared-libs programs ${@bb.utils.contains('PTEST_ENABLED', '1', 'tests', '', d)}" +PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_SHARED_MBEDTLS_LIBRARY=OFF" +PACKAGECONFIG[programs] = "-DENABLE_PROGRAMS=ON,-DENABLE_PROGRAMS=OFF" +PACKAGECONFIG[werror] = "-DMBEDTLS_FATAL_WARNINGS=ON,-DMBEDTLS_FATAL_WARNINGS=OFF" +# Make X.509 and TLS calls use PSA +# https://github.com/Mbed-TLS/mbedtls/blob/development/docs/use-psa-crypto.md +PACKAGECONFIG[psa] = "" +PACKAGECONFIG[tests] = "-DENABLE_TESTING=ON,-DENABLE_TESTING=OFF" + +EXTRA_OECMAKE = "-DLIB_INSTALL_DIR:STRING=${libdir}" + +# For now the only way to enable PSA is to explicitly pass a -D via CFLAGS +CFLAGS:append = "${@bb.utils.contains('PACKAGECONFIG', 'psa', ' -DMBEDTLS_USE_PSA_CRYPTO', '', d)}" + +PROVIDES += "polarssl" +RPROVIDES:${PN} = "polarssl" + +PACKAGES =+ "${PN}-programs" +FILES:${PN}-programs = "${bindir}/" + +ALTERNATIVE:${PN}-programs = "hello" +ALTERNATIVE_LINK_NAME[hello] = "${bindir}/hello" + +BBCLASSEXTEND = "native nativesdk" + +CVE_PRODUCT = "mbed_tls" + +# Strip host paths from autogenerated test files +do_compile:append() { + sed -i 's+${S}/++g' ${B}/tests/*.c 2>/dev/null || : + sed -i 's+${B}/++g' ${B}/tests/*.c 2>/dev/null || : +} + +# Export source files/headers needed by Arm Trusted Firmware +sysroot_stage_all:append() { + sysroot_stage_dir "${S}/library" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/library" + sysroot_stage_dir "${S}/include" "${SYSROOT_DESTDIR}/usr/share/mbedtls-source/include" +} + +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ + find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete + cp -fR ${S}/tests/data_files ${D}${PTEST_PATH}/tests/ +} diff --git a/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch b/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch index cd4291d91b..e33d8eac1d 100644 --- a/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch +++ b/meta-networking/recipes-connectivity/miniupnpd/files/0001-Add-OpenEmbedded-cross-compile-case.patch @@ -3,17 +3,15 @@ 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: Pending +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(+) -diff --git a/genconfig.sh b/genconfig.sh -index dc42462..59922e9 100755 --- a/genconfig.sh +++ b/genconfig.sh -@@ -98,6 +98,12 @@ if [ -f ../shared/tomato_version ]; then +@@ -103,6 +103,12 @@ if [ -f ../shared/tomato_version ]; then OS_VERSION="Tomato $TOMATO_VER" fi @@ -26,14 +24,14 @@ index dc42462..59922e9 100755 ${RM} ${CONFIGFILE} echo "/* MiniUPnP Project" >> ${CONFIGFILE} -@@ -318,6 +324,11 @@ case $OS_NAME in +@@ -346,6 +352,11 @@ case $OS_NAME in echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} - FW=netfilter + FW=iptables ;; + OpenEmbedded) + OS_URL=http://www.openembedded.org/ + echo "#define USE_IFACEWATCHER 1" >> ${CONFIGFILE} -+ FW=netfilter ++ FW=iptables + ;; AstLinux) OS_URL=http://www.astlinux.org/ diff --git a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20190630.bb b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb index 6b8fdca4c3..468569eef1 100644 --- a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20190630.bb +++ b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb @@ -15,17 +15,18 @@ SRC_URI = "http://miniupnp.tuxfamily.org/files/download.php?file=${BP}.tar.gz;do file://miniupnpd.service \ file://0001-Add-OpenEmbedded-cross-compile-case.patch \ " -SRC_URI[md5sum] = "394e676f555d8047be69730d9c4d23a5" -SRC_URI[sha256sum] = "29f49fe6868597d041ee29f511fa7b65781b9e4e85ef2569a2381c2079e1743e" +SRC_URI[md5sum] = "340789edd49c113afe37834cc901a1e8" +SRC_URI[sha256sum] = "218fad7af31f3c22fb4c9db28a55a2a8b5067d41f5b38f52008a057a00d2206d" IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" -do_configure_prepend() { +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 } @@ -36,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 @@ -45,4 +47,4 @@ do_install() { install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ } -SYSTEMD_SERVICE_${PN} = "miniupnpd.service" +SYSTEMD_SERVICE:${PN} = "miniupnpd.service" diff --git a/meta-networking/recipes-connectivity/mosquitto/files/1571.patch b/meta-networking/recipes-connectivity/mosquitto/files/1571.patch new file mode 100644 index 0000000000..627638ec89 --- /dev/null +++ b/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 +@@ -94,6 +94,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 diff --git a/meta-networking/recipes-connectivity/mosquitto/files/2894.patch b/meta-networking/recipes-connectivity/mosquitto/files/2894.patch new file mode 100644 index 0000000000..7374cbd26f --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/2894.patch @@ -0,0 +1,25 @@ +From: Joachim Zobel <jz-2017@heute-morgen.de> +Date: Wed, 13 Sep 2023 09:55:34 +0200 +Subject: [PATCH] Link correctly with shared websockets library if needed see: + https://github.com/eclipse/mosquitto/pull/2751 + +Patch contributed by Joachim Zobel <jz-2017@heute-morgen.de> and Daniel Engberg <daniel.engberg.lists@pyret.net> +--- +Upstream-Status: Pending + + src/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 9380a04..dce8313 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -200,7 +200,7 @@ if (WITH_WEBSOCKETS) + link_directories(${mosquitto_SOURCE_DIR}) + endif (WIN32) + else (STATIC_WEBSOCKETS) +- set (MOSQ_LIBS ${MOSQ_LIBS} websockets) ++ set (MOSQ_LIBS ${MOSQ_LIBS} websockets_shared) + endif (STATIC_WEBSOCKETS) + endif (WITH_WEBSOCKETS) + diff --git a/meta-networking/recipes-connectivity/mosquitto/files/2895.patch b/meta-networking/recipes-connectivity/mosquitto/files/2895.patch new file mode 100644 index 0000000000..853f881754 --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/files/2895.patch @@ -0,0 +1,27 @@ +From: Joachim Zobel <jz-2017@heute-morgen.de> +Date: Wed, 13 Sep 2023 10:05:43 +0200 +Subject: [PATCH] Mosquitto now waits for network-online when starting + (Closes: #1036450) + +See: https://github.com/eclipse/mosquitto/issues/2878 +--- +Upstream-Status: Pending + + service/systemd/mosquitto.service.simple | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/service/systemd/mosquitto.service.simple b/service/systemd/mosquitto.service.simple +index 15ee0d6..c2a330b 100644 +--- a/service/systemd/mosquitto.service.simple ++++ b/service/systemd/mosquitto.service.simple +@@ -1,8 +1,8 @@ + [Unit] + Description=Mosquitto MQTT Broker + Documentation=man:mosquitto.conf(5) man:mosquitto(8) +-After=network.target +-Wants=network.target ++After=network-online.target ++Wants=network-online.target + + [Service] + ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf diff --git a/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init b/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init index 6a0c12760e..d0da219d6d 100644 --- a/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init +++ b/meta-networking/recipes-connectivity/mosquitto/files/mosquitto.init @@ -1,18 +1,18 @@ -#! /bin/sh +#!/bin/sh # Based on the Debian initscript for mosquitto ### BEGIN INIT INFO -# Provides: mosquitto -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: mosquitto MQTT message broker -# Description: -# This is a message broker that supports version 3.1/3.1.1 of the MQ Telemetry +# Provides: mosquitto +# Required-Start: $remote_fs $syslog +# Required-Stop: $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: mosquitto MQTT 3.1/3.1.1 message broker +# Description: +# This is a message broker that supports version 3.1 of the MQ Telemetry # Transport (MQTT) protocol. -# +# # MQTT provides a method of carrying out messaging using a publish/subscribe # model. It is lightweight, both in terms of bandwidth usage and ease of # implementation. This makes it particularly useful at the edge of the network @@ -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/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.5.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.5.bb deleted file mode 100644 index 4bb0720ca5..0000000000 --- a/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.6.5.bb +++ /dev/null @@ -1,98 +0,0 @@ -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" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \ - file://edl-v10;md5=c09f121939f063aeb5235972be8c722c \ - file://epl-v10;md5=8d383c379e91d20ba18a52c3e7d3a979 \ - file://notice.html;md5=a00d6f9ab542be7babc2d8b80d5d2a4c \ -" -DEPENDS = "uthash" - -SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ - file://mosquitto.init \ -" - -SRC_URI[md5sum] = "12a1bd274d5ec454649a06c1bf65d802" -SRC_URI[sha256sum] = "bc71b38b5a26fc7cc772853e5607c657868db9f9a6d2b15e2b677649a0f85d20" - -inherit systemd update-rc.d useradd - -PACKAGECONFIG ??= "ssl uuid \ - ${@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 \ - WITH_BUNDLED_DEPS=no \ -" - -export LIB_SUFFIX = "${@d.getVar('baselib').replace('lib', '')}" - -do_install() { - oe_runmake 'DESTDIR=${D}' install - - 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' \ - -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ - -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ - -e 's,@SYSCONFDIR@,${sysconfdir},g' \ - ${D}${sysconfdir}/init.d/mosquitto -} - -PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" - -PACKAGE_BEFORE_PN = "${PN}-examples" - -FILES_${PN} = "${sbindir}/mosquitto \ - ${bindir}/mosquitto_passwd \ - ${sysconfdir}/mosquitto \ - ${sysconfdir}/init.d \ - ${systemd_unitdir}/system/mosquitto.service \ -" - -CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" - -FILES_libmosquitto1 = "${libdir}/libmosquitto.so.1" - -FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.1" - -FILES_${PN}-clients = "${bindir}/mosquitto_pub \ - ${bindir}/mosquitto_sub \ - ${bindir}/mosquitto_rr \ -" - -FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example" - -SYSTEMD_SERVICE_${PN} = "mosquitto.service" - -INITSCRIPT_NAME = "mosquitto" -INITSCRIPT_PARAMS = "defaults 30" - -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false \ - --user-group mosquitto" diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb new file mode 100644 index 0000000000..ea9eb4857b --- /dev/null +++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb @@ -0,0 +1,92 @@ +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-2.0 | EDL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=ca9a8f366c6babf593e374d0d7d58749 \ + file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \ + file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \ + file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \ +" +DEPENDS = "uthash cjson" + +SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \ + file://mosquitto.init \ + file://1571.patch \ + file://2894.patch \ + file://2895.patch \ +" + +SRC_URI[sha256sum] = "d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a" + +inherit systemd update-rc.d useradd cmake pkgconfig + +PACKAGECONFIG ??= "ssl websockets \ + ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ + " + +PACKAGECONFIG[manpages] = "-DDOCUMENTATION=ON,-DDOCUMENTATION=OFF,libxslt-native docbook-xsl-stylesheets-native" +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" + +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}/init.d/ + install -m 0755 ${WORKDIR}/mosquitto.init ${D}${sysconfdir}/init.d/mosquitto + sed -i -e 's,@SBINDIR@,${sbindir},g' \ + -e 's,@BASE_SBINDIR@,${base_sbindir},g' \ + -e 's,@LOCALSTATEDIR@,${localstatedir},g' \ + -e 's,@SYSCONFDIR@,${sysconfdir},g' \ + ${D}${sysconfdir}/init.d/mosquitto +} + +PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" + +PACKAGE_BEFORE_PN = "${PN}-examples" + +FILES:${PN} = "${sbindir}/mosquitto \ + ${bindir}/mosquitto_passwd \ + ${bindir}/mosquitto_ctrl \ + ${libdir}/mosquitto_dynamic_security.so \ + ${sysconfdir}/mosquitto \ + ${sysconfdir}/init.d \ + ${systemd_unitdir}/system/mosquitto.service \ +" + +CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" + +FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*" + +FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*" + +FILES:${PN}-clients = "${bindir}/mosquitto_pub \ + ${bindir}/mosquitto_sub \ + ${bindir}/mosquitto_rr \ +" + +FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example" + +SYSTEMD_SERVICE:${PN} = "mosquitto.service" + +INITSCRIPT_NAME = "mosquitto" +INITSCRIPT_PARAMS = "defaults 30" + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \ + --user-group mosquitto" + +BBCLASSEXTEND = "native" diff --git a/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb b/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.2.1.bb index 8444f0b739..c250ea8779 100644 --- a/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.1.5.bb +++ b/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.2.1.bb @@ -4,13 +4,13 @@ communication patterns. It aims to make the networking layer fast, scalable, \ and easy to use. Implemented in C, it works on a wide range of operating \ systems with no further dependencies." HOMEPAGE = "https://nanomsg.org/" -LICENSE = "MIT-X" +LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755" SECTION = "libs/networking" -SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https" -SRCREV = "1749fd7b039165a91b8d556b4df18e3e632ad830" +SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https;branch=master" +SRCREV = "fc3f684a80151a3319446fc96083a9ff384ee4fe" S = "${WORKDIR}/git" @@ -22,7 +22,7 @@ inherit cmake pkgconfig EXTRA_OECMAKE = " -DNN_ENABLE_DOC=OFF " # we don't want nanomsg-tools to be renamed to libnanomsg-tools -DEBIAN_NOAUTONAME_${PN}-tools = "1" +DEBIAN_NOAUTONAME:${PN}-tools = "1" PACKAGES =+ "${PN}-tools" -FILES_${PN}-tools = "${bindir}/*" +FILES:${PN}-tools = "${bindir}/*" diff --git a/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb b/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb new file mode 100644 index 0000000000..a6556249b7 --- /dev/null +++ b/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb @@ -0,0 +1,22 @@ +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" +SECTION = "libs/networking" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" + +SRC_URI = "git://github.com/nanomsg/nng.git;branch=master;protocol=https" +SRCREV = "85fbe7f9e4642b554d0d97f2e3ff2aa12978691a" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON" + +PACKAGECONFIG ??= "" + +PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls" + +PACKAGES =+ "${PN}-tools" +FILES:${PN}-tools = "${bindir}/*" diff --git a/meta-networking/recipes-connectivity/nanomsg/nngpp_git.bb b/meta-networking/recipes-connectivity/nanomsg/nngpp_git.bb new file mode 100644 index 0000000000..b52154025b --- /dev/null +++ b/meta-networking/recipes-connectivity/nanomsg/nngpp_git.bb @@ -0,0 +1,14 @@ +DESCRIPTION = "C++ wrapper around the nanomsg NNG API" +HOMEPAGE = "https://github.com/cwzx/nngpp" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://license.txt;md5=6d17d78c3597e0d4452fb1c63bf7c58e" +DEPENDS = "nng" + +SRCREV = "cc5d2641babab165d8a9943817c46d36c6dc17c2" +PV = "1.3.0" + +SRC_URI = "git://github.com/cwzx/nngpp;branch=master;protocol=https" + +S = "${WORKDIR}/git" + +inherit cmake diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn/0001-fix-ppp-2.5.0-build.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn/0001-fix-ppp-2.5.0-build.patch new file mode 100644 index 0000000000..2e84a334f0 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn/0001-fix-ppp-2.5.0-build.patch @@ -0,0 +1,306 @@ +From 084ef529c5fb816927ca54866f66b340265aa9f6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com> +Date: Sat, 4 Mar 2023 21:20:43 +0000 +Subject: [PATCH] Adding support for compiling against pppd-2.5.0 (or master + branch) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport +Signed-off-by: Eivind Næss <eivnaes@yahoo.com> +--- + Makefile.am | 5 +- + configure.ac | 37 +++++++- + src/nm-fortisslvpn-pppd-compat.h | 93 +++++++++++++++++++ + src/nm-fortisslvpn-pppd-plugin.c | 24 ++--- + ...-status.h => nm-fortisslvpn-pppd-status.h} | 0 + src/nm-fortisslvpn-service.c | 2 +- + 6 files changed, 145 insertions(+), 16 deletions(-) + create mode 100644 src/nm-fortisslvpn-pppd-compat.h + rename src/{nm-ppp-status.h => nm-fortisslvpn-pppd-status.h} (100%) + +diff --git a/Makefile.am b/Makefile.am +index b2e5533..e1e5ec9 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -81,7 +81,7 @@ libexec_PROGRAMS += src/nm-fortisslvpn-service + src_nm_fortisslvpn_service_SOURCES = \ + shared/nm-utils/nm-shared-utils.c \ + shared/nm-utils/nm-shared-utils.h \ +- src/nm-ppp-status.h \ ++ src/nm-fortisslvpn-pppd-status.h \ + src/nm-fortisslvpn-service.h \ + src/nm-fortisslvpn-service.c \ + shared/nm-fortissl-properties.c \ +@@ -106,7 +106,8 @@ src_nm_fortisslvpn_pppd_plugin_la_SOURCES = \ + shared/nm-utils/nm-shared-utils.c \ + shared/nm-utils/nm-shared-utils.h \ + src/nm-fortisslvpn-pppd-plugin.c \ +- src/nm-ppp-status.h ++ src/nm-fortisslvpn-pppd-compat.h \ ++ src/nm-fortisslvpn-pppd-status.h + nodist_src_nm_fortisslvpn_pppd_plugin_la_SOURCES = \ + src/nm-fortisslvpn-pppd-service-dbus.h + src_nm_fortisslvpn_pppd_plugin_la_CPPFLAGS = $(src_cppflags) +diff --git a/configure.ac b/configure.ac +index a998707..877493e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -19,7 +19,10 @@ AC_PROG_CC + AM_PROG_CC_C_O + AC_PROG_INSTALL + AC_PROG_LIBTOOL ++AC_PROG_CPP ++AC_PROG_EGREP + AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources) ++PKG_PROG_PKG_CONFIG() + + AC_GNU_SOURCE + +@@ -37,20 +40,50 @@ dnl + dnl Required headers + dnl + AC_HEADER_STDC +-AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h) ++AC_CHECK_HEADERS(fcntl.h paths.h stdarg.h stdbool.h sys/ioctl.h sys/time.h syslog.h unistd.h) + + AC_CHECK_HEADERS(pppd/pppd.h,, + AC_MSG_ERROR(couldn't find pppd.h. pppd development headers are required.)) + ++dnl ++dnl Check the presense of other pppd/*.h files ++AC_CHECK_HEADERS([ ++ pppd/chap.h ++ pppd/chap-new.h ++ pppd/chap_ms.h ++ ]) ++ ++dnl ++dnl Versions >= 2.5.0 will have pkg-config support ++PKG_CHECK_EXISTS([pppd], ++ [AS_VAR_SET([pppd_pkgconfig_support],[yes])]) ++ ++dnl ++dnl Get the version of pppd using pkg-config, assume 2.4.9 if not present ++PPPD_VERSION=2.4.5 ++if test x"$pppd_pkgconfig_support" = xyes; then ++ PPPD_VERSION=`$PKG_CONFIG --modversion pppd` ++fi ++ ++ + AC_ARG_WITH([pppd-plugin-dir], AS_HELP_STRING([--with-pppd-plugin-dir=DIR], [path to the pppd plugins directory])) + + if test -n "$with_pppd_plugin_dir" ; then + PPPD_PLUGIN_DIR="$with_pppd_plugin_dir" + else +- PPPD_PLUGIN_DIR="${libdir}/pppd/2.4.5" ++ PPPD_PLUGIN_DIR="${libdir}/pppd/$PPPD_VERSION" + fi + AC_SUBST(PPPD_PLUGIN_DIR) + ++dnl The version of pppd dictates what code can be included, i.e. enable use of ++dnl #if WITH_PPP_VERSION >= PPP_VERSION(2,5,0) in the code ++AC_DEFINE_UNQUOTED([PPP_VERSION(x,y,z)], ++ [((x & 0xFF) << 16 | (y & 0xFF) << 8 | (z & 0xFF) << 0)], ++ [Macro to help determine the particular version of pppd]) ++PPP_VERSION=$(echo $PPPD_VERSION | sed -e "s/\./\,/g") ++AC_DEFINE_UNQUOTED(WITH_PPP_VERSION, PPP_VERSION($PPP_VERSION), ++ [The real version of pppd represented as an int]) ++ + dnl + dnl Checks for typedefs, structures, and compiler characteristics. + dnl +diff --git a/src/nm-fortisslvpn-pppd-compat.h b/src/nm-fortisslvpn-pppd-compat.h +new file mode 100644 +index 0000000..9a02908 +--- /dev/null ++++ b/src/nm-fortisslvpn-pppd-compat.h +@@ -0,0 +1,93 @@ ++/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ ++/* nm-sstp-service - sstp (and other pppd) integration with NetworkManager ++ * ++ * Copyright (C) Eivind Næss, eivnaes@yahoo.com ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ */ ++ ++#ifndef __NM_FORTISSLVPN_PPPD_COMPAT_H__ ++#define __NM_FORTISSLVPN_PPPD_COMPAT_H__ ++ ++#define INET6 1 ++ ++// PPP < 2.5.0 defines and exports VERSION which overlaps with current package VERSION define. ++// this silly macro magic is to work around that. ++ ++#undef VERSION ++#include <pppd/pppd.h> ++ ++#ifndef PPPD_VERSION ++#define PPPD_VERSION VERSION ++#endif ++ ++#include <pppd/fsm.h> ++#include <pppd/ccp.h> ++#include <pppd/eui64.h> ++#include <pppd/ipcp.h> ++#include <pppd/ipv6cp.h> ++#include <pppd/eap.h> ++#include <pppd/upap.h> ++ ++#ifdef HAVE_PPPD_CHAP_H ++ #include <pppd/chap.h> ++#endif ++ ++#ifdef HAVE_PPPD_CHAP_NEW_H ++ #include <pppd/chap-new.h> ++#endif ++ ++#ifdef HAVE_PPPD_CHAP_MS_H ++ #include <pppd/chap_ms.h> ++#endif ++ ++#ifndef PPP_PROTO_CHAP ++#define PPP_PROTO_CHAP 0xc223 ++#endif ++ ++#ifndef PPP_PROTO_EAP ++#define PPP_PROTO_EAP 0xc227 ++#endif ++ ++#if WITH_PPP_VERSION < PPP_VERSION(2,5,0) ++ ++static inline bool debug_on(void) ++{ ++ return debug; ++} ++ ++static inline const char *ppp_ipparam(void) ++{ ++ return ipparam; ++} ++ ++static inline int ppp_ifunit(void) ++{ ++ return ifunit; ++} ++ ++static inline const char *ppp_ifname(void) ++{ ++ return ifname; ++} ++ ++static inline int ppp_get_mtu(int idx) ++{ ++ return netif_get_mtu(idx); ++} ++ ++#endif // #if WITH_PPP_VERSION < PPP_VERSION(2,5,0) ++#endif // #ifdef __NM_FORTISSLVPN_PPPD_COMPAT_H__ +diff --git a/src/nm-fortisslvpn-pppd-plugin.c b/src/nm-fortisslvpn-pppd-plugin.c +index f2ad262..c2efb9a 100644 +--- a/src/nm-fortisslvpn-pppd-plugin.c ++++ b/src/nm-fortisslvpn-pppd-plugin.c +@@ -23,12 +23,6 @@ + #define ___CONFIG_H__ + #include <config.h> + +-#include <pppd/pppd.h> +-#include <pppd/fsm.h> +-#include <pppd/ipcp.h> +- +-#include "nm-default.h" +- + #include <sys/types.h> + #include <string.h> + #include <sys/socket.h> +@@ -42,10 +36,12 @@ + #include <grp.h> + #include <glib/gstdio.h> + ++#include "nm-fortisslvpn-pppd-status.h" ++#include "nm-fortisslvpn-pppd-compat.h" + #include "nm-fortisslvpn-pppd-service-dbus.h" +-#include "nm-fortisslvpn-service.h" +-#include "nm-ppp-status.h" + ++#include "nm-default.h" ++#include "nm-fortisslvpn-service.h" + #include "nm-utils/nm-shared-utils.h" + #include "nm-utils/nm-vpn-plugin-macros.h" + +@@ -80,7 +76,7 @@ static struct { + + int plugin_init (void); + +-char pppd_version[] = VERSION; ++char pppd_version[] = PPPD_VERSION; + + static void + chroot_sandbox (void) +@@ -296,7 +292,7 @@ get_ip4_routes (in_addr_t ouraddr) + static void + nm_ip_up (void *data, int arg) + { +- guint32 pppd_made_up_address = htonl (0x0a404040 + ifunit); ++ guint32 pppd_made_up_address = htonl (0x0a404040 + ppp_ifunit()); + ipcp_options opts = ipcp_gotoptions[0]; + ipcp_options peer_opts = ipcp_hisoptions[0]; + GVariantBuilder builder; +@@ -317,7 +313,7 @@ nm_ip_up (void *data, int arg) + + g_variant_builder_add (&builder, "{sv}", + NM_VPN_PLUGIN_IP4_CONFIG_TUNDEV, +- g_variant_new_string (ifname)); ++ g_variant_new_string (ppp_ifname())); + + str = g_getenv ("VPN_GATEWAY"); + if (str) { +@@ -442,8 +438,14 @@ plugin_init (void) + return -1; + } + ++#if WITH_PPP_VERSION < PPP_VERSION(2,5,0) + add_notifier (&phasechange, nm_phasechange, NULL); + add_notifier (&ip_up_notifier, nm_ip_up, NULL); + add_notifier (&exitnotify, nm_exit_notify, NULL); ++#else ++ ppp_add_notify (NF_PHASE_CHANGE, nm_phasechange, NULL); ++ ppp_add_notify (NF_IP_UP, nm_ip_up, NULL); ++ ppp_add_notify (NF_EXIT, nm_exit_notify, NULL); ++#endif + return 0; + } +diff --git a/src/nm-ppp-status.h b/src/nm-fortisslvpn-pppd-status.h +similarity index 100% +rename from src/nm-ppp-status.h +rename to src/nm-fortisslvpn-pppd-status.h +diff --git a/src/nm-fortisslvpn-service.c b/src/nm-fortisslvpn-service.c +index 6c340d0..a8483c2 100644 +--- a/src/nm-fortisslvpn-service.c ++++ b/src/nm-fortisslvpn-service.c +@@ -40,7 +40,7 @@ + #include <glib/gstdio.h> + + #include "nm-fortissl-properties.h" +-#include "nm-ppp-status.h" ++#include "nm-fortisslvpn-pppd-status.h" + #include "nm-fortisslvpn-pppd-service-dbus.h" + #include "nm-utils/nm-shared-utils.h" + #include "nm-utils/nm-vpn-plugin-macros.h" +-- +GitLab + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn/0002-fix-ppp-2.5.0-build.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn/0002-fix-ppp-2.5.0-build.patch new file mode 100644 index 0000000000..6ac8f2b643 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn/0002-fix-ppp-2.5.0-build.patch @@ -0,0 +1,34 @@ +From 8773f772d39f8eee6edc1fd2e5437c754ed41e1e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eivind=20N=C3=A6ss?= <eivnaes@yahoo.com> +Date: Sat, 4 Mar 2023 21:29:54 +0000 +Subject: [PATCH] Fixing configure.ac from previous change +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream-Status: Backport +Signed-off-by: Eivind Næss <eivnaes@yahoo.com> +--- + configure.ac | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 877493e..a5b4abb 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -47,11 +47,7 @@ AC_CHECK_HEADERS(pppd/pppd.h,, + + dnl + dnl Check the presense of other pppd/*.h files +-AC_CHECK_HEADERS([ +- pppd/chap.h +- pppd/chap-new.h +- pppd/chap_ms.h +- ]) ++AC_CHECK_HEADERS(pppd/chap.h pppd/chap-new.h pppd/chap_ms.h) + + dnl + dnl Versions >= 2.5.0 will have pkg-config support +-- +GitLab + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn_1.4.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn_1.4.0.bb new file mode 100644 index 0000000000..48f50abaf1 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-fortisslvpn_1.4.0.bb @@ -0,0 +1,71 @@ +SUMMARY = "Fortinet SSLVPN support for NetworkManager" +SECTION = "net/misc" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552" + +DEPENDS = "glib-2.0-native libxml2-native networkmanager ppp python3-packaging-native" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase gettext useradd python3native + +SRC_URI = " \ + ${GNOME_MIRROR}/NetworkManager-fortisslvpn/${@gnome_verdir("${PV}")}/NetworkManager-fortisslvpn-${PV}.tar.xz \ + file://0001-fix-ppp-2.5.0-build.patch \ + file://0002-fix-ppp-2.5.0-build.patch \ +" +SRC_URI[sha256sum] = "b055e26349b516b23585798ab3ef57b436b014800e92a8ac732cfc8e76c5dafa" + +S = "${WORKDIR}/NetworkManager-fortisslvpn-${PV}" + +# meta-gnome in layers is required using gnome: +PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 libnma libsecret," +PACKAGECONFIG[gtk4] = "--with-gtk4,--without-gtk4,gtk4," + +EXTRA_OECONF = "--with-pppd-plugin-dir=${libdir}/pppd/${@get_ppp_version(d)}" + +def get_ppp_version(d): + import re + + pppd_plugin = d.expand('${STAGING_LIBDIR}/pppd') + if not os.path.isdir(pppd_plugin): + return None + + bb.debug(1, "pppd plugin dir %s" % pppd_plugin) + r = re.compile(r"\d*\.\d*\.\d*") + for f in os.listdir(pppd_plugin): + if os.path.isdir(os.path.join(pppd_plugin, f)): + ma = r.match(f) + if ma: + bb.debug(1, "pppd version dir %s" % f) + return f + else: + bb.debug(1, "under pppd plugin dir %s" % f) + + return None + +# gdbus-codegen requires target directories to exist +do_configure:append() { + mkdir -p ${B}/properties + mkdir -p ${B}/src +} + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system nm-fortisslvpn" + +FILES:${PN} += " \ + ${libdir}/NetworkManager/*.so \ + ${libdir}/pppd/*/*.so \ + ${nonarch_libdir}/NetworkManager/VPN/nm-fortisslvpn-service.name \ +" + +FILES:${PN}-staticdev += " \ + ${libdir}/NetworkManager/*.a \ + ${libdir}/pppd/*/*.a \ +" + +RDEPENDS:${PN} = " \ + networkmanager \ + openfortivpn \ + ppp \ +" diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openconnect_1.2.8.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openconnect_1.2.8.bb new file mode 100644 index 0000000000..ee19afbd11 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openconnect_1.2.8.bb @@ -0,0 +1,47 @@ +SUMMARY = "OpenConnect VPN client for NetworkManager" +SECTION = "net/misc" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=186e8b54342da4f753a62b7748c947db" + +DEPENDS = "glib-2.0-native intltool-native libxml2 networkmanager openconnect" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase useradd + +SRC_URI = "${GNOME_MIRROR}/NetworkManager-openconnect/${@gnome_verdir("${PV}")}/NetworkManager-openconnect-${PV}.tar.xz" + +SRC_URI[sha256sum] = "5dedaa785d82d8e239ddd082bfac5250c691e964464be1807b6827263633cdcc" + +S = "${WORKDIR}/NetworkManager-openconnect-${PV}" + +# meta-gnome in layers is required using gnome: +PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome,gtk+3 gcr3 libnma libsecret," +PACKAGECONFIG[gtk4] = "--with-gtk4,--without-gtk4,gtk4," + +do_configure:append() { + # network-manager-openconnect.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-openconnect.metainfo.xml ]; then + mkdir -p ${B}/appdata + cp -f ${S}/appdata/network-manager-openconnect.metainfo.xml ${B}/appdata/ + fi +} + +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system nm-openconnect" + +FILES:${PN} += " \ + ${libdir}/NetworkManager/*.so \ + ${nonarch_libdir}/NetworkManager/VPN/nm-openconnect-service.name \ +" + +FILES:${PN}-staticdev += " \ + ${libdir}/NetworkManager/*.a \ +" + +RDEPENDS:${PN} = " \ + networkmanager \ + openconnect \ +" diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-scripts-Do-not-export-_IO_stdin_used.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-scripts-Do-not-export-_IO_stdin_used.patch new file mode 100644 index 0000000000..eafd497ae2 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn/0001-linker-scripts-Do-not-export-_IO_stdin_used.patch @@ -0,0 +1,30 @@ +From e09ba80e342b3b24bb2a46e11dae1c30cc61c75c Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Sun, 3 Sep 2023 08:48:42 -0700 +Subject: [PATCH] linker-script: Do not export _IO_stdin_used + +This is glibc specific toolhain issue, it should have been handled in +toolchain instead of exposing to applications. This was done to fix + +https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + linker-script-binary.ver | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/linker-script-binary.ver b/linker-script-binary.ver +index a2780c0..f030d35 100644 +--- a/linker-script-binary.ver ++++ b/linker-script-binary.ver +@@ -1,6 +1,5 @@ + { + global: +- _IO_stdin_used; + local: + *; + }; +-- +2.42.0 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb new file mode 100644 index 0000000000..cdef11c89c --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.10.2.bb @@ -0,0 +1,55 @@ +SUMMARY = "NetworkManager-openvpn-plugin" +SECTION = "net/misc" + +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c" + +DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native" + +GNOMEBASEBUILDCLASS = "autotools" +inherit gnomebase useradd gettext systemd + +SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz" + +SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" + +SRC_URI[sha256sum] = "62f0f2a8782221b923f212ac2a8ebbc1002efd6a90ee945dad4adfb56d076d21" + +S = "${WORKDIR}/NetworkManager-openvpn-${PV}" + +# 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 +} + +# Create user and group nm-openvpn that are needed since version 1.0.6 +USERADD_PACKAGES = "${PN}" +USERADD_PARAM:${PN} = "--system nm-openvpn" + +FILES:${PN} += " \ + ${datadir}/dbus-1 \ + ${datadir}/metainfo \ + ${libdir}/NetworkManager/*.so \ + ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ +" + +FILES:${PN}-staticdev += " \ + ${libdir}/NetworkManager/*.a \ +" + +RDEPENDS:${PN} = " \ + networkmanager \ + openvpn \ +" diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.10.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.10.bb deleted file mode 100644 index 56db770b97..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.10.bb +++ /dev/null @@ -1,40 +0,0 @@ -SUMMARY = "NetworkManager-openvpn-plugin" -SECTION = "net/misc" - -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=100d5a599bead70ddcd70dcd73f2e29c" - -DEPENDS = "dbus dbus-glib networkmanager openvpn intltool-native glib-2.0-native" - -inherit gnomebase useradd gettext systemd - -SRC_URI = "${GNOME_MIRROR}/NetworkManager-openvpn/${@gnome_verdir("${PV}")}/NetworkManager-openvpn-${PV}.tar.xz" - -SRC_URI[md5sum] = "4dbbc103761facc7a61a1c00dfd55231" -SRC_URI[sha256sum] = "af3cc86ba848d21b4ac807a09d575de11335ba4df8ce6fdb089212e77c2231ef" - -S = "${WORKDIR}/NetworkManager-openvpn-${PV}" - -PACKAGECONFIG[gnome] = "--with-gnome,--without-gnome" - -do_install_append () { - rm -rf ${D}${libdir}/NetworkManager/*.la -} - -# Create user and group nm-openvpn that are needed since version 1.0.6 -USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system nm-openvpn" - -FILES_${PN} += " \ - ${libdir}/NetworkManager/*.so \ - ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ -" - -FILES_${PN}-staticdev += " \ - ${libdir}/NetworkManager/*.a \ -" - -RDEPENDS_${PN} = " \ - networkmanager \ - openvpn \ -" diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch deleted file mode 100644 index 302c0292bd..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 3dc3d8e73bc430ea4e93e33f7b2a4b3e0ff175af 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 - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 967eac0..b914219 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -592,7 +592,7 @@ if test "$have_jansson" = "yes"; then - AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) - - AC_CHECK_TOOLS(READELF, [eu-readelf readelf]) -- JANSSON_LIBDIR=`$PKG_CONFIG --variable=libdir jansson` -+ JANSSON_LIBDIR=${PKG_CONFIG_SYSROOT_DIR}`$PKG_CONFIG --variable=libdir jansson` - JANSSON_SONAME=`$READELF -d $JANSSON_LIBDIR/libjansson.so |sed -n 's/.*SONAME.*\[[\([^]]*\)]]/\1/p'` - - if test "$JANSSON_SONAME" = ""; then diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-linker-scripts-Do-not-export-_IO_stdin_used.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-linker-scripts-Do-not-export-_IO_stdin_used.patch new file mode 100644 index 0000000000..71ad01f51c --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-linker-scripts-Do-not-export-_IO_stdin_used.patch @@ -0,0 +1,41 @@ +From 3ee6967689b3da30cc4551885d8bcdd44a7a9b52 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 31 Aug 2023 21:16:55 -0700 +Subject: [PATCH] linker-scripts: Do not export _IO_stdin_used + +This is glibc specific and it is not needed with musl. +See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835550 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + linker-script-binary.ver | 1 - + tools/create-exports-NetworkManager.sh | 1 - + 2 files changed, 2 deletions(-) + +diff --git a/linker-script-binary.ver b/linker-script-binary.ver +index a2780c0..f030d35 100644 +--- a/linker-script-binary.ver ++++ b/linker-script-binary.ver +@@ -1,6 +1,5 @@ + { + global: +- _IO_stdin_used; + local: + *; + }; +diff --git a/tools/create-exports-NetworkManager.sh b/tools/create-exports-NetworkManager.sh +index ef4b381..60865ad 100755 +--- a/tools/create-exports-NetworkManager.sh ++++ b/tools/create-exports-NetworkManager.sh +@@ -54,7 +54,6 @@ get_symbols_nm () { + + get_symbols_explicit() { + cat <<EOF | _sort +-_IO_stdin_used + EOF + } + +-- +2.42.0 + diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch deleted file mode 100644 index 5581dd3aab..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch +++ /dev/null @@ -1,71 +0,0 @@ -From 4f000a4a19975d6aba71427e693cd1ed080abda9 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com> -Date: Thu, 22 Mar 2018 11:08:30 +0100 -Subject: [PATCH] Do not create settings settings/property documentation -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -It was tried to get this work but gi / GirRepository could not be found by -python. Anyway it is not necessary for us to have the settings/property docs. - -Upstream-Status: Inappropriate [OE specific] - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - Makefile.am | 11 ----------- - configure.ac | 5 ----- - 2 files changed, 16 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index b180466..1ab4658 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1298,9 +1298,7 @@ EXTRA_DIST += \ - if HAVE_INTROSPECTION - - libnm_noinst_data = \ -- libnm/nm-property-docs.xml \ - libnm/nm-settings-docs-overrides.xml \ -- libnm/nm-settings-docs.xml \ - libnm/nm-settings-keyfile-docs.xml \ - libnm/nm-settings-ifcfg-rh-docs.xml - -@@ -3930,18 +3928,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 --if HAVE_INTROSPECTION --$(clients_common_settings_doc_h): clients/common/settings-docs.xsl libnm/nm-property-docs.xml clients/common/.dirstamp -- $(AM_V_GEN) $(XSLTPROC) --output $@ $< $(word 2,$^) --DISTCLEANFILES += $(clients_common_settings_doc_h) --check-local-settings-docs: $(clients_common_settings_doc_h) -- $(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 - $(AM_V_GEN) cp "$(srcdir)/$(clients_common_settings_doc_h).in" "$(builddir)/$(clients_common_settings_doc_h)" - check-local-settings-docs: --endif - EXTRA_DIST += \ - $(clients_common_settings_doc_h) \ - $(clients_common_settings_doc_h).in -diff --git a/configure.ac b/configure.ac -index b914219..872c292 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1215,11 +1215,6 @@ GTK_DOC_CHECK(1.0) - # check if we can build setting property documentation - build_docs=no - if test -n "$INTROSPECTION_MAKEFILE"; then -- # If g-i is installed we know we have python, but we might not have pygobject -- if ! "$PYTHON" -c 'from gi.repository import GObject' >& /dev/null; then -- AC_MSG_ERROR(["--enable-introspection aims to build the settings documentation. This requires GObject introspection for python (pygobject)]) -- fi -- - AC_PATH_PROG(PERL, perl) - if test -z "$PERL"; then - AC_MSG_ERROR([--enable-introspection requires perl]) --- -2.20.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-dhcpcd.conf b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-dhcpcd.conf new file mode 100644 index 0000000000..8da4fe0487 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-dhcpcd.conf @@ -0,0 +1,2 @@ +[main] +dhcp=dhcpcd diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-iwd.conf b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-iwd.conf new file mode 100644 index 0000000000..abb5937341 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/enable-iwd.conf @@ -0,0 +1,3 @@ +[device] +wifi.iwd.autoconnect=yes +wifi.backend=iwd diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch deleted file mode 100644 index af6f938ced..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch +++ /dev/null @@ -1,167 +0,0 @@ -From a89c2e6d40606f563467a83fb98933e990e71377 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 5899f62..0adb248 100644 ---- a/shared/systemd/src/basic/in-addr-util.c -+++ b/shared/systemd/src/basic/in-addr-util.c -@@ -14,6 +14,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 7431be3..189060a 100644 ---- a/shared/systemd/src/basic/process-util.c -+++ b/shared/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> -@@ -1183,11 +1186,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; -@@ -1216,7 +1221,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 15443f1..4807198 100644 ---- a/shared/systemd/src/basic/socket-util.h -+++ b/shared/systemd/src/basic/socket-util.h -@@ -13,6 +13,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 b23f4c8..8f2f6e0 100644 ---- a/shared/systemd/src/basic/string-util.h -+++ b/shared/systemd/src/basic/string-util.h -@@ -27,6 +27,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.17.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch deleted file mode 100644 index e0973af1e9..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 3d1307735667758f44378585482fe421db086af8 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 2/2] 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 43fbbc1..3eae286 100644 ---- a/clients/tui/nmt-device-entry.c -+++ b/clients/tui/nmt-device-entry.c -@@ -39,7 +39,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 2b5baba..f7abab6 100644 ---- a/libnm-core/nm-utils.h -+++ b/libnm-core/nm-utils.h -@@ -25,6 +25,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 54e9916..26e9f4e 100644 ---- a/shared/nm-default.h -+++ b/shared/nm-default.h -@@ -211,6 +211,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 bd4fbcc..f70b309 100644 ---- a/src/devices/nm-device.c -+++ b/src/devices/nm-device.c -@@ -24,6 +24,7 @@ - #include "nm-device.h" - - #include <netinet/in.h> -+#include <net/if.h> - #include <unistd.h> - #include <sys/ioctl.h> - #include <signal.h> -@@ -32,7 +33,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 d4b0115..22a3a90 100644 ---- a/src/platform/nm-linux-platform.c -+++ b/src/platform/nm-linux-platform.c -@@ -28,7 +28,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> --- -2.17.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd b/meta-networking/recipes-connectivity/networkmanager/networkmanager/networkmanager.initd new file mode 100644 index 0000000000..4fdd80d410 --- /dev/null +++ b/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/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.18.2.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.18.2.bb deleted file mode 100644 index b760a40c35..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.18.2.bb +++ /dev/null @@ -1,146 +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 \ -" - -DEPENDS = " \ - intltool-native \ - libxslt-native \ - libnl \ - libgudev \ - util-linux \ - libndp \ - libnewt \ - jansson \ - curl \ -" - -inherit gnomebase gettext systemd bash-completion vala gobject-introspection gtk-doc update-alternatives - -SRC_URI = " \ - ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ - 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 \ -" -SRC_URI[md5sum] = "ca1e6175c6ba97ca1adf65a67861ccd9" -SRC_URI[sha256sum] = "4dd97ca974cd1f97990746527258f551f4257cbf011fecd01d10b7d74a6fa5c3" - -UPSTREAM_CHECK_URI = "${GNOME_MIRROR}/NetworkManager/1.16/" -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 \ -" - -# 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 --enable-polkit-agent,--disable-polkit --disable-polkit-agent,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 \ - ${nonarch_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} = "${@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() { - rm -rf ${D}/run ${D}${localstatedir}/run - - # For read-only filesystem, do not create links during bootup - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager - fi -} diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb new file mode 100644 index 0000000000..be30154a36 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.46.0.bb @@ -0,0 +1,322 @@ +SUMMARY = "NetworkManager is a program for providing detection and \ +configuration for systems to automatically connect to networks." + +DESCRIPTION = "NetworkManager is a program for providing detection and \ +configuration for systems to automatically connect to networks. \ +NetworkManager's functionality can be useful for both wireless and wired \ +networks. For wireless networks, NetworkManager prefers known wireless \ +networks and has the ability to switch to the most reliable network. \ +NetworkManager-aware applications can switch from online and offline mode. \ +NetworkManager also prefers wired connections over wireless ones, has support \ +for modem connections and certain types of VPN." + +HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" +SECTION = "net/misc" + +LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ +" + +DEPENDS = " \ + python3-pygobject-native \ + coreutils-native \ + intltool-native \ + libxslt-native \ + libnl \ + udev \ + util-linux \ + libndp \ + curl \ + dbus \ +" +DEPENDS:append:class-target = " bash-completion" + +inherit gnomebase gettext update-rc.d systemd 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://enable-dhcpcd.conf \ + file://enable-iwd.conf \ +" +SRC_URI:append:libc-musl = "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-lld', ' file://0001-linker-scripts-Do-not-export-_IO_stdin_used.patch', '', d)}" + +SRC_URI[sha256sum] = "722649e25362693b334371473802a729b0ec9ee283375096905f868808e74068" + +S = "${WORKDIR}/NetworkManager-${PV}" + +# ['auto', 'symlink', 'file', 'netconfig', 'resolvconf'] +NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT ??= "auto" + +# ['dhcpcanon', 'dhclient', 'dhcpcd', 'internal', 'nettools'] +NETWORKMANAGER_DHCP_DEFAULT ??= "internal" + +# The default gets detected based on whether /usr/sbin/nft or /usr/sbin/iptables is installed, with nftables preferred. +# ['', 'iptables', 'nftables'] +NETWORKMANAGER_FIREWALL_DEFAULT ??= "nftables" + +EXTRA_OEMESON = "\ + -Difcfg_rh=false \ + -Dtests=yes \ + -Dnmtui=true \ + -Dudev_dir=${nonarch_base_libdir}/udev \ + -Dlibpsl=false \ + -Dqt=false \ + -Dconfig_dns_rc_manager_default=${NETWORKMANAGER_DNS_RC_MANAGER_DEFAULT} \ + -Dconfig_dhcp_default=${NETWORKMANAGER_DHCP_DEFAULT} \ + -Ddhcpcanon=false \ + -Diptables=${sbindir}/iptables \ + -Dnft=${sbindir}/nft \ +" + +# 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 GI_TYPELIB_PATH="${B}}/src/libnm-client-impl${GI_TYPELIB_PATH:+:$GI_TYPELIB_PATH}" +} + +PACKAGECONFIG ??= "readline nss ifupdown dnsmasq nmcli vala \ + ${@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 ppp', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit', '', d)} \ +" + +inherit ${@bb.utils.contains('PACKAGECONFIG', 'vala', 'vala', '', d)} + +PACKAGECONFIG[systemd] = "\ + -Dsystemdsystemunitdir=${systemd_unitdir}/system -Dsession_tracking=systemd,\ + -Dsystemdsystemunitdir=no -Dsystemd_journal=false -Dsession_tracking=no\ +" +PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false,polkit" +PACKAGECONFIG[bluez5] = "-Dbluez5_dun=true,-Dbluez5_dun=false,bluez5" +# consolekit is not picked by shlibs, so add it to RDEPENDS too +PACKAGECONFIG[consolekit] = "-Dsession_tracking_consolekit=true,-Dsession_tracking_consolekit=false,consolekit,consolekit" +PACKAGECONFIG[modemmanager] = "-Dmodem_manager=true,-Dmodem_manager=false,modemmanager mobile-broadband-provider-info,modemmanager mobile-broadband-provider-info" +PACKAGECONFIG[ppp] = "-Dppp=true -Dpppd=${sbindir}/pppd,-Dppp=false,ppp" +PACKAGECONFIG[dnsmasq] = "-Ddnsmasq=${bindir}/dnsmasq" +PACKAGECONFIG[nss] = "-Dcrypto=nss,,nss" +PACKAGECONFIG[resolvconf] = "-Dresolvconf=${base_sbindir}/resolvconf,-Dresolvconf=no,,resolvconf" +PACKAGECONFIG[gnutls] = "-Dcrypto=gnutls,,gnutls" +PACKAGECONFIG[crypto-null] = "-Dcrypto=null" +PACKAGECONFIG[wifi] = "-Dwext=true -Dwifi=true,-Dwext=false -Dwifi=false" +PACKAGECONFIG[iwd] = "-Diwd=true,-Diwd=false" +PACKAGECONFIG[ifupdown] = "-Difupdown=true,-Difupdown=false" +PACKAGECONFIG[cloud-setup] = "-Dnm_cloud_setup=true,-Dnm_cloud_setup=false" +PACKAGECONFIG[nmcli] = "-Dnmcli=true,-Dnmcli=false" +PACKAGECONFIG[nmtui] = "-Dnmtui=true,-Dnmtui=false,libnewt" +PACKAGECONFIG[readline] = "-Dreadline=libreadline,,readline" +PACKAGECONFIG[libedit] = "-Dreadline=libedit,,libedit" +PACKAGECONFIG[ovs] = "-Dovs=true,-Dovs=false,jansson" +PACKAGECONFIG[audit] = "-Dlibaudit=yes,-Dlibaudit=no" +PACKAGECONFIG[selinux] = "-Dselinux=true,-Dselinux=false,libselinux" +PACKAGECONFIG[vala] = "-Dvapi=true,-Dvapi=false" +PACKAGECONFIG[dhcpcd] = "-Ddhcpcd=${base_sbindir}/dhcpcd,-Ddhcpcd=no,,dhcpcd" +PACKAGECONFIG[dhclient] = "-Ddhclient=yes,-Ddhclient=no,,dhcp" +PACKAGECONFIG[concheck] = "-Dconcheck=true,-Dconcheck=false" +PACKAGECONFIG[adsl] = ",," +PACKAGECONFIG[wwan] = ",," +# The following PACKAGECONFIG is used to determine whether NM is managing /etc/resolv.conf itself or not +PACKAGECONFIG[man-resolv-conf] = ",," + + +PACKAGES =+ " \ + libnm \ + ${PN}-adsl \ + ${PN}-bluetooth \ + ${PN}-cloud-setup \ + ${PN}-nmcli \ + ${PN}-nmcli-bash-completion \ + ${PN}-nmtui \ + ${PN}-wifi \ + ${PN}-wwan \ + ${PN}-ovs \ + ${PN}-ppp \ + ${PN}-daemon \ +" + +SYSTEMD_PACKAGES = "${PN}-daemon ${PN}-cloud-setup" +INITSCRIPT_PACKAGES = "${PN}-daemon" + +NETWORKMANAGER_PLUGINDIR = "${libdir}/NetworkManager/${PV}" +NETWORKMANAGER_DISPATCHERDIR = "${nonarch_libdir}/NetworkManager/dispatcher.d" + + +SUMMARY:libnm = "Libraries for adding NetworkManager support to applications" +FILES:libnm = "\ + ${libdir}/libnm.so.* \ + ${libdir}/girepository-1.0/NM-1.0.typelib \ +" + +SUMMARY:${PN}-adsl = "ADSL device plugin for NetworkManager" +FILES:${PN}-adsl = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-adsl.so" +RDEPENDS:${PN}-adsl += "${PN}-daemon" + +SUMMARY:${PN}-bluetooth = "Bluetooth device plugin for NetworkManager" +FILES:${PN}-bluetooth = "${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-bluetooth.so" +RDEPENDS:${PN}-bluetooth += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG', 'bluez5', '${PN}-wwan bluez5', '', d)}" + +SUMMARY:${PN}-cloud-setup = "Automatically configure NetworkManager in cloud" +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 \ +" +RDEPENDS:${PN}-cloud-setup += "${PN}-daemon" +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)}" + +SUMMARY:${PN}-nmcli = "NetworkManager command line client" +FILES:${PN}-nmcli = " \ + ${bindir}/nmcli \ +" +RDEPENDS:${PN}-nmcli += "${PN}-daemon" + +SUMMARY:${PN}-nmcli-bash-completion = "NetworkManager command line client bash completion" +FILES:${PN}-nmcli-bash-completion = "${datadir}/bash-completion/completions/nmcli" +RDEPENDS:${PN}-nmcli-bash-completion = "bash-completion" + +SUMMARY:${PN}-nmtui = "NetworkManager curses-based UI" +FILES:${PN}-nmtui = " \ + ${bindir}/nmtui \ + ${bindir}/nmtui-edit \ + ${bindir}/nmtui-connect \ + ${bindir}/nmtui-hostname \ +" +RDEPENDS:${PN}-nmtui += "${PN}-daemon" + +SUMMARY:${PN}-wifi = "Wifi plugin for NetworkManager" +FILES:${PN}-wifi = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wifi.so \ + ${libdir}/NetworkManager/conf.d/enable-iwd.conf \ +" +def get_wifi_deps(d): + packageconfig = (d.getVar('PACKAGECONFIG') or "").split() + if 'wifi' in packageconfig: + if 'iwd' in packageconfig: + return 'iwd' + else: + return 'wpa-supplicant' + else: + return '' +RDEPENDS:${PN}-wifi += "${PN}-daemon ${@get_wifi_deps(d)}" + +SUMMARY:${PN}-wwan = "Mobile broadband device plugin for NetworkManager" +FILES:${PN}-wwan = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-wwan.so \ + ${NETWORKMANAGER_PLUGINDIR}/libnm-wwan.so \ +" +RDEPENDS:${PN}-wwan += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','modemmanager','modemmanager','',d)}" + +SUMMARY:${PN}-ovs = "Open vSwitch device plugin for NetworkManager" +FILES:${PN}-ovs = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-device-plugin-ovs.so \ + ${systemd_system_unitdir}/NetworkManager.service.d/NetworkManager-ovs.conf \ +" +RDEPENDS:${PN}-ovs += "${PN}-daemon" + +SUMMARY:${PN}-ppp = "PPP plugin for NetworkManager" +FILES:${PN}-ppp = "\ + ${NETWORKMANAGER_PLUGINDIR}/libnm-ppp-plugin.so \ + ${libdir}/pppd/*/nm-pppd-plugin.so \ +" +RDEPENDS:${PN}-ppp += "${PN}-daemon ${@bb.utils.contains('PACKAGECONFIG','ppp','ppp','',d)}" + +FILES:${PN}-dev += " \ + ${libdir}/pppd/*/*.la \ + ${libdir}/NetworkManager/*.la \ + ${NETWORKMANAGER_PLUGINDIR}/*.la \ + ${datadir}/dbus-1/interfaces/*.xml \ +" + +SUMMARY:${PN}-daemon += "The NetworkManager daemon" +FILES:${PN}-daemon += " \ + ${bindir}/nm-online \ + ${datadir}/dbus-1 \ + ${datadir}/polkit-1 \ + ${libdir}/NetworkManager \ + ${libexecdir} \ + ${localstatedir}/lib/NetworkManager \ + ${NETWORKMANAGER_DISPATCHERDIR} \ + ${nonarch_base_libdir}/udev/* \ + ${nonarch_libdir}/firewalld \ + ${nonarch_libdir}/NetworkManager/conf.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ + ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ + ${nonarch_libdir}/NetworkManager/system-connections \ + ${nonarch_libdir}/NetworkManager/VPN \ + ${sbindir}/NetworkManager \ + ${sysconfdir}/init.d/network-manager \ + ${sysconfdir}/NetworkManager \ + ${sysconfdir}/resolv-conf.NetworkManager \ + ${sysconfdir}/sysconfig/network-scripts \ + ${systemd_system_unitdir} \ +" +RDEPENDS:${PN}-daemon += "\ + ${@bb.utils.contains('PACKAGECONFIG', 'ifupdown', 'bash', '', d)} \ +" +RRECOMMENDS:${PN}-daemon += "\ + ${NETWORKMANAGER_FIREWALL_DEFAULT} \ + ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ +" +INITSCRIPT_NAME:${PN}-daemon = "network-manager" +SYSTEMD_SERVICE:${PN}-daemon = "\ + NetworkManager.service \ + NetworkManager-dispatcher.service \ +" +RCONFLICTS:${PN}-daemon += "connman" +ALTERNATIVE_PRIORITY = "100" +ALTERNATIVE:${PN}-daemon = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','resolv-conf','',d)}" +ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv-conf.NetworkManager','',d)}" +ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('PACKAGECONFIG','man-resolv-conf','${sysconfdir}/resolv.conf','',d)}" + + +# The networkmanager package is an empty meta package which weakly depends on all the compiled features. +# Install this package to get all plugins and related dependencies installed. Alternatively just install +# plugins and related dependencies e.g. by installing networkmanager-wifi or networkmanager-wwan +# packages to the firmware. +ALLOW_EMPTY:${PN} = "1" +RRECOMMENDS:${PN} += "\ + ${@bb.utils.contains('PACKAGECONFIG','adsl','${PN}-adsl','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','bluez5','${PN}-bluetooth','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','cloud-setup','${PN}-cloud-setup','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','nmcli','${PN}-nmcli','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','nmtui','${PN}-nmtui','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','wifi','${PN}-wifi','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','wwan','${PN}-wwan','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','ovs','${PN}-ovs','',d)} \ + ${@bb.utils.contains('PACKAGECONFIG','ppp','${PN}-ppp','',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('PACKAGECONFIG','man-resolv-conf','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 + + # Enable iwd if compiled + if ${@bb.utils.contains('PACKAGECONFIG','iwd','true','false',d)}; then + install -Dm 0644 ${WORKDIR}/enable-iwd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-iwd.conf + fi + + # Enable dhcpd if compiled + if ${@bb.utils.contains('PACKAGECONFIG','dhcpcd','true','false',d)}; then + install -Dm 0644 ${WORKDIR}/enable-dhcpcd.conf ${D}${nonarch_libdir}/NetworkManager/conf.d/enable-dhcpcd.conf + fi +} diff --git a/meta-networking/recipes-connectivity/openconnect/openconnect/0001-Shim-for-renaming-of-GNUTLS_NO_EXTENSIONS-in-GnuTLS-.patch b/meta-networking/recipes-connectivity/openconnect/openconnect/0001-Shim-for-renaming-of-GNUTLS_NO_EXTENSIONS-in-GnuTLS-.patch new file mode 100644 index 0000000000..9dd3da75ad --- /dev/null +++ b/meta-networking/recipes-connectivity/openconnect/openconnect/0001-Shim-for-renaming-of-GNUTLS_NO_EXTENSIONS-in-GnuTLS-.patch @@ -0,0 +1,43 @@ +From e4ea64134cfe3763332c16dcac52dd894b935880 Mon Sep 17 00:00:00 2001 +From: Daniel Lenski <dlenski@gmail.com> +Date: Tue, 22 Aug 2023 12:02:19 -0700 +Subject: [PATCH] Shim for renaming of GNUTLS_NO_EXTENSIONS in GnuTLS v3.8.1 + +The constant `GNUTLS_NO_EXTENSIONS` was renamed in +https://gitlab.com/gnutls/gnutls/-/commit/a7c4a04e (released in v3.8.1), and +then a backwards-compatibility shim was belatedly added in +https://gitlab.com/gnutls/gnutls/-/commit/abfa8634, which has not yet been +released. + +We need to re-add the constant ourselves in order to build correctly with +GnuTLS v3.8.1. This should fix +https://gitlab.com/openconnect/openconnect/-/issues/650. + +Upstream-Status: Backport [https://git.infradead.org/users/dwmw2/openconnect.git/commit/7512698217c4104aade7a2df669a20de68f3bb8c] +Signed-off-by: Daniel Lenski <dlenski@gmail.com> +--- + gnutls-dtls.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/gnutls-dtls.c b/gnutls-dtls.c +index 3fd78e95..50a4bb4e 100644 +--- a/gnutls-dtls.c ++++ b/gnutls-dtls.c +@@ -39,6 +39,14 @@ + # define GNUTLS_CIPHER_CHACHA20_POLY1305 23 + #endif + ++#if GNUTLS_VERSION_NUMBER >= 0x030801 && !defined(GNUTLS_NO_EXTENSIONS) ++/* XX: GNUTLS_NO_EXTENSIONS was renamed in GnuTLS v3.8.1. A ++ * backwards-compatibility shim was added in a subsequent commit, but ++ * not yet released. ++ */ ++# define GNUTLS_NO_EXTENSIONS GNUTLS_NO_DEFAULT_EXTENSIONS ++#endif ++ + /* sets the DTLS MTU and returns the actual tunnel MTU */ + unsigned dtls_set_mtu(struct openconnect_info *vpninfo, unsigned mtu) + { +-- +2.42.0 + diff --git a/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb b/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb deleted file mode 100644 index ec36a375a4..0000000000 --- a/meta-networking/recipes-connectivity/openconnect/openconnect_8.03.bb +++ /dev/null @@ -1,31 +0,0 @@ -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" -SRCREV = "ea73851969ae7a6ea54fdd2d2b8c94776af24b2a" - -DEPENDS = "vpnc libxml2 krb5 gettext-native" -RDEPENDS_${PN} = "bash python" - -PACKAGECONFIG ??= "gnutls lz4 libproxy" - -# config defaults -PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls," -PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," -PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy," - -# not config defaults -PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite," - -S = "${WORKDIR}/git" - -inherit autotools pkgconfig - -EXTRA_OECONF += "--with-vpnc-script=${SYSROOT_DESTDIR}${sysconfdir}/vpnc/vpnc-script \ - --disable-static" - -do_configure_append() { - # script has /usr/bin/python2 path hardcoded - sed -i -e 's=python2\.*=python=g' ${S}/trojans/tncc-wrapper.py -} diff --git a/meta-networking/recipes-connectivity/openconnect/openconnect_9.12.bb b/meta-networking/recipes-connectivity/openconnect/openconnect_9.12.bb new file mode 100644 index 0000000000..7d0e5f2052 --- /dev/null +++ b/meta-networking/recipes-connectivity/openconnect/openconnect_9.12.bb @@ -0,0 +1,33 @@ +SUMMARY = "Open client for Cisco AnyConnect VPN" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" + +SRC_URI = " \ + git://git.infradead.org/users/dwmw2/openconnect.git;branch=master \ + file://0001-Shim-for-renaming-of-GNUTLS_NO_EXTENSIONS-in-GnuTLS-.patch \ +" +SRCREV = "59f2e59eb3e436364ef82e630e5a2f88f32acd58" + +DEPENDS = "vpnc libxml2 krb5 gettext-native" +RDEPENDS:${PN} = "bash python3-core vpnc-script" + +PACKAGECONFIG ??= "gnutls lz4 libproxy" + +# config defaults +PACKAGECONFIG[gnutls] = "--with-gnutls,--without-gnutls,gnutls," +PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4," +PACKAGECONFIG[libproxy] = "--with-libproxy,--without-libproxy,libproxy," + +# not config defaults +PACKAGECONFIG[pcsc-lite] = "--with-libpcsclite,--without-libpcsclite,pcsc-lite," + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig bash-completion + +EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \ + --disable-static" + +do_install:append() { + rm ${D}/usr/libexec/openconnect/hipreport-android.sh +} diff --git a/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.21.0.bb b/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.21.0.bb new file mode 100644 index 0000000000..e6c9a69ee5 --- /dev/null +++ b/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.21.0.bb @@ -0,0 +1,26 @@ +SUMMARY = "Client for PPP+SSL VPN tunnel services" +LICENSE = "GPL-3.0-or-later" +LIC_FILES_CHKSUM = "file://LICENSE;md5=3d575262a651a6f1a17210ce41bf907d" + +SRC_URI = "git://github.com/adrienverge/openfortivpn.git;protocol=https;branch=master" +SRCREV = "26a1fe68cc7a61c58f4f2a98862f6fcf30f9f2dc" + +DEPENDS = "openssl" + +PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" + +PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf --enable-resolvconf,--with-resolvconf=DISABLED,," +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir},--without-systemdsystemunitdir,," + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig systemd + +EXTRA_OECONF = " \ + --with-pppd=${sbindir}/pppd \ + --disable-proc \ +" + +SYSTEMD_SERVICE:${PN} = "openfortivpn@.service" + +RDEPENDS:${PN} = "ppp" diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch new file mode 100644 index 0000000000..7c32166797 --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch @@ -0,0 +1,35 @@ +From aa706d714294b83db696de2beca9a722a512796f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 19 Apr 2022 14:04:40 -0700 +Subject: [PATCH] cmake: Disable nonnull-compare warning on gcc + +GCC finds a legit warning which clang does not on code like this + +class Message; +void SendResponse(Message & aMessage) +{ + if ((&aMessage) != nullptr) { return; } +} + +Perhaps it should be fixed upstream but for now disable treating this +warning as error when using gcc + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -59,6 +59,10 @@ endif() + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_EXE_LINKER_FLAGS "-rdynamic ${CMAKE_EXE_LINKER_FLAGS}") + ++if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") ++ add_compile_options(-Wno-error=nonnull-compare) ++endif() ++ + if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + message(STATUS "Coverage: ON") + target_compile_options(otbr-config INTERFACE -g -O0 --coverage) diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch new file mode 100644 index 0000000000..250de4bdd8 --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch @@ -0,0 +1,35 @@ +From ed60d4605b81c43b9ba9504a37835109c247c6f8 Mon Sep 17 00:00:00 2001 +From: Stefan Schmidt <stefan.schmidt@huawei.com> +Date: Fri, 1 Apr 2022 21:46:03 +0200 +Subject: [PATCH] otbr-agent.service.in: remove pre exec hook for mdns service + +It uses the service command which is not available in all cases under +Yocto/OE. The upstream project uses this mainly with Ubuntu and Raspian +as testbeds. + +In our case we simply ensure that avahi-daemon is installed on the +system inside the recipe. + +Upstream-Status: Inappropriate [OE specific] + +Signed-off-by: Stefan Schmidt <stefan.schmidt@huawei.com> +--- + src/agent/otbr-agent.service.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/agent/otbr-agent.service.in b/src/agent/otbr-agent.service.in +index 8314121347..4c97869def 100644 +--- a/src/agent/otbr-agent.service.in ++++ b/src/agent/otbr-agent.service.in +@@ -6,7 +6,7 @@ After=dbus.socket + + [Service] + EnvironmentFile=-@CMAKE_INSTALL_FULL_SYSCONFDIR@/default/otbr-agent +-@EXEC_START_PRE@ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent $OTBR_AGENT_OPTS ++ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/otbr-agent $OTBR_AGENT_OPTS + KillMode=mixed + Restart=on-failure + RestartSec=5 +-- +2.35.1 + diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch new file mode 100644 index 0000000000..4118887cb9 --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/default-cxx-std.patch @@ -0,0 +1,35 @@ +Do not hardcode C std to C99 or C++ std to C++11 if not set +OE compilers are using newer than these standards and absl needs C++14 minimum + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -46,16 +46,6 @@ set_property(CACHE OTBR_MDNS PROPERTY ST + + include("${PROJECT_SOURCE_DIR}/etc/cmake/options.cmake") + +-if(NOT CMAKE_C_STANDARD) +- set(CMAKE_C_STANDARD 99) +- set(CMAKE_C_STANDARD_REQUIRED ON) +-endif() +- +-if(NOT CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) +- set(CMAKE_CXX_STANDARD_REQUIRED ON) +-endif() +- + set(CMAKE_CXX_EXTENSIONS OFF) + set(CMAKE_EXE_LINKER_FLAGS "-rdynamic ${CMAKE_EXE_LINKER_FLAGS}") + +@@ -63,6 +53,10 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU") + add_compile_options(-Wno-error=nonnull-compare) + endif() + ++if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 18.1) ++ add_compile_options(-Wno-error=vla-cxx-extension) ++endif() ++ + if (OTBR_COVERAGE AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") + message(STATUS "Coverage: ON") + target_compile_options(otbr-config INTERFACE -g -O0 --coverage) diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch b/meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch new file mode 100644 index 0000000000..279a60741f --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix/musl-fixes.patch @@ -0,0 +1,26 @@ +Musl fixes, which should be applied upstream too + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/src/dbus/common/types.hpp ++++ b/src/dbus/common/types.hpp +@@ -715,7 +715,7 @@ struct TrelInfo + }; + + bool mEnabled; ///< Whether TREL is enabled. +- u_int16_t mNumTrelPeers; ///< The number of TREL peers. ++ uint16_t mNumTrelPeers; ///< The number of TREL peers. + TrelPacketCounters mTrelCounters; ///< The TREL counters. + }; + +--- a/third_party/openthread/repo/src/posix/platform/CMakeLists.txt ++++ b/third_party/openthread/repo/src/posix/platform/CMakeLists.txt +@@ -172,7 +172,7 @@ target_link_libraries(openthread-posix + ) + + option(OT_TARGET_OPENWRT "enable openthread posix for OpenWRT" OFF) +-if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT OT_TARGET_OPENWRT) ++if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND NOT OT_TARGET_OPENWRT AND NOT OT_TARGET_MUSL) + target_compile_definitions(ot-posix-config + INTERFACE "OPENTHREAD_POSIX_CONFIG_NAT64_AIL_PREFIX_ENABLE=1" + ) diff --git a/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb new file mode 100644 index 0000000000..d7be1cd71d --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb @@ -0,0 +1,65 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 +SUMMARY = "OpenThread Border Router" +SECTION = "net" +LICENSE = "BSD-3-Clause & MIT" +LIC_FILES_CHKSUM = "file://LICENSE;md5=87109e44b2fda96a8991f27684a7349c \ + file://third_party/Simple-web-server/repo/LICENSE;md5=091ac9fd29d87ad1ae5bf765d95278b0 \ + file://third_party/cJSON/repo/LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0 \ + file://third_party/http-parser/repo/LICENSE-MIT;md5=9bfa835d048c194ab30487af8d7b3778 \ + file://third_party/openthread/repo/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \ + " +DEPENDS = "autoconf-archive dbus readline avahi jsoncpp boost libnetfilter-queue protobuf protobuf-native" +SRCREV = "a35cc682305bb2201c314472adf06a4960536750" +PV = "0.3.0+git" + +SRC_URI = "gitsm://github.com/openthread/ot-br-posix.git;protocol=https;branch=main \ + file://0001-otbr-agent.service.in-remove-pre-exec-hook-for-mdns-.patch \ + file://0001-cmake-Disable-nonnull-compare-warning-on-gcc.patch \ + file://default-cxx-std.patch \ + file://musl-fixes.patch \ + " + +S = "${WORKDIR}/git" +SYSTEMD_SERVICE:${PN} = "otbr-agent.service" + +inherit pkgconfig cmake systemd +# openthread/repo/src/cli/cli.cpp:1786:18: fatal error: variable 'i' set but not used [-Wunused-but-set-variable] +# for (uint8_t i = 0;; i++) +CXXFLAGS:append:libc-musl:toolchain-clang = " -Wno-error=sign-compare -Wno-error=unused-but-set-variable" + +EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \ + -DOTBR_DBUS=ON \ + -DOTBR_REST=ON \ + -DOTBR_WEB=OFF \ + -DCMAKE_LIBRARY_PATH=${libdir} \ + -DOTBR_MDNS=avahi \ + -DOTBR_BACKBONE_ROUTER=ON \ + -DOTBR_BORDER_ROUTING=ON \ + -DOTBR_SRP_ADVERTISING_PROXY=ON \ + -DOTBR_BORDER_AGENT=ON \ + -DOT_SPINEL_RESET_CONNECTION=ON \ + -DOT_TREL=ON \ + -DOT_MLR=ON \ + -DOT_SRP_SERVER=ON \ + -DOT_ECDSA=ON \ + -DOT_SERVICE=ON \ + -DOTBR_DUA_ROUTING=ON \ + -DOT_DUA=ON \ + -DOT_BORDER_ROUTING_NAT64=ON \ + -DOTBR_DNSSD_DISCOVERY_PROXY=ON \ + -DOTBR_INFRA_IF_NAME=eth0 \ + -DOTBR_NO_AUTO_ATTACH=1 \ + -DOT_REFERENCE_DEVICE=ON \ + -DOT_DHCP6_CLIENT=ON \ + -DOT_DHCP6_SERVER=ON \ + " +EXTRA_OECMAKE:append:libc-musl = " -DOT_TARGET_MUSL=ON" + +RDEPENDS:${PN} = "iproute2 ipset avahi-daemon" + +RCONFLICTS:${PN} = "ot-daemon" + +FILES:${PN} += "${systemd_unitdir}/*" +FILES:${PN} += "${datadir}/*" diff --git a/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb b/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb new file mode 100644 index 0000000000..4456835410 --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-daemon_git.bb @@ -0,0 +1,29 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 +SUMMARY = "OpenThread Daemon is an OpenThread POSIX build mode that runs OpenThread as a service." +SECTION = "net" +LICENSE = "BSD-3-Clause & Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=543b6fe90ec5901a683320a36390c65f \ + file://third_party/mbedtls/repo/LICENSE;md5=379d5819937a6c2f1ef1630d341e026d \ + " +DEPENDS = "readline" +SRCREV = "90adc86d34e21a9e8f86d093c2190030042c4a59" +PV = "0.1+git" + +SRC_URI = "git://github.com/openthread/openthread.git;protocol=https;branch=main \ + " + +S = "${WORKDIR}/git" + +inherit cmake + +EXTRA_OECMAKE = "-DOT_DAEMON=ON \ + -DOT_SPINEL_RESET_CONNECTION=ON \ + -DOT_THREAD_VERSION=1.2 \ + -DOT_COVERAGE=OFF \ + -DOT_PLATFORM=posix \ + -DCMAKE_BUILD_TYPE=Release \ + " + +EXTRA_OECMAKE:append:libc-musl = " -DOT_TARGET_OPENWRT=ON" diff --git a/meta-networking/recipes-connectivity/openthread/wpantund/basename.patch b/meta-networking/recipes-connectivity/openthread/wpantund/basename.patch new file mode 100644 index 0000000000..30bd9e59cf --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/wpantund/basename.patch @@ -0,0 +1,19 @@ +include libgen.h for getting prototype for basename() +Newer musl has remove prototype from string.h [1] +which renders a compile error with newer compilers like +clang 18+ about missing prototype. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- a/third_party/openthread/tools/spi-hdlc-adapter/spi-hdlc-adapter.c ++++ b/third_party/openthread/tools/spi-hdlc-adapter/spi-hdlc-adapter.c +@@ -32,6 +32,7 @@ + #endif + + #include <assert.h> ++#include <libgen.h> + #include <stdio.h> + #include <stdlib.h> + #include <stdint.h> diff --git a/meta-networking/recipes-connectivity/openthread/wpantund_git.bb b/meta-networking/recipes-connectivity/openthread/wpantund_git.bb new file mode 100644 index 0000000000..6a84897426 --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/wpantund_git.bb @@ -0,0 +1,30 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 +SUMMARY = "wpantund, Userspace WPAN Network Daemon" +SECTION = "net" +LICENSE = "Apache-2.0 & MIT & BSL-1.0 & BSD-3-Clause" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e7820bc7f7d1638a6b54fc2e8d7fb103 \ + file://third_party/assert-macros/LICENSE;md5=cbf35ecdc8161026afe4da2906fab204 \ + file://third_party/boost/LICENSE;md5=e4224ccaecb14d942c71d31bef20d78c \ + file://third_party/fgetln/LICENSE;md5=389e03d2254ecad45d0d9bbdefef7129 \ + file://third_party/openthread/LICENSE;md5=543b6fe90ec5901a683320a36390c65f \ + file://third_party/pt/LICENSE;md5=dcd598b69cad786beea33da7b1ae14b7 \ + " +DEPENDS = "autoconf-archive dbus readline boost" +SRCREV = "8b5ce64c2f5bbf106cabfd015bcb3bdb2e0248d3" +PV = "0.07.01+git" + +SRC_URI = "gitsm://github.com/openthread/wpantund.git;protocol=https;branch=master \ + file://basename.patch \ + " + +S = "${WORKDIR}/git" + +inherit pkgconfig perlnative autotools + +# There has not been a wpantund release as of yet that includes these fixes. +# That means cve-check can not match them. Once a new release comes we can +# remove the statement. +CVE_STATUS[CVE-2020-8916] = "backported-patch: fixed via 3f108441e23e033b936e85be5b6877dd0a1fbf1c" +CVE_STATUS[CVE-2021-33889] = "backported-patch: fixed via 3f108441e23e033b936e85be5b6877dd0a1fbf1c" diff --git a/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.1.bb b/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.1.bb deleted file mode 100644 index 3aa41f1add..0000000000 --- a/meta-networking/recipes-connectivity/python-networkmanager/python-networkmanager_2.1.bb +++ /dev/null @@ -1,13 +0,0 @@ -SUMMARY = "Easy communication with NetworkManager from Python" -HOMEPAGE = "https://github.com/seveas/python-networkmanager" -LICENSE = "Zlib" - -LIC_FILES_CHKSUM = "file://COPYING;md5=8d8bac174bf8422b151200e6cc78ebe4" - -SRC_URI[md5sum] = "f638d854a3639fb37c0e06d1092a771e" -SRC_URI[sha256sum] = "aef1e34d98d7bec7cc368e0ca0f2e97493f9b5ebe6d7103f8f6460cfca3dc6fc" - -PYPI_PACKAGE = "python-networkmanager" -inherit pypi setuptools - -RDEPENDS_${PN} = "networkmanager python-dbus python-six" diff --git a/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.2.bb b/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.2.bb new file mode 100644 index 0000000000..60cf3c2525 --- /dev/null +++ b/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.2.bb @@ -0,0 +1,13 @@ +SUMMARY = "Easy communication with NetworkManager from Python" +HOMEPAGE = "https://github.com/seveas/python-networkmanager" +LICENSE = "Zlib" + +LIC_FILES_CHKSUM = "file://COPYING;md5=9f8a5b5844f027357ab19ef3e3c6a956" + +SRC_URI[md5sum] = "7e05d3ca40a4fa50222ba93cda3d0d02" +SRC_URI[sha256sum] = "de6eb921d94aba7549f428ed2b3aa482a5d543ecb6965cbaa0fbb555ab31b9d5" + +PYPI_PACKAGE = "python-networkmanager" +inherit pypi setuptools3 + +RDEPENDS:${PN} = "networkmanager python3-dbus python3-six" diff --git a/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch b/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch index 08ba2c31e9..5fc21808f9 100644 --- a/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch +++ b/meta-networking/recipes-connectivity/rdate/rdate/0001-rdate-define-logwtmp-on-libc-glibc.patch @@ -5,6 +5,8 @@ Subject: [PATCH] rdate: define logwtmp on libc != glibc Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + src/rdate.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb index cd4db12c08..67e7c1c615 100644 --- a/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb +++ b/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb @@ -8,7 +8,7 @@ DESCRIPTION = "The rdate utility retrieves the date and time from \ HOMEPAGE= "https://www.aelius.com/njh/rdate/" SECTION = "Applications/System" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3" SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \ diff --git a/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-parallel-build.patch b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-parallel-build.patch new file mode 100644 index 0000000000..f35e96a34f --- /dev/null +++ b/meta-networking/recipes-connectivity/rdist/rdist-6.1.5/rdist-6.1.5-fix-parallel-build.patch @@ -0,0 +1,31 @@ +It fails to produce common.o when system load is high: + +| In file included from common.c:57: +| ../include/defs.h:49:10: fatal error: y.tab.h: No such file or directory +| 49 | #include "y.tab.h" +| | ^~~~~~~~~ +| compilation terminated. + +Make $(COMMONOBJS) which include common.o to depends on related header files +and y.tab.h to fix the parallel build failure. + +Upstream-Status: Inappropriate [no upstream] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + src/Makefile.real | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/Makefile.real b/src/Makefile.real +index e0f0dfc..53d4944 100644 +--- a/src/Makefile.real ++++ b/src/Makefile.real +@@ -41,7 +41,7 @@ $(SERVER_BIN): $(SERVEROBJS) $(COMMONOBJS) $(MISSINGOBJS) + $(CLIENT_BIN): $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) + $(CC) -o $@ $(CLIENTOBJS) $(COMMONOBJS) $(MISSINGOBJS) $(LIBS) $(LDFLAGS) + +-$(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h ++$(COMMONOBJS) $(CLIENTOBJS) $(SERVEROBJS): $(HFILES) y.tab.h + + y.tab.h: gram.c + diff --git a/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb b/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb index 3a27c2c5b3..d81cc9a3d1 100644 --- a/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb +++ b/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb @@ -28,6 +28,7 @@ SRC_URI += "file://rdist-6.1.5-linux.patch \ file://rdist-6.1.5-fix-msgsndnotify-loop.patch \ file://rdist-6.1.5-bb-build.patch \ file://rdist-6.1.5-makefile-add-ldflags.patch \ + file://rdist-6.1.5-fix-parallel-build.patch \ " UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/rdist/files/rdist/" @@ -40,4 +41,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/ -COMPATIBLE_HOST_libc-musl = 'null' +COMPATIBLE_HOST:libc-musl = 'null' diff --git a/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch b/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch deleted file mode 100644 index eaaf30460f..0000000000 --- a/meta-networking/recipes-connectivity/relayd/relayd/0001-rtnl_flush-Error-on-failed-write.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 2fa326b26dc479942367dc4283e2f87372403988 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 17 Jun 2017 09:32:04 -0700 -Subject: [PATCH] rtnl_flush: Error on failed write() - -Fixes -route.c:45:2: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result] -| write(fd, "-1", 2); -| ^~~~~~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted - - route.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/route.c b/route.c -index c552d1f..fc5c31e 100644 ---- a/route.c -+++ b/route.c -@@ -42,7 +42,8 @@ static void rtnl_flush(void) - if (fd < 0) - return; - -- write(fd, "-1", 2); -+ if (write(fd, "-1", 2) < 0 ) -+ perror("write"); - close(fd); - } - --- -2.13.1 - diff --git a/meta-networking/recipes-connectivity/relayd/relayd_git.bb b/meta-networking/recipes-connectivity/relayd/relayd_git.bb index 98dc41a093..871df69909 100644 --- a/meta-networking/recipes-connectivity/relayd/relayd_git.bb +++ b/meta-networking/recipes-connectivity/relayd/relayd_git.bb @@ -1,17 +1,19 @@ DESCRIPTION = "Layer 3 relay daemon" SECTION = "console/network" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://main.c;endline=17;md5=86aad799085683e0a2e1c2684a20bab2" DEPENDS = "libubox" -SRC_URI = "git://git.openwrt.org/project/relayd.git \ - file://0001-rtnl_flush-Error-on-failed-write.patch \ -" +SRC_URI = "git://git.openwrt.org/project/relayd.git;branch=master" -SRCREV = "ad0b25ad74345d367c62311e14b279f5ccb8ef13" -PV = "0.0.1+git${SRCPV}" +SRCREV = "f646ba40489371e69f624f2dee2fc4e19ceec00e" +PV = "0.0.1+git" + +UPSTREAM_CHECK_COMMITS = "1" S = "${WORKDIR}/git" inherit cmake + +CFLAGS:append:toolchain-clang = " -Wno-error=gnu-variable-sized-type-not-at-end" diff --git a/meta-networking/recipes-connectivity/restinio/restinio_0.6.13.bb b/meta-networking/recipes-connectivity/restinio/restinio_0.6.13.bb new file mode 100644 index 0000000000..9239bd81c2 --- /dev/null +++ b/meta-networking/recipes-connectivity/restinio/restinio_0.6.13.bb @@ -0,0 +1,30 @@ +SUMMARY = "Header-only C++14 library that gives you an embedded HTTP server" +DESCRIPTION = "Cross-platform, efficient, customizable, and robust \ + asynchronous HTTP/WebSocket server C++14 library with the \ + right balance between performance and ease of use" +HOMEPAGE = "https://stiffstream.com/en/products/restinio.html" +SECTION = "libs" +LICENSE = "BSD-3-Clause" +LIC_FILES_CHKSUM = "file://../LICENSE;md5=f399b62ce0a152525d1589a5a40c0ff6" +DEPENDS = "asio fmt http-parser" + +SRC_URI = "https://github.com/Stiffstream/restinio/releases/download/v.${PV}/${BP}.tar.bz2" +SRC_URI[md5sum] = "37a4310e98912030a74bdd4ed789f33c" +SRC_URI[sha256sum] = "b35d696e6fafd4563ca708fcecf9d0cf6705c846d417b5000f5252e0188848e7" + +S = "${WORKDIR}/${BP}/dev" + +inherit cmake + +EXTRA_OECMAKE += "\ + -DRESTINIO_TEST=OFF \ + -DRESTINIO_SAMPLE=OFF \ + -DRESTINIO_BENCH=OFF \ + -DRESTINIO_FIND_DEPS=ON \ + -DRESTINIO_ALLOW_SOBJECTIZER=OFF \ + -DRESTINIO_USE_EXTERNAL_HTTP_PARSER=ON \ + " + +# Header-only library +RDEPENDS:${PN}-dev = "" +RRECOMMENDS:${PN}-dbg = "${PN}-dev (= ${EXTENDPKGV})" diff --git a/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch b/meta-networking/recipes-connectivity/samba/samba/0001-Don-t-check-xsltproc-manpages.patch index 8ca7a52ed8..a498348c20 100644 --- a/meta-networking/recipes-connectivity/samba/samba/16-do-not-check-xsltproc-manpages.patch +++ b/meta-networking/recipes-connectivity/samba/samba/0001-Don-t-check-xsltproc-manpages.patch @@ -1,12 +1,14 @@ -From 2214c2d1e455a38c891d17e421b438e3f7c495d8 Mon Sep 17 00:00:00 2001 +From 5c5418038e392cc00d3293e00ea0cd20b5e19c9a Mon Sep 17 00:00:00 2001 From: Bian Naimeng <biannm@cn.fujitsu.com> Date: Mon, 18 Apr 2016 17:00:53 -0400 Subject: [PATCH] Don't check xsltproc manpages Upstream-Status: Pending - + Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> +Rebase to 4.14.4 +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- lib/ldb/wscript | 2 +- lib/talloc/wscript | 2 +- @@ -14,10 +16,10 @@ Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/ldb/wscript b/lib/ldb/wscript -index 5ea5231..d94086b 100644 +index ed5d45f..de3c648 100644 --- a/lib/ldb/wscript +++ b/lib/ldb/wscript -@@ -98,7 +98,7 @@ def configure(conf): +@@ -144,7 +144,7 @@ def configure(conf): conf.DEFINE('EXPECTED_SYSTEM_LDB_VERSION_RELEASE', int(v[2])) if conf.env.standalone_ldb: @@ -27,10 +29,10 @@ index 5ea5231..d94086b 100644 # we need this for the ldap backend if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'): diff --git a/lib/talloc/wscript b/lib/talloc/wscript -index df7e6be..b3305cf 100644 +index 075f1ec..9bd9f73 100644 --- a/lib/talloc/wscript +++ b/lib/talloc/wscript -@@ -49,7 +49,7 @@ def configure(conf): +@@ -48,7 +48,7 @@ def configure(conf): conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig' conf.env.TALLOC_VERSION = VERSION @@ -40,18 +42,18 @@ index df7e6be..b3305cf 100644 conf.CHECK_HEADERS('sys/auxv.h') conf.CHECK_FUNCS('getauxval') diff --git a/lib/tdb/wscript b/lib/tdb/wscript -index 4782550..6bb3fa1 100644 +index 5e6a928..f13cf2a 100644 --- a/lib/tdb/wscript +++ b/lib/tdb/wscript -@@ -89,7 +89,7 @@ def configure(conf): +@@ -95,7 +95,7 @@ def configure(conf): not conf.env.disable_tdb_mutex_locking): conf.define('USE_TDB_MUTEX_LOCKING', 1) - conf.CHECK_XSLTPROC_MANPAGES() + #conf.CHECK_XSLTPROC_MANPAGES() - if not conf.env.disable_python: - # also disable if we don't have the python libs installed + conf.SAMBA_CHECK_PYTHON() + conf.SAMBA_CHECK_PYTHON_HEADERS() -- -2.14.3 +2.25.1 diff --git a/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch b/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch deleted file mode 100644 index de7f311834..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/0001-lib-replace-wscript-Avoid-generating-nested-main-fun.patch +++ /dev/null @@ -1,30 +0,0 @@ -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/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch b/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch deleted file mode 100644 index fb12a10e26..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/0001-samba-fix-musl-lib-without-innetgr.patch +++ /dev/null @@ -1,42 +0,0 @@ -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/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch b/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch deleted file mode 100644 index 23b35a8145..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/0001-waf-add-support-of-cross_compile.patch +++ /dev/null @@ -1,62 +0,0 @@ -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/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch b/meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch index 3f2921ed33..b0ad5c4142 100644 --- a/meta-networking/recipes-connectivity/samba/samba/20-do-not-import-target-module-while-cross-compile.patch +++ b/meta-networking/recipes-connectivity/samba/samba/0002-do-not-import-target-module-while-cross-compile.patch @@ -1,4 +1,4 @@ -From cc0576405803bcae45ee353c4333c449cead9207 Mon Sep 17 00:00:00 2001 +From ba492aead265edfd1da2a6c45dd7661c248309cb 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 @@ -6,16 +6,18 @@ 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. +Upstream-Status: Pending + Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com> 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(-) + 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py -index 60ce7da..5468a36 100644 +index 2300565..26d9e8c 100644 --- a/buildtools/wafsamba/samba_bundled.py +++ b/buildtools/wafsamba/samba_bundled.py @@ -4,6 +4,7 @@ import sys @@ -24,9 +26,9 @@ index 60ce7da..5468a36 100644 from wafsamba import samba_utils +import importlib.util, os - def PRIVATE_NAME(bld, name, private_extension, private_library): + def PRIVATE_NAME(bld, name): '''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'): +@@ -245,17 +246,27 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'): # versions minversion = minimum_library_version(conf, libname, minversion) @@ -63,5 +65,5 @@ index 60ce7da..5468a36 100644 Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion)) sys.exit(1) -- -2.7.4 +2.25.1 diff --git a/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch b/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch deleted file mode 100644 index 6fc849337c..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/0002-util_sec.c-Move-__thread-variable-to-global-scope.patch +++ /dev/null @@ -1,58 +0,0 @@ -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/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch b/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch index 46a6f06267..2c9d29c9fe 100644 --- a/meta-networking/recipes-connectivity/samba/samba/21-add-config-option-without-valgrind.patch +++ b/meta-networking/recipes-connectivity/samba/samba/0003-Add-config-option-without-valgrind.patch @@ -1,4 +1,4 @@ -From 87bc8e7eafc7d12a1d3a143ebb9e43cf5fbafb72 Mon Sep 17 00:00:00 2001 +From cceee20e91af751469872b71155b23f0dec290a7 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 @@ -9,42 +9,48 @@ 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> + +Rebase to 4.19.3 +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- lib/replace/wscript | 5 +++-- - wscript | 4 ++++ - 2 files changed, 7 insertions(+), 2 deletions(-) + wscript | 7 +++++++ + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/replace/wscript b/lib/replace/wscript -index a7fd25d..a19ae68 100644 +index 37d7759..9dd9b48 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -110,8 +110,9 @@ def configure(conf): +@@ -113,8 +113,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') -- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') -+ if not Options.options.disable_valgrind: +- conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h valgrind/callgrind.h') ++ if Options.options.enable_valgrind: + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h') -+ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h') ++ conf.CHECK_HEADERS('valgrind/memcheck.h valgrind/helgrind.h valgrind/callgrind.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/wscript b/wscript -index e38a8e9..38b7230 100644 +index 95ddd9e..6d9577a 100644 --- a/wscript +++ b/wscript -@@ -105,6 +105,10 @@ def options(opt): - help=("Disable RELRO builds"), - action="store_false", dest='enable_relro') +@@ -123,6 +123,13 @@ def options(opt): + help=('Disable kernely keyring support for credential storage'), + action='store_false', dest='enable_keyring') ++ opt.add_option('--with-valgrind', ++ help=("Enable use of valgrind"), ++ action="store_true", dest='enable_valgrind') + opt.add_option('--without-valgrind', -+ help=("Disable use of the valgrind headers"), -+ action="store_true", dest='disable_valgrind', default=False) ++ help=("Disable use of valgrind"), ++ action="store_false", dest='enable_valgrind', default=False) + gr = opt.option_group('developer options') opt.load('python') # options for disabling pyc or pyo compilation -- -2.7.4 +2.25.1 diff --git a/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch b/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch new file mode 100644 index 0000000000..c72bd133ee --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0004-Add-options-to-configure-the-use-of-libbsd.patch @@ -0,0 +1,97 @@ +From d302d9a4ac6eb2bbafd248064a878ba287d636b8 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> + +Rebase to 4.14.4 +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + buildtools/wafsamba/wscript | 7 +++++++ + lib/replace/wscript | 29 +++++++++++++++-------------- + lib/texpect/wscript | 8 +++++++- + 3 files changed, 29 insertions(+), 15 deletions(-) + +diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript +index 30cb366..d167551 100644 +--- a/buildtools/wafsamba/wscript ++++ b/buildtools/wafsamba/wscript +@@ -145,6 +145,13 @@ Currently the only tested value is 'smbtorture,smbd/smbd' for Samba'''), + 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/replace/wscript b/lib/replace/wscript +index 9dd9b48..a22ae59 100644 +--- a/lib/replace/wscript ++++ b/lib/replace/wscript +@@ -444,20 +444,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 44f92a8..79e8d09 100644 +--- a/lib/texpect/wscript ++++ b/lib/texpect/wscript +@@ -1,7 +1,13 @@ + #!/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', +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch b/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch new file mode 100644 index 0000000000..53ef21948a --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0005-Fix-pyext_PATTERN-for-cross-compilation.patch @@ -0,0 +1,63 @@ +From d2a2d0f82a37d0bf21123671774b0b03ffa976cf Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Wed, 24 Nov 2021 13:33:35 +0800 +Subject: [PATCH] Fix pyext_PATTERN for cross compilation + +The pyext_PATTERN will add native arch as suffix when cross compiling. +For example, on qemuarm64, it is expanded to: +pyext_PATTERN ='%s.cpython-310-x86_64-linux-gnu.so' +which will result in the incorrect library name. + +root@qemuarm64:~# find /usr/lib -name \*cpython\* +/usr/lib/pkgconfig/samba-policy.cpython-310-x86_64-linux-gnu.pc +/usr/lib/libsamba-policy.cpython-310-x86-64-linux-gnu.so +/usr/lib/samba/libsamba-python.cpython-310-x86-64-linux-gnu-samba4.so +/usr/lib/samba/libsamba-net.cpython-310-x86-64-linux-gnu-samba4.so +/usr/lib/libsamba-policy.cpython-310-x86-64-linux-gnu.so.0 +/usr/lib/libsamba-policy.cpython-310-x86-64-linux-gnu.so.0.0.1 +/usr/lib/python3.10/site-packages/samba/dsdb_dns.cpython-310-x86_64-linux-gnu.so +/usr/lib/python3.10/site-packages/samba/dsdb.cpython-310-x86_64-linux-gnu.so +/usr/lib/python3.10/site-packages/samba/xattr_tdb.cpython-310-x86_64-linux-gnu.so +/usr/lib/python3.10/site-packages/samba/_ldb.cpython-310-x86_64-linux-gnu.so +/usr/lib/python3.10/site-packages/samba/gensec.cpython-310-x86_64-linux-gnu.so +[snip] + +Set pyext_PATTERN to '%s.so' to remove the suffix. +After the patch: +root@qemuarm64:~# find /usr/lib/ +/usr/lib/pkgconfig/samba-policy.pc +/usr/lib/libsamba-policy.so +/usr/lib/samba/libsamba-python-samba4.so +/usr/lib/samba/libsamba-net-samba4.so +/usr/lib/libsamba-policy.so.0 +/usr/lib/libsamba-policy.so.0.0.1 +/usr/lib/python3.10/site-packages/samba/dsdb_dns.so +/usr/lib/python3.10/site-packages/samba/dsdb.so +/usr/lib/python3.10/site-packages/samba/xattr_tdb.so +/usr/lib/python3.10/site-packages/samba/_ldb.so +/usr/lib/python3.10/site-packages/samba/gensec.so +[snip] + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + third_party/waf/waflib/Tools/python.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/third_party/waf/waflib/Tools/python.py b/third_party/waf/waflib/Tools/python.py +index b2dd1a9..2bd3545 100644 +--- a/third_party/waf/waflib/Tools/python.py ++++ b/third_party/waf/waflib/Tools/python.py +@@ -339,7 +339,7 @@ def check_python_headers(conf, features='pyembed pyext'): + x = 'MACOSX_DEPLOYMENT_TARGET' + if dct[x]: + env[x] = conf.environ[x] = str(dct[x]) +- env.pyext_PATTERN = '%s' + (dct['EXT_SUFFIX'] or dct['SO']) # SO is deprecated in 3.5 and removed in 3.11 ++ env.pyext_PATTERN = '%s.so' + + + # Try to get pythonX.Y-config +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch b/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch new file mode 100644 index 0000000000..13fbd35950 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0006-smbtorture-skip-test-case-tfork_cmd_send.patch @@ -0,0 +1,38 @@ +From 4fd04fc7c94d6981f3409d088ab8d32c48460010 Mon Sep 17 00:00:00 2001 +From: Yi Zhao <yi.zhao@windriver.com> +Date: Thu, 25 Aug 2022 16:46:04 +0800 +Subject: [PATCH] smbtorture: skip test case tfork_cmd_send + +The test case tfork_cmd_send fails on target as it requires a script +located in the source directory: + +$ smbtorture ncalrpc:localhost local.tfork.tfork_cmd_send +test: tfork_cmd_send +/buildarea/build/tmp/work/core2-64-poky-linux/samba/4.14.14-r0/samba-4.14.14/testprogs/blackbox/tfork.sh: +Failed to exec child - No such file or directory + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Yi Zhao <yi.zhao@windriver.com> +--- + lib/util/tests/tfork.c | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/lib/util/tests/tfork.c b/lib/util/tests/tfork.c +index 70ae975..4826ce6 100644 +--- a/lib/util/tests/tfork.c ++++ b/lib/util/tests/tfork.c +@@ -839,10 +839,6 @@ struct torture_suite *torture_local_tfork(TALLOC_CTX *mem_ctx) + "tfork_threads", + test_tfork_threads); + +- torture_suite_add_simple_test(suite, +- "tfork_cmd_send", +- test_tfork_cmd_send); +- + torture_suite_add_simple_test(suite, + "tfork_event_file_handle", + test_tfork_event_file_handle); +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch b/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch new file mode 100644 index 0000000000..e3506adfb7 --- /dev/null +++ b/meta-networking/recipes-connectivity/samba/samba/0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch @@ -0,0 +1,124 @@ +From bf5552f937c745940081e29ef32d52ae26bfd8c1 Mon Sep 17 00:00:00 2001 +From: Lei Maohui <leimaohui@fujitsu.com> +Date: Sun, 30 Oct 2022 11:59:31 +0900 +Subject: [PATCH] Deleted settiong of python to fix the install conflict error + when enable multilib. + + file /usr/bin/samba-tool conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + file /usr/sbin/samba-gpupdate conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + file /usr/sbin/samba_dnsupdate conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + file /usr/sbin/samba_downgrade_db conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + file /usr/sbin/samba_kcc conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + file /usr/sbin/samba_spnupdate conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + file /usr/sbin/samba_upgradedns conflicts between attempted installs of samba-4.14.14-r0.core2_64 and lib32-samba-4.14.14-r0.i686 + +The conflict is because there is a difference between of lib32-samba-* and samba-* as the following: +64bit: +sys.path.insert(0, "/usr/lib64/python3.10/site-packages") + +32bit: +sys.path.insert(0, "/usr/lib/python3.10/site-packages") + +But this setting is for environment when running from source tree. There +is no necessary on target. + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> +--- + source4/scripting/bin/samba-gpupdate | 1 - + source4/scripting/bin/samba-tool | 1 - + source4/scripting/bin/samba_dnsupdate | 1 - + source4/scripting/bin/samba_downgrade_db | 1 - + source4/scripting/bin/samba_kcc | 1 - + source4/scripting/bin/samba_spnupdate | 1 - + source4/scripting/bin/samba_upgradedns | 1 - + 7 files changed, 7 deletions(-) + +diff --git a/source4/scripting/bin/samba-gpupdate b/source4/scripting/bin/samba-gpupdate +index 4b3f057..08fec2d 100755 +--- a/source4/scripting/bin/samba-gpupdate ++++ b/source4/scripting/bin/samba-gpupdate +@@ -25,7 +25,6 @@ applied, have changed, or is in the right container''' + import os + import sys + +-sys.path.insert(0, "bin/python") + + import optparse + from samba import getopt as options +diff --git a/source4/scripting/bin/samba-tool b/source4/scripting/bin/samba-tool +index b02ad4d..f69ae10 100755 +--- a/source4/scripting/bin/samba-tool ++++ b/source4/scripting/bin/samba-tool +@@ -22,7 +22,6 @@ + import sys + + # Find right direction when running from source tree +-sys.path.insert(0, "bin/python") + + # make sure the script dies immediately when hitting control-C, + # rather than raising KeyboardInterrupt. As we do all database +diff --git a/source4/scripting/bin/samba_dnsupdate b/source4/scripting/bin/samba_dnsupdate +index 69821e2..4037870 100755 +--- a/source4/scripting/bin/samba_dnsupdate ++++ b/source4/scripting/bin/samba_dnsupdate +@@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1' + os.environ["TZ"] = "GMT" + + # Find right directory when running from source tree +-sys.path.insert(0, "bin/python") + + import samba + import optparse +diff --git a/source4/scripting/bin/samba_downgrade_db b/source4/scripting/bin/samba_downgrade_db +index b9a0909..80f581e 100755 +--- a/source4/scripting/bin/samba_downgrade_db ++++ b/source4/scripting/bin/samba_downgrade_db +@@ -23,7 +23,6 @@ import optparse + import sys + + # Find right directory when running from source tree +-sys.path.insert(0, "bin/python") + + + import samba +diff --git a/source4/scripting/bin/samba_kcc b/source4/scripting/bin/samba_kcc +index 67d801e..2fc0d6a 100755 +--- a/source4/scripting/bin/samba_kcc ++++ b/source4/scripting/bin/samba_kcc +@@ -36,7 +36,6 @@ os.environ['PYTHONUNBUFFERED'] = '1' + os.environ["TZ"] = "GMT" + + # Find right directory when running from source tree +-sys.path.insert(0, "bin/python") + + import optparse + import time +diff --git a/source4/scripting/bin/samba_spnupdate b/source4/scripting/bin/samba_spnupdate +index b421886..5e18ad9 100755 +--- a/source4/scripting/bin/samba_spnupdate ++++ b/source4/scripting/bin/samba_spnupdate +@@ -32,7 +32,6 @@ os.environ['PYTHONUNBUFFERED'] = '1' + os.environ["TZ"] = "GMT" + + # Find right directory when running from source tree +-sys.path.insert(0, "bin/python") + + import samba, ldb + import optparse +diff --git a/source4/scripting/bin/samba_upgradedns b/source4/scripting/bin/samba_upgradedns +index afc5807..727a3cc 100755 +--- a/source4/scripting/bin/samba_upgradedns ++++ b/source4/scripting/bin/samba_upgradedns +@@ -27,7 +27,6 @@ import grp + from base64 import b64encode + import shlex + +-sys.path.insert(0, "bin/python") + + import ldb + import samba +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch b/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch deleted file mode 100644 index 5c299d617b..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/cmocka-uintptr_t.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 5bd7b5d04435bd593349825973ce32290f5f604d Mon Sep 17 00:00:00 2001 -From: Changqing Li <changqing.li@windriver.com> -Date: Wed, 25 Jul 2018 09:55:25 +0800 -Subject: [PATCH] samba: cmocka.h: fix musl libc conflicting types error - -Fix build on qemumips64(el) - -taken from: -[PATCH] libldb: fix musl libc conflicting types error - -/third_party/cmocka/cmocka.h:126:28: error: conflicting types for 'uintptr_t' - typedef unsigned int uintptr_t; - ^~~~~~~~~ -use __DEFINED_uintptr_t in alltypes.h to check if uintptr already defined - -Upstream-Status: Pending - -Signed-off-by: Changqing Li <changqing.li@windriver.com> -Signed-off-by: Andrea Adami <andrea.adami@gmail.com> ---- - third_party/cmocka/cmocka.h | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/third_party/cmocka/cmocka.h b/third_party/cmocka/cmocka.h -index 4fd82a9..5443a08 100644 ---- a/third_party/cmocka/cmocka.h -+++ b/third_party/cmocka/cmocka.h -@@ -110,7 +110,7 @@ typedef uintmax_t LargestIntegralType; - ((LargestIntegralType)(value)) - - /* Smallest integral type capable of holding a pointer. */ --#if !defined(_UINTPTR_T) && !defined(_UINTPTR_T_DEFINED) -+#if !defined(__DEFINED_uintptr_t) - # if defined(_WIN32) - /* WIN32 is an ILP32 platform */ - typedef unsigned int uintptr_t; -@@ -134,9 +134,8 @@ typedef uintmax_t LargestIntegralType; - # endif /* __WORDSIZE */ - # endif /* _WIN32 */ - --# define _UINTPTR_T --# define _UINTPTR_T_DEFINED --#endif /* !defined(_UINTPTR_T) || !defined(_UINTPTR_T_DEFINED) */ -+# define __DEFINED_uintptr_t -+#endif /* !defined(__DEFINED_uintptr_t) */ - - /* Perform an unsigned cast to uintptr_t. */ - #define cast_to_pointer_integral_type(value) \ --- -2.7.4 - diff --git a/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch deleted file mode 100644 index 0c7592f8e2..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/dnsserver-4.7.0.patch +++ /dev/null @@ -1,19 +0,0 @@ -samba: build dnsserver_common code - -Just 'install' does not seem to do it. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- a/source4/dns_server/wscript_build -+++ b/source4/dns_server/wscript_build -@@ -4,7 +4,7 @@ bld.SAMBA_LIBRARY('dnsserver_common', - source='dnsserver_common.c', - deps='samba-util samba-errors ldbsamba clidns', - private_library=True, -- install=bld.AD_DC_BUILD_IS_ENABLED() -+ enabled=bld.AD_DC_BUILD_IS_ENABLED() - ) - - bld.SAMBA_MODULE('service_dns', diff --git a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch b/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch deleted file mode 100644 index d07ec0df18..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/glibc_only.patch +++ /dev/null @@ -1,28 +0,0 @@ -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("INFO: pid=%u\n", mutex->__data.__owner); -+#endif - } else if (ret == 0) { - pthread_mutex_unlock(mutex); - } --- -2.7.4 - diff --git a/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch deleted file mode 100644 index 5ae8c59783..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/iconv-4.7.0.patch +++ /dev/null @@ -1,25 +0,0 @@ -samba: defeat iconv test - -A test was added when configuring samba which requires target code -to be executed. In general, this will not work, so we eliminate it. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- a/lib/util/charset/wscript_configure -+++ b/lib/util/charset/wscript_configure -@@ -17,6 +17,8 @@ if (conf.CHECK_FUNCS_IN('iconv_open', 'i - - conf.DEFINE('HAVE_NATIVE_ICONV', 1) - -+""" -+[added for 4.7.0, but breaks cross-compilation] - conf.CHECK_CODE(''' - uint8_t inbuf[2] = { 0x30, 0xdf }; - uint8_t outbuf[4] = { 0 }; -@@ -36,3 +38,4 @@ conf.CHECK_CODE(''' - msg='Checking errno of iconv for illegal multibyte sequence', - lib='iconv', - headers='errno.h iconv.h') -+""" diff --git a/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch b/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch deleted file mode 100644 index eb06866f46..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/netdb_defines.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: samba-4.6.2/nsswitch/wins.c -=================================================================== ---- samba-4.6.2.orig/nsswitch/wins.c -+++ samba-4.6.2/nsswitch/wins.c -@@ -39,6 +39,14 @@ static pthread_mutex_t wins_nss_mutex = - #define INADDRSZ 4 - #endif - -+#ifndef NETDB_INTERNAL -+#define NETDB_INTERNAL (-1) -+#endif -+ -+#ifndef NETDB_SUCCESS -+#define NETDB_SUCCESS 0 -+#endif -+ - NSS_STATUS _nss_wins_gethostbyname_r(const char *hostname, - struct hostent *he, - char *buffer, diff --git a/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch b/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch index a75ac2bbae..0c967be62f 100644 --- a/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch +++ b/meta-networking/recipes-connectivity/samba/samba/samba-4.3.9-remove-getpwent_r.patch @@ -1,4 +1,4 @@ -From 02e0b14d8fa025a5db410d60a7c0dfebd536aaeb Mon Sep 17 00:00:00 2001 +From e5d9527e6b3b386229747f799c725fcd68bc5228 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 6 Nov 2016 23:40:54 -0800 Subject: [PATCH] Musl does not have _r versions of getent() and getpwent() @@ -7,14 +7,15 @@ Subject: [PATCH] Musl does not have _r versions of getent() and getpwent() Taken from gentoo http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.3.9-remove-getpwent_r.patch -Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- source4/torture/local/nss_tests.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/source4/torture/local/nss_tests.c b/source4/torture/local/nss_tests.c -index 2cd6122..04f13c6 100644 +index e911aa2..2b39b74 100644 --- a/source4/torture/local/nss_tests.c +++ b/source4/torture/local/nss_tests.c @@ -247,7 +247,6 @@ static bool test_getgrnam_r(struct torture_context *tctx, @@ -33,7 +34,7 @@ index 2cd6122..04f13c6 100644 static bool test_enum_r_passwd(struct torture_context *tctx, struct passwd **pwd_array_p, size_t *num_pwd_p) -@@ -381,6 +381,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx, +@@ -383,6 +383,7 @@ static bool test_enum_r_passwd(struct torture_context *tctx, return true; } @@ -41,7 +42,7 @@ index 2cd6122..04f13c6 100644 static bool torture_assert_passwd_equal(struct torture_context *tctx, const struct passwd *p1, -@@ -432,7 +433,7 @@ static bool test_passwd_r(struct torture_context *tctx) +@@ -434,7 +435,7 @@ static bool test_passwd_r(struct torture_context *tctx) struct passwd *pwd, pwd1, pwd2; size_t num_pwd; @@ -50,7 +51,7 @@ index 2cd6122..04f13c6 100644 "failed to enumerate passwd"); for (i=0; i < num_pwd; i++) { -@@ -460,7 +461,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx) +@@ -462,7 +463,7 @@ static bool test_passwd_r_cross(struct torture_context *tctx) struct passwd *pwd, pwd1, pwd2, pwd3, pwd4; size_t num_pwd; @@ -59,7 +60,7 @@ index 2cd6122..04f13c6 100644 "failed to enumerate passwd"); for (i=0; i < num_pwd; i++) { -@@ -531,6 +532,7 @@ static bool test_enum_group(struct torture_context *tctx, +@@ -533,6 +534,7 @@ static bool test_enum_group(struct torture_context *tctx, return true; } @@ -67,7 +68,7 @@ index 2cd6122..04f13c6 100644 static bool test_enum_r_group(struct torture_context *tctx, struct group **grp_array_p, size_t *num_grp_p) -@@ -579,6 +581,7 @@ static bool test_enum_r_group(struct torture_context *tctx, +@@ -583,6 +585,7 @@ static bool test_enum_r_group(struct torture_context *tctx, return true; } @@ -75,7 +76,7 @@ index 2cd6122..04f13c6 100644 static bool torture_assert_group_equal(struct torture_context *tctx, const struct group *g1, -@@ -635,7 +638,7 @@ static bool test_group_r(struct torture_context *tctx) +@@ -639,7 +642,7 @@ static bool test_group_r(struct torture_context *tctx) struct group *grp, grp1, grp2; size_t num_grp; @@ -84,7 +85,7 @@ index 2cd6122..04f13c6 100644 "failed to enumerate group"); for (i=0; i < num_grp; i++) { -@@ -663,7 +666,7 @@ static bool test_group_r_cross(struct torture_context *tctx) +@@ -667,7 +670,7 @@ static bool test_group_r_cross(struct torture_context *tctx) struct group *grp, grp1, grp2, grp3, grp4; size_t num_grp; @@ -93,3 +94,6 @@ index 2cd6122..04f13c6 100644 "failed to enumerate group"); for (i=0; i < num_grp; i++) { +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch index 27b40f2152..4fcbb47572 100644 --- a/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch +++ b/meta-networking/recipes-connectivity/samba/samba/samba-pam.patch @@ -1,21 +1,22 @@ -From 54a5279cb33abd23ef7c094d51f16078ece2da0c Mon Sep 17 00:00:00 2001 +From c533bdced677e2104565fc06602e7e63d9c79ac0 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Sun, 6 Nov 2016 23:40:54 -0800 Subject: [PATCH] Lifted from gentoo and ported to 4.4.5 http://data.gpo.zugaina.org/musl/net-fs/samba/files/samba-4.2.7-pam.patch -Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> --- source3/wscript | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source3/wscript b/source3/wscript -index 5436db2..864f614 100644 +index b7f96f3..ed12b1e 100644 --- a/source3/wscript +++ b/source3/wscript -@@ -879,7 +879,7 @@ msg.msg_accrightslen = sizeof(fd); +@@ -863,7 +863,7 @@ msg.msg_accrightslen = sizeof(fd); if conf.env.with_iconv: conf.DEFINE('HAVE_ICONV', 1) @@ -24,7 +25,7 @@ index 5436db2..864f614 100644 use_pam=True conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h') if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'): -@@ -956,6 +956,17 @@ int i; i = PAM_RADIO_TYPE; +@@ -940,6 +940,17 @@ int i; i = PAM_RADIO_TYPE; "or headers not found. Use --without-pam to disable " "PAM support."); @@ -42,3 +43,6 @@ index 5436db2..864f614 100644 seteuid = False # +-- +2.25.1 + diff --git a/meta-networking/recipes-connectivity/samba/samba/smb.conf b/meta-networking/recipes-connectivity/samba/samba/smb.conf index a0b87c3735..588491ee68 100644 --- a/meta-networking/recipes-connectivity/samba/samba/smb.conf +++ b/meta-networking/recipes-connectivity/samba/samba/smb.conf @@ -25,20 +25,13 @@ ## 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 -# Windows Internet Name Serving Support Section: -# WINS Support - Tells the NMBD component of Samba to enable its WINS Server -# wins support = no - -# WINS Server - Tells the NMBD components of Samba to be a WINS Client -# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both -; wins server = w.x.y.z - -# This will prevent nmbd to search for NetBIOS names through DNS. - dns proxy = no - #### Networking #### # The specific set of interfaces / networks to bind to @@ -64,14 +57,9 @@ # Cap the size of the individual log files (in KiB). max log size = 1000 -# If you want Samba to only log through syslog then set the following -# parameter to 'yes'. -# syslog only = no - -# We want Samba to log a minimum amount of information to syslog. Everything -# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log -# through syslog you should set the following parameter to something higher. - syslog = 0 +# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}. +# Append syslog@1 if you want important messages to be sent to syslog too. + logging = file # Do something sensible when Samba crashes: mail the admin a backtrace panic action = /usr/share/samba/panic-action %d @@ -90,10 +78,6 @@ # new domain. server role = standalone server -# If you are using encrypted passwords, Samba will need to know what -# password database type you are using. - passdb backend = tdbsam - obey pam restrictions = yes # This boolean parameter controls whether Samba attempts to sync the Unix @@ -114,13 +98,13 @@ # This option controls how unsuccessful authentication attempts are mapped # to anonymous connections - map to guest = bad user + map to guest = never ########## Domains ########### # -# The following settings only takes effect if 'server role = primary -# classic domain controller', 'server role = backup domain controller' +# The following settings only takes effect if 'server role = classic +# primary domain controller', 'server role = classic backup domain controller' # or 'domain logons' is set # @@ -168,15 +152,17 @@ # Some defaults for winbind (make sure you're not using the ranges # for something else.) -; idmap uid = 10000-20000 -; idmap gid = 10000-20000 +; idmap config * : backend = tdb +; idmap config * : range = 3000-7999 +; idmap config YOURDOMAINHERE : backend = tdb +; idmap config YOURDOMAINHERE : range = 100000-999999 ; template shell = /bin/bash # Setup usershare options to enable non-root users to share folders # with the net usershare command. -# Maximum number of usershare. 0 (default) means that usershare is disabled. -; usershare max shares = 100 +# Maximum number of usershare. 0 means that usershare is disabled. +# usershare max shares = 100 # Allow users who've been granted usershare privileges to create # public shares, not just authenticated ones diff --git a/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch b/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch deleted file mode 100644 index 6ae292835b..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/smb_conf-4.7.0.patch +++ /dev/null @@ -1,28 +0,0 @@ -From f99b6a8617df6a46f41fb68ffafb2608dbb6681e Mon Sep 17 00:00:00 2001 -From: Joe Slater <joe.slater@windriver.com> -Date: Wed, 8 Nov 2017 11:58:05 -0800 -Subject: [PATCH] samba: correct log files location - -We use /var/log/samba. - -Upstream-Status: Pending - -Signed-off-by: Joe Slater <joe.slater@windriver.com> - ---- - examples/smb.conf.default | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/examples/smb.conf.default b/examples/smb.conf.default -index 2f20720..44c1aa8 100644 ---- a/examples/smb.conf.default -+++ b/examples/smb.conf.default -@@ -52,7 +52,7 @@ - - # this tells Samba to use a separate log file for each machine - # that connects -- log file = /usr/local/samba/var/log.%m -+ log file = /var/log/samba/log.%m - - # Put a capping on the size of the log files (in Kb). - max log size = 50 diff --git a/meta-networking/recipes-connectivity/samba/samba_4.10.7.bb b/meta-networking/recipes-connectivity/samba/samba_4.19.5.bb index 1b2bc087d5..f5ef86dd4b 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.10.7.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.19.5.bb @@ -1,10 +1,10 @@ HOMEPAGE = "https://www.samba.org/" SECTION = "console/network" -LICENSE = "GPL-3.0+ & LGPL-3.0+ & GPL-2.0+" +LICENSE = "GPL-3.0-or-later & LGPL-3.0-or-later & GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ - file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \ - file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 " + file://${COREBASE}/meta/files/common-licenses/LGPL-3.0-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \ + file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c" SAMBA_MIRROR = "http://samba.org/samba/ftp" MIRRORS += "\ @@ -12,71 +12,71 @@ ${SAMBA_MIRROR} http://mirror.internode.on.net/pub/samba \n \ ${SAMBA_MIRROR} http://www.mirrorservice.org/sites/ftp.samba.org \n \ " +export PYTHONHASHSEED="1" + SRC_URI = "${SAMBA_MIRROR}/stable/samba-${PV}.tar.gz \ file://smb.conf \ - file://16-do-not-check-xsltproc-manpages.patch \ - file://20-do-not-import-target-module-while-cross-compile.patch \ - file://21-add-config-option-without-valgrind.patch \ - file://netdb_defines.patch \ - file://glibc_only.patch \ - file://iconv-4.7.0.patch \ - file://dnsserver-4.7.0.patch \ - file://smb_conf-4.7.0.patch \ file://volatiles.03_samba \ - 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-Don-t-check-xsltproc-manpages.patch \ + file://0002-do-not-import-target-module-while-cross-compile.patch \ + file://0003-Add-config-option-without-valgrind.patch \ + file://0004-Add-options-to-configure-the-use-of-libbsd.patch \ + file://0005-Fix-pyext_PATTERN-for-cross-compilation.patch \ + file://0006-smbtorture-skip-test-case-tfork_cmd_send.patch \ + file://0007-Deleted-settiong-of-python-to-fix-the-install-confli.patch \ " -SRC_URI_append_libc-musl = " \ + +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] = "05472d0dd943b3ccbc3be5032a9eb563" -SRC_URI[sha256sum] = "34f30494b6b63700f54be22be636e8a6e0430577166a76a017075e11c02a1ebb" +SRC_URI[sha256sum] = "0e2405b4cec29d0459621f4340a1a74af771ec7cffedff43250cad7f1f87605e" -UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.10(\.\d+)+).tar.gz" +UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.19(\.\d+)+).tar.gz" + +inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version pkgconfig + +CVE_STATUS[CVE-2011-2411] = "not-applicable-platform: vulnerable only on HP NonStop Servers" -inherit systemd waf-samba cpan-base perlnative update-rc.d # remove default added RDEPENDS on perl -RDEPENDS_${PN}_remove = "perl" +RDEPENDS:${PN}:remove = "perl" -DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libbsd libaio libpam libtasn1 jansson" +DEPENDS += "readline virtual/libiconv zlib popt libtalloc libtdb libtevent libldb libaio libpam libtasn1 libtasn1-native jansson libparse-yapp-perl-native gnutls cmocka" -inherit distro_features_check +inherit features_check REQUIRED_DISTRO_FEATURES = "pam" -DEPENDS_append_libc-musl = " libtirpc" -CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" -LDFLAGS_append_libc-musl = " -ltirpc" +DEPENDS:append:libc-musl = " libtirpc" +CFLAGS:append:libc-musl = " -I${STAGING_INCDIR}/tirpc" +LDFLAGS:append:libc-musl = " -ltirpc" + +COMPATIBLE_HOST:riscv32 = "null" INITSCRIPT_NAME = "samba" INITSCRIPT_PARAMS = "start 20 3 5 . stop 20 0 1 6 ." -SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind" -SYSTEMD_SERVICE_${PN}-base = "nmb.service smb.service" -SYSTEMD_SERVICE_${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}" -SYSTEMD_SERVICE_winbind = "winbind.service" +SYSTEMD_PACKAGES = "${PN}-base ${PN}-ad-dc winbind ctdb" +SYSTEMD_SERVICE:${PN}-base = "nmb.service smb.service" +SYSTEMD_SERVICE:${PN}-ad-dc = "${@bb.utils.contains('PACKAGECONFIG', 'ad-dc', 'samba.service', '', d)}" +SYSTEMD_SERVICE:winbind = "winbind.service" +SYSTEMD_SERVICE:ctdb = "ctdb.service" # There are prerequisite settings to enable ad-dc, so disable the service by default. # Reference: # https://wiki.samba.org/index.php/Setting_up_Samba_as_an_Active_Directory_Domain_Controller -SYSTEMD_AUTO_ENABLE_${PN}-ad-dc = "disable" +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. +# Use krb5. Build active domain controller. # PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd zeroconf', d)} \ - acl cups ad-dc gnutls ldap mitkrb5 \ + acl cups ldap mitkrb5 \ " -RDEPENDS_${PN}-ctdb-tests += "bash util-linux-getopt" - PACKAGECONFIG[acl] = "--with-acl-support,--without-acl-support,acl" PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin" PACKAGECONFIG[cups] = "--enable-cups,--disable-cups,cups" @@ -85,25 +85,14 @@ PACKAGECONFIG[sasl] = ",,cyrus-sasl" PACKAGECONFIG[systemd] = "--with-systemd,--without-systemd,systemd" PACKAGECONFIG[dmapi] = "--with-dmapi,--without-dmapi,dmapi" 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," - -# 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: -# http://samba.2283325.n4.nabble.com/samba-4-6-6-Unknown-dependency-kdc-in-service-kdc-objlist-td4722096.html -# So the working combination is: -# 1) ad-dc: enable, gnutls: enable, mitkrb5: disable -# 2) ad-dc: disable, gnutls: enable/disable, mitkrb5: enable -# -# 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] = "--with-experimental-mit-ad-dc,--without-ad-dc,," -PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," +PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind" +PACKAGECONFIG[lttng] = "--with-lttng,--without-lttng,lttng-ust" +PACKAGECONFIG[archive] = "--with-libarchive,--without-libarchive,libarchive" +PACKAGECONFIG[libunwind] = "--with-libunwind,--without-libunwind,libunwind" +PACKAGECONFIG[gpgme] = "--with-gpgme,--without-gpgme,gpgme" +PACKAGECONFIG[lmdb] = ",--without-ldb-lmdb,lmdb" +PACKAGECONFIG[libbsd] = "--with-libbsd,--without-libbsd,libbsd" +PACKAGECONFIG[ad-dc] = "--with-experimental-mit-ad-dc,--without-ad-dc,python3-markdown python3-dnspython," PACKAGECONFIG[mitkrb5] = "--with-system-mitkrb5 --with-system-mitkdc=/usr/sbin/krb5kdc,,krb5," SAMBA4_IDMAP_MODULES="idmap_ad,idmap_rid,idmap_adex,idmap_hash,idmap_tdb2" @@ -115,15 +104,17 @@ 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,NONE" +SAMBA4_LIBS="heimdal,NONE" EXTRA_OECONF += "--enable-fhs \ --with-piddir=/run \ --with-sockets-dir=/run/samba \ --with-modulesdir=${libdir}/samba \ + --with-privatelibdir=${libdir}/samba \ --with-lockdir=${localstatedir}/lib/samba \ --with-cachedir=${localstatedir}/lib/samba \ --disable-rpath-install \ + --disable-rpath \ --with-shared-modules=${SAMBA4_MODULES} \ --bundled-libraries=${SAMBA4_LIBS} \ ${@oe.utils.conditional('TARGET_ARCH', 'x86_64', '', '--disable-glusterfs', d)} \ @@ -131,11 +122,23 @@ EXTRA_OECONF += "--enable-fhs \ --with-profiling-data \ --with-libiconv=${STAGING_DIR_HOST}${prefix} \ --with-pam --with-pammodulesdir=${base_libdir}/security \ + --pythondir=${PYTHON_SITEPACKAGES_DIR} \ " LDFLAGS += "-Wl,-z,relro,-z,now ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', ' -fuse-ld=bfd ', '', d)}" -do_install_append() { +do_configure:append() { + cd ${S}/pidl/ + perl Makefile.PL PREFIX=${prefix} + sed -e 's,VENDORPREFIX)/lib/perl,VENDORPREFIX)/${baselib}/perl,g' \ + -e 's,PERLPREFIX)/lib/perl,PERLPREFIX)/${baselib}/perl,g' -i Makefile +} + +do_compile:append() { + oe_runmake -C ${S}/pidl +} + +do_install:append() { for section in 1 5 7; do install -d ${D}${mandir}/man$section install -m 0644 ctdb/doc/*.$section ${D}${mandir}/man$section @@ -177,11 +180,11 @@ do_install_append() { install -m644 packaging/systemd/samba.sysconfig ${D}${sysconfdir}/default/samba # 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 + for d in cunit eventd eventscripts onnode shellcheck takeover takeover_helper tool; do + testdir=${D}${datadir}/ctdb-tests/UNIT/$d install -d $testdir - cp ${S}/ctdb/tests/$d/*.sh $testdir - cp -r ${S}/ctdb/tests/$d/scripts ${S}/ctdb/tests/$d/stubs $testdir || true + cp ${S}/ctdb/tests/UNIT/$d/*.sh $testdir + cp -r ${S}/ctdb/tests/UNIT/$d/scripts ${S}/ctdb/tests/UNIT/$d/stubs $testdir || true done # fix file-rdeps qa warning @@ -189,98 +192,118 @@ 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 - - sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba-gpupdate - sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_upgradedns - sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_spnupdate - sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_kcc - sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${sbindir}/samba_dnsupdate - sed -i -e 's,${PYTHON},/usr/bin/env python3/,g' ${D}${bindir}/samba-tool - + + for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate samba_downgrade_db; 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 + + oe_runmake -C ${S}/pidl DESTDIR=${D} install_vendor + find ${D}${libdir}/perl5/ -type f -name "perllocal.pod" -delete + find ${D}${libdir}/perl5/ -type f -name ".packlist" -delete + sed -i -e '1s,#!.*perl,#!${bindir}/env perl,' ${D}${bindir}/pidl } PACKAGES =+ "${PN}-python3 ${PN}-pidl \ ${PN}-dsdb-modules ${PN}-testsuite registry-tools \ - winbind \ - ${PN}-common ${PN}-base ${PN}-ad-dc ${PN}-ctdb-tests \ + winbind ctdb ctdb-tests \ + ${PN}-common ${PN}-base ${PN}-ad-dc \ smbclient ${PN}-client ${PN}-server ${PN}-test" python samba_populate_packages() { def module_hook(file, pkg, pattern, format, basename): pn = d.getVar('PN') - d.appendVar('RRECOMMENDS_%s-base' % pn, ' %s' % pkg) + d.appendVar('RRECOMMENDS:%s-base' % pn, ' %s' % pkg) 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) + do_split_packages(d, pam_libdir, r'^pam_(.*)\.so$', pam_pkgname, 'PAM plugin for %s', extra_depends='', prepend=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) + do_split_packages(d, libdir, r'^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) + do_split_packages(d, pkglibdir, r'^lib(.*)\.so$', 'lib%s', 'Samba %s library', extra_depends='${PN}-common', prepend=True) moduledir = '%s/samba/auth' % libdir - do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True) + do_split_packages(d, moduledir, r'^(.*)\.so$', 'samba-auth-%s', 'Samba %s authentication backend', hook=module_hook, extra_depends='', prepend=True) moduledir = '%s/samba/pdb' % libdir - do_split_packages(d, moduledir, '^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True) + do_split_packages(d, moduledir, r'^(.*)\.so$', 'samba-pdb-%s', 'Samba %s password backend', hook=module_hook, extra_depends='', prepend=True) } -PACKAGESPLITFUNCS_prepend = "samba_populate_packages " +PACKAGESPLITFUNCS:prepend = "samba_populate_packages " PACKAGES_DYNAMIC = "samba-auth-.* samba-pdb-.*" -RDEPENDS_${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3" -RDEPENDS_${PN}-python3 += "pytalloc python3-tdb" +RDEPENDS:${PN} += "${PN}-base ${PN}-python3 ${PN}-dsdb-modules python3" +RDEPENDS:${PN}-python3 += "pytalloc python3-tdb pyldb" -FILES_${PN}-base = "${sbindir}/nmbd \ +FILES:${PN}-base = "${sbindir}/nmbd \ ${sbindir}/smbd \ ${sysconfdir}/init.d \ ${systemd_system_unitdir}/nmb.service \ ${systemd_system_unitdir}/smb.service" -FILES_${PN}-ad-dc = "${sbindir}/samba \ +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 \ - ${bindir}/ctdb_run_cluster_tests \ - ${sysconfdir}/ctdb/nodes \ - ${datadir}/ctdb-tests \ - ${datadir}/ctdb/tests \ - ${localstatedir}/lib/ctdb \ - " +RDEPENDS:${PN}-ad-dc = "krb5-kdc" + +FILES:ctdb = "${bindir}/ctdb \ + ${bindir}/ctdb_diagnostics \ + ${bindir}/ltdbtool \ + ${bindir}/onnode \ + ${bindir}/ping_pong \ + ${sbindir}/ctdbd \ + ${datadir}/ctdb \ + ${libexecdir}/ctdb \ + ${localstatedir}/lib/ctdb \ + ${sysconfdir}/ctdb \ + ${sysconfdir}/sudoers.d/ctdb \ + ${systemd_system_unitdir}/ctdb.service \ +" + +FILES:ctdb-tests = "${bindir}/ctdb_run_tests \ + ${bindir}/ctdb_run_cluster_tests \ + ${datadir}/ctdb-tests \ + ${datadir}/ctdb/tests \ +" + +RDEPENDS:ctdb-tests += "bash util-linux-getopt ctdb" -FILES_${BPN}-common = "${sysconfdir}/default \ +FILES:${BPN}-common = "${sysconfdir}/default \ ${sysconfdir}/samba \ ${sysconfdir}/tmpfiles.d \ ${localstatedir}/lib/samba \ ${localstatedir}/spool/samba \ " -FILES_${PN} += "${libdir}/vfs/*.so \ +FILES:${PN} += "${libdir}/vfs/*.so \ ${libdir}/charset/*.so \ ${libdir}/*.dat \ ${libdir}/auth/*.so \ - ${datadir}/ctdb/events/* \ " -FILES_${PN}-dsdb-modules = "${libdir}/samba/ldb" +FILES:${PN}-dsdb-modules = "${libdir}/samba/ldb" -FILES_${PN}-testsuite = "${bindir}/gentest \ +FILES:${PN}-testsuite = "${bindir}/gentest \ ${bindir}/locktest \ ${bindir}/masktest \ ${bindir}/ndrdump \ ${bindir}/smbtorture" -FILES_registry-tools = "${bindir}/regdiff \ +FILES:registry-tools = "${bindir}/regdiff \ ${bindir}/regpatch \ ${bindir}/regshell \ ${bindir}/regtree" -FILES_winbind = "${sbindir}/winbindd \ +FILES:winbind = "${sbindir}/winbindd \ ${bindir}/wbinfo \ ${bindir}/ntlm_auth \ ${libdir}/samba/idmap \ @@ -290,9 +313,9 @@ FILES_winbind = "${sbindir}/winbindd \ ${sysconfdir}/init.d/winbind \ ${systemd_system_unitdir}/winbind.service" -FILES_${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" +FILES:${PN}-python3 = "${PYTHON_SITEPACKAGES_DIR}" -FILES_smbclient = "${bindir}/cifsdd \ +FILES:smbclient = "${bindir}/cifsdd \ ${bindir}/rpcclient \ ${bindir}/smbcacls \ ${bindir}/smbclient \ @@ -301,31 +324,33 @@ FILES_smbclient = "${bindir}/cifsdd \ ${bindir}/smbspool \ ${bindir}/smbtar \ ${bindir}/smbtree \ - ${libdir}/samba/smbspool_krb5_wrapper" + ${libexecdir}/samba/smbspool_krb5_wrapper" -RDEPENDS_${PN}-pidl_append = " perl" -FILES_${PN}-pidl = "${bindir}/pidl ${datadir}/perl5/Parse" +FILES:${PN}-pidl = "${bindir}/pidl \ + ${libdir}/perl5 \ + " +RDEPENDS:${PN}-pidl += "perl perl-modules libparse-yapp-perl" -RDEPENDS_${PN}-client = "\ +RDEPENDS:${PN}-client = "\ smbclient \ winbind \ registry-tools \ ${PN}-pidl \ " -ALLOW_EMPTY_${PN}-client = "1" +ALLOW_EMPTY:${PN}-client = "1" -RDEPENDS_${PN}-server = "\ +RDEPENDS:${PN}-server = "\ ${PN} \ winbind \ registry-tools \ " -ALLOW_EMPTY_${PN}-server = "1" +ALLOW_EMPTY:${PN}-server = "1" -RDEPENDS_${PN}-test = "\ - ${PN}-ctdb-tests \ +RDEPENDS:${PN}-test = "\ + ctdb-tests \ ${PN}-testsuite \ " -ALLOW_EMPTY_${PN}-test = "1" +ALLOW_EMPTY:${PN}-test = "1" diff --git a/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb b/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb index 5c7180b6aa..4e3c157713 100644 --- a/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb +++ b/meta-networking/recipes-connectivity/sethdlc/sethdlc_1.18.bb @@ -1,7 +1,7 @@ DESCRIPTION = "set Linux HDLC packet radio modem driver port information" HOMEPAGE = "https://www.kernel.org/pub/linux/utils/net/hdlc" SECTION = "comm" -LICENSE = "GPLv2 & GPLv2+ " +LICENSE = "GPL-2.0-only & GPL-2.0-or-later " LIC_FILES_CHKSUM = "file://sethdlc.c;endline=10;md5=90f936879e9f8b755a138aeb348782eb" @@ -18,7 +18,7 @@ DEPENDS = "virtual/kernel" EXTRA_OEMAKE="CROSS_COMPILE=${TARGET_PREFIX} CC='${CC} ${LDFLAGS}' \ KERNEL_DIR=${STAGING_KERNEL_DIR} " -do_compile_prepend () { +do_compile:prepend () { oe_runmake clean } @@ -28,4 +28,4 @@ do_install() { install sethdlc ${D}/${bindir}/ } -FILES_${PN} += "${bindir}/sethdlc" +FILES:${PN} += "${bindir}/sethdlc" diff --git a/meta-networking/recipes-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.patch b/meta-networking/recipes-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.patch deleted file mode 100644 index eff610de7c..0000000000 --- a/meta-networking/recipes-connectivity/snort/snort/0001-chdeck-for-gettid-API-during-configure.patch +++ /dev/null @@ -1,48 +0,0 @@ -From c45ab69f9428e4d2fc1146301a4546bb2b42c9ae Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 27 Jul 2019 00:25:58 -0700 -Subject: [PATCH] chdeck for gettid API during configure - -glibc 2.30 added gettid syscall wrapper - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.in | 2 +- - src/util.h | 2 ++ - 2 files changed, 3 insertions(+), 1 deletion(-) - -diff --git a/configure.in b/configure.in -index 000bb91..d79e6d0 100644 ---- a/configure.in -+++ b/configure.in -@@ -256,7 +256,7 @@ SN_CHECK_DECLS(printf fprintf syslog puts fputs fputc fopen \ - strcasecmp strncasecmp strerror perror socket sendto \ - vsnprintf snprintf strtoul) - --AC_CHECK_FUNCS([sigaction strlcpy strlcat strerror vswprintf wprintf memrchr inet_ntop]) -+AC_CHECK_FUNCS([sigaction strlcpy strlcat strerror vswprintf wprintf memrchr inet_ntop gettid]) - - AC_CHECK_FUNC([snprintf],[have_snprintf="yes"],[have_snprintf="no"]) - AM_CONDITIONAL(BUILD_SNPRINTF, test "x$have_snprintf" != "xyes") -diff --git a/src/util.h b/src/util.h -index 6880906..c310b83 100644 ---- a/src/util.h -+++ b/src/util.h -@@ -374,6 +374,7 @@ static inline int IsEmptyStr(const char *str) - return 0; - } - -+#if !HAVE_GETTID - static inline pid_t gettid(void) - { - #if defined(LINUX) && defined(SYS_gettid) -@@ -382,5 +383,6 @@ static inline pid_t gettid(void) - return getpid(); - #endif - } -+#endif - - #endif /*__UTIL_H__*/ --- -2.22.0 - diff --git a/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch b/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch index 87fd05bfd2..d8c945a481 100644 --- a/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch +++ b/meta-networking/recipes-connectivity/snort/snort/configure.in-disable-tirpc-checking-for-fedora.patch @@ -52,9 +52,9 @@ index 8662cdd..0ff7e27 100644 - fi -fi - - Z_LIB="" - AC_CHECK_HEADERS(zlib.h,, Z_LIB="no") - if test "x$Z_LIB" = "xno"; then + ################################################## + # Centos 8+ does not have inbuilt SunRPC support # + # in glibc and is separately availble in tirpc # -- 2.7.4 diff --git a/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch b/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch index 30ec174395..98c20b6ecf 100644 --- a/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch +++ b/meta-networking/recipes-connectivity/snort/snort/disable-run-test-program-while-cross-compiling.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Disable run test program while cross compiling fix configure error: configure: error: cannot run test program while cross compiling -Upstream-Status:Inappropriate [embedded specific] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Yi Zhao <yi.zhao@windriver.com> --- diff --git a/meta-networking/recipes-connectivity/snort/snort/snort.default b/meta-networking/recipes-connectivity/snort/snort/snort.default new file mode 100644 index 0000000000..f1f67c55c0 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort/snort.default @@ -0,0 +1 @@ +INTERFACES="eth0" diff --git a/meta-networking/recipes-connectivity/snort/snort/snort.service b/meta-networking/recipes-connectivity/snort/snort/snort.service new file mode 100644 index 0000000000..487328c1b0 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort/snort.service @@ -0,0 +1,12 @@ +[Unit] +Description=Snort NIDS Daemon +After=syslog.target network.target + +[Service] +Type=simple +EnvironmentFile=/etc/default/snort +ExecStartPre=/bin/mkdir -p /var/log/snort +ExecStart=/usr/bin/snort -q -c /etc/snort/snort.conf -l /var/log/snort -i $INTERFACES + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Check-for-HP-libunwind.patch b/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Check-for-HP-libunwind.patch new file mode 100644 index 0000000000..7b7a0d098f --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Check-for-HP-libunwind.patch @@ -0,0 +1,33 @@ +From 433a412fad2ab0383ac3c625d183a71684f2b97b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 20 Feb 2024 15:35:14 -0800 +Subject: [PATCH] cmake: Check for HP libunwind + +This is to ensure that cmake does not detect LLVM unwinder, which +can provide the support for some HP unwinder functionality but not all +e.g. unw_strerror goes missing. By checking for libunwind-common.h in +tests we ensure that this test passes only with HP libunwind. + +Upstream-Status: Inappropriate [OE-Specific] + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cmake/FindLibunwind.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/FindLibunwind.cmake b/cmake/FindLibunwind.cmake +index f66800a18..1ad66fc83 100644 +--- a/cmake/FindLibunwind.cmake ++++ b/cmake/FindLibunwind.cmake +@@ -22,7 +22,7 @@ find_package(PkgConfig QUIET) + pkg_check_modules(PC_LIBUNWIND libunwind) + + find_path(LIBUNWIND_INCLUDE_DIRS +- NAMES libunwind.h ++ NAMES libunwind-common.h + HINTS ${PC_LIBUNWIND_INCLUDE_DIRS} + ) + +-- +2.43.2 + diff --git a/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch b/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch new file mode 100644 index 0000000000..ec7b90cfb4 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch @@ -0,0 +1,31 @@ +From 417ed0045b3d04f539a8eb18b07a208c75f6c7e1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 20 Feb 2024 16:08:20 -0800 +Subject: [PATCH] cmake: Pass --noline flag to flex + +This ensures that line directive is not emitted into lexer output which +could be absolute build paths, since these files end up in dbg packages +this can be flagged as a build/packaging warning. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + cmake/configure_options.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/cmake/configure_options.cmake b/cmake/configure_options.cmake +index f3673f399..fbd0bd2c3 100644 +--- a/cmake/configure_options.cmake ++++ b/cmake/configure_options.cmake +@@ -28,7 +28,7 @@ if ( ENABLE_LARGE_PCAP ) + endif ( ENABLE_LARGE_PCAP ) + + # Flex Lexer +-set ( FLEX_FLAGS "-Ca" ) ++set ( FLEX_FLAGS "-Ca --noline" ) + + # documentation + +-- +2.43.2 + diff --git a/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb b/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb new file mode 100644 index 0000000000..ee84aa17e7 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort3_3.1.84.0.bb @@ -0,0 +1,38 @@ +SUMMARY = "snort3" +DESCRIPTION = "snort3 - a free lightweight network intrusion detection system for UNIX and Windows." +HOMEPAGE = "http://www.snort.org/" +SECTION = "net" +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" + +DEPENDS = "flex-native hwloc libdaq libdnet libpcap libpcre libtirpc libunwind luajit zlib" + +SRC_URI = "git://github.com/snort3/snort3.git;protocol=https;branch=master \ + file://0001-cmake-Check-for-HP-libunwind.patch \ + file://0001-cmake-Pass-noline-flag-to-flex.patch" +SRCREV = "e7312efd840d66a52a2019abe1db7cc89ca0f39a" + +S = "${WORKDIR}/git" + +PACKAGES =+ "${PN}-scripts" + +inherit cmake pkgconfig + +do_install:append() { + sed -i "s#${RECIPE_SYSROOT_NATIVE}##g; s#${RECIPE_SYSROOT}##g" ${D}${libdir}/pkgconfig/snort.pc +} + +FILES:${PN} += "${libdir}/snort/daq/*.so" + +FILES:${PN}-scripts = "${bindir}/appid_detector_builder.sh" + +RDEPENDS:${PN}-scripts += "bash" + +# mips64/ppc/ppc64/riscv64/riscv32 is not supported in this release +COMPATIBLE_HOST:mipsarchn32 = "null" +COMPATIBLE_HOST:mipsarchn64 = "null" +COMPATIBLE_HOST:powerpc = "null" +COMPATIBLE_HOST:powerpc64 = "null" +COMPATIBLE_HOST:powerpc64le = "null" +COMPATIBLE_HOST:riscv64 = "null" +COMPATIBLE_HOST:riscv32 = "null" diff --git a/meta-networking/recipes-connectivity/snort/snort_2.9.14.1.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb index 892fe4d4cd..8b9092b418 100644 --- a/meta-networking/recipes-connectivity/snort/snort_2.9.14.1.bb +++ b/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb @@ -1,32 +1,35 @@ DESCRIPTION = "snort - a free lightweight network intrusion detection system for UNIX and Windows." HOMEPAGE = "http://www.snort.org/" SECTION = "net" -LICENSE = "GPL-2.0" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=78fa8ef966b48fbf9095e13cc92377c5" DEPENDS = "xz libpcap libpcre daq libdnet util-linux daq-native libtirpc bison-native" SRC_URI = "https://www.snort.org/downloads/archive/snort/${BP}.tar.gz \ file://snort.init \ + file://snort.service \ + file://snort.default \ 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 \ - file://0001-chdeck-for-gettid-API-during-configure.patch \ " - -SRC_URI[md5sum] = "009254a9797ec93321c5936b99dcd6c8" -SRC_URI[sha256sum] = "2472989da3aace000d1ea5931ece68f8e5cc0c511e272d65182113a2481e822d" +SRC_URI[sha256sum] = "29400e13f53b1831e0b8b10ec1224a1cbaa6dc1533a5322a20dd80bb84b4981c" UPSTREAM_CHECK_URI = "https://www.snort.org/downloads" UPSTREAM_CHECK_REGEX = "snort-(?P<pver>\d+(\.\d+)+)\.tar" -inherit autotools gettext update-rc.d pkgconfig +inherit autotools gettext update-rc.d pkgconfig systemd INITSCRIPT_NAME = "snort" INITSCRIPT_PARAMS = "defaults" +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "snort.service" +SYSTEMD_AUTO_ENABLE = "disable" + EXTRA_OECONF = " \ --enable-gre \ --enable-linux-smp-stats \ @@ -53,7 +56,7 @@ PACKAGECONFIG[appid] = "--enable-open-appid, --disable-open-appid, luajit, bash" CFLAGS += "-I${STAGING_INCDIR}/tirpc" LDFLAGS += " -ltirpc" -do_install_append() { +do_install:append() { install -d ${D}${sysconfdir}/snort/rules install -d ${D}${sysconfdir}/snort/preproc_rules install -d ${D}${sysconfdir}/init.d @@ -72,38 +75,48 @@ do_install_append() { ${D}${sysconfdir}/snort/snort.conf cp ${S}/preproc_rules/*.rules ${D}${sysconfdir}/snort/preproc_rules/ - install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort + if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then + install -m 755 ${WORKDIR}/snort.init ${D}${sysconfdir}/init.d/snort + fi + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + install -d ${D}/${systemd_system_unitdir} + install -m 644 ${WORKDIR}/snort.service ${D}/${systemd_system_unitdir} + # Install default environment file + install -d ${D}/${sysconfdir}/default + install -m 0644 ${WORKDIR}/snort.default ${D}${sysconfdir}/default/snort + fi 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 + sed -i -e 's|-ffile-prefix-map[^ ]*||g; s|-fdebug-prefix-map[^ ]*||g; s|-fmacro-prefix-map[^ ]*||g; s|${STAGING_DIR_TARGET}||g' ${D}${libdir}/pkgconfig/*.pc } -pkg_postinst_${PN}() { +pkg_postinst:${PN}() { if [ -z "$D" ] && [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then ${sysconfdir}/init.d/populate-volatile.sh update fi } -FILES_${PN} += " \ +FILES:${PN} += " \ ${libdir}/snort_dynamicengine/*.so.* \ ${libdir}/snort_dynamicpreprocessor/*.so.* \ ${libdir}/snort_dynamicrules/*.so.* \ + ${systemd_system_unitdir}/snort.service \ " -FILES_${PN}-dbg += " \ +FILES:${PN}-dbg += " \ ${libdir}/snort_dynamicengine/.debug \ ${libdir}/snort_dynamicpreprocessor/.debug \ ${libdir}/snort_dynamicrules/.debug \ " -FILES_${PN}-staticdev += " \ +FILES:${PN}-staticdev += " \ ${libdir}/snort_dynamicengine/*.a \ ${libdir}/snort_dynamicpreprocessor/*.a \ ${libdir}/snort_dynamicrules/*.a \ ${libdir}/snort/dynamic_preproc/*.a \ ${libdir}/snort/dynamic_output/*.a \ " -FILES_${PN}-dev += " \ +FILES:${PN}-dev += " \ ${libdir}/snort_dynamicengine/*.la \ ${libdir}/snort_dynamicpreprocessor/*.la \ ${libdir}/snort_dynamicrules/*.la \ diff --git a/meta-networking/recipes-connectivity/sshpass/sshpass_1.10.bb b/meta-networking/recipes-connectivity/sshpass/sshpass_1.10.bb new file mode 100644 index 0000000000..81c5e48008 --- /dev/null +++ b/meta-networking/recipes-connectivity/sshpass/sshpass_1.10.bb @@ -0,0 +1,11 @@ +DESCRIPTION = "Non-interactive ssh password auth" +HOMEPAGE = "http://sshpass.sourceforge.net/" +SECTION = "console/network" +LICENSE = "GPL-2.0-or-later" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.gz" + +SRC_URI[sha256sum] = "ad1106c203cbb56185ca3bad8c6ccafca3b4064696194da879f81c8d7bdfeeda" + +inherit autotools diff --git a/meta-networking/recipes-connectivity/tayga/files/0001-include-sys-uio.patch b/meta-networking/recipes-connectivity/tayga/files/0001-include-sys-uio.patch new file mode 100644 index 0000000000..0c6f1609af --- /dev/null +++ b/meta-networking/recipes-connectivity/tayga/files/0001-include-sys-uio.patch @@ -0,0 +1,18 @@ + +This patch addresses the following clang failure: tayga-0.9.2/nat64.c:119:6: +error: call to undeclared function 'writev'; ISO C99 and later do not support +implicit function declarations [-Wimplicit-function-declaration] + +Upstream-Status: Pending +Signed-off-by: Pawel Langowski <pawel.langowski@3mdeb.com> + +--- tayga.h 2023-09-29 14:38:05.005837695 +0200 ++++ tayga-2.h 2023-09-29 14:37:45.560837257 +0200 +@@ -20,6 +20,7 @@ + #include <sys/stat.h> + #include <sys/ioctl.h> + #include <sys/socket.h> ++#include <sys/uio.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <unistd.h> diff --git a/meta-networking/recipes-connectivity/tayga/files/tayga.conf b/meta-networking/recipes-connectivity/tayga/files/tayga.conf new file mode 100644 index 0000000000..c1b6163a45 --- /dev/null +++ b/meta-networking/recipes-connectivity/tayga/files/tayga.conf @@ -0,0 +1,103 @@ +# +# Sample configuration file for TAYGA 0.9.2 +# +# Modify this to use your own addresses!! +# + +# +# TUN device that TAYGA will use to exchange IPv4 and IPv6 packets with the +# kernel. You may use any name you like, but `nat64' is recommended. +# +# This device may be created before starting the tayga daemon by running +# `tayga --mktun`. This allows routing and firewall rules to be set up prior +# to commencement of packet translation. +# +# Mandatory. +# +tun-device nat64 + +# +# TAYGA's IPv4 address. This is NOT your router's IPv4 address! TAYGA +# requires its own address because it acts as an IPv4 and IPv6 router, and +# needs to be able to send ICMP messages. TAYGA will also respond to ICMP +# echo requests (ping) at this address. +# +# This address can safely be located inside the dynamic-pool prefix. +# +# Mandatory. +# +ipv4-addr 192.168.254.1 + +# +# TAYGA's IPv6 address. This is NOT your router's IPv6 address! TAYGA +# requires its own address because it acts as an IPv4 and IPv6 router, and +# needs to be able to send ICMP messages. TAYGA will also respond to ICMP +# echo requests (ping6) at this address. +# +# You can leave ipv6-addr unspecified and TAYGA will construct its IPv6 +# address using ipv4-addr and the NAT64 prefix. +# +# Optional if the NAT64 prefix is specified, otherwise mandatory. It is also +# mandatory if the NAT64 prefix is 64:ff9b::/96 and ipv4-addr is a private +# (RFC1918) address. +# +#ipv6-addr 2001:db8:1::2 +ipv6-addr fdaa:bb:1::1 + +# +# The NAT64 prefix. The IPv4 address space is mapped into the IPv6 address +# space by prepending this prefix to the IPv4 address. Using a /96 prefix is +# recommended in most situations, but all lengths specified in RFC 6052 are +# supported. +# +# This must be a prefix selected from your organization's IPv6 address space +# or the Well-Known Prefix 64:ff9b::/96. Note that using the Well-Known +# Prefix will prohibit IPv6 hosts from contacting IPv4 hosts that have private +# (RFC1918) addresses, per RFC 6052. +# +# The NAT64 prefix need not be specified if all required address mappings are +# listed in `map' directives. (See below.) +# +# Optional. +# +##prefix 2001:db8:1:ffff::/96 +prefix 64:ff9b::/96 + +# +# Dynamic pool prefix. IPv6 hosts which send traffic through TAYGA (and do +# not correspond to a static map or an IPv4-translatable address in the NAT64 +# prefix) will be assigned an IPv4 address from the dynamic pool. Dynamic +# maps are valid for 124 minutes after the last matching packet is seen. +# +# If no unassigned addresses remain in the dynamic pool (or no dynamic pool is +# configured), packets from unknown IPv6 hosts will be rejected with an ICMP +# unreachable error. +# +# Optional. +# +dynamic-pool 192.168.254.0/24 + +# +# Persistent data storage directory. The dynamic.map file, which saves the +# dynamic maps that are created from dynamic-pool, is stored in this +# directory. Omit if you do not need these maps to be persistent between +# instances of TAYGA. +# +# Optional. +# +data-dir /var/spool/tayga + +# +# Establishes a single-host map. If an IPv6 host should be consistently +# reachable at a specific IPv4 address, the mapping can be specified in a +# `map' directive. (IPv6 hosts numbered with an IPv4-translatable address do +# not need map directives.) +# +# IPv4 addresses specified in the `map' directive can safely be located inside +# the dynamic-pool prefix. +# +# Optional. +# +#map 192.168.5.42 2001:db8:1:4444::1 +#map 192.168.5.43 2001:db8:1:4444::2 +#map 192.168.255.2 2001:db8:1:569::143 diff --git a/meta-networking/recipes-connectivity/tayga/files/tayga.service b/meta-networking/recipes-connectivity/tayga/files/tayga.service new file mode 100644 index 0000000000..0bffeb92a5 --- /dev/null +++ b/meta-networking/recipes-connectivity/tayga/files/tayga.service @@ -0,0 +1,12 @@ +[Unit] +SourcePath=/usr/sbin/tayga +Description=LSB: userspace NAT64 + +[Service] +Type=forking +ExecStart=/usr/sbin/tayga -d --config /etc/tayga.conf +RemainAfterExit=yes +TimeoutStopSec=infinity + +[Install] +WantedBy=multi-user.target diff --git a/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb b/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb new file mode 100644 index 0000000000..36d35e6dee --- /dev/null +++ b/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb @@ -0,0 +1,21 @@ +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +SRC_URI = " \ + http://www.litech.org/tayga/tayga-${PV}.tar.bz2 \ + file://tayga.conf \ + file://tayga.service \ + file://0001-include-sys-uio.patch;striplevel=0 \ + " +SRC_URI[sha256sum] = "2b1f7927a9d2dcff9095aff3c271924b052ccfd2faca9588b277431a44f0009c" + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "tayga.service" + +do_install:append() { + install -m 0644 ${WORKDIR}/tayga.conf ${D}${sysconfdir}/tayga.conf + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${WORKDIR}/tayga.service ${D}${systemd_unitdir}/system/ +} + +inherit autotools systemd diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch b/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch index a1e56b7cac..28068bba11 100644 --- a/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch +++ b/meta-networking/recipes-connectivity/ufw/ufw/0001-optimize-boot.patch @@ -1,18 +1,31 @@ -Author: Jamie Strandboge <jamie@canonical.com> -Description: to improve boot speed when disabled, don't source all of - ufw-init-functions (which also sources in other files). +From 92fcdbc1a57086e4decc1597217c0739dc16342a Mon Sep 17 00:00:00 2001 +From: Silcet <camorga1@gmail.com> +Date: Tue, 27 Apr 2021 05:34:59 +0000 +Subject: [PATCH] Author: Jamie Strandboge <jamie@canonical.com> +Description: +to improve boot speed when disabled, don't source all of ufw-init-functions +(which also sources in other files). Upstream-Status: Inappropriate [ not author ] Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> -Index: ufw-0.31/src/ufw-init -=================================================================== ---- ufw-0.31.orig/src/ufw-init 2012-03-09 17:07:11.000000000 -0600 -+++ ufw-0.31/src/ufw-init 2012-03-17 09:37:51.000000000 -0500 -@@ -18,6 +18,12 @@ - # - set -e +The patch was imported from the OpenEmbedded git server +(git://git.openembedded.org/openembedded) as of commit id +2cc1bd9dd060f5002c2fde7aacba86fe230c12af. + +Signed-off-by: Silcet <camorga1@gmail.com> +--- + src/ufw-init | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/ufw-init b/src/ufw-init +index 3505a02..dde37f0 100755 +--- a/src/ufw-init ++++ b/src/ufw-init +@@ -31,6 +31,12 @@ if [ "$1" = "--datadir" ] && [ -s "$2" ]; then + fi + export DATA_DIR="$datadir" +# Debian/Ubuntu: small boot speed improvement +. "#CONFIG_PREFIX#/ufw/ufw.conf" @@ -20,6 +33,6 @@ Index: ufw-0.31/src/ufw-init + exit 0 +fi + - if [ -s "#STATE_PREFIX#/ufw-init-functions" ]; then - . "#STATE_PREFIX#/ufw-init-functions" + if [ -s "${rootdir}#STATE_PREFIX#/ufw-init-functions" ]; then + . "${rootdir}#STATE_PREFIX#/ufw-init-functions" else diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch b/meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch index 5117423387..ee935eb615 100644 --- a/meta-networking/recipes-connectivity/ufw/ufw/setup-add-an-option-to-specify-iptables-location.patch +++ b/meta-networking/recipes-connectivity/ufw/ufw/0002-add-an-option-to-specify-iptables-location.patch @@ -1,6 +1,6 @@ -From c54d36d0582a60fd281cd9287077cea205fd849d Mon Sep 17 00:00:00 2001 -From: Joe MacDonald <joe_macdonald@mentor.com> -Date: Thu, 27 Nov 2014 15:20:34 -0500 +From 808577f8464f542076840d0d93fe168a5f79442c Mon Sep 17 00:00:00 2001 +From: Silcet <camorga1@gmail.com> +Date: Tue, 27 Apr 2021 05:40:03 +0000 Subject: [PATCH] setup: add an option to specify iptables location When cross-compiling it isn't certain that the location of iptables on the @@ -13,15 +13,19 @@ version of iptables to be used. Upstream-Status: Pending Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> + +The patch was imported from the OpenEmbedded git server +(git://git.openembedded.org/openembedded) as of commit id +2cc1bd9dd060f5002c2fde7aacba86fe230c12af. + +Signed-off-by: Silcet <camorga1@gmail.com> --- - setup.py | 69 ++++++++++++++++++++++++++++++++++++---------------------------- - 1 file changed, 39 insertions(+), 30 deletions(-) + setup.py | 65 ++++++++++++++++++++++++++++++++------------------------ + 1 file changed, 37 insertions(+), 28 deletions(-) -diff --git a/setup.py b/setup.py -index 6fb3751..b13d11c 100644 --- a/setup.py +++ b/setup.py -@@ -225,41 +225,50 @@ shutil.copytree('src', 'staging') +@@ -245,45 +245,50 @@ shutil.copytree('src', 'staging') os.unlink(os.path.join('staging', 'ufw-init')) os.unlink(os.path.join('staging', 'ufw-init-functions')) @@ -30,7 +34,11 @@ index 6fb3751..b13d11c 100644 iptables_dir = '' -for e in ['iptables']: -- for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \ +- # Historically iptables was in /sbin, then later also symlinked from +- # /usr/sbin/iptables to /sbin/iptables. Debian bullseye moves iptables +- # to /usr/sbin with no symlink in /sbin except on upgrades. To accomodate +- # buildds that may still have the old iptables, search /usr/sbin first +- for dir in ['/usr/sbin', '/sbin', '/usr/bin', '/bin', '/usr/local/sbin', \ - '/usr/local/bin']: - if e == "iptables": - if os.path.exists(os.path.join(dir, e)): @@ -61,7 +69,7 @@ index 6fb3751..b13d11c 100644 + +if not iptables_set: + for e in ['iptables']: -+ for dir in ['/sbin', '/bin', '/usr/sbin', '/usr/bin', '/usr/local/sbin', \ ++ for dir in ['/usr/sbin', '/sbin', '/usr/bin', '/bin', '/usr/local/sbin', \ + '/usr/local/bin']: + if e == "iptables": + if os.path.exists(os.path.join(dir, e)): @@ -102,6 +110,3 @@ index 6fb3751..b13d11c 100644 setup (name='ufw', version=ufw_version, --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch b/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch deleted file mode 100644 index 804c18bc9e..0000000000 --- a/meta-networking/recipes-connectivity/ufw/ufw/0002-lp1044361.patch +++ /dev/null @@ -1,118 +0,0 @@ -Origin: r795, r796 -Description: move netfilter capabilities checking into initcaps(), and call - initcaps() only when we need it. -Bug-Ubuntu: https://launchpad.net/bugs/1044361 - -Upstream-Status: Inappropriate [ not author ] - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> - -Index: ufw-0.33/src/backend_iptables.py -=================================================================== ---- ufw-0.33.orig/src/backend_iptables.py 2012-09-23 09:58:34.000000000 -0500 -+++ ufw-0.33/src/backend_iptables.py 2012-09-23 09:58:36.000000000 -0500 -@@ -160,6 +160,9 @@ - out += "> " + _("Checking raw ip6tables\n") - return out - -+ # Initialize the capabilities database -+ self.initcaps() -+ - args = ['-n', '-v', '-x', '-L'] - items = [] - items6 = [] -@@ -470,6 +473,9 @@ - if self.dryrun: - return False - -+ # Initialize the capabilities database -+ self.initcaps() -+ - prefix = "ufw" - exe = self.iptables - if v6: -@@ -684,6 +690,9 @@ - except Exception: - raise - -+ # Initialize the capabilities database -+ self.initcaps() -+ - chain_prefix = "ufw" - rules = self.rules - if v6: -@@ -830,6 +839,10 @@ - * updating user rules file - * reloading the user rules file if rule is modified - ''' -+ -+ # Initialize the capabilities database -+ self.initcaps() -+ - rstr = "" - - if rule.v6: -@@ -1073,6 +1086,9 @@ - if self.dryrun: - return - -+ # Initialize the capabilities database -+ self.initcaps() -+ - rules_t = [] - try: - rules_t = self._get_logging_rules(level) -Index: ufw-0.33/src/backend.py -=================================================================== ---- ufw-0.33.orig/src/backend.py 2012-09-23 09:58:34.000000000 -0500 -+++ ufw-0.33/src/backend.py 2012-09-23 09:59:03.000000000 -0500 -@@ -21,7 +21,7 @@ - import stat - import sys - import ufw.util --from ufw.util import warn, debug -+from ufw.util import error, warn, debug - from ufw.common import UFWError, config_dir, iptables_dir, UFWRule - import ufw.applications - -@@ -68,6 +68,17 @@ - err_msg = _("Couldn't determine iptables version") - raise UFWError(err_msg) - -+ # Initialize via initcaps only when we need it (LP: #1044361) -+ self.caps = None -+ -+ def initcaps(self): -+ '''Initialize the capabilities database. This needs to be called -+ before accessing the database.''' -+ -+ # Only initialize if not initialized already -+ if self.caps != None: -+ return -+ - self.caps = {} - self.caps['limit'] = {} - -@@ -78,14 +89,20 @@ - # Try to get capabilities from the running system if root - if self.do_checks and os.getuid() == 0 and not self.dryrun: - # v4 -- nf_caps = ufw.util.get_netfilter_capabilities(self.iptables) -+ try: -+ nf_caps = ufw.util.get_netfilter_capabilities(self.iptables) -+ except OSError as e: -+ error("initcaps\n%s" % e) - if 'recent-set' in nf_caps and 'recent-update' in nf_caps: - self.caps['limit']['4'] = True - else: - self.caps['limit']['4'] = False - - # v6 -- nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables) -+ try: -+ nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables) -+ except OSError as e: -+ error("initcaps\n%s" % e) - if 'recent-set' in nf_caps and 'recent-update' in nf_caps: - self.caps['limit']['6'] = True - else: diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch b/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch deleted file mode 100644 index b259fdf781..0000000000 --- a/meta-networking/recipes-connectivity/ufw/ufw/0003-fix-typeerror-on-error.patch +++ /dev/null @@ -1,20 +0,0 @@ -Origin: r797 -Description: src/backend_iptables.py: fix misplaced parenthesis - -Upstream-Status: Inappropriate [ not author ] - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> - -Index: ufw-0.33/src/backend_iptables.py -=================================================================== ---- ufw-0.33.orig/src/backend_iptables.py 2012-09-24 08:51:13.000000000 -0500 -+++ ufw-0.33/src/backend_iptables.py 2012-09-24 08:52:00.000000000 -0500 -@@ -1075,7 +1075,7 @@ - exe = self.ip6tables - (rc, out) = cmd([exe] + args) - if rc != 0: -- err_msg = _("Could not perform '%s'") % (args) -+ err_msg = _("Could not perform '%s'" % (args)) - if fail_ok: - debug("FAILOK: " + err_msg) - else: diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0003-only-make-one-reference-to-env.patch b/meta-networking/recipes-connectivity/ufw/ufw/0003-only-make-one-reference-to-env.patch new file mode 100644 index 0000000000..556d4459d0 --- /dev/null +++ b/meta-networking/recipes-connectivity/ufw/ufw/0003-only-make-one-reference-to-env.patch @@ -0,0 +1,73 @@ +From 42170d379eddc12bd2d1fe84dc268882d8eb4d64 Mon Sep 17 00:00:00 2001 +From: Silcet <camorga1@gmail.com> +Date: Mon, 3 May 2021 08:59:28 +0000 +Subject: [PATCH] setup: only make one reference to env + +If sys.executable happens to be '/usr/bin/env python' or something +similar, the setup script will result in 'ufw' getting /usr/bin/env +repeated on the top line. This causes an error at runtime. Perform a +quick sanity check on sys.executable before doing the substitution. + +While we're at it, change the default value of 'exe' to the one we either +detected or specified on the build line. + +Upstream-Status: Inappropriate [ embedded specific ] + +Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> + +The patch was imported from the OpenEmbedded git server +(git://git.openembedded.org/openembedded) as of commit id +2cc1bd9dd060f5002c2fde7aacba86fe230c12af. + +A previous change had modified the way the python shebang was updated to +follow the same version as the one used to call setup.py. However, it +used a regex that was not matching anymore. To fix this, the regex +condition is removed so the shebang line is substituted with the sys.executable +value. Later in the installation distutils finds the string with the path +of sys.executable and replaces it with "#! /usr/bin/env python3". + +Signed-off-by: Silcet <camorga1@gmail.com> +--- + setup.py | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/setup.py b/setup.py +index 2343bc9..f8a638b 100644 +--- a/setup.py ++++ b/setup.py +@@ -64,7 +64,7 @@ class Install(_install, object): + real_sharedir = os.path.join(real_prefix, 'share', 'ufw') + + # Update the modules' paths +- for fn in [ 'common.py' ]: ++ for fn in [ 'common.py', 'util.py' ]: + # 'staging' is used with just 'install' but build_lib is used when + # using 'build'. We could probably override 'def build()' but this + # at least works +@@ -97,6 +97,12 @@ class Install(_install, object): + "-i", + "s%#SHARE_DIR#%" + real_sharedir + "%g", + f]) ++ ++ subprocess.call(["sed", ++ "-i.jjm", ++ "s%/sbin/iptables%" + iptables_exe + "%g", ++ f]) ++ + + if fn == 'common.py' and 'UFW_SKIP_CHECKS' in os.environ and \ + os.environ['UFW_SKIP_CHECKS'] != '': +@@ -123,10 +129,12 @@ class Install(_install, object): + self.mkpath(os.path.dirname(f)) + + # update the interpreter to that of the one the user specified for setup ++ # Distutils searches for the string of sys.executable and replaces it ++ # with the "#! /usr/bin/env pythonX" shebang on a later step + print("Updating staging/ufw to use %s" % (sys.executable)) + subprocess.call(["sed", + "-i", +- "1s%^#.*python.*%#! /usr/bin/env " + sys.executable + "%g", ++ "1s%/.*python.*%" + sys.executable + "%g", + 'staging/ufw']) + self.copy_file('staging/ufw', script) + self.copy_file('doc/ufw.8', manpage) diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch b/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch deleted file mode 100644 index 695b265671..0000000000 --- a/meta-networking/recipes-connectivity/ufw/ufw/0004-lp1039729.patch +++ /dev/null @@ -1,40 +0,0 @@ -Origin: r803, r804 -Description: Don't call get_netfilter_capabilities() with ipv6 if ipv6 is - disabled. -Bug-Ubuntu: https://launchpad.net/ufw/bugs/1039729 - -Upstream-Status: Inappropriate [ not author ] - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> - -Index: ufw-0.33/src/backend.py -=================================================================== ---- ufw-0.33.orig/src/backend.py 2012-12-04 09:21:57.000000000 -0600 -+++ ufw-0.33/src/backend.py 2012-12-04 09:22:40.000000000 -0600 -@@ -98,15 +98,17 @@ - else: - self.caps['limit']['4'] = False - -- # v6 -- try: -- nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables) -- except OSError as e: -- error("initcaps\n%s" % e) -- if 'recent-set' in nf_caps and 'recent-update' in nf_caps: -- self.caps['limit']['6'] = True -- else: -- self.caps['limit']['6'] = False -+ # v6 (skip capabilities check for ipv6 if ipv6 is disabled in ufw -+ # because the system may not have ipv6 support (LP: #1039729) -+ if self.use_ipv6(): -+ try: -+ nf_caps = ufw.util.get_netfilter_capabilities(self.ip6tables) -+ except OSError as e: -+ error("initcaps\n%s" % e) -+ if 'recent-set' in nf_caps and 'recent-update' in nf_caps: -+ self.caps['limit']['6'] = True -+ else: -+ self.caps['limit']['6'] = False - - def is_enabled(self): - '''Is firewall configured as enabled''' diff --git a/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch b/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch deleted file mode 100644 index b760d3fd33..0000000000 --- a/meta-networking/recipes-connectivity/ufw/ufw/0005-lp1191197.patch +++ /dev/null @@ -1,32 +0,0 @@ -Origin: r816 -Description: add check for -m rt --rt-type 0 -Bug-Ubuntu: https://launchpad.net/bugs/1191197 -Forwarded: yes - -Upstream-Status: Inappropriate [ not author ] - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> - -Index: ufw-0.33/tests/check-requirements -=================================================================== ---- ufw-0.33.orig/tests/check-requirements 2012-08-17 16:12:49.000000000 -0500 -+++ ufw-0.33/tests/check-requirements 2013-06-15 07:47:00.000000000 -0500 -@@ -3,7 +3,7 @@ - # check-requirements: verify all the required iptables functionality is - # available - # --# Copyright 2008-2012 Canonical Ltd. -+# Copyright 2008-2013 Canonical Ltd. - # - # This program is free software: you can redistribute it and/or modify - # it under the terms of the GNU General Public License version 3, -@@ -218,6 +218,9 @@ - echo -n "icmpv6 with hl ($j): " - runcmd $exe -A $c -p icmpv6 --icmpv6-type $j -m hl --hl-eq 255 -j ACCEPT - done -+ -+ echo -n "ipv6 rt: " -+ runcmd $exe -A $c -m rt --rt-type 0 -j ACCEPT - fi - - echo "" diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch b/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch deleted file mode 100644 index ff704b5a46..0000000000 --- a/meta-networking/recipes-connectivity/ufw/ufw/setup-only-make-one-reference-to-env.patch +++ /dev/null @@ -1,77 +0,0 @@ -From be53eea06a5655fdc98f47a73be8277b65bb42ed Mon Sep 17 00:00:00 2001 -From: Joe MacDonald <joe_macdonald@mentor.com> -Date: Tue, 11 Nov 2014 21:41:14 -0500 -Subject: [PATCH] setup: only make one reference to env - -If sys.executable happens to be '/usr/bin/env python' or something -similar, the setup script will result in 'ufw' getting /usr/bin/env -repeated on the top line. This causes an error at runtime. Perform a -quick sanity check on sys.executable before doing the substitution. - -While we're at it, change the default value of 'exe' to the one we either -detected or specified on the build line. - -Upstream-Status: Inappropriate [ embedded specific ] - -Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com> ---- - setup.py | 34 ++++++++++++++++++++++++++++------ - 1 file changed, 28 insertions(+), 6 deletions(-) - -diff --git a/setup.py b/setup.py -index b13d11c..73acdef 100644 ---- a/setup.py -+++ b/setup.py -@@ -64,7 +64,7 @@ class Install(_install, object): - real_sharedir = os.path.join(real_prefix, 'share', 'ufw') - - # Update the modules' paths -- for file in [ 'common.py' ]: -+ for file in [ 'common.py', 'util.py' ]: - print("Updating " + file) - subprocess.call(["sed", - "-i", -@@ -91,6 +91,11 @@ class Install(_install, object): - "s%#SHARE_DIR#%" + real_sharedir + "%g", - os.path.join('staging', file)]) - -+ subprocess.call(["sed", -+ "-i.jjm", -+ "s%/sbin/iptables%" + iptables_exe + "%g", -+ os.path.join('staging', file)]) -+ - # Now byte-compile everything - super(Install, self).run() - -@@ -107,12 +112,23 @@ class Install(_install, object): - for f in [ script, manpage, manpage_f ]: - self.mkpath(os.path.dirname(f)) - -+ # if sys.executable == /usr/bin/env python* the result will be the top -+ # of ufw getting: -+ # -+ # #! /usr/bin/env /usr/bin/env python -+ # -+ # which is not ideal -+ # - # update the interpreter to that of the one the user specified for setup -- print("Updating staging/ufw to use %s" % (sys.executable)) -- subprocess.call(["sed", -- "-i", -- "1s%^#.*python.*%#! /usr/bin/env " + sys.executable + "%g", -- 'staging/ufw']) -+ print("Updating staging/ufw to use (%s)" % (sys.executable)) -+ -+ if re.search("(/usr/bin/env)", sys.executable): -+ print("found 'env' in sys.executable (%s)" % (sys.executable)) -+ subprocess.call(["sed", -+ "-i.jjm", -+ "1s%^#.*python.*%#! " + sys.executable + "%g", -+ 'staging/ufw']) -+ - self.copy_file('staging/ufw', script) - self.copy_file('doc/ufw.8', manpage) - self.copy_file('doc/ufw-framework.8', manpage_f) --- -1.9.1 - diff --git a/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch new file mode 100644 index 0000000000..ad5391cb98 --- /dev/null +++ b/meta-networking/recipes-connectivity/ufw/ufw/setuptools.patch @@ -0,0 +1,20 @@ +Move to setuptools as distutils is now deprecated. + +Upstream-Status: Submitted [https://code.launchpad.net/~tgamblin/ufw/distutils-to-setuptools] +Signed-off-by: Ross Burton <ross.burton@arm.com> + +diff --git a/setup.py b/setup.py +index cb67a6a..de648d3 100644 +--- a/setup.py ++++ b/setup.py +@@ -25,8 +25,8 @@ + # + + from __future__ import print_function +-from distutils.command.install import install as _install +-from distutils.core import setup ++from setuptools.command.install import install as _install ++from setuptools import setup + import errno + import os + import re diff --git a/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb b/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb deleted file mode 100644 index 19cfe46b7b..0000000000 --- a/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb +++ /dev/null @@ -1,56 +0,0 @@ -SUMMARY = "Uncomplicated Firewall" -DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \ -managing a netfilter firewall. It provides a command line interface and aims \ -to be uncomplicated and easy to use." -HOMEPAGE = "https://launchpad.net/ufw" -SECTION = "net" -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" - -SRC_URI = " \ - https://launchpad.net/ufw/0.33/0.33/+download/ufw-0.33.tar.gz \ - file://setup-add-an-option-to-specify-iptables-location.patch \ - file://setup-only-make-one-reference-to-env.patch \ - file://0001-optimize-boot.patch \ - file://0002-lp1044361.patch \ - file://0003-fix-typeerror-on-error.patch \ - file://0004-lp1039729.patch \ - file://0005-lp1191197.patch \ -" -SRC_URI[md5sum] = "3747b453d76709e5a99da209fc0bb5f5" -SRC_URI[sha256sum] = "5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8" - -inherit setuptools distro_features_check - -RDEPENDS_${PN} = " \ - iptables \ - python \ - python-modules \ - " - -RRECOMMENDS_${PN} = " \ - kernel-module-ipv6 \ - kernel-module-nf-conntrack-ipv6 \ - kernel-module-nf-log-common \ - kernel-module-nf-log-ipv4 \ - kernel-module-nf-log-ipv6 \ - kernel-module-nf-addrtype \ - kernel-module-nf-limit \ - kernel-module-nf-log \ - kernel-module-nf-recent \ -" - -# Certain items are explicitly put under /lib, not base_libdir when installed. -# -FILES_${PN} += " \ - ${sbindir}/* \ - ${datadir}/ufw/* \ - /lib/ufw/* \ - ${sysconfdir}/ufw/* \ - ${sysconfdir}/default/ufw \ -" - -REQUIRED_DISTRO_FEATURES = "ipv6" - -DISTUTILS_BUILD_ARGS_append = " --iptables-dir /usr/sbin" -DISTUTILS_INSTALL_ARGS_append = " --iptables-dir /usr/sbin" diff --git a/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb new file mode 100644 index 0000000000..c479eefba0 --- /dev/null +++ b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb @@ -0,0 +1,74 @@ + +SUMMARY = "Uncomplicated Firewall" +DESCRIPTION = "UFW stands for Uncomplicated Firewall, and is program for \ +managing a netfilter firewall. It provides a command line interface and aims \ +to be uncomplicated and easy to use." +HOMEPAGE = "https://launchpad.net/ufw" +SECTION = "net" +LICENSE = "GPL-3.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" + +SRC_URI = "https://launchpad.net/ufw/0.36/0.36.1/+download/ufw-0.36.1.tar.gz \ + file://0001-optimize-boot.patch \ + file://0002-add-an-option-to-specify-iptables-location.patch \ + file://0003-only-make-one-reference-to-env.patch \ + file://setuptools.patch \ + " +SRC_URI[sha256sum] = "1c57e78fbf2970f0cc9c56ea87a231e6d83d825e55b9e31e2c88b91b0ea03c8c" + +UPSTREAM_CHECK_URI = "https://launchpad.net/ufw" + +inherit setuptools3_legacy features_check systemd update-rc.d + +RDEPENDS:${PN} = " \ + iptables \ + python3 \ + python3-modules \ + " + +RRECOMMENDS:${PN} = " \ + kernel-module-ipv6 \ + kernel-module-nf-conntrack-ipv6 \ + kernel-module-nf-log-common \ + kernel-module-nf-log-ipv4 \ + kernel-module-nf-log-ipv6 \ + kernel-module-nf-addrtype \ + kernel-module-nf-limit \ + kernel-module-nf-log \ + kernel-module-nf-recent \ +" + + +do_configure:prepend() { + if ${@bb.utils.contains('DISTRO_FEATURES','usrmerge','true','false',d)}; then + sed -i -e 's|/lib|${nonarch_base_libdir}|' ${S}/setup.py + fi +} + +do_install:append() { + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${S}/doc/systemd.example ${D}${systemd_unitdir}/system/ufw.service + + install -d ${D}${sysconfdir}/init.d/ + install -m 0755 ${S}/doc/initscript.example ${D}${sysconfdir}/init.d/ufw +} + +SYSTEMD_SERVICE:${PN} = "ufw.service" + +INITSCRIPT_NAME = "ufw" +INITSCRIPT_PARAMS = "defaults" + +# Certain items are explicitly put under /lib, not base_libdir when installed. +# +FILES:${PN} += " \ + ${sbindir}/* \ + ${datadir}/ufw/* \ + ${nonarch_base_libdir}/ufw/* \ + ${sysconfdir}/ufw/* \ + ${sysconfdir}/default/ufw \ +" + +REQUIRED_DISTRO_FEATURES = "ipv6" + +SETUPTOOLS_BUILD_ARGS:append = " --iptables-dir /usr/sbin" +SETUPTOOLS_INSTALL_ARGS:append = " --iptables-dir /usr/sbin" diff --git a/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch b/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch index b7ab7d97c8..fd7a14adc9 100644 --- a/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch +++ b/meta-networking/recipes-connectivity/vlan/vlan-1.9/no-HOME-includes.patch @@ -5,7 +5,7 @@ Subject: vlan: do not include ${HOME}/linux/include dir in front of sanitized kernel headers in OE chroot. Drop this include option. -Upstream-Status: not-applicable +Upstream-Status: Inappropriate [embedded specific] Index: vlan/MakeInclude =================================================================== diff --git a/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb b/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb index 4c3d95bd8a..b478692e39 100644 --- a/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb +++ b/meta-networking/recipes-connectivity/vlan/vlan_1.9.bb @@ -1,7 +1,7 @@ SUMMARY = "VLAN provides vconfig utility" HOMEPAGE = "http://www.candelatech.com/~greear/vlan.html" SECTION = "misc" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://vconfig.c;beginline=1;endline=19;md5=094ca47de36c20c598b15b32c270ce0a" SRC_URI = "https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/vlan/1.9-3ubuntu10.6/${BPN}_${PV}.orig.tar.gz \ @@ -22,13 +22,13 @@ inherit update-alternatives EXTRA_OEMAKE = "-e MAKEFLAGS=" # comment out MakeInclude in Makefile which sets build environment -do_configure_append () { +do_configure:append () { sed -i 's/^ include/#^include/' ${S}/Makefile } # ignore strip to avoid yocto errors in stripping do_compile () { - oe_runmake PLATFORM=ARM 'STRIP=echo' all + oe_runmake PLATFORM=ARM 'STRIP=echo' CCFLAGS="${CFLAGS}" all } do_install () { @@ -37,5 +37,5 @@ do_install () { } ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "vconfig" +ALTERNATIVE:${PN} = "vconfig" ALTERNATIVE_LINK_NAME[vconfig] = "${base_sbindir}/vconfig" diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch index 184c7943b5..735edb582e 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0001-search-for-log-help-in-build-dir.patch @@ -5,6 +5,8 @@ Subject: [PATCH 1/8] search for log-help in build dir Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + makeman.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch index 6f00d3b894..6380804368 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0002-Fix-vpnc-install-for-cross-compile.patch @@ -4,6 +4,8 @@ Date: Sun, 2 Dec 2012 02:16:54 +0100 Subject: [PATCH 2/8] Fix vpnc install for cross compile --- +Upstream-Status: Pending + Makefile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch index bb7730647b..60c28cef31 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0003-error.h-is-specific-to-glibc-on-linux.patch @@ -5,6 +5,8 @@ Subject: [PATCH 3/8] error.h is specific to glibc on linux Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdep.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch index f70a13898f..305e9aabb1 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0004-Use-pkgconfig-instead-of-libgcrypt-config.patch @@ -5,6 +5,8 @@ Subject: [PATCH 4/8] Use pkgconfig instead of libgcrypt-config Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch index 01783f45b7..af63433c0f 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0005-include-sys-ttydefaults.h-for-CEOT-definition.patch @@ -10,6 +10,8 @@ config.c:146:25: error: use of undeclared identifier 'CEOT' Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch index fa89df2796..664c73a713 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0006-sysdep-Add-header-include-sequence-to-adjust-for-mus.patch @@ -4,6 +4,8 @@ Date: Wed, 29 Mar 2017 23:09:47 -0700 Subject: [PATCH 6/8] sysdep: Add header include sequence to adjust for musl --- +Upstream-Status: Pending + sysdep.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch index de67b47a43..f7d7b0aec3 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0007-add-error-API-when-error.h-is-not-on-platform.patch @@ -5,6 +5,8 @@ Subject: [PATCH 7/8] add error() API when error.h is not on platform sign-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdep.c | 24 ++++++++++++++++++++++++ sysdep.h | 2 ++ 2 files changed, 26 insertions(+) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch index 62ffdb7c9f..6c63011997 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0008-include-sysdep.h-before-net-if_tun.h.patch @@ -7,6 +7,8 @@ Fixes duplicate defines in header errors Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch b/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch index 2bed550415..3da2efe479 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch +++ b/meta-networking/recipes-connectivity/vpnc/vpnc/0009-reduce-lifetime-value.patch @@ -12,6 +12,8 @@ don't. Reducing the lifetime from its current value to 28800 (exactly 8 hours) causes it to start working with fortigate devices. --- +Upstream-Status: Pending + vpnc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb b/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb index ea21799853..fe9c038f5c 100644 --- a/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb +++ b/meta-networking/recipes-connectivity/vpnc/vpnc_0.5.3.bb @@ -1,15 +1,14 @@ SUMMARY = "A client for the Cisco3000 VPN Concentrator" HOMEPAGE = "http://www.unix-ag.uni-kl.de/~massar/vpnc/" -AUTHOR = "Maurice Massar vpnc@unix-ag.uni-kl.de" SECTION = "net" -LICENSE = "GPL-2.0+" +LICENSE = "GPL-2.0-or-later" LIC_FILES_CHKSUM = "file://COPYING;md5=173b74cb8ac640a9992c03f3bce22a33" DEPENDS += "libgcrypt" PV .= "r550-2jnpr1" SRCREV = "b1243d29e0c00312ead038b04a2cf5e2fa31d740" -SRC_URI = "git://github.com/ndpgroup/vpnc \ +SRC_URI = "git://github.com/ndpgroup/vpnc;branch=master;protocol=https \ file://long-help \ file://default.conf \ file://0001-search-for-log-help-in-build-dir.patch \ @@ -28,13 +27,15 @@ PACKAGECONFIG ?= "gnutls" PACKAGECONFIG[gnutls] = ",,gnutls" PACKAGECONFIG[openssl] = ",,openssl" +PACKAGES =+ "${PN}-script" + S = "${WORKDIR}/git" inherit perlnative pkgconfig #EXTRA_OEMAKE = "-e MAKEFLAGS=" -do_configure_append () { +do_configure:append () { # Make sure we use our nativeperl wrapper sed -i "1s:#!.*:#!/usr/bin/env nativeperl:" ${S}/*.pl cp ${WORKDIR}/long-help ${S} @@ -54,6 +55,8 @@ vpnc_sysroot_preprocess () { install -m 755 ${D}${sysconfdir}/vpnc/vpnc-script ${SYSROOT_DESTDIR}${sysconfdir}/vpnc } -CONFFILES_${PN} = "${sysconfdir}/vpnc/default.conf" -RDEPENDS_${PN} = "perl-module-io-file" -RRECOMMENDS_${PN} = "kernel-module-tun" +FILES:${PN}-script = "${sysconfdir}/vpnc/vpnc-script" + +CONFFILES:${PN} = "${sysconfdir}/vpnc/default.conf" +RDEPENDS:${PN} = "perl-module-io-file ${PN}-script" +RRECOMMENDS:${PN} = "kernel-module-tun" diff --git a/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.1.0.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb index ae379383a5..47c14dd1a1 100644 --- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.1.0.bb +++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.0.bb @@ -6,14 +6,15 @@ DESCRIPTION = "wolfSSL, formerly CyaSSL, is a lightweight SSL library written \ HOMEPAGE = "https://www.wolfssl.com/products/wolfssl" BUGTRACKER = "https://github.com/wolfssl/wolfssl/issues" SECTION = "libs" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" PROVIDES += "cyassl" -RPROVIDES_${PN} = "cyassl" +RPROVIDES:${PN} = "cyassl" + +SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https;branch=master" +SRCREV = "8970ff4c34034dbb3594943d11f8c9d4c5512bd5" -SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https" -SRCREV = "50fbdb961fd8c2d8123064e567ae8ec44167732d" S = "${WORKDIR}/git" inherit autotools |