diff --git a/socat-1.7.4.4.tar.gz b/socat-1.7.4.4.tar.gz deleted file mode 100644 index 255ff89..0000000 --- a/socat-1.7.4.4.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f8f4b9d5c60b8c53d17b60d79ababc4a0f51b3bb6d2bd3ae8a6a4b9d68f195e -size 662968 diff --git a/socat-1.8.0.0.tar.gz b/socat-1.8.0.0.tar.gz new file mode 100644 index 0000000..66fc323 --- /dev/null +++ b/socat-1.8.0.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6010f4f311e5ebe0e63c77f78613d264253680006ac8979f52b0711a9a231e82 +size 712469 diff --git a/socat-common-fixes.patch b/socat-common-fixes.patch deleted file mode 100644 index ec6d74b..0000000 --- a/socat-common-fixes.patch +++ /dev/null @@ -1,41 +0,0 @@ -Index: socat-1.7.4.4/filan.c -=================================================================== ---- socat-1.7.4.4.orig/filan.c -+++ socat-1.7.4.4/filan.c -@@ -20,6 +20,10 @@ - - #include "filan.h" - -+#ifdef WITH_LIBWRAP -+#include -+#endif -+ - - struct sockopt { - int so; -Index: socat-1.7.4.4/procan.c -=================================================================== ---- socat-1.7.4.4.orig/procan.c -+++ socat-1.7.4.4/procan.c -@@ -16,6 +16,9 @@ - #include "filan.h" - - #include -+#ifdef WITH_LIBWRAP -+#include -+#endif - - #include "procan.h" - -Index: socat-1.7.4.4/xio-tcpwrap.c -=================================================================== ---- socat-1.7.4.4.orig/xio-tcpwrap.c -+++ socat-1.7.4.4/xio-tcpwrap.c -@@ -13,6 +13,7 @@ - #include "xio-tcpwrap.h" - - -+ - #if (WITH_TCP || WITH_UDP) && WITH_LIBWRAP - - const struct optdesc opt_tcpwrappers = { "tcpwrappers", "tcpwrap", OPT_TCPWRAPPERS, GROUP_RANGE, PH_ACCEPT, TYPE_STRING_NULL, OFUNC_SPEC }; diff --git a/socat-ignore-tests-failure-boo1078346.patch b/socat-ignore-tests-failure-boo1078346.patch index c1f0f14..19c7331 100644 --- a/socat-ignore-tests-failure-boo1078346.patch +++ b/socat-ignore-tests-failure-boo1078346.patch @@ -1,25 +1,10 @@ -From: Michel Normand -Subject: socat ignore tests failure boo1078346 -Date: Wed, 31 Jan 2018 10:19:54 +0100 - -socat ignore flaky tests failure boo1078346 -for PowerPC and S390 - -Signed-off-by: Michel Normand ---- - test.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: socat-1.7.4.4/test.sh -=================================================================== ---- socat-1.7.4.4.orig/test.sh -+++ socat-1.7.4.4/test.sh -@@ -15736,7 +15736,7 @@ if [ "$numCANT" -gt 0 ]; then +--- a/test.sh 2023-11-13 20:31:08.000000000 +0100 ++++ b/test.sh 2024-05-01 21:16:36.479550579 +0200 +@@ -19239,6 +19239,7 @@ fi if [ "$numFAIL" -gt 0 ]; then echo "FAILED: $listFAIL" -- exit 1 -+ uname -p | grep -qE 'ppc|s390' && { echo "ignore flaky failures, bypass boo#1078346"; exit 0; } || exit 1 ++ uname -p | grep -qE 'ppc|s390' && { echo "ignore flaky failures, bypass boo#1078346"; exit 0; } && exit fi - exit 0 + if [ -z "$OPT_EXPECT_FAIL" ]; then diff --git a/socat-test-dhparam b/socat-test-dhparam new file mode 100644 index 0000000..dfb495d --- /dev/null +++ b/socat-test-dhparam @@ -0,0 +1,8 @@ +-----BEGIN DH PARAMETERS----- +MIIBDAKCAQEAi07zA4IHy7z3zO1Z80pW4ODsfoGkK37EimJ1mxg16W2EaskIHSO1 +phICWQFxHJVamtLDdxgcH6FIUw6oznkkkpKqhd3iRQbb4vV0T3bxe7595ic+l5Cb +9pnh90PW5//CxSen5tgsdGAqWvzybupGcN1TlTEyNsfL/By4J9l5p6btmtpdMbqO +AgUpZzkQQvUw+WBNBcqImcH3PIM69yzHQJw5fxE67h/upDyaqJh25PKMmGpOwBVP +QDzmNx0znB/Hop+1YUJJjiuCnFJLSvLacLjHB3sg70EIuG9Kaw4Krrblf3YP5SjY +002fW2pSR0A8wIKtjc0ApZHgK7Xad3SpHwIBAgICAOE= +-----END DH PARAMETERS----- diff --git a/socat-test-without-tty.patch b/socat-test-without-tty.patch new file mode 100644 index 0000000..4162300 --- /dev/null +++ b/socat-test-without-tty.patch @@ -0,0 +1,20 @@ +--- a/test.sh 2023-11-13 20:31:08.000000000 +0100 ++++ b/test.sh 2024-05-01 21:25:27.709337509 +0200 +@@ -16054,9 +16054,15 @@ + pid0=$! + relsleep 2 + TTY=$(tty |sed 's|/dev/||') +-pkill -USR1 -t $TTY socat || { echo "pkill -t $TTY -USR1 socat"; } ++if [ "$TTY" = 'not a tty' ] ++then ++ TTY='' ++else ++ TTY="-t $TTY" ++fi ++pkill -USR1 $TTY socat || { echo "pkill $TTY -USR1 socat"; } + relsleep 1 +-pkill -t $TTY socat ++pkill $TTY socat + wait + if [ "$(grep STATISTICS "${te}0" |wc -l)" -eq 2 ]; then + $PRINTF "$OK\n" diff --git a/socat.changes b/socat.changes index fecb7a8..5e002e5 100644 --- a/socat.changes +++ b/socat.changes @@ -1,3 +1,29 @@ +------------------------------------------------------------------- +Wed May 1 18:50:03 UTC 2024 - Georg Pfuetzenreuter + +- Update to 1.8.0.0: + * Support for network namespaces (option netns) + * TCP client now automatically tries all addresses (IPv4 and IPv6) provided by nameserver until success + * Implementation of POSIX message queue (mq) control and access on Linux (addresses POSIXMQ-READ and following) + * New wrapper script socat-chain.sh allows to stack two addresses, e.g.HTTP proxy connect over SSL + * New script socat-mux.sh allows n-to-1 / 1-to-n communications + * New script socat-broker.sh allows group communications + * Experimental socks5 client feature + * Address ACCEPT-FD for systemd "inetd" mode + * UDP-Lite and DCCP address types + * Addresses SOCKETPAIR and SHELL + * New option bind-tmpname allows forked off children to bind UNIX domain client sockets to random unique pathes + * New option retrieve-vlan (with INTERFACE addresses) now makes kernel keep VLAN tags in incoming packets + * Simple statistics output with Socat option --statistics and with SIGUSR1 + * A couple of new options, many fixes and corrections, see file CHANGES + +- Drop socat-common-fixes.patch (no longer necessary) +- Refactor socat-ignore-tests-failure-boo1078346.patch (test suite no longer exits at this stage) +- Add socat-test-dhparam fixture (reduce build load and time) + +- Note: This version introduces "socat1", linking to "socat" +- Note: This version introduces additional shell scripts, those are shipped in a new "socat-extra" subpackage + ------------------------------------------------------------------- Tue Dec 6 13:46:41 UTC 2022 - Paolo Stivanin diff --git a/socat.spec b/socat.spec index f59b039..436d171 100644 --- a/socat.spec +++ b/socat.spec @@ -1,7 +1,7 @@ # # spec file for package socat # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # Copyright (c) 2010 Pascal Bleser # # All modifications and additions to the file contributed by third parties @@ -18,7 +18,7 @@ Name: socat -Version: 1.7.4.4 +Version: 1.8.0.0 Release: 0 Summary: Multipurpose relay for bidirectional data transfer License: MIT AND SUSE-GPL-2.0-with-openssl-exception @@ -26,8 +26,12 @@ Group: Productivity/Networking/Other URL: http://www.dest-unreach.org/socat/ Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.gz Source1: %{name}.changes +Source2: socat-test-dhparam +# TODO: as of 1.8.0.0, test.sh supports "--expect-fail ", this should be used +# instead of ignoring all test failures Patch1: socat-ignore-tests-failure-boo1078346.patch -Patch2: socat-common-fixes.patch +# Support build environments without a TTY +Patch2: socat-test-without-tty.patch BuildRequires: iputils BuildRequires: net-tools BuildRequires: openssl-devel @@ -52,6 +56,16 @@ IP4, IP6 - raw, UDP, TCP), an SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU line editor, a program, or a combination of two of these. +%package extra +Summary: Additional scripts for socat +Requires: %{name} = %{version} + +%description extra +This ships the following scripts: +- socat-broker.sh +- socat-chain.sh +- socat-mux.sh + %prep %autosetup sed 's|#! %{_bindir}/env bash|#!%{_bindir}/bash|' -i proxyecho.sh readline.sh @@ -73,6 +87,9 @@ mkdir -p \ %{buildroot}/%{_mandir}/man1 %make_install +# avoid expensive dhparam generation on every build with enabled checks +cp %{SOURCE2} testcert.dh + %check export TERM=ansi # use a small but safe subset of all tests @@ -90,8 +107,15 @@ export OPTS="-t 2" %license COPYING COPYING.OpenSSL %doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY VERSION examples %{_bindir}/socat +%{_bindir}/socat1 %{_bindir}/procan %{_bindir}/filan %{_mandir}/man1/socat.1%{?ext_man} +%{_mandir}/man1/socat1.1%{?ext_man} + +%files extra +%{_bindir}/socat-broker.sh +%{_bindir}/socat-chain.sh +%{_bindir}/socat-mux.sh %changelog