[v2] package/nfs-utils: enable IPv6 if libtirpc is selected
diff mbox series

Message ID 20190909235607.31990-1-unixmania@gmail.com
State Rejected
Headers show
Series
  • [v2] package/nfs-utils: enable IPv6 if libtirpc is selected
Related show

Commit Message

Carlos Santos Sept. 9, 2019, 11:56 p.m. UTC
From: Carlos Santos <unixmania@gmail.com>

IPv6 requires libtirpc but we don't want to select BR2_PACKAGE_LIBTIRPC
inconditionally because it increases the size of system so enable IPv6
only if libtirpc is already selected.

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

Signed-off-by: Carlos Santos <unixmania@gmail.com>
---
CC: nathan.renniewaldock@gmail.com
CC: Peter Seiderer <ps.report@gmx.net>
CC: Arnout Vandecappelle <arnout@mind.be>
CC: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
--
Changes v1->v2
- Do not select libtirpc inconditionally
---
 package/nfs-utils/nfs-utils.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Arnout Vandecappelle Sept. 10, 2019, 7:06 a.m. UTC | #1
On 10/09/2019 01:56, unixmania@gmail.com wrote:
> From: Carlos Santos <unixmania@gmail.com>
> 
> IPv6 requires libtirpc but we don't want to select BR2_PACKAGE_LIBTIRPC
> inconditionally because it increases the size of system so enable IPv6

 unconditionally

> only if libtirpc is already selected.
> 
> Fixes: https://bugs.busybox.net/show_bug.cgi?id=10806
> 
> Signed-off-by: Carlos Santos <unixmania@gmail.com>
> ---
> CC: nathan.renniewaldock@gmail.com
> CC: Peter Seiderer <ps.report@gmx.net>
> CC: Arnout Vandecappelle <arnout@mind.be>
> CC: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> --
> Changes v1->v2

 This is v3, actually... v1 did the same as here (but without the
--enable-ipv6), v2 selected LIBTIRPC unconditionally.

> - Do not select libtirpc inconditionally
> ---
>  package/nfs-utils/nfs-utils.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
> index dc20942f71..3d5f5412cf 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
> @@ -51,11 +50,12 @@ else
>  NFS_UTILS_CONF_OPTS += --disable-caps
>  endif
>  
> +# IPv6 requires libtirpc

 Just to be sure: IPv6 really requires libtirpc, so the RPC implementation in
glibc is not enough?

 Assuming that this is the case:

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


 Finally, a small nitpick remark: it would be good to update the Config.in help
text with this information. E.g.:

 	  The NFS Linux kernel server.
+
+	  For IPv6 support, select the libtirpc package.


 Regards,
 Arnout

>  ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
> -NFS_UTILS_CONF_OPTS += --enable-tirpc
> +NFS_UTILS_CONF_OPTS += --enable-tirpc --enable-ipv6
>  NFS_UTILS_DEPENDENCIES += libtirpc
>  else
> -NFS_UTILS_CONF_OPTS += --disable-tirpc
> +NFS_UTILS_CONF_OPTS += --disable-tirpc --disable-ipv6
>  endif
>  
>  define NFS_UTILS_INSTALL_FIXUP
>
Carlos Santos Sept. 10, 2019, 10:29 a.m. UTC | #2
On Tue, Sep 10, 2019 at 4:06 AM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>
> On 10/09/2019 01:56, unixmania@gmail.com wrote:
> > From: Carlos Santos <unixmania@gmail.com>
> >
> > IPv6 requires libtirpc but we don't want to select BR2_PACKAGE_LIBTIRPC
> > inconditionally because it increases the size of system so enable IPv6
>
>  unconditionally
>
> > only if libtirpc is already selected.
> >
> > Fixes: https://bugs.busybox.net/show_bug.cgi?id=10806
> >
> > Signed-off-by: Carlos Santos <unixmania@gmail.com>
> > ---
> > CC: nathan.renniewaldock@gmail.com
> > CC: Peter Seiderer <ps.report@gmx.net>
> > CC: Arnout Vandecappelle <arnout@mind.be>
> > CC: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> > --
> > Changes v1->v2
>
>  This is v3, actually... v1 did the same as here (but without the
> --enable-ipv6), v2 selected LIBTIRPC unconditionally.
>
> > - Do not select libtirpc inconditionally
> > ---
> >  package/nfs-utils/nfs-utils.mk | 6 +++---
> >  1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
> > index dc20942f71..3d5f5412cf 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
> > @@ -51,11 +50,12 @@ else
> >  NFS_UTILS_CONF_OPTS += --disable-caps
> >  endif
> >
> > +# IPv6 requires libtirpc
>
>  Just to be sure: IPv6 really requires libtirpc, so the RPC implementation in
> glibc is not enough?
>
>  Assuming that this is the case:
>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>
>
>  Finally, a small nitpick remark: it would be good to update the Config.in help
> text with this information. E.g.:
>
>           The NFS Linux kernel server.
> +
> +         For IPv6 support, select the libtirpc package.
>
>
>  Regards,
>  Arnout
>
> >  ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
> > -NFS_UTILS_CONF_OPTS += --enable-tirpc
> > +NFS_UTILS_CONF_OPTS += --enable-tirpc --enable-ipv6
> >  NFS_UTILS_DEPENDENCIES += libtirpc
> >  else
> > -NFS_UTILS_CONF_OPTS += --disable-tirpc
> > +NFS_UTILS_CONF_OPTS += --disable-tirpc --disable-ipv6
> >  endif
> >
> >  define NFS_UTILS_INSTALL_FIXUP
> >

2019-09-10T07:22:05 configure: error: '--enable-ipv6' requires TIRPC support.

Quite frankly this is a foolish discussion since nfs-utils selects
rpcbind which in its turn selects libtirpc. Anyway, your project, your
rules...
Thomas Petazzoni Sept. 10, 2019, 10:55 a.m. UTC | #3
On Tue, 10 Sep 2019 07:29:39 -0300
Carlos Santos <unixmania@gmail.com> wrote:

> > >  ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
> > > -NFS_UTILS_CONF_OPTS += --enable-tirpc
> > > +NFS_UTILS_CONF_OPTS += --enable-tirpc --enable-ipv6
> > >  NFS_UTILS_DEPENDENCIES += libtirpc
> > >  else
> > > -NFS_UTILS_CONF_OPTS += --disable-tirpc
> > > +NFS_UTILS_CONF_OPTS += --disable-tirpc --disable-ipv6
> > >  endif
> > >
> > >  define NFS_UTILS_INSTALL_FIXUP
> > >  
> 
> 2019-09-10T07:22:05 configure: error: '--enable-ipv6' requires TIRPC support.

How come this happens ? We only pass --enable-ipv6 when TIRPC is
available.

> Quite frankly this is a foolish discussion since nfs-utils selects
> rpcbind which in its turn selects libtirpc. Anyway, your project, your
> rules...

Ah, but I didn't realize that and you never mentioned it so far I
believe. Indeed, it even makes the current libtirpc condition in
nfs-utils.mk completely useless.

Thomas
Carlos Santos Sept. 10, 2019, 11:03 a.m. UTC | #4
On Tue, Sep 10, 2019 at 7:55 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> On Tue, 10 Sep 2019 07:29:39 -0300
> Carlos Santos <unixmania@gmail.com> wrote:
>
> > > >  ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
> > > > -NFS_UTILS_CONF_OPTS += --enable-tirpc
> > > > +NFS_UTILS_CONF_OPTS += --enable-tirpc --enable-ipv6
> > > >  NFS_UTILS_DEPENDENCIES += libtirpc
> > > >  else
> > > > -NFS_UTILS_CONF_OPTS += --disable-tirpc
> > > > +NFS_UTILS_CONF_OPTS += --disable-tirpc --disable-ipv6
> > > >  endif
> > > >
> > > >  define NFS_UTILS_INSTALL_FIXUP
> > > >
> >
> > 2019-09-10T07:22:05 configure: error: '--enable-ipv6' requires TIRPC support.
>
> How come this happens ? We only pass --enable-ipv6 when TIRPC is
> available.

I forced it to happen, just to provide the example. :-)

Patch
diff mbox series

diff --git a/package/nfs-utils/nfs-utils.mk b/package/nfs-utils/nfs-utils.mk
index dc20942f71..3d5f5412cf 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
@@ -51,11 +50,12 @@  else
 NFS_UTILS_CONF_OPTS += --disable-caps
 endif
 
+# IPv6 requires libtirpc
 ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
-NFS_UTILS_CONF_OPTS += --enable-tirpc
+NFS_UTILS_CONF_OPTS += --enable-tirpc --enable-ipv6
 NFS_UTILS_DEPENDENCIES += libtirpc
 else
-NFS_UTILS_CONF_OPTS += --disable-tirpc
+NFS_UTILS_CONF_OPTS += --disable-tirpc --disable-ipv6
 endif
 
 define NFS_UTILS_INSTALL_FIXUP