commit: 89a9f94d3984f7d65caff0ddc3828fe245a7c5f9 Author: Alfred Wingate <parona <AT> protonmail <DOT> com> AuthorDate: Wed Jul 17 23:17:19 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Jul 18 08:04:40 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89a9f94d
net-misc/networkmanager: fix libsystemdless build Apply upstream PR which ifdefs out unused and problematic functions in the forked systemd code. Closes: https://bugs.gentoo.org/936223 Signed-off-by: Alfred Wingate <parona <AT> protonmail.com> Closes: https://github.com/gentoo/gentoo/pull/37595 Signed-off-by: Sam James <sam <AT> gentoo.org> ...rkmanager-1.48.4-fix-libsystemdless-build.patch | 62 ++++++++++++++++++++++ .../networkmanager/networkmanager-1.48.4.ebuild | 4 ++ 2 files changed, 66 insertions(+) diff --git a/net-misc/networkmanager/files/networkmanager-1.48.4-fix-libsystemdless-build.patch b/net-misc/networkmanager/files/networkmanager-1.48.4-fix-libsystemdless-build.patch new file mode 100644 index 000000000000..046d73adcb3e --- /dev/null +++ b/net-misc/networkmanager/files/networkmanager-1.48.4-fix-libsystemdless-build.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/936223 +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1559 +https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/1966 + +From 70d1c34b94baadc3305745cf159ea55f312beacc Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 7 Jun 2024 14:03:15 -0700 +Subject: [PATCH] libnm-systemd-core: Disable sd_dhcp6_client_set_duid_uuid + function + +When building on musl systems ( with out systemd ), and using LLD linker +from LLVM project we fail to link with undefined symbols. + +This symbol is in sd_id128.c but its disabled, so let disable the functions +which need this function. + +| x86_64-yoe-linux-musl-ld.lld: error: undefined symbol: sd_id128_get_machine_app_specific +| >>> referenced by sd-dhcp-duid.c:202 (/usr/src/debug/networkmanager/1.48.0/../NetworkManager-1.48.0/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c:202) +| >>> libnm-systemd-core.a.p/src_libsystemd-network_sd-dhcp-duid.c.o:(sd_dhcp_duid_set_uuid) in archive src/libnm-systemd-core/libnm-systemd-core.a +| x86_64-yoe-linux-musl-clang: error: linker command failed with exit code 1 (use -v to see invocation) + +Signed-off-by: Khem Raj <[email protected]> +--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c ++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp-duid.c +@@ -193,6 +193,7 @@ int sd_dhcp_duid_set_en(sd_dhcp_duid *duid) { + return 0; + } + ++#if 0 + int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) { + sd_id128_t machine_id; + int r; +@@ -209,6 +210,7 @@ int sd_dhcp_duid_set_uuid(sd_dhcp_duid *duid) { + duid->size = offsetof(struct duid, uuid.uuid) + sizeof(machine_id); + return 0; + } ++#endif + + int dhcp_duid_to_string_internal(uint16_t type, const void *data, size_t data_size, char **ret) { + _cleanup_free_ char *p = NULL, *x = NULL; +--- a/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c ++++ b/src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c +@@ -244,6 +244,7 @@ int sd_dhcp6_client_set_duid_en(sd_dhcp6_client *client) { + return 0; + } + ++#if 0 + int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) { + int r; + +@@ -256,7 +257,7 @@ int sd_dhcp6_client_set_duid_uuid(sd_dhcp6_client *client) { + + return 0; + } +- ++#endif + int sd_dhcp6_client_set_duid_raw(sd_dhcp6_client *client, uint16_t duid_type, const uint8_t *duid, size_t duid_len) { + int r; + +-- +GitLab + diff --git a/net-misc/networkmanager/networkmanager-1.48.4.ebuild b/net-misc/networkmanager/networkmanager-1.48.4.ebuild index c2f656d25ebd..110098ab67bb 100644 --- a/net-misc/networkmanager/networkmanager-1.48.4.ebuild +++ b/net-misc/networkmanager/networkmanager-1.48.4.ebuild @@ -122,6 +122,10 @@ BDEPEND=" ) " +PATCHES=( + "${FILESDIR}"/networkmanager-1.48.4-fix-libsystemdless-build.patch +) + python_check_deps() { if use introspection; then python_has_version "dev-python/pygobject:3[${PYTHON_USEDEP}]" || return
