@samitouri / QOSamiQemu / commits / 643a171f56

tests: Replace ncat with socat in migration test and drop ncat from containers

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é <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Acked-by: Peter Xu <peterx@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260316183016.239526-1-thuth@redhat.com> Message-ID: <20260320155107.2143191-9-alex.bennee@linaro.org> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>

Thomas Huth committed Mar 20, 2026 at 15:51 UTC 643a171f56682360a9540783c9edb4f69d639965
21 files changed +2 -22
scripts/ci/setup/debian/debian-13-ppc64le.yaml
-1
@@ -101,7 +101,6 @@ packages:
101 - make
102 - mtools
103 - multipath-tools
104 - - ncat
104 - nettle-dev
105 - ninja-build
106 - openssh-client
scripts/ci/setup/ubuntu/ubuntu-2404-aarch64.yaml
-1
@@ -102,7 +102,6 @@ packages:
102 - make
103 - mtools
104 - multipath-tools
105 - - ncat
105 - nettle-dev
106 - ninja-build
107 - openssh-client
scripts/ci/setup/ubuntu/ubuntu-2404-s390x.yaml
-1
@@ -100,7 +100,6 @@ packages:
100 - make
101 - mtools
102 - multipath-tools
103 - - ncat
103 - nettle-dev
104 - ninja-build
105 - openssh-client
tests/docker/dockerfiles/alpine.docker
-1
@@ -76,7 +76,6 @@ RUN apk update && \
76 ndctl-dev \
77 net-tools \
78 nettle-dev \
79 - nmap-ncat \
79 numactl-dev \
80 openssh-client \
81 pcre2-dev \
tests/docker/dockerfiles/centos9.docker
-1
@@ -87,7 +87,6 @@ RUN dnf --quiet distro-sync -y && \
87 ncurses-devel \
88 nettle-devel \
89 ninja-build \
90 - nmap-ncat \
90 numactl-devel \
91 openssh-clients \
92 pam-devel \
tests/docker/dockerfiles/debian-amd64-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-arm64-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-armhf-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-i686-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-mips64el-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-mipsel-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-ppc64el-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-riscv64-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian-s390x-cross.docker
-1
@@ -37,7 +37,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
37 locales \
38 make \
39 mtools \
40 - ncat \
40 ninja-build \
41 openssh-client \
42 pkgconf \
tests/docker/dockerfiles/debian.docker
-1
@@ -109,7 +109,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
109 make \
110 mtools \
111 multipath-tools \
112 - ncat \
112 nettle-dev \
113 ninja-build \
114 openssh-client \
tests/docker/dockerfiles/fedora-rust-nightly.docker
-1
@@ -96,7 +96,6 @@ exec "$@"\n' > /usr/bin/nosync && \
96 ncurses-devel \
97 nettle-devel \
98 ninja-build \
99 - nmap-ncat \
99 numactl-devel \
100 openssh-clients \
101 pam-devel \
tests/docker/dockerfiles/fedora-win64-cross.docker
-1
@@ -42,7 +42,6 @@ exec "$@"\n' > /usr/bin/nosync && \
42 make \
43 mtools \
44 ninja-build \
45 - nmap-ncat \
45 openssh-clients \
46 python3 \
47 python3-PyYAML \
tests/docker/dockerfiles/fedora.docker
-1
@@ -96,7 +96,6 @@ exec "$@"\n' > /usr/bin/nosync && \
96 ncurses-devel \
97 nettle-devel \
98 ninja-build \
99 - nmap-ncat \
99 numactl-devel \
100 openssh-clients \
101 pam-devel \
tests/docker/dockerfiles/ubuntu2204.docker
-1
@@ -107,7 +107,6 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
107 make \
108 mtools \
109 multipath-tools \
110 - ncat \
110 nettle-dev \
111 ninja-build \
112 openssh-client \
tests/functional/migration.py
+2 -2
@@ -84,6 +84,6 @@ class MigrationTest(QemuSystemTest):
84 self.skipTest('ncat is not available')
85 with Ports() as ports:
86 free_port = self._get_free_port(ports)
87 - dst_uri = 'exec:ncat -l localhost %u' % free_port
88 - src_uri = 'exec:ncat localhost %u' % free_port
87 + dst_uri = 'exec:socat TCP-LISTEN:%u -' % free_port
88 + src_uri = 'exec:socat - TCP:localhost:%u' % free_port
89 self.migrate(dst_uri, src_uri)
tests/lcitool/projects/qemu.yml
-1
@@ -83,7 +83,6 @@ packages:
83 - meson
84 - mtools
85 - ncursesw
86 - - netcat
86 - nettle
87 - ninja
88 - nsis