Bug 10806

Summary: Allow nfs-utils to use ipv6
Product: buildroot Reporter: adyke
Component: OtherAssignee: Carlos Santos <unixmania>
Status: RESOLVED FIXED    
Severity: enhancement CC: buildroot
Priority: P5    
Version: 2017.08   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: Target:
Build:

Description adyke 2018-02-23 16:40:02 UTC
Buildroot always configures nfs-utils without ipv6 support.
My solution is to edit package/nfs-utils/nfs-utils.mk and change --disable-ipv6 to --enable-ipv6 (in the NFS_UTILS_CONF_OPTS variable). I would submit a patch, but I think this option should be selected by enabling ipv6 in the kernel, and I don't know how to accomplish that.
Comment 1 Arnout Vandecappelle 2018-02-25 15:57:27 UTC
We decided a few years ago to no longer make ipv6 support in packages optional, i.e. always assume it is there. Note that even if the kernel is built without IPv6 support, it is possible to run executables in it that are built with IPv6 support - but obviously no IPv6 connection will ever be made.

So you can just unconditionally enable IPv6 support in nfs-utils. Except, apparently, nfs-utils requires libtirpc for IPv6 support, as witnessed by this commit:

commit e23be36ab3a110787917db59618d9f5280457938
Author: Peter Korsgaard <jacmet@sunsite.dk>
Date:   Wed Apr 25 22:29:34 2012

    nfs-utils: fix build with ipv6 after 2a10c9 (pass --enable-ipv6 to autotargets configure)
    
    IPv6 support needs the TIRPC library, which we don't have in Buildroot, so
    forcibly disable IPv6 support.
    

Now, that's a commit from 6 years ago, so the situation may have changed. Therefore, please try if it is possible to build and run nfs-utils *without* libtirpc and *with* --enable-ipv6. If that works, just enable ipv6 unconditionally. If it doesn't work, add the --enable/disable-ipv6 to the existing libtirpc condition in nfs-utils.mk. In that case, please also make a note in the commit message that native RPC is being deprecated so libtirpc (and therefore IPv6) will be enabled unconditionally in the future.
Comment 2 Carlos Santos 2019-08-12 03:08:01 UTC
I'm taking this one.
Comment 3 Carlos Santos 2019-08-12 03:18:26 UTC
Patch submitted: https://patchwork.ozlabs.org/patch/1145462/
Comment 4 Carlos Santos 2019-08-12 17:39:04 UTC
(In reply to Carlos Santos from comment #3)

Patch updated: https://patchwork.ozlabs.org/patch/1145827/
Comment 5 Carlos Santos 2019-09-10 00:01:23 UTC
Discussing the subject in the mailing list it was decided to keep libtirpc
optional so I submitted a second patch that builds nfs-utils with IPv6 enabled
if libtirpc is selected:

https://patchwork.ozlabs.org/patch/1159968/
Comment 6 Thomas Petazzoni 2019-09-12 17:16:02 UTC
Fixed by https://git.buildroot.org/buildroot/commit/?id=749334cb36ea5c0a0fd745dada43122f88a3144c. Thanks a lot Carlos for your work on this issue!