diff options
Diffstat (limited to 'meta-networking/recipes-connectivity')
199 files changed, 5031 insertions, 3486 deletions
diff --git a/meta-networking/recipes-connectivity/adcli/adcli_0.9.0.bb b/meta-networking/recipes-connectivity/adcli/adcli_0.9.2.bb index 76df27851b..c5dcccbac5 100644 --- a/meta-networking/recipes-connectivity/adcli/adcli_0.9.0.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 = "1b1528038e084a9f81ea108cffca9c2707623b9c" +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 index 9b69601e7b..de7e2d3e01 100644 --- a/meta-networking/recipes-connectivity/autossh/autossh_1.4g.bb +++ b/meta-networking/recipes-connectivity/autossh/autossh_1.4g.bb @@ -1,22 +1,23 @@ 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" -LIC_FILES_CHKSUM = "file://autossh.spec;md5=80a6701134723fd3420e733b46a0eb97" +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" +RDEPENDS:${PN} = "ssh" -CFLAGS_prepend = "-I${WORKDIR}/build " +CFLAGS:prepend = "-I${WORKDIR}/build " inherit autotools EXTRA_OECONF="--with-ssh=/usr/bin/ssh" -do_compile_append() { +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 @@ -25,6 +26,6 @@ do_compile_append() { cp ${WORKDIR}/autossh-${PV}/autossh.spec ${WORKDIR}/build } -do_install_append() { +do_install:append() { rm -rf ${D}${datadir}/examples } diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch deleted file mode 100644 index 00be224990..0000000000 --- a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-conf-Unix.mk-remove-fixed-command-definitions.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 4ba61c59d3488c263d106d486b656854a57ad79f Mon Sep 17 00:00:00 2001 -From: Jens Rehsack <sno@netbsd.org> -Date: Thu, 13 Aug 2020 15:26:30 +0200 -Subject: [PATCH 1/2] conf/Unix.mk: remove fixed command definitions - -For cross compiling in Yocto or with appropriate SDKs, commands like -`$CC` are reasonably predefined. - -Upstream-Status: Inappropriate - -Signed-off-by: Jens Rehsack <sno@netbsd.org> ---- - conf/Unix.mk | 10 +++------- - 1 file changed, 3 insertions(+), 7 deletions(-) - -diff --git a/conf/Unix.mk b/conf/Unix.mk -index 02f2b2b..05979fc 100644 ---- a/conf/Unix.mk -+++ b/conf/Unix.mk -@@ -37,23 +37,19 @@ RM = rm -f - MKDIR = mkdir -p - - # C compiler and flags. --CC = cc --CFLAGS = -W -Wall -Os -fPIC - CCOUT = -c -o - - # Static library building tool. --AR = ar - ARFLAGS = -rcs - AROUT = - - # DLL building tool. --LDDLL = cc -+LDDLL = $(CCLD) - LDDLLFLAGS = -shared - LDDLLOUT = -o - - # Static linker. --LD = cc --LDFLAGS = -+LD = $(CCLD) - LDOUT = -o - - # C# compiler; we assume usage of Mono. -@@ -63,7 +59,7 @@ RUNT0COMP = mono T0Comp.exe - # Set the values to 'no' to disable building of the corresponding element - # by default. Building can still be invoked with an explicit target call - # (e.g. 'make dll' to force build the DLL). --#STATICLIB = no -+STATICLIB = no - #DLL = no - #TOOLS = no - #TESTS = no --- -2.17.1 - diff --git a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch b/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch deleted file mode 100644 index 3b341e0355..0000000000 --- a/meta-networking/recipes-connectivity/bearssl/bearssl/0001-make-Pass-LDFLAGS-when-building-shared-objects.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 9515448761739d6186e7d07da5b47e368753528c Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Tue, 1 Sep 2020 11:34:33 -0700 -Subject: [PATCH] make: Pass LDFLAGS when building shared objects - -OE passes flags like hash-style via LDFLAGS which alters the linker -defaults, its important to have LDFLAGS in link step even if compiler -driver is used to do linking - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - mk/Rules.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mk/Rules.mk b/mk/Rules.mk -index b480bd6..db65125 100644 ---- a/mk/Rules.mk -+++ b/mk/Rules.mk -@@ -344,7 +344,7 @@ $(BEARSSLLIB): $(OBJDIR) $(OBJ) - $(AR) $(ARFLAGS) $(AROUT)$(BEARSSLLIB) $(OBJ) - - $(BEARSSLDLL): $(OBJDIR) $(OBJ) -- $(LDDLL) $(LDDLLFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ) -+ $(LDDLL) $(LDDLLFLAGS) $(LDFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ) - - $(BRSSL): $(BEARSSLLIB) $(OBJBRSSL) - $(LD) $(LDFLAGS) $(LDOUT)$(BRSSL) $(OBJBRSSL) $(BEARSSLLIB) --- -2.28.0 - 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 index 94abd27faf..e0e5c13588 100644 --- 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 @@ -19,6 +19,8 @@ Fixes: 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/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb index 1102bb95a5..39569e9d06 100644 --- a/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb +++ b/meta-networking/recipes-connectivity/bearssl/bearssl_0.6.bb @@ -23,24 +23,30 @@ inherit lib_package LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=1fc37e1037ae673975fbcb96a98f7191" -SRCREV = "8ef7680081c61b486622f2d983c0d3d21e83caad" -SRC_URI = "git://www.bearssl.org/git/BearSSL;protocol=https;nobranch=1 \ - file://0001-conf-Unix.mk-remove-fixed-command-definitions.patch \ - file://0002-test-test_x509.c-fix-potential-overflow-issue.patch \ - file://0001-make-Pass-LDFLAGS-when-building-shared-objects.patch \ - " +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" -B = "${S}" do_install() { - mkdir -p ${D}/${bindir} ${D}/${libdir} - install -m 0644 ${B}/build/brssl ${D}/${bindir} - install -m 0644 ${B}/build/libbearssl.so ${D}/${libdir}/libbearssl.so.6.0.0 - ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so.6 - ln -s libbearssl.so.6.0.0 ${D}/${libdir}/libbearssl.so + 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 deleted file mode 100644 index 269174b2f6..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman/0001-Search-for-cython3.patch +++ /dev/null @@ -1,31 +0,0 @@ -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 - -Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> ---- - configure.ac | 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]) - - 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]) --- -2.14.3 - diff --git a/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch new file mode 100644 index 0000000000..6e48b70243 --- /dev/null +++ b/meta-networking/recipes-connectivity/blueman/blueman/0001-meson-DO-not-emit-absolute-path-when-S-B.patch @@ -0,0 +1,38 @@ +From 4947abc5ede2dc356f011b7c45f6760c9c2ce9f1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Wed, 14 Aug 2024 21:26:24 -0700 +Subject: [PATCH] meson: Do not emit absolute path when S != B + +build systems like OE build outside sourcetree in such cases it works +ok but cython resolves the input file to absolute path and that gets +emitted into genetate _blueman.c as module name, renders the build +non-reproducible, wish cython had a better way to handle this but there +is not, therefore tweak the meson build rule to account for specifying +workdir to cython which will search the inputs correctly, and use +meson's build_root to emit the output into build dir. This ensures that +it becomes independent of source or build directories and cython does +not generate the absolute paths into generate C code. + +See cython discussion on [1] + +[1] https://github.com/cython/cython/issues/5949 + +Upstream-Status: Submitted [https://github.com/blueman-project/blueman/pull/2461] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + module/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/module/meson.build b/module/meson.build +index 096ad7c8..fddef547 100644 +--- a/module/meson.build ++++ b/module/meson.build +@@ -4,7 +4,7 @@ blueman_c = custom_target( + 'blueman_c', + output: '_blueman.c', + input: '_blueman.pyx', +- command: [cython, '--output-file', '@OUTPUT@', '@INPUT@']) ++ command: [cython, '-w', meson.source_root(), '--output-file', join_paths(meson.build_root(), '@OUTPUT@'), join_paths(meson.build_root(), '@INPUT@')]) + + sources = [ + blueman_c, 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 deleted file mode 100644 index 55d1ac94c5..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman/0002-fix-fail-to-enable-bluetooth.patch +++ /dev/null @@ -1,72 +0,0 @@ -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, 15 insertions(+), 1 deletion(-) - -diff --git a/blueman/Functions.py b/blueman/Functions.py -index 3b76271..c5eeb27 100644 ---- a/blueman/Functions.py -+++ b/blueman/Functions.py -@@ -86,6 +86,16 @@ def check_bluetooth_status(message, exitfunc): - 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 8ec9fc4..29a0fb0 100644 ---- a/blueman/plugins/applet/PowerManager.py -+++ b/blueman/plugins/applet/PowerManager.py -@@ -48,6 +48,7 @@ class PowerManager(AppletPlugin): - self._add_dbus_signal("BluetoothStatusChanged", "b") - self._add_dbus_method("SetBluetoothStatus", ("b",), "", self.request_power_state) - self._add_dbus_method("GetBluetoothStatus", (), "b", self.get_bluetooth_status) -+ self._add_dbus_method("GetRequestStatus", (), "b", self.get_request_status) - - def on_unload(self): - self.parent.Plugins.Menu.unregister(self) -@@ -182,6 +183,9 @@ class PowerManager(AppletPlugin): - def get_bluetooth_status(self): - return self.current_state - -+ def get_request_status(self): -+ return self.request_in_progress -+ - def on_adapter_property_changed(self, _path, key, value): - if key == "Powered": - if value and not self.current_state: --- -2.20.1 - diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.1.4.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.1.4.bb deleted file mode 100644 index 29bef230e4..0000000000 --- a/meta-networking/recipes-connectivity/blueman/blueman_2.1.4.bb +++ /dev/null @@ -1,59 +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 \ - file://0002-fix-fail-to-enable-bluetooth.patch \ -" -SRC_URI[sha256sum] = "1d9c3d39a564d88851aa8de509f16bfa586b0b50f4307dc6c6347ba4833664da" - -EXTRA_OECONF = " \ - --disable-appindicator \ - --disable-runtime-deps-check \ - --disable-schemas-compile \ -" - -SYSTEMD_SERVICE_${PN} = "${BPN}-mechanism.service" -SYSTEMD_AUTO_ENABLE_${PN} = "disable" - -RRECOMENDS_${PN} += "adwaita-icon-theme" -RDEPENDS_${PN} += " \ - python3-core \ - python3-dbus \ - packagegroup-tools-bluetooth \ -" - -PACKAGECONFIG ??= "thunar" -PACKAGECONFIG[thunar] = "--enable-thunar-sendto,--disable-thunar-sendto" - -FILES_${PN} += " \ - ${datadir}/dbus-1 \ - ${datadir}/Thunar \ - ${systemd_user_unitdir} \ - ${exec_prefix}${systemd_system_unitdir} \ - ${PYTHON_SITEPACKAGES_DIR} \ -" - -FILES_${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/_blueman.a" - -# In code, path to python is a variable that is replaced with path to native version of it -# during the configure stage, e.g ../recipe-sysroot-native/usr/bin/python3-native/python3. -# Replace it with #!/usr/bin/env python3 -do_install_append() { - sed -i "1s/.*/#!\/usr\/bin\/env python3/" ${D}${prefix}/libexec/blueman-rfcomm-watcher \ - ${D}${prefix}/libexec/blueman-mechanism \ - ${D}${bindir}/blueman-tray \ - ${D}${bindir}/blueman-services \ - ${D}${bindir}/blueman-sendto \ - ${D}${bindir}/blueman-report \ - ${D}${bindir}/blueman-manager \ - ${D}${bindir}/blueman-assistant \ - ${D}${bindir}/blueman-applet \ - ${D}${bindir}/blueman-adapters -} diff --git a/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb new file mode 100644 index 0000000000..e7f0987e0f --- /dev/null +++ b/meta-networking/recipes-connectivity/blueman/blueman_2.4.3.bb @@ -0,0 +1,62 @@ +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 features_check python3targetconfig + +REQUIRED_DISTRO_FEATURES = "gobject-introspection-data" + +SRC_URI = "git://github.com/blueman-project/blueman.git;protocol=https;branch=2-4-stable \ + file://0001-meson-DO-not-emit-absolute-path-when-S-B.patch" +S = "${WORKDIR}/git" +SRCREV = "7bcf919ad6ac0ee9a8c66b18b0ca98af877d4c8f" + +EXTRA_OEMESON = "-Druntime_deps_check=false \ + -Dsystemdsystemunitdir=${systemd_system_unitdir} \ + -Dsystemduserunitdir=${systemd_user_unitdir} \ +" + +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} \ + ${systemd_system_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 +} 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_1.0.0.bb b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb index 0cf57ccdb7..dfa7437ba8 100644 --- a/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.0.0.bb +++ b/meta-networking/recipes-connectivity/cannelloni/cannelloni_1.1.0.bb @@ -1,9 +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 = "0bd7e27db35bdef361226882ae04205504f7b2f4" +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 2820f9fa6d..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=50bd1d7f135b50d7e218996ba28d0d88" +LIC_FILES_CHKSUM = "file://LICENSE.md;md5=ce6ce6eb1b2fd59ee6bab219470442a3" -SRCREV = "4b440a339979852d5a51fb11a822952712231c23" -PV = "1.12+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/crda-4.14-python-3.patch b/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch deleted file mode 100644 index 9125d0ab97..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda/crda-4.14-python-3.patch +++ /dev/null @@ -1,101 +0,0 @@ -Imported from Gentoo -https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c50acec16bc7c33d6dc122c007d713e7fbecf9c - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- a/utils/key2pub.py -+++ b/utils/key2pub.py -@@ -1,22 +1,22 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - - import sys - try: - from M2Crypto import RSA --except ImportError, e: -+except ImportError as e: - sys.stderr.write('ERROR: Failed to import the "M2Crypto" module: %s\n' % e.message) - sys.stderr.write('Please install the "M2Crypto" Python module.\n') - sys.stderr.write('On Debian GNU/Linux the package is called "python-m2crypto".\n') - sys.exit(1) - - def print_ssl_64(output, name, val): -- while val[0] == '\0': -+ while val[0:1] == b'\0': - val = val[1:] - while len(val) % 8: -- val = '\0' + val -+ val = b'\0' + val - vnew = [] - while len(val): -- vnew.append((val[0], val[1], val[2], val[3], val[4], val[5], val[6], val[7])) -+ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4], val[4:5], val[5:6], val[6:7], val[7:8])) - val = val[8:] - vnew.reverse() - output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) -@@ -34,13 +34,13 @@ def print_ssl_64(output, name, val): - output.write('};\n\n') - - def print_ssl_32(output, name, val): -- while val[0] == '\0': -+ while val[0:1] == b'\0': - val = val[1:] - while len(val) % 4: -- val = '\0' + val -+ val = b'\0' + val - vnew = [] - while len(val): -- vnew.append((val[0], val[1], val[2], val[3], )) -+ vnew.append((val[0:1], val[1:2], val[2:3], val[3:4])) - val = val[4:] - vnew.reverse() - output.write('static BN_ULONG %s[%d] = {\n' % (name, len(vnew))) -@@ -81,21 +81,21 @@ struct pubkey { - - static struct pubkey keys[] __attribute__((unused))= { - ''') -- for n in xrange(n + 1): -+ for n in range(n + 1): - output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) - output.write('};\n') - pass - - def print_gcrypt(output, name, val): - output.write('#include <stdint.h>\n') -- while val[0] == '\0': -+ while val[0:1] == b'\0': - val = val[1:] - output.write('static const uint8_t %s[%d] = {\n' % (name, len(val))) - idx = 0 - for v in val: - if not idx: - output.write('\t') -- output.write('0x%.2x, ' % ord(v)) -+ output.write('0x%.2x, ' % (v if sys.version_info[0] >=3 else ord(v))) - idx += 1 - if idx == 8: - idx = 0 -@@ -118,7 +118,7 @@ struct key_params { - - static const struct key_params keys[] __attribute__((unused))= { - ''') -- for n in xrange(n + 1): -+ for n in range(n + 1): - output.write(' KEYS(e_%d, n_%d),\n' % (n, n)) - output.write('};\n') - -@@ -136,7 +136,7 @@ except IndexError: - mode = None - - if not mode in modes: -- print 'Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys())) -+ print('Usage: %s [%s] input-file... output-file' % (sys.argv[0], '|'.join(modes.keys()))) - sys.exit(2) - - output = open(outfile, 'w') -@@ -154,3 +154,5 @@ for f in files: - idx += 1 - - modes[mode][1](output, idx - 1) -+ -+output.close() diff --git a/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 e59d2f437d..0000000000 --- a/meta-networking/recipes-connectivity/crda/crda_3.18.bb +++ /dev/null @@ -1,38 +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 = "python3-m2crypto-native libnl libgcrypt" - -SRC_URI = "https://www.kernel.org/pub/software/network/${BPN}/${BP}.tar.xz \ - file://do-not-run-ldconfig-if-destdir-is-set.patch \ - 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 \ - file://crda-4.14-python-3.patch \ -" -SRC_URI[md5sum] = "0431fef3067bf503dfb464069f06163a" -SRC_URI[sha256sum] = "43fcb9679f8b75ed87ad10944a506292def13e4afb194afa7aa921b01e8ecdbf" - -inherit python3-dir python3native siteinfo - -# Recursive make problem -EXTRA_OEMAKE = "MAKEFLAGS= DESTDIR=${D} LIBDIR=${libdir}/crda LDLIBREG='-Wl,-rpath,${libdir}/crda -lreg' \ - UDEV_RULE_DIR=${nonarch_base_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-static" diff --git a/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb index 8e5ee66a2a..a686ef5840 100644 --- a/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb +++ b/meta-networking/recipes-connectivity/daq/daq_2.0.7.bb @@ -1,31 +1,33 @@ 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 \ +SRC_URI = "https://www.snort.org/downloads/snort/${BPN}-${PV}.tar.gz;downloadfilename=${BPN}-${PV}_snort_org.tar.gz \ file://disable-run-test-program-while-cross-compiling.patch \ file://0001-correct-the-location-of-unistd.h.patch \ + file://daq-fix-incompatible-pointer-type-error.patch \ " -SRC_URI[sha256sum] = "bdc4e5a24d1ea492c39ee213a63c55466a2e8114b6a9abed609927ae13a7705e" +SRC_URI[sha256sum] = "d1f6709bc5dbddee3fdf170cdc1e49fb926e2031d4869ecf367a8c47efc87279" # 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," -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/daq-fix-incompatible-pointer-type-error.patch b/meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch new file mode 100644 index 0000000000..ade3ec686b --- /dev/null +++ b/meta-networking/recipes-connectivity/daq/files/daq-fix-incompatible-pointer-type-error.patch @@ -0,0 +1,31 @@ +Fix daq incompatible pointer type error when gcc option +'-Wincompatible-pointer-types is set: + +| ../../daq-2.0.7/os-daq-modules/daq_nfq.c: In function 'SetPktHdr': +| ../../daq-2.0.7/os-daq-modules/daq_nfq.c:394:37: error: passing argument 2 + of 'nfq_get_payload' from incompatible pointer type [-Wincompatible-pointer-types] +| 394 | int len = nfq_get_payload(nfad, (char**)pkt); +| | ^~~~~~~~~~~ +| | | +| | char ** + +Upstream-Status: Inactive-Upstream [lastrelease: 2019-03-09] + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + os-daq-modules/daq_nfq.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/os-daq-modules/daq_nfq.c b/os-daq-modules/daq_nfq.c +index 4de94b6..a6de2f3 100644 +--- a/os-daq-modules/daq_nfq.c ++++ b/os-daq-modules/daq_nfq.c +@@ -391,7 +391,7 @@ static inline int SetPktHdr ( + DAQ_PktHdr_t* hdr, + uint8_t** pkt + ) { +- int len = nfq_get_payload(nfad, (char**)pkt); ++ int len = nfq_get_payload(nfad, (unsigned char**)pkt); + + if ( len <= 0 ) + return -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.16.bb b/meta-networking/recipes-connectivity/daq/libdaq_3.0.16.bb new file mode 100644 index 0000000000..7834d75552 --- /dev/null +++ b/meta-networking/recipes-connectivity/daq/libdaq_3.0.16.bb @@ -0,0 +1,19 @@ +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 = "2ffe084d4d4ccf4ebc5c23ef119aa1ae223ce2ae" + +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..e458321e6e --- /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 ${UNPACKDIR}/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 ${UNPACKDIR}/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 ${UNPACKDIR}/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/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-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 c2f4827161..cc36fbd4f0 100644 --- a/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb +++ b/meta-networking/recipes-connectivity/dibbler/dibbler_git.bb @@ -2,13 +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 = "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-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}" @@ -29,9 +32,16 @@ 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" + +# http://errors.yoctoproject.org/Errors/Details/766880/ +# git/Port-linux/interface.c:118:18: error: assignment to '__caddr_t' {aka 'char *'} from incompatible pointer type 'struct ethtool_value *' [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" 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/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.9.3.bb b/meta-networking/recipes-connectivity/firewalld/firewalld_0.9.3.bb deleted file mode 100644 index 9aad510b4e..0000000000 --- a/meta-networking/recipes-connectivity/firewalld/firewalld_0.9.3.bb +++ /dev/null @@ -1,92 +0,0 @@ -SUMMARY = "Dynamic firewall daemon with a D-Bus interface" -HOMEPAGE = "https://firewalld.org/" -BUGTRACKER = "https://github.com/firewalld/firewalld/issues" -UPSTREAM_CHECK_URI = "https://github.com/firewalld/firewalld/releases" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" - -SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz \ - file://firewalld.init \ -" -SRC_URI[sha256sum] = "5998894db976d77996ca0a6b700a2f4125b9f283465fb255da9bddfb1640cb27" - -# glib-2.0-native is needed for GSETTINGS_RULES autoconf macro from gsettings.m4 -DEPENDS = "intltool-native glib-2.0-native nftables" - -inherit gettext autotools bash-completion python3native gsettings systemd update-rc.d - -PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -PACKAGECONFIG[systemd] = "--with-systemd-unitdir=${systemd_system_unitdir},--disable-systemd" -PACKAGECONFIG[docs] = "--with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog,--disable-docs,libxslt-native docbook-xsl-stylesheets-native" - -PACKAGES += "${PN}-zsh-completion" - -# iptables, ip6tables, ebtables, and ipset *should* be unnecessary -# when the nftables backend is available, because nftables supersedes all of them. -# However we still need iptables and ip6tables to be available otherwise any -# application relying on "direct passthrough" rules (such as docker) will break. -# /etc/sysconfig/firewalld is a Red Hat-ism, only referenced by -# the Red Hat-specific init script which we aren't using, so we disable that. -EXTRA_OECONF = "\ - --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_${PN} = "firewalld.service" - -do_install_append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - : - else - # firewalld ships an init script but it contains Red Hat-isms, replace it with our own - rm -rf ${D}${sysconfdir}/rc.d/ - install -d ${D}${sysconfdir}/init.d - install -m0755 ${WORKDIR}/firewalld.init ${D}${sysconfdir}/init.d/firewalld - fi - - # We ran ./configure with PYTHON pointed at the binary inside $STAGING_BINDIR_NATIVE - # so now we need to fix up any references to point at the proper path in the image. - # This hack is also in distutils.bbclass, but firewalld doesn't use distutils/setuptools. - if [ ${PN} != "${BPN}-native" ]; then - sed -i -e s:${STAGING_BINDIR_NATIVE}/python3-native/python3:${bindir}/python3:g \ - ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml - fi - sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g \ - ${D}${bindir}/* ${D}${sbindir}/* ${D}${sysconfdir}/firewalld/*.xml - - # This file contains Red Hat-isms. Modules get loaded without it. - rm -f ${D}${sysconfdir}/modprobe.d/firewalld-sysctls.conf -} - -FILES_${PN} += "\ - ${PYTHON_SITEPACKAGES_DIR}/firewall \ - ${nonarch_libdir}/firewalld \ - ${datadir}/dbus-1 \ - ${datadir}/polkit-1 \ - ${datadir}/metainfo \ -" -FILES_${PN}-zsh-completion = "${datadir}/zsh/site-functions" - -RDEPENDS_${PN} = "\ - nftables-python \ - iptables \ - python3-core \ - python3-io \ - python3-fcntl \ - python3-shell \ - python3-syslog \ - python3-xml \ - python3-dbus \ - python3-slip-dbus \ - python3-decorator \ - python3-pygobject \ - python3-json \ - python3-ctypes \ -" 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/0001-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 index 669f363e72..cbac989284 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/0001-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 @@ -1,4 +1,4 @@ -From 084f5467672f2ae37003b77e8f8706772f3da3ec Mon Sep 17 00:00:00 2001 +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 @@ -29,13 +29,13 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile -index 5cbfd467ce..77eec9baa1 100644 +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: server.csr ca.key ca.pem + 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 @@ -44,12 +44,12 @@ index 5cbfd467ce..77eec9baa1 100644 @@ -117,7 +117,7 @@ client.csr client.key: client.cnf chmod g+r client.key - client.crt: client.csr ca.pem ca.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.26.2 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-occasional-verification.patch b/meta-networking/recipes-connectivity/freeradius/files/0013-raddb-certs-Makefile-fix-the-occasional-verification.patch index dce0427e1a..287e47adcc 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/0001-raddb-certs-Makefile-fix-the-occasional-verification.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0013-raddb-certs-Makefile-fix-the-occasional-verification.patch @@ -1,4 +1,4 @@ -From 3eda5d35fbaf66ed6bdc86ada4320a0a18681b7e Mon Sep 17 00:00:00 2001 +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 @@ -29,7 +29,7 @@ Signed-off-by: Mingli Yu <mingli.yu@windriver.com> 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/raddb/certs/Makefile b/raddb/certs/Makefile -index 77eec9baa1..3dcb63fe71 100644 +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 @@ -71,7 +71,7 @@ index 77eec9baa1..3dcb63fe71 100644 + @[ -f server.csr ] || $(OPENSSL) req -new -out server.csr -keyout server.key -config ./server.cnf chmod g+r server.key - server.crt: server.csr ca.key ca.pem + 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 @@ -85,7 +85,7 @@ index 77eec9baa1..3dcb63fe71 100644 chmod g+r server.pem .PHONY: server.vrfy -@@ -113,18 +113,18 @@ server.vrfy: ca.pem +@@ -113,19 +113,19 @@ server.vrfy: ca.pem # ###################################################################### client.csr client.key: client.cnf @@ -93,13 +93,14 @@ index 77eec9baa1..3dcb63fe71 100644 + @[ -f client.csr ] || $(OPENSSL) req -new -out client.csr -keyout client.key -config ./client.cnf chmod g+r client.key - client.crt: client.csr ca.pem ca.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) @@ -107,7 +108,7 @@ index 77eec9baa1..3dcb63fe71 100644 chmod g+r client.pem cp client.pem $(USER_NAME).pem -@@ -139,18 +139,18 @@ client.vrfy: ca.pem client.pem +@@ -140,18 +140,18 @@ client.vrfy: ca.pem client.pem # ###################################################################### inner-server.csr inner-server.key: inner-server.cnf @@ -115,7 +116,7 @@ index 77eec9baa1..3dcb63fe71 100644 + @[ -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: inner-server.csr ca.key ca.pem + 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 @@ -131,5 +132,5 @@ index 77eec9baa1..3dcb63fe71 100644 .PHONY: inner-server.vrfy -- -2.26.2 +2.25.1 diff --git a/meta-networking/recipes-connectivity/freeradius/files/0001-workaround-error-with-autoconf-2.7.patch b/meta-networking/recipes-connectivity/freeradius/files/0014-Workaround-error-with-autoconf-2.7.patch index 80c571df98..17eadc7e59 100644 --- a/meta-networking/recipes-connectivity/freeradius/files/0001-workaround-error-with-autoconf-2.7.patch +++ b/meta-networking/recipes-connectivity/freeradius/files/0014-Workaround-error-with-autoconf-2.7.patch @@ -1,7 +1,7 @@ -From 3b4ba29c7c5800df87eecd65214244619e01162b Mon Sep 17 00:00:00 2001 +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 +Subject: [PATCH] Workaround error with autoconf 2.7 While using autoconf 2.7, the AM_MISSING_PROG caused unexpected error: ... @@ -11,7 +11,7 @@ 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 [oe specific] +Upstream-Status: Inappropriate [embedded specific] Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- @@ -19,10 +19,10 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 1 file changed, 8 deletions(-) diff --git a/configure.ac b/configure.ac -index 609efb104b..2d761cf62c 100644 +index 263098f7fd..fc296832d8 100644 --- a/configure.ac +++ b/configure.ac -@@ -693,14 +693,6 @@ fi +@@ -878,14 +878,6 @@ fi AC_PATH_PROG(RUSERS, rusers, /usr/bin/rusers) @@ -34,9 +34,9 @@ index 609efb104b..2d761cf62c 100644 -AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) -AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) - - AC_PATH_PROG(LOCATE,locate) AC_PATH_PROG(DIRNAME,dirname) AC_PATH_PROG(GREP,grep) + -- -2.27.0 +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 2d766488e6..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 +EnvironmentFile=-/etc/sysconfig/radiusd PIDFile=/run/radiusd/radiusd.pid -ExecStartPre=-@BASE_BINDIR@/chown -R radiusd.radiusd /run/radiusd +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.21.bb b/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.5.bb index 864a4e9447..ec68c1d920 100644 --- a/meta-networking/recipes-connectivity/freeradius/freeradius_3.0.21.bb +++ b/meta-networking/recipes-connectivity/freeradius/freeradius_3.2.5.bb @@ -9,44 +9,56 @@ 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+" +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.0.x;lfs=0; \ +SRC_URI = "git://github.com/FreeRADIUS/freeradius-server.git;branch=v3.2.x;lfs=0;;protocol=https \ 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://0001-raddb-certs-Makefile-fix-the-existed-certificate-err.patch \ - file://0001-raddb-certs-Makefile-fix-the-occasional-verification.patch \ - file://0001-workaround-error-with-autoconf-2.7.patch \ 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 \ " -SRCREV = "af428abda249b2279ba0582180985a9f6f4a144a" +raddbdir = "${sysconfdir}/${MLPREFIX}raddb" + +SRCREV = "a7acce80f5ba2271d9aeb737a4a91a5bf8317f31" + +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" +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 \ @@ -57,6 +69,7 @@ EXTRA_OECONF = " --enable-strict-dependencies \ --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 \ @@ -91,13 +104,15 @@ PACKAGECONFIG[postgresql] = "--with-rlm_sql_postgresql,--without-rlm_sql_postgre 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,curl json-c" +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 +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 @@ -106,7 +121,7 @@ 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 () { +do_configure() { ./autogen.sh # the configure of rlm_perl needs this to get correct @@ -123,42 +138,45 @@ do_configure () { INITSCRIPT_NAME = "radiusd" -SYSTEMD_SERVICE_${PN} = "radiusd.service" +SYSTEMD_SERVICE:${PN} = "radiusd.service" USERADD_PACKAGES = "${PN}" -USERADD_PARAM_${PN} = "--system --no-create-home --shell /bin/false --user-group radiusd" +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 + 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}/${sysconfdir}/raddb/experimental.conf + rm -f ${D}/${raddbdir}/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/ rm -rf ${D}/${localstatedir}/log/ - install -m 0644 ${WORKDIR}/volatiles.58_radiusd ${D}${sysconfdir}/default/volatiles/58_radiusd - chown -R radiusd:radiusd ${D}/${sysconfdir}/raddb/ + chown -R radiusd:radiusd ${D}/${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 ${UNPACKDIR}/freeradius ${D}/etc/init.d/radiusd + install -m 0644 ${UNPACKDIR}/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 + install -m 0644 ${UNPACKDIR}/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' \ @@ -166,13 +184,17 @@ do_install() { ${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 + install -m 0644 ${UNPACKDIR}/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} () { +pkg_postinst:${PN} () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; then # create /var/log/radius, /var/run/radiusd @@ -182,58 +204,95 @@ pkg_postinst_${PN} () { fi # Fix ownership for /etc/raddb/*, /var/lib/radiusd - chown -R radiusd:radiusd ${sysconfdir}/raddb + 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" +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}-utils = "${bindir}/*" -FILES_${PN}-ldap = "${libdir}/rlm_ldap.so* \ - ${sysconfdir}/raddb/mods-available/ldap \ +FILES:${PN}-ldap = "${libdir}/rlm_ldap.so* \ + ${raddbdir}/mods-available/ldap \ " -FILES_${PN}-krb5 = "${libdir}/rlm_krb5.so* \ - ${sysconfdir}/raddb/mods-available/krb5 \ +FILES:${PN}-krb5 = "${libdir}/rlm_krb5.so* \ + ${raddbdir}/mods-available/krb5 \ " -FILES_${PN}-perl = "${libdir}/rlm_perl.so* \ - ${sysconfdir}/raddb/mods-config/perl \ - ${sysconfdir}/raddb/mods-available/perl \ +FILES:${PN}-perl = "${libdir}/rlm_perl.so* \ + ${raddbdir}/mods-config/perl \ + ${raddbdir}/mods-available/perl \ " -FILES_${PN}-python = "${libdir}/rlm_python3.so* \ - ${sysconfdir}/raddb/mods-config/python3 \ - ${sysconfdir}/raddb/mods-available/python3 \ +FILES:${PN}-python = "${libdir}/rlm_python3.so* \ + ${raddbdir}/mods-config/python3 \ + ${raddbdir}/mods-available/python3 \ " -FILES_${PN}-mysql = "${libdir}/rlm_sql_mysql.so* \ - ${sysconfdir}/raddb/mods-config/sql/*/mysql \ - ${sysconfdir}/raddb/mods-available/sql \ +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* \ - ${sysconfdir}/raddb/mods-config/sql/*/postgresql \ +FILES:${PN}-postgresql = "${libdir}/rlm_sql_postgresql.so* \ + ${raddbdir}/mods-config/sql/*/postgresql \ " -FILES_${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*" +FILES:${PN}-unixodbc = "${libdir}/rlm_sql_unixodbc.so*" -FILES_${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" +FILES:${PN} =+ "${libdir}/rlm_*.so* ${libdir}/proto_*so*" -RDEPENDS_${PN} += "perl" -RDEPENDS_${PN}-utils = "${PN} perl" +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/lftp/lftp_4.9.2.bb b/meta-networking/recipes-connectivity/lftp/lftp_4.9.2.bb index e6240a58ed..bf3e18dce7 100644 --- a/meta-networking/recipes-connectivity/lftp/lftp_4.9.2.bb +++ b/meta-networking/recipes-connectivity/lftp/lftp_4.9.2.bb @@ -3,7 +3,7 @@ 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" @@ -23,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.14.bb b/meta-networking/recipes-connectivity/libdnet/libdnet_1.18.0.bb index df48782eef..75aaf521c4 100644 --- a/meta-networking/recipes-connectivity/libdnet/libdnet_1.14.bb +++ b/meta-networking/recipes-connectivity/libdnet/libdnet_1.18.0.bb @@ -1,20 +1,22 @@ SUMMARY = "dumb networking library" -HOMEPAGE = "http://code.google.com/p/libdnet/" +HOMEPAGE = "https://github.com/ofalk/libdnet" SECTION = "libs" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=0036c1b155f4e999f3e0a373490b5db9" -SRC_URI = "git://github.com/dugsong/libdnet.git;nobranch=1" -SRCREV = "3e782472d2a58d5e1b94d04eda4a364c2d257600" +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 +inherit autotools multilib_script pkgconfig -acpaths = "-I ./config/" +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/0003-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 index 65567610b9..3f0490cb80 100644 --- a/meta-networking/recipes-connectivity/libiec61850/files/0003-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 @@ -1,4 +1,4 @@ -From 89f326a427c7ad13c115e2d3f2ac27807aa5a795 Mon Sep 17 00:00:00 2001 +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 @@ -8,6 +8,8 @@ https://stackoverflow.com/questions/1242904/finding-python-site-packages-directo Signed-off-by: Romain Naour <romain.naour@smile.fr> --- +Upstream-Status: Pending + pyiec61850/CMakeLists.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) @@ -33,5 +35,5 @@ index 159ef4b..d1732a1 100644 add_test(test_pyiec61850 ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/test_pyiec61850.py) -- -2.21.3 +2.31.1 diff --git a/meta-networking/recipes-connectivity/libiec61850/files/0001-use-poll.h-instead-of-sys-poll.h.patch b/meta-networking/recipes-connectivity/libiec61850/files/0001-use-poll.h-instead-of-sys-poll.h.patch deleted file mode 100644 index a04473d218..0000000000 --- a/meta-networking/recipes-connectivity/libiec61850/files/0001-use-poll.h-instead-of-sys-poll.h.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 4cad505fc98240eb66eaabfae61a9694f8158dda Mon Sep 17 00:00:00 2001 -From: Romain Naour <romain.naour@smile.fr> -Date: Tue, 7 Apr 2020 20:58:37 +0200 -Subject: [PATCH] use <poll.h> instead of <sys/poll.h> - -The manpage of poll(2) states that the prototype of poll is defined -in <poll.h>. Use that header file instead of <sys/poll.h> to allow -compilation against musl-libc. - -Upstream status: Pending -https://github.com/mz-automation/libiec61850/pull/228 - -Signed-off-by: Romain Naour <romain.naour@smile.fr> ---- - hal/ethernet/linux/ethernet_linux.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hal/ethernet/linux/ethernet_linux.c b/hal/ethernet/linux/ethernet_linux.c -index c3ab2e2..9aa5c28 100644 ---- a/hal/ethernet/linux/ethernet_linux.c -+++ b/hal/ethernet/linux/ethernet_linux.c -@@ -23,7 +23,7 @@ - - #include <sys/socket.h> - #include <sys/ioctl.h> --#include <sys/poll.h> -+#include <poll.h> - #include <linux/if_packet.h> - #include <linux/if_ether.h> - #include <linux/if_arp.h> --- -2.21.1 - diff --git a/meta-networking/recipes-connectivity/libiec61850/files/0002-serial_port_linux-Add-missing-include-sys-time.h.patch b/meta-networking/recipes-connectivity/libiec61850/files/0002-serial_port_linux-Add-missing-include-sys-time.h.patch deleted file mode 100644 index e1b8ca15b3..0000000000 --- a/meta-networking/recipes-connectivity/libiec61850/files/0002-serial_port_linux-Add-missing-include-sys-time.h.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 661405eb6066b67dfe51d5ff9635e29f86bdd238 Mon Sep 17 00:00:00 2001 -From: Romain Naour <romain.naour@smile.fr> -Date: Tue, 7 Apr 2020 21:02:54 +0200 -Subject: [PATCH] serial_port_linux: Add missing include sys/time.h - -POSIX says `struct timeval` is defined if <sys/time.h> is included. - -Adding this header allow to build against musl-libc. - -Upstream status: Pending -https://github.com/mz-automation/libiec61850/pull/228 - -Signed-off-by: Romain Naour <romain.naour@smile.fr> ---- - hal/serial/linux/serial_port_linux.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/hal/serial/linux/serial_port_linux.c b/hal/serial/linux/serial_port_linux.c -index e6308c0..15e5794 100644 ---- a/hal/serial/linux/serial_port_linux.c -+++ b/hal/serial/linux/serial_port_linux.c -@@ -29,6 +29,7 @@ - #include <termios.h> - #include <fcntl.h> - #include <unistd.h> -+#include <sys/time.h> - - #include "hal_serial.h" - #include "hal_time.h" --- -2.21.1 - diff --git a/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.4.2.1.bb b/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb index 18cb0cd8ef..0e1f50164a 100644 --- a/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.4.2.1.bb +++ b/meta-networking/recipes-connectivity/libiec61850/libiec61850_1.5.3.bb @@ -10,15 +10,14 @@ library for the IEC 61850/MMS, IEC 61850/GOOSE and IEC \ written in C. It is available under the GPLv3 license." HOMEPAGE = "http://libiec61850.com" SECTION = "console/network" -LICENSE = "GPLv3" +LICENSE = "GPL-3.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" DEPENDS = "swig-native python3" -SRCREV = "d798814fb463115a835da597535a625b68a39cff" +SRCREV = "6f557c490f0b46ab5d7ef1b01bb3bc9fab3f442f" -SRC_URI = "git://github.com/mz-automation/${BPN}.git;branch=v1.4 \ - file://0001-use-poll.h-instead-of-sys-poll.h.patch \ - file://0002-serial_port_linux-Add-missing-include-sys-time.h.patch \ - file://0003-pyiec61850-don-t-break-CMAKE_INSTALL_PATH-by-trying-.patch \ +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" @@ -30,10 +29,10 @@ EXTRA_OECMAKE = " \ -DBUILD_PYTHON_BINDINGS=ON \ " -RDEPENDS_${PN}-python = " python3-core " -RDEPENDS_${PN} = " python3-core " +RDEPENDS:${PN}-python = " python3-core " +RDEPENDS:${PN} = " python3-core " -FILES_${PN} += " \ - ${libdir}/${PYTHON_DIR}/site-packages/iec61850.py \ - ${libdir}/${PYTHON_DIR}/site-packages/_iec61850.so \ +FILES:${PN} += " \ + ${PYTHON_SITEPACKAGES_DIR}/iec61850.py \ + ${PYTHON_SITEPACKAGES_DIR}/_iec61850.so \ " diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch b/meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch deleted file mode 100644 index f3ba04f51f..0000000000 --- a/meta-networking/recipes-connectivity/mbedtls/mbedtls/0001-ssl_tls-Increase-size-of-padbuf-to-64.patch +++ /dev/null @@ -1,34 +0,0 @@ -From c3d7321d59e959b357a7d3d69782d9105f3d04aa Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 1 Mar 2021 21:04:57 -0800 -Subject: [PATCH] ssl_tls: Increase size of padbuf to 64 - -This fixes warnings with gcc11 - -git/library/ssl_tls.c: In function 'ssl_calc_finished_tls_sha384': -git/library/ssl_tls.c:3267:5: error: 'mbedtls_sha512_finish_ret' accessing 64 bytes in a region of size 48 [-Werror=stringop-overflow=] - 3267 | finish( &sha512, padbuf ); - | ^~~~~~~~~~~~~~~~~~~~~~~~~ -git/library/ssl_tls.c:3267:5: note: referencing argument 2 of type 'unsigned char *' - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - library/ssl_tls.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/library/ssl_tls.c b/library/ssl_tls.c -index a1a5859f0..4c98a4104 100644 ---- a/library/ssl_tls.c -+++ b/library/ssl_tls.c -@@ -3205,7 +3205,7 @@ static void ssl_calc_finished_tls_sha384( - { - int len = 12; - const char *sender; -- unsigned char padbuf[48]; -+ unsigned char padbuf[64]; - #if defined(MBEDTLS_USE_PSA_CRYPTO) - size_t hash_size; - psa_hash_operation_t sha384_psa = PSA_HASH_OPERATION_INIT; --- -2.30.1 - 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.25.0.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb deleted file mode 100644 index 481e7ea949..0000000000 --- a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.25.0.bb +++ /dev/null @@ -1,44 +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=3b83ef96387f14655fc854ddc3c6bd57" - -SECTION = "libs" - -S = "${WORKDIR}/git" -SRCREV = "1c54b5410fd48d6bcada97e30cac417c5c7eea67" -SRC_URI = "git://github.com/ARMmbed/mbedtls.git;protocol=https;branch=development" -SRC_URI += "file://0001-ssl_tls-Increase-size-of-padbuf-to-64.patch" - -inherit cmake - -PACKAGECONFIG ??= "shared-libs programs" -PACKAGECONFIG[shared-libs] = "-DUSE_SHARED_MBEDTLS_LIBRARY=ON,-DUSE_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}/" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.bb new file mode 100644 index 0000000000..abb5ad2442 --- /dev/null +++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_2.28.9.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 = "5e146adef63b326b04282252639bebc2730939c6" +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 = "${@bb.utils.contains('PACKAGECONFIG', 'programs', 'hello', '', d)}" +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.1.bb b/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.1.bb new file mode 100644 index 0000000000..62c3add2a5 --- /dev/null +++ b/meta-networking/recipes-connectivity/mbedtls/mbedtls_3.6.1.bb @@ -0,0 +1,81 @@ +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=mbedtls-3.6 \ + git://github.com/Mbed-TLS/mbedtls-framework.git;protocol=https;branch=main;destsuffix=git/framework;name=framework \ + file://run-ptest" + +SRCREV = "71c569d44bf3a8bd53d874c81ee8ac644dd6e9e3" +SRCREV_framework = "94599c0e3b5036e086446a51a3f79640f70f22f6" +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" + +# 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 = "${@bb.utils.contains('PACKAGECONFIG', 'programs', 'hello', '', d)}" +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 + install -d ${D}${PTEST_PATH}/framework + cp -f ${B}/tests/test_suite_* ${D}${PTEST_PATH}/tests/ + find ${D}${PTEST_PATH}/tests/ -type f -name "*.c" -delete + cp -fR ${S}/framework/data_files ${D}${PTEST_PATH}/framework/ +} diff --git a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb index a630d27b9c..1c2f030f83 100644 --- a/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb +++ b/meta-networking/recipes-connectivity/miniupnpd/miniupnpd_2.1.20191006.bb @@ -20,7 +20,7 @@ SRC_URI[sha256sum] = "218fad7af31f3c22fb4c9db28a55a2a8b5067d41f5b38f52008a057a00 IPV6 = "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '--ipv6', '', d)}" -do_configure_prepend() { +do_configure:prepend() { echo "${@d.getVar('DISTRO_VERSION')}" > ${S}/os.openembedded } @@ -44,7 +44,7 @@ do_install() { install ${S}/linux/miniupnpd.init.d.script ${D}/${sysconfdir}/init.d/miniupnpd install -d ${D}${systemd_unitdir}/system - install -m 0644 ${WORKDIR}/miniupnpd.service ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/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 index 37560f30c8..627638ec89 100644 --- a/meta-networking/recipes-connectivity/mosquitto/files/1571.patch +++ b/meta-networking/recipes-connectivity/mosquitto/files/1571.patch @@ -19,4 +19,4 @@ Signed-off-by: Gianfranco Costamagna <costamagnagianfranco@yahoo.it> + LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/linker.version" ) - install(TARGETS libmosquitto RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") + 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 9d5963c418..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 diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.10.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb index b815ac3b49..4ef0654102 100644 --- a/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.10.bb +++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_2.0.18.bb @@ -8,23 +8,24 @@ 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=c09f121939f063aeb5235972be8c722c \ - file://epl-v20;md5=d9fc0efef5228704e7f5b37f27192723 \ - file://notice.html;md5=541f8f37af492858dab8d2c1b69ede69 \ + file://edl-v10;md5=9f6accb1afcb570f8be65039e2fcd49e \ + file://epl-v20;md5=2dd765ca47a05140be15ebafddbeadfe \ + file://NOTICE.md;md5=a7a91b4754c6f7995020d1b49bc829c6 \ " -DEPENDS = "uthash cjson dlt-daemon" +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[md5sum] = "3d1c327d8c5881f56983bee1e3c8f068" -SRC_URI[sha256sum] = "0188f7b21b91d6d80e992b8d6116ba851468b3bd154030e8a003ed28fb6f4a44" +SRC_URI[sha256sum] = "d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a" -inherit systemd update-rc.d useradd cmake +inherit systemd update-rc.d useradd cmake pkgconfig -PACKAGECONFIG ??= "ssl dlt websockets \ +PACKAGECONFIG ??= "ssl websockets \ ${@bb.utils.filter('DISTRO_FEATURES','systemd', d)} \ " @@ -40,12 +41,12 @@ EXTRA_OECMAKE = " \ -DWITH_ADNS=ON \ " -do_install_append() { +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 + install -m 0755 ${UNPACKDIR}/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' \ @@ -57,7 +58,7 @@ PACKAGES += "libmosquitto1 libmosquittopp1 ${PN}-clients" PACKAGE_BEFORE_PN = "${PN}-examples" -FILES_${PN} = "${sbindir}/mosquitto \ +FILES:${PN} = "${sbindir}/mosquitto \ ${bindir}/mosquitto_passwd \ ${bindir}/mosquitto_ctrl \ ${libdir}/mosquitto_dynamic_security.so \ @@ -66,26 +67,26 @@ FILES_${PN} = "${sbindir}/mosquitto \ ${systemd_unitdir}/system/mosquitto.service \ " -CONFFILES_${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" +CONFFILES:${PN} += "${sysconfdir}/mosquitto/mosquitto.conf" -FILES_libmosquitto1 = "${libdir}/libmosquitto.so.*" +FILES:libmosquitto1 = "${libdir}/libmosquitto.so.*" -FILES_libmosquittopp1 = "${libdir}/libmosquittopp.so.*" +FILES:libmosquittopp1 = "${libdir}/libmosquittopp.so.*" -FILES_${PN}-clients = "${bindir}/mosquitto_pub \ +FILES:${PN}-clients = "${bindir}/mosquitto_pub \ ${bindir}/mosquitto_sub \ ${bindir}/mosquitto_rr \ " -FILES_${PN}-examples = "${sysconfdir}/mosquitto/*.example" +FILES:${PN}-examples = "${sysconfdir}/mosquitto/*.example" -SYSTEMD_SERVICE_${PN} = "mosquitto.service" +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 \ +USERADD_PARAM:${PN} = "--system --no-create-home --shell /bin/false \ --user-group mosquitto" -BBCLASSEXTEND += "native nativesdk" +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.2.5.bb b/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb index 77be27ffaa..a6556249b7 100644 --- a/meta-networking/recipes-connectivity/nanomsg/nng_1.2.5.bb +++ b/meta-networking/recipes-connectivity/nanomsg/nng_1.7.3.bb @@ -1,21 +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" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a19b15be6e844b39a54de2ef665bd6de" - SECTION = "libs/networking" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" -SRCREV = "53ae1a5ab37fdfc9ad5c236df3eaf4dd63f0fee9" - -SRC_URI = "git://github.com/nanomsg/nng.git;branch=v1.2.x" +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" +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 index 176fa3bed2..b52154025b 100644 --- a/meta-networking/recipes-connectivity/nanomsg/nngpp_git.bb +++ b/meta-networking/recipes-connectivity/nanomsg/nngpp_git.bb @@ -7,7 +7,7 @@ DEPENDS = "nng" SRCREV = "cc5d2641babab165d8a9943817c46d36c6dc17c2" PV = "1.3.0" -SRC_URI = "git://github.com/cwzx/nngpp" +SRC_URI = "git://github.com/cwzx/nngpp;branch=master;protocol=https" S = "${WORKDIR}/git" diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch b/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch deleted file mode 100644 index 407e24ca0e..0000000000 --- a/meta-networking/recipes-connectivity/netplan/netplan/0001-dbus-Remove-unused-variabes.patch +++ /dev/null @@ -1,59 +0,0 @@ -Subject: [PATCH 1/2] dbus: Remove unused variabes - -This issue is seen when using clang to compile it - -Same fix is needed for parse.c and networkd.c, - -Fixes -src/dbus.c:49:23: error: unused variable 'stdout' [-Werror,-Wunused-variable] -g_autofree gchar *stdout = NULL; -^ -Upstream-Status: Submitted [https://github.com/CanonicalLtd/netplan/pull/175] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - src/dbus.c | 3 --- - src/networkd.c | 1 - - src/parse.c | 1 - - 3 files changed, 5 deletions(-) - -diff --git a/src/dbus.c b/src/dbus.c -index 9606fea..8e1ed9d 100644 ---- a/src/dbus.c -+++ b/src/dbus.c -@@ -242,9 +242,6 @@ static int - method_info(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) - { - sd_bus_message *reply = NULL; -- g_autoptr(GError) err = NULL; -- g_autofree gchar *stdout = NULL; -- g_autofree gchar *stderr = NULL; - gint exit_status = 0; - - exit_status = sd_bus_message_new_method_return(m, &reply); -diff --git a/src/networkd.c b/src/networkd.c -index 7c86cd6..7200740 100644 ---- a/src/networkd.c -+++ b/src/networkd.c -@@ -897,7 +897,6 @@ append_wpa_auth_conf(GString* s, const NetplanAuthenticationSettings* auth, cons - static void - write_wpa_unit(const NetplanNetDefinition* def, const char* rootdir) - { -- g_autoptr(GError) err = NULL; - g_autofree gchar *stdouth = NULL; - - stdouth = systemd_escape(def->id); -diff --git a/src/parse.c b/src/parse.c -index 033c657..faca27f 100644 ---- a/src/parse.c -+++ b/src/parse.c -@@ -1899,7 +1899,6 @@ handle_wireguard_peers(yaml_document_t* doc, yaml_node_t* node, const void* _, G - } - - for (yaml_node_item_t *i = node->data.sequence.items.start; i < node->data.sequence.items.top; i++) { -- g_autofree char* addr = NULL; - yaml_node_t *entry = yaml_document_get_node(doc, *i); - assert_type(entry, YAML_MAPPING_NODE); - --- -2.25.1 - diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch b/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch deleted file mode 100644 index dab8693c71..0000000000 --- a/meta-networking/recipes-connectivity/netplan/netplan/0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ceb4111af317ecc54d97bb21878dcccbfdb2983e Mon Sep 17 00:00:00 2001 -From: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> -Date: Fri, 25 Dec 2020 11:41:43 +0900 -Subject: [PATCH] don't fail if GLOB_BRACE is not defined - -Signed-off-by: Zang Ruochen <zangrc.fnst@cn.fujitsu.com> ---- - src/util.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/util.c b/src/util.c -index 7e59985..eb8e573 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -23,6 +23,12 @@ - - #include "util.h" - -+/* Don't fail if the standard library -+ * doesn't provide brace expansion */ -+#ifndef GLOB_BRACE -+#define GLOB_BRACE 0 -+#endif -+ - GHashTable* wifi_frequency_24; - GHashTable* wifi_frequency_5; - --- -2.25.1 - diff --git a/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Exclude-.h-files-from-target-rule.patch b/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Exclude-.h-files-from-target-rule.patch deleted file mode 100644 index 68aabd6a48..0000000000 --- a/meta-networking/recipes-connectivity/netplan/netplan/0002-Makefile-Exclude-.h-files-from-target-rule.patch +++ /dev/null @@ -1,32 +0,0 @@ -Subject: [PATCH 2/2] Makefile: Exclude .h files from target rule - -This ensures that src/_features.h is not added to compiler cmdline which -can confuse the compilers e.g. clang as it may not like .h as valid input -and complain - -| clang-11: error: cannot specify -o when generating multiple output files -| make: *** [Makefile:50: netplan-dbus] Error 1 -| make: *** Waiting for unfinished jobs.... - -Upstream-Status: Submitted [https://github.com/CanonicalLtd/netplan/pull/175] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - Makefile | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 4fa6bd8..567d326 100644 ---- a/Makefile -+++ b/Makefile -@@ -46,7 +46,7 @@ generate: libnetplan.so.$(NETPLAN_SOVER) nm.o networkd.o openvswitch.o generate. - $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ -L. -lnetplan `pkg-config --cflags --libs glib-2.0 gio-2.0 yaml-0.1 uuid` - - netplan-dbus: src/dbus.c src/_features.h util.o -- $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ `pkg-config --cflags --libs libsystemd glib-2.0 gio-2.0` -+ $(CC) $(BUILDFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(patsubst %.h,,$^) `pkg-config --cflags --libs libsystemd glib-2.0 gio-2.0` - - src/_features.h: src/[^_]*.[hc] - printf "#include <stddef.h>\nstatic const char *feature_flags[] __attribute__((__unused__)) = {\n" > $@ --- -2.25.1 - diff --git a/meta-networking/recipes-connectivity/netplan/netplan_0.101.bb b/meta-networking/recipes-connectivity/netplan/netplan_0.101.bb deleted file mode 100644 index a3afcd2d56..0000000000 --- a/meta-networking/recipes-connectivity/netplan/netplan_0.101.bb +++ /dev/null @@ -1,62 +0,0 @@ -SUMMARY = "The network configuration abstraction renderer" -DESCRIPTION = "Netplan is a utility for easily configuring networking on a \ -linux system. You simply create a YAML description of the required network \ -interfaces and what each should be configured to do. From this description \ -Netplan will generate all the necessary configuration for your chosen renderer \ -tool." -HOMEPAGE = "https://netplan.io" -SECTION = "net/misc" - -LICENSE = "GPLv3" -LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" - -S = "${WORKDIR}/git" -SRCREV = "e445b87b9dff439ec564c245d030b03d61eb0f24" -PV = "0.101+git${SRCPV}" - -SRC_URI = " \ - git://github.com/CanonicalLtd/netplan.git \ - file://0001-dbus-Remove-unused-variabes.patch \ - file://0002-Makefile-Exclude-.h-files-from-target-rule.patch \ -" -SRC_URI_append_libc-musl = " file://0001-don-t-fail-if-GLOB_BRACE-is-not-defined.patch" - -DEPENDS = "glib-2.0 libyaml ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" - -RDEPENDS_${PN} = "python3 python3-core python3-pyyaml python3-netifaces python3-nose python3-coverage python3-pycodestyle python3-pyflakes util-linux-libuuid libnetplan" - -inherit pkgconfig systemd - -TARGET_CC_ARCH += "${LDFLAGS}" - -EXTRA_OEMAKE = "generate netplan/_features.py" -EXTRA_OEMAKE =+ "${@bb.utils.contains('DISTRO_FEATURES','systemd','netplan-dbus dbus/io.netplan.Netplan.service','',d)}" - -do_install() { - install -d ${D}${sbindir} ${D}${libdir} ${D}${base_libdir}/netplan ${D}${datadir}/netplan/netplan/cli/commands ${D}${sysconfdir}/netplan - install -m 755 ${S}/generate ${D}${base_libdir}/netplan/ - install -m 644 ${S}/netplan/*.py ${D}${datadir}/netplan/netplan - install -m 644 ${S}/netplan/cli/*.py ${D}${datadir}/netplan/netplan/cli - install -m 644 ${S}/netplan/cli/commands/*.py ${D}${datadir}/netplan/netplan/cli/commands - install -m 755 ${S}/src/netplan.script ${D}${datadir}/netplan/ - ln -srf ${D}${datadir}/netplan/netplan.script ${D}${sbindir}/netplan - - install -d ${D}/${systemd_unitdir}/system ${D}${systemd_unitdir}/system-generators - ln -srf ${D}/${base_libdir}/netplan/generate ${D}${systemd_unitdir}/system-generators - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${datadir}/dbus-1/system.d ${D}${datadir}/dbus-1/system-services - install -m 755 ${S}/netplan-dbus ${D}${base_libdir}/netplan - install -m 644 ${S}/dbus/io.netplan.Netplan.conf ${D}${datadir}/dbus-1/system.d - install -m 644 ${S}/dbus/io.netplan.Netplan.service ${D}${datadir}/dbus-1/system-services - fi - - install -m 755 ${S}/libnetplan.so.0.0 ${D}${libdir} - ln -rfs ${D}${libdir}/libnetplan.so.0.0 ${D}${libdir}/libnetplan.so -} - -PACKAGES += "${PN}-dbus libnetplan" - -FILES_libnetplan = "${libdir}/libnetplan.so.0.0" -FILES_${PN} = "${sbindir} ${base_libdir}/netplan/generate ${datadir}/netplan ${sysconfdir}/netplan ${systemd_unitdir}" -FILES_${PN}-dbus = "${base_libdir}/netplan/netplan-dbus ${datadir}/dbus-1" diff --git a/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.8.14.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.12.0.bb index 1f76d8ab52..2d2055ba65 100644 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.8.14.bb +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager-openvpn_1.12.0.bb @@ -1,24 +1,26 @@ SUMMARY = "NetworkManager-openvpn-plugin" SECTION = "net/misc" -LICENSE = "GPLv2+" +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[md5sum] = "bef67eca77bee68da703609b92f804a0" -SRC_URI[sha256sum] = "e7419053fc3b5a7e25f1a7517c313ad4531b6ea280255524ebb85a70c76fdbeb" +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] = "903fd4c0aebd2aa7ac70c9d8c2bed8df922655d22d764514403566ae89b7e886" 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() { +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: @@ -28,26 +30,26 @@ do_configure_append() { fi } -do_install_append () { +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" +USERADD_PARAM:${PN} = "--system nm-openvpn" -FILES_${PN} += " \ +FILES:${PN} += " \ ${datadir}/dbus-1 \ ${datadir}/metainfo \ ${libdir}/NetworkManager/*.so \ ${nonarch_libdir}/NetworkManager/VPN/nm-openvpn-service.name \ " -FILES_${PN}-staticdev += " \ +FILES:${PN}-staticdev += " \ ${libdir}/NetworkManager/*.a \ " -RDEPENDS_${PN} = " \ +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 19c8c74811..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 9bcf4c81a559d1e7deac47b2e510d7f1e5837a02 Mon Sep 17 00:00:00 2001 -From: Pablo Saavedra <psaavedra@igalia.com> -Date: Tue, 13 Mar 2018 17:36:20 +0100 -Subject: [PATCH] Fixed configure.ac: Fix pkgconfig sysroot locations - ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 65ceffb..ad4b0fc 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -561,7 +561,7 @@ if test "$have_jansson" = "yes"; then - AC_DEFINE(WITH_JANSSON, 1, [Define if JANSSON is enabled]) - - AC_CHECK_TOOLS(READELF, [eu-readelf readelf]) -- 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-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch new file mode 100644 index 0000000000..8e246efe01 --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch @@ -0,0 +1,65 @@ +From 34d7a6c9919a73c2e716835000944c17438b2ca1 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 7 Jun 2024 14:03:15 -0700 +Subject: [PATCH] libnm-systemd-core: Disable sd_dhcp6_client_set_duid_uuid + function + +When building on musl systems ( with out systemd ), and using LLD linker +from LLVM project we fail to link with undefined symbols. + +This symbol is in sd_id128.c but its disabled, so let disable the functions +which need this function. + +| x86_64-yoe-linux-musl-ld.lld: error: undefined symbol: sd_id128_get_machine_app_specific +| >>> referenced by sd-dhcp-duid.c:202 (/usr/src/debug/networkmanager/1.48.0/../NetworkManager-1.48.0/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c:202) +| >>> libnm-systemd-core.a.p/src_libsystemd-network_sd-dhcp-duid.c.o:(sd_dhcp_duid_set_uuid) in archive src/libnm-systemd-core/libnm-systemd-core.a +| x86_64-yoe-linux-musl-clang: error: linker command failed with exit code 1 (use -v to see invocation) + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1966] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c | 2 ++ + .../src/libsystemd-network/sd-dhcp6-client.c | 3 ++- + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c +index e664a4a..7ba5020 100644 +--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c ++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c +@@ -193,6 +193,7 @@ int sd_dhcp_duid_set_en(sd_dhcp_duid *duid) { + return 0; + } + ++#if 0 + int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) { + sd_id128_t machine_id; + int r; +@@ -209,6 +210,7 @@ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) { + duid->size = offsetof(struct duid, uuid.uuid) + sizeof(machine_id); + return 0; + } ++#endif + + int dhcp_duid_to_string_internal(uint16_t type, const void *data, size_t data_size, char **ret) { + _cleanup_free_ char *p = NULL, *x = NULL; +diff --git a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c +index 7c20116..08c1e96 100644 +--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c +@@ -244,6 +244,7 @@ int sd_dhcp6_client_set_duid_en(sd_dhcp6_client *client) { + return 0; + } + ++#if 0 + int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) { + int r; + +@@ -256,7 +257,7 @@ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) { + + return 0; + } +- ++#endif + int sd_dhcp6_client_set_duid_raw(sd_dhcp6_client *client, uint16_t duid_type, const uint8_t *duid, size_t duid_len) { + int r; + 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 0a86abafc0..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0002-Do-not-create-settings-settings-property-documentati.patch +++ /dev/null @@ -1,59 +0,0 @@ -From d0dead0478a070b96f37bd3b310443eaa8c93a25 Mon Sep 17 00:00:00 2001 -From: Vinicius Aquino <voa.aquino@gmail.com> -Date: Thu, 1 Apr 2021 14:13:07 -0300 -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 by adding python3-pygobject-native to DEPENDS but -compile could not find (configure passed) python module gi. -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> -Signed-off-by: Vinicius Aquino <voa.aquino@gmail.com> ---- - Makefile.am | 4 ---- - configure.ac | 5 ----- - 2 files changed, 9 deletions(-) - -diff --git a/Makefile.am b/Makefile.am -index 9279672c1..2e52acbb2 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -1686,14 +1686,10 @@ libnm/libnm.typelib: libnm/libnm.gir - INTROSPECTION_GIRS += libnm/NM-1.0.gir - - libnm_noinst_data = \ -- clients/cli/generate-docs-nm-settings-nmcli.xml \ - libnm/nm-property-infos-dbus.xml \ - libnm/nm-property-infos-ifcfg-rh.xml \ - libnm/nm-property-infos-keyfile.xml \ - libnm/nm-property-infos-nmcli.xml \ -- libnm/nm-settings-docs-gir.xml \ -- man/nm-settings-docs-dbus.xml \ -- man/nm-settings-docs-nmcli.xml \ - $(NULL) - - noinst_DATA += $(libnm_noinst_data) -diff --git a/configure.ac b/configure.ac -index 784ac4695..681e6cb32 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1241,11 +1241,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 2>&1; 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/0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch deleted file mode 100644 index 11741897f6..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 6388b16b93ba805f8877a94f47509f701250812f Mon Sep 17 00:00:00 2001 -From: Hongxu Jia <hongxu.jia@windriver.com> -Date: Mon, 6 Jul 2020 19:33:54 -0700 -Subject: [PATCH] install firewalld to var-libdir rather than hardcod lib - -The oe install firewalld (split packages) to ${libdir}/firewalld/zones - -Upstream-Status: Inappropriate [oe specific] - -Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> ---- - Makefile.am | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Makefile.am b/Makefile.am -index 358b01a..5745339 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -4778,7 +4778,7 @@ data/server.conf: $(srcdir)/data/server.conf.in - $(AM_V_GEN) $(data_edit) $< >$@ - - if WITH_FIREWALLD_ZONE --firewalldzonedir = $(prefix)/lib/firewalld/zones -+firewalldzonedir = $(libdir)/firewalld/zones - firewalldzone_DATA = data/nm-shared.xml - endif - --- -2.21.0 - 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 692f1ffa4f..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0001-Fix-build-with-musl-systemd-specific.patch +++ /dev/null @@ -1,154 +0,0 @@ -From 44884c7e7655b889f41cb02ffc8ab72a29b52ebf 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 1/2] Fix build with musl - systemd specific -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -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> -Signed-off-by: Vinicius Aquino <voa.aquino@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 | 13 ++++--------- - shared/systemd/src/basic/stdio-util.h | 2 ++ - shared/systemd/src/basic/string-util.h | 5 +++++ - 6 files changed, 27 insertions(+), 9 deletions(-) - -diff --git a/shared/systemd/src/basic/in-addr-util.c b/shared/systemd/src/basic/in-addr-util.c -index c315dcbb8..5b7e04eb7 100644 ---- a/shared/systemd/src/basic/in-addr-util.c -+++ b/shared/systemd/src/basic/in-addr-util.c -@@ -15,6 +15,7 @@ - #include "in-addr-util.h" - #include "macro.h" - #include "parse-util.h" -+#include "string-util.h" - #include "random-util.h" - #include "string-util.h" - #include "strxcpyx.h" -diff --git a/shared/systemd/src/basic/process-util.c b/shared/systemd/src/basic/process-util.c -index 0e25b0200..ea2c0fbb4 100644 ---- a/shared/systemd/src/basic/process-util.c -+++ b/shared/systemd/src/basic/process-util.c -@@ -17,6 +17,9 @@ - #include <sys/wait.h> - #include <syslog.h> - #include <unistd.h> -+#ifndef __GLIBC__ -+#include <pthread.h> -+#endif - #if 0 /* NM_IGNORED */ - #if HAVE_VALGRIND_VALGRIND_H - #include <valgrind/valgrind.h> -@@ -1152,11 +1155,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; -@@ -1185,7 +1190,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 1de069476..f6834fbd2 100644 ---- a/shared/systemd/src/basic/socket-util.h -+++ b/shared/systemd/src/basic/socket-util.h -@@ -14,6 +14,12 @@ - #include <sys/types.h> - #include <sys/un.h> - -+#if !defined(__GLIBC__) -+/* SIOCGSTAMPNS from linux/asm-generic.h -+ * for src/systemd/src/libsystemd-network/sd-lldp.c */ -+#include <linux/sockios.h> -+#endif -+ - #include "macro.h" - #include "missing_network.h" - #include "missing_socket.h" -diff --git a/shared/systemd/src/basic/sort-util.h b/shared/systemd/src/basic/sort-util.h -index a8984fc16..5fb90f8c5 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 -diff --git a/shared/systemd/src/basic/stdio-util.h b/shared/systemd/src/basic/stdio-util.h -index d45d3c1a6..fee1a57ca 100644 ---- a/shared/systemd/src/basic/stdio-util.h -+++ b/shared/systemd/src/basic/stdio-util.h -@@ -2,7 +2,9 @@ - #pragma once - - #if 0 /* NM_IGNORED */ -+#if defined(__GLIBC__) - #include <printf.h> -+#endif - #endif /* NM_IGNORED */ - #include <stdarg.h> - #include <stdio.h> -diff --git a/shared/systemd/src/basic/string-util.h b/shared/systemd/src/basic/string-util.h -index 593cf04ae..541c393f6 100644 ---- a/shared/systemd/src/basic/string-util.h -+++ b/shared/systemd/src/basic/string-util.h -@@ -26,6 +26,11 @@ - #define strcaseeq(a,b) (strcasecmp((a),(b)) == 0) - #define strncaseeq(a, b, n) (strncasecmp((a), (b), (n)) == 0) - -+/* musl does not know strndupa */ -+#if !defined(__GLIBC__) -+#define strndupa(x,s) strncpy(alloca(strlen(x)+1),x,s) -+#endif -+ - int strcmp_ptr(const char *a, const char *b) _pure_; - int strcasecmp_ptr(const char *a, const char *b) _pure_; - --- -2.20.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl-systemd-specific.patch b/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl-systemd-specific.patch deleted file mode 100644 index d83efd39e4..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager/musl/0002-Fix-build-with-musl-systemd-specific.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 7d9a11a17da425d106791ada7100d7a6559e6065 Mon Sep 17 00:00:00 2001 -From: Adrian Freihofer <adrian.freihofer@siemens.com> -Date: Sat, 7 Mar 2020 14:24:01 +0100 -Subject: [PATCH 2/2] Fix build with musl - systemd specific - ---- - src/core/systemd/src/libsystemd-network/sd-dhcp6-client.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/core/systemd/src/libsystemd-network/sd-dhcp6-client.c b/src/core/systemd/src/libsystemd-network/sd-dhcp6-client.c -index 3fafd3c0e..79d6096c2 100644 ---- a/src/core/systemd/src/libsystemd-network/sd-dhcp6-client.c -+++ b/src/core/systemd/src/libsystemd-network/sd-dhcp6-client.c -@@ -8,7 +8,9 @@ - #include <errno.h> - #include <sys/ioctl.h> - #if 0 /* NM_IGNORED */ -+#ifdef __GLIBC__ /* musl supplies full set of userspace headers */ - #include <linux/if_arp.h> -+#endif - #else /* NM_IGNORED */ - #include <net/if_arp.h> - #endif /* NM_IGNORED */ --- -2.20.1 - diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.30.2.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.30.2.bb deleted file mode 100644 index ec3bdd22bd..0000000000 --- a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.30.2.bb +++ /dev/null @@ -1,181 +0,0 @@ -SUMMARY = "NetworkManager" -HOMEPAGE = "https://wiki.gnome.org/Projects/NetworkManager" -SECTION = "net/misc" - -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c \ -" - -DEPENDS = " \ - intltool-native \ - libxslt-native \ - libnl \ - udev \ - util-linux \ - libndp \ - libnewt \ - curl \ -" - -inherit gnomebase gettext update-rc.d systemd vala gobject-introspection gtk-doc update-alternatives upstream-version-is-even - -SRC_URI = " \ - ${GNOME_MIRROR}/NetworkManager/${@gnome_verdir("${PV}")}/NetworkManager-${PV}.tar.xz \ - file://${BPN}.initd \ - file://0001-Fixed-configure.ac-Fix-pkgconfig-sysroot-locations.patch \ - file://0002-Do-not-create-settings-settings-property-documentati.patch \ - file://0003-install-firewalld-to-var-libdir-rather-than-hardcod-.patch \ -" -SRC_URI_append_libc-musl = " \ - file://musl/0001-Fix-build-with-musl-systemd-specific.patch \ - file://musl/0002-Fix-build-with-musl-systemd-specific.patch \ -" -SRC_URI[sha256sum] = "0c8e80e77877860e4a4e6ab4a0f7cdc1186e356b65b042a751897188b88944d2" - -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 \ - --with-dhclient=no \ - --with-dhcpcd=no \ - --with-dhcpcanon=no \ - --with-netconfig=no \ -" - -# 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 dnsmasq nmcli \ - ${@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)} \ -" - -inherit ${@bb.utils.contains('PACKAGECONFIG', 'nmcli', 'bash-completion', '', d)} - -PACKAGECONFIG[systemd] = " \ - --with-systemdsystemunitdir=${systemd_unitdir}/system --with-session-tracking=systemd, \ - --without-systemdsystemunitdir, \ -" -PACKAGECONFIG[polkit] = "--enable-polkit,--disable-polkit,polkit" -PACKAGECONFIG[bluez5] = "--enable-bluez5-dun,--disable-bluez5-dun,bluez5" -# consolekit is not picked by shlibs, so add it to RDEPENDS too -PACKAGECONFIG[consolekit] = "--with-session-tracking=consolekit,,consolekit,consolekit" -PACKAGECONFIG[modemmanager] = "--with-modem-manager-1=yes,--with-modem-manager-1=no,modemmanager" -PACKAGECONFIG[ppp] = "--enable-ppp,--disable-ppp,ppp,ppp" -PACKAGECONFIG[dnsmasq] = "--with-dnsmasq=${bindir}/dnsmasq" -PACKAGECONFIG[nss] = "--with-crypto=nss,,nss" -PACKAGECONFIG[resolvconf] = "--with-resolvconf=${base_sbindir}/resolvconf,,,resolvconf" -PACKAGECONFIG[gnutls] = "--with-crypto=gnutls,,gnutls" -PACKAGECONFIG[wifi] = "--with-wext=yes --enable-wifi=yes,--with-wext=no --enable-wifi=no,,wpa-supplicant" -PACKAGECONFIG[ifupdown] = "--enable-ifupdown,--disable-ifupdown" -PACKAGECONFIG[qt4-x11-free] = "--enable-qt,--disable-qt,qt4-x11-free" -PACKAGECONFIG[cloud-setup] = "--with-nm-cloud-setup=yes,--with-nm-cloud-setup=no" -PACKAGECONFIG[nmcli] = "--with-nmcli=yes,--with-nmcli=no,readline" -PACKAGECONFIG[ovs] = "--enable-ovs,--disable-ovs,jansson" - -PACKAGES =+ " \ - ${PN}-nmcli ${PN}-nmcli-doc \ - ${PN}-nmtui ${PN}-nmtui-doc \ - ${PN}-adsl ${PN}-cloud-setup \ -" - -SYSTEMD_PACKAGES = "${PN} ${PN}-cloud-setup" - -FILES_${PN}-adsl = "${libdir}/NetworkManager/${PV}/libnm-device-plugin-adsl.so" - -FILES_${PN}-cloud-setup = " \ - ${libexecdir}/nm-cloud-setup \ - ${systemd_system_unitdir}/nm-cloud-setup.service \ - ${systemd_system_unitdir}/nm-cloud-setup.timer \ - ${libdir}/NetworkManager/dispatcher.d/90-nm-cloud-setup.sh \ - ${libdir}/NetworkManager/dispatcher.d/no-wait.d/90-nm-cloud-setup.sh \ -" -ALLOW_EMPTY_${PN}-cloud-setup = "1" -SYSTEMD_SERVICE_${PN}-cloud-setup = "${@bb.utils.contains('PACKAGECONFIG', 'cloud-setup', 'nm-cloud-setup.service nm-cloud-setup.timer', '', d)}" - -FILES_${PN} += " \ - ${libexecdir} \ - ${libdir}/NetworkManager/${PV}/*.so \ - ${libdir}/NetworkManager \ - ${libdir}/firewalld/zones \ - ${nonarch_libdir}/NetworkManager/conf.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-down.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d/pre-up.d \ - ${nonarch_libdir}/NetworkManager/dispatcher.d/no-wait.d \ - ${nonarch_libdir}/NetworkManager/VPN \ - ${nonarch_libdir}/NetworkManager/system-connections \ - ${datadir}/polkit-1 \ - ${datadir}/dbus-1 \ - ${nonarch_base_libdir}/udev/* \ - ${systemd_system_unitdir} \ - ${libdir}/pppd \ -" - -RRECOMMENDS_${PN} += "iptables \ - ${@bb.utils.filter('PACKAGECONFIG', 'dnsmasq', d)} \ -" -RCONFLICTS_${PN} = "connman" - -FILES_${PN}-dev += " \ - ${datadir}/NetworkManager/gdb-cmd \ - ${libdir}/pppd/*/*.la \ - ${libdir}/NetworkManager/*.la \ - ${libdir}/NetworkManager/${PV}/*.la \ -" - -FILES_${PN}-nmcli = " \ - ${bindir}/nmcli \ -" - -FILES_${PN}-nmcli-doc = " \ - ${mandir}/man1/nmcli* \ -" - -FILES_${PN}-nmtui = " \ - ${bindir}/nmtui \ - ${bindir}/nmtui-edit \ - ${bindir}/nmtui-connect \ - ${bindir}/nmtui-hostname \ -" - -FILES_${PN}-nmtui-doc = " \ - ${mandir}/man1/nmtui* \ -" - -INITSCRIPT_NAME = "network-manager" -SYSTEMD_SERVICE_${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'NetworkManager.service NetworkManager-dispatcher.service', '', d)}" - -ALTERNATIVE_PRIORITY = "100" -ALTERNATIVE_${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" -ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.NetworkManager','',d)}" -ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" - -do_install_append() { - install -Dm 0755 ${WORKDIR}/${BPN}.initd ${D}${sysconfdir}/init.d/network-manager - - rm -rf ${D}/run ${D}${localstatedir}/run - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - # For read-only filesystem, do not create links during bootup - ln -sf ../run/NetworkManager/resolv.conf ${D}${sysconfdir}/resolv-conf.NetworkManager - - # systemd v210 and newer do not need this rule file - rm ${D}/${nonarch_base_libdir}/udev/rules.d/84-nm-drivers.rules - fi -} diff --git a/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb new file mode 100644 index 0000000000..a9b9233b7e --- /dev/null +++ b/meta-networking/recipes-connectivity/networkmanager/networkmanager_1.48.10.bb @@ -0,0 +1,326 @@ +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 = " \ + glib-2.0 \ + 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 \ + file://0001-libnm-systemd-core-Disable-sd_dhcp6_client_set_duid_.patch \ +" +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] = "5dc188fdffcf2d23c89d34b1e6319a6b20203e12eaec24b30037b7ea8ac8c613" + +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_configure:prepend() { + cp -f ${STAGING_LIBDIR}/girepository-1.0/GLib*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ + cp -f ${STAGING_LIBDIR}/girepository-1.0/GObject*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ + cp -f ${STAGING_LIBDIR}/girepository-1.0/Gio*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ + cp -f ${STAGING_LIBDIR}/girepository-1.0/GModule*typelib ${STAGING_LIBDIR_NATIVE}/girepository-1.0/ +} + +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" +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 ${UNPACKDIR}/${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 ${UNPACKDIR}/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 ${UNPACKDIR}/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.10.bb b/meta-networking/recipes-connectivity/openconnect/openconnect_9.12.bb index a486cf0e05..7d0e5f2052 100644 --- a/meta-networking/recipes-connectivity/openconnect/openconnect_8.10.bb +++ b/meta-networking/recipes-connectivity/openconnect/openconnect_9.12.bb @@ -1,14 +1,15 @@ SUMMARY = "Open client for Cisco AnyConnect VPN" -LICENSE = "LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=243b725d71bb5df4a1e5920b344b86ad" +LICENSE = "LGPL-2.1-only" +LIC_FILES_CHKSUM = "file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c" SRC_URI = " \ - git://git.infradead.org/users/dwmw2/openconnect.git \ + git://git.infradead.org/users/dwmw2/openconnect.git;branch=master \ + file://0001-Shim-for-renaming-of-GNUTLS_NO_EXTENSIONS-in-GnuTLS-.patch \ " -SRCREV = "9d287e40c57233190a51b6434ba7345370e36f38" +SRCREV = "59f2e59eb3e436364ef82e630e5a2f88f32acd58" DEPENDS = "vpnc libxml2 krb5 gettext-native" -RDEPENDS_${PN} = "bash python3-core vpnc-script" +RDEPENDS:${PN} = "bash python3-core vpnc-script" PACKAGECONFIG ??= "gnutls lz4 libproxy" @@ -27,6 +28,6 @@ inherit autotools pkgconfig bash-completion EXTRA_OECONF += "--with-vpnc-script=${sysconfdir}/vpnc/vpnc-script \ --disable-static" -do_install_append() { +do_install:append() { rm ${D}/usr/libexec/openconnect/hipreport-android.sh } diff --git a/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.bb b/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.bb new file mode 100644 index 0000000000..b69a7e2355 --- /dev/null +++ b/meta-networking/recipes-connectivity/openfortivpn/openfortivpn_1.22.1.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 = "388fa98f639ef91733461de50b06dd57f1ffb099" + +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..ec930de275 --- /dev/null +++ b/meta-networking/recipes-connectivity/openthread/ot-br-posix_git.bb @@ -0,0 +1,73 @@ +# 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" + +LDFLAGS:append:riscv32 = " -latomic" + +EXTRA_OECMAKE = "-DBUILD_TESTING=OFF \ + -DOTBR_DBUS=ON \ + -DOTBR_REST=ON \ + -DOTBR_WEB=OFF \ + -DCMAKE_LIBRARY_PATH=${libdir} \ + -DOT_POSIX_PRODUCT_CONFIG=${sysconfdir}/openthread.conf.example \ + -DOT_POSIX_FACTORY_CONFIG=${sysconfdir}/openthread.conf.example \ + -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}/*" + +# http://errors.yoctoproject.org/Errors/Details/766903/ +# git/third_party/openthread/repo/src/core/border_router/routing_manager.hpp:615:11: error: 'ot::BorderRouter::RoutingManager::DiscoveredPrefixTable' declared with greater visibility than the type of its field 'ot::BorderRouter::RoutingManager::DiscoveredPrefixTable::mEntryTimer' [-Werror=attributes] +CXXFLAGS += "-Wno-error=attributes" 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/python3-networkmanager_2.2.bb b/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.2.bb index d447231fc5..60cf3c2525 100644 --- a/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.2.bb +++ b/meta-networking/recipes-connectivity/python-networkmanager/python3-networkmanager_2.2.bb @@ -10,4 +10,4 @@ SRC_URI[sha256sum] = "de6eb921d94aba7549f428ed2b3aa482a5d543ecb6965cbaa0fbb555ab PYPI_PACKAGE = "python-networkmanager" inherit pypi setuptools3 -RDEPENDS_${PN} = "networkmanager python3-dbus python3-six" +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.bb b/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb index 37b3eebe4b..e6d99431be 100644 --- a/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb +++ b/meta-networking/recipes-connectivity/rdist/rdist_6.1.5.bb @@ -38,7 +38,7 @@ DEPENDS = "bison-native" inherit autotools-brokensep -EXTRA_OEMAKE = "BIN_GROUP=root MAN_GROUP=root RDIST_MODE=755 RDISTD_MODE=755 MAN_MODE=644" +EXTRA_OEMAKE = "CPPFLAGS='${CFLAGS}' 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 ebe64cb1b5..871df69909 100644 --- a/meta-networking/recipes-connectivity/relayd/relayd_git.bb +++ b/meta-networking/recipes-connectivity/relayd/relayd_git.bb @@ -1,19 +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 = "f4d759be54ceb37714e9a6ca320d5b50c95e9ce9" -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-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch b/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch deleted file mode 100644 index 2dbabdaa47..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch +++ /dev/null @@ -1,96 +0,0 @@ -From 9aba5ac17bb822f91f6b214f5b82dd1eb8c47616 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 22 Jul 2020 22:42:09 -0700 -Subject: [PATCH] nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h - -glibc 2.32 will define these varibles [1] which results in conflicts -with these static function names, therefore prefix these function names -with samba_ to avoid it - -[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d - -Upstream-Status: Submitted [https://gitlab.com/samba-team/samba/-/merge_requests/1477] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - nsswitch/nsstest.c | 16 ++++++++-------- - 1 file changed, 8 insertions(+), 8 deletions(-) - -diff --git a/nsswitch/nsstest.c b/nsswitch/nsstest.c -index 6d92806..46f9679 100644 ---- a/nsswitch/nsstest.c -+++ b/nsswitch/nsstest.c -@@ -137,7 +137,7 @@ static struct passwd *nss_getpwuid(uid_t uid) - return &pwd; - } - --static void nss_setpwent(void) -+static void samba_nss_setpwent(void) - { - NSS_STATUS (*_nss_setpwent)(void) = - (NSS_STATUS(*)(void))find_fn("setpwent"); -@@ -152,7 +152,7 @@ static void nss_setpwent(void) - } - } - --static void nss_endpwent(void) -+static void samba_nss_endpwent(void) - { - NSS_STATUS (*_nss_endpwent)(void) = - (NSS_STATUS (*)(void))find_fn("endpwent"); -@@ -284,7 +284,7 @@ again: - return &grp; - } - --static void nss_setgrent(void) -+static void samba_nss_setgrent(void) - { - NSS_STATUS (*_nss_setgrent)(void) = - (NSS_STATUS (*)(void))find_fn("setgrent"); -@@ -299,7 +299,7 @@ static void nss_setgrent(void) - } - } - --static void nss_endgrent(void) -+static void samba_nss_endgrent(void) - { - NSS_STATUS (*_nss_endgrent)(void) = - (NSS_STATUS (*)(void))find_fn("endgrent"); -@@ -396,7 +396,7 @@ static void nss_test_users(void) - { - struct passwd *pwd; - -- nss_setpwent(); -+ samba_nss_setpwent(); - /* loop over all users */ - while ((pwd = nss_getpwent())) { - printf("Testing user %s\n", pwd->pw_name); -@@ -418,14 +418,14 @@ static void nss_test_users(void) - printf("initgroups: "); nss_test_initgroups(pwd->pw_name, pwd->pw_gid); - printf("\n"); - } -- nss_endpwent(); -+ samba_nss_endpwent(); - } - - static void nss_test_groups(void) - { - struct group *grp; - -- nss_setgrent(); -+ samba_nss_setgrent(); - /* loop over all groups */ - while ((grp = nss_getgrent())) { - printf("Testing group %s\n", grp->gr_name); -@@ -446,7 +446,7 @@ static void nss_test_groups(void) - printf("getgrgid: "); print_group(grp); - printf("\n"); - } -- nss_endgrent(); -+ samba_nss_endgrent(); - } - - static void nss_test_errors(void) --- -2.27.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/0001-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 index 80cdd3955f..c72bd133ee 100644 --- a/meta-networking/recipes-connectivity/samba/samba/0001-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 @@ -1,22 +1,25 @@ -From 1e8d31c138395122df4cc2a3e0edd6cd3fad736c Mon Sep 17 00:00:00 2001 +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/crypto/wscript_configure | 2 +- - lib/replace/wscript | 29 +++++++++++++++-------------- - lib/texpect/wscript | 7 ++++++- - 4 files changed, 29 insertions(+), 16 deletions(-) + 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 7b8fb01..a8e4b0a 100644 +index 30cb366..d167551 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript -@@ -88,6 +88,13 @@ def options(opt): +@@ -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) @@ -30,24 +33,11 @@ index 7b8fb01..a8e4b0a 100644 gr = opt.option_group('developer options') gr.add_option('-C', -diff --git a/lib/crypto/wscript_configure b/lib/crypto/wscript_configure -index 09dfe04..e871718 100644 ---- a/lib/crypto/wscript_configure -+++ b/lib/crypto/wscript_configure -@@ -2,7 +2,7 @@ - from waflib import Options - from waflib import Errors, Logs - --if not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', -+if not Options.options.enable_libbsd or not conf.CHECK_FUNCS_IN('MD5Init', 'bsd', headers='bsd/md5.h', - checklibc=True): - conf.CHECK_FUNCS_IN('MD5Init', 'md5', headers='sys/md5.h', - checklibc=True) diff --git a/lib/replace/wscript b/lib/replace/wscript -index 0020d2a..cd9228f 100644 +index 9dd9b48..a22ae59 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript -@@ -407,20 +407,21 @@ def configure(conf): +@@ -444,20 +444,21 @@ def configure(conf): strlcpy_in_bsd = False @@ -84,13 +74,14 @@ index 0020d2a..cd9228f 100644 conf.CHECK_CODE(''' struct ucred cred; diff --git a/lib/texpect/wscript b/lib/texpect/wscript -index e14c048..a91de59 100644 +index 44f92a8..79e8d09 100644 --- a/lib/texpect/wscript +++ b/lib/texpect/wscript -@@ -1,7 +1,12 @@ +@@ -1,7 +1,13 @@ #!/usr/bin/env python -+from waflib import Options ++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' @@ -100,4 +91,7 @@ index e14c048..a91de59 100644 + conf.CHECK_FUNCS_IN('openpty', 'util', checklibc=True, headers=hdrs) def build(bld): - bld.SAMBA_BINARY('texpect', 'texpect.c', deps='popt util replace', install=False) + 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/CVE-2020-14318.patch b/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14318.patch deleted file mode 100644 index ff1225db07..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14318.patch +++ /dev/null @@ -1,142 +0,0 @@ -From ccf53dfdcd39f3526dbc2f20e1245674155380ff Mon Sep 17 00:00:00 2001 -From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> -Date: Fri, 11 Dec 2020 11:32:44 +0900 -Subject: [PATCH] s4: torture: Add smb2.notify.handle-permissions test. - -s3: smbd: Ensure change notifies can't get set unless the - directory handle is open for SEC_DIR_LIST. - -CVE-2020-14318 - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434 - -Signed-off-by: Jeremy Allison <jra@samba.org> - -Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> ---- - source3/smbd/notify.c | 8 ++++ - source4/torture/smb2/notify.c | 82 ++++++++++++++++++++++++++++++++++- - 2 files changed, 89 insertions(+), 1 deletion(-) - -diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c -index 44c0b09..d23c03b 100644 ---- a/source3/smbd/notify.c -+++ b/source3/smbd/notify.c -@@ -283,6 +283,14 @@ NTSTATUS change_notify_create(struct files_struct *fsp, uint32_t filter, - char fullpath[len+1]; - NTSTATUS status = NT_STATUS_NOT_IMPLEMENTED; - -+ /* -+ * Setting a changenotify needs READ/LIST access -+ * on the directory handle. -+ */ -+ if (!(fsp->access_mask & SEC_DIR_LIST)) { -+ return NT_STATUS_ACCESS_DENIED; -+ } -+ - if (fsp->notify != NULL) { - DEBUG(1, ("change_notify_create: fsp->notify != NULL, " - "fname = %s\n", fsp->fsp_name->base_name)); -diff --git a/source4/torture/smb2/notify.c b/source4/torture/smb2/notify.c -index ebb4f8a..a5c9b94 100644 ---- a/source4/torture/smb2/notify.c -+++ b/source4/torture/smb2/notify.c -@@ -2569,6 +2569,83 @@ done: - return ok; - } - -+/* -+ Test asking for a change notify on a handle without permissions. -+*/ -+ -+#define BASEDIR_HPERM BASEDIR "_HPERM" -+ -+static bool torture_smb2_notify_handle_permissions( -+ struct torture_context *torture, -+ struct smb2_tree *tree) -+{ -+ bool ret = true; -+ NTSTATUS status; -+ union smb_notify notify; -+ union smb_open io; -+ struct smb2_handle h1 = {{0}}; -+ struct smb2_request *req; -+ -+ smb2_deltree(tree, BASEDIR_HPERM); -+ smb2_util_rmdir(tree, BASEDIR_HPERM); -+ -+ torture_comment(torture, -+ "TESTING CHANGE NOTIFY " -+ "ON A HANDLE WITHOUT PERMISSIONS\n"); -+ -+ /* -+ get a handle on the directory -+ */ -+ ZERO_STRUCT(io.smb2); -+ io.generic.level = RAW_OPEN_SMB2; -+ io.smb2.in.create_flags = 0; -+ io.smb2.in.desired_access = SEC_FILE_READ_ATTRIBUTE; -+ io.smb2.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; -+ io.smb2.in.file_attributes = FILE_ATTRIBUTE_NORMAL; -+ io.smb2.in.share_access = NTCREATEX_SHARE_ACCESS_READ | -+ NTCREATEX_SHARE_ACCESS_WRITE; -+ io.smb2.in.alloc_size = 0; -+ io.smb2.in.create_disposition = NTCREATEX_DISP_CREATE; -+ io.smb2.in.impersonation_level = SMB2_IMPERSONATION_ANONYMOUS; -+ io.smb2.in.security_flags = 0; -+ io.smb2.in.fname = BASEDIR_HPERM; -+ -+ status = smb2_create(tree, torture, &io.smb2); -+ CHECK_STATUS(status, NT_STATUS_OK); -+ h1 = io.smb2.out.file.handle; -+ -+ /* ask for a change notify, -+ on file or directory name changes */ -+ ZERO_STRUCT(notify.smb2); -+ notify.smb2.level = RAW_NOTIFY_SMB2; -+ notify.smb2.in.buffer_size = 1000; -+ notify.smb2.in.completion_filter = FILE_NOTIFY_CHANGE_NAME; -+ notify.smb2.in.file.handle = h1; -+ notify.smb2.in.recursive = true; -+ -+ req = smb2_notify_send(tree, ¬ify.smb2); -+ torture_assert_goto(torture, -+ req != NULL, -+ ret, -+ done, -+ "smb2_notify_send failed\n"); -+ -+ /* -+ * Cancel it, we don't really want to wait. -+ */ -+ smb2_cancel(req); -+ status = smb2_notify_recv(req, torture, ¬ify.smb2); -+ /* Handle h1 doesn't have permissions for ChangeNotify. */ -+ CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED); -+ -+done: -+ if (!smb2_util_handle_empty(h1)) { -+ smb2_util_close(tree, h1); -+ } -+ smb2_deltree(tree, BASEDIR_HPERM); -+ return ret; -+} -+ - /* - basic testing of SMB2 change notify - */ -@@ -2602,7 +2679,10 @@ struct torture_suite *torture_smb2_notify_init(TALLOC_CTX *ctx) - torture_smb2_notify_rmdir3); - torture_suite_add_2smb2_test(suite, "rmdir4", - torture_smb2_notify_rmdir4); -- -+ torture_suite_add_1smb2_test(suite, -+ "handle-permissions", -+ torture_smb2_notify_handle_permissions); -+ - suite->description = talloc_strdup(suite, "SMB2-NOTIFY tests"); - - return suite; --- -2.25.1 - diff --git a/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch b/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch deleted file mode 100644 index 3341b80a38..0000000000 --- a/meta-networking/recipes-connectivity/samba/samba/CVE-2020-14383.patch +++ /dev/null @@ -1,112 +0,0 @@ -From ff17443fe761eda864d13957bec45f5bac478fe3 Mon Sep 17 00:00:00 2001 -From: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> -Date: Fri, 11 Dec 2020 14:34:31 +0900 -Subject: [PATCH] CVE-2020-14383: s4/dns: Ensure variable initialization with - NULL. do not crash when additional data not found -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Found by Francis Brosnan Blázquez <francis@aspl.es>. -Based on patches from Francis Brosnan Blázquez <francis@aspl.es> -and Jeremy Allison <jra@samba.org> - -BUG: https://bugzilla.samba.org/show_bug.cgi?id=14472 -BUG: https://bugzilla.samba.org/show_bug.cgi?id=12795 - -Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> -Reviewed-by: Jeremy Allison <jra@samba.org> - -Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> -Autobuild-Date(master): Mon Aug 24 00:21:41 UTC 2020 on sn-devel-184 - -(based on commit df98e7db04c901259dd089e20cd557bdbdeaf379) -(based on commit 7afe449e7201be92bed8e53cbb37b74af720ef4e - -Signed-off-by: Zheng Ruoqin <zhengrq.fnst@cn.fujitsu.com> ---- - .../rpc_server/dnsserver/dcerpc_dnsserver.c | 31 ++++++++++--------- - 1 file changed, 17 insertions(+), 14 deletions(-) - -diff --git a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c -index 910de9a1..618c7096 100644 ---- a/source4/rpc_server/dnsserver/dcerpc_dnsserver.c -+++ b/source4/rpc_server/dnsserver/dcerpc_dnsserver.c -@@ -1754,15 +1754,17 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, - TALLOC_CTX *tmp_ctx; - char *name; - const char * const attrs[] = { "name", "dnsRecord", NULL }; -- struct ldb_result *res; -- struct DNS_RPC_RECORDS_ARRAY *recs; -+ struct ldb_result *res = NULL; -+ struct DNS_RPC_RECORDS_ARRAY *recs = NULL; - char **add_names = NULL; -- char *rname; -+ char *rname = NULL; - const char *preference_name = NULL; - int add_count = 0; - int i, ret, len; - WERROR status; -- struct dns_tree *tree, *base, *node; -+ struct dns_tree *tree = NULL; -+ struct dns_tree *base = NULL; -+ struct dns_tree *node = NULL; - - tmp_ctx = talloc_new(mem_ctx); - W_ERROR_HAVE_NO_MEMORY(tmp_ctx); -@@ -1845,15 +1847,15 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, - } - } - -- talloc_free(res); -- talloc_free(tree); -- talloc_free(name); -+ TALLOC_FREE(res); -+ TALLOC_FREE(tree); -+ TALLOC_FREE(name); - - /* Add any additional records */ - if (select_flag & DNS_RPC_VIEW_ADDITIONAL_DATA) { - for (i=0; i<add_count; i++) { -- struct dnsserver_zone *z2; -- -+ struct dnsserver_zone *z2 = NULL; -+ struct ldb_message *msg = NULL; - /* Search all the available zones for additional name */ - for (z2 = dsstate->zones; z2; z2 = z2->next) { - char *encoded_name; -@@ -1865,14 +1867,15 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, - LDB_SCOPE_ONELEVEL, attrs, - "(&(objectClass=dnsNode)(name=%s)(!(dNSTombstoned=TRUE)))", - encoded_name); -- talloc_free(name); -+ TALLOC_FREE(name); - if (ret != LDB_SUCCESS) { - continue; - } - if (res->count == 1) { -+ msg = res->msgs[0]; - break; - } else { -- talloc_free(res); -+ TALLOC_FREE(res); - continue; - } - } -@@ -1885,10 +1888,10 @@ static WERROR dnsserver_enumerate_records(struct dnsserver_state *dsstate, - } - status = dns_fill_records_array(tmp_ctx, NULL, DNS_TYPE_A, - select_flag, rname, -- res->msgs[0], 0, recs, -+ msg, 0, recs, - NULL, NULL); -- talloc_free(rname); -- talloc_free(res); -+ TALLOC_FREE(rname); -+ TALLOC_FREE(res); - } - } - --- -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 d6bde417fb..588491ee68 100644 --- a/meta-networking/recipes-connectivity/samba/samba/smb.conf +++ b/meta-networking/recipes-connectivity/samba/samba/smb.conf @@ -32,17 +32,6 @@ # 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 @@ -68,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 @@ -94,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 @@ -123,8 +103,8 @@ ########## 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 # @@ -172,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.18.bb b/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb index 166bf57279..09d5608df0 100644 --- a/meta-networking/recipes-connectivity/samba/samba_4.10.18.bb +++ b/meta-networking/recipes-connectivity/samba/samba_4.19.8.bb @@ -1,7 +1,7 @@ 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-or-later;md5=c51d3eef3be114124d11349ca0d7e117 \ file://${COREBASE}/meta/files/common-licenses/GPL-2.0-or-later;md5=fed54355545ffd980b814dab4a3b312c" @@ -12,75 +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-Add-options-to-configure-the-use-of-libbsd.patch \ - file://0001-nsswitch-nsstest.c-Avoid-nss-function-conflicts-with.patch \ - file://CVE-2020-14318.patch \ - file://CVE-2020-14383.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[sha256sum] = "1aeff76c207f383477ce4badebd154691c408d2e15b01b333c85eb775468ddf6" + +UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.19(\.\d+)+).tar.gz" -SRC_URI[md5sum] = "f006a3d1876113e4a049015969d20fe6" -SRC_URI[sha256sum] = "7dcfc2aaaac565b959068788e6a43fc79ce2a03e7d523f5843f7a9fddffc7c2c" +inherit systemd waf-samba cpan-base perlnative update-rc.d perl-version pkgconfig -UPSTREAM_CHECK_REGEX = "samba\-(?P<pver>4\.10(\.\d+)+).tar.gz" +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 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 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" @@ -89,26 +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," -PACKAGECONFIG[libbsd] = "--with-libbsd, --without-libbsd, libbsd" - -# Building the AD (Active Directory) DC (Domain Controller) requires GnuTLS, -# And ad-dc doesn't work with mitkrb5 for versions prior to 4.7.0 according to: -# 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" @@ -120,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)} \ @@ -136,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 @@ -175,18 +173,18 @@ do_install_append() { install -d ${D}${sysconfdir}/samba echo "127.0.0.1 localhost" > ${D}${sysconfdir}/samba/lmhosts - install -m644 ${WORKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf - install -D -m 644 ${WORKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba + install -m644 ${UNPACKDIR}/smb.conf ${D}${sysconfdir}/samba/smb.conf + install -D -m 644 ${UNPACKDIR}/volatiles.03_samba ${D}${sysconfdir}/default/volatiles/03_samba install -d ${D}${sysconfdir}/default 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 @@ -196,8 +194,8 @@ do_install_append() { chmod 0750 ${D}${sysconfdir}/sudoers.d || true rm -rf ${D}/run ${D}${localstatedir}/run ${D}${localstatedir}/log - - for f in samba-gpupdate samba_upgradedns samba_spnupdate samba_kcc samba_dnsupdate; do + + 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 @@ -205,89 +203,107 @@ do_install_append() { 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 \ @@ -297,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 \ @@ -308,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/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..626f412731 --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort3/0001-cmake-Pass-noline-flag-to-flex.patch @@ -0,0 +1,32 @@ +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.3.4.0.bb b/meta-networking/recipes-connectivity/snort/snort3_3.3.4.0.bb new file mode 100644 index 0000000000..0f3d0e986f --- /dev/null +++ b/meta-networking/recipes-connectivity/snort/snort3_3.3.4.0.bb @@ -0,0 +1,39 @@ +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 = "5598e8dd87829cb1bbb478a7b6d4f6fb8b5dabfe" + +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.17.1.bb b/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb index 9c20be537c..9bc14fc56f 100644 --- a/meta-networking/recipes-connectivity/snort/snort_2.9.17.1.bb +++ b/meta-networking/recipes-connectivity/snort/snort_2.9.20.bb @@ -1,29 +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 \ " -SRC_URI[sha256sum] = "303d3d5dc5affecfeaad3a331d3163f901d48d960fdd6598cb55c6d1591eed82" +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 \ @@ -50,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 @@ -69,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 ${UNPACKDIR}/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 ${UNPACKDIR}/snort.service ${D}/${systemd_system_unitdir} + # Install default environment file + install -d ${D}/${sysconfdir}/default + install -m 0644 ${UNPACKDIR}/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 + install -m 0644 ${UNPACKDIR}/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..f36435c8ea --- /dev/null +++ b/meta-networking/recipes-connectivity/tayga/tayga_0.9.2.bb @@ -0,0 +1,24 @@ +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" + +EXTRA_OEMAKE += "CFLAGS='${CFLAGS}'" + +do_install:append() { + install -m 0644 ${UNPACKDIR}/tayga.conf ${D}${sysconfdir}/tayga.conf + install -d ${D}${systemd_unitdir}/system/ + install -m 0644 ${UNPACKDIR}/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.36.1.bb index 42fc262589..c479eefba0 100644 --- a/meta-networking/recipes-connectivity/ufw/ufw_0.33.bb +++ b/meta-networking/recipes-connectivity/ufw/ufw_0.36.1.bb @@ -1,37 +1,32 @@ + 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" +LICENSE = "GPL-3.0-only" 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 \ +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-lp1044361.patch \ - file://0003-fix-typeerror-on-error.patch \ - file://0004-lp1039729.patch \ - file://0005-lp1191197.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" -SRC_URI[md5sum] = "3747b453d76709e5a99da209fc0bb5f5" -SRC_URI[sha256sum] = "5f85a8084ad3539b547bec097286948233188c971f498890316dec170bdd1da8" - -inherit setuptools3 features_check +inherit setuptools3_legacy features_check systemd update-rc.d -RDEPENDS_${PN} = " \ +RDEPENDS:${PN} = " \ iptables \ python3 \ python3-modules \ " -RRECOMMENDS_${PN} = " \ +RRECOMMENDS:${PN} = " \ kernel-module-ipv6 \ kernel-module-nf-conntrack-ipv6 \ kernel-module-nf-log-common \ @@ -43,17 +38,37 @@ RRECOMMENDS_${PN} = " \ 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} += " \ +FILES:${PN} += " \ ${sbindir}/* \ ${datadir}/ufw/* \ - /lib/ufw/* \ + ${nonarch_base_libdir}/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" +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 54e855a099..5876b58273 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 \ @@ -36,17 +35,17 @@ 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} + cp ${UNPACKDIR}/long-help ${S} } do_install () { sed -i s:m600:m\ 600:g Makefile oe_runmake 'DESTDIR=${D}' 'PREFIX=/usr' install rm -f ${D}${sysconfdir}/vpnc/vpnc.conf #This file is useless - install ${WORKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf + install ${UNPACKDIR}/default.conf ${D}${sysconfdir}/vpnc/default.conf } SYSROOT_PREPROCESS_FUNCS += "vpnc_sysroot_preprocess" @@ -56,8 +55,8 @@ vpnc_sysroot_preprocess () { install -m 755 ${D}${sysconfdir}/vpnc/vpnc-script ${SYSROOT_DESTDIR}${sysconfdir}/vpnc } -FILES_${PN}-script = "${sysconfdir}/vpnc/vpnc-script" +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" +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.7.0.bb b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb index 83406f5077..009434d96a 100644 --- a/meta-networking/recipes-connectivity/wolfssl/wolfssl_4.7.0.bb +++ b/meta-networking/recipes-connectivity/wolfssl/wolfssl_5.7.2.bb @@ -6,17 +6,20 @@ 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 = "00e42151ca061463ba6a95adb2290f678cbca472" -SRC_URI = "git://github.com/wolfSSL/wolfssl.git;protocol=https \ -" -SRCREV = "830de9a9fb99e30f9ac9caa0a7f7bba29c3b4863" S = "${WORKDIR}/git" inherit autotools +PACKAGECONFIG ?= "reproducible-build" + +PACKAGECONFIG[reproducible-build] = "--enable-reproducible-build,--disable-reproducible-build," BBCLASSEXTEND += "native nativesdk" |