forked from mirrors/nixpkgs
netcat: make netcat-openbsd the default netcat (#19411)
The motivation for this change is the following: As gnu-netcat, e. g. does not support ipv6, it is not suitable as default netcat. This commit also fixes all obvious build issues caused by this change.
This commit is contained in:
parent
750af04bad
commit
e2372502d3
|
@ -13,7 +13,7 @@ import ./make-test.nix (pkgs: {
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 4444 ];
|
networking.firewall.allowedTCPPorts = [ 4444 ];
|
||||||
|
|
||||||
systemd.services.listener.serviceConfig.ExecStart = "${pkgs.netcat}/bin/nc -l -p 4444";
|
systemd.services.listener.serviceConfig.ExecStart = "${pkgs.netcat}/bin/nc -l 4444";
|
||||||
};
|
};
|
||||||
|
|
||||||
probe = { config, lib, pkgs, ...}: {
|
probe = { config, lib, pkgs, ...}: {
|
||||||
|
@ -36,7 +36,7 @@ import ./make-test.nix (pkgs: {
|
||||||
$machine->waitForShutdown;
|
$machine->waitForShutdown;
|
||||||
$machine->start;
|
$machine->start;
|
||||||
$probe->waitForUnit("network.target");
|
$probe->waitForUnit("network.target");
|
||||||
$probe->waitUntilSucceeds("echo test | nc -c machine 4444");
|
$probe->waitUntilSucceeds("echo test | nc machine 4444");
|
||||||
'';
|
'';
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
|
@ -299,9 +299,9 @@ let
|
||||||
-pf /run/dhclient.pid \
|
-pf /run/dhclient.pid \
|
||||||
-v eth0 eth1
|
-v eth0 eth1
|
||||||
|
|
||||||
otherIP="$(${pkgs.netcat}/bin/netcat -clp 1234 || :)"
|
otherIP="$(${pkgs.netcat}/bin/nc -l 1234 || :)"
|
||||||
${pkgs.iputils}/bin/ping -I eth1 -c1 "$otherIP"
|
${pkgs.iputils}/bin/ping -I eth1 -c1 "$otherIP"
|
||||||
echo "$otherIP reachable" | ${pkgs.netcat}/bin/netcat -clp 5678 || :
|
echo "$otherIP reachable" | ${pkgs.netcat}/bin/nc -l 5678 || :
|
||||||
'';
|
'';
|
||||||
|
|
||||||
sysdDetectVirt = pkgs: ''
|
sysdDetectVirt = pkgs: ''
|
||||||
|
@ -461,11 +461,11 @@ in mapAttrs mkVBoxTest {
|
||||||
my $test1IP = waitForIP_test1 1;
|
my $test1IP = waitForIP_test1 1;
|
||||||
my $test2IP = waitForIP_test2 1;
|
my $test2IP = waitForIP_test2 1;
|
||||||
|
|
||||||
$machine->succeed("echo '$test2IP' | netcat -c '$test1IP' 1234");
|
$machine->succeed("echo '$test2IP' | nc '$test1IP' 1234");
|
||||||
$machine->succeed("echo '$test1IP' | netcat -c '$test2IP' 1234");
|
$machine->succeed("echo '$test1IP' | nc '$test2IP' 1234");
|
||||||
|
|
||||||
$machine->waitUntilSucceeds("netcat -c '$test1IP' 5678 >&2");
|
$machine->waitUntilSucceeds("nc '$test1IP' 5678 >&2");
|
||||||
$machine->waitUntilSucceeds("netcat -c '$test2IP' 5678 >&2");
|
$machine->waitUntilSucceeds("nc '$test2IP' 5678 >&2");
|
||||||
|
|
||||||
shutdownVM_test1;
|
shutdownVM_test1;
|
||||||
shutdownVM_test2;
|
shutdownVM_test2;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
, gnupg1compat
|
, gnupg1compat
|
||||||
, icoutils
|
, icoutils
|
||||||
, imagemagick
|
, imagemagick
|
||||||
, netcat
|
, netcat-gnu
|
||||||
, p7zip
|
, p7zip
|
||||||
, python2Packages
|
, python2Packages
|
||||||
, unzip
|
, unzip
|
||||||
|
@ -34,7 +34,7 @@ let
|
||||||
gnupg1compat
|
gnupg1compat
|
||||||
icoutils
|
icoutils
|
||||||
imagemagick
|
imagemagick
|
||||||
netcat
|
netcat-gnu
|
||||||
p7zip
|
p7zip
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, vmTools, writeScript, writeText, runCommand, makeInitrd
|
{ stdenv, fetchurl, vmTools, writeScript, writeText, runCommand, makeInitrd
|
||||||
, python, perl, coreutils, dosfstools, gzip, mtools, netcat, openssh, qemu
|
, python, perl, coreutils, dosfstools, gzip, mtools, netcat-gnu, openssh, qemu
|
||||||
, samba, socat, vde2, cdrkit, pathsFromGraph, gnugrep
|
, samba, socat, vde2, cdrkit, pathsFromGraph, gnugrep
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ with stdenv.lib;
|
||||||
let
|
let
|
||||||
controller = import ./controller {
|
controller = import ./controller {
|
||||||
inherit stdenv writeScript vmTools makeInitrd;
|
inherit stdenv writeScript vmTools makeInitrd;
|
||||||
inherit samba vde2 openssh socat netcat coreutils gzip gnugrep;
|
inherit samba vde2 openssh socat netcat-gnu coreutils gzip gnugrep;
|
||||||
};
|
};
|
||||||
|
|
||||||
mkCygwinImage = import ./cygwin-iso {
|
mkCygwinImage = import ./cygwin-iso {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, writeScript, vmTools, makeInitrd
|
{ stdenv, writeScript, vmTools, makeInitrd
|
||||||
, samba, vde2, openssh, socat, netcat, coreutils, gnugrep, gzip
|
, samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip
|
||||||
}:
|
}:
|
||||||
|
|
||||||
{ sshKey
|
{ sshKey
|
||||||
|
@ -79,7 +79,7 @@ let
|
||||||
${coreutils}/bin/chmod 600 /ssh.key
|
${coreutils}/bin/chmod 600 /ssh.key
|
||||||
'' + (if installMode then ''
|
'' + (if installMode then ''
|
||||||
echo -n "Waiting for Windows installation to finish..."
|
echo -n "Waiting for Windows installation to finish..."
|
||||||
while ! ${netcat}/bin/netcat -z 192.168.0.1 22; do
|
while ! ${netcat-gnu}/bin/netcat -z 192.168.0.1 22; do
|
||||||
echo -n .
|
echo -n .
|
||||||
# Print a dot every 10 seconds only to shorten line length.
|
# Print a dot every 10 seconds only to shorten line length.
|
||||||
${coreutils}/bin/sleep 10
|
${coreutils}/bin/sleep 10
|
||||||
|
@ -118,7 +118,7 @@ let
|
||||||
${samba}/sbin/smbd -D
|
${samba}/sbin/smbd -D
|
||||||
|
|
||||||
echo -n "Waiting for Windows VM to become available..."
|
echo -n "Waiting for Windows VM to become available..."
|
||||||
while ! ${netcat}/bin/netcat -z 192.168.0.1 22; do
|
while ! ${netcat-gnu}/bin/netcat -z 192.168.0.1 22; do
|
||||||
echo -n .
|
echo -n .
|
||||||
${coreutils}/bin/sleep 1
|
${coreutils}/bin/sleep 1
|
||||||
done
|
done
|
||||||
|
|
|
@ -3,7 +3,7 @@ pkgs:
|
||||||
let
|
let
|
||||||
bootstrapper = import ./bootstrap.nix {
|
bootstrapper = import ./bootstrap.nix {
|
||||||
inherit (pkgs) stdenv vmTools writeScript writeText runCommand makeInitrd;
|
inherit (pkgs) stdenv vmTools writeScript writeText runCommand makeInitrd;
|
||||||
inherit (pkgs) coreutils dosfstools gzip mtools netcat openssh qemu samba;
|
inherit (pkgs) coreutils dosfstools gzip mtools netcat-gnu openssh qemu samba;
|
||||||
inherit (pkgs) socat vde2 fetchurl python perl cdrkit pathsFromGraph;
|
inherit (pkgs) socat vde2 fetchurl python perl cdrkit pathsFromGraph;
|
||||||
inherit (pkgs) gnugrep;
|
inherit (pkgs) gnugrep;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ stdenv, fetchurl, pkgconfig, intltool, gnome2, libxfce4ui,
|
{ stdenv, fetchurl, pkgconfig, intltool, gnome2, libxfce4ui,
|
||||||
libxfce4util, xfce4panel, libnotify, lm_sensors, hddtemp, netcat
|
libxfce4util, xfce4panel, libnotify, lm_sensors, hddtemp, netcat-gnu
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
@ -26,14 +26,14 @@ stdenv.mkDerivation rec {
|
||||||
libnotify
|
libnotify
|
||||||
lm_sensors
|
lm_sensors
|
||||||
hddtemp
|
hddtemp
|
||||||
netcat
|
netcat-gnu
|
||||||
];
|
];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-pathhddtemp=${hddtemp}/bin/hddtemp"
|
"--with-pathhddtemp=${hddtemp}/bin/hddtemp"
|
||||||
"--with-pathnetcat=${netcat}/bin/netcat"
|
"--with-pathnetcat=${netcat-gnu}/bin/netcat"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
|
@ -2795,7 +2795,9 @@ in
|
||||||
|
|
||||||
netboot = callPackage ../tools/networking/netboot {};
|
netboot = callPackage ../tools/networking/netboot {};
|
||||||
|
|
||||||
netcat = callPackage ../tools/networking/netcat { };
|
netcat = netcat-openbsd;
|
||||||
|
|
||||||
|
netcat-gnu = callPackage ../tools/networking/netcat-gnu { };
|
||||||
|
|
||||||
netcat-openbsd = callPackage ../tools/networking/netcat-openbsd { };
|
netcat-openbsd = callPackage ../tools/networking/netcat-openbsd { };
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue