d50e3e
# tests requires network and not all tests pass
d50e3e
%global enable_tests 0
c86087
%global _hardened_build 1
c86087
c86087
Summary: Bidirectional data relay between two data channels ('netcat++')
c86087
Name: socat
d50e3e
Version: 1.7.3.2
d50e3e
Release: 2%{?dist}
c86087
License: GPLv2
c86087
Url:  http://www.dest-unreach.org/%{name}
c86087
Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.gz
c86087
Group: Applications/Internet
c86087
BuildRequires: openssl-devel readline-devel ncurses-devel
d50e3e
BuildRequires: autoconf kernel-headers > 2.6.18 tcp_wrappers-devel
d50e3e
%if %{enable_tests}
d50e3e
BuildRequires: net-tools openssl iputils iproute
d50e3e
%endif
c86087
d50e3e
Patch1: socat-1.7.3.1-test.patch
c86087
c86087
%description
c86087
Socat is a relay for bidirectional data transfer between two independent data
c86087
channels. Each of these data channels may be a file, pipe, device (serial line
c86087
etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw, UDP, TCP), an
c86087
SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU
d50e3e
line editor (readline), a program, or a combination of two of these.
c86087
c86087
%prep
d50e3e
%setup -q
c86087
iconv -f iso8859-1 -t utf-8 CHANGES > CHANGES.utf8
c86087
mv CHANGES.utf8 CHANGES
c86087
%patch1 -p1
c86087
c86087
%build
c86087
%configure  \
c86087
        --enable-help --enable-stdio \
c86087
        --enable-fdnum --enable-file --enable-creat \
c86087
        --enable-gopen --enable-pipe --enable-termios \
c86087
        --enable-unix --enable-ip4 --enable-ip6 \
c86087
        --enable-rawip --enable-tcp --enable-udp \
c86087
        --enable-listen --enable-proxy --enable-exec \
c86087
        --enable-system --enable-pty --enable-readline \
c86087
        --enable-openssl --enable-sycls --enable-filan \
d50e3e
        --enable-retry --enable-libwrap --enable-fips
c86087
c86087
make %{?_smp_mflags}
c86087
d50e3e
%check
d50e3e
%if %{enable_tests}
d50e3e
# DTLS1 test causes build to hang
d50e3e
sed -i "s/ DTLS1//" -i test.sh
d50e3e
export TERM=ansi
d50e3e
export OD_C=/usr/bin/od
d50e3e
make test
d50e3e
# Only test 319 fails on scratch-builds:
d50e3e
# test 319 OPENSSL_CONNECT_BIND: test OPENSSL-CONNECT with bind option... !port 46327 timed out! FAILED
d50e3e
# summary: 368 tests, 366 selected; 293 ok, 1 failed, 72 could not be performed
d50e3e
%endif
c86087
c86087
%install
c86087
rm -rf %{buildroot}
c86087
make DESTDIR=%{buildroot} install
c86087
d50e3e
%files
c86087
%doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ PORTING
d50e3e
%doc COPYING* README SECURITY
d50e3e
%doc %attr(0644,root,root) *.sh
d50e3e
%if %{enable_tests}
d50e3e
%doc testcert.conf
d50e3e
%endif
c86087
%{_bindir}/socat
c86087
%{_bindir}/filan
c86087
%{_bindir}/procan
c86087
%doc %{_mandir}/man1/socat.1*
c86087
c86087
%changelog
d50e3e
* Thu Apr 20 2017 Paul Wouters <pwouters@redhat.com> - 1.7.3.2-2
d50e3e
- Resolves: rhbz#1420777 Make sure to rebuild "socat" for RHEL 7.4 - incorrect hardening flags
d50e3e
d50e3e
* Tue Mar 07 2017 Paul Wouters <pwouters@redhat.com> - 1.7.3.2-1
d50e3e
- Resolves: rhbz#1085024 rebase socat to 1.7.3.2
d50e3e
d50e3e
* Mon Dec 05 2016 Paul Wouters <pwouters@redhat.com> - 1.7.3.1-1
d50e3e
- Resolves: rhbz#1085024 rebase socat to 1.7.3.1
d50e3e
a4921f
* Wed Jan 29 2014 Paul Wouters <pwouters@redhat.com> - 1.7.2.2-5
a4921f
- Resolves: CVE-2014-0019 (rhbz#1057748)
a4921f
a4921f
* Fri Jan 24 2014 Daniel Mach <dmach@redhat.com> - 1.7.2.2-4
a4921f
- Mass rebuild 2014-01-24
a4921f
a4921f
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 1.7.2.2-3
a4921f
- Mass rebuild 2013-12-27
a4921f
c86087
* Thu Oct 10 2013 Paul Wouters <pwouters@redhat.com> - 1.7.2.2-2
c86087
- Resolves: rhel#1017015 Use readline, not compat-readline5-devel
c86087
- Added two patches fixing -Wformat issues
c86087
- Enable hardened build
c86087
- Cleanup obsolete spec file lines
c86087
c86087
* Mon May 27 2013 Paul Wouters <pwouters@redhat.com> - 1.7.2.2-1
c86087
- Updated to 1.7.2.2 for CVE-2013-3571, rhbz#967539
c86087
c86087
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.1-3
c86087
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
c86087
c86087
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.1-2
c86087
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c86087
c86087
* Wed May 23 2012 Paul Wouters <pwouters@redhat.com> - 1.7.2.1-1
c86087
- Updated to 1.7.2.1 for CVE-2012-0219, rhbz#821553, rhbz#821688
c86087
- Remove patch merged upstream
c86087
- Remove --disable-fips from configure
c86087
c86087
* Sat Jan 07 2012 Paul Wouters <paul@nohats.ca> - 1.7.2.0-1
c86087
- Upgraded to 1.7.2.0 which allows tun/tap interfaces without IP address
d50e3e
  and introduces options openssl-compress and max-children.
c86087
c86087
* Wed Sep 21 2011 Paul Wouters <paul@xelerance.com> - 1.7.1.3-3
c86087
- support TUN endpoint without IP address (rhbz#706226) [Till Maas]
c86087
c86087
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.3-2
c86087
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
c86087
c86087
* Mon Aug 23 2010 Paul Wouters <paul@xelerance.com> - 1.7.1.3-1
c86087
- Upgrade to 1.7.1.3
c86087
- Includes fix for CVE-2010-2799 Stack overflow by lexical scanning of nested
c86087
  character patterns
c86087
- Resolves https://bugzilla.redhat.com/show_bug.cgi?id=620430
c86087
c86087
* Sat Jan 30 2010 Paul Wouters <paul@xelerance.com> - 1.7.1.2-1
c86087
- Upgraded to 1.7.1.2
c86087
- Link against compat-readline5 for GPLv2 license (Miroslav Lichvar)
c86087
  (bz #511310)
c86087
c86087
* Sat Aug 29 2009 Caolán McNamara <caolanm@redhat.com> - 1.7.1.1-5
c86087
- recreate autoconf to get correct includes when determining type
c86087
  sizes in order to build correctly
c86087
c86087
* Fri Aug 28 2009 Paul Wouters <paul@xelerance.com> - 1.7.1.1-4
c86087
- Bump for new openssl
c86087
c86087
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.7.1.1-3
c86087
- rebuilt with new openssl
c86087
c86087
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.1-2
c86087
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
c86087
c86087
* Mon May 11 2009 Paul Wouters <paul@xelerance.com> - 1.7.1.1-1
c86087
- Upgraded to 1.7.1.1.
c86087
- Patch for configure.in with -Wall
c86087
c86087
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0.0-2
c86087
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
c86087
c86087
* Tue Jan 20 2009 Paul Wouters 
c86087
- Updated to new upstream version
c86087
- utf8 the CHANGES file
c86087
c86087
* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> 1.6.0.1-3
c86087
- disable the upstream openssl fips support
c86087
c86087
* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.0.1-2
c86087
- forgot to upload new source
c86087
c86087
* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.0.1-1
c86087
- fix license tag
c86087
- update to 1.6.0.1
c86087
c86087
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.5.0.0-8
c86087
- Autorebuild for GCC 4.3
c86087
c86087
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.5.0.0-7
c86087
 - Rebuild for deps
c86087
c86087
* Wed Dec  5 2007 Paul Wouters <paul@xelerance.com> 1.5.0.0-6
c86087
- Rebuild for updatesd libcrypto
c86087
c86087
* Mon Feb 19 2007 Paul Wouters <paul@xelerance.com> 1.5.0.0-5
c86087
- Tagging failure bug in redhat build system requires bump
c86087
c86087
* Mon Feb 19 2007 Paul Wouters <paul@xelerance.com> 1.5.0.0-4
c86087
- Some filesystem defines moved from their specific (ext2)
d50e3e
  filesystem defines into the generic <linux/fs.h>.
c86087
c86087
* Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 1.5.0.0-3
c86087
- Rebuild requested for PT_GNU_HASH support from gcc
c86087
c86087
* Sun Aug 20 2006 Paul Wouters <paul@xelerance.com> - 1.5.0.0-2
c86087
- Added missing examples to doc section and removed execute bits.
c86087
c86087
* Fri Aug 04 2006 Paul Wouters <paul@xelerance.com> - 1.5.0.0-1
c86087
- Updated to 1.5.0.0
c86087
- removed version cut/mversion, since source untars properly now.
c86087
c86087
* Tue May 09 2006 Paul Wouters <paul@xelerance.com> - 1.4.3.1-1
c86087
- Updated to 1.4.3.1
c86087
c86087
* Thu Jan 26 2006 Paul Wouters <paul@xelerance.com> 1.4.3.0-2
c86087
- Removed DESTDIR export and fixed two capitals
c86087
c86087
* Thu Jan 26 2006 Paul Wouters <paul@xelerance.com> 1.4.3.0-1
c86087
- Initial version based on Pascal Bleser <guru@unixtech.be> suse rpm