9cb2c2
%global _hardened_build 1
9cb2c2
9cb2c2
Summary: Bidirectional data relay between two data channels ('netcat++')
9cb2c2
Name: socat
9cb2c2
Version: 1.7.4.1
9cb2c2
Release: 5%{?dist}
9cb2c2
License: GPLv2
9cb2c2
Url:  http://www.dest-unreach.org/socat/
9cb2c2
Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.gz
9cb2c2
9cb2c2
Patch1: socat-1.7.3.3-warn.patch
9cb2c2
9cb2c2
BuildRequires: make
9cb2c2
BuildRequires:  gcc
9cb2c2
BuildRequires: openssl-devel readline-devel ncurses-devel
9cb2c2
BuildRequires: autoconf kernel-headers > 2.6.18
9cb2c2
# for make test
9cb2c2
BuildRequires: iproute net-tools coreutils procps-ng openssl iputils
9cb2c2
9cb2c2
%description
9cb2c2
Socat is a relay for bidirectional data transfer between two independent data
9cb2c2
channels. Each of these data channels may be a file, pipe, device (serial line
9cb2c2
etc. or a pseudo terminal), a socket (UNIX, IP4, IP6 - raw, UDP, TCP), an
9cb2c2
SSL socket, proxy CONNECT connection, a file descriptor (stdin etc.), the GNU
9cb2c2
line editor (readline), a program, or a combination of two of these.
9cb2c2
9cb2c2
9cb2c2
%prep
9cb2c2
%setup -q
9cb2c2
iconv -f iso8859-1 -t utf-8 CHANGES > CHANGES.utf8
9cb2c2
mv CHANGES.utf8 CHANGES
9cb2c2
%patch1 -p1
9cb2c2
9cb2c2
%build
9cb2c2
%configure  \
9cb2c2
        --enable-help --enable-stdio \
9cb2c2
        --enable-fdnum --enable-file --enable-creat \
9cb2c2
        --enable-gopen --enable-pipe --enable-termios \
9cb2c2
        --enable-unix --enable-ip4 --enable-ip6 \
9cb2c2
        --enable-rawip --enable-tcp --enable-udp \
9cb2c2
        --enable-listen --enable-proxy --enable-exec \
9cb2c2
        --enable-system --enable-pty --enable-readline \
9cb2c2
        --enable-openssl --enable-sycls --enable-filan \
9cb2c2
        --enable-retry # --enable-fips
9cb2c2
9cb2c2
make %{?_smp_mflags}
9cb2c2
9cb2c2
%install
9cb2c2
make DESTDIR=%{buildroot} install
9cb2c2
install -d %{buildroot}/%{_docdir}/socat
9cb2c2
install -m 0644 *.sh %{buildroot}/%{_docdir}/socat/
9cb2c2
echo ".so man1/socat.1" | gzip > %{buildroot}/%{_mandir}/man1/filan.1.gz
9cb2c2
cp -a %{buildroot}/%{_mandir}/man1/filan.1.gz %{buildroot}/%{_mandir}/man1/procan.1.gz
9cb2c2
9cb2c2
%check
9cb2c2
export TERM=ansi
9cb2c2
export OD_C=/usr/bin/od
9cb2c2
# intermittently, a test sometimes just fails and some just hang
9cb2c2
# HANGS on x86_64: 93, 323
9cb2c2
# FAILED on x86_64:  61 215 306 307
9cb2c2
# FAILED on ppc64le: 58 239
9cb2c2
# FAILED on armv7hl: 154 155 318 319
9cb2c2
#sed -i 's/NUMCOND=true/NUMCOND="test \\$N -ne 93 -a \\$N -ne 323"/' test.sh
9cb2c2
#make test
9cb2c2
9cb2c2
%files
9cb2c2
%doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ PORTING
9cb2c2
%doc COPYING* README SECURITY
9cb2c2
%doc %{_docdir}/socat/*.sh
9cb2c2
%{_bindir}/socat
9cb2c2
%{_bindir}/filan
9cb2c2
%{_bindir}/procan
9cb2c2
%doc %{_mandir}/man1/*
9cb2c2
9cb2c2
%changelog
9cb2c2
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.4.1-5
9cb2c2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
9cb2c2
  Related: rhbz#1991688
9cb2c2
9cb2c2
* Wed Jun 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.4.1-4
9cb2c2
- Rebuilt for RHEL 9 BETA for openssl 3.0
9cb2c2
  Related: rhbz#1971065
9cb2c2
9cb2c2
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.7.4.1-3
9cb2c2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
9cb2c2
9cb2c2
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.4.1-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
9cb2c2
9cb2c2
* Mon Jan 11 10:35:54 EST 2021 Paul Wouters <pwouters@redhat.com> - 1.7.4.1-1
9cb2c2
- Resolves: rhbz#1914653 socat-1.7.4.1 is available
9cb2c2
9cb2c2
* Mon Jan  4 09:34:27 EST 2021 Paul Wouters <pwouters@redhat.com> - 1.7.4.0-1
9cb2c2
- Resolves: rhbz#1912161 socat-1.7.4.0 is available
9cb2c2
9cb2c2
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.4-3
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
9cb2c2
9cb2c2
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.4-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9cb2c2
9cb2c2
* Mon Jan 06 2020 Paul Wouters <pwouters@redhat.com> - 1.7.3.4-1
9cb2c2
- Resolves: rhbz#1787954 socat-1.7.3.4 is available
9cb2c2
9cb2c2
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.3-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
9cb2c2
9cb2c2
* Mon Jun 24 2019 Paul Wouters <pwouters@redhat.com> - 1.7.3.3-1
9cb2c2
- Resolves: rhbz#1696931 socat-1.7.3.3 is available
9cb2c2
- Resolves: rhbz#1612274 Man page scan results for socat
9cb2c2
- Disabled --enable-fips as its requires fipsld which we don't have.
9cb2c2
9cb2c2
* Sun Feb 17 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.7.3.2-9
9cb2c2
- Rebuild for readline 8.0
9cb2c2
9cb2c2
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.2-8
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
9cb2c2
9cb2c2
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.2-7
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
9cb2c2
9cb2c2
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.2-6
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
9cb2c2
9cb2c2
* Thu Jan 04 2018 Paul Wouters <pwouters@redhat.com> - 1.7.3.2-5
9cb2c2
- Resolves: rhbz#1518784 socat should not require tcp_wrappers
9cb2c2
9cb2c2
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.2-4
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
9cb2c2
9cb2c2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.2-3
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9cb2c2
9cb2c2
* Mon Mar 06 2017 Paul Wouters <pwouters@redhat.com> - 1.7.3.2-3
9cb2c2
- Add BuildRequire for tcp_wrappers-devel to gain libwrap support
9cb2c2
9cb2c2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.3.2-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
9cb2c2
9cb2c2
* Thu Feb 02 2017 Paul Wouters <pwouters@redhat.com> - 1.7.3.2-1
9cb2c2
- Resolves rhbz#1404290 socat build failure on rawhide
9cb2c2
- Resolves rhbz#1416597 socat-1.7.3.2 is available
9cb2c2
- Resolves rhbz#1417483 Failed DNS resolution causes SIGSEGV and endless loop
9cb2c2
- Removed obsoleted patch
9cb2c2
9cb2c2
* Thu Jan 12 2017 Igor Gnatenko <ignatenko@redhat.com> - 1.7.3.1-2
9cb2c2
- Rebuild for readline 7.x
9cb2c2
9cb2c2
* Tue Apr 26 2016 Paul wouters <pwouters@redhat.com> - 1.7.3.1-1
9cb2c2
- Update to 1.7.3.1 (#1186301)
9cb2c2
9cb2c2
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.7.2.4-6
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
9cb2c2
9cb2c2
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.4-5
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
9cb2c2
9cb2c2
* Sat Jan 24 2015 Paul Wouters <pwouters@redhat.com> - 1.7.2.4-4
9cb2c2
- Resolves rhbz#1182005 - socat 1.7.2.4 build failure missing linux/errqueue.h
9cb2c2
9cb2c2
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.4-3
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
9cb2c2
9cb2c2
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.4-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
9cb2c2
9cb2c2
* Mon Apr 07 2014 Paul Wouters <pwouters@redhat.com> - 1.7.2.4-1
9cb2c2
- Updated to 1.7.2.4 which contains many bugfixes
9cb2c2
- Run tests in make check
9cb2c2
- Add build dependancies for make test
9cb2c2
9cb2c2
* Wed Jan 29 2014 Paul Wouters <pwouters@redhat.com> - 1.7.2.3-1
9cb2c2
- Updated to 1.7.2.3 for CVE-2014-0019
9cb2c2
9cb2c2
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.2-3
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
9cb2c2
9cb2c2
* Mon May 27 2013 Paul Wouters <pwouters@redhat.com> - 1.7.2.2-2
9cb2c2
- Added two patches that fixes some -Wformat warnings. these fix 2 of 3
9cb2c2
  failing test cases from test.sh
9cb2c2
- Enabled hardening with full relro/pie
9cb2c2
- Switch from readline5 to readline(6)
9cb2c2
9cb2c2
* Mon May 27 2013 Paul Wouters <pwouters@redhat.com> - 1.7.2.2-1
9cb2c2
- Updated to 1.7.2.2 for CVE-2013-3571, rhbz#967539
9cb2c2
9cb2c2
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.1-3
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
9cb2c2
9cb2c2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.2.1-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
9cb2c2
9cb2c2
* Wed May 23 2012 Paul Wouters <pwouters@redhat.com> - 1.7.2.1-1
9cb2c2
- Updated to 1.7.2.1 for CVE-2012-0219, rhbz#821553, rhbz#821688
9cb2c2
- Remove patch merged upstream
9cb2c2
- Remove --disable-fips from configure
9cb2c2
9cb2c2
* Sat Jan 07 2012 Paul Wouters <paul@nohats.ca> - 1.7.2.0-1
9cb2c2
- Upgraded to 1.7.2.0 which allows tun/tap interfaces without IP address
9cb2c2
  and introduces options openssl-compress and max-children.
9cb2c2
9cb2c2
* Wed Sep 21 2011 Paul Wouters <paul@xelerance.com> - 1.7.1.3-3
9cb2c2
- support TUN endpoint without IP address (rhbz#706226) [Till Maas]
9cb2c2
9cb2c2
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.3-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
9cb2c2
9cb2c2
* Mon Aug 23 2010 Paul Wouters <paul@xelerance.com> - 1.7.1.3-1
9cb2c2
- Upgrade to 1.7.1.3
9cb2c2
- Includes fix for CVE-2010-2799 Stack overflow by lexical scanning of nested
9cb2c2
  character patterns
9cb2c2
- Resolves https://bugzilla.redhat.com/show_bug.cgi?id=620430
9cb2c2
9cb2c2
* Sat Jan 30 2010 Paul Wouters <paul@xelerance.com> - 1.7.1.2-1
9cb2c2
- Upgraded to 1.7.1.2
9cb2c2
- Link against compat-readline5 for GPLv2 license (Miroslav Lichvar)
9cb2c2
  (bz #511310)
9cb2c2
9cb2c2
* Sat Aug 29 2009 Caolán McNamara <caolanm@redhat.com> - 1.7.1.1-5
9cb2c2
- recreate autoconf to get correct includes when determining type
9cb2c2
  sizes in order to build correctly
9cb2c2
9cb2c2
* Fri Aug 28 2009 Paul Wouters <paul@xelerance.com> - 1.7.1.1-4
9cb2c2
- Bump for new openssl
9cb2c2
9cb2c2
* Fri Aug 21 2009 Tomas Mraz <tmraz@redhat.com> - 1.7.1.1-3
9cb2c2
- rebuilt with new openssl
9cb2c2
9cb2c2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.1.1-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
9cb2c2
9cb2c2
* Mon May 11 2009 Paul Wouters <paul@xelerance.com> - 1.7.1.1-1
9cb2c2
- Upgraded to 1.7.1.1.
9cb2c2
- Patch for configure.in with -Wall
9cb2c2
9cb2c2
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.0.0-2
9cb2c2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
9cb2c2
9cb2c2
* Tue Jan 20 2009 Paul Wouters 
9cb2c2
- Updated to new upstream version
9cb2c2
- utf8 the CHANGES file
9cb2c2
9cb2c2
* Sun Jan 18 2009 Tomas Mraz <tmraz@redhat.com> 1.6.0.1-3
9cb2c2
- disable the upstream openssl fips support
9cb2c2
9cb2c2
* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.0.1-2
9cb2c2
- forgot to upload new source
9cb2c2
9cb2c2
* Thu Sep  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> 1.6.0.1-1
9cb2c2
- fix license tag
9cb2c2
- update to 1.6.0.1
9cb2c2
9cb2c2
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.5.0.0-8
9cb2c2
- Autorebuild for GCC 4.3
9cb2c2
9cb2c2
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 1.5.0.0-7
9cb2c2
 - Rebuild for deps
9cb2c2
9cb2c2
* Wed Dec  5 2007 Paul Wouters <paul@xelerance.com> 1.5.0.0-6
9cb2c2
- Rebuild for updatesd libcrypto
9cb2c2
9cb2c2
* Mon Feb 19 2007 Paul Wouters <paul@xelerance.com> 1.5.0.0-5
9cb2c2
- Tagging failure bug in redhat build system requires bump
9cb2c2
9cb2c2
* Mon Feb 19 2007 Paul Wouters <paul@xelerance.com> 1.5.0.0-4
9cb2c2
- Some filesystem defines moved from their specific (ext2)
9cb2c2
  filesystem defines into the generic <linux/fs.h>.
9cb2c2
9cb2c2
* Mon Sep 11 2006 Paul Wouters <paul@xelerance.com> 1.5.0.0-3
9cb2c2
- Rebuild requested for PT_GNU_HASH support from gcc
9cb2c2
9cb2c2
* Sun Aug 20 2006 Paul Wouters <paul@xelerance.com> - 1.5.0.0-2
9cb2c2
- Added missing examples to doc section and removed execute bits.
9cb2c2
9cb2c2
* Fri Aug 04 2006 Paul Wouters <paul@xelerance.com> - 1.5.0.0-1
9cb2c2
- Updated to 1.5.0.0
9cb2c2
- removed version cut/mversion, since source untars properly now.
9cb2c2
9cb2c2
* Tue May 09 2006 Paul Wouters <paul@xelerance.com> - 1.4.3.1-1
9cb2c2
- Updated to 1.4.3.1
9cb2c2
9cb2c2
* Thu Jan 26 2006 Paul Wouters <paul@xelerance.com> 1.4.3.0-2
9cb2c2
- Removed DESTDIR export and fixed two capitals
9cb2c2
9cb2c2
* Thu Jan 26 2006 Paul Wouters <paul@xelerance.com> 1.4.3.0-1
9cb2c2
- Initial version based on Pascal Bleser <guru@unixtech.be> suse rpm