Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build reproducibility depends on ipv6 availability #675

Open
pwaller opened this issue Nov 30, 2024 · 0 comments
Open

Build reproducibility depends on ipv6 availability #675

pwaller opened this issue Nov 30, 2024 · 0 comments

Comments

@pwaller
Copy link

pwaller commented Nov 30, 2024

Version: Rsync 3.3.0.

The config test for inet6 support means that the build you get varies according to whether or not ipv6 is enabled on the machine doing the build. This makes it so that two machines trying to verify each other's rsync builds will find differences unless their runtime configuration is the same.

#include <stdlib.h>
#include <sys/types.h>
#include <sys/socket.h>
int main()
{
    if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
        exit(1);
    else
        exit(0);
}

On one machine I have booted with kernel command line ipv6.disable=1, this results in exit 1:

socket(AF_INET6, SOCK_STREAM, IPPROTO_IP) = -1 EAFNOSUPPORT (Address family not supported by protocol)

And another it succeeds.

Is it intended to fuse off ipv6 functionality if the building machine happens to have ipv6 disabled? I would have expected both cases to result in an rsync binary capable of using ipv6; even if it happened to be unavailable at runtime during the build.

pwaller added a commit to pwaller/nixpkgs that referenced this issue Nov 30, 2024
Rsync does a runtime check for ipv6 availability unless explicitly
enabled/disabled, leading to a diverged build between machines if one
machine has `ipv6.disable=1` kernel commandline on linux.

Skip the check by always enabling it.

Ref: RsyncProject/rsync#675
Fix: NixOS#360152
Signed-off-by: Peter Waller <[email protected]>
pwaller added a commit to pwaller/nixpkgs that referenced this issue Nov 30, 2024
Rsync does a runtime check for ipv6 availability unless explicitly
enabled/disabled, leading to a diverged build between machines if one
machine has `ipv6.disable=1` kernel commandline on linux.

Skip the check by always enabling it.

Ref: RsyncProject/rsync#675
Fix: NixOS#360152
Signed-off-by: Peter Waller <[email protected]>
pwaller added a commit to pwaller/nixpkgs that referenced this issue Nov 30, 2024
Rsync's configure phase does a runtime check for ipv6 availability
unless explicitly enabled/disabled, leading to a diverged build between
machines if one machine has `ipv6.disable=1` kernel commandline on
linux.

Skip the check by always enabling it.

Ref: RsyncProject/rsync#675
Fix: NixOS#360152
Signed-off-by: Peter Waller <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant