diff mbox series

package/nfs-utils: enable IPv6 if libtirpc is selected

Message ID 20190812030954.4880-1-unixmania@gmail.com
State Superseded, archived
Headers show
Series package/nfs-utils: enable IPv6 if libtirpc is selected | expand

Commit Message

Carlos Santos Aug. 12, 2019, 3:09 a.m. UTC
From: Carlos Santos <unixmania@gmail.com>

IPv6 support depends on libtirpc, so no not disable it if libtirpc is
selected. In practice this always enables IPv6, since nfs-utils needs
rpcbind, which in its turn always selects libtirpc.

Fixes: https://bugs.busybox.net/show_bug.cgi?id=10806

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
CC: nathan.renniewaldock@gmail.com
---
 package/nfs-utils/nfs-utils.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Peter Seiderer Aug. 12, 2019, 4:14 p.m. UTC | #1
Hello Carlos,

On Mon, 12 Aug 2019 00:09:54 -0300, unixmania@gmail.com wrote:

> From: Carlos Santos <unixmania@gmail.com>
>
> IPv6 support depends on libtirpc, so no not disable it if libtirpc is

s/no not/do not/

> selected. In practice this always enables IPv6, since nfs-utils needs
> rpcbind, which in its turn always selects libtirpc.

Why not simple select it directly?

Regards,
Peter

>
> Fixes: https://bugs.busybox.net/show_bug.cgi?id=10806
>
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
> CC: nathan.renniewaldock@gmail.com
> ---
>  package/nfs-utils/nfs-utils.mk | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
> index dc20942f71..974f2a5710 100644
> --- a/package/nfs-utils/nfs-utils.mk
> +++ b/package/nfs-utils/nfs-utils.mk
> @@ -19,7 +19,6 @@ NFS_UTILS_CONF_OPTS = \
>  	--disable-nfsv41 \
>  	--disable-gss \
>  	--disable-uuid \
> -	--disable-ipv6 \
>  	--without-tcp-wrappers \
>  	--with-statedir=/run/nfs \
>  	--with-rpcgen=internal
> @@ -55,7 +54,7 @@ ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
>  NFS_UTILS_CONF_OPTS += --enable-tirpc
>  NFS_UTILS_DEPENDENCIES += libtirpc
>  else
> -NFS_UTILS_CONF_OPTS += --disable-tirpc
> +NFS_UTILS_CONF_OPTS += --disable-ipv6 --disable-tirpc
>  endif
>
>  define NFS_UTILS_INSTALL_FIXUP
Carlos Santos Aug. 12, 2019, 4:33 p.m. UTC | #2
On Mon, Aug 12, 2019 at 1:14 PM Peter Seiderer <ps.report@gmx.net> wrote:
>
> Hello Carlos,
>
> On Mon, 12 Aug 2019 00:09:54 -0300, unixmania@gmail.com wrote:
>
> > From: Carlos Santos <unixmania@gmail.com>
> >
> > IPv6 support depends on libtirpc, so no not disable it if libtirpc is
>
> s/no not/do not/

Ops! I will fix it.

> > selected. In practice this always enables IPv6, since nfs-utils needs
> > rpcbind, which in its turn always selects libtirpc.
>
> Why not simple select it directly?

I was following Arnout's suggested in

  https://bugs.busybox.net/show_bug.cgi?id=10806#c1

But I agree that selecting directly is a simpler and better approach.
Thomas Petazzoni Aug. 12, 2019, 9:06 p.m. UTC | #3
Hello,

On Mon, 12 Aug 2019 18:14:50 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> On Mon, 12 Aug 2019 00:09:54 -0300, unixmania@gmail.com wrote:
> 
> > From: Carlos Santos <unixmania@gmail.com>
> >
> > IPv6 support depends on libtirpc, so no not disable it if libtirpc is  
> 
> s/no not/do not/
> 
> > selected. In practice this always enables IPv6, since nfs-utils needs
> > rpcbind, which in its turn always selects libtirpc.  
> 
> Why not simple select it directly?

Because it is an optional dependency and as such is not strictly
required, so we don't typically force such optional dependencies in
Buildroot.

I found the v1 from Carlos to be more appropriate than his v2. If you
want RPC/IPv6 support, then you must enable libtirpc, and nfs-utils.mk
properly uses libtirpc if available.

Arnout, what do you think ?

Best regards,

Thomas
Carlos Santos Aug. 12, 2019, 11:47 p.m. UTC | #4
On Mon, Aug 12, 2019 at 6:06 PM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Mon, 12 Aug 2019 18:14:50 +0200
> Peter Seiderer <ps.report@gmx.net> wrote:
>
> > On Mon, 12 Aug 2019 00:09:54 -0300, unixmania@gmail.com wrote:
> >
> > > From: Carlos Santos <unixmania@gmail.com>
> > >
> > > IPv6 support depends on libtirpc, so no not disable it if libtirpc is
> >
> > s/no not/do not/
> >
> > > selected. In practice this always enables IPv6, since nfs-utils needs
> > > rpcbind, which in its turn always selects libtirpc.
> >
> > Why not simple select it directly?
>
> Because it is an optional dependency and as such is not strictly
> required, so we don't typically force such optional dependencies in
> Buildroot.
> I found the v1 from Carlos to be more appropriate than his v2. If you
> want RPC/IPv6 support, then you must enable libtirpc, and nfs-utils.mk
> properly uses libtirpc if available.
>
> Arnout, what do you think ?

It's an optional dependency only if we decide to make ipv6 optional,
which goes against the decision taken years go, according to Arnout's
comment[1]: "We decided a few years ago to no longer make ipv6 support
in packages optional, i.e. always assume it is there." That's why by
default autotools packages are configured with --enable-ipv6 (see
package/pkg-autotools.mk).

1. https://bugs.busybox.net/show_bug.cgi?id=10806#c1
Thomas Petazzoni Aug. 13, 2019, 12:14 p.m. UTC | #5
On Mon, 12 Aug 2019 20:47:06 -0300
Carlos Santos <unixmania@gmail.com> wrote:

> It's an optional dependency only if we decide to make ipv6 optional,
> which goes against the decision taken years go, according to Arnout's
> comment[1]: "We decided a few years ago to no longer make ipv6 support
> in packages optional, i.e. always assume it is there." That's why by
> default autotools packages are configured with --enable-ipv6 (see
> package/pkg-autotools.mk).
> 
> 1. https://bugs.busybox.net/show_bug.cgi?id=10806#c1

But then in this case, we should entirely drop the RPC support for
uClibc-ng, as it doesn't support IPv6 if I remember correctly, and
simply force libtirpc for all packages that need RPC support. This is
not just something specific to nfs-utils, we have a number of other
packages that use RPC.

Thomas
diff mbox series

Patch

diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
index dc20942f71..974f2a5710 100644
--- a/package/nfs-utils/nfs-utils.mk
+++ b/package/nfs-utils/nfs-utils.mk
@@ -19,7 +19,6 @@  NFS_UTILS_CONF_OPTS = \
 	--disable-nfsv41 \
 	--disable-gss \
 	--disable-uuid \
-	--disable-ipv6 \
 	--without-tcp-wrappers \
 	--with-statedir=/run/nfs \
 	--with-rpcgen=internal
@@ -55,7 +54,7 @@  ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
 NFS_UTILS_CONF_OPTS += --enable-tirpc
 NFS_UTILS_DEPENDENCIES += libtirpc
 else
-NFS_UTILS_CONF_OPTS += --disable-tirpc
+NFS_UTILS_CONF_OPTS += --disable-ipv6 --disable-tirpc
 endif
 
 define NFS_UTILS_INSTALL_FIXUP