mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-01 15:11:25 +00:00
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 ];
|
||||
|
||||
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, ...}: {
|
||||
@ -36,7 +36,7 @@ import ./make-test.nix (pkgs: {
|
||||
$machine->waitForShutdown;
|
||||
$machine->start;
|
||||
$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 \
|
||||
-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"
|
||||
echo "$otherIP reachable" | ${pkgs.netcat}/bin/netcat -clp 5678 || :
|
||||
echo "$otherIP reachable" | ${pkgs.netcat}/bin/nc -l 5678 || :
|
||||
'';
|
||||
|
||||
sysdDetectVirt = pkgs: ''
|
||||
@ -461,11 +461,11 @@ in mapAttrs mkVBoxTest {
|
||||
my $test1IP = waitForIP_test1 1;
|
||||
my $test2IP = waitForIP_test2 1;
|
||||
|
||||
$machine->succeed("echo '$test2IP' | netcat -c '$test1IP' 1234");
|
||||
$machine->succeed("echo '$test1IP' | netcat -c '$test2IP' 1234");
|
||||
$machine->succeed("echo '$test2IP' | nc '$test1IP' 1234");
|
||||
$machine->succeed("echo '$test1IP' | nc '$test2IP' 1234");
|
||||
|
||||
$machine->waitUntilSucceeds("netcat -c '$test1IP' 5678 >&2");
|
||||
$machine->waitUntilSucceeds("netcat -c '$test2IP' 5678 >&2");
|
||||
$machine->waitUntilSucceeds("nc '$test1IP' 5678 >&2");
|
||||
$machine->waitUntilSucceeds("nc '$test2IP' 5678 >&2");
|
||||
|
||||
shutdownVM_test1;
|
||||
shutdownVM_test2;
|
||||
|
@ -7,7 +7,7 @@
|
||||
, gnupg1compat
|
||||
, icoutils
|
||||
, imagemagick
|
||||
, netcat
|
||||
, netcat-gnu
|
||||
, p7zip
|
||||
, python2Packages
|
||||
, unzip
|
||||
@ -34,7 +34,7 @@ let
|
||||
gnupg1compat
|
||||
icoutils
|
||||
imagemagick
|
||||
netcat
|
||||
netcat-gnu
|
||||
p7zip
|
||||
unzip
|
||||
wget
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ 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
|
||||
}:
|
||||
|
||||
@ -10,7 +10,7 @@ with stdenv.lib;
|
||||
let
|
||||
controller = import ./controller {
|
||||
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 {
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, writeScript, vmTools, makeInitrd
|
||||
, samba, vde2, openssh, socat, netcat, coreutils, gnugrep, gzip
|
||||
, samba, vde2, openssh, socat, netcat-gnu, coreutils, gnugrep, gzip
|
||||
}:
|
||||
|
||||
{ sshKey
|
||||
@ -79,7 +79,7 @@ let
|
||||
${coreutils}/bin/chmod 600 /ssh.key
|
||||
'' + (if installMode then ''
|
||||
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 .
|
||||
# Print a dot every 10 seconds only to shorten line length.
|
||||
${coreutils}/bin/sleep 10
|
||||
@ -118,7 +118,7 @@ let
|
||||
${samba}/sbin/smbd -D
|
||||
|
||||
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 .
|
||||
${coreutils}/bin/sleep 1
|
||||
done
|
||||
|
@ -3,7 +3,7 @@ pkgs:
|
||||
let
|
||||
bootstrapper = import ./bootstrap.nix {
|
||||
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) gnugrep;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
{ stdenv, fetchurl, pkgconfig, intltool, gnome2, libxfce4ui,
|
||||
libxfce4util, xfce4panel, libnotify, lm_sensors, hddtemp, netcat
|
||||
libxfce4util, xfce4panel, libnotify, lm_sensors, hddtemp, netcat-gnu
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -26,14 +26,14 @@ stdenv.mkDerivation rec {
|
||||
libnotify
|
||||
lm_sensors
|
||||
hddtemp
|
||||
netcat
|
||||
netcat-gnu
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-pathhddtemp=${hddtemp}/bin/hddtemp"
|
||||
"--with-pathnetcat=${netcat}/bin/netcat"
|
||||
"--with-pathnetcat=${netcat-gnu}/bin/netcat"
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
@ -2795,7 +2795,9 @@ in
|
||||
|
||||
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 { };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user