tests: Replace ncat with socat in migration test and drop ncat from containers
PATCH 1/1 tests: Replace ncat with socat in migration test and drop ncat from containers
From: Thomas Huth <[email protected]>
nmap / ncat has a somewhat problematic license (e.g. saying claiming that derived work is also considered for software that "is designed specifically to execute Covered Software and parse the results", e.g. by executing ncat from your own program, you might already fall into this category) - so for example in openSUSE 16, you can only find it in the "non-OSS" repository.
We are currently only using it in the migration functional test, and that likely does not fall into this "derived work" category yet (since it is also doing some other stuff), but still, to be safe, we should move away from using it now.
Unfortunately, switching to one of the other flavors of netcat is also not a real option (see commit f700abbbeb6ab68a3446d1fb168a934d), but socat should be a solid replacement here instead.
To avoid that someone else easily uses ncat again, let's also remove it from our container files now.
--- scripts/ci/setup/debian/debian-13-ppc64le.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2404-aarch64.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2404-s390x.yaml | 1 - tests/docker/dockerfiles/alpine.docker | 1 - tests/docker/dockerfiles/centos9.docker | 1 - tests/docker/dockerfiles/debian-amd64-cross.docker | 1 - tests/docker/dockerfiles/debian-arm64-cross.docker | 1 - tests/docker/dockerfiles/debian-armhf-cross.docker | 1 - tests/docker/dockerfiles/debian-i686-cross.docker | 1 - tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 - tests/docker/dockerfiles/debian-mipsel-cross.docker | 1 - tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 - tests/docker/dockerfiles/debian-riscv64-cross.docker | 1 - tests/docker/dockerfiles/debian-s390x-cross.docker | 1 - tests/docker/dockerfiles/debian.docker | 1 - tests/docker/dockerfiles/fedora-rust-nightly.docker | 1 - tests/docker/dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/opensuse-leap.docker | 1 - tests/docker/dockerfiles/ubuntu2204.docker | 1 - tests/functional/migration.py | 4 ++-- tests/lcitool/projects/qemu.yml | 1 - 22 files changed, 2 insertions(+), 23 deletions(-)
scripts/ci/setup/debian/debian-13-ppc64le.yaml +0 -1
@@ -101,7 +101,6 @@ packages: - make - mtools - multipath-tools - - ncat - nettle-dev - ninja-build - openssh-client
scripts/ci/setup/ubuntu/ubuntu-2404-aarch64.yaml +0 -1
@@ -102,7 +102,6 @@ packages: - make - mtools - multipath-tools - - ncat - nettle-dev - ninja-build - openssh-client
scripts/ci/setup/ubuntu/ubuntu-2404-s390x.yaml +0 -1
@@ -100,7 +100,6 @@ packages: - make - mtools - multipath-tools - - ncat - nettle-dev - ninja-build - openssh-client
tests/docker/dockerfiles/alpine.docker +0 -1
@@ -76,7 +76,6 @@ RUN apk update && \ ndctl-dev \ net-tools \ nettle-dev \ - nmap-ncat \ numactl-dev \ openssh-client \ pcre2-dev \
tests/docker/dockerfiles/centos9.docker +0 -1
@@ -87,7 +87,6 @@ RUN dnf --quiet distro-sync -y && \ ncurses-devel \ nettle-devel \ ninja-build \ - nmap-ncat \ numactl-devel \ openssh-clients \ pam-devel \
tests/docker/dockerfiles/debian-amd64-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-arm64-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-armhf-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-i686-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-mips64el-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-mipsel-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-ppc64el-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-riscv64-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian-s390x-cross.docker +0 -1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ locales \ make \ mtools \ - ncat \ ninja-build \ openssh-client \ pkgconf \
tests/docker/dockerfiles/debian.docker +0 -1
@@ -109,7 +109,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ make \ mtools \ multipath-tools \ - ncat \ nettle-dev \ ninja-build \ openssh-client \
tests/docker/dockerfiles/fedora-rust-nightly.docker +0 -1
@@ -96,7 +96,6 @@ exec "$@"\n' > /usr/bin/nosync && \ ncurses-devel \ nettle-devel \ ninja-build \ - nmap-ncat \ numactl-devel \ openssh-clients \ pam-devel \
tests/docker/dockerfiles/fedora-win64-cross.docker +0 -1
@@ -42,7 +42,6 @@ exec "$@"\n' > /usr/bin/nosync && \ make \ mtools \ ninja-build \ - nmap-ncat \ openssh-clients \ python3 \ python3-PyYAML \
tests/docker/dockerfiles/fedora.docker +0 -1
@@ -96,7 +96,6 @@ exec "$@"\n' > /usr/bin/nosync && \ ncurses-devel \ nettle-devel \ ninja-build \ - nmap-ncat \ numactl-devel \ openssh-clients \ pam-devel \
tests/docker/dockerfiles/opensuse-leap.docker +0 -1
@@ -86,7 +86,6 @@ RUN zypper update -y && \ lzo-devel \ make \ mtools \ - ncat \ ncurses-devel \ ninja \ openssh \
tests/docker/dockerfiles/ubuntu2204.docker +0 -1
@@ -107,7 +107,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ make \ mtools \ multipath-tools \ - ncat \ nettle-dev \ ninja-build \ openssh-client \
tests/functional/migration.py +2 -2
@@ -84,6 +84,6 @@ def migration_with_exec(self): self.skipTest('ncat is not available') with Ports() as ports: free_port = self._get_free_port(ports) - dst_uri = 'exec:ncat -l localhost %u' % free_port - src_uri = 'exec:ncat localhost %u' % free_port + dst_uri = 'exec:socat TCP-LISTEN:%u -' % free_port + src_uri = 'exec:socat - TCP:localhost:%u' % free_port self.migrate(dst_uri, src_uri)
tests/lcitool/projects/qemu.yml +0 -1
@@ -83,7 +83,6 @@ packages: - meson - mtools - ncursesw - - netcat - nettle - ninja - nsis
Signature · 1 line
2.53.0
Quoted 39 lines · Thomas Huth
From: Thomas Huth <[email protected]>
nmap / ncat has a somewhat problematic license (e.g. saying claiming that derived work is also considered for software that "is designed specifically to execute Covered Software and parse the results", e.g. by executing ncat from your own program, you might already fall into this category) - so for example in openSUSE 16, you can only find it in the "non-OSS" repository.
We are currently only using it in the migration functional test, and that likely does not fall into this "derived work" category yet (since it is also doing some other stuff), but still, to be safe, we should move away from using it now.
Unfortunately, switching to one of the other flavors of netcat is also not a real option (see commit
f700abbbeb6ab68a3446d1fb168a934d), but socat should be a solid replacement here instead.To avoid that someone else easily uses ncat again, let's also remove it from our container files now.
Suggested-by Daniel P. Berrangé <[email protected]>Signed-off-by Thomas Huth <[email protected]>--- scripts/ci/setup/debian/debian-13-ppc64le.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2404-aarch64.yaml | 1 - scripts/ci/setup/ubuntu/ubuntu-2404-s390x.yaml | 1 - tests/docker/dockerfiles/alpine.docker | 1 - tests/docker/dockerfiles/centos9.docker | 1 - tests/docker/dockerfiles/debian-amd64-cross.docker | 1 - tests/docker/dockerfiles/debian-arm64-cross.docker | 1 - tests/docker/dockerfiles/debian-armhf-cross.docker | 1 - tests/docker/dockerfiles/debian-i686-cross.docker | 1 - tests/docker/dockerfiles/debian-mips64el-cross.docker | 1 - tests/docker/dockerfiles/debian-mipsel-cross.docker | 1 - tests/docker/dockerfiles/debian-ppc64el-cross.docker | 1 - tests/docker/dockerfiles/debian-riscv64-cross.docker | 1 - tests/docker/dockerfiles/debian-s390x-cross.docker | 1 - tests/docker/dockerfiles/debian.docker | 1 -
Quoted 8 lines
tests/docker/dockerfiles/fedora-rust-nightly.docker | 1 - tests/docker/dockerfiles/fedora-win64-cross.docker | 1 - tests/docker/dockerfiles/fedora.docker | 1 - tests/docker/dockerfiles/opensuse-leap.docker | 1 - tests/docker/dockerfiles/ubuntu2204.docker | 1 - tests/functional/migration.py | 4 ++-- tests/lcitool/projects/qemu.yml | 1 - 22 files changed, 2 insertions(+), 23 deletions(-)
Quoted 18 lines · Thomas Huth
From: Thomas Huth <[email protected]>
nmap / ncat has a somewhat problematic license (e.g. saying claiming that derived work is also considered for software that "is designed specifically to execute Covered Software and parse the results", e.g. by executing ncat from your own program, you might already fall into this category) - so for example in openSUSE 16, you can only find it in the "non-OSS" repository.
We are currently only using it in the migration functional test, and that likely does not fall into this "derived work" category yet (since it is also doing some other stuff), but still, to be safe, we should move away from using it now.
Unfortunately, switching to one of the other flavors of netcat is also not a real option (see commit
f700abbbeb6ab68a3446d1fb168a934d), but socat should be a solid replacement here instead.
Quoted 5 lines
To avoid that someone else easily uses ncat again, let's also remove it from our container files now.
Suggested-by Daniel P. Berrangé <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Signature · 1 line
Peter Xu
Quoted 18 lines · Thomas Huth
From: Thomas Huth <[email protected]>
nmap / ncat has a somewhat problematic license (e.g. saying claiming that derived work is also considered for software that "is designed specifically to execute Covered Software and parse the results", e.g. by executing ncat from your own program, you might already fall into this category) - so for example in openSUSE 16, you can only find it in the "non-OSS" repository.
We are currently only using it in the migration functional test, and that likely does not fall into this "derived work" category yet (since it is also doing some other stuff), but still, to be safe, we should move away from using it now.
Unfortunately, switching to one of the other flavors of netcat is also not a real option (see commit
f700abbbeb6ab68a3446d1fb168a934d), but socat should be a solid replacement here instead.
Quoted 5 lines
To avoid that someone else easily uses ncat again, let's also remove it from our container files now.
Suggested-by Daniel P. Berrangé <[email protected]>Signed-off-by Thomas Huth <[email protected]>
Queued to testing/next, thanks.
Signature · 2 lines
Alex Bennée Virtualisation Tech Lead @ Linaro