Message ID | 4b1f3623de3a8a4386f76d0f3cdd36b7c9b230dd.1526643119.git.baruch@tkos.co.il |
---|---|
State | Superseded |
Headers | show |
Series | [1/4] nfs-utils: add host package | expand |
Hello, On Fri, 18 May 2018 14:31:56 +0300, Baruch Siach wrote: > 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. > > Signed-off-by: Baruch Siach <baruch@tkos.co.il> 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
Hello, On Fri, 18 May 2018 14:32:17 +0200, Thomas Petazzoni wrote: > 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
Hello Baruch, On Fri, 18 May 2018 14:31:56 +0300, Baruch Siach wrote: > 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. > > Signed-off-by: Baruch Siach <baruch@tkos.co.il> 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
Hi Thomas, On Sat, May 19, 2018 at 12:44:12PM +0200, Thomas Petazzoni wrote: > On Fri, 18 May 2018 14:31:56 +0300, Baruch Siach wrote: > > 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. > > > > Signed-off-by: Baruch Siach <baruch@tkos.co.il> > > 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 ? 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? > 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
Hello, On Mon, 21 May 2018 09:07:56 +0300, Baruch Siach wrote: > > Do you have an idea on how to address this ? Do we need to build > > host-libtirpc ? > > I'll take a look. Thanks! > 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. > 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
Hi Thomas, On Mon, May 21, 2018 at 10:19:28AM +0200, Thomas Petazzoni wrote: > On Mon, 21 May 2018 09:07:56 +0300, Baruch Siach wrote: > > > > Do you have an idea on how to address this ? Do we need to build > > > host-libtirpc ? > > > > I'll take a look. > > Thanks! > > > 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. > > > 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. > 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
Hello, On Mon, 21 May 2018 11:28:18 +0300, Baruch Siach wrote: > > ./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
Hi Thomas, On Mon, May 21, 2018 at 10:32:59AM +0200, Thomas Petazzoni wrote: > On Mon, 21 May 2018 11:28:18 +0300, Baruch Siach wrote: > > > > ./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. 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
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> 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. > Signed-off-by: Baruch Siach <baruch@tkos.co.il> Committed to 2018.02.x, thanks.
diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk index 26112d69f230..8100706c1505 100644 --- a/package/nfs-utils/nfs-utils.mk +++ b/package/nfs-utils/nfs-utils.mk @@ -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))
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. Signed-off-by: Baruch Siach <baruch@tkos.co.il> --- package/nfs-utils/nfs-utils.mk | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)