diff --git a/.gitattributes b/.gitattributes index e10864f..9b03811 100644 --- a/.gitattributes +++ b/.gitattributes @@ -21,5 +21,3 @@ *.xz filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text -## Specific LFS patterns -ktls-utils-0.9.tar filter=lfs diff=lfs merge=lfs -text diff --git a/0001-tlshd-Allow-for-compilation-with-older-libnl-librari.patch b/0001-tlshd-Allow-for-compilation-with-older-libnl-librari.patch deleted file mode 100644 index b499929..0000000 --- a/0001-tlshd-Allow-for-compilation-with-older-libnl-librari.patch +++ /dev/null @@ -1,52 +0,0 @@ -From c3a79bffbf559f508892b7e4cbdc3a8b8fff0911 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 16 Aug 2023 13:02:36 +0200 -Subject: [PATCH 1/3] tlshd: Allow for compilation with older libnl libraries - -Prior to version 3.5 libnl3 is missing the 'const' specified for -nla_policy, causing a compilation error. - -Signed-off-by: Hannes Reinecke ---- - src/tlshd/netlink.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/src/tlshd/netlink.c b/src/tlshd/netlink.c -index 792046f..22d929d 100644 ---- a/src/tlshd/netlink.c -+++ b/src/tlshd/netlink.c -@@ -43,6 +43,7 @@ - #include - #include - #include -+#include - - #include - -@@ -84,7 +85,11 @@ static void tlshd_genl_sock_close(struct nl_sock *nls) - nl_socket_free(nls); - } - -+#if LIBNL_VER_NUM >= LIBNL_VER(3,5) - static const struct nla_policy -+#else -+static struct nla_policy -+#endif - tlshd_accept_nl_policy[HANDSHAKE_A_ACCEPT_MAX + 1] = { - [HANDSHAKE_A_ACCEPT_SOCKFD] = { .type = NLA_U32, }, - [HANDSHAKE_A_ACCEPT_HANDLER_CLASS] = { .type = NLA_U32, }, -@@ -190,7 +195,11 @@ static void tlshd_parse_peer_identity(struct tlshd_handshake_parms *parms, - parms->peerids[0] = nla_get_u32(head); - } - -+#if LIBNL_VER_NUM >= LIBNL_VER(3,5) - static const struct nla_policy -+#else -+static struct nla_policy -+#endif - tlshd_x509_nl_policy[HANDSHAKE_A_X509_MAX + 1] = { - [HANDSHAKE_A_X509_CERT] = { .type = NLA_U32, }, - [HANDSHAKE_A_X509_PRIVKEY] = { .type = NLA_U32, }, --- -2.35.3 - diff --git a/0001-tlshd-fix-max-config-file-size-comparison.patch b/0001-tlshd-fix-max-config-file-size-comparison.patch deleted file mode 100644 index deac6a1..0000000 --- a/0001-tlshd-fix-max-config-file-size-comparison.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 52ac9ff05a5edb5ccda33ee186ba388553b258c4 Mon Sep 17 00:00:00 2001 -From: Jeff Layton -Date: Tue, 20 Jun 2023 13:20:14 -0400 -Subject: [PATCH] tlshd: fix max config file size comparison - -gcc throws a warning on 32-bit x86 because of signedness mismatch: - -config.c:155:52: error: comparison of integer expressions of different signedness: '__off_t' {aka 'long int'} and 'unsigned int' [-Werror=sign-compare] - 155 | if (statbuf.st_size < 0 || statbuf.st_size > UINT_MAX) { - | ^ - -st_size is a signed value (off_t), but UINT_MAX is unsigned. - -Change it to compare against INT_MAX instead. This technically cuts the -max size of the config file in half to only 2GB, but I don't think we'll -miss it. - -Cc: Steve Dickson -Reported-by: Petr Pisar -Link: https://bugzilla.redhat.com/show_bug.cgi?id=2182151 -Signed-off-by: Jeff Layton -Signed-off-by: Chuck Lever ---- - src/tlshd/config.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/tlshd/config.c b/src/tlshd/config.c -index 87cc401..bdab98b 100644 ---- a/src/tlshd/config.c -+++ b/src/tlshd/config.c -@@ -152,7 +152,7 @@ static bool tlshd_config_read_datum(const char *pathname, gnutls_datum_t *data, - tlshd_log_perror("stat"); - goto out_close; - } -- if (statbuf.st_size < 0 || statbuf.st_size > UINT_MAX) { -+ if (statbuf.st_size < 0 || statbuf.st_size > INT_MAX) { - tlshd_log_error("Bad config file size: %lld", statbuf.st_size); - goto out_close; - } --- -2.35.3 - diff --git a/0002-tlshd-Check-for-gnutls_get_system_config_file.patch b/0002-tlshd-Check-for-gnutls_get_system_config_file.patch deleted file mode 100644 index 9407167..0000000 --- a/0002-tlshd-Check-for-gnutls_get_system_config_file.patch +++ /dev/null @@ -1,64 +0,0 @@ -From df6c41cf7b3e39496ebf0415d635f3fd4a3a4606 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 16 Aug 2023 08:05:34 +0200 -Subject: [PATCH 2/3] tlshd: Check for gnutls_get_system_config_file() - -Older gnutls releases might not have the function -gnutls_get_system_config_file(), so add a configuration check. - -Signed-off-by: Hannes Reinecke ---- - configure.ac | 3 +++ - src/tlshd/client.c | 5 ++++- - src/tlshd/server.c | 5 ++++- - 3 files changed, 11 insertions(+), 2 deletions(-) - -diff --git a/configure.ac b/configure.ac -index 0c98271..83ab880 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -68,6 +68,9 @@ AC_CHECK_LIB([gnutls], [gnutls_transport_is_ktls_enabled], - AC_CHECK_LIB([gnutls], [gnutls_protocol_set_enabled], - [AC_DEFINE([HAVE_GNUTLS_PROTOCOL_SET_ENABLED], [1], - [Define to 1 if you have the gnutls_protocol_set_enabled function.])]) -+AC_CHECK_LIB([gnutls], [gnutls_get_system_config_file], -+ [AC_DEFINE([HAVE_GNUTLS_GET_SYSTEM_CONFIG_FILE], [1], -+ [Define to 1 if you have the gnutls_get_system_config_file function.])]) - AC_SUBST([AM_CPPFLAGS]) - - AC_CONFIG_FILES([Makefile src/Makefile src/tlshd/Makefile systemd/Makefile]) -diff --git a/src/tlshd/client.c b/src/tlshd/client.c -index 6a16263..1f8648f 100644 ---- a/src/tlshd/client.c -+++ b/src/tlshd/client.c -@@ -392,7 +392,10 @@ void tlshd_clienthello_handshake(struct tlshd_handshake_parms *parms) - gnutls_global_set_log_function(tlshd_gnutls_log_func); - gnutls_global_set_audit_log_function(tlshd_gnutls_audit_func); - -- tlshd_log_debug("System config file: %s", gnutls_get_system_config_file()); -+#ifdef HAVE_GNUTLS_GET_SYSTEM_CONFIG_FILE -+ tlshd_log_debug("System config file: %s", -+ gnutls_get_system_config_file()); -+#endif - - switch (parms->auth_mode) { - case HANDSHAKE_AUTH_UNAUTH: -diff --git a/src/tlshd/server.c b/src/tlshd/server.c -index b969d57..f7be6ad 100644 ---- a/src/tlshd/server.c -+++ b/src/tlshd/server.c -@@ -339,7 +339,10 @@ void tlshd_serverhello_handshake(struct tlshd_handshake_parms *parms) - gnutls_global_set_log_function(tlshd_gnutls_log_func); - gnutls_global_set_audit_log_function(tlshd_gnutls_audit_func); - -- tlshd_log_debug("System config file: %s", gnutls_get_system_config_file()); -+#ifdef HAVE_GNUTLS_GET_SYSTEM_CONFIG_FILE -+ tlshd_log_debug("System config file: %s", -+ gnutls_get_system_config_file()); -+#endif - - switch (parms->auth_mode) { - case HANDSHAKE_AUTH_X509: --- -2.35.3 - diff --git a/0003-tlshd-add-delay-configuration-parameter.patch b/0003-tlshd-add-delay-configuration-parameter.patch deleted file mode 100644 index ff561fc..0000000 --- a/0003-tlshd-add-delay-configuration-parameter.patch +++ /dev/null @@ -1,87 +0,0 @@ -From 9a5954891770c440797b25f6fecf6d72abd65b0a Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Wed, 16 Aug 2023 12:52:11 +0200 -Subject: [PATCH 3/3] tlshd: add 'delay' configuration parameter - -Add a 'delay' configuration parameter to delay the 'done' message -for exercising the timeout handling. - -Signed-off-by: Hannes Reinecke ---- - src/tlshd/config.c | 2 ++ - src/tlshd/netlink.c | 8 ++++++++ - src/tlshd/tlshd.conf.man | 6 ++++++ - src/tlshd/tlshd.h | 1 + - 4 files changed, 17 insertions(+) - -diff --git a/src/tlshd/config.c b/src/tlshd/config.c -index bdab98b..4e59bb5 100644 ---- a/src/tlshd/config.c -+++ b/src/tlshd/config.c -@@ -81,6 +81,8 @@ bool tlshd_config_init(const gchar *pathname) - "main", "tlsdebug", NULL); - nl_debug = g_key_file_get_integer(tlshd_configuration, "main", - "nl_debug", NULL); -+ tlshd_delay = g_key_file_get_integer(tlshd_configuration, "main", -+ "delay", NULL); - - keyrings = g_key_file_get_string_list(tlshd_configuration, "main", - "keyrings", &length, NULL); -diff --git a/src/tlshd/netlink.c b/src/tlshd/netlink.c -index 22d929d..e4bc21f 100644 ---- a/src/tlshd/netlink.c -+++ b/src/tlshd/netlink.c -@@ -50,6 +50,8 @@ - #include "tlshd.h" - #include "netlink.h" - -+int tlshd_delay; -+ - static int tlshd_genl_sock_open(struct nl_sock **sock) - { - struct nl_sock *nls; -@@ -467,6 +469,12 @@ void tlshd_genl_done(struct tlshd_handshake_parms *parms) - goto out_free; - - sendit: -+ if (tlshd_delay) { -+ /* delay to test timeout handling */ -+ tlshd_log_debug("delay %d seconds", tlshd_delay); -+ sleep(tlshd_delay); -+ } -+ - nl_socket_disable_auto_ack(nls); - err = nl_send_auto(nls, msg); - if (err < 0) { -diff --git a/src/tlshd/tlshd.conf.man b/src/tlshd/tlshd.conf.man -index 0292c89..7d27035 100644 ---- a/src/tlshd/tlshd.conf.man -+++ b/src/tlshd/tlshd.conf.man -@@ -67,6 +67,12 @@ This option specifies an integer which indicates the debug message level - for netlink operations. - Zero, the quietest setting, is the default. - .TP -+.B delay -+This options specifies an integer which indicates the number of seconds -+by which the handshake completion should be delayed. This can be used -+to exercise the timeout handling for the TLS handshake. -+Zero disables any delay. -+.TP - .B keyrings - This option specifies a semicolon-separated list of auxiliary keyrings - that might contain handshake authentication tokens. -diff --git a/src/tlshd/tlshd.h b/src/tlshd/tlshd.h -index c4da3fd..2e2a9f1 100644 ---- a/src/tlshd/tlshd.h -+++ b/src/tlshd/tlshd.h -@@ -22,6 +22,7 @@ - - extern int tlshd_debug; - extern int tlshd_tls_debug; -+extern int tlshd_delay; - extern int tlshd_stderr; - - struct nl_sock; --- -2.35.3 - diff --git a/_service b/_service index 768a1d5..9c56967 100644 --- a/_service +++ b/_service @@ -2,11 +2,13 @@ git - https://github.com/oracle/ktls-utils.git + https://github.com/openSUSE/ktls-utils.git ktls-utils - 0.9 - ktls-utils-0.9 - ktls-utils-0.[0-9] + @PARENT_TAG@+@TAG_OFFSET@.g%h + ktls-utils-([0-9]\.[0-9]+) + \1 + suse-0.9 + ktls-utils-* enable diff --git a/_servicedata b/_servicedata index 5ead127..a0c7e8d 100644 --- a/_servicedata +++ b/_servicedata @@ -1,4 +1,6 @@ https://github.com/oracle/ktls-utils.git - 198ff00ba28cb97cdab6e49a7422cce331fde198 + 198ff00ba28cb97cdab6e49a7422cce331fde198 + https://github.com/openSUSE/ktls-utils.git + 01b3018189117e3aa495af2f1eec22fdce6b6be3 \ No newline at end of file diff --git a/ktls-utils-0.9+4.g01b3018.obscpio b/ktls-utils-0.9+4.g01b3018.obscpio new file mode 100644 index 0000000..eb94da9 --- /dev/null +++ b/ktls-utils-0.9+4.g01b3018.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb38359c7168e6a58f6a7c02c213e02af5e60a0cb15c156d35229b8caf08c0a7 +size 193035 diff --git a/ktls-utils-0.9.tar b/ktls-utils-0.9.tar deleted file mode 100644 index c0062fe..0000000 --- a/ktls-utils-0.9.tar +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df6884d27dec09b62dc5d0ca98a562ba4376ca9151255410e348e1a4e2ca0420 -size 225280 diff --git a/ktls-utils.changes b/ktls-utils.changes index 6741d71..d7ad32d 100644 --- a/ktls-utils.changes +++ b/ktls-utils.changes @@ -1,5 +1,16 @@ ------------------------------------------------------------------- -Wed 16 Aug 2023 01:21:59 PM CEST - Hannes Reinecke +Tue Jan 9 16:12:57 UTC 2024 - Martin Wilck + +- Update to version 0.9+4.g01b3018 (jsc#PED-7559) + * _service: move to openSUSE git repository +- Patches now in git, remove them from spec file: + * del 0001-netlink-de-constify-nla_policy + * del 0001-tlshd-Allow-for-compilation-with-older-libnl-librari.patch + * del 0002-tlshd-Check-for-gnutls_get_system_config_file.patch + * del 0003-tlshd-add-delay-configuration-parameter.patch + +------------------------------------------------------------------- +Wed 16 Aug 2023 08:21:59 PM CEST - Hannes Reinecke - Reshuffle patches to match upstream submission: * Remove 0001-netlink-de-constify-nla_policy diff --git a/ktls-utils.obsinfo b/ktls-utils.obsinfo index 6c36f1f..43f85fd 100644 --- a/ktls-utils.obsinfo +++ b/ktls-utils.obsinfo @@ -1,4 +1,4 @@ name: ktls-utils -version: 0.9 -mtime: 1684347082 -commit: 198ff00ba28cb97cdab6e49a7422cce331fde198 +version: 0.9+4.g01b3018 +mtime: 1704814854 +commit: 01b3018189117e3aa495af2f1eec22fdce6b6be3 diff --git a/ktls-utils.spec b/ktls-utils.spec index 000ea92..73c0677 100644 --- a/ktls-utils.spec +++ b/ktls-utils.spec @@ -20,17 +20,13 @@ %global _make_output_sync -Orecurse Name: ktls-utils -Version: 0.9 +Version: 0.9+4.g01b3018 Release: 0 Summary: Tools to Manage Multipathed Devices with the device-mapper License: GPL-2.0-only AND GPL-3.0-or-later Group: System/Base URL: https://github.com/oracle/ktls-utils Source: ktls-utils-%{version}.tar -Patch0: 0001-tlshd-fix-max-config-file-size-comparison.patch -Patch1: 0001-tlshd-Allow-for-compilation-with-older-libnl-librari.patch -Patch2: 0002-tlshd-Check-for-gnutls_get_system_config_file.patch -Patch3: 0003-tlshd-add-delay-configuration-parameter.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %{systemd_requires} BuildRequires: autoconf @@ -40,7 +36,6 @@ BuildRequires: keyutils-devel BuildRequires: glib2-devel BuildRequires: libnl3-devel BuildRequires: pkgconfig(systemd) -#BuildRequires: pkgconfig(mount) PreReq: coreutils PreReq: grep @@ -61,10 +56,6 @@ This package of software provides a TLS handshake user agent that listens for ke %prep %setup -q -n ktls-utils-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 %build ./autogen.sh