From 6aabdb390f804b3bd1deabf6318bf897792bd4fa Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Thu, 15 Oct 2020 09:45:41 -0700 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/socat#33a6dd5fc59c0b824dfc608552dc533a7645967d --- .gitignore | 13 ++ socat-1.7.1.3-support-ipless-tuntap.patch | 69 ++++++ socat-1.7.2.1-errqueue.patch | 11 + socat-1.7.2.1-procan-cdefs.patch | 12 + socat-1.7.2.4-errqueue.patch | 67 ++++++ socat-1.7.2.4-test.patch | 85 +++++++ socat-1.7.3.3-warn.patch | 43 ++++ socat-ext2.patch | 13 ++ socat-wall.patch | 29 +++ socat.spec | 265 ++++++++++++++++++++++ sources | 1 + 11 files changed, 608 insertions(+) create mode 100644 socat-1.7.1.3-support-ipless-tuntap.patch create mode 100644 socat-1.7.2.1-errqueue.patch create mode 100644 socat-1.7.2.1-procan-cdefs.patch create mode 100644 socat-1.7.2.4-errqueue.patch create mode 100644 socat-1.7.2.4-test.patch create mode 100644 socat-1.7.3.3-warn.patch create mode 100644 socat-ext2.patch create mode 100644 socat-wall.patch create mode 100644 socat.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..e2c1215 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,13 @@ +socat-1.6.0.1.tar.bz2 +socat-1.7.0.0.tar.bz2 +socat-1.7.1.1.tar.bz2 +socat-1.7.1.2.tar.gz +socat-1.7.1.3.tar.gz +socat-1.7.2.0.tar.gz +/socat-1.7.2.2.tar.gz +/socat-1.7.2.3.tar.gz +/socat-1.7.2.4.tar.gz +/socat-1.7.3.1.tar.gz +/socat-1.7.3.2.tar.gz +/socat-1.7.3.3.tar.gz +/socat-1.7.3.4.tar.gz diff --git a/socat-1.7.1.3-support-ipless-tuntap.patch b/socat-1.7.1.3-support-ipless-tuntap.patch new file mode 100644 index 0000000..e46a3fe --- /dev/null +++ b/socat-1.7.1.3-support-ipless-tuntap.patch @@ -0,0 +1,69 @@ +diff -up socat-1.7.1.3/xio-tun.c.orig socat-1.7.1.3/xio-tun.c +--- socat-1.7.1.3/xio-tun.c.orig 2011-05-19 20:25:38.654799000 +0200 ++++ socat-1.7.1.3/xio-tun.c 2011-05-19 20:37:48.675627004 +0200 +@@ -78,8 +78,8 @@ static int xioopen_tun(int argc, const c + char *ifaddr; + int result; + +- if (argc != 2) { +- Error2("%s: wrong number of parameters (%d instead of 1)", ++ if (argc > 2 || argc < 0) { ++ Error2("%s: wrong number of parameters (%d instead of 0 or 1)", + argv[0], argc-1); + } + +@@ -146,30 +146,31 @@ static int xioopen_tun(int argc, const c + } + + /*--------------------- setting interface address and netmask ------------*/ +- if ((ifaddr = strdup(argv[1])) == NULL) { +- Error1("strdup(\"%s\"): out of memory", argv[1]); +- return STAT_RETRYLATER; ++ if (argc == 2) { ++ if ((ifaddr = strdup(argv[1])) == NULL) { ++ Error1("strdup(\"%s\"): out of memory", argv[1]); ++ return STAT_RETRYLATER; ++ } ++ if ((result = xioparsenetwork(ifaddr, pf, &network)) != STAT_OK) { ++ /*! recover */ ++ return result; ++ } ++ socket_init(pf, (union sockaddr_union *)&ifr.ifr_addr); ++ ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr = ++ network.netaddr.ip4.sin_addr; ++ if (Ioctl(sockfd, SIOCSIFADDR, &ifr) < 0) { ++ Error4("ioctl(%d, SIOCSIFADDR, {\"%s\", \"%s\"}: %s", ++ sockfd, ifr.ifr_name, ifaddr, strerror(errno)); ++ } ++ ((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr = ++ network.netmask.ip4.sin_addr; ++ if (Ioctl(sockfd, SIOCSIFNETMASK, &ifr) < 0) { ++ Error4("ioctl(%d, SIOCSIFNETMASK, {\"0x%08u\", \"%s\"}, %s", ++ sockfd, ((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr.s_addr, ++ ifaddr, strerror(errno)); ++ } ++ free(ifaddr); + } +- if ((result = xioparsenetwork(ifaddr, pf, &network)) != STAT_OK) { +- /*! recover */ +- return result; +- } +- socket_init(pf, (union sockaddr_union *)&ifr.ifr_addr); +- ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr = +- network.netaddr.ip4.sin_addr; +- if (Ioctl(sockfd, SIOCSIFADDR, &ifr) < 0) { +- Error4("ioctl(%d, SIOCSIFADDR, {\"%s\", \"%s\"}: %s", +- sockfd, ifr.ifr_name, ifaddr, strerror(errno)); +- } +- ((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr = +- network.netmask.ip4.sin_addr; +- if (Ioctl(sockfd, SIOCSIFNETMASK, &ifr) < 0) { +- Error4("ioctl(%d, SIOCSIFNETMASK, {\"0x%08u\", \"%s\"}, %s", +- sockfd, ((struct sockaddr_in *)&ifr.ifr_netmask)->sin_addr.s_addr, +- ifaddr, strerror(errno)); +- } +- free(ifaddr); +- + /*--------------------- setting interface flags --------------------------*/ + applyopts_single(&xfd->stream, opts, PH_FD); + diff --git a/socat-1.7.2.1-errqueue.patch b/socat-1.7.2.1-errqueue.patch new file mode 100644 index 0000000..6aa89e2 --- /dev/null +++ b/socat-1.7.2.1-errqueue.patch @@ -0,0 +1,11 @@ +diff -Naur socat-1.7.2.1-orig/xio-ip.c socat-1.7.2.1/xio-ip.c +--- socat-1.7.2.1-orig/xio-ip.c 2011-12-06 02:45:03.000000000 -0500 ++++ socat-1.7.2.1/xio-ip.c 2012-05-23 16:31:23.000000000 -0400 +@@ -42,6 +42,7 @@ + const struct optdesc opt_ip_hdrincl = { "ip-hdrincl", "hdrincl", OPT_IP_HDRINCL, GROUP_SOCK_IP, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IP, IP_HDRINCL }; + #endif + #ifdef IP_RECVERR ++# include + const struct optdesc opt_ip_recverr = { "ip-recverr", "recverr", OPT_IP_RECVERR, GROUP_SOCK_IP, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IP, IP_RECVERR }; + #endif + #ifdef IP_MTU_DISCOVER diff --git a/socat-1.7.2.1-procan-cdefs.patch b/socat-1.7.2.1-procan-cdefs.patch new file mode 100644 index 0000000..5375e02 --- /dev/null +++ b/socat-1.7.2.1-procan-cdefs.patch @@ -0,0 +1,12 @@ +diff -Naur socat-1.7.2.1-orig/procan-cdefs.c socat-1.7.2.1/procan-cdefs.c +--- socat-1.7.2.1-orig/procan-cdefs.c 2010-10-06 03:25:30.000000000 -0400 ++++ socat-1.7.2.1/procan-cdefs.c 2012-11-20 17:15:37.521215330 -0500 +@@ -20,7 +20,7 @@ + fprintf(outfile, "#define FD_SETSIZE %u\n", FD_SETSIZE); + #endif + #ifdef NFDBITS +- fprintf(outfile, "#define NFDBITS "F_Zu"\n", NFDBITS); ++ fprintf(outfile, "#define NFDBITS %u\n", NFDBITS); + #endif + #ifdef O_RDONLY + fprintf(outfile, "#define O_RDONLY %u\n", O_RDONLY); diff --git a/socat-1.7.2.4-errqueue.patch b/socat-1.7.2.4-errqueue.patch new file mode 100644 index 0000000..8e37d8e --- /dev/null +++ b/socat-1.7.2.4-errqueue.patch @@ -0,0 +1,67 @@ +--- a/config.h.in ++++ a/config.h.in +@@ -308,6 +308,9 @@ + /* define if your struct sigaction has sa_sigaction */ + #undef HAVE_STRUCT_SIGACTION_SA_SIGACTION + ++/* define if you have struct sock_extended_err */ ++#undef HAVE_STRUCT_SOCK_EXTENDED_ERR ++ + /* Define if your struct termios has component c_ispeed */ + #undef HAVE_TERMIOS_ISPEED + +--- a/configure.in ++++ a/configure.in +@@ -80,7 +80,8 @@ AC_HEADER_RESOLV() + AC_CHECK_HEADERS(termios.h linux/if_tun.h) + AC_CHECK_HEADERS(net/if_dl.h) + AC_CHECK_HEADERS(linux/types.h) +-AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include ]) ++AC_CHECK_HEADER(linux/errqueue.h, AC_DEFINE(HAVE_LINUX_ERRQUEUE_H), [], [#include ++#include ]) + AC_CHECK_HEADERS(sys/utsname.h sys/select.h sys/file.h) + AC_CHECK_HEADERS(util.h bsd/libutil.h libutil.h sys/stropts.h regex.h) + AC_CHECK_HEADERS(linux/fs.h linux/ext2_fs.h) +@@ -915,6 +916,22 @@ if test $sc_cv_type_sa_family_t = yes; then + fi + AC_MSG_RESULT($sc_cv_type_sa_family_t) + ++AC_MSG_CHECKING(for struct sock_extended_err) ++AC_CACHE_VAL(sc_cv_struct_sock_extended_err, ++[AC_TRY_COMPILE([#include ++#if TIME_WITH_SYS_TIME ++#include ++#endif ++#if HAVE_LINUX_ERRQUEUE_H ++#include ++#endif],[struct sock_extended_err s;], ++[sc_cv_struct_sock_extended_err=yes], ++[sc_cv_struct_sock_extended_err=no])]) ++if test $sc_cv_struct_sock_extended_err = yes; then ++ AC_DEFINE(HAVE_STRUCT_SOCK_EXTENDED_ERR) ++fi ++AC_MSG_RESULT($sc_cv_struct_sock_extended_err) ++ + AC_MSG_CHECKING(for struct sigaction.sa_sigaction) + AC_CACHE_VAL(sc_cv_struct_sigaction_sa_sigaction, + [AC_TRY_COMPILE([#include ],[struct sigaction s;s.sa_sigaction=0;], +--- a/xio-ip.c ++++ a/xio-ip.c +@@ -503,7 +503,7 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num, + return STAT_OK; + #endif /* defined(IP_PKTINFO) && HAVE_STRUCT_IN_PKTINFO */ + #endif /* WITH_IP4 */ +-#ifdef IP_RECVERR ++#if defined(IP_RECVERR) && HAVE_STRUCT_SOCK_EXTENDED_ERR + case IP_RECVERR: { + struct sock_extended_err *err = + (struct sock_extended_err *)CMSG_DATA(cmsg); +@@ -521,7 +521,7 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num, + err->ee_code, '\0', err->ee_info, '\0', err->ee_data); + return STAT_OK; + } +-#endif /* IP_RECVERR */ ++#endif /* defined(IP_RECVERR) && HAVE_STRUCT_SOCK_EXTENDED_ERR */ + #ifdef IP_RECVIF + case IP_RECVIF: { + /* spec in FreeBSD: /usr/include/net/if_dl.h */ diff --git a/socat-1.7.2.4-test.patch b/socat-1.7.2.4-test.patch new file mode 100644 index 0000000..ba03f97 --- /dev/null +++ b/socat-1.7.2.4-test.patch @@ -0,0 +1,85 @@ +diff -Naur socat-1.7.2.4-orig/test.sh socat-1.7.2.4/test.sh +--- socat-1.7.2.4-orig/test.sh 2014-03-09 10:51:39.000000000 -0400 ++++ socat-1.7.2.4/test.sh 2014-04-10 19:26:46.744943241 -0400 +@@ -3713,11 +3713,13 @@ + if [ "$MYPID" = "$MYPPID" -o "$MYPID" = "$MYPGID" -o "$MYPID" = "$MYSID" -o \ + "$MYPPID" = "$MYPGID" -o "$MYPPID" = "$MYSID" -o "$MYPGID" = "$MYSID" ]; + then +- $PRINTF "$FAILED:\n" +- echo "$CMD" +- cat "$te" +- numFAIL=$((numFAIL+1)) +- listFAIL="$listFAIL $N" ++ $PRINTF "test $F_n $TEST... ${YELLOW}skipped - fails in mock ${NORMAL}\n" $N ++ numCANT=$((numCANT+1)) ++ #$PRINTF "$FAILED:\n" ++ #echo "$CMD" ++ #cat "$te" ++ #numFAIL=$((numFAIL+1)) ++ #listFAIL="$listFAIL $N" + else + $PRINTF "$OK\n" + numOK=$((numOK+1)) +@@ -4218,7 +4220,11 @@ + elif ! testaddrs listen tcp ip4 >/dev/null || ! runsip4 >/dev/null; then + $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 not available${NORMAL}\n" $N + numCANT=$((numCANT+1)) ++elif test -n "not-empty"; then ++ $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 external network test skipped${NORMAL}\n" $N ++ numCANT=$((numCANT+1)) + else ++# never called + tf="$td/test$N.stdout" + te="$td/test$N.stderr" + tdiff="$td/test$N.diff" +@@ -4263,7 +4269,11 @@ + elif ! testaddrs listen tcp ip6 >/dev/null || ! runsip6 >/dev/null; then + $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv6 not available${NORMAL}\n" $N + numCANT=$((numCANT+1)) ++elif test -n "not-empty"; then ++ $PRINTF "test $F_n $TEST... ${YELLOW}TCP/IPv4 external network test skipped${NORMAL}\n" $N ++ numCANT=$((numCANT+1)) + else ++# never called + tf="$td/test$N.stdout" + te="$td/test$N.stderr" + tdiff="$td/test$N.diff" +@@ -4303,6 +4313,9 @@ + *%$N%*|*%functions%*|*%socks%*|*%socks4a%*|*%tcp%*|*%tcp4%*|*%ip4%*|*%$NAME%*) + TEST="$NAME: socks4a connect over TCP/IPv4" + if ! eval $NUMCOND; then :; ++elif test -n "not-empty"; then ++ $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A skipped - unreliable in mock ${NORMAL}\n" $N ++ numCANT=$((numCANT+1)) + elif ! testaddrs socks4a >/dev/null; then + $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A not available${NORMAL}\n" $N + numCANT=$((numCANT+1)) +@@ -4348,6 +4361,9 @@ + *%$N%*|*%functions%*|*%socks%*|*%socks4a%*|*%tcp%*|*%tcp6%*|*%ip6%*|*%$NAME%*) + TEST="$NAME: socks4a connect over TCP/IPv6" + if ! eval $NUMCOND; then :; ++elif test -n "not-empty"; then ++ $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A skipped - unreliable in mock ${NORMAL}\n" $N ++ numCANT=$((numCANT+1)) + elif ! testaddrs socks4a >/dev/null; then + $PRINTF "test $F_n $TEST... ${YELLOW}SOCKS4A not available${NORMAL}\n" $N + numCANT=$((numCANT+1)) +@@ -9660,6 +9676,9 @@ + # outside code then checks if the environment contains the variables correctly + # describing the peer and local sockets. + if ! eval $NUMCOND; then :; ++elif test -n "not-empty"; then ++ $PRINTF "test $F_n $TEST... ${YELLOW}$(echo "$feat" |tr a-z A-Z) too unreliable${NORMAL}\n" $N ++ numCANT=$((numCANT+1)) + elif ! feat=$(testaddrs $FEAT); then + $PRINTF "test $F_n $TEST... ${YELLOW}$(echo "$feat" |tr a-z A-Z) not available${NORMAL}\n" $N + numCANT=$((numCANT+1)) +@@ -9669,7 +9688,7 @@ + numCANT=$((numCANT+1)) + elif [ "$KEYW" = "SCTP4" ] && ! runssctp4 "$((PORT))"; then + $PRINTF "test $F_n $TEST... ${YELLOW}$KEYW not available${NORMAL}\n" $N +-elif [ "$KEYW" = "SCTP6" ] && ! runssctp4 "$((PORT))"; then ++elif [ "$KEYW" = "SCTP6" ] && ! runssctp6 "$((PORT))"; then + #!!! branch not reached - caught above! + $PRINTF "test $F_n $TEST... ${YELLOW}$KEYW not available${NORMAL}\n" $N + else diff --git a/socat-1.7.3.3-warn.patch b/socat-1.7.3.3-warn.patch new file mode 100644 index 0000000..739ea3b --- /dev/null +++ b/socat-1.7.3.3-warn.patch @@ -0,0 +1,43 @@ +diff -Naur socat-1.7.3.3-orig/sysutils.c socat-1.7.3.3/sysutils.c +--- socat-1.7.3.3-orig/sysutils.c 2017-01-08 05:38:53.000000000 -0500 ++++ socat-1.7.3.3/sysutils.c 2019-06-24 17:02:56.693056583 -0400 +@@ -614,7 +614,7 @@ + return -1; + } + +- strncpy(ifr.ifr_name, ifname, IFNAMSIZ); /* ok */ ++ strncpy(ifr.ifr_name, ifname, IFNAMSIZ - 1); /* ok */ + if (Ioctl(s, SIOCGIFINDEX, &ifr) < 0) { + Info3("ioctl(%d, SIOCGIFINDEX, {\"%s\"}): %s", + s, ifr.ifr_name, strerror(errno)); +diff -Naur socat-1.7.3.3-orig/xio-socket.c socat-1.7.3.3/xio-socket.c +--- socat-1.7.3.3-orig/xio-socket.c 2017-01-08 04:56:00.000000000 -0500 ++++ socat-1.7.3.3/xio-socket.c 2019-06-24 17:04:48.684491835 -0400 +@@ -1710,7 +1710,6 @@ + int xiocheckpeer(xiosingle_t *xfd, + union sockaddr_union *pa, union sockaddr_union *la) { + char infobuff[256]; +- int result; + + #if WITH_IP4 + if (xfd->para.socket.dorange) { +@@ -1778,6 +1777,7 @@ + #endif /* WITH_TCP || WITH_UDP */ + + #if (WITH_TCP || WITH_UDP) && WITH_LIBWRAP ++ int result; + result = xio_tcpwrap_check(xfd, la, pa); + if (result < 0) { + char infobuff[256]; +diff -Naur socat-1.7.3.3-orig/xio-tun.c socat-1.7.3.3/xio-tun.c +--- socat-1.7.3.3-orig/xio-tun.c 2017-01-06 15:58:40.000000000 -0500 ++++ socat-1.7.3.3/xio-tun.c 2019-06-24 17:03:55.276797729 -0400 +@@ -106,7 +106,7 @@ + memset(&ifr, 0,sizeof(ifr)); + + if (retropt_string(opts, OPT_TUN_NAME, &tunname) == 0) { +- strncpy(ifr.ifr_name, tunname, IFNAMSIZ); /* ok */ ++ strncpy(ifr.ifr_name, tunname, IFNAMSIZ - 1); /* ok */ + free(tunname); + } else { + ifr.ifr_name[0] = '\0'; diff --git a/socat-ext2.patch b/socat-ext2.patch new file mode 100644 index 0000000..f22f9a7 --- /dev/null +++ b/socat-ext2.patch @@ -0,0 +1,13 @@ +*** xio-ext2.c.orig 2007-02-19 23:26:33.000000000 -0500 +--- xio-ext2.c 2007-02-19 23:24:58.000000000 -0500 +*************** +*** 15,20 **** +--- 15,22 ---- + + /****** FD options ******/ + ++ #include ++ + #ifdef EXT2_SECRM_FL + /* secure deletion, chattr 's' */ + const struct optdesc opt_ext2_secrm = { "ext2-secrm", "secrm", OPT_EXT2_SECRM, GROUP_REG, PH_FD, TYPE_BOOL, OFUNC_IOCTL_MASK_LONG, EXT2_IOC_GETFLAGS, EXT2_IOC_SETFLAGS, EXT2_SECRM_FL }; diff --git a/socat-wall.patch b/socat-wall.patch new file mode 100644 index 0000000..a442a77 --- /dev/null +++ b/socat-wall.patch @@ -0,0 +1,29 @@ +--- /home/paul/BUILD/socat-1.7.1.1/configure.in 2009-05-06 14:09:03.000000000 -0400 ++++ configure.in 2009-05-09 09:29:03.000000000 -0400 +@@ -84,7 +84,7 @@ AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB + dnl Check for hstrerror prototype + AC_MSG_CHECKING(for hstrerror prototype) + AC_CACHE_VAL(sc_cv_have_prototype_hstrerror, +-[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $CFLAGS1"; ++[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $(echo "$CFLAGS1" | sed -e 's@-Wall\>@@g')"; + AC_TRY_COMPILE([#include ],[hstrerror();], + [sc_cv_have_prototype_hstrerror=no], + [sc_cv_have_prototype_hstrerror=yes]); +@@ -1296,7 +1296,7 @@ dnl output values: 1..short, 2..unsign + dnl 5..long, 6..u-long; others not yet supported + define(AC_BASIC_TYPE,[ + AC_CACHE_CHECK(for equivalent simple type of $2, $4, +-[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $CFLAGS1" ++[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $(echo "$CFLAGS1" | sed -e 's@-Wall\>@@g')" + AC_TRY_COMPILE([$1],[$2 u; short v; &u==&v;], + [$4="1 /* short */"], + [AC_TRY_COMPILE([$1],[$2 u; unsigned short v; &u==&v;], +@@ -1328,7 +1328,7 @@ dnl arg4: output variable, values see AC + dnl arg5: cache variable (might be constructed automatically) + define(AC_TYPEOF_COMPONENT,[ + AC_CACHE_CHECK(for basic type of $2.$3, $5, +-[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $CFLAGS1" ++[CFLAGS1="$CFLAGS"; CFLAGS="-Werror -O0 $(echo "$CFLAGS1" | sed -e 's@-Wall\>@@g')" + AC_TRY_COMPILE([$1],[$2 u;short v; &u.$3==&v;], + [$5="1 /* short */"], + [AC_TRY_COMPILE([$1],[$2 u; unsigned short v; &u.$3==&v;], diff --git a/socat.spec b/socat.spec new file mode 100644 index 0000000..62bdcdd --- /dev/null +++ b/socat.spec @@ -0,0 +1,265 @@ +%global _hardened_build 1 + +Summary: Bidirectional data relay between two data channels ('netcat++') +Name: socat +Version: 1.7.3.4 +Release: 3%{?dist} +License: GPLv2 +Url: http://www.dest-unreach.org/socat/ +Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.gz + +Patch1: socat-1.7.3.3-warn.patch + +BuildRequires: gcc +BuildRequires: openssl-devel readline-devel ncurses-devel +BuildRequires: autoconf kernel-headers > 2.6.18 +# for make test +BuildRequires: iproute net-tools coreutils procps-ng openssl iputils + +%description +Socat is a relay for bidirectional data transfer between two independent data +channels. Each of these data channels may be a file, pipe, device (serial line +etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw, UDP, TCP), an +SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU +line editor (readline), a program, or a combination of two of these. + + +%prep +%setup -q +iconv -f iso8859-1 -t utf-8 CHANGES > CHANGES.utf8 +mv CHANGES.utf8 CHANGES +%patch1 -p1 + +%build +%configure \ + --enable-help --enable-stdio \ + --enable-fdnum --enable-file --enable-creat \ + --enable-gopen --enable-pipe --enable-termios \ + --enable-unix --enable-ip4 --enable-ip6 \ + --enable-rawip --enable-tcp --enable-udp \ + --enable-listen --enable-proxy --enable-exec \ + --enable-system --enable-pty --enable-readline \ + --enable-openssl --enable-sycls --enable-filan \ + --enable-retry # --enable-fips + +make %{?_smp_mflags} + +%install +make DESTDIR=%{buildroot} install +install -d %{buildroot}/%{_docdir}/socat +install -m 0644 *.sh %{buildroot}/%{_docdir}/socat/ +echo ".so man1/socat.1" | gzip > %{buildroot}/%{_mandir}/man1/filan.1.gz +cp -a %{buildroot}/%{_mandir}/man1/filan.1.gz %{buildroot}/%{_mandir}/man1/procan.1.gz + +%check +export TERM=ansi +export OD_C=/usr/bin/od +# intermittently, a test sometimes just fails and some just hang +# HANGS on x86_64: 93, 323 +# FAILED on x86_64: 61 215 306 307 +# FAILED on ppc64le: 58 239 +# FAILED on armv7hl: 154 155 318 319 +#sed -i 's/NUMCOND=true/NUMCOND="test \\$N -ne 93 -a \\$N -ne 323"/' test.sh +#make test + +%files +%doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ PORTING +%doc COPYING* README SECURITY +%doc %{_docdir}/socat/*.sh +%{_bindir}/socat +%{_bindir}/filan +%{_bindir}/procan +%doc %{_mandir}/man1/* + +%changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.7.3.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Jan 30 2020 Fedora Release Engineering - 1.7.3.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 06 2020 Paul Wouters - 1.7.3.4-1 +- Resolves: rhbz#1787954 socat-1.7.3.4 is available + +* Fri Jul 26 2019 Fedora Release Engineering - 1.7.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jun 24 2019 Paul Wouters - 1.7.3.3-1 +- Resolves: rhbz#1696931 socat-1.7.3.3 is available +- Resolves: rhbz#1612274 Man page scan results for socat +- Disabled --enable-fips as its requires fipsld which we don't have. + +* Sun Feb 17 2019 Igor Gnatenko - 1.7.3.2-9 +- Rebuild for readline 8.0 + +* Sun Feb 03 2019 Fedora Release Engineering - 1.7.3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 1.7.3.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 1.7.3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 04 2018 Paul Wouters - 1.7.3.2-5 +- Resolves: rhbz#1518784 socat should not require tcp_wrappers + +* Thu Aug 03 2017 Fedora Release Engineering - 1.7.3.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 1.7.3.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Mon Mar 06 2017 Paul Wouters - 1.7.3.2-3 +- Add BuildRequire for tcp_wrappers-devel to gain libwrap support + +* Sat Feb 11 2017 Fedora Release Engineering - 1.7.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 02 2017 Paul Wouters - 1.7.3.2-1 +- Resolves rhbz#1404290 socat build failure on rawhide +- Resolves rhbz#1416597 socat-1.7.3.2 is available +- Resolves rhbz#1417483 Failed DNS resolution causes SIGSEGV and endless loop +- Removed obsoleted patch + +* Thu Jan 12 2017 Igor Gnatenko - 1.7.3.1-2 +- Rebuild for readline 7.x + +* Tue Apr 26 2016 Paul wouters - 1.7.3.1-1 +- Update to 1.7.3.1 (#1186301) + +* Fri Feb 05 2016 Fedora Release Engineering - 1.7.2.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 1.7.2.4-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jan 24 2015 Paul Wouters - 1.7.2.4-4 +- Resolves rhbz#1182005 - socat 1.7.2.4 build failure missing linux/errqueue.h + +* Mon Aug 18 2014 Fedora Release Engineering - 1.7.2.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 1.7.2.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Apr 07 2014 Paul Wouters - 1.7.2.4-1 +- Updated to 1.7.2.4 which contains many bugfixes +- Run tests in make check +- Add build dependancies for make test + +* Wed Jan 29 2014 Paul Wouters - 1.7.2.3-1 +- Updated to 1.7.2.3 for CVE-2014-0019 + +* Sun Aug 04 2013 Fedora Release Engineering - 1.7.2.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Mon May 27 2013 Paul Wouters - 1.7.2.2-2 +- Added two patches that fixes some -Wformat warnings. these fix 2 of 3 + failing test cases from test.sh +- Enabled hardening with full relro/pie +- Switch from readline5 to readline(6) + +* Mon May 27 2013 Paul Wouters - 1.7.2.2-1 +- Updated to 1.7.2.2 for CVE-2013-3571, rhbz#967539 + +* Fri Feb 15 2013 Fedora Release Engineering - 1.7.2.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 1.7.2.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed May 23 2012 Paul Wouters - 1.7.2.1-1 +- Updated to 1.7.2.1 for CVE-2012-0219, rhbz#821553, rhbz#821688 +- Remove patch merged upstream +- Remove --disable-fips from configure + +* Sat Jan 07 2012 Paul Wouters - 1.7.2.0-1 +- Upgraded to 1.7.2.0 which allows tun/tap interfaces without IP address + and introduces options openssl-compress and max-children. + +* Wed Sep 21 2011 Paul Wouters - 1.7.1.3-3 +- support TUN endpoint without IP address (rhbz#706226) [Till Maas] + +* Wed Feb 09 2011 Fedora Release Engineering - 1.7.1.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Aug 23 2010 Paul Wouters - 1.7.1.3-1 +- Upgrade to 1.7.1.3 +- Includes fix for CVE-2010-2799 Stack overflow by lexical scanning of nested + character patterns +- Resolves https://bugzilla.redhat.com/show_bug.cgi?id=620430 + +* Sat Jan 30 2010 Paul Wouters - 1.7.1.2-1 +- Upgraded to 1.7.1.2 +- Link against compat-readline5 for GPLv2 license (Miroslav Lichvar) + (bz #511310) + +* Sat Aug 29 2009 Caolán McNamara - 1.7.1.1-5 +- recreate autoconf to get correct includes when determining type + sizes in order to build correctly + +* Fri Aug 28 2009 Paul Wouters - 1.7.1.1-4 +- Bump for new openssl + +* Fri Aug 21 2009 Tomas Mraz - 1.7.1.1-3 +- rebuilt with new openssl + +* Sun Jul 26 2009 Fedora Release Engineering - 1.7.1.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon May 11 2009 Paul Wouters - 1.7.1.1-1 +- Upgraded to 1.7.1.1. +- Patch for configure.in with -Wall + +* Wed Feb 25 2009 Fedora Release Engineering - 1.7.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jan 20 2009 Paul Wouters 1.6.0.1-3 +- disable the upstream openssl fips support + +* Thu Sep 4 2008 Tom "spot" Callaway 1.6.0.1-2 +- forgot to upload new source + +* Thu Sep 4 2008 Tom "spot" Callaway 1.6.0.1-1 +- fix license tag +- update to 1.6.0.1 + +* Tue Feb 19 2008 Fedora Release Engineering - 1.5.0.0-8 +- Autorebuild for GCC 4.3 + +* Wed Dec 05 2007 Release Engineering - 1.5.0.0-7 + - Rebuild for deps + +* Wed Dec 5 2007 Paul Wouters 1.5.0.0-6 +- Rebuild for updatesd libcrypto + +* Mon Feb 19 2007 Paul Wouters 1.5.0.0-5 +- Tagging failure bug in redhat build system requires bump + +* Mon Feb 19 2007 Paul Wouters 1.5.0.0-4 +- Some filesystem defines moved from their specific (ext2) + filesystem defines into the generic . + +* Mon Sep 11 2006 Paul Wouters 1.5.0.0-3 +- Rebuild requested for PT_GNU_HASH support from gcc + +* Sun Aug 20 2006 Paul Wouters - 1.5.0.0-2 +- Added missing examples to doc section and removed execute bits. + +* Fri Aug 04 2006 Paul Wouters - 1.5.0.0-1 +- Updated to 1.5.0.0 +- removed version cut/mversion, since source untars properly now. + +* Tue May 09 2006 Paul Wouters - 1.4.3.1-1 +- Updated to 1.4.3.1 + +* Thu Jan 26 2006 Paul Wouters 1.4.3.0-2 +- Removed DESTDIR export and fixed two capitals + +* Thu Jan 26 2006 Paul Wouters 1.4.3.0-1 +- Initial version based on Pascal Bleser suse rpm diff --git a/sources b/sources new file mode 100644 index 0000000..bf52b16 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (socat-1.7.3.4.tar.gz) = c5699fd1a703e90927076599d02323b85722d49e86bc2f627b4301a41d3df72c634af629f378425ff201cde78343da5cd0cad1044bf857665176c91357401fdd