commit: a96cc9c522dc52b2f739f381da4869b3492aeacd Author: NHOrus <jy6x2b32pie9 <AT> yahoo <DOT> com> AuthorDate: Mon Jan 6 14:31:03 2025 +0000 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> CommitDate: Mon Jan 6 22:42:26 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a96cc9c5
sys-apps/bolt: C23 porting: upstream patch https://gitlab.freedesktop.org/bolt/bolt/-/commit/9f85914f1efd7b74fb7bd906b339fcba2214d86a Also pushed Python to 3.13 Bug: https://bugs.gentoo.org/937273 Signed-off-by: NHOrus <jy6x2b32pie9 <AT> yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/40011 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> sys-apps/bolt/bolt-0.9.8-r1.ebuild | 6 ++-- sys-apps/bolt/files/bolt-0.9.8-sockaddr.patch | 46 +++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) diff --git a/sys-apps/bolt/bolt-0.9.8-r1.ebuild b/sys-apps/bolt/bolt-0.9.8-r1.ebuild index 52152993deca..53796044710b 100644 --- a/sys-apps/bolt/bolt-0.9.8-r1.ebuild +++ b/sys-apps/bolt/bolt-0.9.8-r1.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 -PYTHON_COMPAT=( python3_1{0..2} ) +PYTHON_COMPAT=( python3_1{0..3} ) inherit linux-info python-any-r1 meson udev DESCRIPTION="Userspace system daemon to enable security levels for Thunderbolt 3" @@ -44,6 +44,8 @@ BDEPEND=" ) " +PATCHES=( "${FILESDIR}"/${P}-sockaddr.patch ) + pkg_setup() { if use kernel_linux && kernel_is lt 5 6; then CONFIG_CHECK="~THUNDERBOLT" diff --git a/sys-apps/bolt/files/bolt-0.9.8-sockaddr.patch b/sys-apps/bolt/files/bolt-0.9.8-sockaddr.patch new file mode 100644 index 000000000000..684e31c5e60c --- /dev/null +++ b/sys-apps/bolt/files/bolt-0.9.8-sockaddr.patch @@ -0,0 +1,46 @@ +https://gitlab.freedesktop.org/bolt/bolt/-/commit/9f85914f1efd7b74fb7bd906b339fcba2214d86a +From 9f85914f1efd7b74fb7bd906b339fcba2214d86a Mon Sep 17 00:00:00 2001 +From: Kate Hsuan <[email protected]> +Date: Mon, 6 Jan 2025 14:12:47 +0800 +Subject: [PATCH] tests: bolt-test: Fix build error with gcc14 + +Fix build errors with gcc14. +The fix includes: +1. Cast sockaddr correctly. + +build errors: + +x86_64-pc-linux-musl-gcc -Itest-auth.p -I. -I../bolt-0.9.8 -I../bolt-0.9.8/tests -I../bolt-0.9.8/common -I../bolt-0.9.8/boltd -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/sysprof-4 -I/usr/lib/libffi/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/polkit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -fstack-protector-strong -Waggregate-return -Wunused -Warray-bounds -Wcast-align -Wclobbered -Wdeclaration-after-statement -Wempty-body -Wformat=2 -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wignored-qualifiers -Wimplicit-function-declaration -Winit-self -Wmissing-declarations -Wmissing-format-attribute -Wmissing-include-dirs -Wmissing-noreturn -Wmissing-parameter-type -Wmissing-prototypes -Wnested-externs -Wno-discarded-qualifiers -Wno-missing-field-initializers -Wno-suggest-attribute=format -Wno-unused-parameter -Wold-style-definition -Woverride-init -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing=3 -Wstrict-prototypes -Wstringop-overflow -Wstringop-truncation -Wtype-limits -Wundef -Wuninitialized -Wunused-but-set-variable -Wwrite-strings -O2 -pipe -march=native -fno-diagnostics-color -pthread -MD -MQ test-auth.p/tests_bolt-test.c.o -MF test-auth.p/tests_bolt-test.c.o.d -o test-auth.p/tests_bolt-test.c.o -c ../bolt-0.9.8/tests/bolt-test.c +../bolt-0.9.8/tests/bolt-test.c: In function 'notify_socket_new': +../bolt-0.9.8/tests/bolt-test.c:131:17: error: passing argument 2 of 'bind' from incompatible pointer type [-Wincompatible-pointer-types] + 131 | r = bind (fd, &sau, socklen); + | ^~~~ + | | + | struct sockaddr_un * +In file included from ../bolt-0.9.8/tests/bolt-test.c:37: +/usr/include/sys/socket.h:385:16: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' + 385 | int bind (int, const struct sockaddr *, socklen_t); + | ^~~~~~~~~~~~~~~~~~~~~~~ + +Resolves: #192 +Link: https://bugs.gentoo.org/937273 +--- + tests/bolt-test.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/bolt-test.c b/tests/bolt-test.c +index beabb8d..aa94222 100644 +--- a/tests/bolt-test.c ++++ b/tests/bolt-test.c +@@ -128,7 +128,7 @@ notify_socket_new (void) + + strlen (sau.sun_path) + + 1; + +- r = bind (fd, &sau, socklen); ++ r = bind (fd, (struct sockaddr *) &sau, socklen); + g_assert_cmpint (r, >, -1); + + r = setsockopt (fd, SOL_SOCKET, SO_PASSCRED, &one, sizeof (one)); +-- +GitLab +
