diff options
Diffstat (limited to 'meta/recipes-connectivity')
135 files changed, 3294 insertions, 3576 deletions
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.15.1.bb b/meta/recipes-connectivity/avahi/avahi-libnss-mdns_0.15.1.bb index e455a60bd5..d45c06357d 100644 --- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.15.1.bb +++ b/meta/recipes-connectivity/avahi/avahi-libnss-mdns_0.15.1.bb | |||
@@ -3,18 +3,16 @@ HOMEPAGE = "https://github.com/lathiat/nss-mdns" | |||
3 | DESCRIPTION = "nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous, aka Apple Bonjour), effectively allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local." | 3 | DESCRIPTION = "nss-mdns is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution via Multicast DNS (aka Zeroconf, aka Apple Rendezvous, aka Apple Bonjour), effectively allowing name resolution by common Unix/Linux programs in the ad-hoc mDNS domain .local." |
4 | SECTION = "libs" | 4 | SECTION = "libs" |
5 | 5 | ||
6 | LICENSE = "LGPLv2.1+" | 6 | LICENSE = "LGPL-2.1-or-later" |
7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" | 7 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1" |
8 | 8 | ||
9 | DEPENDS = "avahi" | 9 | DEPENDS = "avahi" |
10 | 10 | ||
11 | SRC_URI = "git://github.com/lathiat/nss-mdns \ | 11 | SRC_URI = "git://github.com/lathiat/nss-mdns;branch=master;protocol=https \ |
12 | " | 12 | " |
13 | 13 | ||
14 | SRCREV = "4b3cfe818bf72d99a02b8ca8b8813cb2d6b40633" | 14 | SRCREV = "4b3cfe818bf72d99a02b8ca8b8813cb2d6b40633" |
15 | 15 | ||
16 | S = "${WORKDIR}/git" | ||
17 | |||
18 | inherit autotools pkgconfig | 16 | inherit autotools pkgconfig |
19 | 17 | ||
20 | COMPATIBLE_HOST:libc-musl = 'null' | 18 | COMPATIBLE_HOST:libc-musl = 'null' |
@@ -22,6 +20,7 @@ COMPATIBLE_HOST:libc-musl = 'null' | |||
22 | EXTRA_OECONF = "--libdir=${base_libdir}" | 20 | EXTRA_OECONF = "--libdir=${base_libdir}" |
23 | 21 | ||
24 | RDEPENDS:${PN} = "avahi-daemon" | 22 | RDEPENDS:${PN} = "avahi-daemon" |
23 | RPROVIDES:${PN} = "libnss-mdns" | ||
25 | 24 | ||
26 | pkg_postinst:${PN} () { | 25 | pkg_postinst:${PN} () { |
27 | sed ' | 26 | sed ' |
diff --git a/meta/recipes-connectivity/avahi/avahi_0.8.bb b/meta/recipes-connectivity/avahi/avahi_0.8.bb index 4b15d11b61..220160a7e1 100644 --- a/meta/recipes-connectivity/avahi/avahi_0.8.bb +++ b/meta/recipes-connectivity/avahi/avahi_0.8.bb | |||
@@ -5,37 +5,44 @@ with no specific configuration. This tool implements IPv4LL, "Dynamic Configurat | |||
5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ | 5 | IPv4 Link-Local Addresses" (IETF RFC3927), a protocol for automatic IP address \ |
6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ | 6 | configuration from the link-local 169.254.0.0/16 range without the need for a central \ |
7 | server.' | 7 | server.' |
8 | AUTHOR = "Lennart Poettering <lennart@poettering.net>" | ||
9 | HOMEPAGE = "http://avahi.org" | 8 | HOMEPAGE = "http://avahi.org" |
10 | BUGTRACKER = "https://github.com/lathiat/avahi/issues" | 9 | BUGTRACKER = "https://github.com/avahi/avahi/issues" |
11 | SECTION = "network" | 10 | SECTION = "network" |
12 | 11 | ||
13 | # major part is under LGPLv2.1+, but several .dtd, .xsl, initscripts and | 12 | # major part is under LGPL-2.1-or-later, but several .dtd, .xsl, initscripts and |
14 | # python scripts are under GPLv2+ | 13 | # python scripts are under GPL-2.0-or-later |
15 | LICENSE = "GPLv2+ & LGPLv2.1+" | 14 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" |
16 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ | 15 | LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1 \ |
17 | file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \ | 16 | file://avahi-common/address.h;endline=25;md5=b1d1d2cda1c07eb848ea7d6215712d9d \ |
18 | file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \ | 17 | file://avahi-core/dns.h;endline=23;md5=6fe82590b81aa0ddea5095b548e2fdcb \ |
19 | file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \ | 18 | file://avahi-daemon/main.c;endline=21;md5=9ee77368c5407af77caaef1b07285969 \ |
20 | file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf" | 19 | file://avahi-client/client.h;endline=23;md5=f4ac741a25c4f434039ba3e18c8674cf" |
21 | 20 | ||
22 | SRC_URI = "https://github.com/lathiat/avahi/releases/download/v${PV}/avahi-${PV}.tar.gz \ | 21 | SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/avahi-${PV}.tar.gz \ |
23 | file://00avahi-autoipd \ | 22 | file://00avahi-autoipd \ |
24 | file://99avahi-autoipd \ | 23 | file://99avahi-autoipd \ |
25 | file://initscript.patch \ | 24 | file://initscript.patch \ |
26 | file://0001-Fix-opening-etc-resolv.conf-error.patch \ | 25 | file://0001-Fix-opening-etc-resolv.conf-error.patch \ |
27 | file://handle-hup.patch \ | 26 | file://handle-hup.patch \ |
28 | file://local-ping.patch \ | 27 | file://local-ping.patch \ |
28 | file://invalid-service.patch \ | ||
29 | file://CVE-2023-1981.patch \ | ||
30 | file://CVE-2023-38469-1.patch \ | ||
31 | file://CVE-2023-38469-2.patch \ | ||
32 | file://CVE-2023-38470-1.patch \ | ||
33 | file://CVE-2023-38470-2.patch \ | ||
34 | file://CVE-2023-38471-1.patch \ | ||
35 | file://CVE-2023-38471-2.patch \ | ||
36 | file://CVE-2023-38472.patch \ | ||
37 | file://CVE-2023-38473.patch \ | ||
29 | " | 38 | " |
30 | 39 | ||
31 | UPSTREAM_CHECK_URI = "https://github.com/lathiat/avahi/releases/" | 40 | GITHUB_BASE_URI = "https://github.com/avahi/avahi/releases/" |
32 | SRC_URI[md5sum] = "229c6aa30674fc43c202b22c5f8c2be7" | ||
33 | SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda" | 41 | SRC_URI[sha256sum] = "060309d7a333d38d951bc27598c677af1796934dbd98e1024e7ad8de798fedda" |
34 | 42 | ||
35 | # Issue only affects Debian/SUSE, not us | 43 | CVE_STATUS[CVE-2021-26720] = "not-applicable-platform: Issue only affects Debian/SUSE" |
36 | CVE_CHECK_WHITELIST += "CVE-2021-26720" | ||
37 | 44 | ||
38 | DEPENDS = "expat libcap libdaemon glib-2.0" | 45 | DEPENDS = "expat libcap libdaemon glib-2.0 glib-2.0-native" |
39 | 46 | ||
40 | # For gtk related PACKAGECONFIGs: gtk, gtk3 | 47 | # For gtk related PACKAGECONFIGs: gtk, gtk3 |
41 | AVAHI_GTK ?= "" | 48 | AVAHI_GTK ?= "" |
@@ -48,7 +55,7 @@ PACKAGECONFIG[libdns_sd] = "--enable-compat-libdns_sd --enable-dbus,,dbus" | |||
48 | PACKAGECONFIG[libevent] = "--enable-libevent,--disable-libevent,libevent" | 55 | PACKAGECONFIG[libevent] = "--enable-libevent,--disable-libevent,libevent" |
49 | PACKAGECONFIG[qt5] = "--enable-qt5,--disable-qt5,qtbase" | 56 | PACKAGECONFIG[qt5] = "--enable-qt5,--disable-qt5,qtbase" |
50 | 57 | ||
51 | inherit autotools pkgconfig gettext gobject-introspection | 58 | inherit autotools pkgconfig gettext gobject-introspection github-releases |
52 | 59 | ||
53 | EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ | 60 | EXTRA_OECONF = "--with-avahi-priv-access-group=adm \ |
54 | --disable-stack-protector \ | 61 | --disable-stack-protector \ |
@@ -78,12 +85,11 @@ do_compile:prepend() { | |||
78 | export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs" | 85 | export GIR_EXTRA_LIBS_PATH="${B}/avahi-gobject/.libs:${B}/avahi-common/.libs:${B}/avahi-client/.libs:${B}/avahi-glib/.libs" |
79 | } | 86 | } |
80 | 87 | ||
81 | RRECOMMENDS:${PN}:append:libc-glibc = " libnss-mdns" | 88 | RRECOMMENDS:${PN}:append:libc-glibc = " avahi-libnss-mdns" |
82 | 89 | ||
83 | do_install() { | 90 | do_install() { |
84 | autotools_do_install | 91 | autotools_do_install |
85 | rm -rf ${D}/run | 92 | rm -rf ${D}/run |
86 | rm -rf ${D}${datadir}/dbus-1/interfaces | ||
87 | test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1 | 93 | test -d ${D}${datadir}/dbus-1 && rmdir --ignore-fail-on-non-empty ${D}${datadir}/dbus-1 |
88 | rm -rf ${D}${libdir}/avahi | 94 | rm -rf ${D}${libdir}/avahi |
89 | 95 | ||
@@ -109,15 +115,15 @@ FILES:avahi-discover = "${datadir}/applications/avahi-discover.desktop \ | |||
109 | ${bindir}/avahi-discover-standalone \ | 115 | ${bindir}/avahi-discover-standalone \ |
110 | " | 116 | " |
111 | 117 | ||
112 | LICENSE:libavahi-gobject = "LGPLv2.1+" | 118 | LICENSE:libavahi-gobject = "LGPL-2.1-or-later" |
113 | LICENSE:avahi-daemon = "LGPLv2.1+" | 119 | LICENSE:avahi-daemon = "LGPL-2.1-or-later" |
114 | LICENSE:libavahi-common = "LGPLv2.1+" | 120 | LICENSE:libavahi-common = "LGPL-2.1-or-later" |
115 | LICENSE:libavahi-core = "LGPLv2.1+" | 121 | LICENSE:libavahi-core = "LGPL-2.1-or-later" |
116 | LICENSE:libavahi-client = "LGPLv2.1+" | 122 | LICENSE:libavahi-client = "LGPL-2.1-or-later" |
117 | LICENSE:avahi-dnsconfd = "LGPLv2.1+" | 123 | LICENSE:avahi-dnsconfd = "LGPL-2.1-or-later" |
118 | LICENSE:libavahi-glib = "LGPLv2.1+" | 124 | LICENSE:libavahi-glib = "LGPL-2.1-or-later" |
119 | LICENSE:avahi-autoipd = "LGPLv2.1+" | 125 | LICENSE:avahi-autoipd = "LGPL-2.1-or-later" |
120 | LICENSE:avahi-utils = "LGPLv2.1+" | 126 | LICENSE:avahi-utils = "LGPL-2.1-or-later" |
121 | 127 | ||
122 | # As avahi doesn't put any files into PN, clear the files list to avoid problems | 128 | # As avahi doesn't put any files into PN, clear the files list to avoid problems |
123 | # if extra libraries appear. | 129 | # if extra libraries appear. |
@@ -135,7 +141,7 @@ FILES:avahi-daemon = "${sbindir}/avahi-daemon \ | |||
135 | ${sysconfdir}/avahi/services \ | 141 | ${sysconfdir}/avahi/services \ |
136 | ${sysconfdir}/dbus-1 \ | 142 | ${sysconfdir}/dbus-1 \ |
137 | ${sysconfdir}/init.d/avahi-daemon \ | 143 | ${sysconfdir}/init.d/avahi-daemon \ |
138 | ${datadir}/avahi/introspection/*.introspect \ | 144 | ${datadir}/dbus-1/interfaces \ |
139 | ${datadir}/avahi/avahi-service.dtd \ | 145 | ${datadir}/avahi/avahi-service.dtd \ |
140 | ${datadir}/avahi/service-types \ | 146 | ${datadir}/avahi/service-types \ |
141 | ${datadir}/dbus-1/system-services" | 147 | ${datadir}/dbus-1/system-services" |
@@ -147,11 +153,11 @@ FILES:libavahi-glib = "${libdir}/libavahi-glib.so.*" | |||
147 | FILES:libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" | 153 | FILES:libavahi-gobject = "${libdir}/libavahi-gobject.so.* ${libdir}/girepository-1.0/Avahi*.typelib" |
148 | FILES:avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*" | 154 | FILES:avahi-utils = "${bindir}/avahi-* ${bindir}/b* ${datadir}/applications/b*" |
149 | 155 | ||
150 | RDEPENDS:${PN}-dev = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" | 156 | DEV_PKG_DEPENDENCY = "avahi-daemon (= ${EXTENDPKGV}) libavahi-core (= ${EXTENDPKGV})" |
151 | RDEPENDS:${PN}-dev += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}" | 157 | DEV_PKG_DEPENDENCY += "${@["", " libavahi-client (= ${EXTENDPKGV})"][bb.utils.contains('PACKAGECONFIG', 'dbus', 1, 0, d)]}" |
152 | RDEPENDS:${PN}-dnsconfd = "${PN}-daemon" | 158 | RDEPENDS:${PN}-dnsconfd = "${PN}-daemon" |
153 | 159 | ||
154 | RRECOMMENDS:avahi-daemon:append:libc-glibc = " libnss-mdns" | 160 | RRECOMMENDS:avahi-daemon:append:libc-glibc = " avahi-libnss-mdns" |
155 | 161 | ||
156 | CONFFILES:avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" | 162 | CONFFILES:avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf" |
157 | 163 | ||
@@ -178,8 +184,8 @@ SYSTEMD_SERVICE:${PN}-dnsconfd = "avahi-dnsconfd.service" | |||
178 | 184 | ||
179 | do_install:append() { | 185 | do_install:append() { |
180 | install -d ${D}${sysconfdir}/udhcpc.d | 186 | install -d ${D}${sysconfdir}/udhcpc.d |
181 | install ${WORKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d | 187 | install ${UNPACKDIR}/00avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
182 | install ${WORKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d | 188 | install ${UNPACKDIR}/99avahi-autoipd ${D}${sysconfdir}/udhcpc.d |
183 | } | 189 | } |
184 | 190 | ||
185 | # At the time the postinst runs, dbus might not be setup so only restart if running | 191 | # At the time the postinst runs, dbus might not be setup so only restart if running |
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch new file mode 100644 index 0000000000..4d7924d13a --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-1981.patch | |||
@@ -0,0 +1,58 @@ | |||
1 | From a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> | ||
3 | Date: Thu, 17 Nov 2022 01:51:53 +0100 | ||
4 | Subject: [PATCH] Emit error if requested service is not found | ||
5 | |||
6 | It currently just crashes instead of replying with error. Check return | ||
7 | value and emit error instead of passing NULL pointer to reply. | ||
8 | |||
9 | Fixes #375 | ||
10 | |||
11 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-1981.patch?h=ubuntu/jammy-security | ||
12 | Upstream commit https://github.com/lathiat/avahi/commit/a2696da2f2c50ac43b6c4903f72290d5c3fa9f6f] | ||
13 | CVE: CVE-2023-1981 | ||
14 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
15 | --- | ||
16 | avahi-daemon/dbus-protocol.c | 20 ++++++++++++++------ | ||
17 | 1 file changed, 14 insertions(+), 6 deletions(-) | ||
18 | |||
19 | diff --git a/avahi-daemon/dbus-protocol.c b/avahi-daemon/dbus-protocol.c | ||
20 | index 70d7687bc..406d0b441 100644 | ||
21 | --- a/avahi-daemon/dbus-protocol.c | ||
22 | +++ b/avahi-daemon/dbus-protocol.c | ||
23 | @@ -375,10 +375,14 @@ static DBusHandlerResult dbus_get_alternative_host_name(DBusConnection *c, DBusM | ||
24 | } | ||
25 | |||
26 | t = avahi_alternative_host_name(n); | ||
27 | - avahi_dbus_respond_string(c, m, t); | ||
28 | - avahi_free(t); | ||
29 | + if (t) { | ||
30 | + avahi_dbus_respond_string(c, m, t); | ||
31 | + avahi_free(t); | ||
32 | |||
33 | - return DBUS_HANDLER_RESULT_HANDLED; | ||
34 | + return DBUS_HANDLER_RESULT_HANDLED; | ||
35 | + } else { | ||
36 | + return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Hostname not found"); | ||
37 | + } | ||
38 | } | ||
39 | |||
40 | static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DBusMessage *m, DBusError *error) { | ||
41 | @@ -389,10 +393,14 @@ static DBusHandlerResult dbus_get_alternative_service_name(DBusConnection *c, DB | ||
42 | } | ||
43 | |||
44 | t = avahi_alternative_service_name(n); | ||
45 | - avahi_dbus_respond_string(c, m, t); | ||
46 | - avahi_free(t); | ||
47 | + if (t) { | ||
48 | + avahi_dbus_respond_string(c, m, t); | ||
49 | + avahi_free(t); | ||
50 | |||
51 | - return DBUS_HANDLER_RESULT_HANDLED; | ||
52 | + return DBUS_HANDLER_RESULT_HANDLED; | ||
53 | + } else { | ||
54 | + return avahi_dbus_respond_error(c, m, AVAHI_ERR_NOT_FOUND, "Service not found"); | ||
55 | + } | ||
56 | } | ||
57 | |||
58 | static DBusHandlerResult dbus_create_new_entry_group(DBusConnection *c, DBusMessage *m, DBusError *error) { | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch new file mode 100644 index 0000000000..a078f66102 --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-1.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From 72842945085cc3adaccfdfa2853771b0e75ef991 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Mon, 23 Oct 2023 20:29:31 +0000 | ||
4 | Subject: [PATCH] avahi: core: reject overly long TXT resource records | ||
5 | |||
6 | Closes https://github.com/lathiat/avahi/issues/455 | ||
7 | |||
8 | Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/a337a1ba7d15853fb56deef1f464529af6e3a1cf] | ||
9 | CVE: CVE-2023-38469 | ||
10 | |||
11 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> | ||
12 | --- | ||
13 | avahi-core/rr.c | 9 ++++++++- | ||
14 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
15 | |||
16 | diff --git a/avahi-core/rr.c b/avahi-core/rr.c | ||
17 | index 7fa0bee..b03a24c 100644 | ||
18 | --- a/avahi-core/rr.c | ||
19 | +++ b/avahi-core/rr.c | ||
20 | @@ -32,6 +32,7 @@ | ||
21 | #include <avahi-common/malloc.h> | ||
22 | #include <avahi-common/defs.h> | ||
23 | |||
24 | +#include "dns.h" | ||
25 | #include "rr.h" | ||
26 | #include "log.h" | ||
27 | #include "util.h" | ||
28 | @@ -688,11 +689,17 @@ int avahi_record_is_valid(AvahiRecord *r) { | ||
29 | case AVAHI_DNS_TYPE_TXT: { | ||
30 | |||
31 | AvahiStringList *strlst; | ||
32 | + size_t used = 0; | ||
33 | |||
34 | - for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) | ||
35 | + for (strlst = r->data.txt.string_list; strlst; strlst = strlst->next) { | ||
36 | if (strlst->size > 255 || strlst->size <= 0) | ||
37 | return 0; | ||
38 | |||
39 | + used += 1+strlst->size; | ||
40 | + if (used > AVAHI_DNS_RDATA_MAX) | ||
41 | + return 0; | ||
42 | + } | ||
43 | + | ||
44 | return 1; | ||
45 | } | ||
46 | } | ||
47 | -- | ||
48 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch new file mode 100644 index 0000000000..f8f60ddca1 --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38469-2.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | From c6cab87df290448a63323c8ca759baa516166237 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Wed, 25 Oct 2023 18:15:42 +0000 | ||
4 | Subject: [PATCH] tests: pass overly long TXT resource records | ||
5 | |||
6 | to make sure they don't crash avahi any more. | ||
7 | It reproduces https://github.com/lathiat/avahi/issues/455 | ||
8 | |||
9 | Canonical notes: | ||
10 | nickgalanis> removed first hunk since there is no .github dir in this release | ||
11 | |||
12 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38469-2.patch?h=ubuntu/jammy-security | ||
13 | Upstream commit https://github.com/lathiat/avahi/commit/c6cab87df290448a63323c8ca759baa516166237] | ||
14 | CVE: CVE-2023-38469 | ||
15 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
16 | --- | ||
17 | avahi-client/client-test.c | 14 ++++++++++++++ | ||
18 | 1 files changed, 14 insertions(+) | ||
19 | |||
20 | Index: avahi-0.8/avahi-client/client-test.c | ||
21 | =================================================================== | ||
22 | --- avahi-0.8.orig/avahi-client/client-test.c | ||
23 | +++ avahi-0.8/avahi-client/client-test.c | ||
24 | @@ -22,6 +22,7 @@ | ||
25 | #endif | ||
26 | |||
27 | #include <stdio.h> | ||
28 | +#include <string.h> | ||
29 | #include <assert.h> | ||
30 | |||
31 | #include <avahi-client/client.h> | ||
32 | @@ -33,6 +34,8 @@ | ||
33 | #include <avahi-common/malloc.h> | ||
34 | #include <avahi-common/timeval.h> | ||
35 | |||
36 | +#include <avahi-core/dns.h> | ||
37 | + | ||
38 | static const AvahiPoll *poll_api = NULL; | ||
39 | static AvahiSimplePoll *simple_poll = NULL; | ||
40 | |||
41 | @@ -222,6 +225,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA | ||
42 | uint32_t cookie; | ||
43 | struct timeval tv; | ||
44 | AvahiAddress a; | ||
45 | + uint8_t rdata[AVAHI_DNS_RDATA_MAX+1]; | ||
46 | + AvahiStringList *txt = NULL; | ||
47 | + int r; | ||
48 | |||
49 | simple_poll = avahi_simple_poll_new(); | ||
50 | poll_api = avahi_simple_poll_get(simple_poll); | ||
51 | @@ -258,6 +264,14 @@ int main (AVAHI_GCC_UNUSED int argc, AVA | ||
52 | printf("%s\n", avahi_strerror(avahi_entry_group_add_service (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "Lathiat's Site", "_http._tcp", NULL, NULL, 80, "foo=bar", NULL))); | ||
53 | printf("add_record: %d\n", avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "\5booya", 6)); | ||
54 | |||
55 | + memset(rdata, 1, sizeof(rdata)); | ||
56 | + r = avahi_string_list_parse(rdata, sizeof(rdata), &txt); | ||
57 | + assert(r >= 0); | ||
58 | + assert(avahi_string_list_serialize(txt, NULL, 0) == sizeof(rdata)); | ||
59 | + error = avahi_entry_group_add_service_strlst(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", "_qotd._tcp", NULL, NULL, 123, txt); | ||
60 | + assert(error == AVAHI_ERR_INVALID_RECORD); | ||
61 | + avahi_string_list_free(txt); | ||
62 | + | ||
63 | avahi_entry_group_commit (group); | ||
64 | |||
65 | domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u"); | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch new file mode 100644 index 0000000000..91f9e677ac --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-1.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From af7bfad67ca53a7c4042a4a2d85456b847e9f249 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com> | ||
3 | Date: Tue, 11 Apr 2023 15:29:59 +0200 | ||
4 | Subject: [PATCH] avahi: Ensure each label is at least one byte long | ||
5 | |||
6 | The only allowed exception is single dot, where it should return empty | ||
7 | string. | ||
8 | |||
9 | Fixes #454. | ||
10 | |||
11 | Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/94cb6489114636940ac683515417990b55b5d66c] | ||
12 | CVE: CVE-2023-38470 | ||
13 | |||
14 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> | ||
15 | --- | ||
16 | avahi-common/domain-test.c | 14 ++++++++++++++ | ||
17 | avahi-common/domain.c | 2 +- | ||
18 | 2 files changed, 15 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/avahi-common/domain-test.c b/avahi-common/domain-test.c | ||
21 | index cf763ec..3acc1c1 100644 | ||
22 | --- a/avahi-common/domain-test.c | ||
23 | +++ b/avahi-common/domain-test.c | ||
24 | @@ -45,6 +45,20 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { | ||
25 | printf("%s\n", s = avahi_normalize_name_strdup("fo\\\\o\\..f oo.")); | ||
26 | avahi_free(s); | ||
27 | |||
28 | + printf("%s\n", s = avahi_normalize_name_strdup(".")); | ||
29 | + avahi_free(s); | ||
30 | + | ||
31 | + s = avahi_normalize_name_strdup(",.=.}.=.?-.}.=.?.?.}.}.?.?.?.z.?.?.}.}." | ||
32 | + "}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.}.}.}" | ||
33 | + ".?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.=.=.?.?.}.}.?.?.?.zM.?`" | ||
34 | + "?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}??.}.}.?.?." | ||
35 | + "?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM.?`?.}.}.}." | ||
36 | + "??.?.zM.?`?.}.}.}.?.?.?.r.=.?.}.=.?.?.}.?.?.?.}.=.?.?.}?" | ||
37 | + "?.}.}.?.?.?.z.?.?.}.}.}.?.?.?.r.=.=.}.=.?.}}.}.?.?.?.zM." | ||
38 | + "?`?.}.}.}.?.?.?.r.=.=.?.?`.?.?}.}.}.?.?.?.r.=.?.}.=.?.?." | ||
39 | + "}.?.?.?.}.=.?.?.}"); | ||
40 | + assert(s == NULL); | ||
41 | + | ||
42 | printf("%i\n", avahi_domain_equal("\\065aa bbb\\.\\046cc.cc\\\\.dee.fff.", "Aaa BBB\\.\\.cc.cc\\\\.dee.fff")); | ||
43 | printf("%i\n", avahi_domain_equal("A", "a")); | ||
44 | |||
45 | diff --git a/avahi-common/domain.c b/avahi-common/domain.c | ||
46 | index 3b1ab68..e66d241 100644 | ||
47 | --- a/avahi-common/domain.c | ||
48 | +++ b/avahi-common/domain.c | ||
49 | @@ -201,7 +201,7 @@ char *avahi_normalize_name(const char *s, char *ret_s, size_t size) { | ||
50 | } | ||
51 | |||
52 | if (!empty) { | ||
53 | - if (size < 1) | ||
54 | + if (size < 2) | ||
55 | return NULL; | ||
56 | |||
57 | *(r++) = '.'; | ||
58 | -- | ||
59 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch new file mode 100644 index 0000000000..e0736bf210 --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38470-2.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 20dec84b2480821704258bc908e7b2bd2e883b24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Tue, 19 Sep 2023 03:21:25 +0000 | ||
4 | Subject: [PATCH] [common] bail out when escaped labels can't fit into ret | ||
5 | |||
6 | Fixes: | ||
7 | ``` | ||
8 | ==93410==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7f9e76f14c16 at pc 0x00000047208d bp 0x7ffee90a6a00 sp 0x7ffee90a61c8 | ||
9 | READ of size 1110 at 0x7f9e76f14c16 thread T0 | ||
10 | #0 0x47208c in __interceptor_strlen (out/fuzz-domain+0x47208c) (BuildId: 731b20c1eef22c2104e75a6496a399b10cfc7cba) | ||
11 | #1 0x534eb0 in avahi_strdup avahi/avahi-common/malloc.c:167:12 | ||
12 | #2 0x53862c in avahi_normalize_name_strdup avahi/avahi-common/domain.c:226:12 | ||
13 | ``` | ||
14 | and | ||
15 | ``` | ||
16 | fuzz-domain: fuzz/fuzz-domain.c:38: int LLVMFuzzerTestOneInput(const uint8_t *, size_t): Assertion `avahi_domain_equal(s, t)' failed. | ||
17 | ==101571== ERROR: libFuzzer: deadly signal | ||
18 | #0 0x501175 in __sanitizer_print_stack_trace (/home/vagrant/avahi/out/fuzz-domain+0x501175) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8) | ||
19 | #1 0x45ad2c in fuzzer::PrintStackTrace() (/home/vagrant/avahi/out/fuzz-domain+0x45ad2c) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8) | ||
20 | #2 0x43fc07 in fuzzer::Fuzzer::CrashCallback() (/home/vagrant/avahi/out/fuzz-domain+0x43fc07) (BuildId: 682bf6400aff9d41b64b6e2cc3ef5ad600216ea8) | ||
21 | #3 0x7f1581d7ebaf (/lib64/libc.so.6+0x3dbaf) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
22 | #4 0x7f1581dcf883 in __pthread_kill_implementation (/lib64/libc.so.6+0x8e883) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
23 | #5 0x7f1581d7eafd in gsignal (/lib64/libc.so.6+0x3dafd) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
24 | #6 0x7f1581d6787e in abort (/lib64/libc.so.6+0x2687e) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
25 | #7 0x7f1581d6779a in __assert_fail_base.cold (/lib64/libc.so.6+0x2679a) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
26 | #8 0x7f1581d77186 in __assert_fail (/lib64/libc.so.6+0x36186) (BuildId: c9f62793b9e886eb1b95077d4f26fe2b4aa1ac25) | ||
27 | #9 0x5344a4 in LLVMFuzzerTestOneInput /home/vagrant/avahi/fuzz/fuzz-domain.c:38:9 | ||
28 | ``` | ||
29 | |||
30 | It's a follow-up to 94cb6489114636940ac683515417990b55b5d66c | ||
31 | |||
32 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38470-2.patch?h=ubuntu/jammy-security | ||
33 | CVE: CVE-2023-38470 #Follow-up patch | ||
34 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
35 | --- | ||
36 | avahi-common/domain.c | 3 ++- | ||
37 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
38 | |||
39 | Index: avahi-0.8/avahi-common/domain.c | ||
40 | =================================================================== | ||
41 | --- avahi-0.8.orig/avahi-common/domain.c | ||
42 | +++ avahi-0.8/avahi-common/domain.c | ||
43 | @@ -210,7 +210,8 @@ char *avahi_normalize_name(const char *s | ||
44 | } else | ||
45 | empty = 0; | ||
46 | |||
47 | - avahi_escape_label(label, strlen(label), &r, &size); | ||
48 | + if (!(avahi_escape_label(label, strlen(label), &r, &size))) | ||
49 | + return NULL; | ||
50 | } | ||
51 | |||
52 | return ret_s; | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch new file mode 100644 index 0000000000..b3f716495d --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-1.patch | |||
@@ -0,0 +1,73 @@ | |||
1 | From 48d745db7fd554fc33e96ec86d3675ebd530bb8e Mon Sep 17 00:00:00 2001 | ||
2 | From: Michal Sekletar <msekleta@redhat.com> | ||
3 | Date: Mon, 23 Oct 2023 13:38:35 +0200 | ||
4 | Subject: [PATCH] avahi: core: extract host name using avahi_unescape_label() | ||
5 | |||
6 | Previously we could create invalid escape sequence when we split the | ||
7 | string on dot. For example, from valid host name "foo\\.bar" we have | ||
8 | created invalid name "foo\\" and tried to set that as the host name | ||
9 | which crashed the daemon. | ||
10 | |||
11 | Fixes #453 | ||
12 | |||
13 | Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/894f085f402e023a98cbb6f5a3d117bd88d93b09] | ||
14 | CVE: CVE-2023-38471 | ||
15 | |||
16 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> | ||
17 | --- | ||
18 | avahi-core/server.c | 27 +++++++++++++++++++++------ | ||
19 | 1 file changed, 21 insertions(+), 6 deletions(-) | ||
20 | |||
21 | diff --git a/avahi-core/server.c b/avahi-core/server.c | ||
22 | index e507750..40f1d68 100644 | ||
23 | --- a/avahi-core/server.c | ||
24 | +++ b/avahi-core/server.c | ||
25 | @@ -1295,7 +1295,11 @@ static void update_fqdn(AvahiServer *s) { | ||
26 | } | ||
27 | |||
28 | int avahi_server_set_host_name(AvahiServer *s, const char *host_name) { | ||
29 | - char *hn = NULL; | ||
30 | + char label_escaped[AVAHI_LABEL_MAX*4+1]; | ||
31 | + char label[AVAHI_LABEL_MAX]; | ||
32 | + char *hn = NULL, *h; | ||
33 | + size_t len; | ||
34 | + | ||
35 | assert(s); | ||
36 | |||
37 | AVAHI_CHECK_VALIDITY(s, !host_name || avahi_is_valid_host_name(host_name), AVAHI_ERR_INVALID_HOST_NAME); | ||
38 | @@ -1305,17 +1309,28 @@ int avahi_server_set_host_name(AvahiServer *s, const char *host_name) { | ||
39 | else | ||
40 | hn = avahi_normalize_name_strdup(host_name); | ||
41 | |||
42 | - hn[strcspn(hn, ".")] = 0; | ||
43 | + h = hn; | ||
44 | + if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) { | ||
45 | + avahi_free(h); | ||
46 | + return AVAHI_ERR_INVALID_HOST_NAME; | ||
47 | + } | ||
48 | + | ||
49 | + avahi_free(h); | ||
50 | + | ||
51 | + h = label_escaped; | ||
52 | + len = sizeof(label_escaped); | ||
53 | + if (!avahi_escape_label(label, strlen(label), &h, &len)) | ||
54 | + return AVAHI_ERR_INVALID_HOST_NAME; | ||
55 | |||
56 | - if (avahi_domain_equal(s->host_name, hn) && s->state != AVAHI_SERVER_COLLISION) { | ||
57 | - avahi_free(hn); | ||
58 | + if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION) | ||
59 | return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE); | ||
60 | - } | ||
61 | |||
62 | withdraw_host_rrs(s); | ||
63 | |||
64 | avahi_free(s->host_name); | ||
65 | - s->host_name = hn; | ||
66 | + s->host_name = avahi_strdup(label_escaped); | ||
67 | + if (!s->host_name) | ||
68 | + return AVAHI_ERR_NO_MEMORY; | ||
69 | |||
70 | update_fqdn(s); | ||
71 | |||
72 | -- | ||
73 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch new file mode 100644 index 0000000000..44737bfc2e --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38471-2.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From b675f70739f404342f7f78635d6e2dcd85a13460 Mon Sep 17 00:00:00 2001 | ||
2 | From: Evgeny Vereshchagin <evvers@ya.ru> | ||
3 | Date: Tue, 24 Oct 2023 22:04:51 +0000 | ||
4 | Subject: [PATCH] core: return errors from avahi_server_set_host_name properly | ||
5 | |||
6 | It's a follow-up to 894f085f402e023a98cbb6f5a3d117bd88d93b09 | ||
7 | |||
8 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38471-2.patch?h=ubuntu/jammy-security | ||
9 | Upstream commit https://github.com/lathiat/avahi/commit/b675f70739f404342f7f78635d6e2dcd85a13460] | ||
10 | CVE: CVE-2023-38471 #Follow-up Patch | ||
11 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
12 | --- | ||
13 | avahi-core/server.c | 9 ++++++--- | ||
14 | 1 file changed, 6 insertions(+), 3 deletions(-) | ||
15 | |||
16 | Index: avahi-0.8/avahi-core/server.c | ||
17 | =================================================================== | ||
18 | --- avahi-0.8.orig/avahi-core/server.c | ||
19 | +++ avahi-0.8/avahi-core/server.c | ||
20 | @@ -1309,10 +1309,13 @@ int avahi_server_set_host_name(AvahiServ | ||
21 | else | ||
22 | hn = avahi_normalize_name_strdup(host_name); | ||
23 | |||
24 | + if (!hn) | ||
25 | + return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY); | ||
26 | + | ||
27 | h = hn; | ||
28 | if (!avahi_unescape_label((const char **)&hn, label, sizeof(label))) { | ||
29 | avahi_free(h); | ||
30 | - return AVAHI_ERR_INVALID_HOST_NAME; | ||
31 | + return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME); | ||
32 | } | ||
33 | |||
34 | avahi_free(h); | ||
35 | @@ -1320,7 +1323,7 @@ int avahi_server_set_host_name(AvahiServ | ||
36 | h = label_escaped; | ||
37 | len = sizeof(label_escaped); | ||
38 | if (!avahi_escape_label(label, strlen(label), &h, &len)) | ||
39 | - return AVAHI_ERR_INVALID_HOST_NAME; | ||
40 | + return avahi_server_set_errno(s, AVAHI_ERR_INVALID_HOST_NAME); | ||
41 | |||
42 | if (avahi_domain_equal(s->host_name, label_escaped) && s->state != AVAHI_SERVER_COLLISION) | ||
43 | return avahi_server_set_errno(s, AVAHI_ERR_NO_CHANGE); | ||
44 | @@ -1330,7 +1333,7 @@ int avahi_server_set_host_name(AvahiServ | ||
45 | avahi_free(s->host_name); | ||
46 | s->host_name = avahi_strdup(label_escaped); | ||
47 | if (!s->host_name) | ||
48 | - return AVAHI_ERR_NO_MEMORY; | ||
49 | + return avahi_server_set_errno(s, AVAHI_ERR_NO_MEMORY); | ||
50 | |||
51 | update_fqdn(s); | ||
52 | |||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch new file mode 100644 index 0000000000..85dbded73b --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38472.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From b024ae5749f4aeba03478e6391687c3c9c8dee40 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michal Sekletar <msekleta@redhat.com> | ||
3 | Date: Thu, 19 Oct 2023 17:36:44 +0200 | ||
4 | Subject: [PATCH] core: make sure there is rdata to process before parsing it | ||
5 | |||
6 | Fixes #452 | ||
7 | |||
8 | CVE-2023-38472 | ||
9 | |||
10 | Upstream-Status: Backport [import from ubuntu https://git.launchpad.net/ubuntu/+source/avahi/tree/debian/patches/CVE-2023-38472.patch?h=ubuntu/jammy-security | ||
11 | Upstream commit https://github.com/lathiat/avahi/commit/b024ae5749f4aeba03478e6391687c3c9c8dee40] | ||
12 | CVE: CVE-2023-38472 | ||
13 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> | ||
14 | Signed-off-by: Vijay Anusuri <vanusuri@mvista.com> | ||
15 | --- | ||
16 | avahi-client/client-test.c | 3 +++ | ||
17 | avahi-daemon/dbus-entry-group.c | 2 +- | ||
18 | 2 files changed, 4 insertions(+), 1 deletion(-) | ||
19 | |||
20 | Index: avahi-0.8/avahi-client/client-test.c | ||
21 | =================================================================== | ||
22 | --- avahi-0.8.orig/avahi-client/client-test.c | ||
23 | +++ avahi-0.8/avahi-client/client-test.c | ||
24 | @@ -272,6 +272,9 @@ int main (AVAHI_GCC_UNUSED int argc, AVA | ||
25 | assert(error == AVAHI_ERR_INVALID_RECORD); | ||
26 | avahi_string_list_free(txt); | ||
27 | |||
28 | + error = avahi_entry_group_add_record (group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, 0, "TestX", 0x01, 0x10, 120, "", 0); | ||
29 | + assert(error != AVAHI_OK); | ||
30 | + | ||
31 | avahi_entry_group_commit (group); | ||
32 | |||
33 | domain = avahi_domain_browser_new (avahi, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, NULL, AVAHI_DOMAIN_BROWSER_BROWSE, 0, avahi_domain_browser_callback, (char*) "omghai3u"); | ||
34 | Index: avahi-0.8/avahi-daemon/dbus-entry-group.c | ||
35 | =================================================================== | ||
36 | --- avahi-0.8.orig/avahi-daemon/dbus-entry-group.c | ||
37 | +++ avahi-0.8/avahi-daemon/dbus-entry-group.c | ||
38 | @@ -340,7 +340,7 @@ DBusHandlerResult avahi_dbus_msg_entry_g | ||
39 | if (!(r = avahi_record_new_full (name, clazz, type, ttl))) | ||
40 | return avahi_dbus_respond_error(c, m, AVAHI_ERR_NO_MEMORY, NULL); | ||
41 | |||
42 | - if (avahi_rdata_parse (r, rdata, size) < 0) { | ||
43 | + if (!rdata || avahi_rdata_parse (r, rdata, size) < 0) { | ||
44 | avahi_record_unref (r); | ||
45 | return avahi_dbus_respond_error(c, m, AVAHI_ERR_INVALID_RDATA, NULL); | ||
46 | } | ||
diff --git a/meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch b/meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch new file mode 100644 index 0000000000..707acb60fe --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/CVE-2023-38473.patch | |||
@@ -0,0 +1,110 @@ | |||
1 | From 88cbbc48d5efff9726694557ca6c3f698f3affe4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Michal Sekletar <msekleta@redhat.com> | ||
3 | Date: Wed, 11 Oct 2023 17:45:44 +0200 | ||
4 | Subject: [PATCH] avahi: common: derive alternative host name from its | ||
5 | unescaped version | ||
6 | |||
7 | Normalization of input makes sure we don't have to deal with special | ||
8 | cases like unescaped dot at the end of label. | ||
9 | |||
10 | Fixes #451 #487 | ||
11 | |||
12 | Upstream-Status: Backport [https://github.com/lathiat/avahi/commit/b448c9f771bada14ae8de175695a9729f8646797] | ||
13 | CVE: CVE-2023-38473 | ||
14 | |||
15 | Signed-off-by: Meenali Gupta <meenali.gupta@windriver.com> | ||
16 | --- | ||
17 | avahi-common/alternative-test.c | 3 +++ | ||
18 | avahi-common/alternative.c | 27 +++++++++++++++++++-------- | ||
19 | 2 files changed, 22 insertions(+), 8 deletions(-) | ||
20 | |||
21 | diff --git a/avahi-common/alternative-test.c b/avahi-common/alternative-test.c | ||
22 | index 9255435..681fc15 100644 | ||
23 | --- a/avahi-common/alternative-test.c | ||
24 | +++ b/avahi-common/alternative-test.c | ||
25 | @@ -31,6 +31,9 @@ int main(AVAHI_GCC_UNUSED int argc, AVAHI_GCC_UNUSED char *argv[]) { | ||
26 | const char* const test_strings[] = { | ||
27 | "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", | ||
28 | "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXüüüüüüü", | ||
29 | + ").", | ||
30 | + "\\.", | ||
31 | + "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\\\\", | ||
32 | "gurke", | ||
33 | "-", | ||
34 | " #", | ||
35 | diff --git a/avahi-common/alternative.c b/avahi-common/alternative.c | ||
36 | index b3d39f0..a094e6d 100644 | ||
37 | --- a/avahi-common/alternative.c | ||
38 | +++ b/avahi-common/alternative.c | ||
39 | @@ -49,15 +49,20 @@ static void drop_incomplete_utf8(char *c) { | ||
40 | } | ||
41 | |||
42 | char *avahi_alternative_host_name(const char *s) { | ||
43 | + char label[AVAHI_LABEL_MAX], alternative[AVAHI_LABEL_MAX*4+1]; | ||
44 | + char *alt, *r, *ret; | ||
45 | const char *e; | ||
46 | - char *r; | ||
47 | + size_t len; | ||
48 | |||
49 | assert(s); | ||
50 | |||
51 | if (!avahi_is_valid_host_name(s)) | ||
52 | return NULL; | ||
53 | |||
54 | - if ((e = strrchr(s, '-'))) { | ||
55 | + if (!avahi_unescape_label(&s, label, sizeof(label))) | ||
56 | + return NULL; | ||
57 | + | ||
58 | + if ((e = strrchr(label, '-'))) { | ||
59 | const char *p; | ||
60 | |||
61 | e++; | ||
62 | @@ -74,19 +79,18 @@ char *avahi_alternative_host_name(const char *s) { | ||
63 | |||
64 | if (e) { | ||
65 | char *c, *m; | ||
66 | - size_t l; | ||
67 | int n; | ||
68 | |||
69 | n = atoi(e)+1; | ||
70 | if (!(m = avahi_strdup_printf("%i", n))) | ||
71 | return NULL; | ||
72 | |||
73 | - l = e-s-1; | ||
74 | + len = e-label-1; | ||
75 | |||
76 | - if (l >= AVAHI_LABEL_MAX-1-strlen(m)-1) | ||
77 | - l = AVAHI_LABEL_MAX-1-strlen(m)-1; | ||
78 | + if (len >= AVAHI_LABEL_MAX-1-strlen(m)-1) | ||
79 | + len = AVAHI_LABEL_MAX-1-strlen(m)-1; | ||
80 | |||
81 | - if (!(c = avahi_strndup(s, l))) { | ||
82 | + if (!(c = avahi_strndup(label, len))) { | ||
83 | avahi_free(m); | ||
84 | return NULL; | ||
85 | } | ||
86 | @@ -100,7 +104,7 @@ char *avahi_alternative_host_name(const char *s) { | ||
87 | } else { | ||
88 | char *c; | ||
89 | |||
90 | - if (!(c = avahi_strndup(s, AVAHI_LABEL_MAX-1-2))) | ||
91 | + if (!(c = avahi_strndup(label, AVAHI_LABEL_MAX-1-2))) | ||
92 | return NULL; | ||
93 | |||
94 | drop_incomplete_utf8(c); | ||
95 | @@ -109,6 +113,13 @@ char *avahi_alternative_host_name(const char *s) { | ||
96 | avahi_free(c); | ||
97 | } | ||
98 | |||
99 | + alt = alternative; | ||
100 | + len = sizeof(alternative); | ||
101 | + ret = avahi_escape_label(r, strlen(r), &alt, &len); | ||
102 | + | ||
103 | + avahi_free(r); | ||
104 | + r = avahi_strdup(ret); | ||
105 | + | ||
106 | assert(avahi_is_valid_host_name(r)); | ||
107 | |||
108 | return r; | ||
109 | -- | ||
110 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/avahi/files/initscript.patch b/meta/recipes-connectivity/avahi/files/initscript.patch index c856c3df04..e1176888df 100644 --- a/meta/recipes-connectivity/avahi/files/initscript.patch +++ b/meta/recipes-connectivity/avahi/files/initscript.patch | |||
@@ -1,4 +1,8 @@ | |||
1 | Upstream-Status: Pending | 1 | Note: upcoming avahi 0.9 drops debian initscripts altogether, |
2 | so any version update would probably have to copy the last | ||
3 | upstream versions into oe-core, and install them from the recipe. | ||
4 | |||
5 | Upstream-Status: Inappropriate [upstream removed the files] | ||
2 | 6 | ||
3 | Index: avahi-0.7/initscript/debian/avahi-daemon.in | 7 | Index: avahi-0.7/initscript/debian/avahi-daemon.in |
4 | =================================================================== | 8 | =================================================================== |
diff --git a/meta/recipes-connectivity/avahi/files/invalid-service.patch b/meta/recipes-connectivity/avahi/files/invalid-service.patch new file mode 100644 index 0000000000..8f188aff2c --- /dev/null +++ b/meta/recipes-connectivity/avahi/files/invalid-service.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 46490e95151d415cd22f02565e530eb5efcef680 Mon Sep 17 00:00:00 2001 | ||
2 | From: Asger Hautop Drewsen <asger@princh.com> | ||
3 | Date: Mon, 9 Aug 2021 14:25:08 +0200 | ||
4 | Subject: [PATCH] Fix avahi-browse: Invalid service type | ||
5 | |||
6 | Invalid service types will stop the browse from completing, or | ||
7 | in simple terms "my washing machine stops me from printing". | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/lathiat/avahi/pull/472] | ||
10 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
11 | --- | ||
12 | avahi-core/browse-service.c | 4 +++- | ||
13 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/avahi-core/browse-service.c b/avahi-core/browse-service.c | ||
16 | index 63e0275a..ac3d2ecb 100644 | ||
17 | --- a/avahi-core/browse-service.c | ||
18 | +++ b/avahi-core/browse-service.c | ||
19 | @@ -103,7 +103,9 @@ AvahiSServiceBrowser *avahi_s_service_browser_prepare( | ||
20 | AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_PROTO_VALID(protocol), AVAHI_ERR_INVALID_PROTOCOL); | ||
21 | AVAHI_CHECK_VALIDITY_RETURN_NULL(server, !domain || avahi_is_valid_domain_name(domain), AVAHI_ERR_INVALID_DOMAIN_NAME); | ||
22 | AVAHI_CHECK_VALIDITY_RETURN_NULL(server, AVAHI_FLAGS_VALID(flags, AVAHI_LOOKUP_USE_WIDE_AREA|AVAHI_LOOKUP_USE_MULTICAST), AVAHI_ERR_INVALID_FLAGS); | ||
23 | - AVAHI_CHECK_VALIDITY_RETURN_NULL(server, avahi_is_valid_service_type_generic(service_type), AVAHI_ERR_INVALID_SERVICE_TYPE); | ||
24 | + | ||
25 | + if (!avahi_is_valid_service_type_generic(service_type)) | ||
26 | + service_type = "_invalid._tcp"; | ||
27 | |||
28 | if (!domain) | ||
29 | domain = server->domain_name; | ||
diff --git a/meta/recipes-connectivity/avahi/files/local-ping.patch b/meta/recipes-connectivity/avahi/files/local-ping.patch index 94116ad1f3..29c192d296 100644 --- a/meta/recipes-connectivity/avahi/files/local-ping.patch +++ b/meta/recipes-connectivity/avahi/files/local-ping.patch | |||
@@ -1,4 +1,5 @@ | |||
1 | CVE: CVE-2021-36217 | 1 | CVE: CVE-2021-36217 |
2 | CVE: CVE-2021-3502 | ||
2 | Upstream-Status: Backport | 3 | Upstream-Status: Backport |
3 | Signed-off-by: Ross Burton <ross.burton@arm.com> | 4 | Signed-off-by: Ross Burton <ross.burton@arm.com> |
4 | 5 | ||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/0001-named-lwresd-V-and-start-log-hide-build-options.patch b/meta/recipes-connectivity/bind/bind-9.16.21/0001-named-lwresd-V-and-start-log-hide-build-options.patch deleted file mode 100644 index 5bcc16c9b2..0000000000 --- a/meta/recipes-connectivity/bind/bind-9.16.21/0001-named-lwresd-V-and-start-log-hide-build-options.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From a3af4a405baf5ff582e82aaba392dd9667d94bdc Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 27 Aug 2018 21:24:20 +0800 | ||
4 | Subject: [PATCH] `named/lwresd -V' and start log hide build options | ||
5 | |||
6 | The build options expose build path directories, so hide them. | ||
7 | [snip] | ||
8 | $ named -V | ||
9 | |built by make with *** (options are hidden) | ||
10 | [snip] | ||
11 | |||
12 | Upstream-Status: Inappropriate [oe-core specific] | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | |||
16 | Refreshed for 9.16.0 | ||
17 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
18 | |||
19 | --- | ||
20 | bin/named/include/named/globals.h | 2 +- | ||
21 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
22 | |||
23 | Index: bind-9.16.0/bin/named/include/named/globals.h | ||
24 | =================================================================== | ||
25 | --- bind-9.16.0.orig/bin/named/include/named/globals.h | ||
26 | +++ bind-9.16.0/bin/named/include/named/globals.h | ||
27 | @@ -69,7 +69,7 @@ EXTERN const char *named_g_version I | ||
28 | EXTERN const char *named_g_product INIT(PRODUCT); | ||
29 | EXTERN const char *named_g_description INIT(DESCRIPTION); | ||
30 | EXTERN const char *named_g_srcid INIT(SRCID); | ||
31 | -EXTERN const char *named_g_configargs INIT(CONFIGARGS); | ||
32 | +EXTERN const char *named_g_configargs INIT("*** (options are hidden)"); | ||
33 | EXTERN const char *named_g_builder INIT(BUILDER); | ||
34 | EXTERN in_port_t named_g_port INIT(0); | ||
35 | EXTERN isc_dscp_t named_g_dscp INIT(-1); | ||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch b/meta/recipes-connectivity/bind/bind/0001-avoid-start-failure-with-bind-user.patch index 8db96ec049..78ab6b87fc 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/0001-avoid-start-failure-with-bind-user.patch +++ b/meta/recipes-connectivity/bind/bind/0001-avoid-start-failure-with-bind-user.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 31dde3562f287429eea94b77250d184818b49063 Mon Sep 17 00:00:00 2001 | 1 | From c70f74164bea8a8c54c03becffb2f21103dd1f31 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 15 Oct 2018 16:55:09 +0800 | 3 | Date: Mon, 15 Oct 2018 16:55:09 +0800 |
4 | Subject: [PATCH] avoid start failure with bind user | 4 | Subject: [PATCH] avoid start failure with bind user |
@@ -11,17 +11,14 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
11 | 1 file changed, 1 insertion(+) | 11 | 1 file changed, 1 insertion(+) |
12 | 12 | ||
13 | diff --git a/init.d b/init.d | 13 | diff --git a/init.d b/init.d |
14 | index b2eec60..6e03936 100644 | 14 | index 95e8909..771d349 100644 |
15 | --- a/init.d | 15 | --- a/init.d |
16 | +++ b/init.d | 16 | +++ b/init.d |
17 | @@ -57,6 +57,7 @@ case "$1" in | 17 | @@ -57,6 +57,7 @@ case "$1" in |
18 | modprobe capability >/dev/null 2>&1 || true | 18 | modprobe capability >/dev/null 2>&1 || true |
19 | if [ ! -f /etc/bind/rndc.key ]; then | 19 | if [ ! -f /etc/bind/rndc.key ]; then |
20 | /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom | 20 | /usr/sbin/rndc-confgen -a -b 512 |
21 | + chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true | 21 | + chown root:bind /etc/bind/rndc.key >/dev/null 2>&1 || true |
22 | chmod 0640 /etc/bind/rndc.key | 22 | chmod 0640 /etc/bind/rndc.key |
23 | fi | 23 | fi |
24 | if [ -f /var/run/named/named.pid ]; then | 24 | if [ -f /var/run/named/named.pid ]; then |
25 | -- | ||
26 | 2.7.4 | ||
27 | |||
diff --git a/meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch b/meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch new file mode 100644 index 0000000000..53e439721f --- /dev/null +++ b/meta/recipes-connectivity/bind/bind/0001-named-lwresd-V-and-start-log-hide-build-options.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From 0dd67d85705cbcfa9a2759c46f3cdf3d0d6375de Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Mon, 27 Aug 2018 21:24:20 +0800 | ||
4 | Subject: [PATCH] `named/lwresd -V' and start log hide build options | ||
5 | |||
6 | The build options expose build path directories, so hide them. | ||
7 | [snip] | ||
8 | $ named -V | ||
9 | |built by make with *** (options are hidden) | ||
10 | [snip] | ||
11 | |||
12 | Upstream-Status: Inappropriate [oe-core specific] | ||
13 | |||
14 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
15 | |||
16 | Refreshed for 9.16.0 | ||
17 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
18 | --- | ||
19 | configure.ac | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/configure.ac b/configure.ac | ||
23 | index f9cf4a4..0ce3d26 100644 | ||
24 | --- a/configure.ac | ||
25 | +++ b/configure.ac | ||
26 | @@ -35,7 +35,7 @@ AC_DEFINE([PACKAGE_VERSION_EXTRA], ["][bind_VERSION_EXTRA]["], [BIND 9 Extra par | ||
27 | AC_DEFINE([PACKAGE_DESCRIPTION], [m4_ifnblank(bind_DESCRIPTION, [" ]bind_DESCRIPTION["], [])], [An extra string to print after PACKAGE_STRING]) | ||
28 | AC_DEFINE([PACKAGE_SRCID], ["][bind_SRCID]["], [A short hash from git]) | ||
29 | |||
30 | -bind_CONFIGARGS="${ac_configure_args:-default}" | ||
31 | +bind_CONFIGARGS="(removed for reproducibility)" | ||
32 | AC_DEFINE_UNQUOTED([PACKAGE_CONFIGARGS], ["$bind_CONFIGARGS"], [Either 'defaults' or used ./configure options]) | ||
33 | |||
34 | AC_DEFINE([PACKAGE_BUILDER], ["make"], [make or Visual Studio]) | ||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/bind-ensure-searching-for-json-headers-searches-sysr.patch b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch index f9cdc7ca4d..38d208fc1c 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/bind-ensure-searching-for-json-headers-searches-sysr.patch +++ b/meta/recipes-connectivity/bind/bind/bind-ensure-searching-for-json-headers-searches-sysr.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From edda20fb5a6e88548f85e39d34d6c074306e15bc Mon Sep 17 00:00:00 2001 | 1 | From 8c9c817933eef20328f10237bbd964580db0a3ad Mon Sep 17 00:00:00 2001 |
2 | From: Paul Gortmaker <paul.gortmaker@windriver.com> | 2 | From: Paul Gortmaker <paul.gortmaker@windriver.com> |
3 | Date: Tue, 9 Jun 2015 11:22:00 -0400 | 3 | Date: Tue, 9 Jun 2015 11:22:00 -0400 |
4 | Subject: [PATCH] bind: ensure searching for json headers searches sysroot | 4 | Subject: [PATCH] bind: ensure searching for json headers searches sysroot |
@@ -27,21 +27,20 @@ to make use of the combination some day. | |||
27 | 27 | ||
28 | Upstream-Status: Inappropriate [OE Specific] | 28 | Upstream-Status: Inappropriate [OE Specific] |
29 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> | 29 | Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
30 | |||
31 | --- | 30 | --- |
32 | configure.ac | 2 +- | 31 | configure.ac | 2 +- |
33 | 1 file changed, 1 insertion(+), 1 deletion(-) | 32 | 1 file changed, 1 insertion(+), 1 deletion(-) |
34 | 33 | ||
35 | Index: bind-9.16.4/configure.ac | 34 | diff --git a/configure.ac b/configure.ac |
36 | =================================================================== | 35 | index 334b551..f9cf4a4 100644 |
37 | --- bind-9.16.4.orig/configure.ac | 36 | --- a/configure.ac |
38 | +++ bind-9.16.4/configure.ac | 37 | +++ b/configure.ac |
39 | @@ -1232,7 +1232,7 @@ case "$use_lmdb" in | 38 | @@ -863,7 +863,7 @@ AS_CASE([$with_lmdb], |
40 | LMDB_LIBS="" | 39 | [no],[], |
41 | ;; | 40 | [auto|yes], [PKG_CHECK_MODULES([LMDB], [lmdb], |
42 | auto|yes) | 41 | [ac_lib_lmdb_found=yes], |
43 | - for d in /usr /usr/local /opt/local | 42 | - [for ac_lib_lmdb_path in /usr /usr/local /opt /opt/local; do |
44 | + for d in "${STAGING_INCDIR}" | 43 | + [for ac_lib_lmdb_path in "${STAGING_INCDIR}"; do |
45 | do | 44 | AX_LIB_LMDB([$ac_lib_lmdb_path], |
46 | if test -f "${d}/include/lmdb.h" | 45 | [ac_lib_lmdb_found=yes |
47 | then | 46 | break]) |
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/bind9 b/meta/recipes-connectivity/bind/bind/bind9 index 968679ff7f..968679ff7f 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/bind9 +++ b/meta/recipes-connectivity/bind/bind/bind9 | |||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/conf.patch b/meta/recipes-connectivity/bind/bind/conf.patch index aad345f9fc..102fe46ffe 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/conf.patch +++ b/meta/recipes-connectivity/bind/bind/conf.patch | |||
@@ -1,12 +1,43 @@ | |||
1 | From 83a892af19bf1455ce7132350332ed6d7f1e2b94 Mon Sep 17 00:00:00 2001 | ||
2 | From: Qing He <qing.he@intel.com> | ||
3 | Date: Tue, 30 Nov 2010 13:35:42 +0800 | ||
4 | Subject: [PATCH] bind: add new recipe | ||
5 | |||
1 | Upstream-Status: Inappropriate [configuration] | 6 | Upstream-Status: Inappropriate [configuration] |
2 | 7 | ||
3 | the patch is imported from openembedded project | 8 | the patch is imported from openembedded project |
4 | 9 | ||
5 | 11/30/2010 - Qing He <qing.he@intel.com> | 10 | 11/30/2010 - Qing He <qing.he@intel.com> |
11 | --- | ||
12 | conf/db.0 | 12 +++++++ | ||
13 | conf/db.127 | 13 ++++++++ | ||
14 | conf/db.255 | 12 +++++++ | ||
15 | conf/db.empty | 14 +++++++++ | ||
16 | conf/db.local | 13 ++++++++ | ||
17 | conf/db.root | 45 ++++++++++++++++++++++++++ | ||
18 | conf/named.conf | 49 +++++++++++++++++++++++++++++ | ||
19 | conf/named.conf.local | 8 +++++ | ||
20 | conf/named.conf.options | 24 ++++++++++++++ | ||
21 | conf/zones.rfc1918 | 20 ++++++++++++ | ||
22 | init.d | 70 +++++++++++++++++++++++++++++++++++++++++ | ||
23 | 11 files changed, 280 insertions(+) | ||
24 | create mode 100644 conf/db.0 | ||
25 | create mode 100644 conf/db.127 | ||
26 | create mode 100644 conf/db.255 | ||
27 | create mode 100644 conf/db.empty | ||
28 | create mode 100644 conf/db.local | ||
29 | create mode 100644 conf/db.root | ||
30 | create mode 100644 conf/named.conf | ||
31 | create mode 100644 conf/named.conf.local | ||
32 | create mode 100644 conf/named.conf.options | ||
33 | create mode 100644 conf/zones.rfc1918 | ||
34 | create mode 100644 init.d | ||
6 | 35 | ||
7 | diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0 | 36 | diff --git a/conf/db.0 b/conf/db.0 |
8 | --- bind-9.3.1.orig/conf/db.0 1970-01-01 01:00:00.000000000 +0100 | 37 | new file mode 100644 |
9 | +++ bind-9.3.1/conf/db.0 2005-07-10 22:14:00.000000000 +0200 | 38 | index 0000000..e3aabdb |
39 | --- /dev/null | ||
40 | +++ b/conf/db.0 | ||
10 | @@ -0,0 +1,12 @@ | 41 | @@ -0,0 +1,12 @@ |
11 | +; | 42 | +; |
12 | +; BIND reverse data file for broadcast zone | 43 | +; BIND reverse data file for broadcast zone |
@@ -20,9 +51,11 @@ diff -urN bind-9.3.1.orig/conf/db.0 bind-9.3.1/conf/db.0 | |||
20 | + 604800 ) ; Negative Cache TTL | 51 | + 604800 ) ; Negative Cache TTL |
21 | +; | 52 | +; |
22 | +@ IN NS localhost. | 53 | +@ IN NS localhost. |
23 | diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127 | 54 | diff --git a/conf/db.127 b/conf/db.127 |
24 | --- bind-9.3.1.orig/conf/db.127 1970-01-01 01:00:00.000000000 +0100 | 55 | new file mode 100644 |
25 | +++ bind-9.3.1/conf/db.127 2005-07-10 22:14:00.000000000 +0200 | 56 | index 0000000..cd05bef |
57 | --- /dev/null | ||
58 | +++ b/conf/db.127 | ||
26 | @@ -0,0 +1,13 @@ | 59 | @@ -0,0 +1,13 @@ |
27 | +; | 60 | +; |
28 | +; BIND reverse data file for local loopback interface | 61 | +; BIND reverse data file for local loopback interface |
@@ -37,43 +70,49 @@ diff -urN bind-9.3.1.orig/conf/db.127 bind-9.3.1/conf/db.127 | |||
37 | +; | 70 | +; |
38 | +@ IN NS localhost. | 71 | +@ IN NS localhost. |
39 | +1.0.0 IN PTR localhost. | 72 | +1.0.0 IN PTR localhost. |
40 | diff -urN bind-9.3.1.orig/conf/db.empty bind-9.3.1/conf/db.empty | 73 | diff --git a/conf/db.255 b/conf/db.255 |
41 | --- bind-9.3.1.orig/conf/db.empty 1970-01-01 01:00:00.000000000 +0100 | 74 | new file mode 100644 |
42 | +++ bind-9.3.1/conf/db.empty 2005-07-10 22:14:00.000000000 +0200 | 75 | index 0000000..16cd819 |
43 | @@ -0,0 +1,14 @@ | 76 | --- /dev/null |
44 | +; BIND reverse data file for empty rfc1918 zone | 77 | +++ b/conf/db.255 |
78 | @@ -0,0 +1,12 @@ | ||
45 | +; | 79 | +; |
46 | +; DO NOT EDIT THIS FILE - it is used for multiple zones. | 80 | +; BIND reserve data file for broadcast zone |
47 | +; Instead, copy it, edit named.conf, and use that copy. | ||
48 | +; | 81 | +; |
49 | +$TTL 86400 | 82 | +$TTL 604800 |
50 | +@ IN SOA localhost. root.localhost. ( | 83 | +@ IN SOA localhost. root.localhost. ( |
51 | + 1 ; Serial | 84 | + 1 ; Serial |
52 | + 604800 ; Refresh | 85 | + 604800 ; Refresh |
53 | + 86400 ; Retry | 86 | + 86400 ; Retry |
54 | + 2419200 ; Expire | 87 | + 2419200 ; Expire |
55 | + 86400 ) ; Negative Cache TTL | 88 | + 604800 ) ; Negative Cache TTL |
56 | +; | 89 | +; |
57 | +@ IN NS localhost. | 90 | +@ IN NS localhost. |
58 | diff -urN bind-9.3.1.orig/conf/db.255 bind-9.3.1/conf/db.255 | 91 | diff --git a/conf/db.empty b/conf/db.empty |
59 | --- bind-9.3.1.orig/conf/db.255 1970-01-01 01:00:00.000000000 +0100 | 92 | new file mode 100644 |
60 | +++ bind-9.3.1/conf/db.255 2005-07-10 22:14:00.000000000 +0200 | 93 | index 0000000..8a12858 |
61 | @@ -0,0 +1,12 @@ | 94 | --- /dev/null |
95 | +++ b/conf/db.empty | ||
96 | @@ -0,0 +1,14 @@ | ||
97 | +; BIND reverse data file for empty rfc1918 zone | ||
62 | +; | 98 | +; |
63 | +; BIND reserve data file for broadcast zone | 99 | +; DO NOT EDIT THIS FILE - it is used for multiple zones. |
100 | +; Instead, copy it, edit named.conf, and use that copy. | ||
64 | +; | 101 | +; |
65 | +$TTL 604800 | 102 | +$TTL 86400 |
66 | +@ IN SOA localhost. root.localhost. ( | 103 | +@ IN SOA localhost. root.localhost. ( |
67 | + 1 ; Serial | 104 | + 1 ; Serial |
68 | + 604800 ; Refresh | 105 | + 604800 ; Refresh |
69 | + 86400 ; Retry | 106 | + 86400 ; Retry |
70 | + 2419200 ; Expire | 107 | + 2419200 ; Expire |
71 | + 604800 ) ; Negative Cache TTL | 108 | + 86400 ) ; Negative Cache TTL |
72 | +; | 109 | +; |
73 | +@ IN NS localhost. | 110 | +@ IN NS localhost. |
74 | diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local | 111 | diff --git a/conf/db.local b/conf/db.local |
75 | --- bind-9.3.1.orig/conf/db.local 1970-01-01 01:00:00.000000000 +0100 | 112 | new file mode 100644 |
76 | +++ bind-9.3.1/conf/db.local 2005-07-10 22:14:00.000000000 +0200 | 113 | index 0000000..66b4892 |
114 | --- /dev/null | ||
115 | +++ b/conf/db.local | ||
77 | @@ -0,0 +1,13 @@ | 116 | @@ -0,0 +1,13 @@ |
78 | +; | 117 | +; |
79 | +; BIND data file for local loopback interface | 118 | +; BIND data file for local loopback interface |
@@ -88,9 +127,11 @@ diff -urN bind-9.3.1.orig/conf/db.local bind-9.3.1/conf/db.local | |||
88 | +; | 127 | +; |
89 | +@ IN NS localhost. | 128 | +@ IN NS localhost. |
90 | +@ IN A 127.0.0.1 | 129 | +@ IN A 127.0.0.1 |
91 | diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root | 130 | diff --git a/conf/db.root b/conf/db.root |
92 | --- bind-9.3.1.orig/conf/db.root 1970-01-01 01:00:00.000000000 +0100 | 131 | new file mode 100644 |
93 | +++ bind-9.3.1/conf/db.root 2005-07-10 22:14:00.000000000 +0200 | 132 | index 0000000..01c20f0 |
133 | --- /dev/null | ||
134 | +++ b/conf/db.root | ||
94 | @@ -0,0 +1,45 @@ | 135 | @@ -0,0 +1,45 @@ |
95 | + | 136 | + |
96 | +; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net. | 137 | +; <<>> DiG 9.2.3 <<>> ns . @a.root-servers.net. |
@@ -137,9 +178,11 @@ diff -urN bind-9.3.1.orig/conf/db.root bind-9.3.1/conf/db.root | |||
137 | +;; WHEN: Sun Feb 1 11:27:14 2004 | 178 | +;; WHEN: Sun Feb 1 11:27:14 2004 |
138 | +;; MSG SIZE rcvd: 436 | 179 | +;; MSG SIZE rcvd: 436 |
139 | + | 180 | + |
140 | diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf | 181 | diff --git a/conf/named.conf b/conf/named.conf |
141 | --- bind-9.3.1.orig/conf/named.conf 1970-01-01 01:00:00.000000000 +0100 | 182 | new file mode 100644 |
142 | +++ bind-9.3.1/conf/named.conf 2005-07-10 22:33:46.000000000 +0200 | 183 | index 0000000..95829cf |
184 | --- /dev/null | ||
185 | +++ b/conf/named.conf | ||
143 | @@ -0,0 +1,49 @@ | 186 | @@ -0,0 +1,49 @@ |
144 | +// This is the primary configuration file for the BIND DNS server named. | 187 | +// This is the primary configuration file for the BIND DNS server named. |
145 | +// | 188 | +// |
@@ -190,9 +233,11 @@ diff -urN bind-9.3.1.orig/conf/named.conf bind-9.3.1/conf/named.conf | |||
190 | +// root-delegation-only exclude { "DE"; "MUSEUM"; }; | 233 | +// root-delegation-only exclude { "DE"; "MUSEUM"; }; |
191 | + | 234 | + |
192 | +include "/etc/bind/named.conf.local"; | 235 | +include "/etc/bind/named.conf.local"; |
193 | diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local | 236 | diff --git a/conf/named.conf.local b/conf/named.conf.local |
194 | --- bind-9.3.1.orig/conf/named.conf.local 1970-01-01 01:00:00.000000000 +0100 | 237 | new file mode 100644 |
195 | +++ bind-9.3.1/conf/named.conf.local 2005-07-10 22:14:06.000000000 +0200 | 238 | index 0000000..7a57b10 |
239 | --- /dev/null | ||
240 | +++ b/conf/named.conf.local | ||
196 | @@ -0,0 +1,8 @@ | 241 | @@ -0,0 +1,8 @@ |
197 | +// | 242 | +// |
198 | +// Do any local configuration here | 243 | +// Do any local configuration here |
@@ -202,9 +247,11 @@ diff -urN bind-9.3.1.orig/conf/named.conf.local bind-9.3.1/conf/named.conf.local | |||
202 | +// organization | 247 | +// organization |
203 | +//include "/etc/bind/zones.rfc1918"; | 248 | +//include "/etc/bind/zones.rfc1918"; |
204 | + | 249 | + |
205 | diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.options | 250 | diff --git a/conf/named.conf.options b/conf/named.conf.options |
206 | --- bind-9.3.1.orig/conf/named.conf.options 1970-01-01 01:00:00.000000000 +0100 | 251 | new file mode 100644 |
207 | +++ bind-9.3.1/conf/named.conf.options 2005-07-10 22:14:06.000000000 +0200 | 252 | index 0000000..813193d |
253 | --- /dev/null | ||
254 | +++ b/conf/named.conf.options | ||
208 | @@ -0,0 +1,24 @@ | 255 | @@ -0,0 +1,24 @@ |
209 | +options { | 256 | +options { |
210 | + directory "/var/cache/bind"; | 257 | + directory "/var/cache/bind"; |
@@ -230,9 +277,11 @@ diff -urN bind-9.3.1.orig/conf/named.conf.options bind-9.3.1/conf/named.conf.opt | |||
230 | + | 277 | + |
231 | +}; | 278 | +}; |
232 | + | 279 | + |
233 | diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918 | 280 | diff --git a/conf/zones.rfc1918 b/conf/zones.rfc1918 |
234 | --- bind-9.3.1.orig/conf/zones.rfc1918 1970-01-01 01:00:00.000000000 +0100 | 281 | new file mode 100644 |
235 | +++ bind-9.3.1/conf/zones.rfc1918 2005-07-10 22:14:10.000000000 +0200 | 282 | index 0000000..03b5546 |
283 | --- /dev/null | ||
284 | +++ b/conf/zones.rfc1918 | ||
236 | @@ -0,0 +1,20 @@ | 285 | @@ -0,0 +1,20 @@ |
237 | +zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; | 286 | +zone "10.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; |
238 | + | 287 | + |
@@ -254,9 +303,11 @@ diff -urN bind-9.3.1.orig/conf/zones.rfc1918 bind-9.3.1/conf/zones.rfc1918 | |||
254 | +zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; | 303 | +zone "31.172.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; |
255 | + | 304 | + |
256 | +zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; | 305 | +zone "168.192.in-addr.arpa" { type master; file "/etc/bind/db.empty"; }; |
257 | diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d | 306 | diff --git a/init.d b/init.d |
258 | --- bind-9.3.1.orig/init.d 1970-01-01 01:00:00.000000000 +0100 | 307 | new file mode 100644 |
259 | +++ bind-9.3.1/init.d 2005-07-10 23:09:58.000000000 +0200 | 308 | index 0000000..2ef2277 |
309 | --- /dev/null | ||
310 | +++ b/init.d | ||
260 | @@ -0,0 +1,70 @@ | 311 | @@ -0,0 +1,70 @@ |
261 | +#!/bin/sh | 312 | +#!/bin/sh |
262 | + | 313 | + |
@@ -276,7 +327,7 @@ diff -urN bind-9.3.1.orig/init.d bind-9.3.1/init.d | |||
276 | + | 327 | + |
277 | + modprobe capability >/dev/null 2>&1 || true | 328 | + modprobe capability >/dev/null 2>&1 || true |
278 | + if [ ! -f /etc/bind/rndc.key ]; then | 329 | + if [ ! -f /etc/bind/rndc.key ]; then |
279 | + /usr/sbin/rndc-confgen -a -b 512 -r /dev/urandom | 330 | + /usr/sbin/rndc-confgen -a -b 512 |
280 | + chmod 0640 /etc/bind/rndc.key | 331 | + chmod 0640 /etc/bind/rndc.key |
281 | + fi | 332 | + fi |
282 | + if [ -f /var/run/named/named.pid ]; then | 333 | + if [ -f /var/run/named/named.pid ]; then |
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/generate-rndc-key.sh b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh index 633e29c0e6..633e29c0e6 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/generate-rndc-key.sh +++ b/meta/recipes-connectivity/bind/bind/generate-rndc-key.sh | |||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/init.d-add-support-for-read-only-rootfs.patch b/meta/recipes-connectivity/bind/bind/init.d-add-support-for-read-only-rootfs.patch index 11db95ede1..984d401c70 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/init.d-add-support-for-read-only-rootfs.patch +++ b/meta/recipes-connectivity/bind/bind/init.d-add-support-for-read-only-rootfs.patch | |||
@@ -1,14 +1,17 @@ | |||
1 | Subject: init.d: add support for read-only rootfs | 1 | From 1393cbf6b0084128fdfc9b5afb3bcc307265d094 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Thu, 27 Mar 2014 02:34:41 +0000 | ||
4 | Subject: [PATCH] init.d: add support for read-only rootfs | ||
2 | 5 | ||
3 | Upstream-Status: Inappropriate [oe specific] | 6 | Upstream-Status: Inappropriate [oe specific] |
4 | 7 | ||
5 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
6 | --- | 9 | --- |
7 | init.d | 40 ++++++++++++++++++++++++++++++++++++++++ | 10 | init.d | 40 ++++++++++++++++++++++++++++++++++++++++ |
8 | 1 file changed, 40 insertions(+) | 11 | 1 file changed, 40 insertions(+) |
9 | 12 | ||
10 | diff --git a/init.d b/init.d | 13 | diff --git a/init.d b/init.d |
11 | index 0111ed4..24677c8 100644 | 14 | index 2ef2277..95e8909 100644 |
12 | --- a/init.d | 15 | --- a/init.d |
13 | +++ b/init.d | 16 | +++ b/init.d |
14 | @@ -6,8 +6,48 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin | 17 | @@ -6,8 +6,48 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin |
@@ -60,6 +63,3 @@ index 0111ed4..24677c8 100644 | |||
60 | test -x /usr/sbin/rndc || exit 0 | 63 | test -x /usr/sbin/rndc || exit 0 |
61 | 64 | ||
62 | case "$1" in | 65 | case "$1" in |
63 | -- | ||
64 | 1.7.9.5 | ||
65 | |||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/make-etc-initd-bind-stop-work.patch b/meta/recipes-connectivity/bind/bind/make-etc-initd-bind-stop-work.patch index 146f3e35db..74f2ef83a0 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/make-etc-initd-bind-stop-work.patch +++ b/meta/recipes-connectivity/bind/bind/make-etc-initd-bind-stop-work.patch | |||
@@ -1,4 +1,7 @@ | |||
1 | bind: make "/etc/init.d/bind stop" work | 1 | From ce06506bb3fe661e03161af3a603bd228590a254 Mon Sep 17 00:00:00 2001 |
2 | From: Roy Li <rongqing.li@windriver.com> | ||
3 | Date: Thu, 15 Nov 2012 02:27:54 +0000 | ||
4 | Subject: [PATCH] bind: make "/etc/init.d/bind stop" work | ||
2 | 5 | ||
3 | Upstream-Status: Inappropriate [configuration] | 6 | Upstream-Status: Inappropriate [configuration] |
4 | 7 | ||
@@ -7,13 +10,13 @@ the named daemon. | |||
7 | 10 | ||
8 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | 11 | Signed-off-by: Roy Li <rongqing.li@windriver.com> |
9 | --- | 12 | --- |
10 | conf/named.conf | 5 +++++ | 13 | conf/named.conf | 5 +++++ |
11 | conf/rndc.conf | 5 +++++ | 14 | conf/rndc.conf | 5 +++++ |
12 | 2 files changed, 10 insertions(+), 0 deletions(-) | 15 | 2 files changed, 10 insertions(+) |
13 | create mode 100644 conf/rndc.conf | 16 | create mode 100644 conf/rndc.conf |
14 | 17 | ||
15 | diff --git a/conf/named.conf b/conf/named.conf | 18 | diff --git a/conf/named.conf b/conf/named.conf |
16 | index 95829cf..c8899e7 100644 | 19 | index 95829cf..021dbca 100644 |
17 | --- a/conf/named.conf | 20 | --- a/conf/named.conf |
18 | +++ b/conf/named.conf | 21 | +++ b/conf/named.conf |
19 | @@ -47,3 +47,8 @@ zone "255.in-addr.arpa" { | 22 | @@ -47,3 +47,8 @@ zone "255.in-addr.arpa" { |
@@ -27,7 +30,7 @@ index 95829cf..c8899e7 100644 | |||
27 | +}; | 30 | +}; |
28 | diff --git a/conf/rndc.conf b/conf/rndc.conf | 31 | diff --git a/conf/rndc.conf b/conf/rndc.conf |
29 | new file mode 100644 | 32 | new file mode 100644 |
30 | index 0000000..a0b481d | 33 | index 0000000..4b43a3d |
31 | --- /dev/null | 34 | --- /dev/null |
32 | +++ b/conf/rndc.conf | 35 | +++ b/conf/rndc.conf |
33 | @@ -0,0 +1,5 @@ | 36 | @@ -0,0 +1,5 @@ |
@@ -36,7 +39,3 @@ index 0000000..a0b481d | |||
36 | + default-server localhost; | 39 | + default-server localhost; |
37 | + default-key rndc-key; | 40 | + default-key rndc-key; |
38 | +}; | 41 | +}; |
39 | |||
40 | -- | ||
41 | 1.7.5.4 | ||
42 | |||
diff --git a/meta/recipes-connectivity/bind/bind-9.16.21/named.service b/meta/recipes-connectivity/bind/bind/named.service index cda56ef015..cda56ef015 100644 --- a/meta/recipes-connectivity/bind/bind-9.16.21/named.service +++ b/meta/recipes-connectivity/bind/bind/named.service | |||
diff --git a/meta/recipes-connectivity/bind/bind_9.16.21.bb b/meta/recipes-connectivity/bind/bind_9.20.10.bb index 390c84248d..32f0bdf7b5 100644 --- a/meta/recipes-connectivity/bind/bind_9.16.21.bb +++ b/meta/recipes-connectivity/bind/bind_9.20.10.bb | |||
@@ -4,9 +4,9 @@ DESCRIPTION = "BIND 9 provides a full-featured Domain Name Server system" | |||
4 | SECTION = "console/network" | 4 | SECTION = "console/network" |
5 | 5 | ||
6 | LICENSE = "MPL-2.0" | 6 | LICENSE = "MPL-2.0" |
7 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=ef10b4de6371115dcecdc38ca2af4561" | 7 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=c7a0b6d9a1b692a5da9af9d503671f43" |
8 | 8 | ||
9 | DEPENDS = "openssl libcap zlib libuv" | 9 | DEPENDS = "openssl libcap zlib libuv liburcu" |
10 | 10 | ||
11 | SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \ | 11 | SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \ |
12 | file://conf.patch \ | 12 | file://conf.patch \ |
@@ -20,33 +20,31 @@ SRC_URI = "https://ftp.isc.org/isc/bind9/${PV}/${BPN}-${PV}.tar.xz \ | |||
20 | file://0001-avoid-start-failure-with-bind-user.patch \ | 20 | file://0001-avoid-start-failure-with-bind-user.patch \ |
21 | " | 21 | " |
22 | 22 | ||
23 | SRC_URI[sha256sum] = "65da5fd4fb80b7d0d7452876f81fd6d67cdcee54a5e3c1d65610334665dfa815" | 23 | SRC_URI[sha256sum] = "0fb3ba2c337bb488ca68f5df296c435cd255058fb63d0822e91db0235c905716" |
24 | 24 | ||
25 | UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" | 25 | UPSTREAM_CHECK_URI = "https://ftp.isc.org/isc/bind9/" |
26 | # stay at 9.16 follow the ESV versions divisible by 4 | 26 | # follow the ESV versions divisible by 2 |
27 | UPSTREAM_CHECK_REGEX = "(?P<pver>9.(16|20|24|28)(\.\d+)+(-P\d+)*)/" | 27 | UPSTREAM_CHECK_REGEX = "(?P<pver>9.(\d*[02468])+(\.\d+)+(-P\d+)*)/" |
28 | 28 | ||
29 | # Issue only affects dhcpd with recent bind versions. We don't ship dhcpd anymore | 29 | # Issue only affects dhcpd with recent bind versions. We don't ship dhcpd anymore |
30 | # so the issue doesn't affect us. | 30 | # so the issue doesn't affect us. |
31 | CVE_CHECK_WHITELIST += "CVE-2019-6470" | 31 | CVE_STATUS[CVE-2019-6470] = "not-applicable-config: Issue only affects dhcpd with recent bind versions and we don't ship dhcpd anymore." |
32 | 32 | ||
33 | inherit autotools update-rc.d systemd useradd pkgconfig multilib_header update-alternatives | 33 | inherit autotools update-rc.d systemd useradd pkgconfig multilib_header update-alternatives |
34 | 34 | ||
35 | # PACKAGECONFIGs readline and libedit should NOT be set at same time | 35 | # PACKAGECONFIGs readline and libedit should NOT be set at same time |
36 | PACKAGECONFIG ?= "readline" | 36 | PACKAGECONFIG ?= "readline" |
37 | PACKAGECONFIG[httpstats] = "--with-libxml2=${STAGING_DIR_HOST}${prefix},--without-libxml2,libxml2" | 37 | PACKAGECONFIG[httpstats] = "--with-libxml2,--without-libxml2,libxml2" |
38 | PACKAGECONFIG[readline] = "--with-readline=-lreadline,,readline" | 38 | PACKAGECONFIG[readline] = "--with-readline=readline,,readline" |
39 | PACKAGECONFIG[libedit] = "--with-readline=-ledit,,libedit" | 39 | PACKAGECONFIG[libedit] = "--with-readline=libedit,,libedit" |
40 | PACKAGECONFIG[python3] = "--with-python=yes --with-python-install-dir=${PYTHON_SITEPACKAGES_DIR} , --without-python, python3-ply-native," | 40 | PACKAGECONFIG[dns-over-http] = "--enable-doh,--disable-doh,nghttp2" |
41 | 41 | ||
42 | EXTRA_OECONF = " --with-libtool --disable-devpoll --disable-auto-validation --enable-epoll \ | 42 | EXTRA_OECONF = " --disable-auto-validation \ |
43 | --with-gssapi=no --with-lmdb=no --with-zlib \ | 43 | --with-gssapi=no --with-lmdb=no --with-zlib \ |
44 | --sysconfdir=${sysconfdir}/bind \ | 44 | --sysconfdir=${sysconfdir}/bind \ |
45 | --with-openssl=${STAGING_DIR_HOST}${prefix} \ | 45 | --with-openssl=${STAGING_DIR_HOST}${prefix} \ |
46 | " | 46 | " |
47 | LDFLAGS:append = " -lz" | 47 | LDFLAGS += "-lz" |
48 | |||
49 | inherit ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native distutils3-base', '', d)} | ||
50 | 48 | ||
51 | # dhcp needs .la so keep them | 49 | # dhcp needs .la so keep them |
52 | REMOVE_LIBTOOL_LA = "0" | 50 | REMOVE_LIBTOOL_LA = "0" |
@@ -67,31 +65,23 @@ do_install:append() { | |||
67 | install -d "${D}${sysconfdir}/init.d" | 65 | install -d "${D}${sysconfdir}/init.d" |
68 | install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" | 66 | install -m 644 ${S}/conf/* "${D}${sysconfdir}/bind/" |
69 | install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" | 67 | install -m 755 "${S}/init.d" "${D}${sysconfdir}/init.d/bind" |
70 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | ||
71 | sed -i -e '1s,#!.*python3,#! /usr/bin/python3,' \ | ||
72 | ${D}${sbindir}/dnssec-coverage \ | ||
73 | ${D}${sbindir}/dnssec-checkds \ | ||
74 | ${D}${sbindir}/dnssec-keymgr | ||
75 | fi | ||
76 | 68 | ||
77 | # Install systemd related files | 69 | # Install systemd related files |
78 | install -d ${D}${sbindir} | 70 | install -d ${D}${sbindir} |
79 | install -m 755 ${WORKDIR}/generate-rndc-key.sh ${D}${sbindir} | 71 | install -m 755 ${UNPACKDIR}/generate-rndc-key.sh ${D}${sbindir} |
80 | install -d ${D}${systemd_system_unitdir} | 72 | install -d ${D}${systemd_system_unitdir} |
81 | install -m 0644 ${WORKDIR}/named.service ${D}${systemd_system_unitdir} | 73 | install -m 0644 ${UNPACKDIR}/named.service ${D}${systemd_system_unitdir} |
82 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | 74 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
83 | -e 's,@SBINDIR@,${sbindir},g' \ | 75 | -e 's,@SBINDIR@,${sbindir},g' \ |
84 | ${D}${systemd_system_unitdir}/named.service | 76 | ${D}${systemd_system_unitdir}/named.service |
85 | 77 | ||
86 | install -d ${D}${sysconfdir}/default | 78 | install -d ${D}${sysconfdir}/default |
87 | install -m 0644 ${WORKDIR}/bind9 ${D}${sysconfdir}/default | 79 | install -m 0644 ${UNPACKDIR}/bind9 ${D}${sysconfdir}/default |
88 | 80 | ||
89 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 81 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
90 | install -d ${D}${sysconfdir}/tmpfiles.d | 82 | install -d ${D}${sysconfdir}/tmpfiles.d |
91 | echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf | 83 | echo "d /run/named 0755 bind bind - -" > ${D}${sysconfdir}/tmpfiles.d/bind.conf |
92 | fi | 84 | fi |
93 | |||
94 | oe_multilib_header isc/platform.h | ||
95 | } | 85 | } |
96 | 86 | ||
97 | CONFFILES:${PN} = " \ | 87 | CONFFILES:${PN} = " \ |
@@ -119,11 +109,5 @@ PACKAGE_BEFORE_PN += "${PN}-libs" | |||
119 | # https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88 | 109 | # https://github.com/isc-projects/bind9/commit/0e25af628cd776f98c04fc4cc59048f5448f6c88 |
120 | FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so" | 110 | FILES_SOLIBSDEV = "${libdir}/*[!0-9].so ${libdir}/libbind9.so" |
121 | FILES:${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so" | 111 | FILES:${PN}-libs = "${libdir}/named/*.so* ${libdir}/*-${PV}.so" |
122 | FILES:${PN}-staticdev += "${libdir}/*.la" | ||
123 | |||
124 | PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-bind', '', d)}" | ||
125 | FILES:python3-bind = "${sbindir}/dnssec-coverage ${sbindir}/dnssec-checkds \ | ||
126 | ${sbindir}/dnssec-keymgr ${PYTHON_SITEPACKAGES_DIR}" | ||
127 | 112 | ||
128 | RDEPENDS:${PN}-dev = "" | 113 | DEV_PKG_DEPENDENCY = "" |
129 | RDEPENDS:python3-bind = "python3-core python3-ply" | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5.inc b/meta/recipes-connectivity/bluez5/bluez5.inc index 0a5fc9d4b8..287ebf658e 100644 --- a/meta/recipes-connectivity/bluez5/bluez5.inc +++ b/meta/recipes-connectivity/bluez5/bluez5.inc | |||
@@ -2,7 +2,7 @@ SUMMARY = "Linux Bluetooth Stack Userland V5" | |||
2 | DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries." | 2 | DESCRIPTION = "Linux Bluetooth stack V5 userland components. These include a system configurations, daemons, tools and system libraries." |
3 | HOMEPAGE = "http://www.bluez.org" | 3 | HOMEPAGE = "http://www.bluez.org" |
4 | SECTION = "libs" | 4 | SECTION = "libs" |
5 | LICENSE = "GPLv2+ & LGPLv2.1+" | 5 | LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ |
7 | file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ | 7 | file://COPYING.LIB;md5=fb504b67c50331fc78734fed90fb0e09 \ |
8 | file://src/main.c;beginline=1;endline=24;md5=0ad83ca0dc37ab08af448777c581e7ac" | 8 | file://src/main.c;beginline=1;endline=24;md5=0ad83ca0dc37ab08af448777c581e7ac" |
@@ -17,6 +17,14 @@ PACKAGECONFIG ??= "obex-profiles \ | |||
17 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ | 17 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ |
18 | a2dp-profiles \ | 18 | a2dp-profiles \ |
19 | avrcp-profiles \ | 19 | avrcp-profiles \ |
20 | bap-profiles \ | ||
21 | bass-profiles \ | ||
22 | mcp-profiles \ | ||
23 | ccp-profiles \ | ||
24 | vcp-profiles \ | ||
25 | micp-profiles \ | ||
26 | csip-profiles \ | ||
27 | asha-profiles \ | ||
20 | network-profiles \ | 28 | network-profiles \ |
21 | hid-profiles \ | 29 | hid-profiles \ |
22 | hog-profiles \ | 30 | hog-profiles \ |
@@ -38,6 +46,14 @@ PACKAGECONFIG[network-profiles] = "--enable-network,--disable-network" | |||
38 | PACKAGECONFIG[hid-profiles] = "--enable-hid,--disable-hid" | 46 | PACKAGECONFIG[hid-profiles] = "--enable-hid,--disable-hid" |
39 | PACKAGECONFIG[hog-profiles] = "--enable-hog,--disable-hog" | 47 | PACKAGECONFIG[hog-profiles] = "--enable-hog,--disable-hog" |
40 | PACKAGECONFIG[health-profiles] = "--enable-health,--disable-health" | 48 | PACKAGECONFIG[health-profiles] = "--enable-health,--disable-health" |
49 | PACKAGECONFIG[bap-profiles] = "--enable-bap,--disable-bap" | ||
50 | PACKAGECONFIG[bass-profiles] = "--enable-bass,--disable-bass" | ||
51 | PACKAGECONFIG[mcp-profiles] = "--enable-mcp,--disable-mcp" | ||
52 | PACKAGECONFIG[ccp-profiles] = "--enable-ccp,--disable-ccp" | ||
53 | PACKAGECONFIG[vcp-profiles] = "--enable-vcp,--disable-vcp" | ||
54 | PACKAGECONFIG[micp-profiles] = "--enable-micp,--disable-micp" | ||
55 | PACKAGECONFIG[csip-profiles] = "--enable-csip,--disable-csip" | ||
56 | PACKAGECONFIG[asha-profiles] = "--enable-asha,--disable-asha" | ||
41 | PACKAGECONFIG[sixaxis] = "--enable-sixaxis,--disable-sixaxis" | 57 | PACKAGECONFIG[sixaxis] = "--enable-sixaxis,--disable-sixaxis" |
42 | PACKAGECONFIG[tools] = "--enable-tools,--disable-tools" | 58 | PACKAGECONFIG[tools] = "--enable-tools,--disable-tools" |
43 | PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" | 59 | PACKAGECONFIG[threads] = "--enable-threads,--disable-threads" |
@@ -50,11 +66,10 @@ PACKAGECONFIG[manpages] = "--enable-manpages,--disable-manpages,python3-docutils | |||
50 | SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ | 66 | SRC_URI = "${KERNELORG_MIRROR}/linux/bluetooth/bluez-${PV}.tar.xz \ |
51 | file://init \ | 67 | file://init \ |
52 | file://run-ptest \ | 68 | file://run-ptest \ |
53 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '', 'file://0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch', d)} \ | ||
54 | file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ | 69 | file://0001-tests-add-a-target-for-building-tests-without-runnin.patch \ |
55 | file://0001-test-gatt-Fix-hung-issue.patch \ | 70 | file://0001-bluez5-disable-aics-tests.patch \ |
56 | " | 71 | " |
57 | S = "${WORKDIR}/bluez-${PV}" | 72 | S = "${UNPACKDIR}/bluez-${PV}" |
58 | 73 | ||
59 | CVE_PRODUCT = "bluez" | 74 | CVE_PRODUCT = "bluez" |
60 | 75 | ||
@@ -64,9 +79,12 @@ EXTRA_OECONF = "\ | |||
64 | --enable-test \ | 79 | --enable-test \ |
65 | --enable-datafiles \ | 80 | --enable-datafiles \ |
66 | --enable-library \ | 81 | --enable-library \ |
82 | --enable-pie \ | ||
67 | --without-zsh-completion-dir \ | 83 | --without-zsh-completion-dir \ |
68 | " | 84 | " |
69 | 85 | ||
86 | CFLAGS += "-DFIRMWARE_DIR=\\"${nonarch_base_libdir}/firmware\\"" | ||
87 | |||
70 | # bluez5 builds a large number of useful utilities but does not | 88 | # bluez5 builds a large number of useful utilities but does not |
71 | # install them. Specify which ones we want put into ${PN}-noinst-tools. | 89 | # install them. Specify which ones we want put into ${PN}-noinst-tools. |
72 | NOINST_TOOLS_READLINE ??= "" | 90 | NOINST_TOOLS_READLINE ??= "" |
@@ -80,28 +98,16 @@ NOINST_TOOLS = " \ | |||
80 | 98 | ||
81 | do_install:append() { | 99 | do_install:append() { |
82 | install -d ${D}${INIT_D_DIR} | 100 | install -d ${D}${INIT_D_DIR} |
83 | install -m 0755 ${WORKDIR}/init ${D}${INIT_D_DIR}/bluetooth | 101 | install -m 0755 ${UNPACKDIR}/init ${D}${INIT_D_DIR}/bluetooth |
84 | 102 | ||
85 | install -d ${D}${sysconfdir}/bluetooth/ | 103 | if [ -f ${D}${sysconfdir}/init.d/bluetooth ]; then |
86 | if [ -f ${S}/profiles/network/network.conf ]; then | 104 | sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${sysconfdir}/init.d/bluetooth |
87 | install -m 0644 ${S}/profiles/network/network.conf ${D}/${sysconfdir}/bluetooth/ | ||
88 | fi | ||
89 | if [ -f ${S}/profiles/input/input.conf ]; then | ||
90 | install -m 0644 ${S}/profiles/input/input.conf ${D}/${sysconfdir}/bluetooth/ | ||
91 | fi | ||
92 | |||
93 | if [ -f ${D}/${sysconfdir}/init.d/bluetooth ]; then | ||
94 | sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}/${sysconfdir}/init.d/bluetooth | ||
95 | fi | 105 | fi |
96 | 106 | ||
97 | # Install desired tools that upstream leaves in build area | 107 | # Install desired tools that upstream leaves in build area |
98 | for f in ${NOINST_TOOLS} ; do | 108 | for f in ${NOINST_TOOLS} ; do |
99 | install -m 755 ${B}/$f ${D}/${bindir} | 109 | install -m 755 ${B}/$f ${D}${bindir} |
100 | done | 110 | done |
101 | |||
102 | # Patch python tools to use Python 3; they should be source compatible, but | ||
103 | # still refer to Python 2 in the shebang | ||
104 | sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${libdir}/bluez/test/* | ||
105 | } | 111 | } |
106 | 112 | ||
107 | PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools" | 113 | PACKAGES =+ "${PN}-testtools ${PN}-obex ${PN}-noinst-tools" |
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch deleted file mode 100644 index 618ed734a9..0000000000 --- a/meta/recipes-connectivity/bluez5/bluez5/0001-Allow-using-obexd-without-systemd-in-the-user-sessio.patch +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | From f74eb97c9fb3c0ee2895742e773ac6a3c41c999c Mon Sep 17 00:00:00 2001 | ||
2 | From: Giovanni Campagna <gcampagna-cNUdlRotFMnNLxjTenLetw@public.gmane.org> | ||
3 | Date: Sat, 12 Oct 2013 17:45:25 +0200 | ||
4 | Subject: [PATCH] Allow using obexd without systemd in the user session | ||
5 | |||
6 | Not all sessions run systemd --user (actually, the majority | ||
7 | doesn't), so the dbus daemon must be able to spawn obexd | ||
8 | directly, and to do so it needs the full path of the daemon. | ||
9 | |||
10 | Upstream-Status: Denied | ||
11 | |||
12 | Not accepted by upstream maintainer for being a distro specific | ||
13 | configuration. See thread: | ||
14 | |||
15 | http://thread.gmane.org/gmane.linux.bluez.kernel/38725/focus=38843 | ||
16 | |||
17 | Signed-off-by: Javier Viguera <javier.viguera@digi.com> | ||
18 | |||
19 | --- | ||
20 | Makefile.obexd | 4 ++-- | ||
21 | .../src/{org.bluez.obex.service => org.bluez.obex.service.in} | 2 +- | ||
22 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
23 | rename obexd/src/{org.bluez.obex.service => org.bluez.obex.service.in} (76%) | ||
24 | |||
25 | diff --git a/Makefile.obexd b/Makefile.obexd | ||
26 | index de59d29..73004a3 100644 | ||
27 | --- a/Makefile.obexd | ||
28 | +++ b/Makefile.obexd | ||
29 | @@ -1,12 +1,12 @@ | ||
30 | if SYSTEMD | ||
31 | systemduserunitdir = $(SYSTEMD_USERUNITDIR) | ||
32 | systemduserunit_DATA = obexd/src/obex.service | ||
33 | +endif | ||
34 | |||
35 | dbussessionbusdir = $(DBUS_SESSIONBUSDIR) | ||
36 | dbussessionbus_DATA = obexd/src/org.bluez.obex.service | ||
37 | -endif | ||
38 | |||
39 | -EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service | ||
40 | +EXTRA_DIST += obexd/src/obex.service.in obexd/src/org.bluez.obex.service.in | ||
41 | |||
42 | if OBEX | ||
43 | |||
44 | diff --git a/obexd/src/org.bluez.obex.service b/obexd/src/org.bluez.obex.service.in | ||
45 | similarity index 76% | ||
46 | rename from obexd/src/org.bluez.obex.service | ||
47 | rename to obexd/src/org.bluez.obex.service.in | ||
48 | index a538088..9c815f2 100644 | ||
49 | --- a/obexd/src/org.bluez.obex.service | ||
50 | +++ b/obexd/src/org.bluez.obex.service.in | ||
51 | @@ -1,4 +1,4 @@ | ||
52 | [D-BUS Service] | ||
53 | Name=org.bluez.obex | ||
54 | -Exec=/bin/false | ||
55 | +Exec=@libexecdir@/obexd | ||
56 | SystemdService=dbus-org.bluez.obex.service | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-bluez5-disable-aics-tests.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-bluez5-disable-aics-tests.patch new file mode 100644 index 0000000000..3f01843ea3 --- /dev/null +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-bluez5-disable-aics-tests.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 182545f2504255d67d9ec2071fd5c82ab53c5a2e Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= <gudni.m.g@gmail.com> | ||
3 | Date: Sun, 30 Mar 2025 02:20:24 +0000 | ||
4 | Subject: [PATCH] bluez5: disable aics tests | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Temporarily disable aics tests as they can fail | ||
10 | depending on how the tests are executed. Sometimes they pass, | ||
11 | sometimes they fail. The issue has been observed since BlueZ 5.72 to 5.80 | ||
12 | |||
13 | Starting with BlueZ 5.80, the tests began failing when using the | ||
14 | ptest-runner script. This is not a new issue in BlueZ 5.80 which is | ||
15 | why the test is disabled with this commit until a solution is found. | ||
16 | |||
17 | See discussion on Github: | ||
18 | https://github.com/bluez/bluez/issues/726 | ||
19 | https://github.com/bluez/bluez/issues/683 | ||
20 | |||
21 | Upstream-Status: Inappropriate [OE-Specific] | ||
22 | |||
23 | Signed-off-by: Guðni Már Gilbert <gudni.m.g@gmail.com> | ||
24 | --- | ||
25 | unit/test-vcp.c | 2 +- | ||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/unit/test-vcp.c b/unit/test-vcp.c | ||
29 | index 6a61ea2..04b92e4 100644 | ||
30 | --- a/unit/test-vcp.c | ||
31 | +++ b/unit/test-vcp.c | ||
32 | @@ -2754,7 +2754,7 @@ int main(int argc, char *argv[]) | ||
33 | tester_init(&argc, &argv); | ||
34 | |||
35 | test_vocs_unit_testcases(); | ||
36 | - test_aics_unit_testcases(); | ||
37 | + //test_aics_unit_testcases(); | ||
38 | |||
39 | return tester_run(); | ||
40 | } | ||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch deleted file mode 100644 index e90b6a546f..0000000000 --- a/meta/recipes-connectivity/bluez5/bluez5/0001-test-gatt-Fix-hung-issue.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From 61e741654cc2eb167bca212a3bb2ba8f3ba280c1 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Fri, 24 Aug 2018 12:04:03 +0800 | ||
4 | Subject: [PATCH] test-gatt: Fix hung issue | ||
5 | |||
6 | The below test hangs infinitely | ||
7 | $ unit/test-gatt -p /robustness/unkown-request -d | ||
8 | /robustness/unkown-request - init | ||
9 | /robustness/unkown-request - setup | ||
10 | /robustness/unkown-request - setup complete | ||
11 | /robustness/unkown-request - run | ||
12 | GATT: < 02 17 00 ... | ||
13 | bt_gatt_server:MTU exchange complete, with MTU: 23 | ||
14 | GATT: > 03 00 02 ... | ||
15 | PDU: = 03 00 02 ... | ||
16 | GATT: < bf 00 | ||
17 | |||
18 | Actually, the /robustness/unkown-request test does | ||
19 | no action. | ||
20 | |||
21 | Upstream-Status: Submitted [https://marc.info/?l=linux-bluetooth&m=153508881804635&w=2] | ||
22 | |||
23 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
24 | --- | ||
25 | unit/test-gatt.c | 2 +- | ||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/unit/test-gatt.c b/unit/test-gatt.c | ||
29 | index c7e28f8..b57373b 100644 | ||
30 | --- a/unit/test-gatt.c | ||
31 | +++ b/unit/test-gatt.c | ||
32 | @@ -4463,7 +4463,7 @@ int main(int argc, char *argv[]) | ||
33 | test_server, service_db_1, NULL, | ||
34 | raw_pdu(0x03, 0x00, 0x02), | ||
35 | raw_pdu(0xbf, 0x00), | ||
36 | - raw_pdu(0x01, 0xbf, 0x00, 0x00, 0x06)); | ||
37 | + raw_pdu()); | ||
38 | |||
39 | define_test_server("/robustness/unkown-command", | ||
40 | test_server, service_db_1, NULL, | ||
41 | -- | ||
42 | 2.7.4 | ||
43 | |||
diff --git a/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch b/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch index 24ddae6b63..a9af56f141 100644 --- a/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch +++ b/meta/recipes-connectivity/bluez5/bluez5/0001-tests-add-a-target-for-building-tests-without-runnin.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4bdf0f96dcaa945fd29f26d56e5b36d8c23e4c8b Mon Sep 17 00:00:00 2001 | 1 | From fa5da30786837b437707cea921056e9c1c22ffba Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Fri, 1 Apr 2016 17:07:34 +0300 | 3 | Date: Fri, 1 Apr 2016 17:07:34 +0300 |
4 | Subject: [PATCH] tests: add a target for building tests without running them | 4 | Subject: [PATCH] tests: add a target for building tests without running them |
@@ -10,10 +10,10 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | |||
10 | 1 file changed, 3 insertions(+) | 10 | 1 file changed, 3 insertions(+) |
11 | 11 | ||
12 | diff --git a/Makefile.am b/Makefile.am | 12 | diff --git a/Makefile.am b/Makefile.am |
13 | index 1a48a71..ba3b92f 100644 | 13 | index 02ad23c..169269d 100644 |
14 | --- a/Makefile.am | 14 | --- a/Makefile.am |
15 | +++ b/Makefile.am | 15 | +++ b/Makefile.am |
16 | @@ -425,6 +425,9 @@ endif | 16 | @@ -722,6 +722,9 @@ endif |
17 | TESTS = $(unit_tests) | 17 | TESTS = $(unit_tests) |
18 | AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69 | 18 | AM_TESTS_ENVIRONMENT = MALLOC_CHECK_=3 MALLOC_PERTURB_=69 |
19 | 19 | ||
@@ -23,6 +23,3 @@ index 1a48a71..ba3b92f 100644 | |||
23 | if DBUS_RUN_SESSION | 23 | if DBUS_RUN_SESSION |
24 | AM_TESTS_ENVIRONMENT += dbus-run-session -- | 24 | AM_TESTS_ENVIRONMENT += dbus-run-session -- |
25 | endif | 25 | endif |
26 | -- | ||
27 | 2.8.0.rc3 | ||
28 | |||
diff --git a/meta/recipes-connectivity/bluez5/bluez5_5.62.bb b/meta/recipes-connectivity/bluez5/bluez5_5.83.bb index 411ac8b5a3..8af6bdb67e 100644 --- a/meta/recipes-connectivity/bluez5/bluez5_5.62.bb +++ b/meta/recipes-connectivity/bluez5/bluez5_5.83.bb | |||
@@ -1,9 +1,8 @@ | |||
1 | require bluez5.inc | 1 | require bluez5.inc |
2 | 2 | ||
3 | SRC_URI[sha256sum] = "38090a5b750e17fc08d3e52178ed8d3254c5f4bd2c48830d5c1955b88e3bc0c2" | 3 | SRC_URI[sha256sum] = "108522d909d220581399bfec93daab62035539ceef3dda3e79970785c63bd24c" |
4 | 4 | ||
5 | # These issues have kernel fixes rather than bluez fixes so exclude here | 5 | CVE_STATUS[CVE-2020-24490] = "cpe-incorrect: This issue has kernel fixes rather than bluez fixes" |
6 | CVE_CHECK_WHITELIST += "CVE-2020-12352 CVE-2020-24490" | ||
7 | 6 | ||
8 | # noinst programs in Makefile.tools that are conditional on READLINE | 7 | # noinst programs in Makefile.tools that are conditional on READLINE |
9 | # support | 8 | # support |
@@ -33,6 +32,9 @@ NOINST_TOOLS_TESTING ?= " \ | |||
33 | tools/rfcomm-tester \ | 32 | tools/rfcomm-tester \ |
34 | tools/bnep-tester \ | 33 | tools/bnep-tester \ |
35 | tools/userchan-tester \ | 34 | tools/userchan-tester \ |
35 | tools/iso-tester \ | ||
36 | tools/mesh-tester \ | ||
37 | tools/ioctl-tester \ | ||
36 | " | 38 | " |
37 | 39 | ||
38 | # noinst programs in Makefile.tools that are conditional on TOOLS | 40 | # noinst programs in Makefile.tools that are conditional on TOOLS |
@@ -42,11 +44,11 @@ NOINST_TOOLS_BT ?= " \ | |||
42 | tools/avinfo \ | 44 | tools/avinfo \ |
43 | tools/avtest \ | 45 | tools/avtest \ |
44 | tools/scotest \ | 46 | tools/scotest \ |
45 | tools/amptest \ | ||
46 | tools/hwdb \ | 47 | tools/hwdb \ |
47 | tools/hcieventmask \ | 48 | tools/hcieventmask \ |
48 | tools/hcisecfilter \ | 49 | tools/hcisecfilter \ |
49 | tools/btinfo \ | 50 | tools/btinfo \ |
51 | tools/btconfig \ | ||
50 | tools/btsnoop \ | 52 | tools/btsnoop \ |
51 | tools/btproxy \ | 53 | tools/btproxy \ |
52 | tools/btiotest \ | 54 | tools/btiotest \ |
@@ -57,6 +59,8 @@ NOINST_TOOLS_BT ?= " \ | |||
57 | tools/advtest \ | 59 | tools/advtest \ |
58 | tools/seq2bseq \ | 60 | tools/seq2bseq \ |
59 | tools/nokfw \ | 61 | tools/nokfw \ |
62 | tools/rtlfw \ | ||
63 | tools/bcmfw \ | ||
60 | tools/create-image \ | 64 | tools/create-image \ |
61 | tools/eddystone \ | 65 | tools/eddystone \ |
62 | tools/ibeacon \ | 66 | tools/ibeacon \ |
@@ -66,5 +70,5 @@ NOINST_TOOLS_BT ?= " \ | |||
66 | tools/check-selftest \ | 70 | tools/check-selftest \ |
67 | tools/gatt-service \ | 71 | tools/gatt-service \ |
68 | profiles/iap/iapd \ | 72 | profiles/iap/iapd \ |
69 | ${@bb.utils.contains('PACKAGECONFIG', 'btpclient', 'tools/btpclient', '', d)} \ | 73 | ${@bb.utils.contains('PACKAGECONFIG', 'btpclient', 'tools/btpclient tools/btpclientctl', '', d)} \ |
70 | " | 74 | " |
diff --git a/meta/recipes-connectivity/connman/connman-conf.bb b/meta/recipes-connectivity/connman/connman-conf.bb index 006f976997..854e1f1f29 100644 --- a/meta/recipes-connectivity/connman/connman-conf.bb +++ b/meta/recipes-connectivity/connman/connman-conf.bb | |||
@@ -1,36 +1,20 @@ | |||
1 | SUMMARY = "Connman config to setup wired interface on qemu machines" | 1 | SUMMARY = "Connman config to ignore wired interface on qemu machines" |
2 | DESCRIPTION = "This is the ConnMan configuration to set up a Wired \ | 2 | DESCRIPTION = "This is the ConnMan configuration to avoid touching wired \ |
3 | network interface for a qemu machine." | 3 | network interface inside qemu machines." |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" | 5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" |
6 | 6 | ||
7 | inherit systemd | 7 | SRC_URI = "file://main.conf \ |
8 | " | ||
8 | 9 | ||
9 | SRC_URI:append:qemuall = " file://wired.config \ | 10 | S = "${UNPACKDIR}" |
10 | file://wired-setup \ | ||
11 | file://wired-connection.service \ | ||
12 | " | ||
13 | PR = "r2" | ||
14 | |||
15 | S = "${WORKDIR}" | ||
16 | 11 | ||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 12 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
18 | 13 | ||
19 | FILES:${PN} = "${localstatedir}/* ${datadir}/*" | 14 | FILES:${PN} = "${sysconfdir}/*" |
20 | 15 | ||
21 | do_install() { | 16 | # Kernel IP-Config is perfectly capable of setting up networking passed in via ip= |
22 | #Configure Wired network interface in case of qemu* machines | 17 | do_install:append:qemuall() { |
23 | if test -e ${WORKDIR}/wired.config && | 18 | mkdir -p ${D}${sysconfdir}/connman |
24 | test -e ${WORKDIR}/wired-setup && | 19 | cp ${S}/main.conf ${D}${sysconfdir}/connman/main.conf |
25 | test -e ${WORKDIR}/wired-connection.service; then | ||
26 | install -d ${D}${localstatedir}/lib/connman | ||
27 | install -m 0644 ${WORKDIR}/wired.config ${D}${localstatedir}/lib/connman | ||
28 | install -d ${D}${datadir}/connman | ||
29 | install -m 0755 ${WORKDIR}/wired-setup ${D}${datadir}/connman | ||
30 | install -d ${D}${systemd_system_unitdir} | ||
31 | install -m 0644 ${WORKDIR}/wired-connection.service ${D}${systemd_system_unitdir} | ||
32 | sed -i -e 's|@SCRIPTDIR@|${datadir}/connman|g' ${D}${systemd_system_unitdir}/wired-connection.service | ||
33 | fi | ||
34 | } | 20 | } |
35 | |||
36 | SYSTEMD_SERVICE:${PN}:qemuall = "wired-connection.service" | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/main.conf b/meta/recipes-connectivity/connman/connman-conf/main.conf new file mode 100644 index 0000000000..3c9dd396f6 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman-conf/main.conf | |||
@@ -0,0 +1,2 @@ | |||
1 | [General] | ||
2 | NetworkInterfaceBlacklist = eth,en | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service deleted file mode 100644 index 48adfc08ac..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-connection.service +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=Setup a wired interface | ||
3 | Before=connman.service | ||
4 | |||
5 | [Service] | ||
6 | Type=oneshot | ||
7 | ExecStart=@SCRIPTDIR@/wired-setup | ||
8 | |||
9 | [Install] | ||
10 | WantedBy=network.target | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup deleted file mode 100644 index c46899ef32..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired-setup +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | CONFIGF=/var/lib/connman/wired.config | ||
4 | |||
5 | # Extract wired network config from /proc/cmdline | ||
6 | NET_CONF=`cat /proc/cmdline |sed -ne 's/^.*ip=\([^ ]*\):\([^ ]*\):\([^ ]*\):\([^ ]*\).*$/\1\/\4\/\3/p'` | ||
7 | |||
8 | # Check if eth0 is already set via kernel cmdline | ||
9 | if [ "x$NET_CONF" = "x" ]; then | ||
10 | # Wired interface is not configured via kernel cmdline | ||
11 | # Remove connman config file template | ||
12 | rm -f ${CONFIGF} | ||
13 | else | ||
14 | # Setup a connman config accordingly | ||
15 | sed -i -e "s|^IPv4 =.*|IPv4 = ${NET_CONF}|" ${CONFIGF} | ||
16 | fi | ||
diff --git a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config b/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config deleted file mode 100644 index 42998ce897..0000000000 --- a/meta/recipes-connectivity/connman/connman-conf/qemuall/wired.config +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | [global] | ||
2 | Name = Wired | ||
3 | Description = Wired network configuration | ||
4 | |||
5 | [service_ethernet] | ||
6 | Type = ethernet | ||
7 | IPv4 = | ||
8 | MAC = 52:54:00:12:34:56 | ||
9 | Nameservers = 8.8.8.8 | ||
diff --git a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb index 55c687968f..8bfc1540b3 100644 --- a/meta/recipes-connectivity/connman/connman-gnome_0.7.bb +++ b/meta/recipes-connectivity/connman/connman-gnome_0.7.bb | |||
@@ -1,7 +1,7 @@ | |||
1 | SUMMARY = "GTK+ frontend for the ConnMan network connection manager" | 1 | SUMMARY = "GTK+ frontend for the ConnMan network connection manager" |
2 | HOMEPAGE = "http://connman.net/" | 2 | HOMEPAGE = "http://connman.net/" |
3 | SECTION = "libs/network" | 3 | SECTION = "libs/network" |
4 | LICENSE = "GPLv2 & LGPLv2.1" | 4 | LICENSE = "GPL-2.0-only & LGPL-2.1-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ |
6 | file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \ | 6 | file://properties/main.c;beginline=1;endline=20;md5=50c77c81871308b033ab7a1504626afb \ |
7 | file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a" | 7 | file://common/connman-dbus.c;beginline=1;endline=20;md5=de6b485c0e717a0236402d220187717a" |
@@ -10,7 +10,7 @@ DEPENDS = "gtk+3 dbus-glib dbus-glib-native intltool-native gettext-native" | |||
10 | 10 | ||
11 | # 0.7 tag | 11 | # 0.7 tag |
12 | SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143" | 12 | SRCREV = "cf3c325b23dae843c5499a113591cfbc98acb143" |
13 | SRC_URI = "git://github.com/connectivity/connman-gnome.git \ | 13 | SRC_URI = "git://github.com/connectivity/connman-gnome.git;branch=master;protocol=https \ |
14 | file://0001-Removed-icon-from-connman-gnome-about-applet.patch \ | 14 | file://0001-Removed-icon-from-connman-gnome-about-applet.patch \ |
15 | file://null_check_for_ipv4_config.patch \ | 15 | file://null_check_for_ipv4_config.patch \ |
16 | file://images/ \ | 16 | file://images/ \ |
@@ -18,13 +18,15 @@ SRC_URI = "git://github.com/connectivity/connman-gnome.git \ | |||
18 | file://0001-Port-to-Gtk3.patch \ | 18 | file://0001-Port-to-Gtk3.patch \ |
19 | " | 19 | " |
20 | 20 | ||
21 | S = "${WORKDIR}/git" | ||
22 | |||
23 | inherit autotools-brokensep gtk-icon-cache pkgconfig features_check | 21 | inherit autotools-brokensep gtk-icon-cache pkgconfig features_check |
24 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" | 22 | ANY_OF_DISTRO_FEATURES = "${GTK3DISTROFEATURES}" |
25 | 23 | ||
26 | RDEPENDS:${PN} = "connman" | 24 | RDEPENDS:${PN} = "connman" |
27 | 25 | ||
28 | do_install:append() { | 26 | do_install:append() { |
29 | install -m 0644 ${WORKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/ | 27 | install -m 0644 ${UNPACKDIR}/images/* ${D}/usr/share/icons/hicolor/22x22/apps/ |
30 | } | 28 | } |
29 | |||
30 | # http://errors.yoctoproject.org/Errors/Details/766926/ | ||
31 | # connman-client.c:200:15: error: assignment to 'GtkTreeModel *' {aka 'struct _GtkTreeModel *'} from incompatible pointer type 'GtkTreeStore *' {aka 'struct _GtkTreeStore *'} [-Wincompatible-pointer-types] | ||
32 | CFLAGS += "-Wno-error=incompatible-pointer-types" | ||
diff --git a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch b/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch deleted file mode 100644 index 8e2e0bd02d..0000000000 --- a/meta/recipes-connectivity/connman/connman/0001-connman.service-stop-systemd-resolved-when-we-use-co.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 9f70b94ebf18f52c115634642652830fa77f27a1 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Mon, 12 Jun 2017 16:52:39 +0300 | ||
4 | Subject: [PATCH] connman.service: stop systemd-resolved when we use connman | ||
5 | |||
6 | Stop systemd-resolved service when we use connman as network manager. | ||
7 | |||
8 | Upstream-Status: Inappropriate [configuration] | ||
9 | |||
10 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
11 | --- | ||
12 | src/connman.service.in | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/connman.service.in b/src/connman.service.in | ||
16 | index 9f5c10f..dab48bc 100644 | ||
17 | --- a/src/connman.service.in | ||
18 | +++ b/src/connman.service.in | ||
19 | @@ -6,6 +6,7 @@ RequiresMountsFor=@localstatedir@/lib/connman | ||
20 | After=dbus.service network-pre.target systemd-sysusers.service | ||
21 | Before=network.target multi-user.target shutdown.target | ||
22 | Wants=network.target | ||
23 | +Conflicts=systemd-resolved.service | ||
24 | |||
25 | [Service] | ||
26 | Type=dbus | ||
27 | -- | ||
28 | 2.4.0 | ||
29 | |||
diff --git a/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch b/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch deleted file mode 100644 index e6f03e632e..0000000000 --- a/meta/recipes-connectivity/connman/connman/0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | From 4ddaf78dad5a9ee4a0658235f71b75132192123e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 7 Apr 2012 18:52:12 -0700 | ||
4 | Subject: [PATCH] plugin.h: Change visibility to default for debug symbols | ||
5 | |||
6 | gold refuses to link in undefined weak symbols which | ||
7 | have hidden visibility | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | |||
12 | Upstream-Status: Pending | ||
13 | --- | ||
14 | include/plugin.h | 4 ++-- | ||
15 | 1 files changed, 2 insertions(+), 2 deletions(-) | ||
16 | |||
17 | diff --git a/include/plugin.h b/include/plugin.h | ||
18 | index 692a4e5..a9361c3 100644 | ||
19 | --- a/include/plugin.h | ||
20 | +++ b/include/plugin.h | ||
21 | @@ -89,9 +89,9 @@ struct connman_plugin_desc { | ||
22 | #else | ||
23 | #define CONNMAN_PLUGIN_DEFINE(name, description, version, priority, init, exit) \ | ||
24 | extern struct connman_debug_desc __start___debug[] \ | ||
25 | - __attribute__ ((weak, visibility("hidden"))); \ | ||
26 | + __attribute__ ((weak, visibility("default"))); \ | ||
27 | extern struct connman_debug_desc __stop___debug[] \ | ||
28 | - __attribute__ ((weak, visibility("hidden"))); \ | ||
29 | + __attribute__ ((weak, visibility("default"))); \ | ||
30 | extern struct connman_plugin_desc connman_plugin_desc \ | ||
31 | __attribute__ ((visibility("default"))); \ | ||
32 | struct connman_plugin_desc connman_plugin_desc = { \ | ||
33 | -- | ||
34 | 1.7.5.4 | ||
35 | |||
diff --git a/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch index 9dca21a02f..2c612039ee 100644 --- a/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch +++ b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch | |||
@@ -1,83 +1,85 @@ | |||
1 | From 01974865e4d331eeaf25248bee1bb96539c450d9 Mon Sep 17 00:00:00 2001 | 1 | From 4e726a5aaa75d60fab6a56bc37dbec48be53ff79 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 6 Apr 2015 23:02:21 -0700 | 3 | Date: Mon, 6 Apr 2015 23:02:21 -0700 |
4 | Subject: [PATCH] resolve: musl does not implement res_ninit | 4 | Subject: [PATCH] gweb/gresolv.c: make use of res_ninit optional and subject to |
5 | __RES | ||
5 | 6 | ||
6 | ported from | 7 | Not all libc implementation have those functions, and the way to determine |
8 | if they do is to check __RES which is explained in resolv.h thusly: | ||
9 | |||
10 | /* | ||
11 | * Revision information. This is the release date in YYYYMMDD format. | ||
12 | * It can change every day so the right thing to do with it is use it | ||
13 | * in preprocessor commands such as "#if (__RES > 19931104)". Do not | ||
14 | * compare for equality; rather, use it to determine whether your resolver | ||
15 | * is new enough to contain a certain feature. | ||
16 | */ | ||
17 | |||
18 | Indeed, it needs to be at least 19991006. | ||
19 | |||
20 | The portion of the patch that implements a fallback is ported from | ||
21 | Alpine Linux: | ||
7 | http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch | 22 | http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch |
8 | 23 | ||
9 | Upstream-Status: Pending | 24 | Upstream-Status: Submitted [to connman@lists.linux.dev,marcel@holtmann.org] |
10 | 25 | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 26 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | |||
13 | --- | 27 | --- |
14 | gweb/gresolv.c | 34 +++++++++++++--------------------- | 28 | gweb/gresolv.c | 21 +++++++++++++++++++++ |
15 | 1 file changed, 13 insertions(+), 21 deletions(-) | 29 | 1 file changed, 21 insertions(+) |
16 | 30 | ||
17 | diff --git a/gweb/gresolv.c b/gweb/gresolv.c | 31 | diff --git a/gweb/gresolv.c b/gweb/gresolv.c |
18 | index 954e7cf..2a9bc51 100644 | 32 | index 8101d71..9f1477c 100644 |
19 | --- a/gweb/gresolv.c | 33 | --- a/gweb/gresolv.c |
20 | +++ b/gweb/gresolv.c | 34 | +++ b/gweb/gresolv.c |
21 | @@ -36,6 +36,7 @@ | 35 | @@ -879,7 +879,9 @@ GResolv *g_resolv_new(int index) |
22 | #include <arpa/inet.h> | ||
23 | #include <arpa/nameser.h> | ||
24 | #include <net/if.h> | ||
25 | +#include <ctype.h> | ||
26 | |||
27 | #include "gresolv.h" | ||
28 | |||
29 | @@ -878,8 +879,6 @@ GResolv *g_resolv_new(int index) | ||
30 | resolv->index = index; | 36 | resolv->index = index; |
31 | resolv->nameserver_list = NULL; | 37 | resolv->nameserver_list = NULL; |
32 | 38 | ||
33 | - res_ninit(&resolv->res); | 39 | +#if (__RES >= 19991006) |
34 | - | 40 | res_ninit(&resolv->res); |
41 | +#endif | ||
42 | |||
35 | return resolv; | 43 | return resolv; |
36 | } | 44 | } |
37 | 45 | @@ -920,7 +922,9 @@ void g_resolv_unref(GResolv *resolv) | |
38 | @@ -919,8 +918,6 @@ void g_resolv_unref(GResolv *resolv) | ||
39 | 46 | ||
40 | flush_nameservers(resolv); | 47 | flush_nameservers(resolv); |
41 | 48 | ||
42 | - res_nclose(&resolv->res); | 49 | +#if (__RES >= 19991006) |
43 | - | 50 | res_nclose(&resolv->res); |
51 | +#endif | ||
52 | |||
44 | g_free(resolv); | 53 | g_free(resolv); |
45 | } | 54 | } |
46 | 55 | @@ -1024,6 +1028,7 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, | |
47 | @@ -1023,24 +1020,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, | ||
48 | debug(resolv, "hostname %s", hostname); | 56 | debug(resolv, "hostname %s", hostname); |
49 | 57 | ||
50 | if (!resolv->nameserver_list) { | 58 | if (!resolv->nameserver_list) { |
51 | - int i; | 59 | +#if (__RES >= 19991006) |
52 | - | 60 | int i; |
53 | - for (i = 0; i < resolv->res.nscount; i++) { | 61 | |
54 | - char buf[100]; | 62 | for (i = 0; i < resolv->res.nscount; i++) { |
55 | - int family = resolv->res.nsaddr_list[i].sin_family; | 63 | @@ -1043,6 +1048,22 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname, |
56 | - void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr; | 64 | if (inet_ntop(family, sa_addr, buf, sizeof(buf))) |
57 | - | 65 | g_resolv_add_nameserver(resolv, buf, 53, 0); |
58 | - if (family != AF_INET && | ||
59 | - resolv->res._u._ext.nsaddrs[i]) { | ||
60 | - family = AF_INET6; | ||
61 | - sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr; | ||
62 | + FILE *f = fopen("/etc/resolv.conf", "r"); | ||
63 | + if (f) { | ||
64 | + char line[256], *s; | ||
65 | + int i; | ||
66 | + while (fgets(line, sizeof(line), f)) { | ||
67 | + if (strncmp(line, "nameserver", 10) || !isspace(line[10])) | ||
68 | + continue; | ||
69 | + for (s = &line[11]; isspace(s[0]); s++); | ||
70 | + for (i = 0; s[i] && !isspace(s[i]); i++); | ||
71 | + s[i] = 0; | ||
72 | + g_resolv_add_nameserver(resolv, s, 53, 0); | ||
73 | } | ||
74 | - | ||
75 | - if (family != AF_INET && family != AF_INET6) | ||
76 | - continue; | ||
77 | - | ||
78 | - if (inet_ntop(family, sa_addr, buf, sizeof(buf))) | ||
79 | - g_resolv_add_nameserver(resolv, buf, 53, 0); | ||
80 | + fclose(f); | ||
81 | } | 66 | } |
67 | +#else | ||
68 | + FILE *f = fopen("/etc/resolv.conf", "r"); | ||
69 | + if (f) { | ||
70 | + char line[256], *s; | ||
71 | + int i; | ||
72 | + while (fgets(line, sizeof(line), f)) { | ||
73 | + if (strncmp(line, "nameserver", 10) || !isspace(line[10])) | ||
74 | + continue; | ||
75 | + for (s = &line[11]; isspace(s[0]); s++); | ||
76 | + for (i = 0; s[i] && !isspace(s[i]); i++); | ||
77 | + s[i] = 0; | ||
78 | + g_resolv_add_nameserver(resolv, s, 53, 0); | ||
79 | + } | ||
80 | + fclose(f); | ||
81 | + } | ||
82 | +#endif | ||
82 | 83 | ||
83 | if (!resolv->nameserver_list) | 84 | if (!resolv->nameserver_list) |
85 | g_resolv_add_nameserver(resolv, "127.0.0.1", 53, 0); | ||
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch new file mode 100644 index 0000000000..62f07e707a --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 8d3be0285f1d4667bfe85dba555c663eb3d704b4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yoonje Shin <ioerts@kookmin.ac.kr> | ||
3 | Date: Mon, 12 May 2025 10:48:18 +0200 | ||
4 | Subject: [PATCH] dnsproxy: Address CVE-2025-32366 vulnerability | ||
5 | |||
6 | In Connman parse_rr in dnsproxy.c has a memcpy length | ||
7 | that depends on an RR RDLENGTH value (i.e., *rdlen=ntohs(rr->rdlen) | ||
8 | and memcpy(response+offset,*end,*rdlen)). Here, rdlen may be larger | ||
9 | than the amount of remaining packet data in the current state of | ||
10 | parsing. As a result, values of stack memory locations may be sent | ||
11 | over the network in a response. | ||
12 | |||
13 | This patch adds a check to ensure that (*end + *rdlen) does not exceed | ||
14 | the valid range. If the condition is violated, the function returns | ||
15 | -EINVAL. | ||
16 | |||
17 | CVE: CVE-2025-32366 | ||
18 | |||
19 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=8d3be0285f1d4667bfe85dba555c663eb3d704b4] | ||
20 | |||
21 | Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> | ||
22 | --- | ||
23 | src/dnsproxy.c | 3 +++ | ||
24 | 1 file changed, 3 insertions(+) | ||
25 | |||
26 | diff --git a/src/dnsproxy.c b/src/dnsproxy.c | ||
27 | index 7ee26d9..1dd2f7f 100644 | ||
28 | --- a/src/dnsproxy.c | ||
29 | +++ b/src/dnsproxy.c | ||
30 | @@ -998,6 +998,9 @@ static int parse_rr(const unsigned char *buf, const unsigned char *start, | ||
31 | if ((offset + *rdlen) > *response_size) | ||
32 | return -ENOBUFS; | ||
33 | |||
34 | + if ((*end + *rdlen) > max) | ||
35 | + return -EINVAL; | ||
36 | + | ||
37 | memcpy(response + offset, *end, *rdlen); | ||
38 | |||
39 | *end += *rdlen; | ||
40 | -- | ||
41 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch new file mode 100644 index 0000000000..c114589679 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32743.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From d90b911f6760959bdf1393c39fe8d1118315490f Mon Sep 17 00:00:00 2001 | ||
2 | From: Praveen Kumar <praveen.kumar@windriver.com> | ||
3 | Date: Thu, 24 Apr 2025 11:39:29 +0000 | ||
4 | Subject: [PATCH] dnsproxy: Fix NULL/empty lookup causing potential crash | ||
5 | |||
6 | In ConnMan through 1.44, the lookup string in ns_resolv in dnsproxy.c | ||
7 | can be NULL or an empty string when the TC (Truncated) bit is set in | ||
8 | a DNS response. This allows attackers to cause a denial of service | ||
9 | (application crash) or possibly execute arbitrary code, because those | ||
10 | lookup values lead to incorrect length calculations and incorrect | ||
11 | memcpy operations. | ||
12 | |||
13 | This patch includes a check to make sure loookup value is valid before | ||
14 | using it. This helps avoid unexpected value when the input is empty or | ||
15 | incorrect. | ||
16 | |||
17 | Fixes: CVE-2025-32743 | ||
18 | |||
19 | CVE: CVE-2025-32743 | ||
20 | |||
21 | Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=d90b911f6760959bdf1393c39fe8d1118315490f] | ||
22 | |||
23 | Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com> | ||
24 | --- | ||
25 | src/dnsproxy.c | 7 ++++++- | ||
26 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/src/dnsproxy.c b/src/dnsproxy.c | ||
29 | index f28a5d7..7ee26d9 100644 | ||
30 | --- a/src/dnsproxy.c | ||
31 | +++ b/src/dnsproxy.c | ||
32 | @@ -1685,8 +1685,13 @@ static int ns_resolv(struct server_data *server, struct request_data *req, | ||
33 | gpointer request, gpointer name) | ||
34 | { | ||
35 | int sk = -1; | ||
36 | + int err; | ||
37 | const char *lookup = (const char *)name; | ||
38 | - int err = ns_try_resolv_from_cache(req, request, lookup); | ||
39 | + | ||
40 | + if (!lookup || strlen(lookup) == 0) | ||
41 | + return -EINVAL; | ||
42 | + | ||
43 | + err = ns_try_resolv_from_cache(req, request, lookup); | ||
44 | |||
45 | if (err > 0) | ||
46 | /* cache hit */ | ||
47 | -- | ||
48 | 2.40.0 | ||
diff --git a/meta/recipes-connectivity/connman/connman/connman b/meta/recipes-connectivity/connman/connman/connman index c64fa0d715..adb5d44fed 100644 --- a/meta/recipes-connectivity/connman/connman/connman +++ b/meta/recipes-connectivity/connman/connman/connman | |||
@@ -10,53 +10,15 @@ fi | |||
10 | 10 | ||
11 | set -e | 11 | set -e |
12 | 12 | ||
13 | nfsroot=0 | ||
14 | |||
15 | exec 9<&0 < /proc/mounts | ||
16 | while read dev mtpt fstype rest; do | ||
17 | if test $mtpt = "/" ; then | ||
18 | case $fstype in | ||
19 | nfs | nfs4) | ||
20 | nfsroot=1 | ||
21 | break | ||
22 | ;; | ||
23 | *) | ||
24 | ;; | ||
25 | esac | ||
26 | fi | ||
27 | done | ||
28 | |||
29 | do_start() { | 13 | do_start() { |
30 | EXTRA_PARAM="" | ||
31 | if test $nfsroot -eq 1 ; then | ||
32 | NET_DEVS=`cat /proc/net/dev | sed -ne 's/^\([a-zA-Z0-9 ]*\):.*$/\1/p'` | ||
33 | NET_ADDR=`cat /proc/cmdline | sed -ne 's/^.*ip=\([^ :]*\).*$/\1/p'` | ||
34 | |||
35 | if [ ! -z "$NET_ADDR" ]; then | ||
36 | if [ "$NET_ADDR" = dhcp ]; then | ||
37 | ethn=`ifconfig | grep "^eth" | sed -e "s/\(eth[0-9]\)\(.*\)/\1/"` | ||
38 | if [ ! -z "$ethn" ]; then | ||
39 | EXTRA_PARAM="-I $ethn" | ||
40 | fi | ||
41 | else | ||
42 | for i in $NET_DEVS; do | ||
43 | ADDR=`ifconfig $i | sed 's/addr://g' | sed -ne 's/^.*inet \([0-9.]*\) .*$/\1/p'` | ||
44 | if [ "$NET_ADDR" = "$ADDR" ]; then | ||
45 | EXTRA_PARAM="-I $i" | ||
46 | break | ||
47 | fi | ||
48 | done | ||
49 | fi | ||
50 | fi | ||
51 | fi | ||
52 | if [ -f @DATADIR@/connman/wired-setup ] ; then | 14 | if [ -f @DATADIR@/connman/wired-setup ] ; then |
53 | . @DATADIR@/connman/wired-setup | 15 | . @DATADIR@/connman/wired-setup |
54 | fi | 16 | fi |
55 | $DAEMON $EXTRA_PARAM | 17 | $DAEMON |
56 | } | 18 | } |
57 | 19 | ||
58 | do_stop() { | 20 | do_stop() { |
59 | start-stop-daemon --stop --name connmand --quiet | 21 | start-stop-daemon --stop --oknodo --name connmand --quiet |
60 | } | 22 | } |
61 | 23 | ||
62 | case "$1" in | 24 | case "$1" in |
diff --git a/meta/recipes-connectivity/connman/connman/no-version-scripts.patch b/meta/recipes-connectivity/connman/connman/no-version-scripts.patch deleted file mode 100644 index e96e38bcf9..0000000000 --- a/meta/recipes-connectivity/connman/connman/no-version-scripts.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | With binutils 2.27 on at least MIPS, connmand will crash on startup. This | ||
2 | appears to be due to the symbol visibilty scripts hiding symbols that stdio | ||
3 | looks up at runtime, resulting in it segfaulting. | ||
4 | |||
5 | This certainly appears to be a bug in binutils 2.27 although the problem has | ||
6 | been known about for some time: | ||
7 | |||
8 | https://sourceware.org/bugzilla/show_bug.cgi?id=17908 | ||
9 | |||
10 | As the version scripts are only used to hide symbols from plugins we can safely | ||
11 | remove the scripts to work around the problem until binutils is fixed. | ||
12 | |||
13 | Upstream-Status: Inappropriate | ||
14 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
15 | |||
16 | diff --git a/Makefile.am b/Makefile.am | ||
17 | index d70725c..76ae432 100644 | ||
18 | --- a/Makefile.am | ||
19 | +++ b/Makefile.am | ||
20 | @@ -132,2 +132 @@ src_connmand_LDADD = gdbus/libgdbus-internal.la $(builtin_libadd) \ | ||
21 | -src_connmand_LDFLAGS = -Wl,--export-dynamic \ | ||
22 | - -Wl,--version-script=$(srcdir)/src/connman.ver | ||
23 | +src_connmand_LDFLAGS = -Wl,--export-dynamic | ||
24 | @@ -166,2 +165 @@ vpn_connman_vpnd_LDADD = gdbus/libgdbus-internal.la $(builtin_vpn_libadd) \ | ||
25 | -vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic \ | ||
26 | - -Wl,--version-script=$(srcdir)/vpn/vpn.ver | ||
27 | +vpn_connman_vpnd_LDFLAGS = -Wl,--export-dynamic | ||
diff --git a/meta/recipes-connectivity/connman/connman_1.40.bb b/meta/recipes-connectivity/connman/connman_1.40.bb deleted file mode 100644 index edb23a1267..0000000000 --- a/meta/recipes-connectivity/connman/connman_1.40.bb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | require connman.inc | ||
2 | |||
3 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ | ||
4 | file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \ | ||
5 | file://0001-connman.service-stop-systemd-resolved-when-we-use-co.patch \ | ||
6 | file://connman \ | ||
7 | file://no-version-scripts.patch \ | ||
8 | " | ||
9 | |||
10 | SRC_URI:append:libc-musl = " file://0002-resolve-musl-does-not-implement-res_ninit.patch" | ||
11 | |||
12 | SRC_URI[sha256sum] = "1a57ae7ce234aa3a1744aac3be5c2121d98dce999440ef8ab9cc4edfd5edcb12" | ||
13 | |||
14 | RRECOMMENDS:${PN} = "connman-conf" | ||
15 | RCONFLICTS:${PN} = "networkmanager" | ||
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman_1.44.bb index 748eefa748..1b0fbe438c 100644 --- a/meta/recipes-connectivity/connman/connman.inc +++ b/meta/recipes-connectivity/connman/connman_1.44.bb | |||
@@ -7,9 +7,8 @@ It is a fully modular system that can be extended, through plug-ins, \ | |||
7 | to support all kinds of wired or wireless technologies. Also, \ | 7 | to support all kinds of wired or wireless technologies. Also, \ |
8 | configuration methods, like DHCP and domain name resolving, are \ | 8 | configuration methods, like DHCP and domain name resolving, are \ |
9 | implemented using plug-ins." | 9 | implemented using plug-ins." |
10 | HOMEPAGE = "http://connman.net/" | 10 | HOMEPAGE = "https://web.git.kernel.org/pub/scm/network/connman/connman.git/about/" |
11 | BUGTRACKER = "https://01.org/jira/browse/CM" | 11 | LICENSE = "GPL-2.0-only" |
12 | LICENSE = "GPLv2" | ||
13 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ |
14 | file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" | 13 | file://src/main.c;beginline=1;endline=20;md5=486a279a6ab0c8d152bcda3a5b5edc36" |
15 | 14 | ||
@@ -17,21 +16,42 @@ inherit autotools pkgconfig systemd update-rc.d update-alternatives | |||
17 | 16 | ||
18 | CVE_PRODUCT = "connman connection_manager" | 17 | CVE_PRODUCT = "connman connection_manager" |
19 | 18 | ||
20 | DEPENDS = "dbus glib-2.0 ppp" | 19 | DEPENDS = "dbus glib-2.0" |
20 | |||
21 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ | ||
22 | file://connman \ | ||
23 | file://0002-resolve-musl-does-not-implement-res_ninit.patch \ | ||
24 | file://CVE-2025-32743.patch \ | ||
25 | file://CVE-2025-32366.patch \ | ||
26 | " | ||
27 | |||
28 | SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff" | ||
29 | |||
30 | RRECOMMENDS:${PN} = "connman-conf" | ||
31 | RCONFLICTS:${PN} = "networkmanager" | ||
21 | 32 | ||
22 | EXTRA_OECONF += "\ | 33 | EXTRA_OECONF += "\ |
23 | ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ | 34 | ac_cv_path_IP6TABLES_SAVE=${sbindir}/ip6tables-save \ |
35 | ac_cv_path_IPTABLES_SAVE=${sbindir}/iptables-save \ | ||
24 | ac_cv_path_PPPD=${sbindir}/pppd \ | 36 | ac_cv_path_PPPD=${sbindir}/pppd \ |
37 | ac_cv_path_WPASUPPLICANT=${sbindir}/wpa_supplicant \ | ||
25 | --enable-debug \ | 38 | --enable-debug \ |
26 | --enable-loopback \ | 39 | --enable-loopback \ |
27 | --enable-ethernet \ | 40 | --enable-ethernet \ |
28 | --enable-tools \ | 41 | --enable-tools \ |
29 | --disable-polkit \ | 42 | --disable-polkit \ |
43 | --runstatedir='${runtimedir}' \ | ||
44 | --with-dns-backend='${@bb.utils.contains("DISTRO_FEATURES", "systemd-resolved", "systemd-resolved", "internal", d)}' \ | ||
30 | " | 45 | " |
46 | # For smooth operation it would be best to start only one wireless daemon at a time. | ||
47 | # If wpa-supplicant is running, connman will use it preferentially. | ||
48 | # Select either wpa-supplicant or iwd | ||
49 | WIRELESS_DAEMON ??= "wpa-supplicant" | ||
31 | 50 | ||
32 | PACKAGECONFIG ??= "wispr iptables client\ | 51 | PACKAGECONFIG ??= "wispr iptables client\ |
33 | ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd wifi', d)} \ | 52 | ${@bb.utils.filter('DISTRO_FEATURES', '3g systemd', d)} \ |
34 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ | 53 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez', '', d)} \ |
54 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi', 'wifi ${WIRELESS_DAEMON}', '', d)} \ | ||
35 | " | 55 | " |
36 | 56 | ||
37 | # If you want ConnMan to support VPN, add following statement into | 57 | # If you want ConnMan to support VPN, add following statement into |
@@ -39,18 +59,20 @@ PACKAGECONFIG ??= "wispr iptables client\ | |||
39 | # PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp" | 59 | # PACKAGECONFIG:append:pn-connman = " openvpn vpnc l2tp pptp" |
40 | 60 | ||
41 | PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" | 61 | PACKAGECONFIG[systemd] = "--with-systemdunitdir=${systemd_system_unitdir}/ --with-tmpfilesdir=${sysconfdir}/tmpfiles.d/,--with-systemdunitdir='' --with-tmpfilesdir=''" |
42 | PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, wpa-supplicant, wpa-supplicant" | 62 | PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi" |
43 | PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" | 63 | PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5, bluez5" |
44 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" | 64 | PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono" |
65 | PACKAGECONFIG[wpa-supplicant] = ",,wpa-supplicant,wpa-supplicant" | ||
66 | PACKAGECONFIG[iwd] = "--enable-iwd,--disable-iwd,,iwd" | ||
45 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," | 67 | PACKAGECONFIG[tist] = "--enable-tist,--disable-tist," |
46 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" | 68 | PACKAGECONFIG[openvpn] = "--enable-openvpn --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn" |
47 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" | 69 | PACKAGECONFIG[vpnc] = "--enable-vpnc --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc" |
48 | PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd" | 70 | PACKAGECONFIG[l2tp] = "--enable-l2tp --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,ppp,xl2tpd" |
49 | PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux" | 71 | PACKAGECONFIG[pptp] = "--enable-pptp --with-pptp=${sbindir}/pptp,--disable-pptp,ppp,pptp-linux" |
50 | # WISPr support for logging into hotspots, requires TLS | 72 | # WISPr support for logging into hotspots, requires TLS |
51 | PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," | 73 | PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls," |
52 | PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat" | 74 | PACKAGECONFIG[nftables] = "--with-firewall=nftables ,,libmnl libnftnl,,kernel-module-nf-tables kernel-module-nft-chain-nat-ipv4 kernel-module-nft-chain-route-ipv4 kernel-module-nft-masq-ipv4 kernel-module-nft-nat,iptables" |
53 | PACKAGECONFIG[iptables] = "--with-firewall=iptables ,,iptables,iptables" | 75 | PACKAGECONFIG[iptables] = "--with-firewall=iptables,,iptables,,,nftables" |
54 | PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" | 76 | PACKAGECONFIG[nfc] = "--enable-neard, --disable-neard, neard, neard" |
55 | PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" | 77 | PACKAGECONFIG[client] = "--enable-client,--disable-client,readline" |
56 | PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" | 78 | PACKAGECONFIG[wireguard] = "--enable-wireguard,--disable-wireguard,libmnl" |
@@ -70,7 +92,7 @@ SYSTEMD_SERVICE:${PN} = "connman.service" | |||
70 | SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" | 92 | SYSTEMD_SERVICE:${PN}-vpn = "connman-vpn.service" |
71 | SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" | 93 | SYSTEMD_SERVICE:${PN}-wait-online = "connman-wait-online.service" |
72 | 94 | ||
73 | ALTERNATIVE_PRIORITY = "100" | 95 | ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd-resolved','10','100',d)}" |
74 | ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" | 96 | ALTERNATIVE:${PN} = "${@bb.utils.contains('DISTRO_FEATURES','systemd','resolv-conf','',d)}" |
75 | ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" | 97 | ALTERNATIVE_TARGET[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv-conf.connman','',d)}" |
76 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" | 98 | ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','systemd','${sysconfdir}/resolv.conf','',d)}" |
@@ -78,7 +100,7 @@ ALTERNATIVE_LINK_NAME[resolv-conf] = "${@bb.utils.contains('DISTRO_FEATURES','sy | |||
78 | do_install:append() { | 100 | do_install:append() { |
79 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 101 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
80 | install -d ${D}${sysconfdir}/init.d | 102 | install -d ${D}${sysconfdir}/init.d |
81 | install -m 0755 ${WORKDIR}/connman ${D}${sysconfdir}/init.d/connman | 103 | install -m 0755 ${UNPACKDIR}/connman ${D}${sysconfdir}/init.d/connman |
82 | sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman | 104 | sed -i s%@DATADIR@%${datadir}% ${D}${sysconfdir}/init.d/connman |
83 | fi | 105 | fi |
84 | 106 | ||
@@ -95,10 +117,11 @@ do_install:append() { | |||
95 | # plugins directory to be present for ownership | 117 | # plugins directory to be present for ownership |
96 | mkdir -p ${D}${libdir}/connman/plugins | 118 | mkdir -p ${D}${libdir}/connman/plugins |
97 | 119 | ||
98 | # For read-only filesystem, do not create links during bootup | 120 | # For read-only filesystem, do not create links during bootup |
99 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | 121 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
100 | ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman | 122 | install -d ${D}${sysconfdir} |
101 | fi | 123 | ln -sf ../run/connman/resolv.conf ${D}${sysconfdir}/resolv-conf.connman |
124 | fi | ||
102 | } | 125 | } |
103 | 126 | ||
104 | # These used to be plugins, but now they are core | 127 | # These used to be plugins, but now they are core |
@@ -110,10 +133,6 @@ RPROVIDES:${PN} = "\ | |||
110 | ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ | 133 | ${@bb.utils.contains('PACKAGECONFIG', '3g','connman-plugin-ofono', '', d)} \ |
111 | " | 134 | " |
112 | 135 | ||
113 | RDEPENDS:${PN} = "\ | ||
114 | dbus \ | ||
115 | " | ||
116 | |||
117 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*" | 136 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*" |
118 | 137 | ||
119 | def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): | 138 | def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip): |
@@ -147,12 +166,13 @@ python populate_packages:prepend() { | |||
147 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" | 166 | PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client" |
148 | 167 | ||
149 | FILES:${PN}-tools = "${bindir}/wispr" | 168 | FILES:${PN}-tools = "${bindir}/wispr" |
150 | RDEPENDS:${PN}-tools ="${PN}" | 169 | RDEPENDS:${PN}-tools = "${PN}" |
151 | 170 | ||
152 | FILES:${PN}-tests = "${bindir}/*-test" | 171 | FILES:${PN}-tests = "${bindir}/*-test" |
172 | RDEPENDS:${PN}-tests = "${@bb.utils.contains('PACKAGECONFIG', 'iptables', 'iptables', '', d)}" | ||
153 | 173 | ||
154 | FILES:${PN}-client = "${bindir}/connmanctl" | 174 | FILES:${PN}-client = "${bindir}/connmanctl" |
155 | RDEPENDS:${PN}-client ="${PN}" | 175 | RDEPENDS:${PN}-client = "${PN}" |
156 | 176 | ||
157 | FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ | 177 | FILES:${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*.so.* \ |
158 | ${libdir}/connman/plugins \ | 178 | ${libdir}/connman/plugins \ |
diff --git a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.0.bb b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb index dbad8c8728..bfb24aa58c 100644 --- a/meta/recipes-connectivity/dhcpcd/dhcpcd_9.4.0.bb +++ b/meta/recipes-connectivity/dhcpcd/dhcpcd_10.2.4.bb | |||
@@ -7,19 +7,19 @@ DESCRIPTION = "dhcpcd runs on your machine and silently configures your \ | |||
7 | HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" | 7 | HOMEPAGE = "http://roy.marples.name/projects/dhcpcd/" |
8 | 8 | ||
9 | LICENSE = "BSD-2-Clause" | 9 | LICENSE = "BSD-2-Clause" |
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=9674cc803c5d71306941e6e8b5c002f2" | 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=4dda5beb433a809f2e0aeffbf9da3d91" |
11 | 11 | ||
12 | UPSTREAM_CHECK_URI = "https://roy.marples.name/downloads/dhcpcd/" | 12 | SRC_URI = "git://github.com/NetworkConfiguration/dhcpcd;protocol=https;branch=master \ |
13 | |||
14 | SRC_URI = "https://roy.marples.name/downloads/${BPN}/${BPN}-${PV}.tar.xz \ | ||
15 | file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ | 13 | file://0001-remove-INCLUDEDIR-to-prevent-build-issues.patch \ |
16 | file://0002-src-privsep-linux.c-add-support-for-arc-28.patch \ | 14 | file://0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch \ |
17 | file://dhcpcd.service \ | 15 | file://dhcpcd.service \ |
18 | file://dhcpcd@.service \ | 16 | file://dhcpcd@.service \ |
17 | file://0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch \ | ||
19 | " | 18 | " |
20 | 19 | ||
21 | SRC_URI[sha256sum] = "41a69297f380bf15ee8f94f73154f8c2bca7157a087c0d5aca8de000ba1d4513" | 20 | SRCREV = "93df2b254caf9639f9ffb66e0fe2b584eeba6220" |
22 | 21 | ||
22 | # Doesn't use automake so we can't do out-of-tree builds | ||
23 | inherit pkgconfig autotools-brokensep systemd useradd | 23 | inherit pkgconfig autotools-brokensep systemd useradd |
24 | 24 | ||
25 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" | 25 | SYSTEMD_SERVICE:${PN} = "dhcpcd.service" |
@@ -33,8 +33,11 @@ PACKAGECONFIG[ntp] = "--with-hook=ntp, , ,ntp" | |||
33 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" | 33 | PACKAGECONFIG[chrony] = "--with-hook=ntp, , ,chrony" |
34 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" | 34 | PACKAGECONFIG[ypbind] = "--with-eghook=yp, , ,ypbind-mt" |
35 | 35 | ||
36 | # add option to override DBDIR location | ||
37 | DBDIR ?= "${localstatedir}/lib/${BPN}" | ||
38 | |||
36 | EXTRA_OECONF = "--enable-ipv4 \ | 39 | EXTRA_OECONF = "--enable-ipv4 \ |
37 | --dbdir=${localstatedir}/lib/${BPN} \ | 40 | --dbdir=${DBDIR} \ |
38 | --sbindir=${base_sbindir} \ | 41 | --sbindir=${base_sbindir} \ |
39 | --runstatedir=/run \ | 42 | --runstatedir=/run \ |
40 | --enable-privsep \ | 43 | --enable-privsep \ |
@@ -44,15 +47,21 @@ EXTRA_OECONF = "--enable-ipv4 \ | |||
44 | " | 47 | " |
45 | 48 | ||
46 | USERADD_PACKAGES = "${PN}" | 49 | USERADD_PACKAGES = "${PN}" |
47 | USERADD_PARAM:${PN} = "--system -d ${localstatedir}/lib/${BPN} -M -s /bin/false -U dhcpcd" | 50 | USERADD_PARAM:${PN} = "--system -d ${DBDIR} -M -s /bin/false -U dhcpcd" |
51 | |||
52 | # This isn't autoconf but is instead a configure script that tries to look like | ||
53 | # autoconf, so just run it directly. | ||
54 | do_configure() { | ||
55 | oe_runconf | ||
56 | } | ||
48 | 57 | ||
49 | do_install:append () { | 58 | do_install:append () { |
50 | # install systemd unit files | 59 | # install systemd unit files |
51 | install -d ${D}${systemd_system_unitdir} | 60 | install -d ${D}${systemd_system_unitdir} |
52 | install -m 0644 ${WORKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} | 61 | install -m 0644 ${UNPACKDIR}/dhcpcd*.service ${D}${systemd_system_unitdir} |
53 | 62 | ||
54 | chmod 700 ${D}${localstatedir}/lib/${BPN} | 63 | chmod 700 ${D}${DBDIR} |
55 | chown dhcpcd:dhcpcd ${D}${localstatedir}/lib/${BPN} | 64 | chown dhcpcd:dhcpcd ${D}${DBDIR} |
56 | } | 65 | } |
57 | 66 | ||
58 | FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" | 67 | FILES:${PN}-dbg += "${libdir}/dhcpcd/dev/.debug" |
diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch b/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch new file mode 100644 index 0000000000..512e33aebf --- /dev/null +++ b/meta/recipes-connectivity/dhcpcd/files/0001-20-resolv.conf-improve-the-sitation-of-working-with-.patch | |||
@@ -0,0 +1,79 @@ | |||
1 | From d1581ce103db0a5db0b1761907fff9ddd6b55a8a Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Wed, 9 Nov 2022 16:33:18 +0800 | ||
4 | Subject: [PATCH] 20-resolv.conf: improve the sitation of working with systemd | ||
5 | |||
6 | systemd's resolvconf implementation ignores the protocol part. | ||
7 | See https://github.com/systemd/systemd/issues/25032. | ||
8 | |||
9 | When using 'dhcp server + dns server + dhcpcd + systemd', we | ||
10 | get an integration issue, that is dhcpcd runs 'resolvconf -d eth0.ra', | ||
11 | yet systemd's resolvconf treats it as eth0. This will delete the | ||
12 | DNS information set by 'resolvconf -a eth0.dhcp'. | ||
13 | |||
14 | Fortunately, 20-resolv.conf has the ability to build the resolv.conf | ||
15 | file contents itself. We can just pass the generated contents to | ||
16 | systemd's resolvconf. This way, the DNS information is not incorrectly | ||
17 | deleted. Also, it does not cause behavior regression for dhcpcd | ||
18 | in other cases. | ||
19 | |||
20 | Upstream-Status: Inappropriate [OE Specific] | ||
21 | This patch has been rejected by dhcpcd upstream. | ||
22 | See details in https://github.com/NetworkConfiguration/dhcpcd/pull/152 | ||
23 | |||
24 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
25 | --- | ||
26 | hooks/20-resolv.conf | 17 +++++++++++++---- | ||
27 | 1 file changed, 13 insertions(+), 4 deletions(-) | ||
28 | |||
29 | diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf | ||
30 | index bd0b0df5..9c7721de 100644 | ||
31 | --- a/hooks/20-resolv.conf | ||
32 | +++ b/hooks/20-resolv.conf | ||
33 | @@ -11,8 +11,12 @@ nocarrier_roaming_dir="$state_dir/roaming" | ||
34 | NL=" | ||
35 | " | ||
36 | : ${resolvconf:=resolvconf} | ||
37 | +resolvconf_from_systemd=false | ||
38 | if command -v "$resolvconf" >/dev/null 2>&1; then | ||
39 | have_resolvconf=true | ||
40 | + if [ $(basename $(readlink -f $(which $resolvconf))) = resolvectl ]; then | ||
41 | + resolvconf_from_systemd=true | ||
42 | + fi | ||
43 | else | ||
44 | have_resolvconf=false | ||
45 | fi | ||
46 | @@ -69,8 +73,13 @@ build_resolv_conf() | ||
47 | else | ||
48 | echo "# /etc/resolv.conf.tail can replace this line" >> "$cf" | ||
49 | fi | ||
50 | - if change_file /etc/resolv.conf "$cf"; then | ||
51 | - chmod 644 /etc/resolv.conf | ||
52 | + if $resolvconf_from_systemd; then | ||
53 | + [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric" | ||
54 | + "$resolvconf" -a "$ifname" <"$cf" | ||
55 | + else | ||
56 | + if change_file /etc/resolv.conf "$cf"; then | ||
57 | + chmod 644 /etc/resolv.conf | ||
58 | + fi | ||
59 | fi | ||
60 | rm -f "$cf" | ||
61 | } | ||
62 | @@ -179,7 +188,7 @@ add_resolv_conf() | ||
63 | for x in ${new_domain_name_servers}; do | ||
64 | conf="${conf}nameserver $x$NL" | ||
65 | done | ||
66 | - if $have_resolvconf; then | ||
67 | + if $have_resolvconf && ! $resolvconf_from_systemd; then | ||
68 | [ -n "$ifmetric" ] && export IF_METRIC="$ifmetric" | ||
69 | printf %s "$conf" | "$resolvconf" -a "$ifname" | ||
70 | return $? | ||
71 | @@ -195,7 +204,7 @@ add_resolv_conf() | ||
72 | |||
73 | remove_resolv_conf() | ||
74 | { | ||
75 | - if $have_resolvconf; then | ||
76 | + if $have_resolvconf && ($if_down || ! $resolvconf_from_systemd); then | ||
77 | "$resolvconf" -d "$ifname" -f | ||
78 | else | ||
79 | if [ -e "$resolv_conf_dir/$ifname" ]; then | ||
diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch b/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch new file mode 100644 index 0000000000..484b84f94a --- /dev/null +++ b/meta/recipes-connectivity/dhcpcd/files/0001-dhcpcd.8-Fix-conflict-error-when-enable-multilib.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From e9b1376c59b15e7b03611429187d9d89167154b5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Lei Maohui <leimaohui@fujitsu.com> | ||
3 | Date: Fri, 10 Mar 2023 03:48:46 +0000 | ||
4 | Subject: [PATCH] dhcpcd.8: Fix conflict error when enable multilib. | ||
5 | |||
6 | Error: Transaction test error: | ||
7 | file /usr/share/man/man8/dhcpcd.8 conflicts between attempted | ||
8 | installs of dhcpcd-doc-9.4.1-r0.cortexa57 and | ||
9 | lib32-dhcpcd-doc-9.4.1-r0.armv7ahf_neon | ||
10 | |||
11 | The differences between the two files are as follows: | ||
12 | @@ -821,7 +821,7 @@ | ||
13 | If you always use the same options, put them here. | ||
14 | .It Pa /usr/libexec/dhcpcd-run-hooks | ||
15 | Bourne shell script that is run to configure or de-configure an interface. | ||
16 | -.It Pa /usr/lib64/dhcpcd/dev | ||
17 | +.It Pa /usr/lib/dhcpcd/dev | ||
18 | Linux | ||
19 | .Pa /dev | ||
20 | management modules. | ||
21 | |||
22 | It is just a man file, there is no necessary to manage multiple | ||
23 | versions. | ||
24 | |||
25 | Upstream-Status: Inappropriate [oe specific] | ||
26 | Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> | ||
27 | --- | ||
28 | src/dhcpcd.8.in | 2 +- | ||
29 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
30 | |||
31 | diff --git a/src/dhcpcd.8.in b/src/dhcpcd.8.in | ||
32 | index 91fdde2c..b467dc3b 100644 | ||
33 | --- a/src/dhcpcd.8.in | ||
34 | +++ b/src/dhcpcd.8.in | ||
35 | @@ -826,7 +826,7 @@ Configuration file for dhcpcd. | ||
36 | If you always use the same options, put them here. | ||
37 | .It Pa @SCRIPT@ | ||
38 | Bourne shell script that is run to configure or de-configure an interface. | ||
39 | -.It Pa @LIBDIR@/dhcpcd/dev | ||
40 | +.It Pa /usr/<libdir>/dhcpcd/dev | ||
41 | Linux | ||
42 | .Pa /dev | ||
43 | management modules. | ||
diff --git a/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch b/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch index 37d2344438..fd3fae7e7e 100644 --- a/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch +++ b/meta/recipes-connectivity/dhcpcd/files/0001-remove-INCLUDEDIR-to-prevent-build-issues.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From aa9e3982c1e75ad49945a62f5e262279c7a905a4 Mon Sep 17 00:00:00 2001 | 1 | From c2ebc32112e0cd29390b4dc951b65efae36d607b Mon Sep 17 00:00:00 2001 |
2 | From: Stefano Cappa <stefano.cappa.ks89@gmail.com> | 2 | From: Stefano Cappa <stefano.cappa.ks89@gmail.com> |
3 | Date: Sun, 13 Jan 2019 01:50:52 +0100 | 3 | Date: Sun, 13 Jan 2019 01:50:52 +0100 |
4 | Subject: [PATCH] remove INCLUDEDIR to prevent build issues | 4 | Subject: [PATCH] remove INCLUDEDIR to prevent build issues |
@@ -11,10 +11,10 @@ Signed-off-by: Stefano Cappa <stefano.cappa.ks89@gmail.com> | |||
11 | 1 file changed, 5 deletions(-) | 11 | 1 file changed, 5 deletions(-) |
12 | 12 | ||
13 | diff --git a/configure b/configure | 13 | diff --git a/configure b/configure |
14 | index 6c81e0db..32dea2b4 100755 | 14 | index a60da137..3673de8b 100755 |
15 | --- a/configure | 15 | --- a/configure |
16 | +++ b/configure | 16 | +++ b/configure |
17 | @@ -20,7 +20,6 @@ BUILD= | 17 | @@ -26,7 +26,6 @@ BUILD= |
18 | HOST= | 18 | HOST= |
19 | HOSTCC= | 19 | HOSTCC= |
20 | TARGET= | 20 | TARGET= |
@@ -22,7 +22,7 @@ index 6c81e0db..32dea2b4 100755 | |||
22 | DEBUG= | 22 | DEBUG= |
23 | FORK= | 23 | FORK= |
24 | STATIC= | 24 | STATIC= |
25 | @@ -72,7 +71,6 @@ for x do | 25 | @@ -89,7 +88,6 @@ for x do |
26 | --mandir) MANDIR=$var;; | 26 | --mandir) MANDIR=$var;; |
27 | --datadir) DATADIR=$var;; | 27 | --datadir) DATADIR=$var;; |
28 | --with-ccopts|CFLAGS) CFLAGS=$var;; | 28 | --with-ccopts|CFLAGS) CFLAGS=$var;; |
@@ -30,7 +30,7 @@ index 6c81e0db..32dea2b4 100755 | |||
30 | CC) CC=$var;; | 30 | CC) CC=$var;; |
31 | CPPFLAGS) CPPFLAGS=$var;; | 31 | CPPFLAGS) CPPFLAGS=$var;; |
32 | PKG_CONFIG) PKG_CONFIG=$var;; | 32 | PKG_CONFIG) PKG_CONFIG=$var;; |
33 | @@ -309,9 +307,6 @@ if [ -n "$CPPFLAGS" ]; then | 33 | @@ -346,9 +344,6 @@ if [ -n "$CPPFLAGS" ]; then |
34 | echo "CPPFLAGS=" >>$CONFIG_MK | 34 | echo "CPPFLAGS=" >>$CONFIG_MK |
35 | echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK | 35 | echo "CPPFLAGS+= $CPPFLAGS" >>$CONFIG_MK |
36 | fi | 36 | fi |
@@ -40,6 +40,3 @@ index 6c81e0db..32dea2b4 100755 | |||
40 | if [ -n "$LDFLAGS" ]; then | 40 | if [ -n "$LDFLAGS" ]; then |
41 | echo "LDFLAGS=" >>$CONFIG_MK | 41 | echo "LDFLAGS=" >>$CONFIG_MK |
42 | echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK | 42 | echo "LDFLAGS+= $LDFLAGS" >>$CONFIG_MK |
43 | -- | ||
44 | 2.17.2 (Apple Git-113) | ||
45 | |||
diff --git a/meta/recipes-connectivity/dhcpcd/files/0002-src-privsep-linux.c-add-support-for-arc-28.patch b/meta/recipes-connectivity/dhcpcd/files/0002-src-privsep-linux.c-add-support-for-arc-28.patch deleted file mode 100644 index 045f06a9aa..0000000000 --- a/meta/recipes-connectivity/dhcpcd/files/0002-src-privsep-linux.c-add-support-for-arc-28.patch +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | From 82386110e67cf75c224e9817fce55e6b0f143266 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
3 | Date: Mon, 8 Feb 2021 07:23:54 +0100 | ||
4 | Subject: [PATCH] src/privsep-linux.c: add support for arc (#28) | ||
5 | |||
6 | Fix the following build failure: | ||
7 | |||
8 | privsep-linux.c:206:4: error: #error "Platform does not support seccomp filter yet" | ||
9 | # error "Platform does not support seccomp filter yet" | ||
10 | ^~~~~ | ||
11 | In file included from privsep-linux.c:36: | ||
12 | privsep-linux.c:213:38: error: 'SECCOMP_AUDIT_ARCH' undeclared here (not in a function); did you mean 'SECCOMP_ALLOW_ARG'? | ||
13 | BPF_JUMP(BPF_JMP + BPF_JEQ + BPF_K, SECCOMP_AUDIT_ARCH, 1, 0), | ||
14 | ^~~~~~~~~~~~~~~~~~ | ||
15 | |||
16 | It should be noted that AUDIT_ARCH_{ARCOMPACT,ARCV2} is only defined | ||
17 | since kernel 5.2 and | ||
18 | https://github.com/torvalds/linux/commit/67f2a8a29311841ba6ab9b0e2d1b8f1e9978cd84 | ||
19 | |||
20 | Detection of arc compact and arc v2 have been "copy/pasted" from | ||
21 | https://github.com/wbx-github/uclibc-ng/commit/afab56958f1cbb47b831ee3ebff231dfbae74af2 | ||
22 | |||
23 | Fixes: | ||
24 | - http://autobuild.buildroot.org/results/d29083700a80dd647621eed06faeeae03f0587d3 | ||
25 | |||
26 | Upstream-Status: Backport [https://github.com/NetworkConfiguration/dhcpcd/commit/82386110e67cf75c224e9817fce55e6b0f143266] | ||
27 | |||
28 | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
29 | Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> | ||
30 | --- | ||
31 | src/privsep-linux.c | 16 ++++++++++++++++ | ||
32 | 1 file changed, 16 insertions(+) | ||
33 | |||
34 | diff --git a/src/privsep-linux.c b/src/privsep-linux.c | ||
35 | index 402667af..21d41a9a 100644 | ||
36 | --- a/src/privsep-linux.c | ||
37 | +++ b/src/privsep-linux.c | ||
38 | @@ -149,6 +149,22 @@ ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg) | ||
39 | # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_I386 | ||
40 | #elif defined(__x86_64__) | ||
41 | # define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64 | ||
42 | +#elif defined(__arc__) | ||
43 | +# if defined(__A7__) | ||
44 | +# if (BYTE_ORDER == LITTLE_ENDIAN) | ||
45 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCOMPACT | ||
46 | +# else | ||
47 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCOMPACTBE | ||
48 | +# endif | ||
49 | +# elif defined(__HS__) | ||
50 | +# if (BYTE_ORDER == LITTLE_ENDIAN) | ||
51 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCV2 | ||
52 | +# else | ||
53 | +# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARCV2BE | ||
54 | +# endif | ||
55 | +# else | ||
56 | +# error "Platform does not support seccomp filter yet" | ||
57 | +# endif | ||
58 | #elif defined(__arm__) | ||
59 | # ifndef EM_ARM | ||
60 | # define EM_ARM 40 | ||
61 | -- | ||
62 | 2.16.2 | ||
63 | |||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch b/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch deleted file mode 100644 index 49d319f59d..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/0001-ftpd-telnetd-Fix-multiple-definitions-of-errcatch-an.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 7d39930468e272c740b0eed3c7e5b7fb3abf29e8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 5 Aug 2020 10:36:22 -0700 | ||
4 | Subject: [PATCH] ftpd,telnetd: Fix multiple definitions of errcatch and not42 | ||
5 | |||
6 | This helps fix build failures when -fno-common option is used | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | --- | ||
13 | ftpd/extern.h | 2 +- | ||
14 | ftpd/ftpcmd.c | 1 + | ||
15 | telnetd/utility.c | 2 +- | ||
16 | 3 files changed, 3 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/ftpd/extern.h b/ftpd/extern.h | ||
19 | index ab33cf3..91dbbee 100644 | ||
20 | --- a/ftpd/extern.h | ||
21 | +++ b/ftpd/extern.h | ||
22 | @@ -90,7 +90,7 @@ extern void user (const char *); | ||
23 | extern char *sgetsave (const char *); | ||
24 | |||
25 | /* Exported from ftpd.c. */ | ||
26 | -jmp_buf errcatch; | ||
27 | +extern jmp_buf errcatch; | ||
28 | extern struct sockaddr_storage data_dest; | ||
29 | extern socklen_t data_dest_len; | ||
30 | extern struct sockaddr_storage his_addr; | ||
31 | diff --git a/ftpd/ftpcmd.c b/ftpd/ftpcmd.c | ||
32 | index beb1f06..d272e9d 100644 | ||
33 | --- a/ftpd/ftpcmd.c | ||
34 | +++ b/ftpd/ftpcmd.c | ||
35 | @@ -106,6 +106,7 @@ | ||
36 | #endif | ||
37 | |||
38 | off_t restart_point; | ||
39 | +jmp_buf errcatch; | ||
40 | |||
41 | static char cbuf[512]; /* Command Buffer. */ | ||
42 | static char *fromname; | ||
43 | diff --git a/telnetd/utility.c b/telnetd/utility.c | ||
44 | index e7ffb8e..46bf91e 100644 | ||
45 | --- a/telnetd/utility.c | ||
46 | +++ b/telnetd/utility.c | ||
47 | @@ -63,7 +63,7 @@ static int ncc; | ||
48 | static char ptyibuf[BUFSIZ], *ptyip; | ||
49 | static int pcc; | ||
50 | |||
51 | -int not42; | ||
52 | +extern int not42; | ||
53 | |||
54 | static int | ||
55 | readstream (int p, char *ibuf, int bufsize) | ||
56 | -- | ||
57 | 2.28.0 | ||
58 | |||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch b/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch deleted file mode 100644 index a91913cb51..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/fix-buffer-fortify-tfpt.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | tftpd: Fix abort on error path | ||
2 | |||
3 | When trying to fetch a non existent file, the app crashes with: | ||
4 | |||
5 | *** buffer overflow detected ***: | ||
6 | Aborted | ||
7 | |||
8 | |||
9 | Upstream-Status: Submitted [https://www.mail-archive.com/bug-inetutils@gnu.org/msg03036.html https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91205] | ||
10 | Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com> | ||
11 | diff --git a/src/tftpd.c b/src/tftpd.c | ||
12 | index 56002a0..144012f 100644 | ||
13 | --- a/src/tftpd.c | ||
14 | +++ b/src/tftpd.c | ||
15 | @@ -864,9 +864,8 @@ nak (int error) | ||
16 | pe->e_msg = strerror (error - 100); | ||
17 | tp->th_code = EUNDEF; /* set 'undef' errorcode */ | ||
18 | } | ||
19 | - strcpy (tp->th_msg, pe->e_msg); | ||
20 | length = strlen (pe->e_msg); | ||
21 | - tp->th_msg[length] = '\0'; | ||
22 | + memcpy(tp->th_msg, pe->e_msg, length + 1); | ||
23 | length += 5; | ||
24 | if (sendto (peer, buf, length, 0, (struct sockaddr *) &from, fromlen) != length) | ||
25 | syslog (LOG_ERR, "nak: %m\n"); | ||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch b/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch deleted file mode 100644 index 603d2baf9d..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/fix-disable-ipv6.patch +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | From c7c27ba763c613f83c1561e56448b49315c271c5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jackie Huang <jackie.huang@windriver.com> | ||
3 | Date: Wed, 6 Mar 2019 09:36:11 -0500 | ||
4 | Subject: [PATCH] Upstream: | ||
5 | http://www.mail-archive.com/bug-inetutils@gnu.org/msg02103.html | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
10 | |||
11 | --- | ||
12 | ping/ping_common.h | 20 ++++++++++++++++++++ | ||
13 | 1 file changed, 20 insertions(+) | ||
14 | |||
15 | diff --git a/ping/ping_common.h b/ping/ping_common.h | ||
16 | index 65e3e60..3e84db0 100644 | ||
17 | --- a/ping/ping_common.h | ||
18 | +++ b/ping/ping_common.h | ||
19 | @@ -18,10 +18,14 @@ | ||
20 | You should have received a copy of the GNU General Public License | ||
21 | along with this program. If not, see `http://www.gnu.org/licenses/'. */ | ||
22 | |||
23 | +#include <config.h> | ||
24 | + | ||
25 | #include <netinet/in_systm.h> | ||
26 | #include <netinet/in.h> | ||
27 | #include <netinet/ip.h> | ||
28 | +#ifdef HAVE_IPV6 | ||
29 | #include <netinet/icmp6.h> | ||
30 | +#endif | ||
31 | #include <icmp.h> | ||
32 | #include <error.h> | ||
33 | #include <progname.h> | ||
34 | @@ -63,7 +67,12 @@ struct ping_stat | ||
35 | want to follow the traditional behaviour of ping. */ | ||
36 | #define DEFAULT_PING_COUNT 0 | ||
37 | |||
38 | +#ifdef HAVE_IPV6 | ||
39 | #define PING_HEADER_LEN (USE_IPV6 ? sizeof (struct icmp6_hdr) : ICMP_MINLEN) | ||
40 | +#else | ||
41 | +#define PING_HEADER_LEN (ICMP_MINLEN) | ||
42 | +#endif | ||
43 | + | ||
44 | #define PING_TIMING(s) ((s) >= sizeof (struct timeval)) | ||
45 | #define PING_DATALEN (64 - PING_HEADER_LEN) /* default data length */ | ||
46 | |||
47 | @@ -78,13 +87,20 @@ struct ping_stat | ||
48 | |||
49 | #define PING_MIN_USER_INTERVAL (200000/PING_PRECISION) | ||
50 | |||
51 | +#ifdef HAVE_IPV6 | ||
52 | /* FIXME: Adjust IPv6 case for options and their consumption. */ | ||
53 | #define _PING_BUFLEN(p, u) ((u)? ((p)->ping_datalen + sizeof (struct icmp6_hdr)) : \ | ||
54 | (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN)) | ||
55 | |||
56 | +#else | ||
57 | +#define _PING_BUFLEN(p, u) (MAXIPLEN + (p)->ping_datalen + ICMP_TSLEN) | ||
58 | +#endif | ||
59 | + | ||
60 | +#ifdef HAVE_IPV6 | ||
61 | typedef int (*ping_efp6) (int code, void *closure, struct sockaddr_in6 * dest, | ||
62 | struct sockaddr_in6 * from, struct icmp6_hdr * icmp, | ||
63 | int datalen); | ||
64 | +#endif | ||
65 | |||
66 | typedef int (*ping_efp) (int code, | ||
67 | void *closure, | ||
68 | @@ -93,13 +109,17 @@ typedef int (*ping_efp) (int code, | ||
69 | struct ip * ip, icmphdr_t * icmp, int datalen); | ||
70 | |||
71 | union event { | ||
72 | +#ifdef HAVE_IPV6 | ||
73 | ping_efp6 handler6; | ||
74 | +#endif | ||
75 | ping_efp handler; | ||
76 | }; | ||
77 | |||
78 | union ping_address { | ||
79 | struct sockaddr_in ping_sockaddr; | ||
80 | +#ifdef HAVE_IPV6 | ||
81 | struct sockaddr_in6 ping_sockaddr6; | ||
82 | +#endif | ||
83 | }; | ||
84 | |||
85 | typedef struct ping_data PING; | ||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch deleted file mode 100644 index 2974bd4f94..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From f7f785c21306010b2367572250b2822df5bc7728 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mike Frysinger <vapier at gentoo.org> | ||
3 | Date: Thu, 18 Nov 2010 16:59:14 -0500 | ||
4 | Subject: [PATCH] printf-parse: pull in features.h for __GLIBC__ | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Mike Frysinger <vapier at gentoo.org> | ||
9 | |||
10 | --- | ||
11 | lib/printf-parse.h | 3 +++ | ||
12 | 1 file changed, 3 insertions(+) | ||
13 | |||
14 | diff --git a/lib/printf-parse.h b/lib/printf-parse.h | ||
15 | index e7d0f82..d7b4534 100644 | ||
16 | --- a/lib/printf-parse.h | ||
17 | +++ b/lib/printf-parse.h | ||
18 | @@ -28,6 +28,9 @@ | ||
19 | |||
20 | #include "printf-args.h" | ||
21 | |||
22 | +#ifdef HAVE_FEATURES_H | ||
23 | +# include <features.h> /* for __GLIBC__ */ | ||
24 | +#endif | ||
25 | |||
26 | /* Flags */ | ||
27 | #define FLAG_GROUP 1 /* ' flag */ | ||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch deleted file mode 100644 index 1ef7e21073..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.8-0003-wchar.patch +++ /dev/null | |||
@@ -1,25 +0,0 @@ | |||
1 | From 9089c6eafbf5903174dce87b68476e35db80beb9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Wed, 6 Mar 2019 09:36:11 -0500 | ||
4 | Subject: [PATCH] inetutils: Import version 1.9.4 | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | --- | ||
9 | lib/wchar.in.h | 3 +++ | ||
10 | 1 file changed, 3 insertions(+) | ||
11 | |||
12 | diff --git a/lib/wchar.in.h b/lib/wchar.in.h | ||
13 | index cdda680..043866a 100644 | ||
14 | --- a/lib/wchar.in.h | ||
15 | +++ b/lib/wchar.in.h | ||
16 | @@ -77,6 +77,9 @@ | ||
17 | /* The include_next requires a split double-inclusion guard. */ | ||
18 | #if @HAVE_WCHAR_H@ | ||
19 | # @INCLUDE_NEXT@ @NEXT_WCHAR_H@ | ||
20 | +#else | ||
21 | +# include <stddef.h> | ||
22 | +# define MB_CUR_MAX 1 | ||
23 | #endif | ||
24 | |||
25 | #undef _GL_ALREADY_INCLUDING_WCHAR_H | ||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch deleted file mode 100644 index 460ddf9830..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/inetutils-1.9-PATH_PROCNET_DEV.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From 101130f422dd5c01a1459645d7b2a5b8d19720ab Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Wed, 6 Mar 2019 09:36:11 -0500 | ||
4 | Subject: [PATCH] inetutils: define PATH_PROCNET_DEV if not already defined | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | this prevents the following compilation error : | ||
10 | system/linux.c:401:15: error: 'PATH_PROCNET_DEV' undeclared (first use in this function) | ||
11 | |||
12 | this patch comes from : | ||
13 | http://repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/ | ||
14 | |||
15 | Upstream-Status: Inappropriate [not author] | ||
16 | |||
17 | Signed-of-by: Eric Bénard <eric@eukrea.com> | ||
18 | |||
19 | --- | ||
20 | ifconfig/system/linux.c | 4 ++++ | ||
21 | 1 file changed, 4 insertions(+) | ||
22 | |||
23 | diff --git a/ifconfig/system/linux.c b/ifconfig/system/linux.c | ||
24 | index e453b46..4268ca9 100644 | ||
25 | --- a/ifconfig/system/linux.c | ||
26 | +++ b/ifconfig/system/linux.c | ||
27 | @@ -53,6 +53,10 @@ | ||
28 | #include "../ifconfig.h" | ||
29 | |||
30 | |||
31 | +#ifndef PATH_PROCNET_DEV | ||
32 | + #define PATH_PROCNET_DEV "/proc/net/dev" | ||
33 | +#endif | ||
34 | + | ||
35 | /* ARPHRD stuff. */ | ||
36 | |||
37 | static void | ||
diff --git a/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch b/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch deleted file mode 100644 index 2343c03cb4..0000000000 --- a/meta/recipes-connectivity/inetutils/inetutils/inetutils-only-check-pam_appl.h-when-pam-enabled.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From cc66e842e037fba9f06761f942abe5c4856492b8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Kai Kang <kai.kang@windriver.com> | ||
3 | Date: Wed, 6 Mar 2019 09:36:11 -0500 | ||
4 | Subject: [PATCH] inetutils: Import version 1.9.4 | ||
5 | |||
6 | Only check security/pam_appl.h which is provided by package libpam when pam is | ||
7 | enabled. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
12 | |||
13 | --- | ||
14 | configure.ac | 15 ++++++++++++++- | ||
15 | 1 file changed, 14 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/configure.ac b/configure.ac | ||
18 | index 5e16c3a..18510a8 100644 | ||
19 | --- a/configure.ac | ||
20 | +++ b/configure.ac | ||
21 | @@ -182,6 +182,19 @@ AC_SUBST(LIBUTIL) | ||
22 | |||
23 | # See if we have libpam.a. Investigate PAM versus Linux-PAM. | ||
24 | if test "$with_pam" = yes ; then | ||
25 | + AC_CHECK_HEADERS([security/pam_appl.h], [], [], [ | ||
26 | +#include <sys/types.h> | ||
27 | +#ifdef HAVE_NETINET_IN_SYSTM_H | ||
28 | +# include <netinet/in_systm.h> | ||
29 | +#endif | ||
30 | +#include <netinet/in.h> | ||
31 | +#ifdef HAVE_NETINET_IP_H | ||
32 | +# include <netinet/ip.h> | ||
33 | +#endif | ||
34 | +#ifdef HAVE_SYS_PARAM_H | ||
35 | +# include <sys/param.h> | ||
36 | +#endif | ||
37 | +]) | ||
38 | AC_CHECK_LIB(dl, dlopen, LIBDL=-ldl) | ||
39 | AC_CHECK_LIB(pam, pam_authenticate, LIBPAM=-lpam) | ||
40 | if test "$ac_cv_lib_pam_pam_authenticate" = yes ; then | ||
41 | @@ -617,7 +630,7 @@ AC_HEADER_DIRENT | ||
42 | AC_CHECK_HEADERS([arpa/nameser.h arpa/tftp.h fcntl.h features.h \ | ||
43 | glob.h memory.h netinet/ether.h netinet/in_systm.h \ | ||
44 | netinet/ip.h netinet/ip_icmp.h netinet/ip_var.h \ | ||
45 | - security/pam_appl.h shadow.h \ | ||
46 | + shadow.h \ | ||
47 | stropts.h sys/tty.h \ | ||
48 | sys/utsname.h sys/ptyvar.h sys/msgbuf.h sys/filio.h \ | ||
49 | sys/ioctl_compat.h sys/cdefs.h sys/stream.h sys/mkdev.h \ | ||
diff --git a/meta/recipes-connectivity/inetutils/inetutils_2.2.bb b/meta/recipes-connectivity/inetutils/inetutils_2.6.bb index 3bab137eb4..6e03195f2d 100644 --- a/meta/recipes-connectivity/inetutils/inetutils_2.2.bb +++ b/meta/recipes-connectivity/inetutils/inetutils_2.6.bb | |||
@@ -1,3 +1,4 @@ | |||
1 | SUMMARY = "The GNU inetutils are a collection of common networking utilities and servers." | ||
1 | DESCRIPTION = "The GNU inetutils are a collection of common \ | 2 | DESCRIPTION = "The GNU inetutils are a collection of common \ |
2 | networking utilities and servers including ftp, ftpd, rcp, \ | 3 | networking utilities and servers including ftp, ftpd, rcp, \ |
3 | rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ | 4 | rexec, rlogin, rlogind, rsh, rshd, syslog, syslogd, talk, \ |
@@ -6,29 +7,21 @@ HOMEPAGE = "http://www.gnu.org/software/inetutils" | |||
6 | SECTION = "net" | 7 | SECTION = "net" |
7 | DEPENDS = "ncurses netbase readline virtual/crypt" | 8 | DEPENDS = "ncurses netbase readline virtual/crypt" |
8 | 9 | ||
9 | LICENSE = "GPLv3" | 10 | LICENSE = "GPL-3.0-only" |
10 | 11 | ||
11 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=0c7051aef9219dc7237f206c5c4179a7" |
12 | 13 | ||
13 | SRC_URI[sha256sum] = "d547f69172df73afef691a0f7886280fd781acea28def4ff4b4b212086a89d80" | 14 | SRC_URI[sha256sum] = "68bedbfeaf73f7d86be2a7d99bcfbd4093d829f52770893919ae174c0b2357ca" |
14 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \ | 15 | SRC_URI = "${GNU_MIRROR}/inetutils/inetutils-${PV}.tar.xz \ |
15 | file://inetutils-1.8-0001-printf-parse-pull-in-features.h-for-__GLIBC__.patch \ | 16 | file://rexec.xinetd.inetutils \ |
16 | file://inetutils-1.8-0003-wchar.patch \ | ||
17 | file://rexec.xinetd.inetutils \ | ||
18 | file://rlogin.xinetd.inetutils \ | 17 | file://rlogin.xinetd.inetutils \ |
19 | file://rsh.xinetd.inetutils \ | 18 | file://rsh.xinetd.inetutils \ |
20 | file://telnet.xinetd.inetutils \ | 19 | file://telnet.xinetd.inetutils \ |
21 | file://tftpd.xinetd.inetutils \ | 20 | file://tftpd.xinetd.inetutils \ |
22 | file://inetutils-1.9-PATH_PROCNET_DEV.patch \ | 21 | " |
23 | file://inetutils-only-check-pam_appl.h-when-pam-enabled.patch \ | ||
24 | " | ||
25 | 22 | ||
26 | inherit autotools gettext update-alternatives texinfo | 23 | inherit autotools gettext update-alternatives texinfo |
27 | 24 | ||
28 | acpaths = "-I ./m4" | ||
29 | |||
30 | SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', '', 'file://fix-disable-ipv6.patch', d)}" | ||
31 | |||
32 | PACKAGECONFIG ??= "ftp uucpd \ | 25 | PACKAGECONFIG ??= "ftp uucpd \ |
33 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ | 26 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \ |
34 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \ | 27 | ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6 ping6', '', d)} \ |
@@ -40,21 +33,33 @@ PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6 gl_cv_socket_ipv6=no," | |||
40 | PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6," | 33 | PACKAGECONFIG[ping6] = "--enable-ping6,--disable-ping6," |
41 | 34 | ||
42 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ | 35 | EXTRA_OECONF = "--with-ncurses-include-dir=${STAGING_INCDIR} \ |
43 | inetutils_cv_path_login=${base_bindir}/login \ | ||
44 | --with-libreadline-prefix=${STAGING_LIBDIR} \ | 36 | --with-libreadline-prefix=${STAGING_LIBDIR} \ |
45 | --enable-rpath=no \ | 37 | --enable-rpath=no \ |
46 | " | 38 | --with-path-login=${base_bindir}/login \ |
39 | --with-path-cp=${base_bindir}/cp \ | ||
40 | --with-path-uucico=${libexecdir}/uuico \ | ||
41 | --with-path-procnet-dev=/proc/net/dev \ | ||
42 | " | ||
43 | |||
44 | EXTRA_OECONF:append:libc-musl = " --with-path-utmpx=/dev/null/utmpx --with-path-wtmpx=/dev/null/wtmpx" | ||
47 | 45 | ||
48 | # These are horrible for security, disable them | 46 | # These are horrible for security, disable them |
49 | EXTRA_OECONF:append = " --disable-rsh --disable-rshd --disable-rcp \ | 47 | EXTRA_OECONF:append = " --disable-rsh --disable-rshd --disable-rcp \ |
50 | --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd" | 48 | --disable-rlogin --disable-rlogind --disable-rexec --disable-rexecd" |
51 | 49 | ||
50 | # The configure script guesses many paths in cross builds, check for this happening | ||
51 | do_configure_cross_check() { | ||
52 | if grep "may be incorrect because of cross-compilation" ${B}/config.log; then | ||
53 | bberror Default path values used, these must be set explicitly | ||
54 | fi | ||
55 | } | ||
56 | do_configure[postfuncs] += "do_configure_cross_check" | ||
57 | |||
58 | # The --with-path options are not actually options, so this check needs to be silenced | ||
59 | ERROR_QA:remove = "unknown-configure-option" | ||
60 | |||
52 | do_configure:prepend () { | 61 | do_configure:prepend () { |
53 | export HELP2MAN='true' | 62 | export HELP2MAN='true' |
54 | cp ${STAGING_DATADIR_NATIVE}/gettext/config.rpath ${S}/build-aux/config.rpath | ||
55 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.guess ${S} | ||
56 | install -m 0755 ${STAGING_DATADIR_NATIVE}/gnu-config/config.sub ${S} | ||
57 | rm -f ${S}/glob/configure* | ||
58 | } | 63 | } |
59 | 64 | ||
60 | do_install:append () { | 65 | do_install:append () { |
@@ -73,23 +78,23 @@ do_install:append () { | |||
73 | mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd | 78 | mv ${D}${libexecdir}/telnetd ${D}${sbindir}/in.telnetd |
74 | if [ -e ${D}${libexecdir}/rexecd ]; then | 79 | if [ -e ${D}${libexecdir}/rexecd ]; then |
75 | mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd | 80 | mv ${D}${libexecdir}/rexecd ${D}${sbindir}/in.rexecd |
76 | cp ${WORKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec | 81 | cp ${UNPACKDIR}/rexec.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rexec |
77 | fi | 82 | fi |
78 | if [ -e ${D}${libexecdir}/rlogind ]; then | 83 | if [ -e ${D}${libexecdir}/rlogind ]; then |
79 | mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind | 84 | mv ${D}${libexecdir}/rlogind ${D}${sbindir}/in.rlogind |
80 | cp ${WORKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin | 85 | cp ${UNPACKDIR}/rlogin.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rlogin |
81 | fi | 86 | fi |
82 | if [ -e ${D}${libexecdir}/rshd ]; then | 87 | if [ -e ${D}${libexecdir}/rshd ]; then |
83 | mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd | 88 | mv ${D}${libexecdir}/rshd ${D}${sbindir}/in.rshd |
84 | cp ${WORKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh | 89 | cp ${UNPACKDIR}/rsh.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/rsh |
85 | fi | 90 | fi |
86 | if [ -e ${D}${libexecdir}/talkd ]; then | 91 | if [ -e ${D}${libexecdir}/talkd ]; then |
87 | mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd | 92 | mv ${D}${libexecdir}/talkd ${D}${sbindir}/in.talkd |
88 | fi | 93 | fi |
89 | mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd | 94 | mv ${D}${libexecdir}/uucpd ${D}${sbindir}/in.uucpd |
90 | mv ${D}${libexecdir}/* ${D}${bindir}/ | 95 | mv ${D}${libexecdir}/* ${D}${bindir}/ |
91 | cp ${WORKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet | 96 | cp ${UNPACKDIR}/telnet.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/telnet |
92 | cp ${WORKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd | 97 | cp ${UNPACKDIR}/tftpd.xinetd.inetutils ${D}/${sysconfdir}/xinetd.d/tftpd |
93 | 98 | ||
94 | sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/* | 99 | sed -e 's,@SBINDIR@,${sbindir},g' -i ${D}/${sysconfdir}/xinetd.d/* |
95 | if [ -e ${D}${libdir}/charset.alias ]; then | 100 | if [ -e ${D}${libdir}/charset.alias ]; then |
@@ -134,11 +139,12 @@ ALTERNATIVE:${PN}-telnetd = "telnetd" | |||
134 | ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd" | 139 | ALTERNATIVE_LINK_NAME[telnetd] = "${sbindir}/telnetd" |
135 | ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd" | 140 | ALTERNATIVE_TARGET[telnetd] = "${sbindir}/in.telnetd" |
136 | 141 | ||
137 | ALTERNATIVE:${PN}-inetd= "inetd" | 142 | ALTERNATIVE:${PN}-inetd = "inetd" |
138 | ALTERNATIVE:${PN}-traceroute = "traceroute" | 143 | ALTERNATIVE:${PN}-traceroute = "traceroute" |
139 | 144 | ||
140 | ALTERNATIVE:${PN}-hostname = "hostname" | 145 | ALTERNATIVE:${PN}-hostname = "hostname" |
141 | ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname" | 146 | ALTERNATIVE_LINK_NAME[hostname] = "${base_bindir}/hostname" |
147 | ALTERNATIVE_PRIORITY[hostname] = "100" | ||
142 | 148 | ||
143 | ALTERNATIVE:${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8 \ | 149 | ALTERNATIVE:${PN}-doc = "hostname.1 dnsdomainname.1 logger.1 syslogd.8 \ |
144 | tftpd.8 tftp.1 telnetd.8" | 150 | tftpd.8 tftp.1 telnetd.8" |
@@ -159,7 +165,6 @@ ALTERNATIVE_LINK_NAME[ping] = "${base_bindir}/ping" | |||
159 | ALTERNATIVE:${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}" | 165 | ALTERNATIVE:${PN}-ping6 = "${@bb.utils.filter('PACKAGECONFIG', 'ping6', d)}" |
160 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" | 166 | ALTERNATIVE_LINK_NAME[ping6] = "${base_bindir}/ping6" |
161 | 167 | ||
162 | |||
163 | FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" | 168 | FILES:${PN}-dbg += "${base_bindir}/.debug ${base_sbindir}/.debug ${bindir}/.debug ${sbindir}/.debug" |
164 | FILES:${PN}-ping = "${base_bindir}/ping.${BPN}" | 169 | FILES:${PN}-ping = "${base_bindir}/ping.${BPN}" |
165 | FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}" | 170 | FILES:${PN}-ping6 = "${base_bindir}/ping6.${BPN}" |
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch new file mode 100644 index 0000000000..c4dea39676 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-include-libnetlink.h-add-missing-include-for-htobe64.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From 9e427aa1c647f741b08a1f0c44483ea974c7fc61 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Sat, 24 Aug 2024 15:32:25 +0200 | ||
4 | Subject: [PATCH] include/libnetlink.h: add missing include for htobe64 | ||
5 | definitions | ||
6 | |||
7 | Upstream-Status: Submitted [by email to stephen@networkplumber.org netdev@vger.kernel.org] | ||
8 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
9 | --- | ||
10 | include/libnetlink.h | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/include/libnetlink.h b/include/libnetlink.h | ||
14 | index 7074e91..3dbfa42 100644 | ||
15 | --- a/include/libnetlink.h | ||
16 | +++ b/include/libnetlink.h | ||
17 | @@ -13,6 +13,7 @@ | ||
18 | #include <linux/neighbour.h> | ||
19 | #include <linux/netconf.h> | ||
20 | #include <arpa/inet.h> | ||
21 | +#include <endian.h> | ||
22 | |||
23 | struct rtnl_handle { | ||
24 | int fd; | ||
diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch deleted file mode 100644 index 74e3de1ce9..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2/0001-libc-compat.h-add-musl-workaround.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From c25f8d1f7a6203dfeb10b39f80ffd314bb84a58d Mon Sep 17 00:00:00 2001 | ||
2 | From: Baruch Siach <baruch@tkos.co.il> | ||
3 | Date: Thu, 22 Dec 2016 15:26:30 +0200 | ||
4 | Subject: [PATCH] libc-compat.h: add musl workaround | ||
5 | |||
6 | The libc-compat.h kernel header uses glibc specific macros (__GLIBC__ and | ||
7 | __USE_MISC) to solve conflicts with libc provided headers. This patch makes | ||
8 | libc-compat.h work for musl libc as well. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Taken From: | ||
13 | https://git.buildroot.net/buildroot/tree/package/iproute2/0001-Add-the-musl-workaround-to-the-libc-compat.h-copy.patch | ||
14 | |||
15 | Signed-off-by: Baruch Siach <baruch@tkos.co.il> | ||
16 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
17 | |||
18 | --- | ||
19 | include/uapi/linux/libc-compat.h | 4 +++- | ||
20 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h | ||
23 | index a159991..22198fa 100644 | ||
24 | --- a/include/uapi/linux/libc-compat.h | ||
25 | +++ b/include/uapi/linux/libc-compat.h | ||
26 | @@ -50,10 +50,12 @@ | ||
27 | #define _LIBC_COMPAT_H | ||
28 | |||
29 | /* We have included glibc headers... */ | ||
30 | -#if defined(__GLIBC__) | ||
31 | +#if 1 | ||
32 | +#define __USE_MISC | ||
33 | |||
34 | /* Coordinate with glibc net/if.h header. */ | ||
35 | #if defined(_NET_IF_H) && defined(__USE_MISC) | ||
36 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS_LOWER_UP_DORMANT_ECHO 0 | ||
37 | |||
38 | /* GLIBC headers included first so don't define anything | ||
39 | * that would already be defined. */ | ||
diff --git a/meta/recipes-connectivity/iproute2/iproute2_5.14.0.bb b/meta/recipes-connectivity/iproute2/iproute2_5.14.0.bb deleted file mode 100644 index 27fb5c8866..0000000000 --- a/meta/recipes-connectivity/iproute2/iproute2_5.14.0.bb +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | require iproute2.inc | ||
2 | |||
3 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ | ||
4 | file://0001-libc-compat.h-add-musl-workaround.patch \ | ||
5 | " | ||
6 | |||
7 | SRC_URI[sha256sum] = "210fa785a52f3763c4287fd5ae63e246f6311bfaa48c424baab6d383bb7591d4" | ||
8 | |||
9 | # CFLAGS are computed in Makefile and reference CCOPTS | ||
10 | # | ||
11 | EXTRA_OEMAKE:append = " CCOPTS='${CFLAGS}'" | ||
diff --git a/meta/recipes-connectivity/iproute2/iproute2.inc b/meta/recipes-connectivity/iproute2/iproute2_6.15.0.bb index 3f070d6799..592e3e15af 100644 --- a/meta/recipes-connectivity/iproute2/iproute2.inc +++ b/meta/recipes-connectivity/iproute2/iproute2_6.15.0.bb | |||
@@ -5,31 +5,43 @@ and tc are the most important. ip controls IPv4 and IPv6 \ | |||
5 | configuration and tc stands for traffic control." | 5 | configuration and tc stands for traffic control." |
6 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" | 6 | HOMEPAGE = "http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2" |
7 | SECTION = "base" | 7 | SECTION = "base" |
8 | LICENSE = "GPLv2+" | 8 | LICENSE = "GPL-2.0-or-later" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ |
10 | file://ip/ip.c;beginline=3;endline=8;md5=689d691d0410a4b64d3899f8d6e31817" | 10 | " |
11 | 11 | ||
12 | DEPENDS = "flex-native bison-native iptables libcap" | 12 | DEPENDS = "flex-native bison-native libcap" |
13 | 13 | ||
14 | inherit update-alternatives bash-completion pkgconfig | 14 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ |
15 | file://0001-include-libnetlink.h-add-missing-include-for-htobe64.patch \ | ||
16 | " | ||
17 | |||
18 | SRC_URI[sha256sum] = "8041854a882583ad5263466736c9c8c68c74b1a35754ab770d23343f947528fb" | ||
15 | 19 | ||
16 | CLEANBROKEN = "1" | 20 | inherit update-alternatives bash-completion pkgconfig |
17 | 21 | ||
18 | PACKAGECONFIG ??= "tipc elf devlink" | 22 | PACKAGECONFIG ??= "tipc elf devlink iptables" |
19 | PACKAGECONFIG[tipc] = ",,libmnl," | 23 | PACKAGECONFIG[tipc] = ",,libmnl," |
20 | PACKAGECONFIG[elf] = ",,elfutils," | 24 | PACKAGECONFIG[elf] = ",,elfutils," |
21 | PACKAGECONFIG[devlink] = ",,libmnl," | 25 | PACKAGECONFIG[devlink] = ",,libmnl," |
26 | PACKAGECONFIG[iptables] = ",,iptables" | ||
22 | PACKAGECONFIG[rdma] = ",,libmnl," | 27 | PACKAGECONFIG[rdma] = ",,libmnl," |
28 | PACKAGECONFIG[selinux] = ",,libselinux" | ||
23 | 29 | ||
24 | IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" | 30 | IPROUTE2_MAKE_SUBDIRS = "lib tc ip bridge misc genl ${@bb.utils.filter('PACKAGECONFIG', 'devlink tipc rdma', d)}" |
25 | 31 | ||
32 | # This is needed with GCC-14 and musl | ||
33 | CFLAGS += "-Wno-error=incompatible-pointer-types" | ||
34 | # CFLAGS are computed in Makefile and reference CCOPTS | ||
35 | # | ||
26 | EXTRA_OEMAKE = "\ | 36 | EXTRA_OEMAKE = "\ |
27 | CC='${CC}' \ | 37 | CC='${CC}' \ |
28 | KERNEL_INCLUDE=${STAGING_INCDIR} \ | 38 | KERNEL_INCLUDE=${STAGING_INCDIR} \ |
29 | DOCDIR=${docdir}/iproute2 \ | 39 | DOCDIR=${docdir}/iproute2 \ |
30 | SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ | 40 | SUBDIRS='${IPROUTE2_MAKE_SUBDIRS}' \ |
31 | SBINDIR='${base_sbindir}' \ | 41 | SBINDIR='${base_sbindir}' \ |
42 | CONF_USR_DIR='${libdir}/iproute2' \ | ||
32 | LIBDIR='${libdir}' \ | 43 | LIBDIR='${libdir}' \ |
44 | CCOPTS='${CFLAGS}' \ | ||
33 | " | 45 | " |
34 | 46 | ||
35 | do_configure:append () { | 47 | do_configure:append () { |
@@ -44,18 +56,23 @@ do_install () { | |||
44 | install -d ${D}${datadir} | 56 | install -d ${D}${datadir} |
45 | mv ${D}/share/* ${D}${datadir}/ || true | 57 | mv ${D}/share/* ${D}${datadir}/ || true |
46 | rm ${D}/share -rf || true | 58 | rm ${D}/share -rf || true |
59 | |||
60 | # Remove support fot ipt and xt in tc. So tc library directory is not needed. | ||
61 | rm ${D}${libdir}/tc -rf | ||
47 | } | 62 | } |
48 | 63 | ||
49 | # The .so files in iproute2-tc are modules, not traditional libraries | 64 | # The .so files in iproute2-tc are modules, not traditional libraries |
50 | INSANE_SKIP:${PN}-tc = "dev-so" | 65 | INSANE_SKIP:${PN}-tc = "dev-so" |
51 | 66 | ||
52 | IPROUTE2_PACKAGES =+ "\ | 67 | IPROUTE2_PACKAGES =+ "\ |
68 | ${PN}-bridge \ | ||
53 | ${PN}-devlink \ | 69 | ${PN}-devlink \ |
54 | ${PN}-genl \ | 70 | ${PN}-genl \ |
55 | ${PN}-ifstat \ | 71 | ${PN}-ifstat \ |
56 | ${PN}-ip \ | 72 | ${PN}-ip \ |
57 | ${PN}-lnstat \ | 73 | ${PN}-lnstat \ |
58 | ${PN}-nstat \ | 74 | ${PN}-nstat \ |
75 | ${PN}-routel \ | ||
59 | ${PN}-rtacct \ | 76 | ${PN}-rtacct \ |
60 | ${PN}-ss \ | 77 | ${PN}-ss \ |
61 | ${PN}-tc \ | 78 | ${PN}-tc \ |
@@ -72,7 +89,7 @@ FILES:${PN}-lnstat = "${base_sbindir}/lnstat \ | |||
72 | ${base_sbindir}/ctstat \ | 89 | ${base_sbindir}/ctstat \ |
73 | ${base_sbindir}/rtstat" | 90 | ${base_sbindir}/rtstat" |
74 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" | 91 | FILES:${PN}-ifstat = "${base_sbindir}/ifstat" |
75 | FILES:${PN}-ip = "${base_sbindir}/ip.${PN} ${sysconfdir}/iproute2" | 92 | FILES:${PN}-ip = "${base_sbindir}/ip.* ${libdir}/iproute2" |
76 | FILES:${PN}-genl = "${base_sbindir}/genl" | 93 | FILES:${PN}-genl = "${base_sbindir}/genl" |
77 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" | 94 | FILES:${PN}-rtacct = "${base_sbindir}/rtacct" |
78 | FILES:${PN}-nstat = "${base_sbindir}/nstat" | 95 | FILES:${PN}-nstat = "${base_sbindir}/nstat" |
@@ -80,6 +97,10 @@ FILES:${PN}-ss = "${base_sbindir}/ss" | |||
80 | FILES:${PN}-tipc = "${base_sbindir}/tipc" | 97 | FILES:${PN}-tipc = "${base_sbindir}/tipc" |
81 | FILES:${PN}-devlink = "${base_sbindir}/devlink" | 98 | FILES:${PN}-devlink = "${base_sbindir}/devlink" |
82 | FILES:${PN}-rdma = "${base_sbindir}/rdma" | 99 | FILES:${PN}-rdma = "${base_sbindir}/rdma" |
100 | FILES:${PN}-routel = "${base_sbindir}/routel" | ||
101 | FILES:${PN}-bridge = "${base_sbindir}/bridge" | ||
102 | |||
103 | RDEPENDS:${PN}-routel = "python3-core" | ||
83 | 104 | ||
84 | ALTERNATIVE:${PN}-ip = "ip" | 105 | ALTERNATIVE:${PN}-ip = "ip" |
85 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" | 106 | ALTERNATIVE_TARGET[ip] = "${base_sbindir}/ip.${BPN}" |
diff --git a/meta/recipes-connectivity/iw/iw_5.9.bb b/meta/recipes-connectivity/iw/iw_6.9.bb index 3d1e1c7e79..e34400e18b 100644 --- a/meta/recipes-connectivity/iw/iw_5.9.bb +++ b/meta/recipes-connectivity/iw/iw_6.9.bb | |||
@@ -4,7 +4,7 @@ wireless devices. It supports almost all new drivers that have been added \ | |||
4 | to the kernel recently. " | 4 | to the kernel recently. " |
5 | HOMEPAGE = "https://wireless.wiki.kernel.org/en/users/documentation/iw" | 5 | HOMEPAGE = "https://wireless.wiki.kernel.org/en/users/documentation/iw" |
6 | SECTION = "base" | 6 | SECTION = "base" |
7 | LICENSE = "BSD-2-Clause" | 7 | LICENSE = "ISC" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=878618a5c4af25e9b93ef0be1a93f774" |
9 | 9 | ||
10 | DEPENDS = "libnl" | 10 | DEPENDS = "libnl" |
@@ -14,7 +14,7 @@ SRC_URI = "http://www.kernel.org/pub/software/network/iw/${BP}.tar.gz \ | |||
14 | file://separate-objdir.patch \ | 14 | file://separate-objdir.patch \ |
15 | " | 15 | " |
16 | 16 | ||
17 | SRC_URI[sha256sum] = "6e7d3c9f8b4ee68e412f20fe229c9854c2dba383e3e650ce6af8eb8dbd12efc3" | 17 | SRC_URI[sha256sum] = "4c3194778b175d58442907d51d1977e7270fce5cbebff0eab11c45c1da287a4b" |
18 | 18 | ||
19 | inherit pkgconfig | 19 | inherit pkgconfig |
20 | 20 | ||
diff --git a/meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch b/meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch new file mode 100644 index 0000000000..15c09d4c41 --- /dev/null +++ b/meta/recipes-connectivity/kea/files/0001-make-kea-environment-available-to-lfc.patch | |||
@@ -0,0 +1,96 @@ | |||
1 | From 72d7e6c0b6b5af4fea2e4db9ed33757984ccdc5b Mon Sep 17 00:00:00 2001 | ||
2 | From: Razvan Becheriu <razvan@isc.org> | ||
3 | Date: Fri, 14 Jun 2024 17:09:50 +0300 | ||
4 | Subject: [PATCH] make kea environment available to lfc | ||
5 | |||
6 | Upstream-Status: Backport | ||
7 | [https://gitlab.isc.org/isc-projects/kea/-/commit/f477e8ebcc8b8e1f1adaad4d55031084c0ff6f40] | ||
8 | |||
9 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
10 | --- | ||
11 | configure.ac | 2 ++ | ||
12 | src/lib/dhcpsrv/memfile_lease_mgr.cc | 3 ++- | ||
13 | .../tests/memfile_lease_mgr_unittest.cc | 26 +++++++++++++++++++ | ||
14 | src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in | 6 +++++ | ||
15 | 4 files changed, 36 insertions(+), 1 deletion(-) | ||
16 | create mode 100644 src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in | ||
17 | |||
18 | diff --git a/configure.ac b/configure.ac | ||
19 | index c00edb5..7b572b0 100644 | ||
20 | --- a/configure.ac | ||
21 | +++ b/configure.ac | ||
22 | @@ -1629,6 +1629,8 @@ AC_CONFIG_FILES([src/lib/dhcp_ddns/tests/Makefile]) | ||
23 | AC_CONFIG_FILES([src/lib/dhcpsrv/Makefile]) | ||
24 | AC_CONFIG_FILES([src/lib/dhcpsrv/tests/Makefile]) | ||
25 | AC_CONFIG_FILES([src/lib/dhcpsrv/tests/test_libraries.h]) | ||
26 | +AC_CONFIG_FILES([src/lib/dhcpsrv/tests/test_kea_lfc_env.sh], | ||
27 | + [chmod +x src/lib/dhcpsrv/tests/test_kea_lfc_env.sh]) | ||
28 | AC_CONFIG_FILES([src/lib/dhcpsrv/testutils/Makefile]) | ||
29 | AC_CONFIG_FILES([src/lib/dns/Makefile]) | ||
30 | AC_CONFIG_FILES([src/lib/dns/tests/Makefile]) | ||
31 | diff --git a/src/lib/dhcpsrv/memfile_lease_mgr.cc b/src/lib/dhcpsrv/memfile_lease_mgr.cc | ||
32 | index db4f5d5..0ecf3e7 100644 | ||
33 | --- a/src/lib/dhcpsrv/memfile_lease_mgr.cc | ||
34 | +++ b/src/lib/dhcpsrv/memfile_lease_mgr.cc | ||
35 | @@ -209,7 +209,8 @@ LFCSetup::setup(const uint32_t lfc_interval, | ||
36 | args.push_back("ignored-path"); | ||
37 | |||
38 | // Create the process (do not start it yet). | ||
39 | - process_.reset(new ProcessSpawn(ProcessSpawn::ASYNC, executable, args)); | ||
40 | + process_.reset(new ProcessSpawn(ProcessSpawn::ASYNC, executable, args, | ||
41 | + ProcessEnvVars(), true)); | ||
42 | |||
43 | // If we've been told to run it once now, invoke the callback directly. | ||
44 | if (run_once_now) { | ||
45 | diff --git a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc | ||
46 | index 034f1f5..9edf637 100644 | ||
47 | --- a/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc | ||
48 | +++ b/src/lib/dhcpsrv/tests/memfile_lease_mgr_unittest.cc | ||
49 | @@ -534,6 +534,32 @@ TEST_F(MemfileLeaseMgrTest, lfcTimer) { | ||
50 | EXPECT_EQ(2, lease_mgr->getLFCCount()); | ||
51 | } | ||
52 | |||
53 | +/// @brief Check that the kea environment is accesible to the Lease | ||
54 | +/// File Cleanup process. | ||
55 | +TEST_F(MemfileLeaseMgrTest, lfcEnv) { | ||
56 | + DatabaseConnection::ParameterMap pmap; | ||
57 | + pmap["type"] = "memfile"; | ||
58 | + pmap["universe"] = "4"; | ||
59 | + pmap["name"] = getLeaseFilePath("leasefile4_0.csv"); | ||
60 | + pmap["lfc-interval"] = "1"; | ||
61 | + | ||
62 | + std::ostringstream s; | ||
63 | + s << DHCP_DATA_DIR << "/test_kea_lfc_env.sh"; | ||
64 | + setenv("KEA_LFC_EXECUTABLE", s.str().c_str(), 1); | ||
65 | + | ||
66 | + boost::scoped_ptr<NakedMemfileLeaseMgr> lease_mgr(new NakedMemfileLeaseMgr(pmap)); | ||
67 | + | ||
68 | + // Try to run the lease file cleanup. | ||
69 | + ASSERT_NO_THROW(lease_mgr->lfcCallback()); | ||
70 | + | ||
71 | + // Wait for the LFC process to complete. | ||
72 | + ASSERT_TRUE(waitForProcess(*lease_mgr, 1)); | ||
73 | + | ||
74 | + // And make sure it has returned an exit status of 0. | ||
75 | + EXPECT_EQ(0, lease_mgr->getLFCExitStatus()) | ||
76 | + << "environment not available to LFC"; | ||
77 | +} | ||
78 | + | ||
79 | /// @brief This test checks if the LFC timer is disabled (doesn't trigger) | ||
80 | /// cleanups when the lfc-interval is set to 0. | ||
81 | TEST_F(MemfileLeaseMgrTest, lfcTimerDisabled) { | ||
82 | diff --git a/src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in b/src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in | ||
83 | new file mode 100644 | ||
84 | index 0000000..3eb71d5 | ||
85 | --- /dev/null | ||
86 | +++ b/src/lib/dhcpsrv/tests/test_kea_lfc_env.sh.in | ||
87 | @@ -0,0 +1,6 @@ | ||
88 | +#!/bin/sh | ||
89 | + | ||
90 | +if [ $(env | grep -c KEA_LFC_EXECUTABLE) != 0 ]; then | ||
91 | + exit 0 | ||
92 | +fi | ||
93 | +exit 1 | ||
94 | -- | ||
95 | 2.25.1 | ||
96 | |||
diff --git a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch index 8de9fce4b4..763639327a 100644 --- a/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch +++ b/meta/recipes-connectivity/kea/files/fix-multilib-conflict.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d027b1d85a8c1a0193b6e4a00083d3038d699a59 Mon Sep 17 00:00:00 2001 | 1 | From 06ebd1b2ced426c420ed162980eca194f9f918ae Mon Sep 17 00:00:00 2001 |
2 | From: Kai Kang <kai.kang@windriver.com> | 2 | From: Kai Kang <kai.kang@windriver.com> |
3 | Date: Tue, 22 Sep 2020 15:02:33 +0800 | 3 | Date: Tue, 22 Sep 2020 15:02:33 +0800 |
4 | Subject: [PATCH] There are conflict of config files between kea and lib32-kea: | 4 | Subject: [PATCH] There are conflict of config files between kea and lib32-kea: |
@@ -8,16 +8,21 @@ Subject: [PATCH] There are conflict of config files between kea and lib32-kea: | |||
8 | lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64 | 8 | lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64 |
9 | | file /etc/kea/kea-dhcp4.conf conflicts between attempted installs of | 9 | | file /etc/kea/kea-dhcp4.conf conflicts between attempted installs of |
10 | lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64 | 10 | lib32-kea-1.7.10-r0.core2_32 and kea-1.7.10-r0.core2_64 |
11 | | file /etc/kea/kea-dhcp6.conf conflicts between attempted installs of | ||
12 | lib32-kea-2.6.1-r0.core2_32 and kea-2.6.1-r0.core2_64 | ||
11 | 13 | ||
12 | Because they are all commented out, replace the expanded libdir path with | 14 | Because they are all commented out, replace the expanded libdir path with |
13 | '$libdir' in the config files to avoid conflict. | 15 | '$libdir' in the config files to avoid conflict. |
14 | 16 | ||
17 | Upstream-Status: Submitted [https://gitlab.isc.org/isc-projects/kea/-/issues/2602] | ||
15 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | 18 | Signed-off-by: Kai Kang <kai.kang@windriver.com> |
19 | Signed-off-by: Lei Maohui <leimaohui@fujitsu.com> | ||
16 | 20 | ||
17 | --- | 21 | --- |
18 | src/bin/keactrl/kea-ctrl-agent.conf.pre | 3 ++- | 22 | src/bin/keactrl/kea-ctrl-agent.conf.pre | 3 ++- |
19 | src/bin/keactrl/kea-dhcp4.conf.pre | 4 ++-- | 23 | src/bin/keactrl/kea-dhcp4.conf.pre | 4 ++-- |
20 | 2 files changed, 4 insertions(+), 3 deletions(-) | 24 | src/bin/keactrl/kea-dhcp6.conf.pre | 4 ++-- |
25 | 3 files changed, 6 insertions(+), 5 deletions(-) | ||
21 | 26 | ||
22 | diff --git a/src/bin/keactrl/kea-ctrl-agent.conf.pre b/src/bin/keactrl/kea-ctrl-agent.conf.pre | 27 | diff --git a/src/bin/keactrl/kea-ctrl-agent.conf.pre b/src/bin/keactrl/kea-ctrl-agent.conf.pre |
23 | index e6ae8b8..50a3092 100644 | 28 | index e6ae8b8..50a3092 100644 |
@@ -34,10 +39,10 @@ index e6ae8b8..50a3092 100644 | |||
34 | // "param1": "foo" | 39 | // "param1": "foo" |
35 | // } | 40 | // } |
36 | diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre | 41 | diff --git a/src/bin/keactrl/kea-dhcp4.conf.pre b/src/bin/keactrl/kea-dhcp4.conf.pre |
37 | index 26bf163..49ddb0a 100644 | 42 | index 6edb8a1..b2a7385 100644 |
38 | --- a/src/bin/keactrl/kea-dhcp4.conf.pre | 43 | --- a/src/bin/keactrl/kea-dhcp4.conf.pre |
39 | +++ b/src/bin/keactrl/kea-dhcp4.conf.pre | 44 | +++ b/src/bin/keactrl/kea-dhcp4.conf.pre |
40 | @@ -252,7 +252,7 @@ | 45 | @@ -255,7 +255,7 @@ |
41 | // // of all devices serviced by Kea, including their identifiers | 46 | // // of all devices serviced by Kea, including their identifiers |
42 | // // (like MAC address), their location in the network, times | 47 | // // (like MAC address), their location in the network, times |
43 | // // when they were active etc. | 48 | // // when they were active etc. |
@@ -46,7 +51,7 @@ index 26bf163..49ddb0a 100644 | |||
46 | // "parameters": { | 51 | // "parameters": { |
47 | // "path": "/var/lib/kea", | 52 | // "path": "/var/lib/kea", |
48 | // "base-name": "kea-forensic4" | 53 | // "base-name": "kea-forensic4" |
49 | @@ -269,7 +269,7 @@ | 54 | @@ -272,7 +272,7 @@ |
50 | // // of specific options or perhaps even a combination of several | 55 | // // of specific options or perhaps even a combination of several |
51 | // // options and fields to uniquely identify a client. Those scenarios | 56 | // // options and fields to uniquely identify a client. Those scenarios |
52 | // // are addressed by the Flexible Identifiers hook application. | 57 | // // are addressed by the Flexible Identifiers hook application. |
@@ -55,3 +60,25 @@ index 26bf163..49ddb0a 100644 | |||
55 | // "parameters": { | 60 | // "parameters": { |
56 | // "identifier-expression": "relay4[2].hex" | 61 | // "identifier-expression": "relay4[2].hex" |
57 | // } | 62 | // } |
63 | diff --git a/src/bin/keactrl/kea-dhcp6.conf.pre b/src/bin/keactrl/kea-dhcp6.conf.pre | ||
64 | index 271021b..5b85854 100644 | ||
65 | --- a/src/bin/keactrl/kea-dhcp6.conf.pre | ||
66 | +++ b/src/bin/keactrl/kea-dhcp6.conf.pre | ||
67 | @@ -201,7 +201,7 @@ | ||
68 | // // of all devices serviced by Kea, including their identifiers | ||
69 | // // (like MAC address), their location in the network, times | ||
70 | // // when they were active etc. | ||
71 | - // "library": "@libdir@/kea/hooks/libdhcp_legal_log.so", | ||
72 | + // "library": "$libdir/kea/hooks/libdhcp_legal_log.so", | ||
73 | // "parameters": { | ||
74 | // "path": "/var/lib/kea", | ||
75 | // "base-name": "kea-forensic6" | ||
76 | @@ -218,7 +218,7 @@ | ||
77 | // // of specific options or perhaps even a combination of several | ||
78 | // // options and fields to uniquely identify a client. Those scenarios | ||
79 | // // are addressed by the Flexible Identifiers hook application. | ||
80 | - // "library": "@libdir@/kea/hooks/libdhcp_flex_id.so", | ||
81 | + // "library": "$libdir/kea/hooks/libdhcp_flex_id.so", | ||
82 | // "parameters": { | ||
83 | // "identifier-expression": "relay6[0].option[37].hex" | ||
84 | // } | ||
diff --git a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch index b7c2fd4f0d..2f5a217d3f 100644 --- a/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch +++ b/meta/recipes-connectivity/kea/files/fix_pid_keactrl.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 18f4f6206c248d6169aa67b3ecf16bf54e9292e8 Mon Sep 17 00:00:00 2001 | 1 | From f5125725e4e2e250ccc78a17a8b77431100e7c15 Mon Sep 17 00:00:00 2001 |
2 | From: Armin kuster <akuster808@gmail.com> | 2 | From: Armin kuster <akuster808@gmail.com> |
3 | Date: Wed, 14 Oct 2020 22:48:31 -0700 | 3 | Date: Wed, 14 Oct 2020 22:48:31 -0700 |
4 | Subject: [PATCH] Busybox does not support ps -p so use pgrep | 4 | Subject: [PATCH] Busybox does not support ps -p so use pgrep |
@@ -8,15 +8,18 @@ Based on changes from Diego Sueiro <Diego.Sueiro@arm.com> | |||
8 | 8 | ||
9 | Signed-off-by: Armin kuster <akuster808@gmail.com> | 9 | Signed-off-by: Armin kuster <akuster808@gmail.com> |
10 | 10 | ||
11 | Refresh to apply on top of 2.6.1. | ||
12 | |||
13 | Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> | ||
11 | --- | 14 | --- |
12 | src/bin/keactrl/keactrl.in | 4 ++-- | 15 | src/bin/keactrl/keactrl.in | 4 ++-- |
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
14 | 17 | ||
15 | diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in | 18 | diff --git a/src/bin/keactrl/keactrl.in b/src/bin/keactrl/keactrl.in |
16 | index ae5bd8e..e9f9b73 100644 | 19 | index cccfdac303..20ae2e6ec5 100644 |
17 | --- a/src/bin/keactrl/keactrl.in | 20 | --- a/src/bin/keactrl/keactrl.in |
18 | +++ b/src/bin/keactrl/keactrl.in | 21 | +++ b/src/bin/keactrl/keactrl.in |
19 | @@ -151,8 +151,8 @@ check_running() { | 22 | @@ -146,8 +146,8 @@ check_running() { |
20 | # Get the PID from the PID file (if it exists) | 23 | # Get the PID from the PID file (if it exists) |
21 | get_pid_from_file "${proc_name}" | 24 | get_pid_from_file "${proc_name}" |
22 | if [ ${_pid} -gt 0 ]; then | 25 | if [ ${_pid} -gt 0 ]; then |
@@ -27,3 +30,6 @@ index ae5bd8e..e9f9b73 100644 | |||
27 | # No error, so PID IS ALIVE | 30 | # No error, so PID IS ALIVE |
28 | _running=1 | 31 | _running=1 |
29 | fi | 32 | fi |
33 | -- | ||
34 | 2.39.2 | ||
35 | |||
diff --git a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service index 91aa2eb14f..f6059d73cb 100644 --- a/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service +++ b/meta/recipes-connectivity/kea/files/kea-dhcp-ddns.service | |||
@@ -6,7 +6,6 @@ After=time-sync.target | |||
6 | 6 | ||
7 | [Service] | 7 | [Service] |
8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ | 8 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/run/kea/ |
9 | ExecStartPre=@BASE_BINDIR@/mkdir -p @LOCALSTATEDIR@/kea | ||
10 | ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf | 9 | ExecStart=@SBINDIR@/kea-dhcp-ddns -c @SYSCONFDIR@/kea/kea-dhcp-ddns.conf |
11 | 10 | ||
12 | [Install] | 11 | [Install] |
diff --git a/meta/recipes-connectivity/kea/kea_2.0.0.bb b/meta/recipes-connectivity/kea/kea_2.6.3.bb index 9f33c325bd..1df91e4522 100644 --- a/meta/recipes-connectivity/kea/kea_2.0.0.bb +++ b/meta/recipes-connectivity/kea/kea_2.6.3.bb | |||
@@ -2,8 +2,8 @@ SUMMARY = "ISC Kea DHCP Server" | |||
2 | DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS." | 2 | DESCRIPTION = "Kea is the next generation of DHCP software developed by ISC. It supports both DHCPv4 and DHCPv6 protocols along with their extensions, e.g. prefix delegation and dynamic updates to DNS." |
3 | HOMEPAGE = "http://kea.isc.org" | 3 | HOMEPAGE = "http://kea.isc.org" |
4 | SECTION = "connectivity" | 4 | SECTION = "connectivity" |
5 | LICENSE = "MPL-2.0 & Apache-2.0" | 5 | LICENSE = "MPL-2.0" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=07b7477a1d815a4aacab73b1531f577a" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=ee16e7280a6cf2a1487717faf33190dc" |
7 | 7 | ||
8 | DEPENDS = "boost log4cplus openssl" | 8 | DEPENDS = "boost log4cplus openssl" |
9 | 9 | ||
@@ -17,8 +17,9 @@ SRC_URI = "http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \ | |||
17 | file://fix-multilib-conflict.patch \ | 17 | file://fix-multilib-conflict.patch \ |
18 | file://fix_pid_keactrl.patch \ | 18 | file://fix_pid_keactrl.patch \ |
19 | file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ | 19 | file://0001-src-lib-log-logger_unittest_support.cc-do-not-write-.patch \ |
20 | file://0001-make-kea-environment-available-to-lfc.patch \ | ||
20 | " | 21 | " |
21 | SRC_URI[sha256sum] = "05854e0c3871b452edace18eccc6ab618940e0249fbe7c232a36d06ae59bf41d" | 22 | SRC_URI[sha256sum] = "00241a5955ffd3d215a2c098c4527f9d7f4b203188b276f9a36250dd3d9dd612" |
22 | 23 | ||
23 | inherit autotools systemd update-rc.d upstream-version-is-even | 24 | inherit autotools systemd update-rc.d upstream-version-is-even |
24 | 25 | ||
@@ -38,6 +39,7 @@ DEBUG_OPTIMIZATION:append:mipsel = " -O" | |||
38 | BUILD_OPTIMIZATION:remove:mipsel = " -Og" | 39 | BUILD_OPTIMIZATION:remove:mipsel = " -Og" |
39 | BUILD_OPTIMIZATION:append:mipsel = " -O" | 40 | BUILD_OPTIMIZATION:append:mipsel = " -O" |
40 | 41 | ||
42 | CXXFLAGS:remove = "-fvisibility-inlines-hidden" | ||
41 | EXTRA_OECONF = "--with-boost-libs=-lboost_system \ | 43 | EXTRA_OECONF = "--with-boost-libs=-lboost_system \ |
42 | --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \ | 44 | --with-log4cplus=${STAGING_DIR_TARGET}${prefix} \ |
43 | --with-openssl=${STAGING_DIR_TARGET}${prefix}" | 45 | --with-openssl=${STAGING_DIR_TARGET}${prefix}" |
@@ -46,7 +48,7 @@ do_configure:prepend() { | |||
46 | # replace abs_top_builddir to avoid introducing the build path | 48 | # replace abs_top_builddir to avoid introducing the build path |
47 | # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target | 49 | # don't expand the abs_top_builddir on the target as the abs_top_builddir is meanlingless on the target |
48 | find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" | 50 | find ${S} -type f -name *.sh.in | xargs sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" |
49 | sed -i "s:@abs_top_srcdir@:@abs_top_srcdir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in | 51 | sed -i "s:@abs_top_builddir@:@abs_top_builddir_placeholder@:g" ${S}/src/bin/admin/kea-admin.in |
50 | } | 52 | } |
51 | 53 | ||
52 | # patch out build host paths for reproducibility | 54 | # patch out build host paths for reproducibility |
@@ -58,11 +60,12 @@ do_install:append() { | |||
58 | install -d ${D}${sysconfdir}/init.d | 60 | install -d ${D}${sysconfdir}/init.d |
59 | install -d ${D}${systemd_system_unitdir} | 61 | install -d ${D}${systemd_system_unitdir} |
60 | 62 | ||
61 | install -m 0644 ${WORKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} | 63 | install -m 0644 ${UNPACKDIR}/kea-dhcp*service ${D}${systemd_system_unitdir} |
62 | install -m 0755 ${WORKDIR}/kea-*-server ${D}${sysconfdir}/init.d | 64 | install -m 0755 ${UNPACKDIR}/kea-*-server ${D}${sysconfdir}/init.d |
63 | sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \ | 65 | sed -i -e 's,@SBINDIR@,${sbindir},g' -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
64 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | 66 | -e 's,@LOCALSTATEDIR@,${localstatedir},g' -e 's,@SYSCONFDIR@,${sysconfdir},g' \ |
65 | ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl | 67 | ${D}${systemd_system_unitdir}/kea-dhcp*service ${D}${sbindir}/keactrl |
68 | sed -i "s:${B}:@abs_top_builddir_placeholder@:g" ${D}${sbindir}/kea-admin | ||
66 | } | 69 | } |
67 | 70 | ||
68 | do_install:append() { | 71 | do_install:append() { |
diff --git a/meta/recipes-connectivity/libpcap/libpcap_1.10.1.bb b/meta/recipes-connectivity/libpcap/libpcap_1.10.5.bb index 9a8c46e0ef..7ad52acd06 100644 --- a/meta/recipes-connectivity/libpcap/libpcap_1.10.1.bb +++ b/meta/recipes-connectivity/libpcap/libpcap_1.10.5.bb | |||
@@ -10,8 +10,8 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5eb289217c160e2920d2e35bddc36453 \ | |||
10 | file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2" | 10 | file://pcap.h;beginline=1;endline=32;md5=39af3510e011f34b8872f120b1dc31d2" |
11 | DEPENDS = "flex-native bison-native" | 11 | DEPENDS = "flex-native bison-native" |
12 | 12 | ||
13 | SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.gz" | 13 | SRC_URI = "https://www.tcpdump.org/release/${BP}.tar.xz" |
14 | SRC_URI[sha256sum] = "ed285f4accaf05344f90975757b3dbfe772ba41d1c401c2648b7fa45b711bdd4" | 14 | SRC_URI[sha256sum] = "84fa89ac6d303028c1c5b754abff77224f45eca0a94eb1a34ff0aa9ceece3925" |
15 | 15 | ||
16 | inherit autotools binconfig-disabled pkgconfig | 16 | inherit autotools binconfig-disabled pkgconfig |
17 | 17 | ||
@@ -19,10 +19,11 @@ BINCONFIG = "${bindir}/pcap-config" | |||
19 | 19 | ||
20 | # Explicitly disable dag support. We don't have recipe for it and if enabled here, | 20 | # Explicitly disable dag support. We don't have recipe for it and if enabled here, |
21 | # configure script poisons the include dirs with /usr/local/include even when the | 21 | # configure script poisons the include dirs with /usr/local/include even when the |
22 | # support hasn't been detected. | 22 | # support hasn't been detected. Do the same thing for DPDK. |
23 | EXTRA_OECONF = " \ | 23 | EXTRA_OECONF = " \ |
24 | --with-pcap=linux \ | 24 | --with-pcap=linux \ |
25 | --without-dag \ | 25 | --without-dag \ |
26 | --without-dpdk \ | ||
26 | " | 27 | " |
27 | EXTRA_AUTORECONF += "--exclude=aclocal" | 28 | EXTRA_AUTORECONF += "--exclude=aclocal" |
28 | 29 | ||
@@ -39,4 +40,4 @@ do_configure:prepend () { | |||
39 | sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.ac | 40 | sed 's|\([ "^'\''I]\+\)/usr/include/|\1${STAGING_INCDIR}/|g' -i ${S}/configure.ac |
40 | } | 41 | } |
41 | 42 | ||
42 | BBCLASSEXTEND = "native" | 43 | BBCLASSEXTEND = "native nativesdk" |
diff --git a/meta/recipes-connectivity/libuv/libuv_1.42.0.bb b/meta/recipes-connectivity/libuv/libuv_1.51.0.bb index 169bd6206b..9ff9cf35e2 100644 --- a/meta/recipes-connectivity/libuv/libuv_1.42.0.bb +++ b/meta/recipes-connectivity/libuv/libuv_1.51.0.bb | |||
@@ -3,12 +3,12 @@ HOMEPAGE = "https://github.com/libuv/libuv" | |||
3 | DESCRIPTION = "libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others." | 3 | DESCRIPTION = "libuv is a multi-platform support library with a focus on asynchronous I/O. It was primarily developed for use by Node.js, but it's also used by Luvit, Julia, pyuv, and others." |
4 | BUGTRACKER = "https://github.com/libuv/libuv/issues" | 4 | BUGTRACKER = "https://github.com/libuv/libuv/issues" |
5 | LICENSE = "MIT" | 5 | LICENSE = "MIT" |
6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=a68902a430e32200263d182d44924d47" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=74b6f2f7818a4e3a80d03556f71b129b \ |
7 | file://LICENSE-extra;md5=f9307417749e19bd1d6d68a394b49324" | ||
7 | 8 | ||
8 | SRCREV = "6ce14710da7079eb248868171f6343bc409ea3a4" | 9 | SRCREV = "5152db2cbfeb5582e9c27c5ea1dba2cd9e10759b" |
9 | SRC_URI = "git://github.com/libuv/libuv;branch=v1.x" | 10 | SRC_URI = "git://github.com/libuv/libuv.git;branch=v1.x;protocol=https;tag=v${PV}" |
10 | 11 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | |
11 | S = "${WORKDIR}/git" | ||
12 | 12 | ||
13 | inherit autotools | 13 | inherit autotools |
14 | 14 | ||
diff --git a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_20250613.bb index 837490f15f..72663c7e0a 100644 --- a/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_git.bb +++ b/meta/recipes-connectivity/mobile-broadband-provider-info/mobile-broadband-provider-info_20250613.bb | |||
@@ -4,13 +4,12 @@ DESCRIPTION = "Mobile Broadband Service Provider Database stores service provide | |||
4 | SECTION = "network" | 4 | SECTION = "network" |
5 | LICENSE = "PD" | 5 | LICENSE = "PD" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04" | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=87964579b2a8ece4bc6744d2dc9a8b04" |
7 | SRCREV = "11f2247eccd3c161b8fd9b41143862e9fb81193c" | 7 | |
8 | PV = "20210805" | ||
9 | PE = "1" | 8 | PE = "1" |
10 | 9 | ||
11 | SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https" | 10 | SRC_URI = "git://gitlab.gnome.org/GNOME/mobile-broadband-provider-info.git;protocol=https;branch=main;tag=${PV}" |
12 | S = "${WORKDIR}/git" | 11 | SRCREV = "2a1b409491a531aedcf3eb3ba907929d96bd181a" |
13 | 12 | ||
14 | inherit autotools | 13 | inherit meson |
15 | 14 | ||
16 | DEPENDS += "libxslt-native" | 15 | DEPENDS += "libxslt-native" |
diff --git a/meta/recipes-connectivity/neard/neard_0.16.bb b/meta/recipes-connectivity/neard/neard_0.19.bb index b6cc1d6ced..41c7e55f44 100644 --- a/meta/recipes-connectivity/neard/neard_0.16.bb +++ b/meta/recipes-connectivity/neard/neard_0.19.bb | |||
@@ -1,22 +1,21 @@ | |||
1 | SUMMARY = "Linux NFC daemon" | 1 | SUMMARY = "Linux NFC daemon" |
2 | DESCRIPTION = "A daemon for the Linux Near Field Communication stack" | 2 | DESCRIPTION = "A daemon for the Linux Near Field Communication stack" |
3 | HOMEPAGE = "http://01.org/linux-nfc" | 3 | HOMEPAGE = "http://01.org/linux-nfc" |
4 | LICENSE = "GPLv2" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | ||
6 | file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \ | ||
7 | " | ||
5 | 8 | ||
6 | DEPENDS = "dbus glib-2.0 libnl" | 9 | DEPENDS = "dbus glib-2.0 libnl autoconf-archive-native" |
7 | 10 | ||
8 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/nfc/${BP}.tar.xz \ | 11 | SRC_URI = "git://git.kernel.org/pub/scm/network/nfc/neard.git;protocol=https;branch=master \ |
9 | file://neard.in \ | 12 | file://neard.in \ |
10 | file://Makefile.am-fix-parallel-issue.patch \ | 13 | file://Makefile.am-fix-parallel-issue.patch \ |
11 | file://Makefile.am-do-not-ship-version.h.patch \ | 14 | file://Makefile.am-do-not-ship-version.h.patch \ |
12 | file://0001-Add-header-dependency-to-nciattach.o.patch \ | 15 | file://0001-Add-header-dependency-to-nciattach.o.patch \ |
13 | " | 16 | " |
14 | SRC_URI[md5sum] = "5c691fb7872856dc0d909c298bc8cb41" | ||
15 | SRC_URI[sha256sum] = "eae3b11c541a988ec11ca94b7deab01080cd5b58cfef3ced6ceac9b6e6e65b36" | ||
16 | 17 | ||
17 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \ | 18 | SRCREV = "a1dc8a75cba999728e154a0f811ab9dd50c809f7" |
18 | file://src/near.h;beginline=1;endline=20;md5=358e4deefef251a4761e1ffacc965d13 \ | ||
19 | " | ||
20 | 19 | ||
21 | inherit autotools pkgconfig systemd update-rc.d | 20 | inherit autotools pkgconfig systemd update-rc.d |
22 | 21 | ||
@@ -30,18 +29,17 @@ EXTRA_OECONF += "--enable-tools" | |||
30 | do_install:append() { | 29 | do_install:append() { |
31 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then | 30 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then |
32 | install -d ${D}${sysconfdir}/init.d/ | 31 | install -d ${D}${sysconfdir}/init.d/ |
33 | sed "s:@installpath@:${libexecdir}/nfc:" ${WORKDIR}/neard.in \ | 32 | sed "s:@installpath@:${libexecdir}/nfc:" ${UNPACKDIR}/neard.in \ |
34 | > ${D}${sysconfdir}/init.d/neard | 33 | > ${D}${sysconfdir}/init.d/neard |
35 | chmod 0755 ${D}${sysconfdir}/init.d/neard | 34 | chmod 0755 ${D}${sysconfdir}/init.d/neard |
36 | fi | 35 | fi |
37 | } | 36 | } |
38 | 37 | ||
39 | RDEPENDS:${PN} = "dbus" | ||
40 | |||
41 | # Bluez & Wifi are not mandatory except for handover | 38 | # Bluez & Wifi are not mandatory except for handover |
39 | WIRELESS_DAEMON ??= "wpa-supplicant" | ||
42 | RRECOMMENDS:${PN} = "\ | 40 | RRECOMMENDS:${PN} = "\ |
43 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ | 41 | ${@bb.utils.contains('DISTRO_FEATURES', 'bluetooth', 'bluez5', '', d)} \ |
44 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','wpa-supplicant', '', d)} \ | 42 | ${@bb.utils.contains('DISTRO_FEATURES', 'wifi','${WIRELESS_DAEMON}', '', d)} \ |
45 | " | 43 | " |
46 | 44 | ||
47 | INITSCRIPT_NAME = "neard" | 45 | INITSCRIPT_NAME = "neard" |
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch deleted file mode 100644 index bd350144e3..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch +++ /dev/null | |||
@@ -1,299 +0,0 @@ | |||
1 | From 690a90a5b7786e40b5447ad7c5f19a7657d27405 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <Mingli.Yu@windriver.com> | ||
3 | Date: Fri, 14 Dec 2018 17:44:32 +0800 | ||
4 | Subject: [PATCH] Makefile.am: fix undefined function for libnsm.a | ||
5 | |||
6 | The source file of libnsm.a uses some function | ||
7 | in ../support/misc/file.c, add ../support/misc/file.c | ||
8 | to libnsm_a_SOURCES to fix build error when run | ||
9 | "make -C tests statdb_dump": | ||
10 | | ../support/nsm/libnsm.a(file.o): In function `nsm_make_pathname': | ||
11 | | /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | ||
12 | | /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | ||
13 | | /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:175: undefined reference to `generic_make_pathname' | ||
14 | | ../support/nsm/libnsm.a(file.o): In function `nsm_setup_pathnames': | ||
15 | | /usr/src/debug/nfs-utils/2.3.3-r0/nfs-utils-2.3.3/support/nsm/file.c:280: undefined reference to `generic_setup_basedir' | ||
16 | | collect2: error: ld returned 1 exit status | ||
17 | |||
18 | As there is already one source file named file.c | ||
19 | as support/nsm/file.c in support/nsm/Makefile.am, | ||
20 | so rename ../support/misc/file.c to ../support/misc/misc.c. | ||
21 | |||
22 | Upstream-Status: Submitted[https://marc.info/?l=linux-nfs&m=154502780423058&w=2] | ||
23 | |||
24 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> | ||
25 | |||
26 | Rebase it. | ||
27 | |||
28 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
29 | --- | ||
30 | support/misc/Makefile.am | 2 +- | ||
31 | support/misc/file.c | 115 --------------------------------------------------------------------------------------------------------------- | ||
32 | support/misc/misc.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
33 | support/nsm/Makefile.am | 2 +- | ||
34 | 4 files changed, 113 insertions(+), 117 deletions(-) | ||
35 | |||
36 | diff --git a/support/misc/Makefile.am b/support/misc/Makefile.am | ||
37 | index f9993e3..8b0e9db 100644 | ||
38 | --- a/support/misc/Makefile.am | ||
39 | +++ b/support/misc/Makefile.am | ||
40 | @@ -1,7 +1,7 @@ | ||
41 | ## Process this file with automake to produce Makefile.in | ||
42 | |||
43 | noinst_LIBRARIES = libmisc.a | ||
44 | -libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c file.c \ | ||
45 | +libmisc_a_SOURCES = tcpwrapper.c from_local.c mountpoint.c misc.c \ | ||
46 | nfsd_path.c workqueue.c xstat.c | ||
47 | |||
48 | MAINTAINERCLEANFILES = Makefile.in | ||
49 | diff --git a/support/misc/file.c b/support/misc/file.c | ||
50 | deleted file mode 100644 | ||
51 | index 06f6bb2..0000000 | ||
52 | --- a/support/misc/file.c | ||
53 | +++ /dev/null | ||
54 | @@ -1,115 +0,0 @@ | ||
55 | -/* | ||
56 | - * Copyright 2009 Oracle. All rights reserved. | ||
57 | - * Copyright 2017 Red Hat, Inc. All rights reserved. | ||
58 | - * | ||
59 | - * This file is part of nfs-utils. | ||
60 | - * | ||
61 | - * nfs-utils is free software; you can redistribute it and/or modify | ||
62 | - * it under the terms of the GNU General Public License as published by | ||
63 | - * the Free Software Foundation; either version 2 of the License, or | ||
64 | - * (at your option) any later version. | ||
65 | - * | ||
66 | - * nfs-utils is distributed in the hope that it will be useful, | ||
67 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
68 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
69 | - * GNU General Public License for more details. | ||
70 | - * | ||
71 | - * You should have received a copy of the GNU General Public License | ||
72 | - * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>. | ||
73 | - */ | ||
74 | - | ||
75 | -#ifdef HAVE_CONFIG_H | ||
76 | -#include <config.h> | ||
77 | -#endif | ||
78 | - | ||
79 | -#include <sys/stat.h> | ||
80 | - | ||
81 | -#include <string.h> | ||
82 | -#include <libgen.h> | ||
83 | -#include <stdio.h> | ||
84 | -#include <errno.h> | ||
85 | -#include <dirent.h> | ||
86 | -#include <stdlib.h> | ||
87 | -#include <stdbool.h> | ||
88 | -#include <limits.h> | ||
89 | - | ||
90 | -#include "xlog.h" | ||
91 | -#include "misc.h" | ||
92 | - | ||
93 | -/* | ||
94 | - * Returns a dynamically allocated, '\0'-terminated buffer | ||
95 | - * containing an appropriate pathname, or NULL if an error | ||
96 | - * occurs. Caller must free the returned result with free(3). | ||
97 | - */ | ||
98 | -__attribute__((__malloc__)) | ||
99 | -char * | ||
100 | -generic_make_pathname(const char *base, const char *leaf) | ||
101 | -{ | ||
102 | - size_t size; | ||
103 | - char *path; | ||
104 | - int len; | ||
105 | - | ||
106 | - size = strlen(base) + strlen(leaf) + 2; | ||
107 | - if (size > PATH_MAX) | ||
108 | - return NULL; | ||
109 | - | ||
110 | - path = malloc(size); | ||
111 | - if (path == NULL) | ||
112 | - return NULL; | ||
113 | - | ||
114 | - len = snprintf(path, size, "%s/%s", base, leaf); | ||
115 | - if ((len < 0) || ((size_t)len >= size)) { | ||
116 | - free(path); | ||
117 | - return NULL; | ||
118 | - } | ||
119 | - | ||
120 | - return path; | ||
121 | -} | ||
122 | - | ||
123 | - | ||
124 | -/** | ||
125 | - * generic_setup_basedir - set up basedir | ||
126 | - * @progname: C string containing name of program, for error messages | ||
127 | - * @parentdir: C string containing pathname to on-disk state, or NULL | ||
128 | - * @base: character buffer to contain the basedir that is set up | ||
129 | - * @baselen: size of @base in bytes | ||
130 | - * | ||
131 | - * This runs before logging is set up, so error messages are directed | ||
132 | - * to stderr. | ||
133 | - * | ||
134 | - * Returns true and sets up our basedir, if @parentdir was valid | ||
135 | - * and usable; otherwise false is returned. | ||
136 | - */ | ||
137 | -_Bool | ||
138 | -generic_setup_basedir(const char *progname, const char *parentdir, char *base, | ||
139 | - const size_t baselen) | ||
140 | -{ | ||
141 | - static char buf[PATH_MAX]; | ||
142 | - struct stat st; | ||
143 | - char *path; | ||
144 | - | ||
145 | - /* First: test length of name and whether it exists */ | ||
146 | - if ((strlen(parentdir) >= baselen) || (strlen(parentdir) >= PATH_MAX)) { | ||
147 | - (void)fprintf(stderr, "%s: Directory name too long: %s", | ||
148 | - progname, parentdir); | ||
149 | - return false; | ||
150 | - } | ||
151 | - if (lstat(parentdir, &st) == -1) { | ||
152 | - (void)fprintf(stderr, "%s: Failed to stat %s: %s", | ||
153 | - progname, parentdir, strerror(errno)); | ||
154 | - return false; | ||
155 | - } | ||
156 | - | ||
157 | - /* Ensure we have a clean directory pathname */ | ||
158 | - strncpy(buf, parentdir, sizeof(buf)-1); | ||
159 | - path = dirname(buf); | ||
160 | - if (*path == '.') { | ||
161 | - (void)fprintf(stderr, "%s: Unusable directory %s", | ||
162 | - progname, parentdir); | ||
163 | - return false; | ||
164 | - } | ||
165 | - | ||
166 | - xlog(D_CALL, "Using %s as the state directory", parentdir); | ||
167 | - strcpy(base, parentdir); | ||
168 | - return true; | ||
169 | -} | ||
170 | diff --git a/support/misc/misc.c b/support/misc/misc.c | ||
171 | new file mode 100644 | ||
172 | index 0000000..e7c3819 | ||
173 | --- /dev/null | ||
174 | +++ b/support/misc/misc.c | ||
175 | @@ -0,0 +1,111 @@ | ||
176 | +/* | ||
177 | + * Copyright 2009 Oracle. All rights reserved. | ||
178 | + * Copyright 2017 Red Hat, Inc. All rights reserved. | ||
179 | + * | ||
180 | + * This file is part of nfs-utils. | ||
181 | + * | ||
182 | + * nfs-utils is free software; you can redistribute it and/or modify | ||
183 | + * it under the terms of the GNU General Public License as published by | ||
184 | + * the Free Software Foundation; either version 2 of the License, or | ||
185 | + * (at your option) any later version. | ||
186 | + * | ||
187 | + * nfs-utils is distributed in the hope that it will be useful, | ||
188 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
189 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
190 | + * GNU General Public License for more details. | ||
191 | + * | ||
192 | + * You should have received a copy of the GNU General Public License | ||
193 | + * along with nfs-utils. If not, see <http://www.gnu.org/licenses/>. | ||
194 | + */ | ||
195 | + | ||
196 | +#include <sys/stat.h> | ||
197 | + | ||
198 | +#include <string.h> | ||
199 | +#include <libgen.h> | ||
200 | +#include <stdio.h> | ||
201 | +#include <errno.h> | ||
202 | +#include <dirent.h> | ||
203 | +#include <stdlib.h> | ||
204 | +#include <stdbool.h> | ||
205 | +#include <limits.h> | ||
206 | + | ||
207 | +#include "xlog.h" | ||
208 | +#include "misc.h" | ||
209 | + | ||
210 | +/* | ||
211 | + * Returns a dynamically allocated, '\0'-terminated buffer | ||
212 | + * containing an appropriate pathname, or NULL if an error | ||
213 | + * occurs. Caller must free the returned result with free(3). | ||
214 | + */ | ||
215 | +__attribute__((__malloc__)) | ||
216 | +char * | ||
217 | +generic_make_pathname(const char *base, const char *leaf) | ||
218 | +{ | ||
219 | + size_t size; | ||
220 | + char *path; | ||
221 | + int len; | ||
222 | + | ||
223 | + size = strlen(base) + strlen(leaf) + 2; | ||
224 | + if (size > PATH_MAX) | ||
225 | + return NULL; | ||
226 | + | ||
227 | + path = malloc(size); | ||
228 | + if (path == NULL) | ||
229 | + return NULL; | ||
230 | + | ||
231 | + len = snprintf(path, size, "%s/%s", base, leaf); | ||
232 | + if ((len < 0) || ((size_t)len >= size)) { | ||
233 | + free(path); | ||
234 | + return NULL; | ||
235 | + } | ||
236 | + | ||
237 | + return path; | ||
238 | +} | ||
239 | + | ||
240 | + | ||
241 | +/** | ||
242 | + * generic_setup_basedir - set up basedir | ||
243 | + * @progname: C string containing name of program, for error messages | ||
244 | + * @parentdir: C string containing pathname to on-disk state, or NULL | ||
245 | + * @base: character buffer to contain the basedir that is set up | ||
246 | + * @baselen: size of @base in bytes | ||
247 | + * | ||
248 | + * This runs before logging is set up, so error messages are directed | ||
249 | + * to stderr. | ||
250 | + * | ||
251 | + * Returns true and sets up our basedir, if @parentdir was valid | ||
252 | + * and usable; otherwise false is returned. | ||
253 | + */ | ||
254 | +_Bool | ||
255 | +generic_setup_basedir(const char *progname, const char *parentdir, char *base, | ||
256 | + const size_t baselen) | ||
257 | +{ | ||
258 | + static char buf[PATH_MAX]; | ||
259 | + struct stat st; | ||
260 | + char *path; | ||
261 | + | ||
262 | + /* First: test length of name and whether it exists */ | ||
263 | + if ((strlen(parentdir) >= baselen) || (strlen(parentdir) >= PATH_MAX)) { | ||
264 | + (void)fprintf(stderr, "%s: Directory name too long: %s", | ||
265 | + progname, parentdir); | ||
266 | + return false; | ||
267 | + } | ||
268 | + if (lstat(parentdir, &st) == -1) { | ||
269 | + (void)fprintf(stderr, "%s: Failed to stat %s: %s", | ||
270 | + progname, parentdir, strerror(errno)); | ||
271 | + return false; | ||
272 | + } | ||
273 | + | ||
274 | + /* Ensure we have a clean directory pathname */ | ||
275 | + strncpy(buf, parentdir, sizeof(buf)-1); | ||
276 | + path = dirname(buf); | ||
277 | + if (*path == '.') { | ||
278 | + (void)fprintf(stderr, "%s: Unusable directory %s", | ||
279 | + progname, parentdir); | ||
280 | + return false; | ||
281 | + } | ||
282 | + | ||
283 | + xlog(D_CALL, "Using %s as the state directory", parentdir); | ||
284 | + strcpy(base, parentdir); | ||
285 | + return true; | ||
286 | +} | ||
287 | diff --git a/support/nsm/Makefile.am b/support/nsm/Makefile.am | ||
288 | index 8f5874e..68f1a46 100644 | ||
289 | --- a/support/nsm/Makefile.am | ||
290 | +++ b/support/nsm/Makefile.am | ||
291 | @@ -10,7 +10,7 @@ GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H) | ||
292 | EXTRA_DIST = sm_inter.x | ||
293 | |||
294 | noinst_LIBRARIES = libnsm.a | ||
295 | -libnsm_a_SOURCES = $(GENFILES) file.c rpc.c | ||
296 | +libnsm_a_SOURCES = $(GENFILES) ../misc/misc.c file.c rpc.c | ||
297 | |||
298 | BUILT_SOURCES = $(GENFILES) | ||
299 | |||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-locktest-Makefile.am-Do-not-use-build-flags.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-locktest-Makefile.am-Do-not-use-build-flags.patch new file mode 100644 index 0000000000..351407ddcd --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0001-locktest-Makefile.am-Do-not-use-build-flags.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 9efa7a0d37665d9bb0f46d2407883a5ab42c2b84 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 24 Jul 2023 20:39:16 -0700 | ||
4 | Subject: [PATCH] locktest: Makefile.am: Do not use build flags | ||
5 | |||
6 | Using CFLAGS_FOR_BUILD etc. here means it is using wrong flags | ||
7 | when thse flags are speficied different than target flags which | ||
8 | is common when cross-building. It can pass wrong paths to linker | ||
9 | and it would find incompatible libraries during link since they | ||
10 | are from host system and target maybe not same as build host. | ||
11 | |||
12 | Fixes subtle errors like | ||
13 | | aarch64-yoe-linux-ld.lld: error: /mnt/b/yoe/master/build/tmp/work/cortexa72-cortexa53-crypto-yoe-linux/nfs-utils/2.6.3-r0/recipe-sysroot-native/usr/lib/libsqlite3.so is incompatible with elf64-littleaarch64 | ||
14 | |||
15 | Upstream-Status: Submitted [https://marc.info/?l=linux-nfs&m=169025681008001&w=2] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | --- | ||
18 | tools/locktest/Makefile.am | 3 --- | ||
19 | 1 file changed, 3 deletions(-) | ||
20 | |||
21 | diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am | ||
22 | index e8914655..2fd36971 100644 | ||
23 | --- a/tools/locktest/Makefile.am | ||
24 | +++ b/tools/locktest/Makefile.am | ||
25 | @@ -2,8 +2,5 @@ | ||
26 | |||
27 | noinst_PROGRAMS = testlk | ||
28 | testlk_SOURCES = testlk.c | ||
29 | -testlk_CFLAGS=$(CFLAGS_FOR_BUILD) | ||
30 | -testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) | ||
31 | -testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD) | ||
32 | |||
33 | MAINTAINERCLEANFILES = Makefile.in | ||
34 | -- | ||
35 | 2.41.0 | ||
36 | |||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch new file mode 100644 index 0000000000..bbf44d5977 --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0004-Use-nogroup-for-nobody-group.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 001913c5eb0aad933a93ee966252905cd46d776b Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel McGregor <daniel.mcgregor@vecima.com> | ||
3 | Date: Tue, 6 Jun 2023 16:07:53 -0600 | ||
4 | Subject: [PATCH] Use "nogroup" for nobody group | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe-core specific, configuration] | ||
7 | Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> | ||
8 | --- | ||
9 | support/nfsidmap/idmapd.conf | 2 +- | ||
10 | utils/idmapd/idmapd.c | 2 +- | ||
11 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
12 | |||
13 | diff --git a/support/nfsidmap/idmapd.conf b/support/nfsidmap/idmapd.conf | ||
14 | index 2a2f79a1..e6f3724f 100644 | ||
15 | --- a/support/nfsidmap/idmapd.conf | ||
16 | +++ b/support/nfsidmap/idmapd.conf | ||
17 | @@ -41,7 +41,7 @@ | ||
18 | [Mapping] | ||
19 | |||
20 | #Nobody-User = nobody | ||
21 | -#Nobody-Group = nobody | ||
22 | +#Nobody-Group = nogroup | ||
23 | |||
24 | [Translation] | ||
25 | |||
26 | diff --git a/utils/idmapd/idmapd.c b/utils/idmapd/idmapd.c | ||
27 | index cd9a965f..3be805e9 100644 | ||
28 | --- a/utils/idmapd/idmapd.c | ||
29 | +++ b/utils/idmapd/idmapd.c | ||
30 | @@ -89,7 +89,7 @@ | ||
31 | #endif | ||
32 | |||
33 | #ifndef NFS4NOBODY_GROUP | ||
34 | -#define NFS4NOBODY_GROUP "nobody" | ||
35 | +#define NFS4NOBODY_GROUP "nogroup" | ||
36 | #endif | ||
37 | |||
38 | /* From Niels */ | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch new file mode 100644 index 0000000000..3241e8e859 --- /dev/null +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/0005-find-OE-provided-Kerberos.patch | |||
@@ -0,0 +1,42 @@ | |||
1 | From a2af266f013722a64c5d04e0fe097cd711393a53 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel McGregor <daniel.mcgregor@vecima.com> | ||
3 | Date: Wed, 8 Nov 2023 16:24:20 -0600 | ||
4 | Subject: [PATCH] find OE provided Kerberos | ||
5 | |||
6 | Upstream-Status: Inappropriate [oe-core specific] | ||
7 | Signed-off-by: Daniel McGregor <daniel.mcgregor@vecima.com> | ||
8 | --- | ||
9 | aclocal/kerberos5.m4 | 6 ++++-- | ||
10 | 1 file changed, 4 insertions(+), 2 deletions(-) | ||
11 | |||
12 | diff --git a/aclocal/kerberos5.m4 b/aclocal/kerberos5.m4 | ||
13 | index f96f0fd4..ad85fdf2 100644 | ||
14 | --- a/aclocal/kerberos5.m4 | ||
15 | +++ b/aclocal/kerberos5.m4 | ||
16 | @@ -22,8 +22,8 @@ AC_DEFUN([AC_KERBEROS_V5],[ | ||
17 | dnl This ugly hack brought on by the split installation of | ||
18 | dnl MIT Kerberos on Fedora Core 1 | ||
19 | K5CONFIG="" | ||
20 | - if test -f $dir/bin/krb5-config; then | ||
21 | - K5CONFIG=$dir/bin/krb5-config | ||
22 | + if test -f $dir/bin/crossscripts/krb5-config; then | ||
23 | + K5CONFIG=$dir/bin/crossscripts/krb5-config | ||
24 | elif test -f "/usr/kerberos/bin/krb5-config"; then | ||
25 | K5CONFIG="/usr/kerberos/bin/krb5-config" | ||
26 | elif test -f "/usr/lib/mit/bin/krb5-config"; then | ||
27 | @@ -72,6 +72,7 @@ AC_DEFUN([AC_KERBEROS_V5],[ | ||
28 | AC_MSG_RESULT($KRBDIR) | ||
29 | |||
30 | dnl Check if -rpath=$(KRBDIR)/lib is needed | ||
31 | + if false; then | ||
32 | echo "The current KRBDIR is $KRBDIR" | ||
33 | if test "$KRBDIR/lib" = "/lib" -o "$KRBDIR/lib" = "/usr/lib" \ | ||
34 | -o "$KRBDIR/lib" = "//lib" -o "$KRBDIR/lib" = "/usr//lib" ; then | ||
35 | @@ -81,6 +82,7 @@ AC_DEFUN([AC_KERBEROS_V5],[ | ||
36 | else | ||
37 | KRBLDFLAGS="-Wl,-rpath=$KRBDIR/lib" | ||
38 | fi | ||
39 | + fi | ||
40 | |||
41 | dnl Now check for functions within gssapi library | ||
42 | AC_CHECK_LIB($gssapi_lib, gss_krb5_export_lucid_sec_context, | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch deleted file mode 100644 index f13d7b380c..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/bugfix-adjust-statd-service-name.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 398fed3bb0350cb1229e54e7020ae0e044c206d1 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Ulrich=20=C3=96lmann?= <u.oelmann@pengutronix.de> | ||
3 | Date: Wed, 17 Feb 2016 08:33:45 +0100 | ||
4 | Subject: bugfix: adjust statd service name | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Upstream uses 'rpc-statd.service' and Yocto introduced 'nfs-statd.service' | ||
10 | instead but forgot to update the mount.nfs helper 'start-statd' accordingly. | ||
11 | |||
12 | Upstream-Status: Inappropriate [other] | ||
13 | |||
14 | Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de> | ||
15 | |||
16 | Rebase it. | ||
17 | |||
18 | Signed-off-by: Robert Yang <liezhi.yang@windriver.com> | ||
19 | --- | ||
20 | utils/statd/start-statd | 4 ++-- | ||
21 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
22 | |||
23 | diff --git a/utils/statd/start-statd b/utils/statd/start-statd | ||
24 | index af5c950..df9b9be 100755 | ||
25 | --- a/utils/statd/start-statd | ||
26 | +++ b/utils/statd/start-statd | ||
27 | @@ -28,10 +28,10 @@ fi | ||
28 | # First try systemd if it's installed. | ||
29 | if [ -d /run/systemd/system ]; then | ||
30 | # Quit only if the call worked. | ||
31 | - if systemctl start rpc-statd.service; then | ||
32 | + if systemctl start nfs-statd.service; then | ||
33 | # Ensure systemd knows not to stop rpc.statd or its dependencies | ||
34 | # on 'systemctl isolate ..' | ||
35 | - systemctl add-wants --runtime remote-fs.target rpc-statd.service | ||
36 | + systemctl add-wants --runtime remote-fs.target nfs-statd.service | ||
37 | exit 0 | ||
38 | fi | ||
39 | fi | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch deleted file mode 100644 index fde99b599e..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/clang-warnings.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 1ab0c326405c6daa06f1a7eb4b0b60bf4e0584c2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 31 Dec 2019 08:15:34 -0800 | ||
4 | Subject: [PATCH] Detect warning options during configure | ||
5 | |||
6 | Certain options maybe compiler specific therefore its better | ||
7 | to detect them before use. | ||
8 | |||
9 | nfs_error copies the format string and appends newline to it | ||
10 | but compiler can forget that it was format string since its not | ||
11 | same fmt string that was passed. Ignore the warning | ||
12 | |||
13 | Wdiscarded-qualifiers is gcc specific and this is no longer needed | ||
14 | |||
15 | Upstream-Status: Pending | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | |||
18 | --- | ||
19 | support/nfs/xcommon.c | 3 +++ | ||
20 | 1 file changed, 3 insertions(+) | ||
21 | |||
22 | diff --git a/support/nfs/xcommon.c b/support/nfs/xcommon.c | ||
23 | index 3989f0b..e080423 100644 | ||
24 | --- a/support/nfs/xcommon.c | ||
25 | +++ b/support/nfs/xcommon.c | ||
26 | @@ -98,7 +98,10 @@ nfs_error (const char *fmt, ...) { | ||
27 | |||
28 | fmt2 = xstrconcat2 (fmt, "\n"); | ||
29 | va_start (args, fmt); | ||
30 | +#pragma GCC diagnostic push | ||
31 | +#pragma GCC diagnostic ignored "-Wformat-nonliteral" | ||
32 | vfprintf (stderr, fmt2, args); | ||
33 | +#pragma GCC diagnostic pop | ||
34 | va_end (args); | ||
35 | free (fmt2); | ||
36 | } | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service deleted file mode 100644 index c01415de84..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-mountd.service +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=NFS Mount Daemon | ||
3 | DefaultDependencies=no | ||
4 | After=rpcbind.socket | ||
5 | Requires=proc-fs-nfsd.mount | ||
6 | After=proc-fs-nfsd.mount | ||
7 | After=network.target local-fs.target | ||
8 | BindsTo=nfs-server.service | ||
9 | ConditionPathExists=@SYSCONFDIR@/exports | ||
10 | |||
11 | [Service] | ||
12 | EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf | ||
13 | ExecStart=@SBINDIR@/rpc.mountd -F $MOUNTD_OPTS | ||
14 | LimitNOFILE=@HIGH_RLIMIT_NOFILE@ | ||
15 | |||
16 | [Install] | ||
17 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service deleted file mode 100644 index 5c845b7e82..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-server.service +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=NFS server and services | ||
3 | DefaultDependencies=no | ||
4 | Requires=network.target proc-fs-nfsd.mount | ||
5 | Requires=nfs-mountd.service | ||
6 | Wants=rpcbind.service | ||
7 | After=local-fs.target | ||
8 | After=network.target proc-fs-nfsd.mount rpcbind.service nfs-mountd.service | ||
9 | ConditionPathExists=@SYSCONFDIR@/exports | ||
10 | |||
11 | [Service] | ||
12 | Type=oneshot | ||
13 | EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf | ||
14 | ExecStartPre=@SBINDIR@/exportfs -r | ||
15 | ExecStart=@SBINDIR@/rpc.nfsd $NFSD_OPTS $NFSD_COUNT | ||
16 | ExecStop=@SBINDIR@/rpc.nfsd 0 | ||
17 | ExecStopPost=@SBINDIR@/exportfs -au | ||
18 | ExecStopPost=@SBINDIR@/exportfs -f | ||
19 | ExecReload=@SBINDIR@/exportfs -r | ||
20 | RemainAfterExit=yes | ||
21 | |||
22 | [Install] | ||
23 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service deleted file mode 100644 index 4fa64e1998..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-statd.service +++ /dev/null | |||
@@ -1,14 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=NFS status monitor for NFSv2/3 locking. | ||
3 | DefaultDependencies=no | ||
4 | Conflicts=umount.target | ||
5 | Requires=nss-lookup.target rpcbind.service | ||
6 | After=network.target nss-lookup.target rpcbind.service | ||
7 | |||
8 | [Service] | ||
9 | EnvironmentFile=-@SYSCONFDIR@/nfs-utils.conf | ||
10 | ExecStart=@SBINDIR@/rpc.statd -F $STATD_OPTS | ||
11 | LimitNOFILE=@HIGH_RLIMIT_NOFILE@ | ||
12 | |||
13 | [Install] | ||
14 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch deleted file mode 100644 index ede0dcefc4..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-debianize-start-statd.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | [PATCH] nfs-utils: debianize start-statd | ||
2 | |||
3 | Upstream-Status: Pending | ||
4 | |||
5 | make start-statd command to use nfscommon configure, too. | ||
6 | |||
7 | Signed-off-by: Henrik Riomar <henrik.riomar@ericsson.com> | ||
8 | Signed-off-by: Li Wang <li.wang@windriver.com> | ||
9 | Signed-off-by: Roy Li <rongqing.li@windriver.com> | ||
10 | Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> | ||
11 | --- | ||
12 | utils/statd/start-statd | 10 +++++++++- | ||
13 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/utils/statd/start-statd b/utils/statd/start-statd | ||
16 | index 2fd6039..f591b34 100755 | ||
17 | --- a/utils/statd/start-statd | ||
18 | +++ b/utils/statd/start-statd | ||
19 | @@ -17,6 +17,14 @@ then | ||
20 | # statd already running - must have been slow to respond. | ||
21 | exit 0 | ||
22 | fi | ||
23 | + | ||
24 | +# Read config | ||
25 | +DEFAULTFILE=/etc/default/nfs-common | ||
26 | +NEED_IDMAPD= | ||
27 | +if [ -f $DEFAULTFILE ]; then | ||
28 | + . $DEFAULTFILE | ||
29 | +fi | ||
30 | + | ||
31 | # First try systemd if it's installed. | ||
32 | if [ -d /run/systemd/system ]; then | ||
33 | # Quit only if the call worked. | ||
34 | @@ -25,4 +33,4 @@ fi | ||
35 | |||
36 | cd / | ||
37 | # Fall back to launching it ourselves. | ||
38 | -exec rpc.statd --no-notify | ||
39 | +exec rpc.statd --no-notify $STATDOPTS | ||
40 | -- | ||
41 | 2.6.6 | ||
42 | |||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.conf b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.conf deleted file mode 100644 index a1007a7fbf..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils.conf +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | # Parameters to be passed to nfs-utils (clients & server) service files. | ||
2 | # | ||
3 | |||
4 | # Options to pass to rpc.nfsd. | ||
5 | NFSD_OPTS="" | ||
6 | |||
7 | # Number of servers to start up; the default is 8 servers. | ||
8 | NFSD_COUNT="" | ||
9 | |||
10 | # Where to mount nfsd filesystem; the default is "/proc/fs/nfsd". | ||
11 | PROCNFSD_MOUNTPOINT="" | ||
12 | |||
13 | # Options used to mount nfsd filesystem; the default is "rw,nodev,noexec,nosuid". | ||
14 | PROCNFSD_MOUNTOPTS="" | ||
15 | |||
16 | # Options for rpc.mountd. | ||
17 | # If you have a port-based firewall, you might want to set up | ||
18 | # a fixed port here using the --port option. | ||
19 | MOUNTD_OPTS="" | ||
20 | |||
21 | # Parameters to be passed to nfs-common (nfs clients & server) init script. | ||
22 | # | ||
23 | |||
24 | # If you do not set values for the NEED_ options, they will be attempted | ||
25 | # autodetected; this should be sufficient for most people. Valid alternatives | ||
26 | # for the NEED_ options are "yes" and "no". | ||
27 | |||
28 | # Do you want to start the statd daemon? It is not needed for NFSv4. | ||
29 | NEED_STATD="" | ||
30 | |||
31 | # Options to pass to rpc.statd. | ||
32 | # N.B. statd normally runs on both client and server, and run-time | ||
33 | # options should be specified accordingly. | ||
34 | # STATD_OPTS="-p 32765 -o 32766" | ||
35 | STATD_OPTS="" | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon index 992267d5a1..9b7fd17b41 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfscommon | |||
@@ -1,63 +1,279 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | |||
2 | ### BEGIN INIT INFO | 3 | ### BEGIN INIT INFO |
3 | # Provides: nfs-common | 4 | # Provides: nfs-common |
4 | # Required-Start: $portmap hwclock | 5 | # Required-Start: $portmap $time |
5 | # Required-Stop: $portmap hwclock | 6 | # Required-Stop: $portmap $time |
6 | # Default-Start: 2 3 4 5 | 7 | # Default-Start: S |
7 | # Default-Stop: 0 1 6 | 8 | # Default-Stop: 0 1 6 |
8 | # Short-Description: NFS support for both client and server | 9 | # Short-Description: NFS support files common to client and server |
9 | # Description: NFS is a popular protocol for file sharing across | 10 | # Description: NFS is a popular protocol for file sharing across |
10 | # TCP/IP networks. This service provides various | 11 | # TCP/IP networks. This service provides various |
11 | # support functions for NFS mounts. | 12 | # support functions for NFS mounts. |
12 | ### END INIT INFO | 13 | ### END INIT INFO |
13 | # | ||
14 | # Startup script for nfs-utils | ||
15 | # | ||
16 | # | ||
17 | # Location of executables: | ||
18 | 14 | ||
19 | # Source function library. | 15 | # What is this? |
16 | DESC="NFS common utilities" | ||
17 | |||
18 | # Read config | ||
19 | DEFAULTFILE=/etc/default/nfs-utils | ||
20 | NEED_STATD= | ||
21 | NEED_GSSD= | ||
22 | if nfsconf --isset general pipefs-directory; then | ||
23 | PIPEFS_MOUNTPOINT=$(nfsconf --get general pipefs-directory) | ||
24 | else | ||
25 | PIPEFS_MOUNTPOINT=/var/lib/nfs/rpc_pipefs | ||
26 | fi | ||
27 | if [ -f $DEFAULTFILE ]; then | ||
28 | . $DEFAULTFILE | ||
29 | fi | ||
30 | |||
20 | . /etc/init.d/functions | 31 | . /etc/init.d/functions |
21 | 32 | ||
22 | test -x "$NFS_STATD" || NFS_STATD=/usr/sbin/rpc.statd | 33 | # Exit if required binaries are missing. |
23 | test -z "$STATD_PID" && STATD_PID=/var/run/rpc.statd.pid | 34 | [ -x /usr/sbin/rpc.statd ] || exit 0 |
35 | |||
24 | # | 36 | # |
25 | # The default state directory is /var/lib/nfs | 37 | # Parse the fstab file, and determine whether we need gssd. (The |
26 | test -n "$NFS_STATEDIR" || NFS_STATEDIR=/var/lib/nfs | 38 | # /etc/defaults settings, if any, will override our autodetection.) This code |
39 | # is partially adapted from the mountnfs.sh script in the sysvinit package. | ||
27 | # | 40 | # |
28 | #---------------------------------------------------------------------- | 41 | AUTO_NEED_GSSD=no |
29 | # Startup and shutdown functions. | 42 | |
30 | # Actual startup/shutdown is at the end of this file. | 43 | if [ -f /etc/fstab ]; then |
31 | 44 | exec 9<&0 </etc/fstab | |
32 | start_statd(){ | 45 | |
33 | echo -n "starting statd: " | 46 | while read -r DEV _ _ OPTS _ |
34 | start-stop-daemon --start --exec "$NFS_STATD" --pidfile "$STATD_PID" | 47 | do |
35 | echo done | 48 | case $DEV in |
49 | ''|\#*) | ||
50 | continue | ||
51 | ;; | ||
52 | esac | ||
53 | OLDIFS="$IFS" | ||
54 | IFS="," | ||
55 | for OPT in $OPTS; do | ||
56 | case "$OPT" in | ||
57 | sec=krb5|sec=krb5i|sec=krb5p) | ||
58 | AUTO_NEED_GSSD=yes | ||
59 | ;; | ||
60 | esac | ||
61 | done | ||
62 | IFS="$OLDIFS" | ||
63 | done | ||
64 | |||
65 | exec 0<&9 9<&- | ||
66 | fi | ||
67 | |||
68 | case "$NEED_STATD" in | ||
69 | yes|no) | ||
70 | ;; | ||
71 | *) | ||
72 | NEED_STATD=yes | ||
73 | ;; | ||
74 | esac | ||
75 | |||
76 | case "$NEED_IDMAPD" in | ||
77 | yes|no) | ||
78 | ;; | ||
79 | *) | ||
80 | NEED_IDMAPD=yes | ||
81 | ;; | ||
82 | esac | ||
83 | |||
84 | case "$NEED_GSSD" in | ||
85 | yes|no) | ||
86 | ;; | ||
87 | *) | ||
88 | NEED_GSSD=$AUTO_NEED_GSSD | ||
89 | ;; | ||
90 | esac | ||
91 | |||
92 | do_modprobe() { | ||
93 | if [ -x /sbin/modprobe ] && [ -f /proc/modules ] | ||
94 | then | ||
95 | modprobe -q "$1" || true | ||
96 | fi | ||
97 | } | ||
98 | |||
99 | do_mount() { | ||
100 | if ! grep -E -qs "$1\$" /proc/filesystems | ||
101 | then | ||
102 | return 1 | ||
103 | fi | ||
104 | if ! mountpoint -q "$2" | ||
105 | then | ||
106 | mount -t "$1" "$1" "$2" | ||
107 | return | ||
108 | fi | ||
109 | return 0 | ||
36 | } | 110 | } |
37 | stop_statd(){ | 111 | |
38 | echo -n 'stopping statd: ' | 112 | do_umount() { |
39 | start-stop-daemon --stop --quiet --signal 1 --pidfile "$STATD_PID" | 113 | if mountpoint -q "$1" |
40 | echo done | 114 | then |
115 | umount "$1" | ||
116 | fi | ||
117 | return 0 | ||
41 | } | 118 | } |
42 | #---------------------------------------------------------------------- | 119 | |
43 | # | 120 | # See how we were called. |
44 | # supported options: | ||
45 | # start | ||
46 | # stop | ||
47 | # restart: stops and starts mountd | ||
48 | #FIXME: need to create the /var/lib/nfs/... directories | ||
49 | case "$1" in | 121 | case "$1" in |
50 | start) | 122 | start) |
51 | start_statd;; | 123 | echo -n "Starting $DESC ..." |
124 | |||
125 | if [ "$NEED_STATD" = yes ]; then | ||
126 | echo -n " statd" | ||
127 | |||
128 | # See if rpcbind is running | ||
129 | if [ -x /usr/sbin/rpcinfo ]; then | ||
130 | /usr/sbin/rpcinfo -p >/dev/null 2>&1 | ||
131 | RET=$? | ||
132 | if [ $RET != 0 ]; then | ||
133 | echo | ||
134 | echo "Not starting: portmapper is not running" | ||
135 | exit 0 | ||
136 | fi | ||
137 | fi | ||
138 | start-stop-daemon --start --oknodo --quiet \ | ||
139 | --pidfile /run/rpc.statd.pid \ | ||
140 | --exec /usr/sbin/rpc.statd | ||
141 | RET=$? | ||
142 | if [ $RET != 0 ]; then | ||
143 | echo " failed" $RET | ||
144 | exit $RET | ||
145 | else | ||
146 | if [ -d /run/sendsigs.omit.d ]; then | ||
147 | rm -f /run/sendsigs.omit.d/statd | ||
148 | ln -s /run/rpc.statd.pid /run/sendsigs.omit.d/statd | ||
149 | fi | ||
150 | fi | ||
151 | fi | ||
152 | |||
153 | # Don't start idmapd and gssd if we don't have them (say, if /usr is not | ||
154 | # up yet). | ||
155 | [ -x /usr/sbin/rpc.idmapd ] || NEED_IDMAPD=no | ||
156 | [ -x /usr/sbin/rpc.gssd ] || NEED_GSSD=no | ||
157 | |||
158 | if [ "$NEED_IDMAPD" = yes ] || [ "$NEED_GSSD" = yes ] | ||
159 | then | ||
160 | do_modprobe sunrpc | ||
161 | do_modprobe nfs | ||
162 | do_modprobe nfsd | ||
163 | mkdir -p "$PIPEFS_MOUNTPOINT" | ||
164 | if do_mount rpc_pipefs $PIPEFS_MOUNTPOINT | ||
165 | then | ||
166 | if [ "$NEED_IDMAPD" = yes ] | ||
167 | then | ||
168 | ecno -n " idmapd" | ||
169 | start-stop-daemon --start --oknodo --quiet \ | ||
170 | --exec /usr/sbin/rpc.idmapd | ||
171 | RET=$? | ||
172 | if [ $RET != 0 ]; then | ||
173 | echo " failed" $RET | ||
174 | exit $RET | ||
175 | fi | ||
176 | fi | ||
177 | if [ "$NEED_GSSD" = yes ] | ||
178 | then | ||
179 | do_modprobe rpcsec_gss_krb5 | ||
180 | echo -n " gssd" | ||
181 | |||
182 | start-stop-daemon --start --oknodo --quiet \ | ||
183 | --exec /usr/sbin/rpc.gssd | ||
184 | RET=$? | ||
185 | if [ $RET != 0 ]; then | ||
186 | echo " failed" $RET | ||
187 | exit $RET | ||
188 | fi | ||
189 | fi | ||
190 | fi | ||
191 | fi | ||
192 | echo " done" | ||
193 | ;; | ||
194 | |||
52 | stop) | 195 | stop) |
53 | stop_statd;; | 196 | echo -n "Stopping $DESC ..." |
197 | |||
198 | if [ "$NEED_GSSD" = yes ] | ||
199 | then | ||
200 | echo -n " gssd" | ||
201 | start-stop-daemon --stop --oknodo --quiet \ | ||
202 | --name rpc.gssd | ||
203 | RET=$? | ||
204 | if [ $RET != 0 ]; then | ||
205 | echo " failed" $RET | ||
206 | exit $RET | ||
207 | fi | ||
208 | fi | ||
209 | if [ "$NEED_IDMAPD" = yes ] | ||
210 | then | ||
211 | echo -n " idmapd" | ||
212 | start-stop-daemon --stop --oknodo --quiet \ | ||
213 | --name rpc.idmapd | ||
214 | RET=$? | ||
215 | if [ $RET != 0 ]; then | ||
216 | echo " failed" $RET | ||
217 | exit $RET | ||
218 | fi | ||
219 | fi | ||
220 | if [ "$NEED_STATD" = yes ] | ||
221 | then | ||
222 | echo -n " statd" | ||
223 | start-stop-daemon --stop --oknodo --quiet \ | ||
224 | --name rpc.statd | ||
225 | RET=$? | ||
226 | if [ $RET != 0 ]; then | ||
227 | echo " failed" $RET | ||
228 | exit $RET | ||
229 | fi | ||
230 | fi | ||
231 | do_umount $PIPEFS_MOUNTPOINT 2>/dev/null || true | ||
232 | echo " done" | ||
233 | ;; | ||
234 | |||
54 | status) | 235 | status) |
55 | status $NFS_STATD | 236 | if [ "$NEED_STATD" = yes ] |
56 | exit $?;; | 237 | then |
57 | restart) | 238 | if ! pidof rpc.statd >/dev/null |
239 | then | ||
240 | echo "rpc.statd not running" | ||
241 | exit 3 | ||
242 | fi | ||
243 | fi | ||
244 | |||
245 | if [ "$NEED_GSSD" = yes ] | ||
246 | then | ||
247 | if ! pidof rpc.gssd >/dev/null | ||
248 | then | ||
249 | echo "rpc.gssd not running" | ||
250 | exit 3 | ||
251 | fi | ||
252 | fi | ||
253 | |||
254 | if [ "$NEED_IDMAPD" = yes ] | ||
255 | then | ||
256 | if ! pidof rpc.idmapd >/dev/null | ||
257 | then | ||
258 | echo "rpc.idmapd not running" | ||
259 | exit 3 | ||
260 | fi | ||
261 | fi | ||
262 | |||
263 | echo "all daemons running" | ||
264 | exit 0 | ||
265 | ;; | ||
266 | |||
267 | restart | force-reload) | ||
58 | $0 stop | 268 | $0 stop |
59 | $0 start;; | 269 | sleep 1 |
270 | $0 start | ||
271 | ;; | ||
272 | |||
60 | *) | 273 | *) |
61 | echo "Usage: $0 {start|stop|status|restart}" | 274 | echo "Usage: nfscommon {start|stop|status|restart}" |
62 | exit 1;; | 275 | exit 1 |
276 | ;; | ||
63 | esac | 277 | esac |
278 | |||
279 | exit 0 | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver index 0f5747cc6d..99ec280b35 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver | |||
@@ -1,8 +1,10 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | |||
2 | ### BEGIN INIT INFO | 3 | ### BEGIN INIT INFO |
3 | # Provides: nfs-kernel-server | 4 | # Provides: nfs-kernel-server |
4 | # Required-Start: $remote_fs nfs-common $portmap hwclock | 5 | # Required-Start: $remote_fs nfs-common $portmap $time |
5 | # Required-Stop: $remote_fs nfs-common $portmap hwclock | 6 | # Required-Stop: $remote_fs nfs-common $portmap $time |
7 | # Should-Start: $named | ||
6 | # Default-Start: 2 3 4 5 | 8 | # Default-Start: 2 3 4 5 |
7 | # Default-Stop: 0 1 6 | 9 | # Default-Stop: 0 1 6 |
8 | # Short-Description: Kernel NFS server support | 10 | # Short-Description: Kernel NFS server support |
@@ -19,20 +21,25 @@ | |||
19 | # | 21 | # |
20 | # The environment variable NFS_SERVERS may be set in /etc/default/nfsd | 22 | # The environment variable NFS_SERVERS may be set in /etc/default/nfsd |
21 | # Other control variables may be overridden here too | 23 | # Other control variables may be overridden here too |
22 | test -r /etc/default/nfsd && . /etc/default/nfsd | 24 | test -r /etc/default/nfs-utils && . /etc/default/nfs-utils |
23 | # | 25 | # |
24 | # Location of executables: | 26 | # Location of executables: |
25 | test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd | 27 | test -x "$NFS_MOUNTD" || NFS_MOUNTD=/usr/sbin/rpc.mountd |
26 | test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd | 28 | test -x "$NFS_NFSD" || NFS_NFSD=/usr/sbin/rpc.nfsd |
29 | test -x "$NFS_SVCGSSD" || NFS_SVCGSSD=/usr/sbin/rpc.svcgssd | ||
27 | # | 30 | # |
28 | # The user mode program must also exist (it just starts the kernel | 31 | # The user mode program must also exist (it just starts the kernel |
29 | # threads using the kernel module code). | 32 | # threads using the kernel module code). |
30 | test -x "$NFS_MOUNTD" || exit 0 | 33 | test -x "$NFS_MOUNTD" || exit 0 |
31 | test -x "$NFS_NFSD" || exit 0 | 34 | test -x "$NFS_NFSD" || exit 0 |
32 | # | 35 | |
33 | # Default is 8 threads, value is settable between 1 and the truely | 36 | case "$NEED_SVCGSSD" in |
34 | # ridiculous 99 | 37 | yes|no) |
35 | test "$NFS_SERVERS" != "" && test "$NFS_SERVERS" -gt 0 && test "$NFS_SERVERS" -lt 100 || NFS_SERVERS=8 | 38 | ;; |
39 | *) | ||
40 | NEED_SVCGSSD=no | ||
41 | ;; | ||
42 | esac | ||
36 | # | 43 | # |
37 | #---------------------------------------------------------------------- | 44 | #---------------------------------------------------------------------- |
38 | # Startup and shutdown functions. | 45 | # Startup and shutdown functions. |
@@ -49,6 +56,22 @@ stop_mountd(){ | |||
49 | echo done | 56 | echo done |
50 | } | 57 | } |
51 | # | 58 | # |
59 | #svcgssd | ||
60 | start_svcgssd(){ | ||
61 | modprobe -q rpcsec_gss_krb5 | ||
62 | if [ "$NEED_SVCGSSD" = "yes" ]; then | ||
63 | echo -n "starting svcgssd: " | ||
64 | start-stop-daemon --start --exec "$NFS_SVCGSSD" -- "$@" | ||
65 | echo done | ||
66 | fi | ||
67 | } | ||
68 | stop_svcgssd(){ | ||
69 | if [ "$NEED_SVCGSSD" = "yes" ]; then | ||
70 | echo -n "stop svcgssd: " | ||
71 | start-stop-daemon --stop --exec "$NFS_SVCGSSD" | ||
72 | echo done | ||
73 | fi | ||
74 | } | ||
52 | #nfsd | 75 | #nfsd |
53 | start_nfsd(){ | 76 | start_nfsd(){ |
54 | modprobe -q nfsd | 77 | modprobe -q nfsd |
@@ -62,38 +85,18 @@ start_nfsd(){ | |||
62 | exit 1 | 85 | exit 1 |
63 | } | 86 | } |
64 | 87 | ||
65 | echo -n "starting $1 nfsd kernel threads: " | 88 | echo -n "starting nfsd: " |
66 | start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" | 89 | start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" |
67 | echo done | 90 | echo done |
68 | } | 91 | } |
69 | delay_nfsd(){ | ||
70 | for delay in 0 1 2 3 4 5 6 7 8 9 | ||
71 | do | ||
72 | if pidof nfsd >/dev/null | ||
73 | then | ||
74 | echo -n . | ||
75 | sleep 1 | ||
76 | else | ||
77 | return 0 | ||
78 | fi | ||
79 | done | ||
80 | return 1 | ||
81 | } | ||
82 | stop_nfsd(){ | 92 | stop_nfsd(){ |
83 | # WARNING: this kills any process with the executable | ||
84 | # name 'nfsd'. | ||
85 | echo -n 'stopping nfsd: ' | 93 | echo -n 'stopping nfsd: ' |
86 | start-stop-daemon --stop --quiet --signal 1 --name nfsd | 94 | $NFS_NFSD 0 |
87 | if delay_nfsd || { | 95 | if pidof nfsd |
88 | echo failed | ||
89 | echo ' using signal 9: ' | ||
90 | start-stop-daemon --stop --quiet --signal 9 --name nfsd | ||
91 | delay_nfsd | ||
92 | } | ||
93 | then | 96 | then |
94 | echo done | ||
95 | else | ||
96 | echo failed | 97 | echo failed |
98 | else | ||
99 | echo done | ||
97 | fi | 100 | fi |
98 | } | 101 | } |
99 | 102 | ||
@@ -108,11 +111,13 @@ stop_nfsd(){ | |||
108 | case "$1" in | 111 | case "$1" in |
109 | start) | 112 | start) |
110 | test -r /etc/exports && exportfs -r | 113 | test -r /etc/exports && exportfs -r |
111 | start_nfsd "$NFS_SERVERS" | 114 | start_nfsd |
115 | start_svcgssd | ||
112 | start_mountd | 116 | start_mountd |
113 | test -r /etc/exports && exportfs -a;; | 117 | test -r /etc/exports && exportfs -a;; |
114 | stop) exportfs -ua | 118 | stop) exportfs -ua |
115 | stop_mountd | 119 | stop_mountd |
120 | stop_svcgssd | ||
116 | stop_nfsd;; | 121 | stop_nfsd;; |
117 | status) | 122 | status) |
118 | status /usr/sbin/rpc.mountd | 123 | status /usr/sbin/rpc.mountd |
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/proc-fs-nfsd.mount b/meta/recipes-connectivity/nfs-utils/nfs-utils/proc-fs-nfsd.mount deleted file mode 100644 index 630801b375..0000000000 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils/proc-fs-nfsd.mount +++ /dev/null | |||
@@ -1,8 +0,0 @@ | |||
1 | [Unit] | ||
2 | Description=NFSD configuration filesystem | ||
3 | After=systemd-modules-load.service | ||
4 | |||
5 | [Mount] | ||
6 | What=nfsd | ||
7 | Where=/proc/fs/nfsd | ||
8 | Type=nfsd | ||
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.4.bb b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb index 459f68f05e..9668ac0e86 100644 --- a/meta/recipes-connectivity/nfs-utils/nfs-utils_2.5.4.bb +++ b/meta/recipes-connectivity/nfs-utils/nfs-utils_2.8.3.bb | |||
@@ -4,11 +4,11 @@ NFS server and related tools." | |||
4 | HOMEPAGE = "http://nfs.sourceforge.net/" | 4 | HOMEPAGE = "http://nfs.sourceforge.net/" |
5 | SECTION = "console/network" | 5 | SECTION = "console/network" |
6 | 6 | ||
7 | LICENSE = "MIT & GPLv2+ & BSD-3-Clause" | 7 | LICENSE = "MIT & GPL-2.0-or-later & BSD-3-Clause" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=95f3a93a5c3c7888de623b46ea085a84" |
9 | 9 | ||
10 | # util-linux for libblkid | 10 | # util-linux for libblkid |
11 | DEPENDS = "libcap libevent util-linux sqlite3 libtirpc" | 11 | DEPENDS = "libcap libevent util-linux sqlite3 libtirpc libxml2" |
12 | RDEPENDS:${PN} = "${PN}-client" | 12 | RDEPENDS:${PN} = "${PN}-client" |
13 | RRECOMMENDS:${PN} = "kernel-module-nfsd" | 13 | RRECOMMENDS:${PN} = "kernel-module-nfsd" |
14 | 14 | ||
@@ -21,17 +21,12 @@ USERADD_PARAM:${PN}-client = "--system --home-dir /var/lib/nfs \ | |||
21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \ | 21 | SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.xz \ |
22 | file://nfsserver \ | 22 | file://nfsserver \ |
23 | file://nfscommon \ | 23 | file://nfscommon \ |
24 | file://nfs-utils.conf \ | 24 | file://0001-locktest-Makefile.am-Do-not-use-build-flags.patch \ |
25 | file://nfs-server.service \ | 25 | file://0004-Use-nogroup-for-nobody-group.patch \ |
26 | file://nfs-mountd.service \ | 26 | file://0005-find-OE-provided-Kerberos.patch \ |
27 | file://nfs-statd.service \ | ||
28 | file://proc-fs-nfsd.mount \ | ||
29 | file://nfs-utils-debianize-start-statd.patch \ | ||
30 | file://bugfix-adjust-statd-service-name.patch \ | ||
31 | file://0001-Makefile.am-fix-undefined-function-for-libnsm.a.patch \ | ||
32 | file://clang-warnings.patch \ | ||
33 | " | 27 | " |
34 | SRC_URI[sha256sum] = "51997d94e4c8bcef5456dd36a9ccc38e231207c4e9b6a9a2c108841e6aebe3dd" | 28 | |
29 | SRC_URI[sha256sum] = "11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725" | ||
35 | 30 | ||
36 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will | 31 | # Only kernel-module-nfsd is required here (but can be built-in) - the nfsd module will |
37 | # pull in the remainder of the dependencies. | 32 | # pull in the remainder of the dependencies. |
@@ -45,47 +40,71 @@ INITSCRIPT_PARAMS:${PN}-client = "defaults 19 21" | |||
45 | inherit autotools-brokensep update-rc.d systemd pkgconfig | 40 | inherit autotools-brokensep update-rc.d systemd pkgconfig |
46 | 41 | ||
47 | SYSTEMD_PACKAGES = "${PN} ${PN}-client" | 42 | SYSTEMD_PACKAGES = "${PN} ${PN}-client" |
48 | SYSTEMD_SERVICE:${PN} = "nfs-server.service nfs-mountd.service" | 43 | SYSTEMD_SERVICE:${PN} = "nfs-server.service" |
49 | SYSTEMD_SERVICE:${PN}-client = "nfs-statd.service" | 44 | SYSTEMD_SERVICE:${PN}-client = "nfs-client.target" |
50 | 45 | ||
51 | # --enable-uuid is need for cross-compiling | 46 | # --enable-uuid is need for cross-compiling |
52 | EXTRA_OECONF = "--with-statduser=rpcuser \ | 47 | EXTRA_OECONF = "--with-statduser=rpcuser \ |
53 | --enable-mountconfig \ | 48 | --enable-mountconfig \ |
54 | --enable-libmount-mount \ | 49 | --enable-libmount-mount \ |
55 | --enable-uuid \ | 50 | --enable-uuid \ |
56 | --disable-gss \ | ||
57 | --disable-nfsdcltrack \ | ||
58 | --with-statdpath=/var/lib/nfs/statd \ | 51 | --with-statdpath=/var/lib/nfs/statd \ |
52 | --with-pluginpath=${libdir}/libnfsidmap \ | ||
59 | --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ | 53 | --with-rpcgen=${HOSTTOOLS_DIR}/rpcgen \ |
60 | " | 54 | " |
61 | 55 | ||
56 | LDFLAGS += "-lsqlite3 -levent" | ||
57 | |||
62 | PACKAGECONFIG ??= "tcp-wrappers \ | 58 | PACKAGECONFIG ??= "tcp-wrappers \ |
63 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \ | 59 | ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6 systemd', d)} \ |
64 | " | 60 | " |
61 | |||
65 | PACKAGECONFIG:remove:libc-musl = "tcp-wrappers" | 62 | PACKAGECONFIG:remove:libc-musl = "tcp-wrappers" |
63 | #krb5 is available in meta-oe | ||
64 | PACKAGECONFIG[gssapi] = "--with-krb5=${STAGING_EXECPREFIXDIR} --enable-gss --enable-svcgss,--disable-gss --disable-svcgss,krb5" | ||
66 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" | 65 | PACKAGECONFIG[tcp-wrappers] = "--with-tcp-wrappers,--without-tcp-wrappers,tcp-wrappers" |
67 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," | 66 | PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6," |
68 | # libdevmapper is available in meta-oe | 67 | # libdevmapper is available in meta-oe |
69 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" | 68 | PACKAGECONFIG[nfsv41] = "--enable-nfsv41,--disable-nfsv41,libdevmapper,libdevmapper" |
70 | # keyutils is available in meta-oe | 69 | # keyutils is available in meta-oe |
71 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4,--disable-nfsv4,keyutils,python3-core" | 70 | PACKAGECONFIG[nfsv4] = "--enable-nfsv4 --enable-nfsdcltrack,--disable-nfsv4 --disable-nfsdcltrack,keyutils,python3-core" |
71 | PACKAGECONFIG[nfsdctl] = "--enable-nfsdctl,--disable-nfsdctl,libnl readline," | ||
72 | PACKAGECONFIG[systemd] = "--with-systemd=${systemd_unitdir}/system,--without-systemd" | ||
72 | 73 | ||
73 | PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats" | 74 | PACKAGES =+ "${PN}-client ${PN}-mount ${PN}-stats ${PN}-rpcctl" |
74 | 75 | ||
75 | CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \ | 76 | CONFFILES:${PN}-client += "${localstatedir}/lib/nfs/etab \ |
76 | ${localstatedir}/lib/nfs/rmtab \ | 77 | ${localstatedir}/lib/nfs/rmtab \ |
77 | ${localstatedir}/lib/nfs/xtab \ | 78 | ${localstatedir}/lib/nfs/xtab \ |
78 | ${localstatedir}/lib/nfs/statd/state \ | 79 | ${localstatedir}/lib/nfs/statd/state \ |
80 | ${sysconfdir}/idmapd.conf \ | ||
81 | ${sysconfdir}/nfs.conf \ | ||
79 | ${sysconfdir}/nfsmount.conf" | 82 | ${sysconfdir}/nfsmount.conf" |
80 | 83 | ||
81 | FILES:${PN}-client = "${sbindir}/*statd \ | 84 | FILES:${PN}-client = "${sbindir}/*statd \ |
82 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ | 85 | ${sbindir}/rpc.idmapd ${sbindir}/sm-notify \ |
83 | ${sbindir}/showmount ${sbindir}/nfsstat \ | 86 | ${sbindir}/showmount ${sbindir}/nfsstat \ |
87 | ${sbindir}/rpc.gssd \ | ||
88 | ${sbindir}/nfsconf \ | ||
89 | ${libdir}/libnfsidmap.so.* \ | ||
90 | ${libdir}/libnfsidmap/*.so \ | ||
91 | ${libexecdir}/nfsrahead \ | ||
84 | ${localstatedir}/lib/nfs \ | 92 | ${localstatedir}/lib/nfs \ |
85 | ${sysconfdir}/nfs-utils.conf \ | 93 | ${sysconfdir}/idmapd.conf \ |
86 | ${sysconfdir}/nfsmount.conf \ | ||
87 | ${sysconfdir}/init.d/nfscommon \ | 94 | ${sysconfdir}/init.d/nfscommon \ |
88 | ${systemd_system_unitdir}/nfs-statd.service" | 95 | ${sysconfdir}/nfs.conf \ |
96 | ${sysconfdir}/nfsmount.conf \ | ||
97 | ${systemd_system_unitdir}/auth-rpcgss-module.service \ | ||
98 | ${systemd_system_unitdir}/nfs-client.target \ | ||
99 | ${systemd_system_unitdir}/nfs-idmapd.service \ | ||
100 | ${systemd_system_unitdir}/nfs-statd.service \ | ||
101 | ${systemd_system_unitdir}/nfscommon.service \ | ||
102 | ${systemd_system_unitdir}/rpc-gssd.service \ | ||
103 | ${systemd_system_unitdir}/rpc-statd-notify.service \ | ||
104 | ${systemd_system_unitdir}/rpc-statd.service \ | ||
105 | ${systemd_system_unitdir}/rpc_pipefs.target \ | ||
106 | ${systemd_system_unitdir}/var-lib-nfs-rpc_pipefs.mount \ | ||
107 | ${nonarch_libdir}/udev/rules.d/*" | ||
89 | RDEPENDS:${PN}-client = "${PN}-mount rpcbind" | 108 | RDEPENDS:${PN}-client = "${PN}-mount rpcbind" |
90 | 109 | ||
91 | FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" | 110 | FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" |
@@ -93,13 +112,18 @@ FILES:${PN}-mount = "${base_sbindir}/*mount.nfs*" | |||
93 | FILES:${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" | 112 | FILES:${PN}-stats = "${sbindir}/mountstats ${sbindir}/nfsiostat ${sbindir}/nfsdclnts" |
94 | RDEPENDS:${PN}-stats = "python3-core" | 113 | RDEPENDS:${PN}-stats = "python3-core" |
95 | 114 | ||
115 | FILES:${PN}-rpcctl = "${sbindir}/rpcctl" | ||
116 | RDEPENDS:${PN}-rpcctl = "python3-core" | ||
117 | |||
96 | FILES:${PN}-staticdev += "${libdir}/libnfsidmap/*.a" | 118 | FILES:${PN}-staticdev += "${libdir}/libnfsidmap/*.a" |
97 | 119 | ||
98 | FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/" | 120 | FILES:${PN} += "${systemd_unitdir} ${libdir}/libnfsidmap/ ${nonarch_libdir}/modprobe.d" |
99 | 121 | ||
100 | do_configure:prepend() { | 122 | do_configure:prepend() { |
101 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ | 123 | sed -i -e 's,sbindir = /sbin,sbindir = ${base_sbindir},g' \ |
102 | ${S}/utils/mount/Makefile.am | 124 | -e 's,udev_rulesdir = /usr/lib/udev/rules.d/,udev_rulesdir = ${nonarch_base_libdir}/udev/rules.d/,g' \ |
125 | ${S}/utils/mount/Makefile.am ${S}/utils/nfsdcltrack/Makefile.am \ | ||
126 | ${S}/systemd/Makefile.am ${S}/tools/nfsrahead/Makefile.am | ||
103 | } | 127 | } |
104 | 128 | ||
105 | # Make clean needed because the package comes with | 129 | # Make clean needed because the package comes with |
@@ -113,25 +137,18 @@ HIGH_RLIMIT_NOFILE ??= "4096" | |||
113 | 137 | ||
114 | do_install:append () { | 138 | do_install:append () { |
115 | install -d ${D}${sysconfdir}/init.d | 139 | install -d ${D}${sysconfdir}/init.d |
116 | install -m 0755 ${WORKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver | 140 | install -m 0755 ${UNPACKDIR}/nfsserver ${D}${sysconfdir}/init.d/nfsserver |
117 | install -m 0755 ${WORKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon | 141 | install -m 0755 ${UNPACKDIR}/nfscommon ${D}${sysconfdir}/init.d/nfscommon |
118 | 142 | ||
119 | install -m 0755 ${WORKDIR}/nfs-utils.conf ${D}${sysconfdir} | 143 | install -m 0644 ${S}/support/nfsidmap/idmapd.conf ${D}${sysconfdir} |
120 | install -m 0755 ${S}/utils/mount/nfsmount.conf ${D}${sysconfdir} | 144 | install -m 0644 ${S}/nfs.conf ${D}${sysconfdir} |
121 | 145 | ||
122 | install -d ${D}${systemd_system_unitdir} | 146 | install -d ${D}${systemd_system_unitdir} |
123 | install -m 0644 ${WORKDIR}/nfs-server.service ${D}${systemd_system_unitdir}/ | 147 | # Retain historical service name so old scripts keep working |
124 | install -m 0644 ${WORKDIR}/nfs-mountd.service ${D}${systemd_system_unitdir}/ | 148 | ln -s rpc-statd.service ${D}${systemd_system_unitdir}/nfs-statd.service |
125 | install -m 0644 ${WORKDIR}/nfs-statd.service ${D}${systemd_system_unitdir}/ | 149 | # Add compatibility symlinks for the sysvinit scripts |
126 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | 150 | ln -s nfs-server.service ${D}${systemd_system_unitdir}/nfsserver.service |
127 | -e 's,@SYSCONFDIR@,${sysconfdir},g' \ | 151 | ln -s /dev/null ${D}${systemd_system_unitdir}/nfscommon.service |
128 | -e 's,@HIGH_RLIMIT_NOFILE@,${HIGH_RLIMIT_NOFILE},g' \ | ||
129 | ${D}${systemd_system_unitdir}/*.service | ||
130 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
131 | install -m 0644 ${WORKDIR}/proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/ | ||
132 | install -d ${D}${systemd_system_unitdir}/sysinit.target.wants/ | ||
133 | ln -sf ../proc-fs-nfsd.mount ${D}${systemd_system_unitdir}/sysinit.target.wants/proc-fs-nfsd.mount | ||
134 | fi | ||
135 | 152 | ||
136 | # kernel code as of 3.8 hard-codes this path as a default | 153 | # kernel code as of 3.8 hard-codes this path as a default |
137 | install -d ${D}/var/lib/nfs/v4recovery | 154 | install -d ${D}/var/lib/nfs/v4recovery |
@@ -139,7 +156,4 @@ do_install:append () { | |||
139 | # chown the directories and files | 156 | # chown the directories and files |
140 | chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd | 157 | chown -R rpcuser:rpcuser ${D}${localstatedir}/lib/nfs/statd |
141 | chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state | 158 | chmod 0644 ${D}${localstatedir}/lib/nfs/statd/state |
142 | |||
143 | # Make python tools use python 3 | ||
144 | sed -i -e '1s,#!.*python.*,#!${bindir}/python3,' ${D}${sbindir}/mountstats ${D}${sbindir}/nfsiostat | ||
145 | } | 159 | } |
diff --git a/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch b/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch deleted file mode 100644 index 8a5a300adc..0000000000 --- a/meta/recipes-connectivity/ofono/ofono/0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From 22b52db4842611ac31a356f023fc09595384e2ad Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Thu, 23 May 2019 18:11:22 -0700 | ||
4 | Subject: [PATCH] mbim: add an optional TEMP_FAILURE_RETRY macro copy | ||
5 | |||
6 | Fixes build on musl which does not provide this macro | ||
7 | |||
8 | Upstream-Status: Submitted [https://lists.ofono.org/pipermail/ofono/2019-May/019370.html] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | drivers/mbimmodem/mbim-private.h | 9 +++++++++ | ||
12 | 1 file changed, 9 insertions(+) | ||
13 | |||
14 | diff --git a/drivers/mbimmodem/mbim-private.h b/drivers/mbimmodem/mbim-private.h | ||
15 | index e159235..51693ea 100644 | ||
16 | --- a/drivers/mbimmodem/mbim-private.h | ||
17 | +++ b/drivers/mbimmodem/mbim-private.h | ||
18 | @@ -21,6 +21,15 @@ | ||
19 | |||
20 | #define align_len(len, boundary) (((len)+(boundary)-1) & ~((boundary)-1)) | ||
21 | |||
22 | +#ifndef TEMP_FAILURE_RETRY | ||
23 | +#define TEMP_FAILURE_RETRY(expression) ({ \ | ||
24 | + __typeof(expression) __result; \ | ||
25 | + do { \ | ||
26 | + __result = (expression); \ | ||
27 | + } while (__result == -1 && errno == EINTR); \ | ||
28 | + __result; }) | ||
29 | +#endif | ||
30 | + | ||
31 | enum mbim_control_message { | ||
32 | MBIM_OPEN_MSG = 0x1, | ||
33 | MBIM_CLOSE_MSG = 0x2, | ||
34 | -- | ||
35 | 2.21.0 | ||
36 | |||
diff --git a/meta/recipes-connectivity/ofono/ofono/0002-mbim-Fix-build-with-ell-0.39-by-restoring-unlikely-m.patch b/meta/recipes-connectivity/ofono/ofono/0002-mbim-Fix-build-with-ell-0.39-by-restoring-unlikely-m.patch deleted file mode 100644 index 3655b3fd66..0000000000 --- a/meta/recipes-connectivity/ofono/ofono/0002-mbim-Fix-build-with-ell-0.39-by-restoring-unlikely-m.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 76e4054801350ebd4a44057379431a33d460ad0f Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <Martin.Jansa@gmail.com> | ||
3 | Date: Wed, 21 Apr 2021 11:01:34 +0000 | ||
4 | Subject: [PATCH] mbim: Fix build with ell-0.39 by restoring unlikely macro | ||
5 | from ell/util.h | ||
6 | |||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
10 | --- | ||
11 | drivers/mbimmodem/mbim-private.h | 4 ++++ | ||
12 | 1 file changed, 4 insertions(+) | ||
13 | |||
14 | diff --git a/drivers/mbimmodem/mbim-private.h b/drivers/mbimmodem/mbim-private.h | ||
15 | index 51693eae..d917312c 100644 | ||
16 | --- a/drivers/mbimmodem/mbim-private.h | ||
17 | +++ b/drivers/mbimmodem/mbim-private.h | ||
18 | @@ -30,6 +30,10 @@ | ||
19 | __result; }) | ||
20 | #endif | ||
21 | |||
22 | +/* used to be part of ell/util.h before 0.39: | ||
23 | + https://git.kernel.org/pub/scm/libs/ell/ell.git/commit/?id=2a682421b06e41c45098217a686157f576847021 */ | ||
24 | +#define unlikely(x) __builtin_expect(!!(x), 0) | ||
25 | + | ||
26 | enum mbim_control_message { | ||
27 | MBIM_OPEN_MSG = 0x1, | ||
28 | MBIM_CLOSE_MSG = 0x2, | ||
diff --git a/meta/recipes-connectivity/ofono/ofono_1.33.bb b/meta/recipes-connectivity/ofono/ofono_2.17.bb index 1fab90c08e..36bbe9439a 100644 --- a/meta/recipes-connectivity/ofono/ofono_1.33.bb +++ b/meta/recipes-connectivity/ofono/ofono_2.17.bb | |||
@@ -2,18 +2,15 @@ SUMMARY = "open source telephony" | |||
2 | DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands." | 2 | DESCRIPTION = "oFono is a stack for mobile telephony devices on Linux. oFono supports speaking to telephony devices through specific drivers, or with generic AT commands." |
3 | HOMEPAGE = "http://www.ofono.org" | 3 | HOMEPAGE = "http://www.ofono.org" |
4 | BUGTRACKER = "https://01.org/jira/browse/OF" | 4 | BUGTRACKER = "https://01.org/jira/browse/OF" |
5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPL-2.0-only" |
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ | 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a \ |
7 | file://src/ofono.h;beginline=1;endline=20;md5=3ce17d5978ef3445def265b98899c2ee" | 7 | file://src/ofono.h;beginline=1;endline=6;md5=13e42133935ceecfc9bcb547f256e277" |
8 | DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell" | 8 | DEPENDS = "dbus glib-2.0 udev mobile-broadband-provider-info ell" |
9 | 9 | ||
10 | SRC_URI = "\ | 10 | SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ |
11 | ${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \ | 11 | file://ofono \ |
12 | file://ofono \ | 12 | " |
13 | file://0001-mbim-add-an-optional-TEMP_FAILURE_RETRY-macro-copy.patch \ | 13 | SRC_URI[sha256sum] = "70bb50997d3a7657edf133355677f8e04b2158bcb031118a67b296107f6ea73e" |
14 | file://0002-mbim-Fix-build-with-ell-0.39-by-restoring-unlikely-m.patch \ | ||
15 | " | ||
16 | SRC_URI[sha256sum] = "e4591c5353ad2069cb9c0861fad3f1bf655137f9785fc5f16151d509e49ba708" | ||
17 | 14 | ||
18 | inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data | 15 | inherit autotools pkgconfig update-rc.d systemd gobject-introspection-data |
19 | 16 | ||
@@ -30,14 +27,9 @@ PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, bluez5" | |||
30 | 27 | ||
31 | EXTRA_OECONF += "--enable-test --enable-external-ell" | 28 | EXTRA_OECONF += "--enable-test --enable-external-ell" |
32 | 29 | ||
33 | do_configure:prepend() { | ||
34 | bbnote "Removing bundled ell from ${S}/ell to prevent including it" | ||
35 | rm -rf ${S}/ell | ||
36 | } | ||
37 | |||
38 | do_install:append() { | 30 | do_install:append() { |
39 | install -d ${D}${sysconfdir}/init.d/ | 31 | install -d ${D}${sysconfdir}/init.d/ |
40 | install -m 0755 ${WORKDIR}/ofono ${D}${sysconfdir}/init.d/ofono | 32 | install -m 0755 ${UNPACKDIR}/ofono ${D}${sysconfdir}/init.d/ofono |
41 | } | 33 | } |
42 | 34 | ||
43 | PACKAGES =+ "${PN}-tests" | 35 | PACKAGES =+ "${PN}-tests" |
@@ -45,7 +37,6 @@ PACKAGES =+ "${PN}-tests" | |||
45 | FILES:${PN} += "${systemd_unitdir}" | 37 | FILES:${PN} += "${systemd_unitdir}" |
46 | FILES:${PN}-tests = "${libdir}/${BPN}/test" | 38 | FILES:${PN}-tests = "${libdir}/${BPN}/test" |
47 | 39 | ||
48 | RDEPENDS:${PN} += "dbus" | ||
49 | RDEPENDS:${PN}-tests = "\ | 40 | RDEPENDS:${PN}-tests = "\ |
50 | python3-core \ | 41 | python3-core \ |
51 | python3-dbus \ | 42 | python3-dbus \ |
diff --git a/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch b/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch new file mode 100644 index 0000000000..f424288e37 --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh/0001-regress-banner.sh-log-input-and-output-files-on-erro.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From 5cc897fe2effe549e1e280c2f606bce8b532b61e Mon Sep 17 00:00:00 2001 | ||
2 | From: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
3 | Date: Mon, 11 Sep 2023 09:55:21 +0100 | ||
4 | Subject: [PATCH] regress/banner.sh: log input and output files on error | ||
5 | |||
6 | Some test environments like yocto with qemu are seeing these | ||
7 | tests failing. There may be additional error messages in the | ||
8 | stderr of ssh cloent command. busybox cmp shows this error when | ||
9 | first input file has less new line characters then second | ||
10 | input file: | ||
11 | |||
12 | cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in | ||
13 | |||
14 | Logging the full banner.out will show what other error messages | ||
15 | are captured in addition of the expected banner. | ||
16 | |||
17 | Full log of a failing banner test runs is: | ||
18 | |||
19 | run test banner.sh ... | ||
20 | test banner: missing banner file | ||
21 | test banner: size 0 | ||
22 | cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in | ||
23 | banner size 0 mismatch | ||
24 | test banner: size 10 | ||
25 | test banner: size 100 | ||
26 | cmp: EOF on /usr/lib/openssh/ptest/regress/banner.in | ||
27 | banner size 100 mismatch | ||
28 | test banner: size 1000 | ||
29 | test banner: size 10000 | ||
30 | test banner: size 100000 | ||
31 | test banner: suppress banner (-q) | ||
32 | FAIL: banner | ||
33 | return value: 1 | ||
34 | |||
35 | See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15178 | ||
36 | |||
37 | Upstream-Status: Denied [https://github.com/openssh/openssh-portable/pull/437] | ||
38 | |||
39 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
40 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
41 | --- | ||
42 | regress/banner.sh | 4 +++- | ||
43 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
44 | |||
45 | diff --git a/regress/banner.sh b/regress/banner.sh | ||
46 | index a84feb5..de84957 100644 | ||
47 | --- a/regress/banner.sh | ||
48 | +++ b/regress/banner.sh | ||
49 | @@ -32,7 +32,9 @@ for s in 0 10 100 1000 10000 100000 ; do | ||
50 | verbose "test $tid: size $s" | ||
51 | ( ${SSH} -F $OBJ/ssh_proxy otherhost true 2>$OBJ/banner.out && \ | ||
52 | cmp $OBJ/banner.in $OBJ/banner.out ) || \ | ||
53 | - fail "banner size $s mismatch" | ||
54 | + ( verbose "Contents of $OBJ/banner.in:"; cat $OBJ/banner.in; \ | ||
55 | + verbose "Contents of $OBJ/banner.out:"; cat $OBJ/banner.out; \ | ||
56 | + fail "banner size $s mismatch" ) | ||
57 | done | ||
58 | |||
59 | trace "test suppress banner (-q)" | ||
diff --git a/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch b/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch new file mode 100644 index 0000000000..360b62af34 --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 9dcccafe44ea17e972e7cddea205bbe9fe71d8d6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jose Quaresma <jose.quaresma@foundries.io> | ||
3 | Date: Mon, 15 Jul 2024 18:43:08 +0100 | ||
4 | Subject: [PATCH] regress/test-exec: use the absolute path in the SSH env | ||
5 | |||
6 | The SSHAGENT_BIN was changed in [1] to SSH_BIN but | ||
7 | the last one don't use the absolute path and consequently | ||
8 | the function increase_datafile_size can loops forever | ||
9 | if the binary not found. | ||
10 | |||
11 | [1] https://github.com/openssh/openssh-portable/commit/a68f80f2511f0e0c5cef737a8284cc2dfabad818 | ||
12 | |||
13 | Upstream-Status: Submitted [https://github.com/openssh/openssh-portable/pull/510] | ||
14 | |||
15 | Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> | ||
16 | --- | ||
17 | regress/test-exec.sh | 5 +++++ | ||
18 | 1 file changed, 5 insertions(+) | ||
19 | |||
20 | diff --git a/regress/test-exec.sh b/regress/test-exec.sh | ||
21 | index 8a00c72..2891f27 100644 | ||
22 | --- a/regress/test-exec.sh | ||
23 | +++ b/regress/test-exec.sh | ||
24 | @@ -179,6 +179,11 @@ if [ "x$TEST_SSH_OPENSSL" != "x" ]; then | ||
25 | fi | ||
26 | |||
27 | # Path to sshd must be absolute for rexec | ||
28 | +case "$SSH" in | ||
29 | +/*) ;; | ||
30 | +*) SSH=`which $SSH` ;; | ||
31 | +esac | ||
32 | + | ||
33 | case "$SSHD" in | ||
34 | /*) ;; | ||
35 | *) SSHD=`which $SSHD` ;; | ||
diff --git a/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch b/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch deleted file mode 100644 index b8402a4dee..0000000000 --- a/meta/recipes-connectivity/openssh/openssh/add-test-support-for-busybox.patch +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | Adjust test cases to work with busybox. | ||
2 | |||
3 | - Replace dd parameter "obs" with "bs". | ||
4 | - Replace "head -<num>" with "head -n <num>". | ||
5 | |||
6 | Signed-off-by: Maxin B. John <maxin.john@enea.com> | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | Index: openssh-7.6p1/regress/cipher-speed.sh | ||
10 | =================================================================== | ||
11 | --- openssh-7.6p1.orig/regress/cipher-speed.sh | ||
12 | +++ openssh-7.6p1/regress/cipher-speed.sh | ||
13 | @@ -17,7 +17,7 @@ for c in `${SSH} -Q cipher`; do n=0; for | ||
14 | printf "%-60s" "$c/$m:" | ||
15 | ( ${SSH} -o 'compression no' \ | ||
16 | -F $OBJ/ssh_proxy -m $m -c $c somehost \ | ||
17 | - exec sh -c \'"dd of=/dev/null obs=32k"\' \ | ||
18 | + exec sh -c \'"dd of=/dev/null bs=32k"\' \ | ||
19 | < ${DATA} ) 2>&1 | getbytes | ||
20 | |||
21 | if [ $? -ne 0 ]; then | ||
22 | Index: openssh-7.6p1/regress/transfer.sh | ||
23 | =================================================================== | ||
24 | --- openssh-7.6p1.orig/regress/transfer.sh | ||
25 | +++ openssh-7.6p1/regress/transfer.sh | ||
26 | @@ -13,7 +13,7 @@ cmp ${DATA} ${COPY} || fail "corrupted | ||
27 | for s in 10 100 1k 32k 64k 128k 256k; do | ||
28 | trace "dd-size ${s}" | ||
29 | rm -f ${COPY} | ||
30 | - dd if=$DATA obs=${s} 2> /dev/null | \ | ||
31 | + dd if=$DATA bs=${s} 2> /dev/null | \ | ||
32 | ${SSH} -q -F $OBJ/ssh_proxy somehost "cat > ${COPY}" | ||
33 | if [ $? -ne 0 ]; then | ||
34 | fail "ssh cat $DATA failed" | ||
35 | Index: openssh-7.6p1/regress/key-options.sh | ||
36 | =================================================================== | ||
37 | --- openssh-7.6p1.orig/regress/key-options.sh | ||
38 | +++ openssh-7.6p1/regress/key-options.sh | ||
39 | @@ -47,7 +47,7 @@ for f in 127.0.0.1 '127.0.0.0\/8'; do | ||
40 | fi | ||
41 | |||
42 | sed 's/.*/from="'"$f"'" &/' $origkeys >$authkeys | ||
43 | - from=`head -1 $authkeys | cut -f1 -d ' '` | ||
44 | + from=`head -n 1 $authkeys | cut -f1 -d ' '` | ||
45 | verbose "key option $from" | ||
46 | r=`${SSH} -q -F $OBJ/ssh_proxy somehost 'echo true'` | ||
47 | if [ "$r" = "true" ]; then | ||
diff --git a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch b/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch deleted file mode 100644 index 20036da931..0000000000 --- a/meta/recipes-connectivity/openssh/openssh/fix-potential-signed-overflow-in-pointer-arithmatic.patch +++ /dev/null | |||
@@ -1,111 +0,0 @@ | |||
1 | From 3328e98bcbf2930cd7eea3e6c92ad5dcbdf4794f Mon Sep 17 00:00:00 2001 | ||
2 | From: Yuanjie Huang <yuanjie.huang@windriver.com> | ||
3 | Date: Wed, 24 Aug 2016 03:15:43 +0000 | ||
4 | Subject: [PATCH] Fix potential signed overflow in pointer arithmatic | ||
5 | |||
6 | Pointer arithmatic results in implementation defined signed integer | ||
7 | type, so that 's - src' in strlcpy and others may trigger signed overflow. | ||
8 | In case of compilation by gcc or clang with -ftrapv option, the overflow | ||
9 | would lead to program abort. | ||
10 | |||
11 | Upstream-Status: Submitted [http://bugzilla.mindrot.org/show_bug.cgi?id=2608] | ||
12 | |||
13 | Signed-off-by: Yuanjie Huang <yuanjie.huang@windriver.com> | ||
14 | |||
15 | Complete the fix | ||
16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
17 | --- | ||
18 | openbsd-compat/strlcat.c | 10 +++++++--- | ||
19 | openbsd-compat/strlcpy.c | 8 ++++++-- | ||
20 | openbsd-compat/strnlen.c | 8 ++++++-- | ||
21 | 3 files changed, 19 insertions(+), 7 deletions(-) | ||
22 | |||
23 | diff --git a/openbsd-compat/strlcat.c b/openbsd-compat/strlcat.c | ||
24 | index bcc1b61..124e1e3 100644 | ||
25 | --- a/openbsd-compat/strlcat.c | ||
26 | +++ b/openbsd-compat/strlcat.c | ||
27 | @@ -23,6 +23,7 @@ | ||
28 | |||
29 | #include <sys/types.h> | ||
30 | #include <string.h> | ||
31 | +#include <stdint.h> | ||
32 | |||
33 | /* | ||
34 | * Appends src to string dst of size siz (unlike strncat, siz is the | ||
35 | @@ -42,7 +43,7 @@ strlcat(char *dst, const char *src, size_t siz) | ||
36 | /* Find the end of dst and adjust bytes left but don't go past end */ | ||
37 | while (n-- != 0 && *d != '\0') | ||
38 | d++; | ||
39 | - dlen = d - dst; | ||
40 | + dlen = (uintptr_t)d - (uintptr_t)dst; | ||
41 | n = siz - dlen; | ||
42 | |||
43 | if (n == 0) | ||
44 | @@ -55,8 +56,11 @@ strlcat(char *dst, const char *src, size_t siz) | ||
45 | s++; | ||
46 | } | ||
47 | *d = '\0'; | ||
48 | - | ||
49 | - return(dlen + (s - src)); /* count does not include NUL */ | ||
50 | + /* | ||
51 | + * Cast pointers to unsigned type before calculation, to avoid signed | ||
52 | + * overflow when the string ends where the MSB has changed. | ||
53 | + */ | ||
54 | + return (dlen + ((uintptr_t)s - (uintptr_t)src)); /* count does not include NUL */ | ||
55 | } | ||
56 | |||
57 | #endif /* !HAVE_STRLCAT */ | ||
58 | diff --git a/openbsd-compat/strlcpy.c b/openbsd-compat/strlcpy.c | ||
59 | index b4b1b60..b06f374 100644 | ||
60 | --- a/openbsd-compat/strlcpy.c | ||
61 | +++ b/openbsd-compat/strlcpy.c | ||
62 | @@ -23,6 +23,7 @@ | ||
63 | |||
64 | #include <sys/types.h> | ||
65 | #include <string.h> | ||
66 | +#include <stdint.h> | ||
67 | |||
68 | /* | ||
69 | * Copy src to string dst of size siz. At most siz-1 characters | ||
70 | @@ -51,8 +52,11 @@ strlcpy(char *dst, const char *src, size_t siz) | ||
71 | while (*s++) | ||
72 | ; | ||
73 | } | ||
74 | - | ||
75 | - return(s - src - 1); /* count does not include NUL */ | ||
76 | + /* | ||
77 | + * Cast pointers to unsigned type before calculation, to avoid signed | ||
78 | + * overflow when the string ends where the MSB has changed. | ||
79 | + */ | ||
80 | + return ((uintptr_t)s - (uintptr_t)src - 1); /* count does not include NUL */ | ||
81 | } | ||
82 | |||
83 | #endif /* !HAVE_STRLCPY */ | ||
84 | diff --git a/openbsd-compat/strnlen.c b/openbsd-compat/strnlen.c | ||
85 | index 7ad3573..7040f1f 100644 | ||
86 | --- a/openbsd-compat/strnlen.c | ||
87 | +++ b/openbsd-compat/strnlen.c | ||
88 | @@ -23,6 +23,7 @@ | ||
89 | #include <sys/types.h> | ||
90 | |||
91 | #include <string.h> | ||
92 | +#include <stdint.h> | ||
93 | |||
94 | size_t | ||
95 | strnlen(const char *str, size_t maxlen) | ||
96 | @@ -31,7 +32,10 @@ strnlen(const char *str, size_t maxlen) | ||
97 | |||
98 | for (cp = str; maxlen != 0 && *cp != '\0'; cp++, maxlen--) | ||
99 | ; | ||
100 | - | ||
101 | - return (size_t)(cp - str); | ||
102 | + /* | ||
103 | + * Cast pointers to unsigned type before calculation, to avoid signed | ||
104 | + * overflow when the string ends where the MSB has changed. | ||
105 | + */ | ||
106 | + return (size_t)((uintptr_t)cp - (uintptr_t)str); | ||
107 | } | ||
108 | #endif | ||
109 | -- | ||
110 | 2.17.1 | ||
111 | |||
diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest b/meta/recipes-connectivity/openssh/openssh/run-ptest index ae03e929b2..c9100f9f37 100755 --- a/meta/recipes-connectivity/openssh/openssh/run-ptest +++ b/meta/recipes-connectivity/openssh/openssh/run-ptest | |||
@@ -1,11 +1,26 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | export TEST_SSH_SSH=ssh | ||
3 | export TEST_SHELL=sh | 4 | export TEST_SHELL=sh |
4 | export SKIP_UNIT=1 | 5 | export SKIP_UNIT=1 |
5 | 6 | ||
6 | cd regress | 7 | cd regress |
8 | |||
9 | # copied from openssh-portable/.github/run_test.sh | ||
10 | output_failed_logs() { | ||
11 | for i in failed*.log; do | ||
12 | if [ -f "$i" ]; then | ||
13 | echo ------------------------------------------------------------------------- | ||
14 | echo LOGFILE $i | ||
15 | cat $i | ||
16 | echo ------------------------------------------------------------------------- | ||
17 | fi | ||
18 | done | ||
19 | } | ||
20 | trap output_failed_logs 0 | ||
21 | |||
7 | sed -i "/\t\tagent-ptrace /d" Makefile | 22 | sed -i "/\t\tagent-ptrace /d" Makefile |
8 | make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \ | 23 | make -k BUILDDIR=`pwd`/.. .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="" tests \ |
9 | | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' | 24 | | sed -u -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' |
10 | 25 | ||
11 | SSHAGENT=`which ssh-agent` | 26 | SSHAGENT=`which ssh-agent` |
diff --git a/meta/recipes-connectivity/openssh/openssh/ssh_config b/meta/recipes-connectivity/openssh/openssh/ssh_config index e0d023803e..cb2774a163 100644 --- a/meta/recipes-connectivity/openssh/openssh/ssh_config +++ b/meta/recipes-connectivity/openssh/openssh/ssh_config | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: ssh_config,v 1.33 2017/05/07 23:12:57 djm Exp $ | 1 | # $OpenBSD: ssh_config,v 1.35 2020/07/17 03:43:42 dtucker Exp $ |
2 | 2 | ||
3 | # This is the ssh client system-wide configuration file. See | 3 | # This is the ssh client system-wide configuration file. See |
4 | # ssh_config(5) for more information. This file provides defaults for | 4 | # ssh_config(5) for more information. This file provides defaults for |
@@ -17,11 +17,11 @@ | |||
17 | # list of available options, their meanings and defaults, please see the | 17 | # list of available options, their meanings and defaults, please see the |
18 | # ssh_config(5) man page. | 18 | # ssh_config(5) man page. |
19 | 19 | ||
20 | Host * | 20 | Include /etc/ssh/ssh_config.d/*.conf |
21 | ForwardAgent yes | 21 | |
22 | ForwardX11 yes | 22 | # Host * |
23 | # RhostsRSAAuthentication no | 23 | # ForwardAgent no |
24 | # RSAAuthentication yes | 24 | # ForwardX11 no |
25 | # PasswordAuthentication yes | 25 | # PasswordAuthentication yes |
26 | # HostbasedAuthentication no | 26 | # HostbasedAuthentication no |
27 | # GSSAPIAuthentication no | 27 | # GSSAPIAuthentication no |
@@ -36,7 +36,6 @@ Host * | |||
36 | # IdentityFile ~/.ssh/id_ecdsa | 36 | # IdentityFile ~/.ssh/id_ecdsa |
37 | # IdentityFile ~/.ssh/id_ed25519 | 37 | # IdentityFile ~/.ssh/id_ed25519 |
38 | # Port 22 | 38 | # Port 22 |
39 | # Protocol 2 | ||
40 | # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc | 39 | # Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc |
41 | # MACs hmac-md5,hmac-sha1,umac-64@openssh.com | 40 | # MACs hmac-md5,hmac-sha1,umac-64@openssh.com |
42 | # EscapeChar ~ | 41 | # EscapeChar ~ |
@@ -46,3 +45,4 @@ Host * | |||
46 | # VisualHostKey no | 45 | # VisualHostKey no |
47 | # ProxyCommand ssh -q -W %h:%p gateway.example.com | 46 | # ProxyCommand ssh -q -W %h:%p gateway.example.com |
48 | # RekeyLimit 1G 1h | 47 | # RekeyLimit 1G 1h |
48 | # UserKnownHostsFile ~/.ssh/known_hosts.d/%k | ||
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd b/meta/recipes-connectivity/openssh/openssh/sshd index 4882e58b48..cf675a4dad 100644 --- a/meta/recipes-connectivity/openssh/openssh/sshd +++ b/meta/recipes-connectivity/openssh/openssh/sshd | |||
@@ -7,4 +7,4 @@ password include common-password | |||
7 | session optional pam_keyinit.so force revoke | 7 | session optional pam_keyinit.so force revoke |
8 | session include common-session | 8 | session include common-session |
9 | session required pam_loginuid.so | 9 | session required pam_loginuid.so |
10 | 10 | session required pam_env.so | |
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd.service b/meta/recipes-connectivity/openssh/openssh/sshd.service new file mode 100644 index 0000000000..c71fff1cc1 --- /dev/null +++ b/meta/recipes-connectivity/openssh/openssh/sshd.service | |||
@@ -0,0 +1,18 @@ | |||
1 | [Unit] | ||
2 | Description=OpenSSH server daemon | ||
3 | Wants=sshdgenkeys.service | ||
4 | After=sshdgenkeys.service | ||
5 | After=nss-user-lookup.target | ||
6 | |||
7 | [Service] | ||
8 | Type=notify-reload | ||
9 | Environment="SSHD_OPTS=" | ||
10 | EnvironmentFile=-/etc/default/ssh | ||
11 | ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd | ||
12 | ExecStart=-@SBINDIR@/sshd -D $SSHD_OPTS | ||
13 | KillMode=process | ||
14 | Restart=on-failure | ||
15 | RestartSec=42s | ||
16 | |||
17 | [Install] | ||
18 | WantedBy=multi-user.target | ||
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd.socket b/meta/recipes-connectivity/openssh/openssh/sshd.socket index 8d76d62309..7dd2ed0626 100644 --- a/meta/recipes-connectivity/openssh/openssh/sshd.socket +++ b/meta/recipes-connectivity/openssh/openssh/sshd.socket | |||
@@ -1,6 +1,7 @@ | |||
1 | [Unit] | 1 | [Unit] |
2 | Conflicts=sshd.service | 2 | Conflicts=sshd.service |
3 | Wants=sshdgenkeys.service | 3 | Wants=sshdgenkeys.service |
4 | After=nss-user-lookup.target | ||
4 | 5 | ||
5 | [Socket] | 6 | [Socket] |
6 | ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd | 7 | ExecStartPre=@BASE_BINDIR@/mkdir -p /var/run/sshd |
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys index ef117de897..bbb6a14908 100644 --- a/meta/recipes-connectivity/openssh/openssh/sshd_check_keys +++ b/meta/recipes-connectivity/openssh/openssh/sshd_check_keys | |||
@@ -8,7 +8,7 @@ generate_key() { | |||
8 | mkdir -p "$DIR" | 8 | mkdir -p "$DIR" |
9 | rm -f ${FILE}.tmp | 9 | rm -f ${FILE}.tmp |
10 | ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE | 10 | ssh-keygen -q -f "${FILE}.tmp" -N '' -t $TYPE |
11 | 11 | chmod go-rwx "$FILE.tmp" | |
12 | # Atomically rename file public key | 12 | # Atomically rename file public key |
13 | mv -f "${FILE}.tmp.pub" "${FILE}.pub" | 13 | mv -f "${FILE}.tmp.pub" "${FILE}.pub" |
14 | 14 | ||
@@ -57,8 +57,7 @@ while true ; do | |||
57 | esac | 57 | esac |
58 | done | 58 | done |
59 | 59 | ||
60 | HOST_KEYS=$(sed -n 's/^[ \t]*HostKey[ \t]\+\(.*\)/\1/p' "${sshd_config}") | 60 | HOST_KEYS=$(sshd -G -f "${sshd_config}" | grep -i '^hostkey ' | cut -f2 -d' ') |
61 | [ -z "${HOST_KEYS}" ] && HOST_KEYS="$SYSCONFDIR/ssh_host_rsa_key $SYSCONFDIR/ssh_host_ecdsa_key $SYSCONFDIR/ssh_host_ed25519_key" | ||
62 | 61 | ||
63 | for key in ${HOST_KEYS} ; do | 62 | for key in ${HOST_KEYS} ; do |
64 | [ -f $key ] && continue | 63 | [ -f $key ] && continue |
diff --git a/meta/recipes-connectivity/openssh/openssh/sshd_config b/meta/recipes-connectivity/openssh/openssh/sshd_config index 15f061b570..e9eaf93157 100644 --- a/meta/recipes-connectivity/openssh/openssh/sshd_config +++ b/meta/recipes-connectivity/openssh/openssh/sshd_config | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: sshd_config,v 1.102 2018/02/16 02:32:40 djm Exp $ | 1 | # $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ |
2 | 2 | ||
3 | # This is the sshd server system-wide configuration file. See | 3 | # This is the sshd server system-wide configuration file. See |
4 | # sshd_config(5) for more information. | 4 | # sshd_config(5) for more information. |
@@ -10,6 +10,8 @@ | |||
10 | # possible, but leave them commented. Uncommented options override the | 10 | # possible, but leave them commented. Uncommented options override the |
11 | # default value. | 11 | # default value. |
12 | 12 | ||
13 | Include /etc/ssh/sshd_config.d/*.conf | ||
14 | |||
13 | #Port 22 | 15 | #Port 22 |
14 | #AddressFamily any | 16 | #AddressFamily any |
15 | #ListenAddress 0.0.0.0 | 17 | #ListenAddress 0.0.0.0 |
@@ -57,9 +59,9 @@ AuthorizedKeysFile .ssh/authorized_keys | |||
57 | #PasswordAuthentication yes | 59 | #PasswordAuthentication yes |
58 | #PermitEmptyPasswords no | 60 | #PermitEmptyPasswords no |
59 | 61 | ||
60 | # Change to yes to enable challenge-response passwords (beware issues with | 62 | # Change to yes to enable keyboard-interactive authentication (beware issues |
61 | # some PAM modules and threads) | 63 | # with some PAM modules and threads) |
62 | ChallengeResponseAuthentication no | 64 | KbdInteractiveAuthentication no |
63 | 65 | ||
64 | # Kerberos options | 66 | # Kerberos options |
65 | #KerberosAuthentication no | 67 | #KerberosAuthentication no |
@@ -73,13 +75,13 @@ ChallengeResponseAuthentication no | |||
73 | 75 | ||
74 | # Set this to 'yes' to enable PAM authentication, account processing, | 76 | # Set this to 'yes' to enable PAM authentication, account processing, |
75 | # and session processing. If this is enabled, PAM authentication will | 77 | # and session processing. If this is enabled, PAM authentication will |
76 | # be allowed through the ChallengeResponseAuthentication and | 78 | # be allowed through the KbdInteractiveAuthentication and |
77 | # PasswordAuthentication. Depending on your PAM configuration, | 79 | # PasswordAuthentication. Depending on your PAM configuration, |
78 | # PAM authentication via ChallengeResponseAuthentication may bypass | 80 | # PAM authentication via KbdInteractiveAuthentication may bypass |
79 | # the setting of "PermitRootLogin without-password". | 81 | # the setting of "PermitRootLogin without-password". |
80 | # If you just want the PAM account and session checks to run without | 82 | # If you just want the PAM account and session checks to run without |
81 | # PAM authentication, then enable this but set PasswordAuthentication | 83 | # PAM authentication, then enable this but set PasswordAuthentication |
82 | # and ChallengeResponseAuthentication to 'no'. | 84 | # and KbdInteractiveAuthentication to 'no'. |
83 | #UsePAM no | 85 | #UsePAM no |
84 | 86 | ||
85 | #AllowAgentForwarding yes | 87 | #AllowAgentForwarding yes |
@@ -92,7 +94,6 @@ ChallengeResponseAuthentication no | |||
92 | #PrintMotd yes | 94 | #PrintMotd yes |
93 | #PrintLastLog yes | 95 | #PrintLastLog yes |
94 | #TCPKeepAlive yes | 96 | #TCPKeepAlive yes |
95 | #UseLogin no | ||
96 | #PermitUserEnvironment no | 97 | #PermitUserEnvironment no |
97 | Compression no | 98 | Compression no |
98 | ClientAliveInterval 15 | 99 | ClientAliveInterval 15 |
diff --git a/meta/recipes-connectivity/openssh/openssh_8.8p1.bb b/meta/recipes-connectivity/openssh/openssh_10.0p1.bb index ee86bb92ab..2f446b5540 100644 --- a/meta/recipes-connectivity/openssh/openssh_8.8p1.bb +++ b/meta/recipes-connectivity/openssh/openssh_10.0p1.bb | |||
@@ -5,37 +5,38 @@ Ssh (Secure Shell) is a program for logging into a remote machine \ | |||
5 | and for executing commands on a remote machine." | 5 | and for executing commands on a remote machine." |
6 | HOMEPAGE = "http://www.openssh.com/" | 6 | HOMEPAGE = "http://www.openssh.com/" |
7 | SECTION = "console/network" | 7 | SECTION = "console/network" |
8 | LICENSE = "BSD-2-Clause & BSD-3-Clause & BSD-4-Clause & ISC & MIT" | 8 | LICENSE = "BSD-2-Clause & BSD-3-Clause & ISC & MIT" |
9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=d9d2753bdef9f19466dc7bc959114b11" | 9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=78ffb36e5a48c0d8c5648603a3b6c8eb" |
10 | 10 | ||
11 | DEPENDS = "zlib openssl virtual/crypt" | 11 | DEPENDS = "zlib openssl virtual/crypt" |
12 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" | 12 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
13 | 13 | ||
14 | SRC_URI = "http://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \ | 14 | SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.tar.gz \ |
15 | file://sshd_config \ | 15 | file://sshd_config \ |
16 | file://ssh_config \ | 16 | file://ssh_config \ |
17 | file://init \ | 17 | file://init \ |
18 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ | 18 | ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ |
19 | file://sshd.service \ | ||
19 | file://sshd.socket \ | 20 | file://sshd.socket \ |
20 | file://sshd@.service \ | 21 | file://sshd@.service \ |
21 | file://sshdgenkeys.service \ | 22 | file://sshdgenkeys.service \ |
22 | file://volatiles.99_sshd \ | 23 | file://volatiles.99_sshd \ |
23 | file://run-ptest \ | 24 | file://run-ptest \ |
24 | file://fix-potential-signed-overflow-in-pointer-arithmatic.patch \ | ||
25 | file://sshd_check_keys \ | 25 | file://sshd_check_keys \ |
26 | file://add-test-support-for-busybox.patch \ | 26 | file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \ |
27 | file://0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch \ | ||
27 | " | 28 | " |
28 | SRC_URI[sha256sum] = "4590890ea9bb9ace4f71ae331785a3a5823232435161960ed5fc86588f331fe9" | 29 | SRC_URI[sha256sum] = "021a2e709a0edf4250b1256bd5a9e500411a90dddabea830ed59cef90eb9d85c" |
29 | 30 | ||
30 | # This CVE is specific to OpenSSH with the pam opie which we don't build/use here | 31 | CVE_STATUS[CVE-2007-2768] = "not-applicable-config: This CVE is specific to OpenSSH with the pam opie which we don't build/use here." |
31 | CVE_CHECK_WHITELIST += "CVE-2007-2768" | ||
32 | 32 | ||
33 | # This CVE is specific to OpenSSH server, as used in Fedora and Red Hat Enterprise Linux 7 | 33 | # This CVE is specific to OpenSSH server, as used in Fedora and Red Hat Enterprise Linux 7 |
34 | # and when running in a Kerberos environment. As such it is not relevant to OpenEmbedded | 34 | # and when running in a Kerberos environment. As such it is not relevant to OpenEmbedded |
35 | CVE_CHECK_WHITELIST += "CVE-2014-9278" | 35 | CVE_STATUS[CVE-2014-9278] = "not-applicable-platform: This CVE is specific to OpenSSH server, as used in Fedora and \ |
36 | Red Hat Enterprise Linux 7 and when running in a Kerberos environment" | ||
36 | 37 | ||
37 | # CVE only applies to some distributed RHEL binaries | 38 | CVE_STATUS[CVE-2008-3844] = "not-applicable-platform: Only applies to some distributed RHEL binaries." |
38 | CVE_CHECK_WHITELIST += "CVE-2008-3844" | 39 | CVE_STATUS[CVE-2023-51767] = "upstream-wontfix: It was demonstrated on modified sshd and does not exist in upstream openssh https://bugzilla.mindrot.org/show_bug.cgi?id=3656#c1." |
39 | 40 | ||
40 | PAM_SRC_URI = "file://sshd" | 41 | PAM_SRC_URI = "file://sshd" |
41 | 42 | ||
@@ -48,18 +49,23 @@ INITSCRIPT_NAME:${PN}-sshd = "sshd" | |||
48 | INITSCRIPT_PARAMS:${PN}-sshd = "defaults 9" | 49 | INITSCRIPT_PARAMS:${PN}-sshd = "defaults 9" |
49 | 50 | ||
50 | SYSTEMD_PACKAGES = "${PN}-sshd" | 51 | SYSTEMD_PACKAGES = "${PN}-sshd" |
51 | SYSTEMD_SERVICE:${PN}-sshd = "sshd.socket" | 52 | SYSTEMD_SERVICE:${PN}-sshd = "${@bb.utils.contains('PACKAGECONFIG','systemd-sshd-socket-mode','sshd.socket', '', d)} ${@bb.utils.contains('PACKAGECONFIG','systemd-sshd-service-mode','sshd.service', '', d)}" |
52 | 53 | ||
53 | inherit autotools-brokensep ptest | 54 | inherit autotools-brokensep ptest pkgconfig |
54 | 55 | ||
55 | PACKAGECONFIG ??= "rng-tools" | 56 | # systemd-sshd-socket-mode means installing sshd.socket |
57 | # and systemd-sshd-service-mode corresponding to sshd.service | ||
58 | PACKAGECONFIG ??= "systemd-sshd-socket-mode hostkey-ecdsa" | ||
59 | PACKAGECONFIG[fido2] = "--with-security-key-builtin,--disable-security-key,libfido2" | ||
56 | PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5" | 60 | PACKAGECONFIG[kerberos] = "--with-kerberos5,--without-kerberos5,krb5" |
57 | PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns" | 61 | PACKAGECONFIG[ldns] = "--with-ldns,--without-ldns,ldns" |
58 | PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" | 62 | PACKAGECONFIG[libedit] = "--with-libedit,--without-libedit,libedit" |
59 | PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat" | 63 | PACKAGECONFIG[manpages] = "--with-mantype=man,--with-mantype=cat" |
60 | 64 | PACKAGECONFIG[systemd-sshd-socket-mode] = "" | |
61 | # Add RRECOMMENDS to rng-tools for sshd package | 65 | PACKAGECONFIG[systemd-sshd-service-mode] = "" |
62 | PACKAGECONFIG[rng-tools] = "" | 66 | PACKAGECONFIG[hostkey-rsa] = "" |
67 | PACKAGECONFIG[hostkey-ecdsa] = "" | ||
68 | PACKAGECONFIG[hostkey-ed25519] = "" | ||
63 | 69 | ||
64 | EXTRA_AUTORECONF += "--exclude=aclocal" | 70 | EXTRA_AUTORECONF += "--exclude=aclocal" |
65 | 71 | ||
@@ -76,6 +82,13 @@ EXTRA_OECONF = "'LOGIN_PROGRAM=${base_bindir}/login' \ | |||
76 | # musl doesn't implement wtmp/utmp and logwtmp | 82 | # musl doesn't implement wtmp/utmp and logwtmp |
77 | EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog" | 83 | EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog" |
78 | 84 | ||
85 | # Work around ICE on mips/mips64 starting in 9.6p1 | ||
86 | EXTRA_OECONF:append:mips = " --without-hardening" | ||
87 | EXTRA_OECONF:append:mips64 = " --without-hardening" | ||
88 | |||
89 | # Work around ICE on powerpc64le starting in 9.6p1 | ||
90 | EXTRA_OECONF:append:powerpc64le = " --without-hardening" | ||
91 | |||
79 | # Since we do not depend on libbsd, we do not want configure to use it | 92 | # Since we do not depend on libbsd, we do not want configure to use it |
80 | # just because it finds libutil.h. But, specifying --disable-libutil | 93 | # just because it finds libutil.h. But, specifying --disable-libutil |
81 | # causes compile errors, so... | 94 | # causes compile errors, so... |
@@ -89,20 +102,42 @@ CACHED_CONFIGUREVARS += "ac_cv_header_maillock_h=no" | |||
89 | 102 | ||
90 | do_configure:prepend () { | 103 | do_configure:prepend () { |
91 | export LD="${CC}" | 104 | export LD="${CC}" |
92 | install -m 0644 ${WORKDIR}/sshd_config ${B}/ | 105 | install -m 0600 ${UNPACKDIR}/sshd_config ${B}/ |
93 | install -m 0644 ${WORKDIR}/ssh_config ${B}/ | 106 | install -m 0644 ${UNPACKDIR}/ssh_config ${B}/ |
94 | } | 107 | } |
95 | 108 | ||
96 | do_compile_ptest() { | 109 | do_compile_ptest() { |
97 | # skip regress/unittests/ binaries: this will silently skip | 110 | oe_runmake regress-binaries regress-unit-binaries |
98 | # unittests in run-ptests which is good because they are so slow. | 111 | } |
99 | oe_runmake regress/modpipe regress/setuid-allowed regress/netcat \ | 112 | |
100 | regress/check-perm regress/mkdtemp | 113 | sshd_hostkey_setup() { |
114 | # Enable specific ssh host keys | ||
115 | sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config | ||
116 | if ${@bb.utils.contains('PACKAGECONFIG','hostkey-rsa','true','false',d)}; then | ||
117 | echo "HostKey /etc/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config | ||
118 | fi | ||
119 | if ${@bb.utils.contains('PACKAGECONFIG','hostkey-ecdsa','true','false',d)}; then | ||
120 | echo "HostKey /etc/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config | ||
121 | fi | ||
122 | if ${@bb.utils.contains('PACKAGECONFIG','hostkey-ed25519','true','false',d)}; then | ||
123 | echo "HostKey /etc/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config | ||
124 | fi | ||
125 | |||
126 | sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
127 | if ${@bb.utils.contains('PACKAGECONFIG','hostkey-rsa','true','false',d)}; then | ||
128 | echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
129 | fi | ||
130 | if ${@bb.utils.contains('PACKAGECONFIG','hostkey-ecdsa','true','false',d)}; then | ||
131 | echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
132 | fi | ||
133 | if ${@bb.utils.contains('PACKAGECONFIG','hostkey-ed25519','true','false',d)}; then | ||
134 | echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
135 | fi | ||
101 | } | 136 | } |
102 | 137 | ||
103 | do_install:append () { | 138 | do_install:append () { |
104 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then | 139 | if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then |
105 | install -D -m 0644 ${WORKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd | 140 | install -D -m 0644 ${UNPACKDIR}/sshd ${D}${sysconfdir}/pam.d/sshd |
106 | sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config | 141 | sed -i -e 's:#UsePAM no:UsePAM yes:' ${D}${sysconfdir}/ssh/sshd_config |
107 | fi | 142 | fi |
108 | 143 | ||
@@ -111,40 +146,51 @@ do_install:append () { | |||
111 | fi | 146 | fi |
112 | 147 | ||
113 | install -d ${D}${sysconfdir}/init.d | 148 | install -d ${D}${sysconfdir}/init.d |
114 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/sshd | 149 | install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/sshd |
115 | rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin | 150 | rm -f ${D}${bindir}/slogin ${D}${datadir}/Ssh.bin |
116 | rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir} | 151 | rmdir ${D}${localstatedir}/run/sshd ${D}${localstatedir}/run ${D}${localstatedir} |
117 | install -d ${D}/${sysconfdir}/default/volatiles | 152 | install -d ${D}/${sysconfdir}/default/volatiles |
118 | install -m 644 ${WORKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd | 153 | install -m 644 ${UNPACKDIR}/volatiles.99_sshd ${D}/${sysconfdir}/default/volatiles/99_sshd |
119 | install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir} | 154 | install -m 0755 ${S}/contrib/ssh-copy-id ${D}${bindir} |
120 | 155 | ||
156 | # Limit sshd_config access to the owner (default is 0644) | ||
157 | chmod 0600 ${D}${sysconfdir}/ssh/sshd_config | ||
158 | |||
121 | # Create config files for read-only rootfs | 159 | # Create config files for read-only rootfs |
122 | install -d ${D}${sysconfdir}/ssh | 160 | install -d ${D}${sysconfdir}/ssh |
123 | install -m 644 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly | 161 | install -m 0600 ${D}${sysconfdir}/ssh/sshd_config ${D}${sysconfdir}/ssh/sshd_config_readonly |
124 | sed -i '/HostKey/d' ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
125 | echo "HostKey /var/run/ssh/ssh_host_rsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
126 | echo "HostKey /var/run/ssh/ssh_host_ecdsa_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
127 | echo "HostKey /var/run/ssh/ssh_host_ed25519_key" >> ${D}${sysconfdir}/ssh/sshd_config_readonly | ||
128 | 162 | ||
129 | install -d ${D}${systemd_system_unitdir} | 163 | install -d ${D}${systemd_system_unitdir} |
130 | install -c -m 0644 ${WORKDIR}/sshd.socket ${D}${systemd_system_unitdir} | 164 | if ${@bb.utils.contains('PACKAGECONFIG','systemd-sshd-socket-mode','true','false',d)}; then |
131 | install -c -m 0644 ${WORKDIR}/sshd@.service ${D}${systemd_system_unitdir} | 165 | install -c -m 0644 ${UNPACKDIR}/sshd.socket ${D}${systemd_system_unitdir} |
132 | install -c -m 0644 ${WORKDIR}/sshdgenkeys.service ${D}${systemd_system_unitdir} | 166 | install -c -m 0644 ${UNPACKDIR}/sshd@.service ${D}${systemd_system_unitdir} |
167 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | ||
168 | -e 's,@SBINDIR@,${sbindir},g' \ | ||
169 | -e 's,@BINDIR@,${bindir},g' \ | ||
170 | -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ | ||
171 | ${D}${systemd_system_unitdir}/sshd.socket | ||
172 | fi | ||
173 | if ${@bb.utils.contains('PACKAGECONFIG','systemd-sshd-service-mode','true','false',d)}; then | ||
174 | install -c -m 0644 ${UNPACKDIR}/sshd.service ${D}${systemd_system_unitdir} | ||
175 | fi | ||
176 | install -c -m 0644 ${UNPACKDIR}/sshdgenkeys.service ${D}${systemd_system_unitdir} | ||
133 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ | 177 | sed -i -e 's,@BASE_BINDIR@,${base_bindir},g' \ |
134 | -e 's,@SBINDIR@,${sbindir},g' \ | 178 | -e 's,@SBINDIR@,${sbindir},g' \ |
135 | -e 's,@BINDIR@,${bindir},g' \ | 179 | -e 's,@BINDIR@,${bindir},g' \ |
136 | -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ | 180 | -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ |
137 | ${D}${systemd_system_unitdir}/sshd.socket ${D}${systemd_system_unitdir}/*.service | 181 | ${D}${systemd_system_unitdir}/*.service |
138 | 182 | ||
139 | sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ | 183 | sed -i -e 's,@LIBEXECDIR@,${libexecdir}/${BPN},g' \ |
140 | ${D}${sysconfdir}/init.d/sshd | 184 | ${D}${sysconfdir}/init.d/sshd |
141 | 185 | ||
142 | install -D -m 0755 ${WORKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys | 186 | install -D -m 0755 ${UNPACKDIR}/sshd_check_keys ${D}${libexecdir}/${BPN}/sshd_check_keys |
187 | sshd_hostkey_setup | ||
143 | } | 188 | } |
144 | 189 | ||
145 | do_install_ptest () { | 190 | do_install_ptest () { |
146 | sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh | 191 | sed -i -e "s|^SFTPSERVER=.*|SFTPSERVER=${libexecdir}/sftp-server|" regress/test-exec.sh |
147 | cp -r regress ${D}${PTEST_PATH} | 192 | cp -r regress ${D}${PTEST_PATH} |
193 | cp config.h ${D}${PTEST_PATH} | ||
148 | } | 194 | } |
149 | 195 | ||
150 | ALLOW_EMPTY:${PN} = "1" | 196 | ALLOW_EMPTY:${PN} = "1" |
@@ -152,22 +198,18 @@ ALLOW_EMPTY:${PN} = "1" | |||
152 | PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" | 198 | PACKAGES =+ "${PN}-keygen ${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-sftp ${PN}-misc ${PN}-sftp-server" |
153 | FILES:${PN}-scp = "${bindir}/scp.${BPN}" | 199 | FILES:${PN}-scp = "${bindir}/scp.${BPN}" |
154 | FILES:${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" | 200 | FILES:${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" |
155 | FILES:${PN}-sshd = "${sbindir}/sshd ${sysconfdir}/init.d/sshd ${systemd_system_unitdir}" | 201 | FILES:${PN}-sshd = "${sbindir}/sshd ${libexecdir}/sshd-session ${sysconfdir}/init.d/sshd ${systemd_system_unitdir}" |
156 | FILES:${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" | 202 | FILES:${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" |
157 | FILES:${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys" | 203 | FILES:${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys ${libexecdir}/sshd-auth" |
158 | FILES:${PN}-sftp = "${bindir}/sftp" | 204 | FILES:${PN}-sftp = "${bindir}/sftp" |
159 | FILES:${PN}-sftp-server = "${libexecdir}/sftp-server" | 205 | FILES:${PN}-sftp-server = "${libexecdir}/sftp-server" |
160 | FILES:${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" | 206 | FILES:${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" |
161 | FILES:${PN}-keygen = "${bindir}/ssh-keygen" | 207 | FILES:${PN}-keygen = "${bindir}/ssh-keygen" |
162 | 208 | ||
163 | RDEPENDS:${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen" | 209 | RDEPENDS:${PN} += "${PN}-scp ${PN}-ssh ${PN}-sshd ${PN}-keygen ${PN}-sftp-server" |
164 | RDEPENDS:${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" | 210 | RDEPENDS:${PN}-sshd += "${PN}-keygen ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-keyinit pam-plugin-loginuid', '', d)}" |
165 | RRECOMMENDS:${PN}-sshd:append:class-target = "\ | ||
166 | ${@bb.utils.filter('PACKAGECONFIG', 'rng-tools', d)} \ | ||
167 | " | ||
168 | |||
169 | # gdb would make attach-ptrace test pass rather than skip but not worth the build dependencies | 211 | # gdb would make attach-ptrace test pass rather than skip but not worth the build dependencies |
170 | RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed sudo coreutils" | 212 | RDEPENDS:${PN}-ptest += "${PN}-sftp ${PN}-misc ${PN}-sftp-server make sed coreutils openssl-bin" |
171 | 213 | ||
172 | RPROVIDES:${PN}-ssh = "ssh" | 214 | RPROVIDES:${PN}-ssh = "ssh" |
173 | RPROVIDES:${PN}-sshd = "sshd" | 215 | RPROVIDES:${PN}-sshd = "sshd" |
diff --git a/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh b/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh index b9cc24a7ac..71d378734c 100644 --- a/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh +++ b/meta/recipes-connectivity/openssl/files/environment.d-openssl.sh | |||
@@ -1 +1,24 @@ | |||
1 | export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl/openssl.cnf" | 1 | export OPENSSL_CONF="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/openssl.cnf" |
2 | export OPENSSL_MODULES="$OECORE_NATIVE_SYSROOT/usr/lib/ossl-modules/" | ||
3 | export OPENSSL_ENGINES="$OECORE_NATIVE_SYSROOT/usr/lib/engines-3" | ||
4 | export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} OPENSSL_CONF OPENSSL_MODULES OPENSSL_ENGINES" | ||
5 | |||
6 | # Respect host env SSL_CERT_FILE/SSL_CERT_DIR first, then auto-detected host cert, then cert in buildtools | ||
7 | # CAFILE/CAPATH is auto-deteced when source buildtools | ||
8 | if [ -z "$SSL_CERT_FILE" ]; then | ||
9 | if [ -n "$CAFILE" ];then | ||
10 | export SSL_CERT_FILE="$CAFILE" | ||
11 | elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then | ||
12 | export SSL_CERT_FILE="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs/ca-certificates.crt" | ||
13 | fi | ||
14 | fi | ||
15 | |||
16 | if [ -z "$SSL_CERT_DIR" ]; then | ||
17 | if [ -n "$CAPATH" ];then | ||
18 | export SSL_CERT_DIR="$CAPATH" | ||
19 | elif [ -e "${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/ca-certificates.crt" ];then | ||
20 | export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/usr/lib/ssl-3/certs" | ||
21 | fi | ||
22 | fi | ||
23 | |||
24 | export BB_ENV_PASSTHROUGH_ADDITIONS="${BB_ENV_PASSTHROUGH_ADDITIONS:-} SSL_CERT_DIR SSL_CERT_FILE" | ||
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Added-handshake-history-reporting-when-test-fails.patch b/meta/recipes-connectivity/openssl/openssl/0001-Added-handshake-history-reporting-when-test-fails.patch new file mode 100644 index 0000000000..5b7365a353 --- /dev/null +++ b/meta/recipes-connectivity/openssl/openssl/0001-Added-handshake-history-reporting-when-test-fails.patch | |||
@@ -0,0 +1,367 @@ | |||
1 | From 5ba65051fea0513db0d997f0ab7cafb9826ed74a Mon Sep 17 00:00:00 2001 | ||
2 | From: William Lyu <William.Lyu@windriver.com> | ||
3 | Date: Fri, 20 Oct 2023 16:22:37 -0400 | ||
4 | Subject: [PATCH] Added handshake history reporting when test fails | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/openssl/openssl/pull/22481] | ||
7 | |||
8 | Signed-off-by: William Lyu <William.Lyu@windriver.com> | ||
9 | --- | ||
10 | test/helpers/handshake.c | 137 +++++++++++++++++++++++++++++---------- | ||
11 | test/helpers/handshake.h | 70 +++++++++++++++++++- | ||
12 | test/ssl_test.c | 44 +++++++++++++ | ||
13 | 3 files changed, 217 insertions(+), 34 deletions(-) | ||
14 | |||
15 | diff --git a/test/helpers/handshake.c b/test/helpers/handshake.c | ||
16 | index f611b3a..5703b48 100644 | ||
17 | --- a/test/helpers/handshake.c | ||
18 | +++ b/test/helpers/handshake.c | ||
19 | @@ -25,6 +25,102 @@ | ||
20 | #include <netinet/sctp.h> | ||
21 | #endif | ||
22 | |||
23 | +/* Shamelessly copied from test/helpers/ssl_test_ctx.c */ | ||
24 | +/* Maps string names to various enumeration type */ | ||
25 | +typedef struct { | ||
26 | + const char *name; | ||
27 | + int value; | ||
28 | +} enum_name_map; | ||
29 | + | ||
30 | +static const enum_name_map connect_phase_names[] = { | ||
31 | + {"Handshake", HANDSHAKE}, | ||
32 | + {"RenegAppData", RENEG_APPLICATION_DATA}, | ||
33 | + {"RenegSetup", RENEG_SETUP}, | ||
34 | + {"RenegHandshake", RENEG_HANDSHAKE}, | ||
35 | + {"AppData", APPLICATION_DATA}, | ||
36 | + {"Shutdown", SHUTDOWN}, | ||
37 | + {"ConnectionDone", CONNECTION_DONE} | ||
38 | +}; | ||
39 | + | ||
40 | +static const enum_name_map peer_status_names[] = { | ||
41 | + {"PeerSuccess", PEER_SUCCESS}, | ||
42 | + {"PeerRetry", PEER_RETRY}, | ||
43 | + {"PeerError", PEER_ERROR}, | ||
44 | + {"PeerWaiting", PEER_WAITING}, | ||
45 | + {"PeerTestFail", PEER_TEST_FAILURE} | ||
46 | +}; | ||
47 | + | ||
48 | +static const enum_name_map handshake_status_names[] = { | ||
49 | + {"HandshakeSuccess", HANDSHAKE_SUCCESS}, | ||
50 | + {"ClientError", CLIENT_ERROR}, | ||
51 | + {"ServerError", SERVER_ERROR}, | ||
52 | + {"InternalError", INTERNAL_ERROR}, | ||
53 | + {"HandshakeRetry", HANDSHAKE_RETRY} | ||
54 | +}; | ||
55 | + | ||
56 | +/* Shamelessly copied from test/helpers/ssl_test_ctx.c */ | ||
57 | +static const char *enum_name(const enum_name_map *enums, size_t num_enums, | ||
58 | + int value) | ||
59 | +{ | ||
60 | + size_t i; | ||
61 | + for (i = 0; i < num_enums; i++) { | ||
62 | + if (enums[i].value == value) { | ||
63 | + return enums[i].name; | ||
64 | + } | ||
65 | + } | ||
66 | + return "InvalidValue"; | ||
67 | +} | ||
68 | + | ||
69 | +const char *handshake_connect_phase_name(connect_phase_t phase) | ||
70 | +{ | ||
71 | + return enum_name(connect_phase_names, OSSL_NELEM(connect_phase_names), | ||
72 | + (int)phase); | ||
73 | +} | ||
74 | + | ||
75 | +const char *handshake_status_name(handshake_status_t handshake_status) | ||
76 | +{ | ||
77 | + return enum_name(handshake_status_names, OSSL_NELEM(handshake_status_names), | ||
78 | + (int)handshake_status); | ||
79 | +} | ||
80 | + | ||
81 | +const char *handshake_peer_status_name(peer_status_t peer_status) | ||
82 | +{ | ||
83 | + return enum_name(peer_status_names, OSSL_NELEM(peer_status_names), | ||
84 | + (int)peer_status); | ||
85 | +} | ||
86 | + | ||
87 | +static void save_loop_history(HANDSHAKE_HISTORY *history, | ||
88 | + connect_phase_t phase, | ||
89 | + handshake_status_t handshake_status, | ||
90 | + peer_status_t server_status, | ||
91 | + peer_status_t client_status, | ||
92 | + int client_turn_count, | ||
93 | + int is_client_turn) | ||
94 | +{ | ||
95 | + HANDSHAKE_HISTORY_ENTRY *new_entry = NULL; | ||
96 | + | ||
97 | + /* | ||
98 | + * Create a new history entry for a handshake loop with statuses given in | ||
99 | + * the arguments. Potentially evicting the oldest entry when the | ||
100 | + * ring buffer is full. | ||
101 | + */ | ||
102 | + ++(history->last_idx); | ||
103 | + history->last_idx &= MAX_HANDSHAKE_HISTORY_ENTRY_IDX_MASK; | ||
104 | + | ||
105 | + new_entry = &((history->entries)[history->last_idx]); | ||
106 | + new_entry->phase = phase; | ||
107 | + new_entry->handshake_status = handshake_status; | ||
108 | + new_entry->server_status = server_status; | ||
109 | + new_entry->client_status = client_status; | ||
110 | + new_entry->client_turn_count = client_turn_count; | ||
111 | + new_entry->is_client_turn = is_client_turn; | ||
112 | + | ||
113 | + /* Evict the oldest handshake loop entry when the ring buffer is full. */ | ||
114 | + if (history->entry_count < MAX_HANDSHAKE_HISTORY_ENTRY) { | ||
115 | + ++(history->entry_count); | ||
116 | + } | ||
117 | +} | ||
118 | + | ||
119 | HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void) | ||
120 | { | ||
121 | HANDSHAKE_RESULT *ret; | ||
122 | @@ -726,15 +822,6 @@ static void configure_handshake_ssl(SSL *server, SSL *client, | ||
123 | SSL_set_post_handshake_auth(client, 1); | ||
124 | } | ||
125 | |||
126 | -/* The status for each connection phase. */ | ||
127 | -typedef enum { | ||
128 | - PEER_SUCCESS, | ||
129 | - PEER_RETRY, | ||
130 | - PEER_ERROR, | ||
131 | - PEER_WAITING, | ||
132 | - PEER_TEST_FAILURE | ||
133 | -} peer_status_t; | ||
134 | - | ||
135 | /* An SSL object and associated read-write buffers. */ | ||
136 | typedef struct peer_st { | ||
137 | SSL *ssl; | ||
138 | @@ -1081,17 +1168,6 @@ static void do_shutdown_step(PEER *peer) | ||
139 | } | ||
140 | } | ||
141 | |||
142 | -typedef enum { | ||
143 | - HANDSHAKE, | ||
144 | - RENEG_APPLICATION_DATA, | ||
145 | - RENEG_SETUP, | ||
146 | - RENEG_HANDSHAKE, | ||
147 | - APPLICATION_DATA, | ||
148 | - SHUTDOWN, | ||
149 | - CONNECTION_DONE | ||
150 | -} connect_phase_t; | ||
151 | - | ||
152 | - | ||
153 | static int renegotiate_op(const SSL_TEST_CTX *test_ctx) | ||
154 | { | ||
155 | switch (test_ctx->handshake_mode) { | ||
156 | @@ -1169,19 +1245,6 @@ static void do_connect_step(const SSL_TEST_CTX *test_ctx, PEER *peer, | ||
157 | } | ||
158 | } | ||
159 | |||
160 | -typedef enum { | ||
161 | - /* Both parties succeeded. */ | ||
162 | - HANDSHAKE_SUCCESS, | ||
163 | - /* Client errored. */ | ||
164 | - CLIENT_ERROR, | ||
165 | - /* Server errored. */ | ||
166 | - SERVER_ERROR, | ||
167 | - /* Peers are in inconsistent state. */ | ||
168 | - INTERNAL_ERROR, | ||
169 | - /* One or both peers not done. */ | ||
170 | - HANDSHAKE_RETRY | ||
171 | -} handshake_status_t; | ||
172 | - | ||
173 | /* | ||
174 | * Determine the handshake outcome. | ||
175 | * last_status: the status of the peer to have acted last. | ||
176 | @@ -1546,6 +1609,10 @@ static HANDSHAKE_RESULT *do_handshake_internal( | ||
177 | |||
178 | start = time(NULL); | ||
179 | |||
180 | + save_loop_history(&(ret->history), | ||
181 | + phase, status, server.status, client.status, | ||
182 | + client_turn_count, client_turn); | ||
183 | + | ||
184 | /* | ||
185 | * Half-duplex handshake loop. | ||
186 | * Client and server speak to each other synchronously in the same process. | ||
187 | @@ -1567,6 +1634,10 @@ static HANDSHAKE_RESULT *do_handshake_internal( | ||
188 | 0 /* server went last */); | ||
189 | } | ||
190 | |||
191 | + save_loop_history(&(ret->history), | ||
192 | + phase, status, server.status, client.status, | ||
193 | + client_turn_count, client_turn); | ||
194 | + | ||
195 | switch (status) { | ||
196 | case HANDSHAKE_SUCCESS: | ||
197 | client_turn_count = 0; | ||
198 | diff --git a/test/helpers/handshake.h b/test/helpers/handshake.h | ||
199 | index 78b03f9..b9967c2 100644 | ||
200 | --- a/test/helpers/handshake.h | ||
201 | +++ b/test/helpers/handshake.h | ||
202 | @@ -1,5 +1,5 @@ | ||
203 | /* | ||
204 | - * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
205 | + * Copyright 2016-2023 The OpenSSL Project Authors. All Rights Reserved. | ||
206 | * | ||
207 | * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
208 | * this file except in compliance with the License. You can obtain a copy | ||
209 | @@ -12,6 +12,11 @@ | ||
210 | |||
211 | #include "ssl_test_ctx.h" | ||
212 | |||
213 | +#define MAX_HANDSHAKE_HISTORY_ENTRY_BIT 4 | ||
214 | +#define MAX_HANDSHAKE_HISTORY_ENTRY (1 << MAX_HANDSHAKE_HISTORY_ENTRY_BIT) | ||
215 | +#define MAX_HANDSHAKE_HISTORY_ENTRY_IDX_MASK \ | ||
216 | + ((1 << MAX_HANDSHAKE_HISTORY_ENTRY_BIT) - 1) | ||
217 | + | ||
218 | typedef struct ctx_data_st { | ||
219 | unsigned char *npn_protocols; | ||
220 | size_t npn_protocols_len; | ||
221 | @@ -22,6 +27,63 @@ typedef struct ctx_data_st { | ||
222 | char *session_ticket_app_data; | ||
223 | } CTX_DATA; | ||
224 | |||
225 | +typedef enum { | ||
226 | + HANDSHAKE, | ||
227 | + RENEG_APPLICATION_DATA, | ||
228 | + RENEG_SETUP, | ||
229 | + RENEG_HANDSHAKE, | ||
230 | + APPLICATION_DATA, | ||
231 | + SHUTDOWN, | ||
232 | + CONNECTION_DONE | ||
233 | +} connect_phase_t; | ||
234 | + | ||
235 | +/* The status for each connection phase. */ | ||
236 | +typedef enum { | ||
237 | + PEER_SUCCESS, | ||
238 | + PEER_RETRY, | ||
239 | + PEER_ERROR, | ||
240 | + PEER_WAITING, | ||
241 | + PEER_TEST_FAILURE | ||
242 | +} peer_status_t; | ||
243 | + | ||
244 | +typedef enum { | ||
245 | + /* Both parties succeeded. */ | ||
246 | + HANDSHAKE_SUCCESS, | ||
247 | + /* Client errored. */ | ||
248 | + CLIENT_ERROR, | ||
249 | + /* Server errored. */ | ||
250 | + SERVER_ERROR, | ||
251 | + /* Peers are in inconsistent state. */ | ||
252 | + INTERNAL_ERROR, | ||
253 | + /* One or both peers not done. */ | ||
254 | + HANDSHAKE_RETRY | ||
255 | +} handshake_status_t; | ||
256 | + | ||
257 | +/* Stores the various status information in a handshake loop. */ | ||
258 | +typedef struct handshake_history_entry_st { | ||
259 | + connect_phase_t phase; | ||
260 | + handshake_status_t handshake_status; | ||
261 | + peer_status_t server_status; | ||
262 | + peer_status_t client_status; | ||
263 | + int client_turn_count; | ||
264 | + int is_client_turn; | ||
265 | +} HANDSHAKE_HISTORY_ENTRY; | ||
266 | + | ||
267 | +typedef struct handshake_history_st { | ||
268 | + /* Implemented using ring buffer. */ | ||
269 | + /* | ||
270 | + * The valid entries are |entries[last_idx]|, |entries[last_idx-1]|, | ||
271 | + * ..., etc., going up to |entry_count| number of entries. Note that when | ||
272 | + * the index into the array |entries| becomes < 0, we wrap around to | ||
273 | + * the end of |entries|. | ||
274 | + */ | ||
275 | + HANDSHAKE_HISTORY_ENTRY entries[MAX_HANDSHAKE_HISTORY_ENTRY]; | ||
276 | + /* The number of valid entries in |entries| array. */ | ||
277 | + size_t entry_count; | ||
278 | + /* The index of the last valid entry in the |entries| array. */ | ||
279 | + size_t last_idx; | ||
280 | +} HANDSHAKE_HISTORY; | ||
281 | + | ||
282 | typedef struct handshake_result { | ||
283 | ssl_test_result_t result; | ||
284 | /* These alerts are in the 2-byte format returned by the info_callback. */ | ||
285 | @@ -77,6 +139,8 @@ typedef struct handshake_result { | ||
286 | char *cipher; | ||
287 | /* session ticket application data */ | ||
288 | char *result_session_ticket_app_data; | ||
289 | + /* handshake loop history */ | ||
290 | + HANDSHAKE_HISTORY history; | ||
291 | } HANDSHAKE_RESULT; | ||
292 | |||
293 | HANDSHAKE_RESULT *HANDSHAKE_RESULT_new(void); | ||
294 | @@ -95,4 +159,8 @@ int configure_handshake_ctx_for_srp(SSL_CTX *server_ctx, SSL_CTX *server2_ctx, | ||
295 | CTX_DATA *server2_ctx_data, | ||
296 | CTX_DATA *client_ctx_data); | ||
297 | |||
298 | +const char *handshake_connect_phase_name(connect_phase_t phase); | ||
299 | +const char *handshake_status_name(handshake_status_t handshake_status); | ||
300 | +const char *handshake_peer_status_name(peer_status_t peer_status); | ||
301 | + | ||
302 | #endif /* OSSL_TEST_HANDSHAKE_HELPER_H */ | ||
303 | diff --git a/test/ssl_test.c b/test/ssl_test.c | ||
304 | index ea60851..9d6b093 100644 | ||
305 | --- a/test/ssl_test.c | ||
306 | +++ b/test/ssl_test.c | ||
307 | @@ -26,6 +26,44 @@ static OSSL_LIB_CTX *libctx = NULL; | ||
308 | /* Currently the section names are of the form test-<number>, e.g. test-15. */ | ||
309 | #define MAX_TESTCASE_NAME_LENGTH 100 | ||
310 | |||
311 | +static void print_handshake_history(const HANDSHAKE_HISTORY *history) | ||
312 | +{ | ||
313 | + size_t first_idx; | ||
314 | + size_t i; | ||
315 | + size_t cur_idx; | ||
316 | + const HANDSHAKE_HISTORY_ENTRY *cur_entry; | ||
317 | + const char header_template[] = "|%14s|%16s|%16s|%16s|%17s|%14s|"; | ||
318 | + const char body_template[] = "|%14s|%16s|%16s|%16s|%17d|%14s|"; | ||
319 | + | ||
320 | + TEST_info("The following is the server/client state " | ||
321 | + "in the most recent %d handshake loops.", | ||
322 | + MAX_HANDSHAKE_HISTORY_ENTRY); | ||
323 | + | ||
324 | + TEST_note("==================================================" | ||
325 | + "=================================================="); | ||
326 | + TEST_note(header_template, | ||
327 | + "phase", "handshake status", "server status", | ||
328 | + "client status", "client turn count", "is client turn"); | ||
329 | + TEST_note("+--------------+----------------+----------------" | ||
330 | + "+----------------+-----------------+--------------+"); | ||
331 | + | ||
332 | + first_idx = (history->last_idx - history->entry_count + 1) & | ||
333 | + MAX_HANDSHAKE_HISTORY_ENTRY_IDX_MASK; | ||
334 | + for (i = 0; i < history->entry_count; ++i) { | ||
335 | + cur_idx = (first_idx + i) & MAX_HANDSHAKE_HISTORY_ENTRY_IDX_MASK; | ||
336 | + cur_entry = &(history->entries)[cur_idx]; | ||
337 | + TEST_note(body_template, | ||
338 | + handshake_connect_phase_name(cur_entry->phase), | ||
339 | + handshake_status_name(cur_entry->handshake_status), | ||
340 | + handshake_peer_status_name(cur_entry->server_status), | ||
341 | + handshake_peer_status_name(cur_entry->client_status), | ||
342 | + cur_entry->client_turn_count, | ||
343 | + cur_entry->is_client_turn ? "true" : "false"); | ||
344 | + } | ||
345 | + TEST_note("==================================================" | ||
346 | + "=================================================="); | ||
347 | +} | ||
348 | + | ||
349 | static const char *print_alert(int alert) | ||
350 | { | ||
351 | return alert ? SSL_alert_desc_string_long(alert) : "no alert"; | ||
352 | @@ -388,6 +426,12 @@ static int check_test(HANDSHAKE_RESULT *result, SSL_TEST_CTX *test_ctx) | ||
353 | ret &= check_client_sign_type(result, test_ctx); | ||
354 | ret &= check_client_ca_names(result, test_ctx); | ||
355 | } | ||
356 | + | ||
357 | + /* Print handshake loop history if any check fails. */ | ||
358 | + if (!ret) { | ||
359 | + print_handshake_history(&(result->history)); | ||
360 | + } | ||
361 | + | ||
362 | return ret; | ||
363 | } | ||
364 | |||
365 | -- | ||
366 | 2.25.1 | ||
367 | |||
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch b/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch index 5effa6c6f6..7043188973 100644 --- a/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch +++ b/meta/recipes-connectivity/openssl/openssl/0001-Configure-do-not-tweak-mips-cflags.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From 326909baf81a638d51fa8be1d8227518784f5cc4 Mon Sep 17 00:00:00 2001 | 1 | From 0377f0d5b5c1079e3b9a80881f4dcc891cbe9f9a Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex@linutronix.de> | 2 | From: Alexander Kanavin <alex@linutronix.de> |
3 | Date: Tue, 14 Sep 2021 12:18:25 +0200 | 3 | Date: Tue, 30 May 2023 09:11:27 -0700 |
4 | Subject: [PATCH] Configure: do not tweak mips cflags | 4 | Subject: [PATCH] Configure: do not tweak mips cflags |
5 | 5 | ||
6 | This conflicts with mips machine definitons from yocto, | 6 | This conflicts with mips machine definitons from yocto, |
@@ -9,20 +9,23 @@ e.g. | |||
9 | 9 | ||
10 | Upstream-Status: Inappropriate [oe-core specific] | 10 | Upstream-Status: Inappropriate [oe-core specific] |
11 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | 11 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> |
12 | |||
13 | Refreshed for openssl-3.1.1 | ||
14 | Signed-off-by: Tim Orling <tim.orling@konsulko.com> | ||
12 | --- | 15 | --- |
13 | Configure | 10 ---------- | 16 | Configure | 10 ---------- |
14 | 1 file changed, 10 deletions(-) | 17 | 1 file changed, 10 deletions(-) |
15 | 18 | ||
16 | diff --git a/Configure b/Configure | 19 | diff --git a/Configure b/Configure |
17 | index 821e680..0387a74 100755 | 20 | index fff97bd..5ee54c1 100755 |
18 | --- a/Configure | 21 | --- a/Configure |
19 | +++ b/Configure | 22 | +++ b/Configure |
20 | @@ -1422,16 +1422,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m) | 23 | @@ -1551,16 +1551,6 @@ if ($target =~ /^mingw/ && `$config{CC} --target-help 2>&1` =~ m/-mno-cygwin/m) |
21 | push @{$config{shared_ldflag}}, "-mno-cygwin"; | 24 | push @{$config{shared_ldflag}}, "-mno-cygwin"; |
22 | } | 25 | } |
23 | 26 | ||
24 | -if ($target =~ /linux.*-mips/ && !$disabled{asm} | 27 | -if ($target =~ /linux.*-mips/ && !$disabled{asm} |
25 | - && !grep { $_ !~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { | 28 | - && !grep { $_ =~ /-m(ips|arch=)/ } (@{$config{CFLAGS}})) { |
26 | - # minimally required architecture flags for assembly modules | 29 | - # minimally required architecture flags for assembly modules |
27 | - my $value; | 30 | - my $value; |
28 | - $value = '-mips2' if ($target =~ /mips32/); | 31 | - $value = '-mips2' if ($target =~ /mips32/); |
diff --git a/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch b/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch index 60890c666d..687d682976 100644 --- a/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch +++ b/meta/recipes-connectivity/openssl/openssl/0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch | |||
@@ -30,23 +30,26 @@ Update to fix buildpaths qa issue for '-ffile-prefix-map'. | |||
30 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 30 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
31 | 31 | ||
32 | --- | 32 | --- |
33 | Configurations/unix-Makefile.tmpl | 12 +++++++++++- | 33 | Configurations/unix-Makefile.tmpl | 16 +++++++++++++++- |
34 | crypto/build.info | 2 +- | 34 | crypto/build.info | 2 +- |
35 | 2 files changed, 12 insertions(+), 2 deletions(-) | 35 | 2 files changed, 16 insertions(+), 2 deletions(-) |
36 | 36 | ||
37 | diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl | 37 | diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl |
38 | index f88a70f..528cdef 100644 | 38 | index 09303c4..011bda1 100644 |
39 | --- a/Configurations/unix-Makefile.tmpl | 39 | --- a/Configurations/unix-Makefile.tmpl |
40 | +++ b/Configurations/unix-Makefile.tmpl | 40 | +++ b/Configurations/unix-Makefile.tmpl |
41 | @@ -471,13 +471,23 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (), | 41 | @@ -502,13 +502,27 @@ BIN_LDFLAGS={- join(' ', $target{bin_lflags} || (), |
42 | '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} | 42 | '$(CNF_LDFLAGS)', '$(LDFLAGS)') -} |
43 | BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) | 43 | BIN_EX_LIBS=$(CNF_EX_LIBS) $(EX_LIBS) |
44 | 44 | ||
45 | -# CPPFLAGS_Q is used for one thing only: to build up buildinf.h | 45 | -# CPPFLAGS_Q is used for one thing only: to build up buildinf.h |
46 | +# *_Q variables are used for one thing only: to build up buildinf.h | 46 | +# *_Q variables are used for one thing only: to build up buildinf.h |
47 | CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; | 47 | CPPFLAGS_Q={- $cppflags1 =~ s|([\\"])|\\$1|g; |
48 | + $cppflags1 =~ s|-isystem/[^ ]+/usr/include||g; | ||
48 | $cppflags2 =~ s|([\\"])|\\$1|g; | 49 | $cppflags2 =~ s|([\\"])|\\$1|g; |
50 | + $cppflags2 =~ s|-isystem/[^ ]+/usr/include||g; | ||
49 | $lib_cppflags =~ s|([\\"])|\\$1|g; | 51 | $lib_cppflags =~ s|([\\"])|\\$1|g; |
52 | + $lib_cppflags =~ s|-isystem/[^ ]+/usr/include||g; | ||
50 | join(' ', $lib_cppflags || (), $cppflags2 || (), | 53 | join(' ', $lib_cppflags || (), $cppflags2 || (), |
51 | $cppflags1 || ()) -} | 54 | $cppflags1 || ()) -} |
52 | 55 | ||
@@ -54,6 +57,7 @@ index f88a70f..528cdef 100644 | |||
54 | + s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g; | 57 | + s|-fdebug-prefix-map=[^ ]+|-fdebug-prefix-map=|g; |
55 | + s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g; | 58 | + s|-fmacro-prefix-map=[^ ]+|-fmacro-prefix-map=|g; |
56 | + s|-ffile-prefix-map=[^ ]+|-ffile-prefix-map=|g; | 59 | + s|-ffile-prefix-map=[^ ]+|-ffile-prefix-map=|g; |
60 | + s|-isystem/[^ ]+/usr/include ||g; | ||
57 | + } | 61 | + } |
58 | + join(' ', @{$config{CFLAGS}}) -} | 62 | + join(' ', @{$config{CFLAGS}}) -} |
59 | + | 63 | + |
@@ -64,15 +68,15 @@ index f88a70f..528cdef 100644 | |||
64 | 68 | ||
65 | # For x86 assembler: Set PROCESSOR to 386 if you want to support | 69 | # For x86 assembler: Set PROCESSOR to 386 if you want to support |
66 | diff --git a/crypto/build.info b/crypto/build.info | 70 | diff --git a/crypto/build.info b/crypto/build.info |
67 | index efca6cc..eda433e 100644 | 71 | index aee5c46..95c9577 100644 |
68 | --- a/crypto/build.info | 72 | --- a/crypto/build.info |
69 | +++ b/crypto/build.info | 73 | +++ b/crypto/build.info |
70 | @@ -109,7 +109,7 @@ DEFINE[../libcrypto]=$UPLINKDEF | 74 | @@ -115,7 +115,7 @@ DEFINE[../libcrypto]=$UPLINKDEF |
71 | 75 | ||
72 | DEPEND[info.o]=buildinf.h | 76 | DEPEND[info.o]=buildinf.h |
73 | DEPEND[cversion.o]=buildinf.h | 77 | DEPEND[cversion.o]=buildinf.h |
74 | -GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" | 78 | -GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC) $(LIB_CFLAGS) $(CPPFLAGS_Q)" "$(PLATFORM)" |
75 | +GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)" | 79 | +GENERATE[buildinf.h]=../util/mkbuildinf.pl "$(CC_Q) $(CFLAGS_Q) $(CPPFLAGS_Q)" "$(PLATFORM)" |
76 | 80 | ||
77 | GENERATE[uplink-x86.s]=../ms/uplink-x86.pl | 81 | GENERATE[uplink-x86.S]=../ms/uplink-x86.pl |
78 | GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl | 82 | GENERATE[uplink-x86_64.s]=../ms/uplink-x86_64.pl |
diff --git a/meta/recipes-connectivity/openssl/openssl/afalg.patch b/meta/recipes-connectivity/openssl/openssl/afalg.patch deleted file mode 100644 index b7c0e9697f..0000000000 --- a/meta/recipes-connectivity/openssl/openssl/afalg.patch +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | Don't refuse to build afalgeng if cross-compiling or the host kernel is too old. | ||
2 | |||
3 | Upstream-Status: Submitted [hhttps://github.com/openssl/openssl/pull/7688] | ||
4 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
5 | |||
6 | diff --git a/Configure b/Configure | ||
7 | index 3baa8ce..9ef52ed 100755 | ||
8 | --- a/Configure | ||
9 | +++ b/Configure | ||
10 | @@ -1550,20 +1550,7 @@ unless ($disabled{"crypto-mdebug-backtrace"}) | ||
11 | unless ($disabled{afalgeng}) { | ||
12 | $config{afalgeng}=""; | ||
13 | if (grep { $_ eq 'afalgeng' } @{$target{enable}}) { | ||
14 | - my $minver = 4*10000 + 1*100 + 0; | ||
15 | - if ($config{CROSS_COMPILE} eq "") { | ||
16 | - my $verstr = `uname -r`; | ||
17 | - my ($ma, $mi1, $mi2) = split("\\.", $verstr); | ||
18 | - ($mi2) = $mi2 =~ /(\d+)/; | ||
19 | - my $ver = $ma*10000 + $mi1*100 + $mi2; | ||
20 | - if ($ver < $minver) { | ||
21 | - disable('too-old-kernel', 'afalgeng'); | ||
22 | - } else { | ||
23 | - push @{$config{engdirs}}, "afalg"; | ||
24 | - } | ||
25 | - } else { | ||
26 | - disable('cross-compiling', 'afalgeng'); | ||
27 | - } | ||
28 | + push @{$config{engdirs}}, "afalg"; | ||
29 | } else { | ||
30 | disable('not-linux', 'afalgeng'); | ||
31 | } | ||
diff --git a/meta/recipes-connectivity/openssl/openssl/run-ptest b/meta/recipes-connectivity/openssl/openssl/run-ptest index 8dff79101f..cd29bb1446 100644 --- a/meta/recipes-connectivity/openssl/openssl/run-ptest +++ b/meta/recipes-connectivity/openssl/openssl/run-ptest | |||
@@ -1,12 +1,19 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | 2 | ||
3 | set -e | 3 | set -eu |
4 | 4 | ||
5 | # Optional arguments are 'list' to lists all tests, or the test name (base name | 5 | # Optional arguments are 'list' to lists the tests, or the test name (base name |
6 | # ie test_evp, not 03_test_evp.t). | 6 | # ie test_evp, not 03_test_evp.t). Without any arguments we run all tests. |
7 | |||
8 | if test $# -gt 0; then | ||
9 | TESTS=$* | ||
10 | else | ||
11 | # Skip test_symbol_presence as this is for developers | ||
12 | TESTS="alltests -test_symbol_presence" | ||
13 | fi | ||
7 | 14 | ||
8 | export TOP=. | 15 | export TOP=. |
9 | # OPENSSL_ENGINES is relative from the test binaries | 16 | # Run four jobs in parallel |
10 | export OPENSSL_ENGINES=../engines | 17 | export HARNESS_JOBS=4 |
11 | 18 | ||
12 | perl ./test/run_tests.pl $* | sed -u -r -e '/(.*) \.*.ok/ s/^/PASS: /g' -r -e '/Dubious(.*)/ s/^/FAIL: /g' -e '/(.*) \.*.skipped: (.*)/ s/^/SKIP: /g' | 19 | { perl ./test/run_tests.pl $TESTS || echo "FAIL: openssl" ; } | sed -u -r -e '/(.*) \.*.ok/ s/^/PASS: /g' -r -e '/Dubious(.*)/ s/^/FAIL: /g' -e '/(.*) \.*.skipped: (.*)/ s/^/SKIP: /g' |
diff --git a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb b/meta/recipes-connectivity/openssl/openssl_3.5.0.bb index 67343bedcc..0f5c28dafa 100644 --- a/meta/recipes-connectivity/openssl/openssl_3.0.0.bb +++ b/meta/recipes-connectivity/openssl/openssl_3.5.0.bb | |||
@@ -10,17 +10,17 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=c75985e733726beaba57bc5253e96d04" | |||
10 | SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ | 10 | SRC_URI = "http://www.openssl.org/source/openssl-${PV}.tar.gz \ |
11 | file://run-ptest \ | 11 | file://run-ptest \ |
12 | file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ | 12 | file://0001-buildinfo-strip-sysroot-and-debug-prefix-map-from-co.patch \ |
13 | file://afalg.patch \ | ||
14 | file://0001-Configure-do-not-tweak-mips-cflags.patch \ | 13 | file://0001-Configure-do-not-tweak-mips-cflags.patch \ |
14 | file://0001-Added-handshake-history-reporting-when-test-fails.patch \ | ||
15 | " | 15 | " |
16 | 16 | ||
17 | SRC_URI:append:class-nativesdk = " \ | 17 | SRC_URI:append:class-nativesdk = " \ |
18 | file://environment.d-openssl.sh \ | 18 | file://environment.d-openssl.sh \ |
19 | " | 19 | " |
20 | 20 | ||
21 | SRC_URI[sha256sum] = "59eedfcb46c25214c9bd37ed6078297b4df01d012267fe9e9eee31f61bc70536" | 21 | SRC_URI[sha256sum] = "344d0a79f1a9b08029b0744e2cc401a43f9c90acd1044d09a530b4885a8e9fc0" |
22 | 22 | ||
23 | inherit lib_package multilib_header multilib_script ptest perlnative | 23 | inherit lib_package multilib_header multilib_script ptest perlnative manpages |
24 | MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" | 24 | MULTILIB_SCRIPTS = "${PN}-bin:${bindir}/c_rehash" |
25 | 25 | ||
26 | PACKAGECONFIG ?= "" | 26 | PACKAGECONFIG ?= "" |
@@ -30,10 +30,14 @@ PACKAGECONFIG:class-nativesdk = "" | |||
30 | PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" | 30 | PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,cryptodev-linux,,cryptodev-module" |
31 | PACKAGECONFIG[no-tls1] = "no-tls1" | 31 | PACKAGECONFIG[no-tls1] = "no-tls1" |
32 | PACKAGECONFIG[no-tls1_1] = "no-tls1_1" | 32 | PACKAGECONFIG[no-tls1_1] = "no-tls1_1" |
33 | PACKAGECONFIG[manpages] = "" | ||
34 | PACKAGECONFIG[fips] = "enable-fips" | ||
33 | 35 | ||
34 | B = "${WORKDIR}/build" | 36 | B = "${WORKDIR}/build" |
35 | do_configure[cleandirs] = "${B}" | 37 | do_configure[cleandirs] = "${B}" |
36 | 38 | ||
39 | EXTRA_OECONF = "${@bb.utils.contains('PTEST_ENABLED', '1', '', 'no-tests', d)}" | ||
40 | |||
37 | #| ./libcrypto.so: undefined reference to `getcontext' | 41 | #| ./libcrypto.so: undefined reference to `getcontext' |
38 | #| ./libcrypto.so: undefined reference to `setcontext' | 42 | #| ./libcrypto.so: undefined reference to `setcontext' |
39 | #| ./libcrypto.so: undefined reference to `makecontext' | 43 | #| ./libcrypto.so: undefined reference to `makecontext' |
@@ -42,18 +46,30 @@ EXTRA_OECONF:append:libc-musl:powerpc64 = " no-asm" | |||
42 | 46 | ||
43 | # adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions | 47 | # adding devrandom prevents openssl from using getrandom() which is not available on older glibc versions |
44 | # (native versions can be built with newer glibc, but then relocated onto a system with older glibc) | 48 | # (native versions can be built with newer glibc, but then relocated onto a system with older glibc) |
45 | EXTRA_OECONF:class-native = "--with-rand-seed=os,devrandom" | 49 | EXTRA_OECONF:append:class-native = " --with-rand-seed=os,devrandom" |
46 | EXTRA_OECONF:class-nativesdk = "--with-rand-seed=os,devrandom" | 50 | EXTRA_OECONF:append:class-nativesdk = " --with-rand-seed=os,devrandom" |
47 | 51 | ||
48 | # Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. | 52 | # Relying on hardcoded built-in paths causes openssl-native to not be relocateable from sstate. |
49 | CFLAGS:append:class-native = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | 53 | EXTRA_OEMAKE:append:task-compile:class-native = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' |
50 | CFLAGS:append:class-nativesdk = " -DOPENSSLDIR=/not/builtin -DENGINESDIR=/not/builtin" | 54 | EXTRA_OEMAKE:append:task-compile:class-nativesdk = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' |
55 | |||
56 | #| threads_pthread.c:(.text+0x372): undefined reference to `__atomic_is_lock_free' | ||
57 | EXTRA_OECONF:append:toolchain-clang:x86 = " -latomic" | ||
51 | 58 | ||
52 | # This allows disabling deprecated or undesirable crypto algorithms. | 59 | # This allows disabling deprecated or undesirable crypto algorithms. |
53 | # The default is to trust upstream choices. | 60 | # The default is to trust upstream choices. |
54 | DEPRECATED_CRYPTO_FLAGS ?= "" | 61 | DEPRECATED_CRYPTO_FLAGS ?= "" |
55 | 62 | ||
56 | do_configure () { | 63 | do_configure () { |
64 | # When we upgrade glibc but not uninative we see obtuse failures in openssl. Make | ||
65 | # the issue really clear that perl isn't functional due to symbol mismatch issues. | ||
66 | cat <<- EOF > ${WORKDIR}/perltest | ||
67 | #!/usr/bin/env perl | ||
68 | use POSIX; | ||
69 | EOF | ||
70 | chmod a+x ${WORKDIR}/perltest | ||
71 | ${WORKDIR}/perltest | ||
72 | |||
57 | os=${HOST_OS} | 73 | os=${HOST_OS} |
58 | case $os in | 74 | case $os in |
59 | linux-gnueabi |\ | 75 | linux-gnueabi |\ |
@@ -68,6 +84,9 @@ do_configure () { | |||
68 | esac | 84 | esac |
69 | target="$os-${HOST_ARCH}" | 85 | target="$os-${HOST_ARCH}" |
70 | case $target in | 86 | case $target in |
87 | linux-arc | linux-microblaze*) | ||
88 | target=linux-latomic | ||
89 | ;; | ||
71 | linux-arm*) | 90 | linux-arm*) |
72 | target=linux-armv4 | 91 | target=linux-armv4 |
73 | ;; | 92 | ;; |
@@ -83,6 +102,9 @@ do_configure () { | |||
83 | linux-gnu64-x86_64) | 102 | linux-gnu64-x86_64) |
84 | target=linux-x86_64 | 103 | target=linux-x86_64 |
85 | ;; | 104 | ;; |
105 | linux-loongarch64) | ||
106 | target=linux64-loongarch64 | ||
107 | ;; | ||
86 | linux-mips | linux-mipsel) | 108 | linux-mips | linux-mipsel) |
87 | # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags | 109 | # specifying TARGET_CC_ARCH prevents openssl from (incorrectly) adding target architecture flags |
88 | target="linux-mips32 ${TARGET_CC_ARCH}" | 110 | target="linux-mips32 ${TARGET_CC_ARCH}" |
@@ -93,7 +115,7 @@ do_configure () { | |||
93 | linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) | 115 | linux-*-mips64 | linux-mips64 | linux-*-mips64el | linux-mips64el) |
94 | target=linux64-mips64 | 116 | target=linux64-mips64 |
95 | ;; | 117 | ;; |
96 | linux-microblaze* | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) | 118 | linux-nios2* | linux-sh3 | linux-sh4 | linux-arc*) |
97 | target=linux-generic32 | 119 | target=linux-generic32 |
98 | ;; | 120 | ;; |
99 | linux-powerpc) | 121 | linux-powerpc) |
@@ -106,10 +128,10 @@ do_configure () { | |||
106 | target=linux-ppc64le | 128 | target=linux-ppc64le |
107 | ;; | 129 | ;; |
108 | linux-riscv32) | 130 | linux-riscv32) |
109 | target=linux-generic32 | 131 | target=linux32-riscv32 |
110 | ;; | 132 | ;; |
111 | linux-riscv64) | 133 | linux-riscv64) |
112 | target=linux-generic64 | 134 | target=linux64-riscv64 |
113 | ;; | 135 | ;; |
114 | linux-sparc | linux-supersparc) | 136 | linux-sparc | linux-supersparc) |
115 | target=linux-sparcv9 | 137 | target=linux-sparcv9 |
@@ -119,19 +141,26 @@ do_configure () { | |||
119 | ;; | 141 | ;; |
120 | esac | 142 | esac |
121 | 143 | ||
122 | useprefix=${prefix} | ||
123 | if [ "x$useprefix" = "x" ]; then | ||
124 | useprefix=/ | ||
125 | fi | ||
126 | # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the | 144 | # WARNING: do not set compiler/linker flags (-I/-D etc.) in EXTRA_OECONF, as they will fully replace the |
127 | # environment variables set by bitbake. Adjust the environment variables instead. | 145 | # environment variables set by bitbake. Adjust the environment variables instead. |
128 | HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="${S}/external/perl/Text-Template-1.46/lib/" \ | 146 | PERLEXTERNAL="$(realpath ${S}/external/perl/Text-Template-*/lib)" |
129 | perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=$useprefix --openssldir=${libdir}/ssl-3 --libdir=${libdir} $target | 147 | test -d "$PERLEXTERNAL" || bberror "PERLEXTERNAL '$PERLEXTERNAL' not found!" |
148 | HASHBANGPERL="/usr/bin/env perl" PERL=perl PERL5LIB="$PERLEXTERNAL" \ | ||
149 | perl ${S}/Configure ${EXTRA_OECONF} ${PACKAGECONFIG_CONFARGS} ${DEPRECATED_CRYPTO_FLAGS} --prefix=${prefix} --openssldir=${libdir}/ssl-3 --libdir=${baselib} $target | ||
130 | perl ${B}/configdata.pm --dump | 150 | perl ${B}/configdata.pm --dump |
131 | } | 151 | } |
132 | 152 | ||
153 | do_compile:append () { | ||
154 | # The test suite binaries are large and we don't need the debugging in them | ||
155 | if test -d ${B}/test; then | ||
156 | find ${B}/test -type f -executable -exec ${STRIP} {} \; | ||
157 | fi | ||
158 | } | ||
159 | |||
133 | do_install () { | 160 | do_install () { |
134 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install | 161 | oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install_sw install_ssldirs \ |
162 | ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'install_docs', '', d)} \ | ||
163 | ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'install_fips', '', d)} | ||
135 | 164 | ||
136 | oe_multilib_header openssl/opensslconf.h | 165 | oe_multilib_header openssl/opensslconf.h |
137 | oe_multilib_header openssl/configuration.h | 166 | oe_multilib_header openssl/configuration.h |
@@ -149,61 +178,72 @@ do_install () { | |||
149 | ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-3/certs | 178 | ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-3/certs |
150 | ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-3/private | 179 | ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-3/private |
151 | ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-3/openssl.cnf | 180 | ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-3/openssl.cnf |
181 | |||
182 | # Generate fipsmodule.cnf in pkg_postinst_ontarget | ||
183 | if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then | ||
184 | rm -f ${D}${libdir}/ssl-3/fipsmodule.cnf | ||
185 | fi | ||
152 | } | 186 | } |
153 | 187 | ||
154 | do_install:append:class-native () { | 188 | do_install:append:class-native () { |
155 | create_wrapper ${D}${bindir}/openssl \ | 189 | create_wrapper ${D}${bindir}/openssl \ |
156 | OPENSSL_CONF=${libdir}/ssl-3/openssl.cnf \ | 190 | OPENSSL_CONF=\${OPENSSL_CONF:-${libdir}/ssl-3/openssl.cnf} \ |
157 | SSL_CERT_DIR=${libdir}/ssl-3/certs \ | 191 | SSL_CERT_DIR=\${SSL_CERT_DIR:-${libdir}/ssl-3/certs} \ |
158 | SSL_CERT_FILE=${libdir}/ssl-3/cert.pem \ | 192 | SSL_CERT_FILE=\${SSL_CERT_FILE:-${libdir}/ssl-3/cert.pem} \ |
159 | OPENSSL_ENGINES=${libdir}/engines-3 | 193 | OPENSSL_ENGINES=\${OPENSSL_ENGINES:-${libdir}/engines-3} \ |
194 | OPENSSL_MODULES=\${OPENSSL_MODULES:-${libdir}/ossl-modules} | ||
160 | } | 195 | } |
161 | 196 | ||
162 | do_install:append:class-nativesdk () { | 197 | do_install:append:class-nativesdk () { |
163 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d | 198 | mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d |
164 | install -m 644 ${WORKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | 199 | install -m 644 ${UNPACKDIR}/environment.d-openssl.sh ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh |
165 | sed 's|/usr/lib/ssl/|/usr/lib/ssl-3/|g' -i ${D}${SDKPATHNATIVE}/environment-setup.d/openssl.sh | ||
166 | } | 200 | } |
167 | 201 | ||
168 | PTEST_BUILD_HOST_FILES += "configdata.pm" | 202 | PTEST_BUILD_HOST_FILES += "configdata.pm" |
169 | PTEST_BUILD_HOST_PATTERN = "perl_version =" | 203 | PTEST_BUILD_HOST_PATTERN = "perl_version =" |
170 | do_install_ptest () { | 204 | do_install_ptest() { |
171 | install -d ${D}${PTEST_PATH}/test | 205 | install -m644 ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} |
172 | install -m755 ${B}/test/p_test.so ${D}${PTEST_PATH}/test | 206 | cp -rf ${S}/Configurations ${S}/external ${D}${PTEST_PATH}/ |
173 | install -m755 ${B}/test/provider_internal_test.cnf ${D}${PTEST_PATH}/test | ||
174 | |||
175 | # Prune the build tree | ||
176 | rm -f ${B}/fuzz/*.* ${B}/test/*.* | ||
177 | |||
178 | cp ${S}/Configure ${B}/configdata.pm ${D}${PTEST_PATH} | ||
179 | sed 's|${S}|${PTEST_PATH}|g' -i ${D}${PTEST_PATH}/configdata.pm | ||
180 | cp -r ${S}/external ${B}/test ${S}/test ${B}/fuzz ${S}/util ${B}/util ${D}${PTEST_PATH} | ||
181 | |||
182 | # For test_shlibload | ||
183 | ln -s ${libdir}/libcrypto.so.1.1 ${D}${PTEST_PATH}/ | ||
184 | ln -s ${libdir}/libssl.so.1.1 ${D}${PTEST_PATH}/ | ||
185 | 207 | ||
186 | install -d ${D}${PTEST_PATH}/apps | 208 | install -d ${D}${PTEST_PATH}/apps |
187 | ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps | 209 | ln -s ${bindir}/openssl ${D}${PTEST_PATH}/apps |
188 | install -m644 ${S}/apps/*.pem ${S}/apps/*.srl ${S}/apps/openssl.cnf ${D}${PTEST_PATH}/apps | ||
189 | install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps | ||
190 | |||
191 | install -d ${D}${PTEST_PATH}/engines | ||
192 | install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines | ||
193 | install -m755 ${B}/engines/loader_attic.so ${D}${PTEST_PATH}/engines | ||
194 | |||
195 | install -d ${D}${PTEST_PATH}/providers | ||
196 | install -m755 ${B}/providers/legacy.so ${D}${PTEST_PATH}/providers | ||
197 | |||
198 | install -d ${D}${PTEST_PATH}/Configurations | ||
199 | cp -rf ${S}/Configurations/* ${D}${PTEST_PATH}/Configurations/ | ||
200 | 210 | ||
201 | # seems to be needed with perl 5.32.1 | 211 | cd ${S} |
202 | install -d ${D}${PTEST_PATH}/util/perl/recipes | 212 | find test/certs test/ct test/d2i-tests test/recipes test/ocsp-tests test/ssl-tests test/smime-certs -type f -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; |
203 | cp ${D}${PTEST_PATH}/test/recipes/tconversion.pl ${D}${PTEST_PATH}/util/perl/recipes/ | 213 | find apps test -name \*.cnf -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; |
214 | find apps test -name \*.der -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; | ||
215 | find apps test -name \*.pem -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; | ||
216 | find util -name \*.p[lm] -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; | ||
217 | |||
218 | cd ${B} | ||
219 | # Everything but .? (.o and .d) | ||
220 | find test -type f -name \*[^.]? -exec install -m755 -D {} ${D}${PTEST_PATH}/{} \; | ||
221 | find apps test -name \*.cnf -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; | ||
222 | find apps test -name \*.pem -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; | ||
223 | find apps test -name \*.srl -exec install -m644 -D {} ${D}${PTEST_PATH}/{} \; | ||
224 | install -m755 ${B}/util/*wrap.* ${D}${PTEST_PATH}/util/ | ||
225 | |||
226 | install -m755 ${B}/apps/CA.pl ${D}${PTEST_PATH}/apps/ | ||
227 | install -m755 ${S}/test/*.pl ${D}${PTEST_PATH}/test/ | ||
228 | install -m755 ${S}/test/shibboleth.pfx ${D}${PTEST_PATH}/test/ | ||
229 | install -m755 ${S}/test/*.bin ${D}${PTEST_PATH}/test/ | ||
230 | install -m755 ${S}/test/dane*.in ${D}${PTEST_PATH}/test/ | ||
231 | install -m755 ${S}/test/smcont*.txt ${D}${PTEST_PATH}/test/ | ||
232 | install -m755 ${S}/test/ssl_test.tmpl ${D}${PTEST_PATH}/test/ | ||
233 | |||
234 | sed 's|${S}|${PTEST_PATH}|g' -i ${D}${PTEST_PATH}/configdata.pm ${D}${PTEST_PATH}/util/wrap.pl | ||
204 | 235 | ||
205 | sed 's|${S}|${PTEST_PATH}|g' -i ${D}${PTEST_PATH}/util/wrap.pl | 236 | install -d ${D}${PTEST_PATH}/engines |
237 | install -m755 ${B}/engines/dasync.so ${D}${PTEST_PATH}/engines/ | ||
238 | install -m755 ${B}/engines/ossltest.so ${D}${PTEST_PATH}/engines/ | ||
239 | ln -s ${libdir}/engines-3/loader_attic.so ${D}${PTEST_PATH}/engines/ | ||
240 | ln -s ${libdir}/ossl-modules/ ${D}${PTEST_PATH}/providers | ||
241 | } | ||
206 | 242 | ||
243 | pkg_postinst_ontarget:${PN}-ossl-module-fips () { | ||
244 | if test -f ${libdir}/ossl-modules/fips.so; then | ||
245 | ${bindir}/openssl fipsinstall -out ${libdir}/ssl-3/fipsmodule.cnf -module ${libdir}/ossl-modules/fips.so | ||
246 | fi | ||
207 | } | 247 | } |
208 | 248 | ||
209 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto | 249 | # Add the openssl.cnf file to the openssl-conf package. Make the libcrypto |
@@ -211,7 +251,7 @@ do_install_ptest () { | |||
211 | # file to be installed for both the openssl-bin package and the libcrypto | 251 | # file to be installed for both the openssl-bin package and the libcrypto |
212 | # package since the openssl-bin package depends on the libcrypto package. | 252 | # package since the openssl-bin package depends on the libcrypto package. |
213 | 253 | ||
214 | PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc" | 254 | PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc ${PN}-ossl-module-legacy ${PN}-ossl-module-fips" |
215 | 255 | ||
216 | FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}" | 256 | FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}" |
217 | FILES:libssl = "${libdir}/libssl${SOLIBS}" | 257 | FILES:libssl = "${libdir}/libssl${SOLIBS}" |
@@ -222,23 +262,22 @@ FILES:${PN}-engines = "${libdir}/engines-3" | |||
222 | # ${prefix} comes from what we pass into --prefix at configure time (which is used for INSTALLTOP) | 262 | # ${prefix} comes from what we pass into --prefix at configure time (which is used for INSTALLTOP) |
223 | FILES:${PN}-engines:append:mingw32:class-nativesdk = " ${prefix}${libdir}/engines-3" | 263 | FILES:${PN}-engines:append:mingw32:class-nativesdk = " ${prefix}${libdir}/engines-3" |
224 | FILES:${PN}-misc = "${libdir}/ssl-3/misc ${bindir}/c_rehash" | 264 | FILES:${PN}-misc = "${libdir}/ssl-3/misc ${bindir}/c_rehash" |
265 | FILES:${PN}-ossl-module-legacy = "${libdir}/ossl-modules/legacy.so" | ||
266 | FILES:${PN}-ossl-module-fips = "${libdir}/ossl-modules/fips.so" | ||
225 | FILES:${PN} =+ "${libdir}/ssl-3/* ${libdir}/ossl-modules/" | 267 | FILES:${PN} =+ "${libdir}/ssl-3/* ${libdir}/ossl-modules/" |
226 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" | 268 | FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" |
227 | 269 | ||
228 | CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf" | 270 | CONFFILES:openssl-conf = "${sysconfdir}/ssl/openssl.cnf" |
229 | 271 | ||
230 | RRECOMMENDS:libcrypto += "openssl-conf" | 272 | RRECOMMENDS:libcrypto += "openssl-conf ${PN}-ossl-module-legacy" |
231 | RDEPENDS:${PN}-misc = "perl" | 273 | RDEPENDS:${PN}-misc = "perl" |
232 | RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash" | 274 | RDEPENDS:${PN}-ptest += "openssl-bin perl perl-modules bash sed openssl-engines openssl-ossl-module-legacy" |
233 | 275 | ||
234 | RDEPENDS:${PN}-bin += "openssl-conf" | 276 | RDEPENDS:${PN}-bin += "openssl-conf" |
235 | 277 | ||
278 | # The test suite is installed stripped | ||
279 | INSANE_SKIP:${PN} = "already-stripped" | ||
280 | |||
236 | BBCLASSEXTEND = "native nativesdk" | 281 | BBCLASSEXTEND = "native nativesdk" |
237 | 282 | ||
238 | CVE_PRODUCT = "openssl:openssl" | 283 | CVE_PRODUCT = "openssl:openssl" |
239 | |||
240 | CVE_VERSION_SUFFIX = "alphabetical" | ||
241 | |||
242 | # Only affects OpenSSL >= 1.1.1 in combination with Apache < 2.4.37 | ||
243 | # Apache in meta-webserver is already recent enough | ||
244 | CVE_CHECK_WHITELIST += "CVE-2019-0190" | ||
diff --git a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb index 8a6c297cb0..5c9c8219d7 100644 --- a/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb +++ b/meta/recipes-connectivity/ppp-dialin/ppp-dialin_0.1.bb | |||
@@ -3,7 +3,6 @@ SECTION = "console/network" | |||
3 | DESCRIPTION = "PPP dail-in provides a point to point protocol (PPP), so that other computers can dial up to it and access connected networks." | 3 | DESCRIPTION = "PPP dail-in provides a point to point protocol (PPP), so that other computers can dial up to it and access connected networks." |
4 | DEPENDS = "ppp" | 4 | DEPENDS = "ppp" |
5 | RDEPENDS:${PN} = "ppp" | 5 | RDEPENDS:${PN} = "ppp" |
6 | PR = "r8" | ||
7 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
8 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | 7 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
9 | 8 | ||
@@ -12,14 +11,14 @@ SRC_URI = "file://host-peer \ | |||
12 | 11 | ||
13 | inherit allarch useradd | 12 | inherit allarch useradd |
14 | 13 | ||
15 | S = "${WORKDIR}" | 14 | S = "${UNPACKDIR}" |
16 | 15 | ||
17 | do_install() { | 16 | do_install() { |
18 | install -d ${D}${sysconfdir}/ppp/peers | 17 | install -d ${D}${sysconfdir}/ppp/peers |
19 | install -m 0644 ${WORKDIR}/host-peer ${D}${sysconfdir}/ppp/peers/host | 18 | install -m 0644 ${S}/host-peer ${D}${sysconfdir}/ppp/peers/host |
20 | 19 | ||
21 | install -d ${D}${sbindir} | 20 | install -d ${D}${sbindir} |
22 | install -m 0755 ${WORKDIR}/ppp-dialin ${D}${sbindir} | 21 | install -m 0755 ${S}/ppp-dialin ${D}${sbindir} |
23 | } | 22 | } |
24 | 23 | ||
25 | USERADD_PACKAGES = "${PN}" | 24 | USERADD_PACKAGES = "${PN}" |
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppd-pppdconf.h-remove-erroneous-generated-header.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppd-pppdconf.h-remove-erroneous-generated-header.patch new file mode 100644 index 0000000000..a00706c184 --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/0001-pppd-pppdconf.h-remove-erroneous-generated-header.patch | |||
@@ -0,0 +1,98 @@ | |||
1 | From a6eb65162db5bcc5ec26cff7361885c0a44cbbfa Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Mon, 17 Mar 2025 11:12:07 +0100 | ||
4 | Subject: [PATCH] pppd/pppdconf.h: remove erroneous generated header | ||
5 | |||
6 | Upstream-Status: Inappropriate [tarball generation issue tracked at https://github.com/ppp-project/ppp/issues/541] | ||
7 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
8 | --- | ||
9 | pppd/pppdconf.h | 80 ------------------------------------------------- | ||
10 | 1 file changed, 80 deletions(-) | ||
11 | delete mode 100644 pppd/pppdconf.h | ||
12 | |||
13 | diff --git a/pppd/pppdconf.h b/pppd/pppdconf.h | ||
14 | deleted file mode 100644 | ||
15 | index 51a8f02..0000000 | ||
16 | --- a/pppd/pppdconf.h | ||
17 | +++ /dev/null | ||
18 | @@ -1,80 +0,0 @@ | ||
19 | -/* pppd/pppdconf.h. Generated from pppdconf.h.in by configure. */ | ||
20 | -/* | ||
21 | - * Copyright (c) 2022 Eivind Næss. All rights reserved. | ||
22 | - * | ||
23 | - * Redistribution and use in source and binary forms, with or without | ||
24 | - * modification, are permitted provided that the following conditions | ||
25 | - * are met: | ||
26 | - * | ||
27 | - * 1. Redistributions of source code must retain the above copyright | ||
28 | - * notice, this list of conditions and the following disclaimer. | ||
29 | - * | ||
30 | - * 2. Redistributions in binary form must reproduce the above copyright | ||
31 | - * notice, this list of conditions and the following disclaimer in | ||
32 | - * the documentation and/or other materials provided with the | ||
33 | - * distribution. | ||
34 | - * | ||
35 | - * 3. The name(s) of the authors of this software must not be used to | ||
36 | - * endorse or promote products derived from this software without | ||
37 | - * prior written permission. | ||
38 | - * | ||
39 | - * THE AUTHORS OF THIS SOFTWARE DISCLAIM ALL WARRANTIES WITH REGARD TO | ||
40 | - * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
41 | - * AND FITNESS, IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY | ||
42 | - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
43 | - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN | ||
44 | - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING | ||
45 | - * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
46 | - */ | ||
47 | - | ||
48 | -/* | ||
49 | - * This file is generated by configure and sets the features enabled | ||
50 | - * in pppd when configured. | ||
51 | - */ | ||
52 | - | ||
53 | -#ifndef PPP_PPPDCONF_H | ||
54 | -#define PPP_PPPDCONF_H | ||
55 | - | ||
56 | -/* Have Microsoft CHAP support */ | ||
57 | -#define PPP_WITH_CHAPMS 1 | ||
58 | - | ||
59 | -/* Have Microsoft LAN Manager support */ | ||
60 | -/* #undef PPP_WITH_MSLANMAN */ | ||
61 | - | ||
62 | -/* Have Microsoft MPPE support */ | ||
63 | -#define PPP_WITH_MPPE 1 | ||
64 | - | ||
65 | -/* Have multilink support */ | ||
66 | -#define PPP_WITH_MULTILINK 1 | ||
67 | - | ||
68 | -/* Have packet activity filter support */ | ||
69 | -#define PPP_WITH_FILTER 1 | ||
70 | - | ||
71 | -/* Have support for loadable plugins */ | ||
72 | -#define PPP_WITH_PLUGINS 1 | ||
73 | - | ||
74 | -/* Have Callback Protocol support */ | ||
75 | -/* #undef PPP_WITH_CBCP */ | ||
76 | - | ||
77 | -/* Include TDB support */ | ||
78 | -#define PPP_WITH_TDB 1 | ||
79 | - | ||
80 | -/* Have IPv6 Control Protocol */ | ||
81 | -#define PPP_WITH_IPV6CP 1 | ||
82 | - | ||
83 | -/* Support for Pluggable Authentication Modules */ | ||
84 | -/* #undef PPP_WITH_PAM */ | ||
85 | - | ||
86 | -/* Have EAP-SRP authentication support */ | ||
87 | -/* #undef PPP_WITH_SRP */ | ||
88 | - | ||
89 | -/* Have EAP-TLS authentication support */ | ||
90 | -#define PPP_WITH_EAPTLS 1 | ||
91 | - | ||
92 | -/* Have PEAP authentication support */ | ||
93 | -#define PPP_WITH_PEAP 1 | ||
94 | - | ||
95 | -/* The pppd version */ | ||
96 | -#define PPPD_VERSION "2.5.2" | ||
97 | - | ||
98 | -#endif | ||
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppd-session-Fixed-building-with-GCC-15.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppd-session-Fixed-building-with-GCC-15.patch new file mode 100644 index 0000000000..d95c72e96b --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/0001-pppd-session-Fixed-building-with-GCC-15.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | From 5edcb01f1d8d521c819d45df1f1bb87697252130 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 17 Mar 2025 14:38:26 -0700 | ||
4 | Subject: [PATCH] pppd/session: Fixed building with GCC 15 | ||
5 | |||
6 | Fixed building with GCC 15 which defaults to C23 | ||
7 | and find conflicting declration of getspnam() here | ||
8 | with the one provided by shadow.h (extern struct spwd *getspnam (const char *__name);) | ||
9 | |||
10 | Fixes | ||
11 | ../../ppp-2.5.2/pppd/session.c: In function 'session_start': | ||
12 | ../../ppp-2.5.2/pppd/session.c:185:18: error: conflicting types for 'getspnam'; have 'struct spwd *(void)' | ||
13 | 185 | struct spwd *getspnam(); | ||
14 | | ^~~~~~~~ | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/ppp-project/ppp/pull/553] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | pppd/session.c | 1 - | ||
20 | 1 file changed, 1 deletion(-) | ||
21 | |||
22 | diff --git a/pppd/session.c b/pppd/session.c | ||
23 | index f08d8e1..9cc7538 100644 | ||
24 | --- a/pppd/session.c | ||
25 | +++ b/pppd/session.c | ||
26 | @@ -182,7 +182,6 @@ session_start(const int flags, const char *user, const char *passwd, const char | ||
27 | char *cbuf; | ||
28 | #ifdef HAVE_SHADOW_H | ||
29 | struct spwd *spwd; | ||
30 | - struct spwd *getspnam(); | ||
31 | long now = 0; | ||
32 | #endif /* #ifdef HAVE_SHADOW_H */ | ||
33 | #endif /* #ifdef PPP_WITH_PAM */ | ||
diff --git a/meta/recipes-connectivity/ppp/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch b/meta/recipes-connectivity/ppp/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch new file mode 100644 index 0000000000..2a3b3cc84a --- /dev/null +++ b/meta/recipes-connectivity/ppp/ppp/0001-pppdump-Fixed-building-with-GCC-15-548.patch | |||
@@ -0,0 +1,75 @@ | |||
1 | From 44a766a3d086f10cb584a0c423e5bed6af2e3615 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Jaroslav=20=C5=A0karvada?= <jskarvad@redhat.com> | ||
3 | Date: Thu, 27 Feb 2025 23:00:16 +0100 | ||
4 | Subject: [PATCH] pppdump: Fixed building with GCC 15 (#548) | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | GCC 15 defaults to C23 which does not allow K&R declarations. | ||
10 | |||
11 | Credit Yaakov Selkowitz in: | ||
12 | https://src.fedoraproject.org/rpms/ppp/pull-request/12 | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/ppp-project/ppp/pull/548] | ||
15 | |||
16 | Signed-off-by: Jaroslav Å karvada <jskarvad@redhat.com> | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | pppdump/pppdump.c | 20 +++++++------------- | ||
20 | 1 file changed, 7 insertions(+), 13 deletions(-) | ||
21 | |||
22 | diff --git a/pppdump/pppdump.c b/pppdump/pppdump.c | ||
23 | index c24208a..1534036 100644 | ||
24 | --- a/pppdump/pppdump.c | ||
25 | +++ b/pppdump/pppdump.c | ||
26 | @@ -42,14 +42,12 @@ int tot_sent, tot_rcvd; | ||
27 | extern int optind; | ||
28 | extern char *optarg; | ||
29 | |||
30 | -void dumplog(); | ||
31 | -void dumpppp(); | ||
32 | -void show_time(); | ||
33 | +void dumplog(FILE *); | ||
34 | +void dumpppp(FILE *); | ||
35 | +void show_time(FILE *, int); | ||
36 | |||
37 | int | ||
38 | -main(ac, av) | ||
39 | - int ac; | ||
40 | - char **av; | ||
41 | +main(int ac, char **av) | ||
42 | { | ||
43 | int i; | ||
44 | char *p; | ||
45 | @@ -97,8 +95,7 @@ main(ac, av) | ||
46 | } | ||
47 | |||
48 | void | ||
49 | -dumplog(f) | ||
50 | - FILE *f; | ||
51 | +dumplog(FILE *f) | ||
52 | { | ||
53 | int c, n, k, col; | ||
54 | int nb, c2; | ||
55 | @@ -241,8 +238,7 @@ struct pkt { | ||
56 | unsigned char dbuf[8192]; | ||
57 | |||
58 | void | ||
59 | -dumpppp(f) | ||
60 | - FILE *f; | ||
61 | +dumpppp(FILE *f) | ||
62 | { | ||
63 | int c, n, k; | ||
64 | int nb, nl, dn, proto, rv; | ||
65 | @@ -375,9 +371,7 @@ dumpppp(f) | ||
66 | } | ||
67 | |||
68 | void | ||
69 | -show_time(f, c) | ||
70 | - FILE *f; | ||
71 | - int c; | ||
72 | +show_time(FILE *f, int c) | ||
73 | { | ||
74 | time_t t; | ||
75 | int n; | ||
diff --git a/meta/recipes-connectivity/ppp/ppp/makefix.patch b/meta/recipes-connectivity/ppp/ppp/makefix.patch deleted file mode 100644 index fce068cae0..0000000000 --- a/meta/recipes-connectivity/ppp/ppp/makefix.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | We were seeing reproducibility issues where one host would use the internal | ||
2 | logwtmp wrapper, another would use the one in libutil. The issue was that in | ||
3 | some cases the "\#include" was making it to CC, in others, "#include". The | ||
4 | issue seems to be related to shell escaping. | ||
5 | |||
6 | The root cause looks to be: | ||
7 | http://git.savannah.gnu.org/cgit/make.git/commit/?id=c6966b323811c37acedff05b576b907b06aea5f4 | ||
8 | |||
9 | Instead of relying on shell quoting, use make to indirect the variable | ||
10 | and avoid the problem. | ||
11 | |||
12 | See https://github.com/paulusmack/ppp/issues/233 | ||
13 | |||
14 | Upstream-Status: Backport [https://github.com/paulusmack/ppp/commit/b4430f7092ececdff2504d5f3393a4c6528c3686] | ||
15 | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> | ||
16 | |||
17 | Index: ppp-2.4.9/pppd/Makefile.linux | ||
18 | =================================================================== | ||
19 | --- ppp-2.4.9.orig/pppd/Makefile.linux | ||
20 | +++ ppp-2.4.9/pppd/Makefile.linux | ||
21 | @@ -80,7 +80,8 @@ PLUGIN=y | ||
22 | #USE_SRP=y | ||
23 | |||
24 | # Use libutil; test if logwtmp is declared in <utmp.h> to detect | ||
25 | -ifeq ($(shell echo '\#include <utmp.h>' | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes) | ||
26 | +UTMPHEADER = "\#include <utmp.h>" | ||
27 | +ifeq ($(shell echo $(UTMPHEADER) | $(CC) -E - 2>/dev/null | grep -q logwtmp && echo yes),yes) | ||
28 | USE_LIBUTIL=y | ||
29 | endif | ||
30 | |||
31 | @@ -143,7 +144,8 @@ CFLAGS += -DHAS_SHADOW | ||
32 | #LIBS += -lshadow $(LIBS) | ||
33 | endif | ||
34 | |||
35 | -ifeq ($(shell echo '\#include <crypt.h>' | $(CC) -E - >/dev/null 2>&1 && echo yes),yes) | ||
36 | +CRYPTHEADER = "\#include <crypt.h>" | ||
37 | +ifeq ($(shell echo $(CRYPTHEADER) | $(CC) -E - >/dev/null 2>&1 && echo yes),yes) | ||
38 | CFLAGS += -DHAVE_CRYPT_H=1 | ||
39 | LIBS += -lcrypt | ||
40 | endif | ||
diff --git a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb b/meta/recipes-connectivity/ppp/ppp_2.5.2.bb index 235595ff76..607678db8b 100644 --- a/meta/recipes-connectivity/ppp/ppp_2.4.9.bb +++ b/meta/recipes-connectivity/ppp/ppp_2.5.2.bb | |||
@@ -4,15 +4,14 @@ the Point-to-Point Protocol (PPP) on Linux and Solaris systems." | |||
4 | SECTION = "console/network" | 4 | SECTION = "console/network" |
5 | HOMEPAGE = "http://samba.org/ppp/" | 5 | HOMEPAGE = "http://samba.org/ppp/" |
6 | BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs" | 6 | BUGTRACKER = "http://ppp.samba.org/cgi-bin/ppp-bugs" |
7 | DEPENDS = "libpcap openssl virtual/crypt" | 7 | DEPENDS = "libpcap virtual/crypt" |
8 | LICENSE = "BSD-3-Clause & BSD-3-Clause-Attribution & GPLv2+ & LGPLv2+ & PD" | 8 | LICENSE = "BSD-2-Clause & GPL-2.0-or-later & LGPL-2.0-or-later & PD & RSA-MD & MIT" |
9 | LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=29;md5=e2c43fe6e81ff77d87dc9c290a424dea \ | 9 | LIC_FILES_CHKSUM = "file://pppd/ccp.c;beginline=1;endline=25;md5=f0463bd67ae70535c709fca554089bd8 \ |
10 | file://pppd/plugins/passprompt.c;beginline=1;endline=10;md5=3bcbcdbf0e369c9a3e0b8c8275b065d8 \ | ||
11 | file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \ | 10 | file://pppd/tdb.c;beginline=1;endline=27;md5=4ca3a9991b011038d085d6675ae7c4e6 \ |
12 | file://chat/chat.c;beginline=1;endline=15;md5=0d374b8545ee5c62d7aff1acbd38add2" | 11 | file://chat/chat.c;beginline=1;endline=1;md5=234d7d4edd08962c0144e4604050e0b6 \ |
12 | " | ||
13 | 13 | ||
14 | SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ | 14 | SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ |
15 | file://makefix.patch \ | ||
16 | file://pon \ | 15 | file://pon \ |
17 | file://poff \ | 16 | file://poff \ |
18 | file://init \ | 17 | file://init \ |
@@ -24,52 +23,40 @@ SRC_URI = "https://download.samba.org/pub/${BPN}/${BP}.tar.gz \ | |||
24 | file://ppp_on_boot \ | 23 | file://ppp_on_boot \ |
25 | file://provider \ | 24 | file://provider \ |
26 | file://ppp@.service \ | 25 | file://ppp@.service \ |
26 | file://0001-pppdump-Fixed-building-with-GCC-15-548.patch \ | ||
27 | file://0001-pppd-pppdconf.h-remove-erroneous-generated-header.patch \ | ||
28 | file://0001-pppd-session-Fixed-building-with-GCC-15.patch \ | ||
27 | " | 29 | " |
28 | 30 | ||
29 | SRC_URI[sha256sum] = "f938b35eccde533ea800b15a7445b2f1137da7f88e32a16898d02dee8adc058d" | 31 | SRC_URI[sha256sum] = "47da358de54a10cb10bf6ff2cf9b1c03c0d3555518f6182e8f701b8e55733cb2" |
30 | 32 | ||
31 | inherit autotools-brokensep systemd | 33 | inherit autotools pkgconfig systemd |
32 | 34 | ||
33 | TARGET_CC_ARCH += " ${LDFLAGS}" | 35 | PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} openssl" |
34 | EXTRA_OEMAKE = "CC='${CC}' STRIPPROG=${STRIP} MANDIR=${D}${datadir}/man/man8 INCDIR=${D}${includedir} LIBDIR=${D}${libdir}/pppd/${PV} BINDIR=${D}${sbindir}" | 36 | PACKAGECONFIG[pam] = "--with-pam=yes,--with-pam=no,libpam" |
35 | EXTRA_OECONF = "--disable-strip" | 37 | PACKAGECONFIG[openssl] = "--with-openssl=yes,--with-openssl=no,openssl" |
36 | 38 | PACKAGECONFIG[multilink] = "--enable-multilink,--disable-multilink" | |
37 | # Package Makefile computes CFLAGS, referencing COPTS. | ||
38 | # Typically hard-coded to '-O2 -g' in the Makefile's. | ||
39 | # | ||
40 | EXTRA_OEMAKE += ' COPTS="${CFLAGS} -I${STAGING_INCDIR}/openssl -I${S}/include"' | ||
41 | |||
42 | do_configure () { | ||
43 | oe_runconf | ||
44 | } | ||
45 | 39 | ||
46 | do_install:append () { | 40 | do_install:append () { |
47 | make install-etcppp ETCDIR=${D}/${sysconfdir}/ppp | ||
48 | mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d | 41 | mkdir -p ${D}${bindir}/ ${D}${sysconfdir}/init.d |
49 | mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/ | 42 | mkdir -p ${D}${sysconfdir}/ppp/ip-up.d/ |
50 | mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/ | 43 | mkdir -p ${D}${sysconfdir}/ppp/ip-down.d/ |
51 | install -m 0755 ${WORKDIR}/pon ${D}${bindir}/pon | 44 | install -m 0755 ${UNPACKDIR}/pon ${D}${bindir}/pon |
52 | install -m 0755 ${WORKDIR}/poff ${D}${bindir}/poff | 45 | install -m 0755 ${UNPACKDIR}/poff ${D}${bindir}/poff |
53 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/ppp | 46 | install -m 0755 ${UNPACKDIR}/init ${D}${sysconfdir}/init.d/ppp |
54 | install -m 0755 ${WORKDIR}/ip-up ${D}${sysconfdir}/ppp/ | 47 | install -m 0755 ${UNPACKDIR}/ip-up ${D}${sysconfdir}/ppp/ |
55 | install -m 0755 ${WORKDIR}/ip-down ${D}${sysconfdir}/ppp/ | 48 | install -m 0755 ${UNPACKDIR}/ip-down ${D}${sysconfdir}/ppp/ |
56 | install -m 0755 ${WORKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/ | 49 | install -m 0755 ${UNPACKDIR}/08setupdns ${D}${sysconfdir}/ppp/ip-up.d/ |
57 | install -m 0755 ${WORKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/ | 50 | install -m 0755 ${UNPACKDIR}/92removedns ${D}${sysconfdir}/ppp/ip-down.d/ |
58 | mkdir -p ${D}${sysconfdir}/chatscripts | 51 | mkdir -p ${D}${sysconfdir}/chatscripts |
59 | mkdir -p ${D}${sysconfdir}/ppp/peers | 52 | mkdir -p ${D}${sysconfdir}/ppp/peers |
60 | install -m 0755 ${WORKDIR}/pap ${D}${sysconfdir}/chatscripts | 53 | install -m 0755 ${UNPACKDIR}/pap ${D}${sysconfdir}/chatscripts |
61 | install -m 0755 ${WORKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot | 54 | install -m 0755 ${UNPACKDIR}/ppp_on_boot ${D}${sysconfdir}/ppp/ppp_on_boot |
62 | install -m 0755 ${WORKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider | 55 | install -m 0755 ${UNPACKDIR}/provider ${D}${sysconfdir}/ppp/peers/provider |
63 | install -d ${D}${systemd_system_unitdir} | 56 | install -d ${D}${systemd_system_unitdir} |
64 | install -m 0644 ${WORKDIR}/ppp@.service ${D}${systemd_system_unitdir} | 57 | install -m 0644 ${UNPACKDIR}/ppp@.service ${D}${systemd_system_unitdir} |
65 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ | 58 | sed -i -e 's,@SBINDIR@,${sbindir},g' \ |
66 | ${D}${systemd_system_unitdir}/ppp@.service | 59 | ${D}${systemd_system_unitdir}/ppp@.service |
67 | rm -rf ${D}/${mandir}/man8/man8 | ||
68 | chmod u+s ${D}${sbindir}/pppd | ||
69 | } | ||
70 | |||
71 | do_install:append:libc-musl () { | ||
72 | install -Dm 0644 ${S}/include/net/ppp_defs.h ${D}${includedir}/net/ppp_defs.h | ||
73 | } | 60 | } |
74 | 61 | ||
75 | CONFFILES:${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options" | 62 | CONFFILES:${PN} = "${sysconfdir}/ppp/pap-secrets ${sysconfdir}/ppp/chap-secrets ${sysconfdir}/ppp/options" |
@@ -92,5 +79,3 @@ SUMMARY:${PN}-password = "Plugin for PPP to get passwords via a pipe" | |||
92 | SUMMARY:${PN}-l2tp = "Plugin for PPP for l2tp support" | 79 | SUMMARY:${PN}-l2tp = "Plugin for PPP for l2tp support" |
93 | SUMMARY:${PN}-tools = "Additional tools for the PPP package" | 80 | SUMMARY:${PN}-tools = "Additional tools for the PPP package" |
94 | 81 | ||
95 | # Ignore compatibility symlink rp-pppoe.so->pppoe.so | ||
96 | INSANE_SKIP:${PN}-oe += "dev-so" | ||
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch b/meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch new file mode 100644 index 0000000000..ab32f26754 --- /dev/null +++ b/meta/recipes-connectivity/resolvconf/resolvconf/0001-avoid-using-m-option-for-readlink.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 6bf2bb136a0b3961339369bc08e58b661fba0edb Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Thu, 17 Nov 2022 17:26:30 +0800 | ||
4 | Subject: [PATCH] avoid using -m option for readlink | ||
5 | |||
6 | Use a more widely used option '-f' instead of '-m' here to | ||
7 | avoid dependency on coreutils. | ||
8 | |||
9 | Looking at the git history of the resolvconf repo, the '-m' | ||
10 | is deliberately used. And it wants to depend on coreutils. | ||
11 | But in case of OE, the existence of /etc is ensured, and busybox | ||
12 | readlink provides '-f' option, so we can just use '-f'. In this | ||
13 | way, the coreutils dependency is not necessary any more. | ||
14 | |||
15 | Upstream-Status: Inappropriate [OE Specific] | ||
16 | |||
17 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
18 | --- | ||
19 | etc/resolvconf/update.d/libc | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/etc/resolvconf/update.d/libc b/etc/resolvconf/update.d/libc | ||
23 | index 1c4f6bc..f75d22c 100755 | ||
24 | --- a/etc/resolvconf/update.d/libc | ||
25 | +++ b/etc/resolvconf/update.d/libc | ||
26 | @@ -57,7 +57,7 @@ fi | ||
27 | report_warning() { echo "$0: Warning: $*" >&2 ; } | ||
28 | |||
29 | resolv_conf_is_symlinked_to_dynamic_file() { | ||
30 | - [ -L ${ETC}/resolv.conf ] && [ "$(readlink -m ${ETC}/resolv.conf)" = "$DYNAMICRSLVCNFFILE" ] | ||
31 | + [ -L ${ETC}/resolv.conf ] && [ "$(readlink -f ${ETC}/resolv.conf)" = "$DYNAMICRSLVCNFFILE" ] | ||
32 | } | ||
33 | |||
34 | if ! resolv_conf_is_symlinked_to_dynamic_file ; then | ||
35 | -- | ||
36 | 2.17.1 | ||
37 | |||
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch b/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch deleted file mode 100644 index 1aead07869..0000000000 --- a/meta/recipes-connectivity/resolvconf/resolvconf/fix-path-for-busybox.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | |||
2 | busybox installs readlink into /usr/bin, so ensure /usr/bin | ||
3 | is in the path. | ||
4 | |||
5 | Upstream-Status: Submitted | ||
6 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
7 | |||
8 | Index: resolvconf-1.76/etc/resolvconf/update.d/libc | ||
9 | =================================================================== | ||
10 | --- resolvconf-1.76.orig/etc/resolvconf/update.d/libc | ||
11 | +++ resolvconf-1.76/etc/resolvconf/update.d/libc | ||
12 | @@ -16,7 +16,7 @@ | ||
13 | # | ||
14 | |||
15 | set -e | ||
16 | -PATH=/sbin:/bin | ||
17 | +PATH=/sbin:/bin:/usr/bin | ||
18 | |||
19 | [ -x /lib/resolvconf/list-records ] || exit 1 | ||
20 | |||
diff --git a/meta/recipes-connectivity/resolvconf/resolvconf_1.87.bb b/meta/recipes-connectivity/resolvconf/resolvconf_1.93.bb index f57abe3619..c10c57267a 100644 --- a/meta/recipes-connectivity/resolvconf/resolvconf_1.87.bb +++ b/meta/recipes-connectivity/resolvconf/resolvconf_1.93.bb | |||
@@ -5,34 +5,29 @@ itself up as the intermediary between programs that supply \ | |||
5 | nameserver information and programs that need nameserver \ | 5 | nameserver information and programs that need nameserver \ |
6 | information." | 6 | information." |
7 | SECTION = "console/network" | 7 | SECTION = "console/network" |
8 | LICENSE = "GPLv2+" | 8 | LICENSE = "GPL-2.0-or-later" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=c93c0550bd3173f4504b2cbd8991e50b" |
10 | AUTHOR = "Thomas Hood" | ||
11 | HOMEPAGE = "http://packages.debian.org/resolvconf" | 10 | HOMEPAGE = "http://packages.debian.org/resolvconf" |
12 | RDEPENDS:${PN} = "bash" | 11 | RDEPENDS:${PN} = "bash sed util-linux-flock" |
13 | 12 | ||
14 | SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \ | 13 | SRC_URI = "git://salsa.debian.org/debian/resolvconf.git;protocol=https;branch=unstable \ |
15 | file://fix-path-for-busybox.patch \ | ||
16 | file://99_resolvconf \ | 14 | file://99_resolvconf \ |
15 | file://0001-avoid-using-m-option-for-readlink.patch \ | ||
17 | " | 16 | " |
18 | 17 | ||
19 | SRCREV = "1dda36d8465e335c60190c41e7185d782da1bd7b" | 18 | SRCREV = "ab766fa31f7939f6d879123236b4275320b7ff64" |
20 | |||
21 | S = "${WORKDIR}/git" | ||
22 | 19 | ||
23 | # the package is taken from snapshots.debian.org; that source is static and goes stale | 20 | # the package is taken from snapshots.debian.org; that source is static and goes stale |
24 | # so we check the latest upstream from a directory that does get updated | 21 | # so we check the latest upstream from a directory that does get updated |
25 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/" | 22 | UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/r/resolvconf/" |
26 | 23 | ||
27 | inherit allarch | ||
28 | |||
29 | do_compile () { | 24 | do_compile () { |
30 | : | 25 | : |
31 | } | 26 | } |
32 | 27 | ||
33 | do_install () { | 28 | do_install () { |
34 | install -d ${D}${sysconfdir}/default/volatiles | 29 | install -d ${D}${sysconfdir}/default/volatiles |
35 | install -m 0644 ${WORKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles | 30 | install -m 0644 ${UNPACKDIR}/99_resolvconf ${D}${sysconfdir}/default/volatiles |
36 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | 31 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then |
37 | install -d ${D}${sysconfdir}/tmpfiles.d | 32 | install -d ${D}${sysconfdir}/tmpfiles.d |
38 | echo "d /run/${BPN}/interface - - - -" \ | 33 | echo "d /run/${BPN}/interface - - - -" \ |
@@ -40,12 +35,14 @@ do_install () { | |||
40 | fi | 35 | fi |
41 | install -d ${D}${base_libdir}/${BPN} | 36 | install -d ${D}${base_libdir}/${BPN} |
42 | install -d ${D}${sysconfdir}/${BPN} | 37 | install -d ${D}${sysconfdir}/${BPN} |
38 | install -d ${D}${nonarch_base_libdir}/${BPN} | ||
43 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run | 39 | ln -snf ${localstatedir}/run/${BPN} ${D}${sysconfdir}/${BPN}/run |
44 | install -d ${D}${sysconfdir} ${D}${base_sbindir} | 40 | install -d ${D}${sysconfdir} ${D}${base_sbindir} |
45 | install -d ${D}${mandir}/man8 ${D}${docdir}/${P} | 41 | install -d ${D}${mandir}/man8 ${D}${docdir}/${P} |
46 | cp -pPR etc/resolvconf ${D}${sysconfdir}/ | 42 | cp -pPR etc/resolvconf ${D}${sysconfdir}/ |
47 | chown -R root:root ${D}${sysconfdir}/ | 43 | chown -R root:root ${D}${sysconfdir}/ |
48 | install -m 0755 bin/resolvconf ${D}${base_sbindir}/ | 44 | install -m 0755 bin/resolvconf ${D}${base_sbindir}/ |
45 | install -m 0755 bin/normalize-resolvconf ${D}${nonarch_base_libdir}/${BPN} | ||
49 | install -m 0755 bin/list-records ${D}${base_libdir}/${BPN} | 46 | install -m 0755 bin/list-records ${D}${base_libdir}/${BPN} |
50 | install -d ${D}/${sysconfdir}/network/if-up.d | 47 | install -d ${D}/${sysconfdir}/network/if-up.d |
51 | install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf | 48 | install -m 0755 debian/resolvconf.000resolvconf.if-up ${D}/${sysconfdir}/network/if-up.d/000resolvconf |
@@ -65,4 +62,4 @@ pkg_postinst:${PN} () { | |||
65 | fi | 62 | fi |
66 | } | 63 | } |
67 | 64 | ||
68 | FILES:${PN} += "${base_libdir}/${BPN}" | 65 | FILES:${PN} += "${base_libdir}/${BPN} ${nonarch_base_libdir}/${BPN}" |
diff --git a/meta/recipes-connectivity/slirp/libslirp_4.9.1.bb b/meta/recipes-connectivity/slirp/libslirp_4.9.1.bb new file mode 100644 index 0000000000..9f7005d709 --- /dev/null +++ b/meta/recipes-connectivity/slirp/libslirp_4.9.1.bb | |||
@@ -0,0 +1,14 @@ | |||
1 | SUMMARY = "A general purpose TCP-IP emulator" | ||
2 | DESCRIPTION = "A general purpose TCP-IP emulator used by virtual machine hypervisors to provide virtual networking services." | ||
3 | HOMEPAGE = "https://gitlab.freedesktop.org/slirp/libslirp" | ||
4 | LICENSE = "BSD-3-Clause & MIT" | ||
5 | LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=bca0186b14e6b05e338e729f106db727" | ||
6 | |||
7 | SRC_URI = "git://gitlab.freedesktop.org/slirp/libslirp.git;protocol=https;branch=master" | ||
8 | SRCREV = "9c744e1e52aa0d9646ed91d789d588696292c21e" | ||
9 | |||
10 | DEPENDS = "glib-2.0" | ||
11 | |||
12 | inherit meson pkgconfig | ||
13 | |||
14 | BBCLASSEXTEND = "native nativesdk" | ||
diff --git a/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch b/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch new file mode 100644 index 0000000000..ea00dfa0a9 --- /dev/null +++ b/meta/recipes-connectivity/socat/files/0001-fix-compile-procan.c-failed.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | From c4c3d5f2d4dfe8167205e8d20b4cb7a197706c16 Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Wed, 27 Nov 2024 04:09:59 -0800 | ||
4 | Subject: [PATCH] fix compile procan.c failed | ||
5 | |||
6 | 1. Compile socat failed if out of tree build (build dir != source dir) | ||
7 | ... | ||
8 | gcc -c -D CC="gcc" -o procan.o procan.c | ||
9 | cc1: fatal error: procan.c: No such file or directory | ||
10 | ... | ||
11 | Explicitly add $srcdir to makefile rule | ||
12 | |||
13 | 2. Compile socat failed if multiple words in $(CC), such as CC="gcc -m64" | ||
14 | ... | ||
15 | from ../socat-1.8.0.0/procan.c:10: | ||
16 | ../socat-1.8.0.0/sysincludes.h:18:10: fatal error: inttypes.h: No such file or directory | ||
17 | 18 | #include <inttypes.h> /* uint16_t */ | ||
18 | ... | ||
19 | |||
20 | In commit [Procan: print umask, CC, and couple more new infos][1], | ||
21 | it defeines marcro CC in C source, the space in CC will break | ||
22 | C source compile. Use first word of $(CC) to defeine marco CC | ||
23 | |||
24 | [1] https://repo.or.cz/socat.git/commit/cd5673dbd0786c94e0b3ace7e35fab14c01e3185 | ||
25 | |||
26 | Upstream-Status: Submitted [socat@dest-unreach.org] | ||
27 | |||
28 | Rebase to 1.8.0.1 | ||
29 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
30 | --- | ||
31 | Makefile.in | 8 ++++---- | ||
32 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
33 | |||
34 | diff --git a/Makefile.in b/Makefile.in | ||
35 | index 631d31d..103d4d1 100644 | ||
36 | --- a/Makefile.in | ||
37 | +++ b/Makefile.in | ||
38 | @@ -110,7 +110,7 @@ socat: socat.o libxio.a | ||
39 | $(CC) $(CFLAGS) $(LDFLAGS) -o $@ socat.o libxio.a $(CLIBS) | ||
40 | |||
41 | procan.o: $(srcdir)/procan.c | ||
42 | - $(CC) $(CFLAGS) -c -D CC="\"$(CC)\"" -o $@ $(srcdir)/procan.c | ||
43 | + $(CC) $(CFLAGS) -c -D CC="\"$(firstword $(CC))\"" -o $@ $(srcdir)/procan.c | ||
44 | |||
45 | PROCAN_OBJS=procan_main.o procan.o procan-cdefs.o hostan.o error.o sycls.o sysutils.o utils.o vsnprintf_r.o snprinterr.o | ||
46 | procan: $(PROCAN_OBJS) | ||
47 | @@ -132,9 +132,9 @@ install: progs $(srcdir)/doc/socat.1 | ||
48 | mkdir -p $(DESTDIR)$(BINDEST) | ||
49 | $(INSTALL) -m 755 socat $(DESTDIR)$(BINDEST)/socat1 | ||
50 | ln -sf socat1 $(DESTDIR)$(BINDEST)/socat | ||
51 | - $(INSTALL) -m 755 socat-chain.sh $(DESTDIR)$(BINDEST) | ||
52 | - $(INSTALL) -m 755 socat-mux.sh $(DESTDIR)$(BINDEST) | ||
53 | - $(INSTALL) -m 755 socat-broker.sh $(DESTDIR)$(BINDEST) | ||
54 | + $(INSTALL) -m 755 $(srcdir)/socat-chain.sh $(DESTDIR)$(BINDEST) | ||
55 | + $(INSTALL) -m 755 $(srcdir)/socat-mux.sh $(DESTDIR)$(BINDEST) | ||
56 | + $(INSTALL) -m 755 $(srcdir)/socat-broker.sh $(DESTDIR)$(BINDEST) | ||
57 | $(INSTALL) -m 755 procan $(DESTDIR)$(BINDEST) | ||
58 | $(INSTALL) -m 755 filan $(DESTDIR)$(BINDEST) | ||
59 | mkdir -p $(DESTDIR)$(MANDEST)/man1 | ||
60 | -- | ||
61 | 2.25.1 | ||
62 | |||
diff --git a/meta/recipes-connectivity/socat/socat_1.7.4.1.bb b/meta/recipes-connectivity/socat/socat_1.8.0.3.bb index 1ad5f15b93..ee6ca1fe44 100644 --- a/meta/recipes-connectivity/socat/socat_1.7.4.1.bb +++ b/meta/recipes-connectivity/socat/socat_1.8.0.3.bb | |||
@@ -7,13 +7,13 @@ SECTION = "console/network" | |||
7 | 7 | ||
8 | LICENSE = "GPL-2.0-with-OpenSSL-exception" | 8 | LICENSE = "GPL-2.0-with-OpenSSL-exception" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ |
10 | file://README;beginline=257;endline=287;md5=82520b052f322ac2b5b3dfdc7c7eea86" | 10 | file://README;beginline=248;endline=278;md5=338c05eadd013872abb1d6e198e10a3f" |
11 | 11 | ||
12 | SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \ | 12 | SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \ |
13 | file://0001-fix-compile-procan.c-failed.patch \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | SRC_URI[md5sum] = "36cad050ecf4981ab044c3fbd75c643f" | 16 | SRC_URI[sha256sum] = "01eb017361d95bb3a6941e840b59e4463a3fabf92df4154ed02b16a2ed6a0095" |
16 | SRC_URI[sha256sum] = "3faca25614e89123dff5045680549ecef519d02e331aaf3c4f5a8f6837c675e9" | ||
17 | 17 | ||
18 | inherit autotools | 18 | inherit autotools |
19 | 19 | ||
diff --git a/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb b/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb index ddd10e6eeb..57b0534929 100644 --- a/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb +++ b/meta/recipes-connectivity/ssh-pregen-hostkeys/ssh-pregen-hostkeys_1.0.bb | |||
@@ -6,14 +6,18 @@ SRC_URI = "file://dropbear_rsa_host_key \ | |||
6 | LICENSE = "MIT" | 6 | LICENSE = "MIT" |
7 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" | 7 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
8 | 8 | ||
9 | S = "${UNPACKDIR}" | ||
10 | |||
9 | INHIBIT_DEFAULT_DEPS = "1" | 11 | INHIBIT_DEFAULT_DEPS = "1" |
10 | 12 | ||
13 | COMPATIBLE_MACHINE = "^qemu.*$" | ||
14 | |||
11 | do_install () { | 15 | do_install () { |
12 | install -d ${D}${sysconfdir}/dropbear | 16 | install -d ${D}${sysconfdir}/dropbear |
13 | install ${WORKDIR}/dropbear_rsa_host_key -m 0600 ${D}${sysconfdir}/dropbear/ | 17 | install ${UNPACKDIR}/dropbear_rsa_host_key -m 0600 ${D}${sysconfdir}/dropbear/ |
14 | 18 | ||
15 | install -d ${D}${sysconfdir}/ssh | 19 | install -d ${D}${sysconfdir}/ssh |
16 | install ${WORKDIR}/openssh/* ${D}${sysconfdir}/ssh/ | 20 | install ${UNPACKDIR}/openssh/* ${D}${sysconfdir}/ssh/ |
17 | chmod 0600 ${D}${sysconfdir}/ssh/* | 21 | chmod 0600 ${D}${sysconfdir}/ssh/* |
18 | chmod 0644 ${D}${sysconfdir}/ssh/*.pub | 22 | chmod 0644 ${D}${sysconfdir}/ssh/*.pub |
19 | } \ No newline at end of file | 23 | } |
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch deleted file mode 100644 index 7b0713cf6d..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-AP-Silently-ignore-management-frame-from-unexpected-.patch +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | hostapd before 2.10 and wpa_supplicant before 2.10 allow an incorrect indication | ||
2 | of disconnection in certain situations because source address validation is | ||
3 | mishandled. This is a denial of service that should have been prevented by PMF | ||
4 | (aka management frame protection). The attacker must send a crafted 802.11 frame | ||
5 | from a location that is within the 802.11 communications range. | ||
6 | |||
7 | CVE: CVE-2019-16275 | ||
8 | Upstream-Status: Backport | ||
9 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
10 | |||
11 | From 8c07fa9eda13e835f3f968b2e1c9a8be3a851ff9 Mon Sep 17 00:00:00 2001 | ||
12 | From: Jouni Malinen <j@w1.fi> | ||
13 | Date: Thu, 29 Aug 2019 11:52:04 +0300 | ||
14 | Subject: [PATCH] AP: Silently ignore management frame from unexpected source | ||
15 | address | ||
16 | |||
17 | Do not process any received Management frames with unexpected/invalid SA | ||
18 | so that we do not add any state for unexpected STA addresses or end up | ||
19 | sending out frames to unexpected destination. This prevents unexpected | ||
20 | sequences where an unprotected frame might end up causing the AP to send | ||
21 | out a response to another device and that other device processing the | ||
22 | unexpected response. | ||
23 | |||
24 | In particular, this prevents some potential denial of service cases | ||
25 | where the unexpected response frame from the AP might result in a | ||
26 | connected station dropping its association. | ||
27 | |||
28 | Signed-off-by: Jouni Malinen <j@w1.fi> | ||
29 | --- | ||
30 | src/ap/drv_callbacks.c | 13 +++++++++++++ | ||
31 | src/ap/ieee802_11.c | 12 ++++++++++++ | ||
32 | 2 files changed, 25 insertions(+) | ||
33 | |||
34 | diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c | ||
35 | index 31587685fe3b..34ca379edc3d 100644 | ||
36 | --- a/src/ap/drv_callbacks.c | ||
37 | +++ b/src/ap/drv_callbacks.c | ||
38 | @@ -131,6 +131,19 @@ int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr, | ||
39 | "hostapd_notif_assoc: Skip event with no address"); | ||
40 | return -1; | ||
41 | } | ||
42 | + | ||
43 | + if (is_multicast_ether_addr(addr) || | ||
44 | + is_zero_ether_addr(addr) || | ||
45 | + os_memcmp(addr, hapd->own_addr, ETH_ALEN) == 0) { | ||
46 | + /* Do not process any frames with unexpected/invalid SA so that | ||
47 | + * we do not add any state for unexpected STA addresses or end | ||
48 | + * up sending out frames to unexpected destination. */ | ||
49 | + wpa_printf(MSG_DEBUG, "%s: Invalid SA=" MACSTR | ||
50 | + " in received indication - ignore this indication silently", | ||
51 | + __func__, MAC2STR(addr)); | ||
52 | + return 0; | ||
53 | + } | ||
54 | + | ||
55 | random_add_randomness(addr, ETH_ALEN); | ||
56 | |||
57 | hostapd_logger(hapd, addr, HOSTAPD_MODULE_IEEE80211, | ||
58 | diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c | ||
59 | index c85a28db44b7..e7065372e158 100644 | ||
60 | --- a/src/ap/ieee802_11.c | ||
61 | +++ b/src/ap/ieee802_11.c | ||
62 | @@ -4626,6 +4626,18 @@ int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len, | ||
63 | fc = le_to_host16(mgmt->frame_control); | ||
64 | stype = WLAN_FC_GET_STYPE(fc); | ||
65 | |||
66 | + if (is_multicast_ether_addr(mgmt->sa) || | ||
67 | + is_zero_ether_addr(mgmt->sa) || | ||
68 | + os_memcmp(mgmt->sa, hapd->own_addr, ETH_ALEN) == 0) { | ||
69 | + /* Do not process any frames with unexpected/invalid SA so that | ||
70 | + * we do not add any state for unexpected STA addresses or end | ||
71 | + * up sending out frames to unexpected destination. */ | ||
72 | + wpa_printf(MSG_DEBUG, "MGMT: Invalid SA=" MACSTR | ||
73 | + " in received frame - ignore this frame silently", | ||
74 | + MAC2STR(mgmt->sa)); | ||
75 | + return 0; | ||
76 | + } | ||
77 | + | ||
78 | if (stype == WLAN_FC_STYPE_BEACON) { | ||
79 | handle_beacon(hapd, mgmt, len, fi); | ||
80 | return 1; | ||
81 | -- | ||
82 | 2.20.1 | ||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch deleted file mode 100644 index 53ad5d028a..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch +++ /dev/null | |||
@@ -1,151 +0,0 @@ | |||
1 | From 5b78c8f961f25f4dc22d6f2b77ddd06d712cec63 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <jouni@codeaurora.org> | ||
3 | Date: Wed, 3 Jun 2020 23:17:35 +0300 | ||
4 | Subject: [PATCH 1/3] WPS UPnP: Do not allow event subscriptions with URLs to | ||
5 | other networks | ||
6 | |||
7 | The UPnP Device Architecture 2.0 specification errata ("UDA errata | ||
8 | 16-04-2020.docx") addresses a problem with notifications being allowed | ||
9 | to go out to other domains by disallowing such cases. Do such filtering | ||
10 | for the notification callback URLs to avoid undesired connections to | ||
11 | external networks based on subscriptions that any device in the local | ||
12 | network could request when WPS support for external registrars is | ||
13 | enabled (the upnp_iface parameter in hostapd configuration). | ||
14 | |||
15 | Upstream-Status: Backport | ||
16 | CVE: CVE-2020-12695 patch #1 | ||
17 | Signed-off-by: Jouni Malinen <jouni@codeaurora.org> | ||
18 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
19 | |||
20 | --- | ||
21 | src/wps/wps_er.c | 2 +- | ||
22 | src/wps/wps_upnp.c | 38 ++++++++++++++++++++++++++++++++++++-- | ||
23 | src/wps/wps_upnp_i.h | 3 ++- | ||
24 | 3 files changed, 39 insertions(+), 4 deletions(-) | ||
25 | |||
26 | Index: wpa_supplicant-2.9/src/wps/wps_er.c | ||
27 | =================================================================== | ||
28 | --- wpa_supplicant-2.9.orig/src/wps/wps_er.c | ||
29 | +++ wpa_supplicant-2.9/src/wps/wps_er.c | ||
30 | @@ -1298,7 +1298,7 @@ wps_er_init(struct wps_context *wps, con | ||
31 | "with %s", filter); | ||
32 | } | ||
33 | if (get_netif_info(er->ifname, &er->ip_addr, &er->ip_addr_text, | ||
34 | - er->mac_addr)) { | ||
35 | + NULL, er->mac_addr)) { | ||
36 | wpa_printf(MSG_INFO, "WPS UPnP: Could not get IP/MAC address " | ||
37 | "for %s. Does it have IP address?", er->ifname); | ||
38 | wps_er_deinit(er, NULL, NULL); | ||
39 | Index: wpa_supplicant-2.9/src/wps/wps_upnp.c | ||
40 | =================================================================== | ||
41 | --- wpa_supplicant-2.9.orig/src/wps/wps_upnp.c | ||
42 | +++ wpa_supplicant-2.9/src/wps/wps_upnp.c | ||
43 | @@ -303,6 +303,14 @@ static void subscr_addr_free_all(struct | ||
44 | } | ||
45 | |||
46 | |||
47 | +static int local_network_addr(struct upnp_wps_device_sm *sm, | ||
48 | + struct sockaddr_in *addr) | ||
49 | +{ | ||
50 | + return (addr->sin_addr.s_addr & sm->netmask.s_addr) == | ||
51 | + (sm->ip_addr & sm->netmask.s_addr); | ||
52 | +} | ||
53 | + | ||
54 | + | ||
55 | /* subscr_addr_add_url -- add address(es) for one url to subscription */ | ||
56 | static void subscr_addr_add_url(struct subscription *s, const char *url, | ||
57 | size_t url_len) | ||
58 | @@ -381,6 +389,7 @@ static void subscr_addr_add_url(struct s | ||
59 | |||
60 | for (rp = result; rp; rp = rp->ai_next) { | ||
61 | struct subscr_addr *a; | ||
62 | + struct sockaddr_in *addr = (struct sockaddr_in *) rp->ai_addr; | ||
63 | |||
64 | /* Limit no. of address to avoid denial of service attack */ | ||
65 | if (dl_list_len(&s->addr_list) >= MAX_ADDR_PER_SUBSCRIPTION) { | ||
66 | @@ -389,6 +398,13 @@ static void subscr_addr_add_url(struct s | ||
67 | break; | ||
68 | } | ||
69 | |||
70 | + if (!local_network_addr(s->sm, addr)) { | ||
71 | + wpa_printf(MSG_INFO, | ||
72 | + "WPS UPnP: Ignore a delivery URL that points to another network %s", | ||
73 | + inet_ntoa(addr->sin_addr)); | ||
74 | + continue; | ||
75 | + } | ||
76 | + | ||
77 | a = os_zalloc(sizeof(*a) + alloc_len); | ||
78 | if (a == NULL) | ||
79 | break; | ||
80 | @@ -889,11 +905,12 @@ static int eth_get(const char *device, u | ||
81 | * @net_if: Selected network interface name | ||
82 | * @ip_addr: Buffer for returning IP address in network byte order | ||
83 | * @ip_addr_text: Buffer for returning a pointer to allocated IP address text | ||
84 | + * @netmask: Buffer for returning netmask or %NULL if not needed | ||
85 | * @mac: Buffer for returning MAC address | ||
86 | * Returns: 0 on success, -1 on failure | ||
87 | */ | ||
88 | int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, | ||
89 | - u8 mac[ETH_ALEN]) | ||
90 | + struct in_addr *netmask, u8 mac[ETH_ALEN]) | ||
91 | { | ||
92 | struct ifreq req; | ||
93 | int sock = -1; | ||
94 | @@ -919,6 +936,19 @@ int get_netif_info(const char *net_if, u | ||
95 | in_addr.s_addr = *ip_addr; | ||
96 | os_snprintf(*ip_addr_text, 16, "%s", inet_ntoa(in_addr)); | ||
97 | |||
98 | + if (netmask) { | ||
99 | + os_memset(&req, 0, sizeof(req)); | ||
100 | + os_strlcpy(req.ifr_name, net_if, sizeof(req.ifr_name)); | ||
101 | + if (ioctl(sock, SIOCGIFNETMASK, &req) < 0) { | ||
102 | + wpa_printf(MSG_ERROR, | ||
103 | + "WPS UPnP: SIOCGIFNETMASK failed: %d (%s)", | ||
104 | + errno, strerror(errno)); | ||
105 | + goto fail; | ||
106 | + } | ||
107 | + addr = (struct sockaddr_in *) &req.ifr_netmask; | ||
108 | + netmask->s_addr = addr->sin_addr.s_addr; | ||
109 | + } | ||
110 | + | ||
111 | #ifdef __linux__ | ||
112 | os_strlcpy(req.ifr_name, net_if, sizeof(req.ifr_name)); | ||
113 | if (ioctl(sock, SIOCGIFHWADDR, &req) < 0) { | ||
114 | @@ -1025,11 +1055,15 @@ static int upnp_wps_device_start(struct | ||
115 | |||
116 | /* Determine which IP and mac address we're using */ | ||
117 | if (get_netif_info(net_if, &sm->ip_addr, &sm->ip_addr_text, | ||
118 | - sm->mac_addr)) { | ||
119 | + &sm->netmask, sm->mac_addr)) { | ||
120 | wpa_printf(MSG_INFO, "WPS UPnP: Could not get IP/MAC address " | ||
121 | "for %s. Does it have IP address?", net_if); | ||
122 | goto fail; | ||
123 | } | ||
124 | + wpa_printf(MSG_DEBUG, "WPS UPnP: Local IP address %s netmask %s hwaddr " | ||
125 | + MACSTR, | ||
126 | + sm->ip_addr_text, inet_ntoa(sm->netmask), | ||
127 | + MAC2STR(sm->mac_addr)); | ||
128 | |||
129 | /* Listen for incoming TCP connections so that others | ||
130 | * can fetch our "xml files" from us. | ||
131 | Index: wpa_supplicant-2.9/src/wps/wps_upnp_i.h | ||
132 | =================================================================== | ||
133 | --- wpa_supplicant-2.9.orig/src/wps/wps_upnp_i.h | ||
134 | +++ wpa_supplicant-2.9/src/wps/wps_upnp_i.h | ||
135 | @@ -128,6 +128,7 @@ struct upnp_wps_device_sm { | ||
136 | u8 mac_addr[ETH_ALEN]; /* mac addr of network i.f. we use */ | ||
137 | char *ip_addr_text; /* IP address of network i.f. we use */ | ||
138 | unsigned ip_addr; /* IP address of network i.f. we use (host order) */ | ||
139 | + struct in_addr netmask; | ||
140 | int multicast_sd; /* send multicast messages over this socket */ | ||
141 | int ssdp_sd; /* receive discovery UPD packets on socket */ | ||
142 | int ssdp_sd_registered; /* nonzero if we must unregister */ | ||
143 | @@ -158,7 +159,7 @@ struct subscription * subscription_find( | ||
144 | const u8 uuid[UUID_LEN]); | ||
145 | void subscr_addr_delete(struct subscr_addr *a); | ||
146 | int get_netif_info(const char *net_if, unsigned *ip_addr, char **ip_addr_text, | ||
147 | - u8 mac[ETH_ALEN]); | ||
148 | + struct in_addr *netmask, u8 mac[ETH_ALEN]); | ||
149 | |||
150 | /* wps_upnp_ssdp.c */ | ||
151 | void msearchreply_state_machine_stop(struct advertisement_state_machine *a); | ||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-macsec_linux-Hardware-offload-requires-Linux-headers.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-macsec_linux-Hardware-offload-requires-Linux-headers.patch new file mode 100644 index 0000000000..f9634e47c9 --- /dev/null +++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-macsec_linux-Hardware-offload-requires-Linux-headers.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 809d9d8172db8e2a08ff639875f838b5b86d2641 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sergey Matyukevich <geomatsi@gmail.com> | ||
3 | Date: Thu, 22 Aug 2024 00:03:41 +0300 | ||
4 | Subject: [PATCH] macsec_linux: Hardware offload requires Linux headers >= v5.7 | ||
5 | |||
6 | Hardware offload in Linux macsec driver is enabled in compile time if | ||
7 | libnl version is >= v3.6. This is not sufficient for successful build | ||
8 | since enum 'macsec_offload' has been added to Linux header if_link.h | ||
9 | in kernels v5.6 and v5.7, see commits: | ||
10 | - https://github.com/torvalds/linux/commit/21114b7feec29e4425a3ac48a037569c016a46c8 | ||
11 | - https://github.com/torvalds/linux/commit/76564261a7db80c5f5c624e0122a28787f266bdf | ||
12 | |||
13 | New libnl with older Linux headers is a valid combination. This is how | ||
14 | hostapd build failure has been detected by Buildroot autobuilder, see: | ||
15 | - http://autobuild.buildroot.net/results/b59d5bc5bd17683a3a1e3577c40c802e81911f84/ | ||
16 | |||
17 | Extend compile time condition for the enablement of the macsec hardware | ||
18 | offload adding Linux headers version check. | ||
19 | |||
20 | Fixes: 40c139664439 ("macsec_linux: Add support for MACsec hardware offload") | ||
21 | Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com> | ||
22 | |||
23 | Upstream-Status: Backport [https://w1.fi/cgit/hostap/patch/?id=809d9d8172db8e2a08ff639875f838b5b86d2641] | ||
24 | Signed-off-by: Jon Mason <jdmason@kudzu.us> | ||
25 | --- | ||
26 | src/drivers/driver_macsec_linux.c | 4 +++- | ||
27 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
28 | |||
29 | diff --git a/src/drivers/driver_macsec_linux.c b/src/drivers/driver_macsec_linux.c | ||
30 | index c867154981e9..fad47a292f9f 100644 | ||
31 | --- a/src/drivers/driver_macsec_linux.c | ||
32 | +++ b/src/drivers/driver_macsec_linux.c | ||
33 | @@ -19,6 +19,7 @@ | ||
34 | #include <netlink/route/link.h> | ||
35 | #include <netlink/route/link/macsec.h> | ||
36 | #include <linux/if_macsec.h> | ||
37 | +#include <linux/version.h> | ||
38 | #include <inttypes.h> | ||
39 | |||
40 | #include "utils/common.h" | ||
41 | @@ -32,7 +33,8 @@ | ||
42 | |||
43 | #define UNUSED_SCI 0xffffffffffffffff | ||
44 | |||
45 | -#if LIBNL_VER_NUM >= LIBNL_VER(3, 6) | ||
46 | +#if (LIBNL_VER_NUM >= LIBNL_VER(3, 6) && \ | ||
47 | + LINUX_VERSION_CODE >= KERNEL_VERSION(5, 7, 0)) | ||
48 | #define LIBNL_HAS_OFFLOAD | ||
49 | #endif | ||
50 | |||
51 | -- | ||
52 | 2.39.2 | ||
53 | |||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch deleted file mode 100644 index a476cf040e..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0001-replace-systemd-install-Alias-with-WantedBy.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 94c401733a5a3d294cc412671166e6adfb409f53 Mon Sep 17 00:00:00 2001 | ||
2 | From: Joshua DeWeese <jdeweese@hennypenny.com> | ||
3 | Date: Wed, 30 Jan 2019 16:19:47 -0500 | ||
4 | Subject: [PATCH] replace systemd install Alias with WantedBy | ||
5 | |||
6 | According to the systemd documentation "WantedBy=foo.service in a | ||
7 | service bar.service is mostly equivalent to | ||
8 | Alias=foo.service.wants/bar.service in the same file." However, | ||
9 | this is not really the intended purpose of install Aliases. | ||
10 | |||
11 | Upstream-Status: Submitted [hostap@lists.infradead.org] | ||
12 | |||
13 | Signed-off-by: Joshua DeWeese <jdeweese@hennypenny.com> | ||
14 | --- | ||
15 | wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in | 2 +- | ||
16 | wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in | 2 +- | ||
17 | wpa_supplicant/systemd/wpa_supplicant.service.arg.in | 2 +- | ||
18 | 3 files changed, 3 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in | ||
21 | index 03ac507..da69a87 100644 | ||
22 | --- a/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in | ||
23 | +++ b/wpa_supplicant/systemd/wpa_supplicant-nl80211.service.arg.in | ||
24 | @@ -12,4 +12,4 @@ Type=simple | ||
25 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-nl80211-%I.conf -Dnl80211 -i%I | ||
26 | |||
27 | [Install] | ||
28 | -Alias=multi-user.target.wants/wpa_supplicant-nl80211@%i.service | ||
29 | +WantedBy=multi-user.target | ||
30 | diff --git a/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in | ||
31 | index c8a744d..ca3054b 100644 | ||
32 | --- a/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in | ||
33 | +++ b/wpa_supplicant/systemd/wpa_supplicant-wired.service.arg.in | ||
34 | @@ -12,4 +12,4 @@ Type=simple | ||
35 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-wired-%I.conf -Dwired -i%I | ||
36 | |||
37 | [Install] | ||
38 | -Alias=multi-user.target.wants/wpa_supplicant-wired@%i.service | ||
39 | +WantedBy=multi-user.target | ||
40 | diff --git a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in | ||
41 | index 7788b38..55d2b9c 100644 | ||
42 | --- a/wpa_supplicant/systemd/wpa_supplicant.service.arg.in | ||
43 | +++ b/wpa_supplicant/systemd/wpa_supplicant.service.arg.in | ||
44 | @@ -12,4 +12,4 @@ Type=simple | ||
45 | ExecStart=@BINDIR@/wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant-%I.conf -i%I | ||
46 | |||
47 | [Install] | ||
48 | -Alias=multi-user.target.wants/wpa_supplicant@%i.service | ||
49 | +WantedBy=multi-user.target | ||
50 | -- | ||
51 | 2.7.4 | ||
52 | |||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch deleted file mode 100644 index 59640859dd..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From f7d268864a2660b7239b9a8ff5ad37faeeb751ba Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <jouni@codeaurora.org> | ||
3 | Date: Wed, 3 Jun 2020 22:41:02 +0300 | ||
4 | Subject: [PATCH 2/3] WPS UPnP: Fix event message generation using a long URL | ||
5 | path | ||
6 | |||
7 | More than about 700 character URL ended up overflowing the wpabuf used | ||
8 | for building the event notification and this resulted in the wpabuf | ||
9 | buffer overflow checks terminating the hostapd process. Fix this by | ||
10 | allocating the buffer to be large enough to contain the full URL path. | ||
11 | However, since that around 700 character limit has been the practical | ||
12 | limit for more than ten years, start explicitly enforcing that as the | ||
13 | limit or the callback URLs since any longer ones had not worked before | ||
14 | and there is no need to enable them now either. | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | CVE: CVE-2020-12695 patch #2 | ||
18 | Signed-off-by: Jouni Malinen <jouni@codeaurora.org> | ||
19 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
20 | |||
21 | --- | ||
22 | src/wps/wps_upnp.c | 9 +++++++-- | ||
23 | src/wps/wps_upnp_event.c | 3 ++- | ||
24 | 2 files changed, 9 insertions(+), 3 deletions(-) | ||
25 | |||
26 | diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c | ||
27 | index 7d4b7439940e..ab685d52ecab 100644 | ||
28 | --- a/src/wps/wps_upnp.c | ||
29 | +++ b/src/wps/wps_upnp.c | ||
30 | @@ -328,9 +328,14 @@ static void subscr_addr_add_url(struct subscription *s, const char *url, | ||
31 | int rerr; | ||
32 | size_t host_len, path_len; | ||
33 | |||
34 | - /* url MUST begin with http: */ | ||
35 | - if (url_len < 7 || os_strncasecmp(url, "http://", 7)) | ||
36 | + /* URL MUST begin with HTTP scheme. In addition, limit the length of | ||
37 | + * the URL to 700 characters which is around the limit that was | ||
38 | + * implicitly enforced for more than 10 years due to a bug in | ||
39 | + * generating the event messages. */ | ||
40 | + if (url_len < 7 || os_strncasecmp(url, "http://", 7) || url_len > 700) { | ||
41 | + wpa_printf(MSG_DEBUG, "WPS UPnP: Reject an unacceptable URL"); | ||
42 | goto fail; | ||
43 | + } | ||
44 | url += 7; | ||
45 | url_len -= 7; | ||
46 | |||
47 | diff --git a/src/wps/wps_upnp_event.c b/src/wps/wps_upnp_event.c | ||
48 | index d7e6edcc6503..08a23612f338 100644 | ||
49 | --- a/src/wps/wps_upnp_event.c | ||
50 | +++ b/src/wps/wps_upnp_event.c | ||
51 | @@ -147,7 +147,8 @@ static struct wpabuf * event_build_message(struct wps_event_ *e) | ||
52 | struct wpabuf *buf; | ||
53 | char *b; | ||
54 | |||
55 | - buf = wpabuf_alloc(1000 + wpabuf_len(e->data)); | ||
56 | + buf = wpabuf_alloc(1000 + os_strlen(e->addr->path) + | ||
57 | + wpabuf_len(e->data)); | ||
58 | if (buf == NULL) | ||
59 | return NULL; | ||
60 | wpabuf_printf(buf, "NOTIFY %s HTTP/1.1\r\n", e->addr->path); | ||
61 | -- | ||
62 | 2.20.1 | ||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch deleted file mode 100644 index 8a014ef28a..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 85aac526af8612c21b3117dadc8ef5944985b476 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <jouni@codeaurora.org> | ||
3 | Date: Thu, 4 Jun 2020 21:24:04 +0300 | ||
4 | Subject: [PATCH 3/3] WPS UPnP: Handle HTTP initiation failures for events more | ||
5 | properly | ||
6 | |||
7 | While it is appropriate to try to retransmit the event to another | ||
8 | callback URL on a failure to initiate the HTTP client connection, there | ||
9 | is no point in trying the exact same operation multiple times in a row. | ||
10 | Replve the event_retry() calls with event_addr_failure() for these cases | ||
11 | to avoid busy loops trying to repeat the same failing operation. | ||
12 | |||
13 | These potential busy loops would go through eloop callbacks, so the | ||
14 | process is not completely stuck on handling them, but unnecessary CPU | ||
15 | would be used to process the continues retries that will keep failing | ||
16 | for the same reason. | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | CVE: CVE-2020-12695 patch #2 | ||
20 | Signed-off-by: Jouni Malinen <jouni@codeaurora.org> | ||
21 | Signed-off-by: Armin Kuster <akuster@mvista.com> | ||
22 | |||
23 | --- | ||
24 | src/wps/wps_upnp_event.c | 4 ++-- | ||
25 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
26 | |||
27 | diff --git a/src/wps/wps_upnp_event.c b/src/wps/wps_upnp_event.c | ||
28 | index 08a23612f338..c0d9e41d9a38 100644 | ||
29 | --- a/src/wps/wps_upnp_event.c | ||
30 | +++ b/src/wps/wps_upnp_event.c | ||
31 | @@ -294,7 +294,7 @@ static int event_send_start(struct subscription *s) | ||
32 | |||
33 | buf = event_build_message(e); | ||
34 | if (buf == NULL) { | ||
35 | - event_retry(e, 0); | ||
36 | + event_addr_failure(e); | ||
37 | return -1; | ||
38 | } | ||
39 | |||
40 | @@ -302,7 +302,7 @@ static int event_send_start(struct subscription *s) | ||
41 | event_http_cb, e); | ||
42 | if (e->http_event == NULL) { | ||
43 | wpabuf_free(buf); | ||
44 | - event_retry(e, 0); | ||
45 | + event_addr_failure(e); | ||
46 | return -1; | ||
47 | } | ||
48 | |||
49 | -- | ||
50 | 2.20.1 | ||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-0326.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-0326.patch deleted file mode 100644 index 8c90fa3421..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-0326.patch +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | From 947272febe24a8f0ea828b5b2f35f13c3821901e Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <jouni@codeaurora.org> | ||
3 | Date: Mon, 9 Nov 2020 11:43:12 +0200 | ||
4 | Subject: [PATCH] P2P: Fix copying of secondary device types for P2P group | ||
5 | client | ||
6 | |||
7 | Parsing and copying of WPS secondary device types list was verifying | ||
8 | that the contents is not too long for the internal maximum in the case | ||
9 | of WPS messages, but similar validation was missing from the case of P2P | ||
10 | group information which encodes this information in a different | ||
11 | attribute. This could result in writing beyond the memory area assigned | ||
12 | for these entries and corrupting memory within an instance of struct | ||
13 | p2p_device. This could result in invalid operations and unexpected | ||
14 | behavior when trying to free pointers from that corrupted memory. | ||
15 | |||
16 | Upstream-Status: Backport | ||
17 | CVE: CVE-2021-0326 | ||
18 | |||
19 | Reference to upstream patch: | ||
20 | [https://w1.fi/cgit/hostap/commit/?id=947272febe24a8f0ea828b5b2f35f13c3821901e] | ||
21 | |||
22 | Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27269 | ||
23 | Fixes: e57ae6e19edf ("P2P: Keep track of secondary device types for peers") | ||
24 | Signed-off-by: Jouni Malinen <jouni@codeaurora.org> | ||
25 | Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com> | ||
26 | --- | ||
27 | src/p2p/p2p.c | 2 ++ | ||
28 | 1 file changed, 2 insertions(+) | ||
29 | |||
30 | diff --git a/src/p2p/p2p.c b/src/p2p/p2p.c | ||
31 | index a08ba02..079270f 100644 | ||
32 | --- a/src/p2p/p2p.c | ||
33 | +++ b/src/p2p/p2p.c | ||
34 | @@ -453,6 +453,8 @@ static void p2p_copy_client_info(struct p2p_device *dev, | ||
35 | dev->info.config_methods = cli->config_methods; | ||
36 | os_memcpy(dev->info.pri_dev_type, cli->pri_dev_type, 8); | ||
37 | dev->info.wps_sec_dev_type_list_len = 8 * cli->num_sec_dev_types; | ||
38 | + if (dev->info.wps_sec_dev_type_list_len > WPS_SEC_DEV_TYPE_MAX_LEN) | ||
39 | + dev->info.wps_sec_dev_type_list_len = WPS_SEC_DEV_TYPE_MAX_LEN; | ||
40 | os_memcpy(dev->info.wps_sec_dev_type_list, cli->sec_dev_types, | ||
41 | dev->info.wps_sec_dev_type_list_len); | ||
42 | } | ||
43 | -- | ||
44 | 2.17.1 | ||
45 | |||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-27803.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-27803.patch deleted file mode 100644 index 004b1dbd19..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-27803.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From 8460e3230988ef2ec13ce6b69b687e941f6cdb32 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <jouni@codeaurora.org> | ||
3 | Date: Tue, 8 Dec 2020 23:52:50 +0200 | ||
4 | Subject: [PATCH] P2P: Fix a corner case in peer addition based on PD Request | ||
5 | |||
6 | p2p_add_device() may remove the oldest entry if there is no room in the | ||
7 | peer table for a new peer. This would result in any pointer to that | ||
8 | removed entry becoming stale. A corner case with an invalid PD Request | ||
9 | frame could result in such a case ending up using (read+write) freed | ||
10 | memory. This could only by triggered when the peer table has reached its | ||
11 | maximum size and the PD Request frame is received from the P2P Device | ||
12 | Address of the oldest remaining entry and the frame has incorrect P2P | ||
13 | Device Address in the payload. | ||
14 | |||
15 | Fix this by fetching the dev pointer again after having called | ||
16 | p2p_add_device() so that the stale pointer cannot be used. | ||
17 | |||
18 | Fixes: 17bef1e97a50 ("P2P: Add peer entry based on Provision Discovery Request") | ||
19 | Signed-off-by: Jouni Malinen <jouni@codeaurora.org> | ||
20 | |||
21 | Upstream-Status: Backport | ||
22 | CVE: CVE-2021-27803 | ||
23 | |||
24 | Reference to upstream patch: | ||
25 | [https://w1.fi/cgit/hostap/commit/?id=8460e3230988ef2ec13ce6b69b687e941f6cdb32] | ||
26 | |||
27 | Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com> | ||
28 | --- | ||
29 | src/p2p/p2p_pd.c | 12 +++++------- | ||
30 | 1 file changed, 5 insertions(+), 7 deletions(-) | ||
31 | |||
32 | diff --git a/src/p2p/p2p_pd.c b/src/p2p/p2p_pd.c | ||
33 | index 3994ec0..05fd593 100644 | ||
34 | --- a/src/p2p/p2p_pd.c | ||
35 | +++ b/src/p2p/p2p_pd.c | ||
36 | @@ -595,14 +595,12 @@ void p2p_process_prov_disc_req(struct p2p_data *p2p, const u8 *sa, | ||
37 | goto out; | ||
38 | } | ||
39 | |||
40 | + dev = p2p_get_device(p2p, sa); | ||
41 | if (!dev) { | ||
42 | - dev = p2p_get_device(p2p, sa); | ||
43 | - if (!dev) { | ||
44 | - p2p_dbg(p2p, | ||
45 | - "Provision Discovery device not found " | ||
46 | - MACSTR, MAC2STR(sa)); | ||
47 | - goto out; | ||
48 | - } | ||
49 | + p2p_dbg(p2p, | ||
50 | + "Provision Discovery device not found " | ||
51 | + MACSTR, MAC2STR(sa)); | ||
52 | + goto out; | ||
53 | } | ||
54 | } else if (msg.wfd_subelems) { | ||
55 | wpabuf_free(dev->info.wfd_subelems); | ||
56 | -- | ||
57 | 2.17.1 | ||
58 | |||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-30004.patch b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-30004.patch deleted file mode 100644 index e2540fc26b..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/CVE-2021-30004.patch +++ /dev/null | |||
@@ -1,123 +0,0 @@ | |||
1 | From a0541334a6394f8237a4393b7372693cd7e96f15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Jouni Malinen <j@w1.fi> | ||
3 | Date: Sat, 13 Mar 2021 18:19:31 +0200 | ||
4 | Subject: [PATCH] ASN.1: Validate DigestAlgorithmIdentifier parameters | ||
5 | |||
6 | The supported hash algorithms do not use AlgorithmIdentifier parameters. | ||
7 | However, there are implementations that include NULL parameters in | ||
8 | addition to ones that omit the parameters. Previous implementation did | ||
9 | not check the parameters value at all which supported both these cases, | ||
10 | but did not reject any other unexpected information. | ||
11 | |||
12 | Use strict validation of digest algorithm parameters and reject any | ||
13 | unexpected value when validating a signature. This is needed to prevent | ||
14 | potential forging attacks. | ||
15 | |||
16 | Signed-off-by: Jouni Malinen <j@w1.fi> | ||
17 | |||
18 | Upstream-Status: Backport | ||
19 | CVE: CVE-2021-30004 | ||
20 | |||
21 | Reference to upstream patch: | ||
22 | [https://w1.fi/cgit/hostap/commit/?id=a0541334a6394f8237a4393b7372693cd7e96f15] | ||
23 | |||
24 | Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com> | ||
25 | --- | ||
26 | src/tls/pkcs1.c | 21 +++++++++++++++++++++ | ||
27 | src/tls/x509v3.c | 20 ++++++++++++++++++++ | ||
28 | 2 files changed, 41 insertions(+) | ||
29 | |||
30 | diff --git a/src/tls/pkcs1.c b/src/tls/pkcs1.c | ||
31 | index 141ac50..e09db07 100644 | ||
32 | --- a/src/tls/pkcs1.c | ||
33 | +++ b/src/tls/pkcs1.c | ||
34 | @@ -240,6 +240,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, | ||
35 | os_free(decrypted); | ||
36 | return -1; | ||
37 | } | ||
38 | + wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestInfo", | ||
39 | + hdr.payload, hdr.length); | ||
40 | |||
41 | pos = hdr.payload; | ||
42 | end = pos + hdr.length; | ||
43 | @@ -261,6 +263,8 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, | ||
44 | os_free(decrypted); | ||
45 | return -1; | ||
46 | } | ||
47 | + wpa_hexdump(MSG_MSGDUMP, "PKCS #1: DigestAlgorithmIdentifier", | ||
48 | + hdr.payload, hdr.length); | ||
49 | da_end = hdr.payload + hdr.length; | ||
50 | |||
51 | if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { | ||
52 | @@ -269,6 +273,23 @@ int pkcs1_v15_sig_ver(struct crypto_public_key *pk, | ||
53 | os_free(decrypted); | ||
54 | return -1; | ||
55 | } | ||
56 | + wpa_hexdump(MSG_MSGDUMP, "PKCS #1: Digest algorithm parameters", | ||
57 | + next, da_end - next); | ||
58 | + | ||
59 | + /* | ||
60 | + * RFC 5754: The correct encoding for the SHA2 algorithms would be to | ||
61 | + * omit the parameters, but there are implementation that encode these | ||
62 | + * as a NULL element. Allow these two cases and reject anything else. | ||
63 | + */ | ||
64 | + if (da_end > next && | ||
65 | + (asn1_get_next(next, da_end - next, &hdr) < 0 || | ||
66 | + !asn1_is_null(&hdr) || | ||
67 | + hdr.payload + hdr.length != da_end)) { | ||
68 | + wpa_printf(MSG_DEBUG, | ||
69 | + "PKCS #1: Unexpected digest algorithm parameters"); | ||
70 | + os_free(decrypted); | ||
71 | + return -1; | ||
72 | + } | ||
73 | |||
74 | if (!asn1_oid_equal(&oid, hash_alg)) { | ||
75 | char txt[100], txt2[100]; | ||
76 | diff --git a/src/tls/x509v3.c b/src/tls/x509v3.c | ||
77 | index 1bd5aa0..bf2289f 100644 | ||
78 | --- a/src/tls/x509v3.c | ||
79 | +++ b/src/tls/x509v3.c | ||
80 | @@ -1834,6 +1834,7 @@ int x509_check_signature(struct x509_certificate *issuer, | ||
81 | os_free(data); | ||
82 | return -1; | ||
83 | } | ||
84 | + wpa_hexdump(MSG_MSGDUMP, "X509: DigestInfo", hdr.payload, hdr.length); | ||
85 | |||
86 | pos = hdr.payload; | ||
87 | end = pos + hdr.length; | ||
88 | @@ -1855,6 +1856,8 @@ int x509_check_signature(struct x509_certificate *issuer, | ||
89 | os_free(data); | ||
90 | return -1; | ||
91 | } | ||
92 | + wpa_hexdump(MSG_MSGDUMP, "X509: DigestAlgorithmIdentifier", | ||
93 | + hdr.payload, hdr.length); | ||
94 | da_end = hdr.payload + hdr.length; | ||
95 | |||
96 | if (asn1_get_oid(hdr.payload, hdr.length, &oid, &next)) { | ||
97 | @@ -1862,6 +1865,23 @@ int x509_check_signature(struct x509_certificate *issuer, | ||
98 | os_free(data); | ||
99 | return -1; | ||
100 | } | ||
101 | + wpa_hexdump(MSG_MSGDUMP, "X509: Digest algorithm parameters", | ||
102 | + next, da_end - next); | ||
103 | + | ||
104 | + /* | ||
105 | + * RFC 5754: The correct encoding for the SHA2 algorithms would be to | ||
106 | + * omit the parameters, but there are implementation that encode these | ||
107 | + * as a NULL element. Allow these two cases and reject anything else. | ||
108 | + */ | ||
109 | + if (da_end > next && | ||
110 | + (asn1_get_next(next, da_end - next, &hdr) < 0 || | ||
111 | + !asn1_is_null(&hdr) || | ||
112 | + hdr.payload + hdr.length != da_end)) { | ||
113 | + wpa_printf(MSG_DEBUG, | ||
114 | + "X509: Unexpected digest algorithm parameters"); | ||
115 | + os_free(data); | ||
116 | + return -1; | ||
117 | + } | ||
118 | |||
119 | if (x509_sha1_oid(&oid)) { | ||
120 | if (signature->oid.oid[6] != 5 /* sha-1WithRSAEncryption */) { | ||
121 | -- | ||
122 | 2.17.1 | ||
123 | |||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig deleted file mode 100644 index f04e398fdb..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig +++ /dev/null | |||
@@ -1,552 +0,0 @@ | |||
1 | # Example wpa_supplicant build time configuration | ||
2 | # | ||
3 | # This file lists the configuration options that are used when building the | ||
4 | # hostapd binary. All lines starting with # are ignored. Configuration option | ||
5 | # lines must be commented out complete, if they are not to be included, i.e., | ||
6 | # just setting VARIABLE=n is not disabling that variable. | ||
7 | # | ||
8 | # This file is included in Makefile, so variables like CFLAGS and LIBS can also | ||
9 | # be modified from here. In most cases, these lines should use += in order not | ||
10 | # to override previous values of the variables. | ||
11 | |||
12 | |||
13 | # Uncomment following two lines and fix the paths if you have installed OpenSSL | ||
14 | # or GnuTLS in non-default location | ||
15 | #CFLAGS += -I/usr/local/openssl/include | ||
16 | #LIBS += -L/usr/local/openssl/lib | ||
17 | |||
18 | # Some Red Hat versions seem to include kerberos header files from OpenSSL, but | ||
19 | # the kerberos files are not in the default include path. Following line can be | ||
20 | # used to fix build issues on such systems (krb5.h not found). | ||
21 | #CFLAGS += -I/usr/include/kerberos | ||
22 | |||
23 | # Example configuration for various cross-compilation platforms | ||
24 | |||
25 | #### sveasoft (e.g., for Linksys WRT54G) ###################################### | ||
26 | #CC=mipsel-uclibc-gcc | ||
27 | #CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc | ||
28 | #CFLAGS += -Os | ||
29 | #CPPFLAGS += -I../src/include -I../../src/router/openssl/include | ||
30 | #LIBS += -L/opt/brcm/hndtools-mipsel-uclibc-0.9.19/lib -lssl | ||
31 | ############################################################################### | ||
32 | |||
33 | #### openwrt (e.g., for Linksys WRT54G) ####################################### | ||
34 | #CC=mipsel-uclibc-gcc | ||
35 | #CC=/opt/brcm/hndtools-mipsel-uclibc/bin/mipsel-uclibc-gcc | ||
36 | #CFLAGS += -Os | ||
37 | #CPPFLAGS=-I../src/include -I../openssl-0.9.7d/include \ | ||
38 | # -I../WRT54GS/release/src/include | ||
39 | #LIBS = -lssl | ||
40 | ############################################################################### | ||
41 | |||
42 | |||
43 | # Driver interface for Host AP driver | ||
44 | CONFIG_DRIVER_HOSTAP=y | ||
45 | |||
46 | # Driver interface for Agere driver | ||
47 | #CONFIG_DRIVER_HERMES=y | ||
48 | # Change include directories to match with the local setup | ||
49 | #CFLAGS += -I../../hcf -I../../include -I../../include/hcf | ||
50 | #CFLAGS += -I../../include/wireless | ||
51 | |||
52 | # Driver interface for madwifi driver | ||
53 | # Deprecated; use CONFIG_DRIVER_WEXT=y instead. | ||
54 | #CONFIG_DRIVER_MADWIFI=y | ||
55 | # Set include directory to the madwifi source tree | ||
56 | #CFLAGS += -I../../madwifi | ||
57 | |||
58 | # Driver interface for ndiswrapper | ||
59 | # Deprecated; use CONFIG_DRIVER_WEXT=y instead. | ||
60 | #CONFIG_DRIVER_NDISWRAPPER=y | ||
61 | |||
62 | # Driver interface for Atmel driver | ||
63 | # CONFIG_DRIVER_ATMEL=y | ||
64 | |||
65 | # Driver interface for old Broadcom driver | ||
66 | # Please note that the newer Broadcom driver ("hybrid Linux driver") supports | ||
67 | # Linux wireless extensions and does not need (or even work) with the old | ||
68 | # driver wrapper. Use CONFIG_DRIVER_WEXT=y with that driver. | ||
69 | #CONFIG_DRIVER_BROADCOM=y | ||
70 | # Example path for wlioctl.h; change to match your configuration | ||
71 | #CFLAGS += -I/opt/WRT54GS/release/src/include | ||
72 | |||
73 | # Driver interface for Intel ipw2100/2200 driver | ||
74 | # Deprecated; use CONFIG_DRIVER_WEXT=y instead. | ||
75 | #CONFIG_DRIVER_IPW=y | ||
76 | |||
77 | # Driver interface for Ralink driver | ||
78 | #CONFIG_DRIVER_RALINK=y | ||
79 | |||
80 | # Driver interface for generic Linux wireless extensions | ||
81 | # Note: WEXT is deprecated in the current Linux kernel version and no new | ||
82 | # functionality is added to it. nl80211-based interface is the new | ||
83 | # replacement for WEXT and its use allows wpa_supplicant to properly control | ||
84 | # the driver to improve existing functionality like roaming and to support new | ||
85 | # functionality. | ||
86 | CONFIG_DRIVER_WEXT=y | ||
87 | |||
88 | # Driver interface for Linux drivers using the nl80211 kernel interface | ||
89 | CONFIG_DRIVER_NL80211=y | ||
90 | |||
91 | # driver_nl80211.c requires libnl. If you are compiling it yourself | ||
92 | # you may need to point hostapd to your version of libnl. | ||
93 | # | ||
94 | #CFLAGS += -I$<path to libnl include files> | ||
95 | #LIBS += -L$<path to libnl library files> | ||
96 | |||
97 | # Use libnl v2.0 (or 3.0) libraries. | ||
98 | #CONFIG_LIBNL20=y | ||
99 | |||
100 | # Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored) | ||
101 | CONFIG_LIBNL32=y | ||
102 | |||
103 | |||
104 | # Driver interface for FreeBSD net80211 layer (e.g., Atheros driver) | ||
105 | #CONFIG_DRIVER_BSD=y | ||
106 | #CFLAGS += -I/usr/local/include | ||
107 | #LIBS += -L/usr/local/lib | ||
108 | #LIBS_p += -L/usr/local/lib | ||
109 | #LIBS_c += -L/usr/local/lib | ||
110 | |||
111 | # Driver interface for Windows NDIS | ||
112 | #CONFIG_DRIVER_NDIS=y | ||
113 | #CFLAGS += -I/usr/include/w32api/ddk | ||
114 | #LIBS += -L/usr/local/lib | ||
115 | # For native build using mingw | ||
116 | #CONFIG_NATIVE_WINDOWS=y | ||
117 | # Additional directories for cross-compilation on Linux host for mingw target | ||
118 | #CFLAGS += -I/opt/mingw/mingw32/include/ddk | ||
119 | #LIBS += -L/opt/mingw/mingw32/lib | ||
120 | #CC=mingw32-gcc | ||
121 | # By default, driver_ndis uses WinPcap for low-level operations. This can be | ||
122 | # replaced with the following option which replaces WinPcap calls with NDISUIO. | ||
123 | # However, this requires that WZC is disabled (net stop wzcsvc) before starting | ||
124 | # wpa_supplicant. | ||
125 | # CONFIG_USE_NDISUIO=y | ||
126 | |||
127 | # Driver interface for development testing | ||
128 | #CONFIG_DRIVER_TEST=y | ||
129 | |||
130 | # Driver interface for wired Ethernet drivers | ||
131 | CONFIG_DRIVER_WIRED=y | ||
132 | |||
133 | # Driver interface for the Broadcom RoboSwitch family | ||
134 | #CONFIG_DRIVER_ROBOSWITCH=y | ||
135 | |||
136 | # Driver interface for no driver (e.g., WPS ER only) | ||
137 | #CONFIG_DRIVER_NONE=y | ||
138 | |||
139 | # Enable IEEE 802.1X Supplicant (automatically included if any EAP method is | ||
140 | # included) | ||
141 | CONFIG_IEEE8021X_EAPOL=y | ||
142 | |||
143 | # EAP-MD5 | ||
144 | CONFIG_EAP_MD5=y | ||
145 | |||
146 | # EAP-MSCHAPv2 | ||
147 | CONFIG_EAP_MSCHAPV2=y | ||
148 | |||
149 | # EAP-TLS | ||
150 | CONFIG_EAP_TLS=y | ||
151 | |||
152 | # EAL-PEAP | ||
153 | CONFIG_EAP_PEAP=y | ||
154 | |||
155 | # EAP-TTLS | ||
156 | CONFIG_EAP_TTLS=y | ||
157 | |||
158 | # EAP-FAST | ||
159 | # Note: If OpenSSL is used as the TLS library, OpenSSL 1.0 or newer is needed | ||
160 | # for EAP-FAST support. Older OpenSSL releases would need to be patched, e.g., | ||
161 | # with openssl-0.9.8x-tls-extensions.patch, to add the needed functions. | ||
162 | #CONFIG_EAP_FAST=y | ||
163 | |||
164 | # EAP-GTC | ||
165 | CONFIG_EAP_GTC=y | ||
166 | |||
167 | # EAP-OTP | ||
168 | CONFIG_EAP_OTP=y | ||
169 | |||
170 | # EAP-SIM (enable CONFIG_PCSC, if EAP-SIM is used) | ||
171 | #CONFIG_EAP_SIM=y | ||
172 | |||
173 | # EAP-PSK (experimental; this is _not_ needed for WPA-PSK) | ||
174 | #CONFIG_EAP_PSK=y | ||
175 | |||
176 | # EAP-pwd (secure authentication using only a password) | ||
177 | #CONFIG_EAP_PWD=y | ||
178 | |||
179 | # EAP-PAX | ||
180 | #CONFIG_EAP_PAX=y | ||
181 | |||
182 | # LEAP | ||
183 | CONFIG_EAP_LEAP=y | ||
184 | |||
185 | # EAP-AKA (enable CONFIG_PCSC, if EAP-AKA is used) | ||
186 | #CONFIG_EAP_AKA=y | ||
187 | |||
188 | # EAP-AKA' (enable CONFIG_PCSC, if EAP-AKA' is used). | ||
189 | # This requires CONFIG_EAP_AKA to be enabled, too. | ||
190 | #CONFIG_EAP_AKA_PRIME=y | ||
191 | |||
192 | # Enable USIM simulator (Milenage) for EAP-AKA | ||
193 | #CONFIG_USIM_SIMULATOR=y | ||
194 | |||
195 | # EAP-SAKE | ||
196 | #CONFIG_EAP_SAKE=y | ||
197 | |||
198 | # EAP-GPSK | ||
199 | #CONFIG_EAP_GPSK=y | ||
200 | # Include support for optional SHA256 cipher suite in EAP-GPSK | ||
201 | #CONFIG_EAP_GPSK_SHA256=y | ||
202 | |||
203 | # EAP-TNC and related Trusted Network Connect support (experimental) | ||
204 | #CONFIG_EAP_TNC=y | ||
205 | |||
206 | # Wi-Fi Protected Setup (WPS) | ||
207 | CONFIG_WPS=y | ||
208 | # Enable WSC 2.0 support | ||
209 | #CONFIG_WPS2=y | ||
210 | # Enable WPS external registrar functionality | ||
211 | #CONFIG_WPS_ER=y | ||
212 | # Disable credentials for an open network by default when acting as a WPS | ||
213 | # registrar. | ||
214 | #CONFIG_WPS_REG_DISABLE_OPEN=y | ||
215 | # Enable WPS support with NFC config method | ||
216 | #CONFIG_WPS_NFC=y | ||
217 | |||
218 | # EAP-IKEv2 | ||
219 | #CONFIG_EAP_IKEV2=y | ||
220 | |||
221 | # EAP-EKE | ||
222 | #CONFIG_EAP_EKE=y | ||
223 | |||
224 | # PKCS#12 (PFX) support (used to read private key and certificate file from | ||
225 | # a file that usually has extension .p12 or .pfx) | ||
226 | CONFIG_PKCS12=y | ||
227 | |||
228 | # Smartcard support (i.e., private key on a smartcard), e.g., with openssl | ||
229 | # engine. | ||
230 | CONFIG_SMARTCARD=y | ||
231 | |||
232 | # PC/SC interface for smartcards (USIM, GSM SIM) | ||
233 | # Enable this if EAP-SIM or EAP-AKA is included | ||
234 | #CONFIG_PCSC=y | ||
235 | |||
236 | # Support HT overrides (disable HT/HT40, mask MCS rates, etc.) | ||
237 | #CONFIG_HT_OVERRIDES=y | ||
238 | |||
239 | # Support VHT overrides (disable VHT, mask MCS rates, etc.) | ||
240 | #CONFIG_VHT_OVERRIDES=y | ||
241 | |||
242 | # Development testing | ||
243 | #CONFIG_EAPOL_TEST=y | ||
244 | |||
245 | # Select control interface backend for external programs, e.g, wpa_cli: | ||
246 | # unix = UNIX domain sockets (default for Linux/*BSD) | ||
247 | # udp = UDP sockets using localhost (127.0.0.1) | ||
248 | # named_pipe = Windows Named Pipe (default for Windows) | ||
249 | # udp-remote = UDP sockets with remote access (only for tests systems/purpose) | ||
250 | # y = use default (backwards compatibility) | ||
251 | # If this option is commented out, control interface is not included in the | ||
252 | # build. | ||
253 | CONFIG_CTRL_IFACE=y | ||
254 | |||
255 | # Include support for GNU Readline and History Libraries in wpa_cli. | ||
256 | # When building a wpa_cli binary for distribution, please note that these | ||
257 | # libraries are licensed under GPL and as such, BSD license may not apply for | ||
258 | # the resulting binary. | ||
259 | #CONFIG_READLINE=y | ||
260 | |||
261 | # Include internal line edit mode in wpa_cli. This can be used as a replacement | ||
262 | # for GNU Readline to provide limited command line editing and history support. | ||
263 | #CONFIG_WPA_CLI_EDIT=y | ||
264 | |||
265 | # Remove debugging code that is printing out debug message to stdout. | ||
266 | # This can be used to reduce the size of the wpa_supplicant considerably | ||
267 | # if debugging code is not needed. The size reduction can be around 35% | ||
268 | # (e.g., 90 kB). | ||
269 | #CONFIG_NO_STDOUT_DEBUG=y | ||
270 | |||
271 | # Remove WPA support, e.g., for wired-only IEEE 802.1X supplicant, to save | ||
272 | # 35-50 kB in code size. | ||
273 | #CONFIG_NO_WPA=y | ||
274 | |||
275 | # Remove IEEE 802.11i/WPA-Personal ASCII passphrase support | ||
276 | # This option can be used to reduce code size by removing support for | ||
277 | # converting ASCII passphrases into PSK. If this functionality is removed, the | ||
278 | # PSK can only be configured as the 64-octet hexstring (e.g., from | ||
279 | # wpa_passphrase). This saves about 0.5 kB in code size. | ||
280 | #CONFIG_NO_WPA_PASSPHRASE=y | ||
281 | |||
282 | # Disable scan result processing (ap_mode=1) to save code size by about 1 kB. | ||
283 | # This can be used if ap_scan=1 mode is never enabled. | ||
284 | #CONFIG_NO_SCAN_PROCESSING=y | ||
285 | |||
286 | # Select configuration backend: | ||
287 | # file = text file (e.g., wpa_supplicant.conf; note: the configuration file | ||
288 | # path is given on command line, not here; this option is just used to | ||
289 | # select the backend that allows configuration files to be used) | ||
290 | # winreg = Windows registry (see win_example.reg for an example) | ||
291 | CONFIG_BACKEND=file | ||
292 | |||
293 | # Remove configuration write functionality (i.e., to allow the configuration | ||
294 | # file to be updated based on runtime configuration changes). The runtime | ||
295 | # configuration can still be changed, the changes are just not going to be | ||
296 | # persistent over restarts. This option can be used to reduce code size by | ||
297 | # about 3.5 kB. | ||
298 | #CONFIG_NO_CONFIG_WRITE=y | ||
299 | |||
300 | # Remove support for configuration blobs to reduce code size by about 1.5 kB. | ||
301 | #CONFIG_NO_CONFIG_BLOBS=y | ||
302 | |||
303 | # Select program entry point implementation: | ||
304 | # main = UNIX/POSIX like main() function (default) | ||
305 | # main_winsvc = Windows service (read parameters from registry) | ||
306 | # main_none = Very basic example (development use only) | ||
307 | #CONFIG_MAIN=main | ||
308 | |||
309 | # Select wrapper for operatins system and C library specific functions | ||
310 | # unix = UNIX/POSIX like systems (default) | ||
311 | # win32 = Windows systems | ||
312 | # none = Empty template | ||
313 | #CONFIG_OS=unix | ||
314 | |||
315 | # Select event loop implementation | ||
316 | # eloop = select() loop (default) | ||
317 | # eloop_win = Windows events and WaitForMultipleObject() loop | ||
318 | #CONFIG_ELOOP=eloop | ||
319 | |||
320 | # Should we use poll instead of select? Select is used by default. | ||
321 | #CONFIG_ELOOP_POLL=y | ||
322 | |||
323 | # Select layer 2 packet implementation | ||
324 | # linux = Linux packet socket (default) | ||
325 | # pcap = libpcap/libdnet/WinPcap | ||
326 | # freebsd = FreeBSD libpcap | ||
327 | # winpcap = WinPcap with receive thread | ||
328 | # ndis = Windows NDISUIO (note: requires CONFIG_USE_NDISUIO=y) | ||
329 | # none = Empty template | ||
330 | #CONFIG_L2_PACKET=linux | ||
331 | |||
332 | # PeerKey handshake for Station to Station Link (IEEE 802.11e DLS) | ||
333 | CONFIG_PEERKEY=y | ||
334 | |||
335 | # IEEE 802.11w (management frame protection), also known as PMF | ||
336 | # Driver support is also needed for IEEE 802.11w. | ||
337 | #CONFIG_IEEE80211W=y | ||
338 | |||
339 | # Select TLS implementation | ||
340 | # openssl = OpenSSL (default) | ||
341 | # gnutls = GnuTLS | ||
342 | # internal = Internal TLSv1 implementation (experimental) | ||
343 | # none = Empty template | ||
344 | #CONFIG_TLS=openssl | ||
345 | |||
346 | # TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.1) | ||
347 | # can be enabled to get a stronger construction of messages when block ciphers | ||
348 | # are used. It should be noted that some existing TLS v1.0 -based | ||
349 | # implementation may not be compatible with TLS v1.1 message (ClientHello is | ||
350 | # sent prior to negotiating which version will be used) | ||
351 | #CONFIG_TLSV11=y | ||
352 | |||
353 | # TLS-based EAP methods require at least TLS v1.0. Newer version of TLS (v1.2) | ||
354 | # can be enabled to enable use of stronger crypto algorithms. It should be | ||
355 | # noted that some existing TLS v1.0 -based implementation may not be compatible | ||
356 | # with TLS v1.2 message (ClientHello is sent prior to negotiating which version | ||
357 | # will be used) | ||
358 | #CONFIG_TLSV12=y | ||
359 | |||
360 | # If CONFIG_TLS=internal is used, additional library and include paths are | ||
361 | # needed for LibTomMath. Alternatively, an integrated, minimal version of | ||
362 | # LibTomMath can be used. See beginning of libtommath.c for details on benefits | ||
363 | # and drawbacks of this option. | ||
364 | #CONFIG_INTERNAL_LIBTOMMATH=y | ||
365 | #ifndef CONFIG_INTERNAL_LIBTOMMATH | ||
366 | #LTM_PATH=/usr/src/libtommath-0.39 | ||
367 | #CFLAGS += -I$(LTM_PATH) | ||
368 | #LIBS += -L$(LTM_PATH) | ||
369 | #LIBS_p += -L$(LTM_PATH) | ||
370 | #endif | ||
371 | # At the cost of about 4 kB of additional binary size, the internal LibTomMath | ||
372 | # can be configured to include faster routines for exptmod, sqr, and div to | ||
373 | # speed up DH and RSA calculation considerably | ||
374 | #CONFIG_INTERNAL_LIBTOMMATH_FAST=y | ||
375 | |||
376 | # Include NDIS event processing through WMI into wpa_supplicant/wpasvc. | ||
377 | # This is only for Windows builds and requires WMI-related header files and | ||
378 | # WbemUuid.Lib from Platform SDK even when building with MinGW. | ||
379 | #CONFIG_NDIS_EVENTS_INTEGRATED=y | ||
380 | #PLATFORMSDKLIB="/opt/Program Files/Microsoft Platform SDK/Lib" | ||
381 | |||
382 | # Add support for old DBus control interface | ||
383 | # (fi.epitest.hostap.WPASupplicant) | ||
384 | #CONFIG_CTRL_IFACE_DBUS=y | ||
385 | |||
386 | # Add support for new DBus control interface | ||
387 | # (fi.w1.hostap.wpa_supplicant1) | ||
388 | CONFIG_CTRL_IFACE_DBUS_NEW=y | ||
389 | |||
390 | # Add introspection support for new DBus control interface | ||
391 | #CONFIG_CTRL_IFACE_DBUS_INTRO=y | ||
392 | |||
393 | # Add support for loading EAP methods dynamically as shared libraries. | ||
394 | # When this option is enabled, each EAP method can be either included | ||
395 | # statically (CONFIG_EAP_<method>=y) or dynamically (CONFIG_EAP_<method>=dyn). | ||
396 | # Dynamic EAP methods are build as shared objects (eap_*.so) and they need to | ||
397 | # be loaded in the beginning of the wpa_supplicant configuration file | ||
398 | # (see load_dynamic_eap parameter in the example file) before being used in | ||
399 | # the network blocks. | ||
400 | # | ||
401 | # Note that some shared parts of EAP methods are included in the main program | ||
402 | # and in order to be able to use dynamic EAP methods using these parts, the | ||
403 | # main program must have been build with the EAP method enabled (=y or =dyn). | ||
404 | # This means that EAP-TLS/PEAP/TTLS/FAST cannot be added as dynamic libraries | ||
405 | # unless at least one of them was included in the main build to force inclusion | ||
406 | # of the shared code. Similarly, at least one of EAP-SIM/AKA must be included | ||
407 | # in the main build to be able to load these methods dynamically. | ||
408 | # | ||
409 | # Please also note that using dynamic libraries will increase the total binary | ||
410 | # size. Thus, it may not be the best option for targets that have limited | ||
411 | # amount of memory/flash. | ||
412 | #CONFIG_DYNAMIC_EAP_METHODS=y | ||
413 | |||
414 | # IEEE Std 802.11r-2008 (Fast BSS Transition) | ||
415 | #CONFIG_IEEE80211R=y | ||
416 | |||
417 | # Add support for writing debug log to a file (/tmp/wpa_supplicant-log-#.txt) | ||
418 | #CONFIG_DEBUG_FILE=y | ||
419 | |||
420 | # Send debug messages to syslog instead of stdout | ||
421 | #CONFIG_DEBUG_SYSLOG=y | ||
422 | # Set syslog facility for debug messages | ||
423 | #CONFIG_DEBUG_SYSLOG_FACILITY=LOG_DAEMON | ||
424 | |||
425 | # Add support for sending all debug messages (regardless of debug verbosity) | ||
426 | # to the Linux kernel tracing facility. This helps debug the entire stack by | ||
427 | # making it easy to record everything happening from the driver up into the | ||
428 | # same file, e.g., using trace-cmd. | ||
429 | #CONFIG_DEBUG_LINUX_TRACING=y | ||
430 | |||
431 | # Enable privilege separation (see README 'Privilege separation' for details) | ||
432 | #CONFIG_PRIVSEP=y | ||
433 | |||
434 | # Enable mitigation against certain attacks against TKIP by delaying Michael | ||
435 | # MIC error reports by a random amount of time between 0 and 60 seconds | ||
436 | #CONFIG_DELAYED_MIC_ERROR_REPORT=y | ||
437 | |||
438 | # Enable tracing code for developer debugging | ||
439 | # This tracks use of memory allocations and other registrations and reports | ||
440 | # incorrect use with a backtrace of call (or allocation) location. | ||
441 | #CONFIG_WPA_TRACE=y | ||
442 | # For BSD, uncomment these. | ||
443 | #LIBS += -lexecinfo | ||
444 | #LIBS_p += -lexecinfo | ||
445 | #LIBS_c += -lexecinfo | ||
446 | |||
447 | # Use libbfd to get more details for developer debugging | ||
448 | # This enables use of libbfd to get more detailed symbols for the backtraces | ||
449 | # generated by CONFIG_WPA_TRACE=y. | ||
450 | #CONFIG_WPA_TRACE_BFD=y | ||
451 | # For BSD, uncomment these. | ||
452 | #LIBS += -lbfd -liberty -lz | ||
453 | #LIBS_p += -lbfd -liberty -lz | ||
454 | #LIBS_c += -lbfd -liberty -lz | ||
455 | |||
456 | CONFIG_TLS = %ssl% | ||
457 | CONFIG_CTRL_IFACE_DBUS=y | ||
458 | CONFIG_CTRL_IFACE_DBUS_NEW=y | ||
459 | |||
460 | # wpa_supplicant depends on strong random number generation being available | ||
461 | # from the operating system. os_get_random() function is used to fetch random | ||
462 | # data when needed, e.g., for key generation. On Linux and BSD systems, this | ||
463 | # works by reading /dev/urandom. It should be noted that the OS entropy pool | ||
464 | # needs to be properly initialized before wpa_supplicant is started. This is | ||
465 | # important especially on embedded devices that do not have a hardware random | ||
466 | # number generator and may by default start up with minimal entropy available | ||
467 | # for random number generation. | ||
468 | # | ||
469 | # As a safety net, wpa_supplicant is by default trying to internally collect | ||
470 | # additional entropy for generating random data to mix in with the data fetched | ||
471 | # from the OS. This by itself is not considered to be very strong, but it may | ||
472 | # help in cases where the system pool is not initialized properly. However, it | ||
473 | # is very strongly recommended that the system pool is initialized with enough | ||
474 | # entropy either by using hardware assisted random number generator or by | ||
475 | # storing state over device reboots. | ||
476 | # | ||
477 | # wpa_supplicant can be configured to maintain its own entropy store over | ||
478 | # restarts to enhance random number generation. This is not perfect, but it is | ||
479 | # much more secure than using the same sequence of random numbers after every | ||
480 | # reboot. This can be enabled with -e<entropy file> command line option. The | ||
481 | # specified file needs to be readable and writable by wpa_supplicant. | ||
482 | # | ||
483 | # If the os_get_random() is known to provide strong random data (e.g., on | ||
484 | # Linux/BSD, the board in question is known to have reliable source of random | ||
485 | # data from /dev/urandom), the internal wpa_supplicant random pool can be | ||
486 | # disabled. This will save some in binary size and CPU use. However, this | ||
487 | # should only be considered for builds that are known to be used on devices | ||
488 | # that meet the requirements described above. | ||
489 | #CONFIG_NO_RANDOM_POOL=y | ||
490 | |||
491 | # IEEE 802.11n (High Throughput) support (mainly for AP mode) | ||
492 | #CONFIG_IEEE80211N=y | ||
493 | |||
494 | # IEEE 802.11ac (Very High Throughput) support (mainly for AP mode) | ||
495 | # (depends on CONFIG_IEEE80211N) | ||
496 | #CONFIG_IEEE80211AC=y | ||
497 | |||
498 | # Wireless Network Management (IEEE Std 802.11v-2011) | ||
499 | # Note: This is experimental and not complete implementation. | ||
500 | #CONFIG_WNM=y | ||
501 | |||
502 | # Interworking (IEEE 802.11u) | ||
503 | # This can be used to enable functionality to improve interworking with | ||
504 | # external networks (GAS/ANQP to learn more about the networks and network | ||
505 | # selection based on available credentials). | ||
506 | #CONFIG_INTERWORKING=y | ||
507 | |||
508 | # Hotspot 2.0 | ||
509 | #CONFIG_HS20=y | ||
510 | |||
511 | # Disable roaming in wpa_supplicant | ||
512 | #CONFIG_NO_ROAMING=y | ||
513 | |||
514 | # AP mode operations with wpa_supplicant | ||
515 | # This can be used for controlling AP mode operations with wpa_supplicant. It | ||
516 | # should be noted that this is mainly aimed at simple cases like | ||
517 | # WPA2-Personal while more complex configurations like WPA2-Enterprise with an | ||
518 | # external RADIUS server can be supported with hostapd. | ||
519 | CONFIG_AP=y | ||
520 | |||
521 | CONFIG_BGSCAN_SIMPLE=y | ||
522 | |||
523 | # P2P (Wi-Fi Direct) | ||
524 | # This can be used to enable P2P support in wpa_supplicant. See README-P2P for | ||
525 | # more information on P2P operations. | ||
526 | #CONFIG_P2P=y | ||
527 | |||
528 | # Enable TDLS support | ||
529 | #CONFIG_TDLS=y | ||
530 | |||
531 | # Wi-Fi Direct | ||
532 | # This can be used to enable Wi-Fi Direct extensions for P2P using an external | ||
533 | # program to control the additional information exchanges in the messages. | ||
534 | #CONFIG_WIFI_DISPLAY=y | ||
535 | |||
536 | # Autoscan | ||
537 | # This can be used to enable automatic scan support in wpa_supplicant. | ||
538 | # See wpa_supplicant.conf for more information on autoscan usage. | ||
539 | # | ||
540 | # Enabling directly a module will enable autoscan support. | ||
541 | # For exponential module: | ||
542 | CONFIG_AUTOSCAN_EXPONENTIAL=y | ||
543 | # For periodic module: | ||
544 | #CONFIG_AUTOSCAN_PERIODIC=y | ||
545 | |||
546 | # Password (and passphrase, etc.) backend for external storage | ||
547 | # These optional mechanisms can be used to add support for storing passwords | ||
548 | # and other secrets in external (to wpa_supplicant) location. This allows, for | ||
549 | # example, operating system specific key storage to be used | ||
550 | # | ||
551 | # External password backend for testing purposes (developer use) | ||
552 | #CONFIG_EXT_PASSWORD_TEST=y | ||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb new file mode 100644 index 0000000000..6dc76494f7 --- /dev/null +++ b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.11.bb | |||
@@ -0,0 +1,137 @@ | |||
1 | SUMMARY = "Client for Wi-Fi Protected Access (WPA)" | ||
2 | DESCRIPTION = "wpa_supplicant is a WPA Supplicant for Linux, BSD, Mac OS X, and Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wlan driver." | ||
3 | HOMEPAGE = "http://w1.fi/wpa_supplicant/" | ||
4 | BUGTRACKER = "http://w1.fi/security/" | ||
5 | SECTION = "network" | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=5ebcb90236d1ad640558c3d3cd3035df \ | ||
8 | file://README;beginline=1;endline=56;md5=6e4b25e7d74bfc44a32ba37bdf5210a6 \ | ||
9 | file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=f5ccd57ea91e04800edb88267bf8eae4" | ||
10 | |||
11 | DEPENDS = "dbus libnl" | ||
12 | |||
13 | SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \ | ||
14 | file://wpa-supplicant.sh \ | ||
15 | file://wpa_supplicant.conf \ | ||
16 | file://wpa_supplicant.conf-sane \ | ||
17 | file://99_wpa_supplicant \ | ||
18 | file://0001-macsec_linux-Hardware-offload-requires-Linux-headers.patch \ | ||
19 | " | ||
20 | SRC_URI[sha256sum] = "912ea06f74e30a8e36fbb68064d6cdff218d8d591db0fc5d75dee6c81ac7fc0a" | ||
21 | |||
22 | S = "${UNPACKDIR}/wpa_supplicant-${PV}" | ||
23 | |||
24 | inherit pkgconfig systemd | ||
25 | |||
26 | PACKAGECONFIG ?= "openssl" | ||
27 | PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt" | ||
28 | PACKAGECONFIG[openssl] = ",,openssl" | ||
29 | |||
30 | CVE_PRODUCT = "wpa_supplicant" | ||
31 | |||
32 | CVE_STATUS[CVE-2024-5290] = "not-applicable-platform: this only affects Ubuntu and other platforms patching wpa-supplicant" | ||
33 | |||
34 | EXTRA_OEMAKE = "'LIBDIR=${libdir}' 'INCDIR=${includedir}' 'BINDIR=${sbindir}'" | ||
35 | |||
36 | do_configure () { | ||
37 | ${MAKE} -C wpa_supplicant clean | ||
38 | sed -e '/^CONFIG_TLS=/d' <wpa_supplicant/defconfig >wpa_supplicant/.config | ||
39 | |||
40 | if ${@ bb.utils.contains('PACKAGECONFIG', 'openssl', 'true', 'false', d) }; then | ||
41 | echo 'CONFIG_TLS=openssl' >>wpa_supplicant/.config | ||
42 | elif ${@ bb.utils.contains('PACKAGECONFIG', 'gnutls', 'true', 'false', d) }; then | ||
43 | echo 'CONFIG_TLS=gnutls' >>wpa_supplicant/.config | ||
44 | sed -i -e 's/\(^CONFIG_DPP=\)/#\1/' \ | ||
45 | -e 's/\(^CONFIG_EAP_PWD=\)/#\1/' \ | ||
46 | -e 's/\(^CONFIG_SAE=\)/#\1/' wpa_supplicant/.config | ||
47 | fi | ||
48 | |||
49 | # For rebuild | ||
50 | rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d | ||
51 | } | ||
52 | |||
53 | do_compile () { | ||
54 | oe_runmake -C wpa_supplicant | ||
55 | if [ -z "${DISABLE_STATIC}" ]; then | ||
56 | oe_runmake -C wpa_supplicant libwpa_client.a | ||
57 | fi | ||
58 | } | ||
59 | |||
60 | do_install () { | ||
61 | oe_runmake -C wpa_supplicant DESTDIR="${D}" install | ||
62 | |||
63 | install -d ${D}${docdir}/wpa_supplicant | ||
64 | install -m 644 wpa_supplicant/README ${UNPACKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant | ||
65 | |||
66 | install -d ${D}${sysconfdir} | ||
67 | install -m 600 ${UNPACKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf | ||
68 | |||
69 | install -d ${D}${sysconfdir}/network/if-pre-up.d/ | ||
70 | install -d ${D}${sysconfdir}/network/if-post-down.d/ | ||
71 | install -d ${D}${sysconfdir}/network/if-down.d/ | ||
72 | install -m 755 ${UNPACKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant | ||
73 | ln -sf ../if-pre-up.d/wpa-supplicant ${D}${sysconfdir}/network/if-post-down.d/wpa-supplicant | ||
74 | |||
75 | install -d ${D}/${sysconfdir}/dbus-1/system.d | ||
76 | install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d | ||
77 | install -d ${D}/${datadir}/dbus-1/system-services | ||
78 | install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services | ||
79 | |||
80 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
81 | install -d ${D}/${systemd_system_unitdir} | ||
82 | install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_system_unitdir} | ||
83 | fi | ||
84 | |||
85 | install -d ${D}/etc/default/volatiles | ||
86 | install -m 0644 ${UNPACKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles | ||
87 | |||
88 | install -d ${D}${includedir} | ||
89 | install -m 0644 ${S}/src/common/wpa_ctrl.h ${D}${includedir} | ||
90 | |||
91 | if [ -z "${DISABLE_STATIC}" ]; then | ||
92 | install -d ${D}${libdir} | ||
93 | install -m 0644 wpa_supplicant/libwpa_client.a ${D}${libdir} | ||
94 | fi | ||
95 | } | ||
96 | |||
97 | pkg_postinst:${PN} () { | ||
98 | # If we're offline, we don't need to do this. | ||
99 | if [ "x$D" = "x" ]; then | ||
100 | killall -q -HUP dbus-daemon || true | ||
101 | fi | ||
102 | } | ||
103 | |||
104 | PACKAGE_BEFORE_PN += "${PN}-passphrase ${PN}-cli" | ||
105 | PACKAGES =+ "${PN}-lib" | ||
106 | PACKAGES += "${PN}-plugins" | ||
107 | ALLOW_EMPTY:${PN}-plugins = "1" | ||
108 | |||
109 | PACKAGES_DYNAMIC += "^${PN}-plugin-.*$" | ||
110 | NOAUTOPACKAGEDEBUG = "1" | ||
111 | |||
112 | FILES:${PN}-passphrase = "${sbindir}/wpa_passphrase" | ||
113 | FILES:${PN}-cli = "${sbindir}/wpa_cli" | ||
114 | FILES:${PN}-lib = "${libdir}/libwpa_client*${SOLIBSDEV}" | ||
115 | FILES:${PN} += "${datadir}/dbus-1/system-services/* ${systemd_system_unitdir}/*" | ||
116 | FILES:${PN}-dbg += "${sbindir}/.debug ${libdir}/.debug" | ||
117 | |||
118 | CONFFILES:${PN} += "${sysconfdir}/wpa_supplicant.conf" | ||
119 | |||
120 | RRECOMMENDS:${PN} = "${PN}-passphrase ${PN}-cli ${PN}-plugins" | ||
121 | |||
122 | SYSTEMD_SERVICE:${PN} = "wpa_supplicant.service" | ||
123 | SYSTEMD_AUTO_ENABLE = "disable" | ||
124 | |||
125 | python split_wpa_supplicant_libs () { | ||
126 | libdir = d.expand('${libdir}/wpa_supplicant') | ||
127 | dbglibdir = os.path.join(libdir, '.debug') | ||
128 | |||
129 | split_packages = do_split_packages(d, libdir, r'^(.*)\.so', '${PN}-plugin-%s', 'wpa_supplicant %s plugin', prepend=True) | ||
130 | split_dbg_packages = do_split_packages(d, dbglibdir, r'^(.*)\.so', '${PN}-plugin-%s-dbg', 'wpa_supplicant %s plugin - Debugging files', prepend=True, extra_depends='${PN}-dbg') | ||
131 | |||
132 | if split_packages: | ||
133 | pn = d.getVar('PN') | ||
134 | d.setVar('RRECOMMENDS:' + pn + '-plugins', ' '.join(split_packages)) | ||
135 | d.appendVar('RRECOMMENDS:' + pn + '-dbg', ' ' + ' '.join(split_dbg_packages)) | ||
136 | } | ||
137 | PACKAGESPLITFUNCS += "split_wpa_supplicant_libs" | ||
diff --git a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb b/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb deleted file mode 100644 index 33b1495bb2..0000000000 --- a/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant_2.9.bb +++ /dev/null | |||
@@ -1,117 +0,0 @@ | |||
1 | SUMMARY = "Client for Wi-Fi Protected Access (WPA)" | ||
2 | HOMEPAGE = "http://w1.fi/wpa_supplicant/" | ||
3 | DESCRIPTION = "wpa_supplicant is a WPA Supplicant for Linux, BSD, Mac OS X, and Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant is the IEEE 802.1X/WPA component that is used in the client stations. It implements key negotiation with a WPA Authenticator and it controls the roaming and IEEE 802.11 authentication/association of the wlan driver." | ||
4 | BUGTRACKER = "http://w1.fi/security/" | ||
5 | SECTION = "network" | ||
6 | LICENSE = "BSD-3-Clause" | ||
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=279b4f5abb9c153c285221855ddb78cc \ | ||
8 | file://README;beginline=1;endline=56;md5=e7d3dbb01f75f0b9799e192731d1e1ff \ | ||
9 | file://wpa_supplicant/wpa_supplicant.c;beginline=1;endline=12;md5=0a8b56d3543498b742b9c0e94cc2d18b" | ||
10 | DEPENDS = "dbus libnl" | ||
11 | RRECOMMENDS:${PN} = "wpa-supplicant-passphrase wpa-supplicant-cli" | ||
12 | |||
13 | PACKAGECONFIG ??= "openssl" | ||
14 | PACKAGECONFIG[gnutls] = ",,gnutls libgcrypt" | ||
15 | PACKAGECONFIG[openssl] = ",,openssl" | ||
16 | |||
17 | inherit pkgconfig systemd | ||
18 | |||
19 | SYSTEMD_SERVICE:${PN} = "wpa_supplicant.service" | ||
20 | SYSTEMD_AUTO_ENABLE = "disable" | ||
21 | |||
22 | SRC_URI = "http://w1.fi/releases/wpa_supplicant-${PV}.tar.gz \ | ||
23 | file://defconfig \ | ||
24 | file://wpa-supplicant.sh \ | ||
25 | file://wpa_supplicant.conf \ | ||
26 | file://wpa_supplicant.conf-sane \ | ||
27 | file://99_wpa_supplicant \ | ||
28 | file://0001-replace-systemd-install-Alias-with-WantedBy.patch \ | ||
29 | file://0001-AP-Silently-ignore-management-frame-from-unexpected-.patch \ | ||
30 | file://0001-WPS-UPnP-Do-not-allow-event-subscriptions-with-URLs-.patch \ | ||
31 | file://0002-WPS-UPnP-Fix-event-message-generation-using-a-long-U.patch \ | ||
32 | file://0003-WPS-UPnP-Handle-HTTP-initiation-failures-for-events-.patch \ | ||
33 | file://CVE-2021-0326.patch \ | ||
34 | file://CVE-2021-27803.patch \ | ||
35 | file://CVE-2021-30004.patch \ | ||
36 | " | ||
37 | SRC_URI[md5sum] = "2d2958c782576dc9901092fbfecb4190" | ||
38 | SRC_URI[sha256sum] = "fcbdee7b4a64bea8177973299c8c824419c413ec2e3a95db63dd6a5dc3541f17" | ||
39 | |||
40 | CVE_PRODUCT = "wpa_supplicant" | ||
41 | |||
42 | S = "${WORKDIR}/wpa_supplicant-${PV}" | ||
43 | |||
44 | PACKAGES:prepend = "wpa-supplicant-passphrase wpa-supplicant-cli " | ||
45 | FILES:wpa-supplicant-passphrase = "${bindir}/wpa_passphrase" | ||
46 | FILES:wpa-supplicant-cli = "${sbindir}/wpa_cli" | ||
47 | FILES:${PN} += "${datadir}/dbus-1/system-services/* ${systemd_system_unitdir}/*" | ||
48 | CONFFILES:${PN} += "${sysconfdir}/wpa_supplicant.conf" | ||
49 | |||
50 | do_configure () { | ||
51 | ${MAKE} -C wpa_supplicant clean | ||
52 | install -m 0755 ${WORKDIR}/defconfig wpa_supplicant/.config | ||
53 | |||
54 | if echo "${PACKAGECONFIG}" | grep -qw "openssl"; then | ||
55 | ssl=openssl | ||
56 | elif echo "${PACKAGECONFIG}" | grep -qw "gnutls"; then | ||
57 | ssl=gnutls | ||
58 | fi | ||
59 | if [ -n "$ssl" ]; then | ||
60 | sed -i "s/%ssl%/$ssl/" wpa_supplicant/.config | ||
61 | fi | ||
62 | |||
63 | # For rebuild | ||
64 | rm -f wpa_supplicant/*.d wpa_supplicant/dbus/*.d | ||
65 | } | ||
66 | |||
67 | export EXTRA_CFLAGS = "${CFLAGS}" | ||
68 | export BINDIR = "${sbindir}" | ||
69 | |||
70 | do_compile () { | ||
71 | unset CFLAGS CPPFLAGS CXXFLAGS | ||
72 | sed -e "s:CFLAGS\ =.*:& \$(EXTRA_CFLAGS):g" -i ${S}/src/lib.rules | ||
73 | oe_runmake -C wpa_supplicant | ||
74 | } | ||
75 | |||
76 | do_install () { | ||
77 | install -d ${D}${sbindir} | ||
78 | install -m 755 wpa_supplicant/wpa_supplicant ${D}${sbindir} | ||
79 | install -m 755 wpa_supplicant/wpa_cli ${D}${sbindir} | ||
80 | |||
81 | install -d ${D}${bindir} | ||
82 | install -m 755 wpa_supplicant/wpa_passphrase ${D}${bindir} | ||
83 | |||
84 | install -d ${D}${docdir}/wpa_supplicant | ||
85 | install -m 644 wpa_supplicant/README ${WORKDIR}/wpa_supplicant.conf ${D}${docdir}/wpa_supplicant | ||
86 | |||
87 | install -d ${D}${sysconfdir} | ||
88 | install -m 600 ${WORKDIR}/wpa_supplicant.conf-sane ${D}${sysconfdir}/wpa_supplicant.conf | ||
89 | |||
90 | install -d ${D}${sysconfdir}/network/if-pre-up.d/ | ||
91 | install -d ${D}${sysconfdir}/network/if-post-down.d/ | ||
92 | install -d ${D}${sysconfdir}/network/if-down.d/ | ||
93 | install -m 755 ${WORKDIR}/wpa-supplicant.sh ${D}${sysconfdir}/network/if-pre-up.d/wpa-supplicant | ||
94 | cd ${D}${sysconfdir}/network/ && \ | ||
95 | ln -sf ../if-pre-up.d/wpa-supplicant if-post-down.d/wpa-supplicant | ||
96 | |||
97 | install -d ${D}/${sysconfdir}/dbus-1/system.d | ||
98 | install -m 644 ${S}/wpa_supplicant/dbus/dbus-wpa_supplicant.conf ${D}/${sysconfdir}/dbus-1/system.d | ||
99 | install -d ${D}/${datadir}/dbus-1/system-services | ||
100 | install -m 644 ${S}/wpa_supplicant/dbus/*.service ${D}/${datadir}/dbus-1/system-services | ||
101 | |||
102 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then | ||
103 | install -d ${D}/${systemd_system_unitdir} | ||
104 | install -m 644 ${S}/wpa_supplicant/systemd/*.service ${D}/${systemd_system_unitdir} | ||
105 | fi | ||
106 | |||
107 | install -d ${D}/etc/default/volatiles | ||
108 | install -m 0644 ${WORKDIR}/99_wpa_supplicant ${D}/etc/default/volatiles | ||
109 | } | ||
110 | |||
111 | pkg_postinst:wpa-supplicant () { | ||
112 | # If we're offline, we don't need to do this. | ||
113 | if [ "x$D" = "x" ]; then | ||
114 | killall -q -HUP dbus-daemon || true | ||
115 | fi | ||
116 | |||
117 | } | ||