Package: zorp
Version: 6.0.10-4
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu bionic ubuntu-patch
Dear Attila,
The autopkgtest in the latest version of zorp has been failing in Ubuntu,
because it invokes nc with the '-c' option:
autopkgtest [04:46:21]: test basic: - - - - - - - - - - stderr - - - - - - - -
- -
nc: invalid option -- 'c'
usage: nc [-46CDdFhklNnrStUuvZz] [-I length] [-i interval] [-M ttl]
[-m minttl] [-O length] [-P proxy_username] [-p source_port]
[-q seconds] [-s source] [-T keyword] [-V rtable] [-w timeout] [-X
proxy_protocol]
[-x proxy_address[:port]] [destination] [port]
/tmp/autopkgtest.5nJkpe/build.k5E/src/debian/tests/basic: line 49: [: !=: unary
operator expected
Dec 03 04:46:20 core.error(2): (svc/zorp/test:0/zorp/plug): Connection to
remote end failed; local='AF_INET(127.0.0.1:38408)',
remote='AF_INET(127.0.0.2:50081)', error='Connection refused'
Dec 03 04:46:20 core.session(3): (svc/zorp/test:0/zorp/plug): Server connection
failure; server_address='AF_INET(127.0.0.2:50081)', server_zone='Zone(local)',
server_local='None', server_protocol='TCP'
autopkgtest [04:46:21]: @@@@@@@@@@@@@@@@@@@@ summary
basic FAIL stderr: nc: invalid option -- 'c'
Exit request sent.
There are two possible implementations of nc / netcat in Debian:
netcat-traditional and netcat-openbsd. Whereas the 'netcat' package in
Debian depends on netcat-traditional, in Ubuntu it depends on
netcat-openbsd, which does not recognize the -c option.
The attached patch fixes the zorp test to use nc.traditional explicitly, so
that it is portable to distributions that have selected a different default
nc.
Thanks for considering,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
[email protected] [email protected]
diff -Nru zorp-6.0.10/debian/tests/basic zorp-6.0.10/debian/tests/basic
--- zorp-6.0.10/debian/tests/basic 2017-08-10 11:47:19.000000000 -0700
+++ zorp-6.0.10/debian/tests/basic 2017-12-02 21:23:32.000000000 -0800
@@ -38,11 +38,11 @@
echo "Zorp is started. Starting the server process"
-nc -l -p 50081 -c "echo almafa" &
+nc.traditional -l -p 50081 -c "echo almafa" &
echo "Server process is started. Now connect to the proxy from a client"
-nc 127.0.0.2 50080 > $ADTTMP/nc.output
+nc.traditional 127.0.0.2 50080 > $ADTTMP/nc.output
OUTPUT=`cat $ADTTMP/nc.output`
diff -Nru zorp-6.0.10/debian/tests/control zorp-6.0.10/debian/tests/control
--- zorp-6.0.10/debian/tests/control 2017-08-10 11:47:19.000000000 -0700
+++ zorp-6.0.10/debian/tests/control 2017-12-02 21:21:08.000000000 -0800
@@ -1,3 +1,3 @@
Tests: basic
Restrictions: needs-root
-Depends: netcat, @
+Depends: netcat-traditional, @