Skip to contentSkip to conversation

package/network-manager: support libnss instead of gnutls

PATCH In review John Keeping 2 participants 2 messages May 27, 2022 – Sep 18, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/network-manager: support libnss instead of gnutls

NetworkManager supports compiling against either NSS or GnuTLS and in fact upstream defaults to NSS if both are available and no choice is specified. Providing a choice can shrink images slightly if some other package is already pulling in NSS but GnuTLS is not otherwise required.

Since a crypto provider is required and to maintain backwards compatibility, select GnuTLS when NSS is not selected.

In keeping with the upstream default, choose NSS when both libraries are available.

---
 package/network-manager/Config.in          |  2 +-
 package/network-manager/network-manager.mk | 11 +++++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)
package/network-manager/Config.in +1 -1
index 1370c81c9c..36bde4a297 100644
@@ -10,7 +10,7 @@ config BR2_PACKAGE_NETWORK_MANAGER
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
 	depends on BR2_USE_WCHAR # libglib2
 	select BR2_PACKAGE_DBUS
-	select BR2_PACKAGE_GNUTLS
+	select BR2_PACKAGE_GNUTLS if !BR2_PACKAGE_LIBNSS
 	select BR2_PACKAGE_LIBGLIB2
 	select BR2_PACKAGE_LIBNDP
 	help
package/network-manager/network-manager.mk +9 -2
index 81d6eedf0f..e87b0e3c7a 100644
@@ -9,7 +9,7 @@ NETWORK_MANAGER_VERSION = $(NETWORK_MANAGER_VERSION_MAJOR).4
 NETWORK_MANAGER_SOURCE = NetworkManager-$(NETWORK_MANAGER_VERSION).tar.xz
 NETWORK_MANAGER_SITE = https://download.gnome.org/sources/NetworkManager/$(NETWORK_MANAGER_VERSION_MAJOR)
 NETWORK_MANAGER_INSTALL_STAGING = YES
-NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev gnutls libglib2 \
+NETWORK_MANAGER_DEPENDENCIES = host-pkgconf udev libglib2 \
 	host-intltool libndp
 NETWORK_MANAGER_LICENSE = GPL-2.0+ (app), LGPL-2.1+ (libnm)
 NETWORK_MANAGER_LICENSE_FILES = COPYING COPYING.LGPL CONTRIBUTING.md
@@ -30,7 +30,6 @@ NETWORK_MANAGER_CONF_OPTS = \
 	--disable-tests \
 	--disable-qt \
 	--disable-more-warnings \
-	--with-crypto=gnutls \
 	--with-iptables=/usr/sbin/iptables \
 	--disable-ifupdown \
 	--without-nm-cloud-setup
@@ -71,6 +70,14 @@ else
 NETWORK_MANAGER_CONF_OPTS += --disable-concheck
 endif
 
+ifeq ($(BR2_PACKAGE_LIBNSS),y)
+NETWORK_MANAGER_DEPENDENCIES += libnss
+NETWORK_MANAGER_CONF_OPTS += --with-crypto=nss
+else
+NETWORK_MANAGER_DEPENDENCIES += gnutls
+NETWORK_MANAGER_CONF_OPTS += --with-crypto=gnutls
+endif
+
 ifeq ($(BR2_PACKAGE_LIBPSL),y)
 NETWORK_MANAGER_DEPENDENCIES += libpsl
 NETWORK_MANAGER_CONF_OPTS += --with-libpsl
Signature · 6 lines
2.36.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"John" == John Keeping <[email protected]> writes:

NetworkManager supports compiling against either NSS or GnuTLS and in fact upstream defaults to NSS if both are available and no choice is specified. Providing a choice can shrink images slightly if some other package is already pulling in NSS but GnuTLS is not otherwise required.

Quoted 7 lines

Since a crypto provider is required and to maintain backwards compatibility, select GnuTLS when NSS is not selected.

In keeping with the upstream default, choose NSS when both libraries are available.

Sorry for the slow response. In the mean time the network-manager package has moved to meson, so I rewrote the patch to use the meson equivalent and committed, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot