2007-01-16 00:37:38 +01:00
|
|
|
#
|
2011-12-07 22:34:17 +01:00
|
|
|
# spec file for package socat
|
2007-01-16 00:37:38 +01:00
|
|
|
#
|
2022-01-23 14:53:24 +01:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2010-10-28 13:29:18 +02:00
|
|
|
# Copyright (c) 2010 Pascal Bleser <pascal.bleser@opensuse.org>
|
2007-01-16 00:37:38 +01:00
|
|
|
#
|
2008-10-22 18:50:18 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-04-06 23:29:35 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-01-16 00:37:38 +01:00
|
|
|
#
|
|
|
|
|
2012-05-25 16:18:31 +02:00
|
|
|
|
2007-01-16 00:37:38 +01:00
|
|
|
Name: socat
|
2022-01-23 14:53:24 +01:00
|
|
|
Version: 1.7.4.3
|
2019-04-06 23:29:35 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Multipurpose relay for bidirectional data transfer
|
2021-11-02 09:22:38 +01:00
|
|
|
License: MIT AND SUSE-GPL-2.0-with-openssl-exception
|
2019-04-06 23:29:35 +02:00
|
|
|
Group: Productivity/Networking/Other
|
|
|
|
URL: http://www.dest-unreach.org/socat/
|
2021-11-02 09:22:38 +01:00
|
|
|
Source: http://www.dest-unreach.org/socat/download/%{name}-%{version}.tar.gz
|
2019-04-06 23:29:35 +02:00
|
|
|
Source1: %{name}.changes
|
|
|
|
Patch1: socat-ignore-tests-failure-boo1078346.patch
|
2020-02-04 14:12:37 +01:00
|
|
|
Patch2: socat-common-fixes.patch
|
2022-04-13 11:48:27 +02:00
|
|
|
Patch3: socat-fix-asan-error.patch
|
2019-04-06 23:29:35 +02:00
|
|
|
BuildRequires: iputils
|
|
|
|
BuildRequires: net-tools
|
2011-12-22 13:10:25 +01:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: procps
|
|
|
|
BuildRequires: readline-devel
|
2015-04-14 21:19:27 +02:00
|
|
|
%if 0%{?suse_version}
|
2011-12-22 13:10:25 +01:00
|
|
|
BuildRequires: tcpd-devel
|
2015-04-14 21:19:27 +02:00
|
|
|
%endif
|
2016-02-02 13:52:42 +01:00
|
|
|
%if 0%{?suse_version}
|
2015-04-21 07:39:05 +02:00
|
|
|
BuildRequires: iproute2
|
|
|
|
BuildRequires: netcfg
|
2016-02-02 13:52:42 +01:00
|
|
|
%endif
|
|
|
|
%if 0%{?suse_version} >= 1330
|
2015-04-21 07:39:05 +02:00
|
|
|
BuildRequires: net-tools-deprecated
|
|
|
|
%endif
|
2007-01-16 00:37:38 +01:00
|
|
|
|
|
|
|
%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, a program, or a
|
|
|
|
combination of two of these.
|
|
|
|
|
|
|
|
%prep
|
2022-04-13 11:48:27 +02:00
|
|
|
%autosetup
|
2019-04-06 23:29:35 +02:00
|
|
|
sed 's|#! %{_bindir}/env bash|#!%{_bindir}/bash|' -i proxyecho.sh readline.sh
|
2007-01-16 00:37:38 +01:00
|
|
|
|
|
|
|
%build
|
2015-04-14 21:19:27 +02:00
|
|
|
# export deterministic BUILD_DATE, format like "__DATE__ __TIME__"
|
|
|
|
CL_DATE="$(awk -F " - " 'NR==2{print $1;}' %{SOURCE1})"
|
|
|
|
test -n "$CL_DATE"
|
2019-04-06 23:29:35 +02:00
|
|
|
export BUILD_DATE="$(LANG=C date --utc -d "${CL_DATE}" +"%{b} %{e} %{Y} %{T}")"
|
2020-02-04 14:12:37 +01:00
|
|
|
export CFLAGS="%{optflags} -fno-strict-aliasing -DHAVE_SSLv23_client_method -DHAVE_SSLv23_server_method -fno-common"
|
2011-12-07 22:34:17 +01:00
|
|
|
%configure
|
2020-04-19 14:52:49 +02:00
|
|
|
%make_build all
|
2007-01-16 00:37:38 +01:00
|
|
|
mkdir examples
|
2015-04-21 07:39:05 +02:00
|
|
|
cp -a daemon.sh ftp.sh mail.sh proxyecho.sh readline.sh examples
|
2007-01-16 00:37:38 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p \
|
2018-09-12 09:25:22 +02:00
|
|
|
%{buildroot}/%{_bindir} \
|
|
|
|
%{buildroot}/%{_mandir}/man1
|
|
|
|
%make_install
|
2007-01-16 00:37:38 +01:00
|
|
|
|
2015-04-14 21:19:27 +02:00
|
|
|
%check
|
|
|
|
export TERM=ansi
|
2015-04-21 07:39:05 +02:00
|
|
|
# use a small but safe subset of all tests
|
|
|
|
sotests="filan consistency stdio fd pipe pipes exec gopen noatime system"
|
|
|
|
%ifnarch armv6l armv6hl aarch64
|
|
|
|
# add some more tests for fast machines only
|
|
|
|
sotests+=" unix"
|
|
|
|
%endif
|
|
|
|
# increase socket shutdown timeout, default 0.1 or 0.5 caused sometimes
|
|
|
|
# random failures on slow machines (armv6l, aarch64)
|
|
|
|
export OPTS="-t 2"
|
|
|
|
./test.sh $sotests
|
2015-04-14 21:19:27 +02:00
|
|
|
|
2007-01-16 00:37:38 +01:00
|
|
|
%files
|
2018-04-03 22:37:04 +02:00
|
|
|
%license COPYING COPYING.OpenSSL
|
|
|
|
%doc BUGREPORTS CHANGES DEVELOPMENT EXAMPLES FAQ FILES PORTING README SECURITY VERSION examples
|
2007-01-16 00:37:38 +01:00
|
|
|
%{_bindir}/socat
|
|
|
|
%{_bindir}/procan
|
|
|
|
%{_bindir}/filan
|
2019-04-06 23:29:35 +02:00
|
|
|
%{_mandir}/man1/socat.1%{?ext_man}
|
2011-12-07 22:34:17 +01:00
|
|
|
|
2010-10-28 13:29:26 +02:00
|
|
|
%changelog
|