Skip to contentSkip to conversation

package/libtirpc: Add optional GSSAPI support

PATCH In review James Hilliard 4 participants 7 messages Jul 18, 2021 – Jul 25, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 package/libtirpc: Add optional GSSAPI support

---
Changes v3 -> v4:
- rebase
Changes v2 -> v3:
- use krb5-config instead of -lgssapi_krb5

---
 package/libtirpc/Config.in   | 8 ++++++++
 package/libtirpc/libtirpc.mk | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
package/libtirpc/Config.in +8 -0
index 2e9c939fa8..1899edefbf 100644
@@ -7,5 +7,13 @@ config BR2_PACKAGE_LIBTIRPC
 
 	  http://sourceforge.net/projects/libtirpc/
 
+config BR2_PACKAGE_LIBTIRPC_GSS
+	bool "gss"
+	depends on BR2_USE_MMU # libkrb5
+	depends on BR2_PACKAGE_LIBTIRPC
+	select BR2_PACKAGE_LIBKRB5
+	help
+	  Enable GSSAPI support
+
 comment "libtirpc needs a toolchain w/ threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/libtirpc/libtirpc.mk +7 -1
index 31be113965..4b385b7003 100644
@@ -18,7 +18,13 @@ LIBTIRPC_AUTORECONF = YES
 # getrpcby{number,name} are only provided if 'GQ' is defined
 LIBTIRPC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DGQ"
 
-LIBTIRPC_CONF_OPTS = --disable-gssapi
+ifeq ($(BR2_PACKAGE_LIBTIRPC_GSS),y)
+LIBTIRPC_CONF_ENV += KRB5_CONFIG=$(STAGING_DIR)/usr/bin/krb5-config
+LIBTIRPC_CONF_OPTS += --enable-gssapi
+LIBTIRPC_DEPENDENCIES += libkrb5
+else
+LIBTIRPC_CONF_OPTS += --disable-gssapi
+endif
 HOST_LIBTIRPC_CONF_OPTS = --disable-gssapi
 
 $(eval $(autotools-package))
Signature · 1 line
2.25.1
#1 lore raw

PATCH v4 2/2 package/nfs-utils: Add optional GSS support

---
 package/nfs-utils/Config.in    |  7 +++++++
 package/nfs-utils/nfs-utils.mk | 11 ++++++++++-
 2 files changed, 17 insertions(+), 1 deletion(-)
package/nfs-utils/Config.in +7 -0
index bd1e091331..f2997b9c91 100644
@@ -26,6 +26,13 @@ config BR2_PACKAGE_NFS_UTILS_NFSV4
 	help
 	  Enable NFSv4/NFSv4.1 support
 
+config BR2_PACKAGE_NFS_UTILS_GSS
+	bool "gss"
+	depends on BR2_PACKAGE_NFS_UTILS_NFSV4
+	select BR2_PACKAGE_LIBTIRPC_GSS
+	help
+	  Enable GSS support
+
 config BR2_PACKAGE_NFS_UTILS_RPCDEBUG
 	bool "rpcdebug"
 	help
package/nfs-utils/nfs-utils.mk +10 -1
index 0b4bca4772..763dd57ace 100644
@@ -16,7 +16,6 @@ NFS_UTILS_AUTORECONF = YES
 NFS_UTILS_CONF_ENV = knfsd_cv_bsd_signals=no
 
 NFS_UTILS_CONF_OPTS = \
-	--disable-gss \
 	--enable-tirpc \
 	--enable-ipv6 \
 	--without-tcp-wrappers \
@@ -52,6 +51,16 @@ else
 NFS_UTILS_CONF_OPTS += --disable-nfsv4 --disable-nfsv41
 endif
 
+ifeq ($(BR2_PACKAGE_NFS_UTILS_GSS),y)
+NFS_UTILS_CONF_OPTS += \
+	--enable-gss \
+	--enable-svcgss \
+	--with-krb5=$(STAGING_DIR)/usr
+NFS_UTILS_DEPENDENCIES += libkrb5
+else
+NFS_UTILS_CONF_OPTS += --disable-gss --disable-svcgss
+endif
+
 ifeq ($(BR2_PACKAGE_LIBCAP),y)
 NFS_UTILS_CONF_OPTS += --enable-caps
 NFS_UTILS_DEPENDENCIES += libcap
Signature · 1 line
2.25.1
#4 lore raw
In reply to James Hilliard
Quoted 1 line · James Hilliard

Both applied to master, thanks.

Regards,
Arnout

Quoted 38 lines

---
Changes v3 -> v4:
- rebase
Changes v2 -> v3:
- use krb5-config instead of -lgssapi_krb5

---
 package/libtirpc/Config.in   | 8 ++++++++
 package/libtirpc/libtirpc.mk | 8 +++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)
package/libtirpc/Config.in +8 -0
index 2e9c939fa8..1899edefbf 100644
@@ -7,5 +7,13 @@ config BR2_PACKAGE_LIBTIRPC
 
 	  http://sourceforge.net/projects/libtirpc/
 
+config BR2_PACKAGE_LIBTIRPC_GSS
+	bool "gss"
+	depends on BR2_USE_MMU # libkrb5
+	depends on BR2_PACKAGE_LIBTIRPC
+	select BR2_PACKAGE_LIBKRB5
+	help
+	  Enable GSSAPI support
+
 comment "libtirpc needs a toolchain w/ threads"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS
package/libtirpc/libtirpc.mk +0 -1
index 31be113965..4b385b7003 100644
@@ -18,7 +18,13 @@ LIBTIRPC_AUTORECONF = YES
 # getrpcby{number,name} are only provided if 'GQ' is defined
 LIBTIRPC_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DGQ"
 
-LIBTIRPC_CONF_OPTS = --disable-gssapi

package/libtirpc/libtirpc.mk LIBTIRPC_AUTORECONF = YES · line 30

Quoted 10 lines
package/libtirpc/libtirpc.mk +7 -0
+ifeq ($(BR2_PACKAGE_LIBTIRPC_GSS),y)
+LIBTIRPC_CONF_ENV += KRB5_CONFIG=$(STAGING_DIR)/usr/bin/krb5-config
+LIBTIRPC_CONF_OPTS += --enable-gssapi
+LIBTIRPC_DEPENDENCIES += libkrb5
+else
+LIBTIRPC_CONF_OPTS += --disable-gssapi
+endif
 HOST_LIBTIRPC_CONF_OPTS = --disable-gssapi
 
 $(eval $(autotools-package))

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#5 lore raw
Quoted 1 line · On Sun, 25 Jul 2021 18:21:08 +0200 Arnout Vandecappelle <[email protected]> wrote:

Both applied to master, thanks.

Gah, I should have replied earlier. I didn't apply this because there was a small issue, see below.

Quoted 5 lines

package/libtirpc/Config.in config BR2_PACKAGE_LIBTIRPC · line 14

Quoted 5 lines
package/libtirpc/Config.in +5 -0
+config BR2_PACKAGE_LIBTIRPC_GSS
+	bool "gss"
+	depends on BR2_USE_MMU # libkrb5
+	depends on BR2_PACKAGE_LIBTIRPC
+	select BR2_PACKAGE_LIBKRB5

libkrb5 has a !BR2_STATIC_LIBS that is not taken into account here (and the libtirpc main option does not have such a dependency).

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#6 lore raw
Quoted 9 lines · Thomas Petazzoni
Quoted 1 line · On Sun, 25 Jul 2021 18:21:08 +0200 Arnout Vandecappelle <[email protected]> wrote:

Both applied to master, thanks.

Gah, I should have replied earlier. I didn't apply this because there was a small issue, see below.

Quoted 8 lines
Quoted 5 lines

package/libtirpc/Config.in config BR2_PACKAGE_LIBTIRPC · line 14

Quoted 5 lines
package/libtirpc/Config.in +5 -0
+config BR2_PACKAGE_LIBTIRPC_GSS
+   bool "gss"
+   depends on BR2_USE_MMU # libkrb5
+   depends on BR2_PACKAGE_LIBTIRPC
+   select BR2_PACKAGE_LIBKRB5

libkrb5 has a !BR2_STATIC_LIBS that is not taken into account here (and the libtirpc main option does not have such a dependency).

Fixed here:
https://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/

Quoted 6 lines

Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot