diff options
Diffstat (limited to 'meta-oe/recipes-kernel/ktls-utils')
3 files changed, 96 insertions, 0 deletions
diff --git a/meta-oe/recipes-kernel/ktls-utils/ktls-utils/0001-tlshd-Define-ALLPERMS-if-it-doesn-t-exist-to-fix-mus.patch b/meta-oe/recipes-kernel/ktls-utils/ktls-utils/0001-tlshd-Define-ALLPERMS-if-it-doesn-t-exist-to-fix-mus.patch new file mode 100644 index 0000000000..954b1393db --- /dev/null +++ b/meta-oe/recipes-kernel/ktls-utils/ktls-utils/0001-tlshd-Define-ALLPERMS-if-it-doesn-t-exist-to-fix-mus.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From ca95e956307672484e8c018263600749aa9c4f4d Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Wed, 9 Apr 2025 11:14:52 +1000 | ||
4 | Subject: [PATCH] tlshd: Define ALLPERMS if it doesn't exist to fix musl build | ||
5 | |||
6 | ALLPERMS exists in glibc, but not on musl, so we manually define | ||
7 | it if it doesn't exist. This fixes building on musl systems. | ||
8 | |||
9 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
10 | Upstream-Status: Submitted [https://github.com/oracle/ktls-utils/pull/88] | ||
11 | --- | ||
12 | src/tlshd/config.c | 8 ++++++++ | ||
13 | 1 file changed, 8 insertions(+) | ||
14 | |||
15 | diff --git a/src/tlshd/config.c b/src/tlshd/config.c | ||
16 | index 38948e8..e653bd8 100644 | ||
17 | --- a/src/tlshd/config.c | ||
18 | +++ b/src/tlshd/config.c | ||
19 | @@ -46,6 +46,14 @@ | ||
20 | |||
21 | static GKeyFile *tlshd_configuration; | ||
22 | |||
23 | +/** | ||
24 | + * ALLPERMS exists in glibc, but not on musl, so we | ||
25 | + * manually define it if it doesn't exist | ||
26 | + */ | ||
27 | +#ifndef ALLPERMS | ||
28 | +#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO) | ||
29 | +#endif | ||
30 | + | ||
31 | /** | ||
32 | * tlshd_config_init - Read tlshd's config file | ||
33 | * @pathname: Pathname to config file | ||
34 | -- | ||
35 | 2.49.0 | ||
36 | |||
diff --git a/meta-oe/recipes-kernel/ktls-utils/ktls-utils/0002-tlshd-configure.ac-Use-AC_CHECK_HEADER-instead-of-AC.patch b/meta-oe/recipes-kernel/ktls-utils/ktls-utils/0002-tlshd-configure.ac-Use-AC_CHECK_HEADER-instead-of-AC.patch new file mode 100644 index 0000000000..6aabb77ee8 --- /dev/null +++ b/meta-oe/recipes-kernel/ktls-utils/ktls-utils/0002-tlshd-configure.ac-Use-AC_CHECK_HEADER-instead-of-AC.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From d170b04dcb8b2b28e370d8b18ffa1f593e8eec11 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alistair Francis <alistair.francis@wdc.com> | ||
3 | Date: Thu, 10 Apr 2025 13:15:16 +1000 | ||
4 | Subject: [PATCH] tlshd: configure.ac: Use AC_CHECK_HEADER instead of | ||
5 | AC_CHECK_FILE | ||
6 | |||
7 | AC_CHECK_FILE doesn't work when cross-compiling [1], which breaks a lot of | ||
8 | use cases (like OpenEmbedded for one). Autoconf supports AC_CHECK_HEADER | ||
9 | which can be used instead and is more robust [2] so let's use that | ||
10 | instead. | ||
11 | |||
12 | 1: https://www.gnu.org/software/autoconf/manual/autoconf-2.68/html_node/Files.html | ||
13 | 2: https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Generic-Headers.html | ||
14 | |||
15 | Signed-off-by: Alistair Francis <alistair.francis@wdc.com> | ||
16 | Upstream-Status: Submitted [https://github.com/oracle/ktls-utils/pull/90] | ||
17 | --- | ||
18 | configure.ac | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/configure.ac b/configure.ac | ||
22 | index 2c77fb1..c790d71 100644 | ||
23 | --- a/configure.ac | ||
24 | +++ b/configure.ac | ||
25 | @@ -63,7 +63,7 @@ PKG_CHECK_MODULES([LIBNL_GENL3], libnl-genl-3.0 >= 3.1) | ||
26 | AC_SUBST([LIBNL_GENL3_CFLAGS]) | ||
27 | AC_SUBST([LIBNL_GENL3_LIBS]) | ||
28 | |||
29 | -AC_CHECK_FILE([/usr/include/linux/quic.h], | ||
30 | +AC_CHECK_HEADER([linux/quic.h], | ||
31 | [AC_CHECK_LIB([gnutls], [gnutls_handshake_set_secret_function], | ||
32 | [AC_DEFINE([HAVE_GNUTLS_QUIC], [1], [Define to 1 if QUIC is found.])])]) | ||
33 | |||
34 | -- | ||
35 | 2.49.0 | ||
36 | |||
diff --git a/meta-oe/recipes-kernel/ktls-utils/ktls-utils_1.0.0.bb b/meta-oe/recipes-kernel/ktls-utils/ktls-utils_1.0.0.bb new file mode 100644 index 0000000000..1a90dcf998 --- /dev/null +++ b/meta-oe/recipes-kernel/ktls-utils/ktls-utils_1.0.0.bb | |||
@@ -0,0 +1,24 @@ | |||
1 | SUMMARY = "TLS handshake utilities for in-kernel TLS consumers" | ||
2 | DESCRIPTION = "In-kernel TLS consumers need a mechanism to perform TLS \ | ||
3 | handshakes on a connected socket to negotiate TLS session parameters that \ | ||
4 | can then be programmed into the kernel's TLS record protocol engine." | ||
5 | DEPENDS = "gnutls keyutils glib-2.0 libnl" | ||
6 | RDEPENDS:${PN} += " gnutls" | ||
7 | LICENSE = "GPL-2.0-only" | ||
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d568123389d9a12625cca2b089b1728b" | ||
9 | |||
10 | SRCREV = "c787cd26330af457e1ca9cf43232db2c71c03154" | ||
11 | SRC_URI = " \ | ||
12 | git://github.com/oracle/ktls-utils.git;nobranch=1;protocol=https \ | ||
13 | file://0001-tlshd-Define-ALLPERMS-if-it-doesn-t-exist-to-fix-mus.patch \ | ||
14 | file://0002-tlshd-configure.ac-Use-AC_CHECK_HEADER-instead-of-AC.patch \ | ||
15 | " | ||
16 | |||
17 | |||
18 | inherit autotools-brokensep pkgconfig systemd | ||
19 | |||
20 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
21 | |||
22 | PACKAGECONFIG[systemd] = "--with-systemd,,systemd" | ||
23 | |||
24 | SYSTEMD_SERVICE:${PN} = "tlshd.service" | ||