Skip to contentSkip to conversation

nfs-utils: add host package

PATCH New Baruch Siach 3 participants 16 messages May 18, 2018 – Jun 17, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 nfs-utils: add host package

We only need the host package for the rpcgen utility. glibc deprecated this utility in version 2.26. Fedora has recently removed rpcgen from its glibc package. So we need to build the rpcgen from the nfs-utils package.

---
 package/nfs-utils/nfs-utils.mk | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
package/nfs-utils/nfs-utils.mk +18 -0
index 26112d69f230..8100706c1505 100644
@@ -24,6 +24,19 @@ NFS_UTILS_CONF_OPTS = \
 	--with-statedir=/run/nfs \
 	--with-rpcgen=internal
 
+HOST_NFS_UTILS_CONF_OPTS = \
+	--disable-nfsv4 \
+	--disable-nfsv41 \
+	--disable-gss \
+	--disable-uuid \
+	--disable-ipv6 \
+	--without-tcp-wrappers \
+	--with-statedir=/run/nfs \
+	--disable-caps \
+	--disable-tirpc \
+	--without-systemd \
+	--with-rpcgen=internal
+
 NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPCDEBUG) += usr/sbin/rpcdebug
 NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_LOCKD) += usr/sbin/rpc.lockd
 NFS_UTILS_TARGETS_$(BR2_PACKAGE_NFS_UTILS_RPC_RQUOTAD) += usr/sbin/rpc.rquotad
@@ -89,4 +102,9 @@ endef
 # nfsiostat is interpreted python, so remove it unless it's in the target
 NFS_UTILS_POST_INSTALL_TARGET_HOOKS += $(if $(BR2_PACKAGE_PYTHON),,NFS_UTILS_REMOVE_NFSIOSTAT)
 
+define HOST_NFS_UTILS_INSTALL_CMDS
+	$(INSTALL) -D -m 0755 $(@D)/tools/rpcgen/rpcgen $(HOST_DIR)/bin/rpcgen
+endef
+
 $(eval $(autotools-package))
+$(eval $(host-autotools-package))
Signature · 1 line
2.17.0
#1 lore raw

PATCH 2/4 quota: depend on host-nfs-utils

host-nfs-utils provides the host rpcgen utility. This fixes the build on recent Fedora systems that removed rpcgen from the glibc package.

Fixes:
http://autobuild.buildroot.net/results/730/730acb23663ebbbaba847073979654670a8bc64c/
http://autobuild.buildroot.net/results/e49/e49932e9d958203d585cdddd795df06aad6ff3a9/
http://autobuild.buildroot.net/results/1b7/1b7dccf7b9742d1b9cb57bffe55eac5cfc66b15c/

Cc Jarkko Sakkinen <[email protected]>
---
 package/quota/quota.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/quota/quota.mk +1 -1
index 5bd9013d6a36..38e18a60c28c 100644
@@ -6,7 +6,7 @@
 
 QUOTA_VERSION = 4.01
 QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(QUOTA_VERSION)
-QUOTA_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
+QUOTA_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES) host-nfs-utils
 QUOTA_AUTORECONF = YES
 QUOTA_LICENSE = GPL-2.0+
 QUOTA_CONF_OPTS = --disable-strip-binaries
Signature · 1 line
2.17.0
#2 lore raw

PATCH 2/4 quota: depend on host-nfs-utils

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

host-nfs-utils provides the host rpcgen utility. This fixes the build on recent Fedora systems that removed rpcgen from the glibc package.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/730/730acb23663ebbbaba847073979654670a8bc64c/
http://autobuild.buildroot.net/results/e49/e49932e9d958203d585cdddd795df06aad6ff3a9/
http://autobuild.buildroot.net/results/1b7/1b7dccf7b9742d1b9cb57bffe55eac5cfc66b15c/

Cc Jarkko Sakkinen <[email protected]>

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#3 lore raw

PATCH 3/4 samba4: depend on host-nfs-utils

In reply to Baruch Siach

host-nfs-utils provides the host rpcgen utility. This fixes the build on recent Fedora systems that removed rpcgen from the glibc package.

Fixes:
http://autobuild.buildroot.net/results/6f8/6f869b8c7c182dfe7f1a291b5952320504540ebf/
http://autobuild.buildroot.net/results/4c2/4c228dd6369e4fc11b798af6ab2abe06d7473b78/
http://autobuild.buildroot.net/results/489/489be441abd19fba2b0c39357e64a6adcf773b60/

---
 package/samba4/samba4.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/samba4/samba4.mk +1 -1
index c77bc04a89fe..b03af34cd045 100644
@@ -11,7 +11,7 @@ SAMBA4_INSTALL_STAGING = YES
 SAMBA4_LICENSE = GPL-3.0+
 SAMBA4_LICENSE_FILES = COPYING
 SAMBA4_DEPENDENCIES = \
-	host-e2fsprogs host-heimdal host-python \
+	host-e2fsprogs host-heimdal host-python host-nfs-utils \
 	e2fsprogs popt python zlib \
 	$(if $(BR2_PACKAGE_LIBAIO),libaio) \
 	$(if $(BR2_PACKAGE_LIBCAP),libcap) \
Signature · 1 line
2.17.0
#4 lore raw

PATCH 3/4 samba4: depend on host-nfs-utils

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

host-nfs-utils provides the host rpcgen utility. This fixes the build on recent Fedora systems that removed rpcgen from the glibc package.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/6f8/6f869b8c7c182dfe7f1a291b5952320504540ebf/
http://autobuild.buildroot.net/results/4c2/4c228dd6369e4fc11b798af6ab2abe06d7473b78/
http://autobuild.buildroot.net/results/489/489be441abd19fba2b0c39357e64a6adcf773b60/

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 4/4 autofs: depend on host-nfs-utils

In reply to Baruch Siach

host-nfs-utils provides the host rpcgen utility. This fixes the build on recent Fedora systems that removed rpcgen from the glibc package.

Fixes:
http://autobuild.buildroot.net/results/383/383bc8462f32a226645c9b792b8d65a25d74529d/
http://autobuild.buildroot.net/results/0c0/0c00f72512754b721813e13f0828d3a942f7b955/
http://autobuild.buildroot.net/results/50b/50b66d2a3c8264f618d7aa813b10050ed147209f/

Cc Jonathan Ben Avraham <[email protected]>
---
 package/autofs/autofs.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/autofs/autofs.mk +1 -1
index 87a218441e34..e7c65ef4b09c 100644
@@ -9,7 +9,7 @@ AUTOFS_SOURCE = autofs-$(AUTOFS_VERSION).tar.xz
 AUTOFS_SITE = $(BR2_KERNEL_MIRROR)/linux/daemons/autofs/v5
 AUTOFS_LICENSE = GPL-2.0+
 AUTOFS_LICENSE_FILES = COPYING COPYRIGHT
-AUTOFS_DEPENDENCIES = host-flex host-bison host-pkgconf
+AUTOFS_DEPENDENCIES = host-flex host-bison host-pkgconf host-nfs-utils
 
 # autofs looks on the build machine for the path of modprobe, so tell
 # it explicitly where it will be located on the target.
Signature · 1 line
2.17.0
#6 lore raw

PATCH 4/4 autofs: depend on host-nfs-utils

Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

host-nfs-utils provides the host rpcgen utility. This fixes the build on recent Fedora systems that removed rpcgen from the glibc package.

Quoted 7 lines

Fixes:
http://autobuild.buildroot.net/results/383/383bc8462f32a226645c9b792b8d65a25d74529d/
http://autobuild.buildroot.net/results/0c0/0c00f72512754b721813e13f0828d3a942f7b955/
http://autobuild.buildroot.net/results/50b/50b66d2a3c8264f618d7aa813b10050ed147209f/

Cc Jonathan Ben Avraham <[email protected]>

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH 1/4 nfs-utils: add host package

In reply to Baruch Siach

Hello,

Quoted 6 lines · Baruch Siach

We only need the host package for the rpcgen utility. glibc deprecated this utility in version 2.26. Fedora has recently removed rpcgen from its glibc package. So we need to build the rpcgen from the nfs-utils package.

Ah, I was looking for a solution to this rpcgen problem.

It is worth mentioning that we have a big patch in the libtirpc package to add the source code for rpcgen. So perhaps this should be removed, and libtirpc should depend on host-nfs-utils.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 1/4 nfs-utils: add host package

Hello,

Quoted 5 lines · Thomas Petazzoni

Ah, I was looking for a solution to this rpcgen problem.

It is worth mentioning that we have a big patch in the libtirpc package to add the source code for rpcgen. So perhaps this should be removed, and libtirpc should depend on host-nfs-utils.

Forget that: I saw your patch that does *exactly* this.

I should read *all* the patches in the queue before replying to the first ones :-)

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#9 lore raw

PATCH 1/4 nfs-utils: add host package

In reply to Baruch Siach

Hello Baruch,

Quoted 6 lines · Baruch Siach

We only need the host package for the rpcgen utility. glibc deprecated this utility in version 2.26. Fedora has recently removed rpcgen from its glibc package. So we need to build the rpcgen from the nfs-utils package.

I've done some testing. First, this package needs host-pkgconf in HOST_NFS_UTILS_DEPENDENCIES, because the configure.ac script uses autoconf macros from pkgconfig.m4. With this fixed, host-nfs-utils builds fine on my system (Fedora 27).

However, it doesn't build on Fedora 28, because the <rpc/types.h> header is not available. If this one gets fixed by using a local copy of <rpc/types.h>, then the build fails for <rpc/rpc.h>, etc.

So in fact on Fedora 28, not only rpcgen is not provided, but also the RPC headers are not provided.

Do you have an idea on how to address this ? Do we need to build host-libtirpc ?

If you don't have a Fedora 28 system at hand, you can easily create a Docker container with Fedora 28 installed.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#10 lore raw

PATCH 1/4 nfs-utils: add host package

Hi Thomas,

Quoted 17 lines · Thomas Petazzoni
Quoted 6 lines · Baruch Siach

We only need the host package for the rpcgen utility. glibc deprecated this utility in version 2.26. Fedora has recently removed rpcgen from its glibc package. So we need to build the rpcgen from the nfs-utils package.

I've done some testing. First, this package needs host-pkgconf in HOST_NFS_UTILS_DEPENDENCIES, because the configure.ac script uses autoconf macros from pkgconfig.m4. With this fixed, host-nfs-utils builds fine on my system (Fedora 27).

However, it doesn't build on Fedora 28, because the <rpc/types.h> header is not available. If this one gets fixed by using a local copy of <rpc/types.h>, then the build fails for <rpc/rpc.h>, etc.

Quoted 5 lines

So in fact on Fedora 28, not only rpcgen is not provided, but also the RPC headers are not provided.

Do you have an idea on how to address this ? Do we need to build host-libtirpc ?

I'll take a look.

If we need host-libtirpc we would not be able to remove the rpcgen patch since that would create a circular dependency.

Why do we actually need rpcgen in libtirpc?

Quoted 2 lines

If you don't have a Fedora 28 system at hand, you can easily create a Docker container with Fedora 28 installed.

Thanks for the tip.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#11 lore raw

PATCH 1/4 nfs-utils: add host package

Hello,

Quoted 4 lines · Baruch Siach
Quoted 2 lines

Do you have an idea on how to address this ? Do we need to build host-libtirpc ?

I'll take a look.

Thanks!

Quoted 2 lines

If we need host-libtirpc we would not be able to remove the rpcgen patch since that would create a circular dependency.

Except if we manage to convince host-libtirpc that it should just install the RPC headers, and not do anything that needs rpcgen.

Quoted 1 line

Why do we actually need rpcgen in libtirpc?

If I remember correctly, it's because it needs to generate the C code matching those RPC descriptions:

./tirpc/rpc/rpcb_prot.x
./tirpc/rpcsvc/crypt.x
./tirpc/rpcsvc/key_prot.x

But it's been a very long time I did this, and libtirpc has been updated multiple times since then.

Alternatively, one approach would be to bundle a pre-generated version of those C files instead of having to run rpcgen. Not the nicest solution, but that's one solution.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#12 lore raw

PATCH 1/4 nfs-utils: add host package

Hi Thomas,

Quoted 15 lines · Thomas Petazzoni
Quoted 4 lines · Baruch Siach
Quoted 2 lines

Do you have an idea on how to address this ? Do we need to build host-libtirpc ?

I'll take a look.

Thanks!

Quoted 2 lines

If we need host-libtirpc we would not be able to remove the rpcgen patch since that would create a circular dependency.

Except if we manage to convince host-libtirpc that it should just install the RPC headers, and not do anything that needs rpcgen.

Quoted 8 lines
Quoted 1 line

Why do we actually need rpcgen in libtirpc?

If I remember correctly, it's because it needs to generate the C code matching those RPC descriptions:

./tirpc/rpc/rpcb_prot.x
./tirpc/rpcsvc/crypt.x
./tirpc/rpcsvc/key_prot.x

The libtirpc tarball bundles these generated files. But for some reason we regenerate them from C.

Quoted 6 lines

But it's been a very long time I did this, and libtirpc has been updated multiple times since then.

Alternatively, one approach would be to bundle a pre-generated version of those C files instead of having to run rpcgen. Not the nicest solution, but that's one solution.

If we can use the bundled files, we can get rid of rpcgen in libtirpc.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#13 lore raw

PATCH 1/4 nfs-utils: add host package

Hello,

Quoted 6 lines · Baruch Siach
Quoted 3 lines

./tirpc/rpc/rpcb_prot.x
./tirpc/rpcsvc/crypt.x
./tirpc/rpcsvc/key_prot.x

The libtirpc tarball bundles these generated files. But for some reason we regenerate them from C.

Hu ? Those .x files are not the generated files. Those are the source files. rpcgen reads .x files and generates C code. You seem to have understood it backwards.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
#14 lore raw

PATCH 1/4 nfs-utils: add host package

Hi Thomas,

Quoted 6 lines · Thomas Petazzoni
Quoted 4 lines · Baruch Siach
Quoted 3 lines

./tirpc/rpc/rpcb_prot.x
./tirpc/rpcsvc/crypt.x
./tirpc/rpcsvc/key_prot.x

Quoted 6 lines
Quoted 2 lines

The libtirpc tarball bundles these generated files. But for some reason we regenerate them from C.

Hu ? Those .x files are not the generated files. Those are the source files. rpcgen reads .x files and generates C code. You seem to have understood it backwards.

Right. But still the .h and .c file that are generated from these .x files are bundled with libtirpc. As far as I can see these are the files:

src/key_prot_xdr.c
src/rpcb_st_xdr.c
tirpc/rpcsvc/crypt.h
tirpc/rpc/rpcb_prot.h
tirpc/rpc/key_prot.h

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#15 lore raw

PATCH 1/4 nfs-utils: add host package

In reply to Baruch Siach
Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Baruch" == Baruch Siach <[email protected]> writes:

We only need the host package for the rpcgen utility. glibc deprecated this utility in version 2.26. Fedora has recently removed rpcgen from its glibc package. So we need to build the rpcgen from the nfs-utils package.

Committed to 2018.02.x, thanks.

Signature · 1 line
Bye, Peter Korsgaard