Skip to content

Commit

Permalink
Merge pull request #4054 from koooosh/add-socat-package
Browse files Browse the repository at this point in the history
Add socat package
  • Loading branch information
koooosh authored Jun 13, 2024
2 parents 52a9f82 + d36618a commit 618ec7a
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From c1fa329155c1b6805d64fcc7de4cb5c5ca80d387 Mon Sep 17 00:00:00 2001
From: Kush Upadhyay <[email protected]>
Date: Thu, 13 Jun 2024 15:27:14 +0000
Subject: [PATCH] xioopts: conditionally compile applyopts_termios_value
function

Signed-off-by: Kush Upadhyay <[email protected]>
---
xioopts.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/xioopts.c b/xioopts.c
index 4b651aa..e957ba3 100644
--- a/xioopts.c
+++ b/xioopts.c
@@ -4041,6 +4041,7 @@ int applyopt_spec(
return 0;
}

+#if WITH_TERMIOS
int applyopts_termios_value(
int fd,
struct opt *opt)
@@ -4057,6 +4058,7 @@ int applyopts_termios_value(
}
return 0;
}
+#endif /* WITH_TERMIOS */

/* Note: not all options can be applied this way (e.g. OFUNC_SPEC with PH_OPEN)
implemented are: OFUNC_FCNTL, OFUNC_SOCKOPT (probably not all types),
--
2.40.1

16 changes: 16 additions & 0 deletions packages/socat/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "socat"
version = "0.1.0"
edition = "2018"
publish = false
build = "../build.rs"

[lib]
path = "../packages.rs"

[[package.metadata.build-package.external-files]]
url = "http://www.dest-unreach.org/socat/download/socat-1.8.0.0.tar.gz"
sha512 = "edf459a9f1907a14025e13b3101ad29787f9a72795cffcd00017ce98847562884db29a95b9ae478a6a50868137548b142947c43fb18e975eb5853a763c42902c"

[build-dependencies]
glibc = { path = "../glibc" }
84 changes: 84 additions & 0 deletions packages/socat/socat.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
Name: %{_cross_os}socat
Version: 1.8.0.0
Release: 1%{?dist}
Summary: Transfer data between two channels
License: GPL-2.0-only
URL: http://www.dest-unreach.org/socat/
Source0: http://www.dest-unreach.org/socat/download/socat-%{version}.tar.gz
Patch0001: 0001-xioopts-conditionally-compile-applyopts_termios_valu.patch

BuildRequires: %{_cross_os}glibc-devel

%description
%{summary}.

%prep
%autosetup -n socat-%{version} -p0001

%build
%cross_configure \
CFLAGS="-Wformat ${CFLAGS}" \
--enable-help \
--enable-ip4 \
--enable-ip6 \
--enable-listen \
--enable-stdio \
--enable-tcp \
--enable-udp \
--enable-unix \
--disable-abstract-unixsocket \
--disable-creat \
--disable-dccp \
--disable-exec \
--disable-ext2 \
--disable-fdnum \
--disable-filan \
--disable-file \
--disable-fips \
--disable-fs \
--disable-genericsocket \
--disable-gopen \
--disable-interface \
--disable-largefile \
--disable-libwrap \
--disable-namespaces \
--disable-openssl \
--disable-option-checking \
--disable-pipe \
--disable-posixmq \
--disable-proxy \
--disable-pty \
--disable-rawip \
--disable-readline \
--disable-retry \
--disable-sctp \
--disable-shell \
--disable-socketpair \
--disable-socks4 \
--disable-socks4a \
--disable-stats \
--disable-sycls \
--disable-system \
--disable-termios \
--disable-tun \
--disable-udplite \
--disable-vsock \

%make_build

%install
%make_install

%files
%license COPYING
%{_cross_attribution_file}
%{_cross_bindir}/socat
%{_cross_bindir}/socat1
%exclude %{_cross_bindir}/filan
%exclude %{_cross_bindir}/procan
%exclude %{_cross_bindir}/socat-broker.sh
%exclude %{_cross_bindir}/socat-chain.sh
%exclude %{_cross_bindir}/socat-mux.sh
%exclude %{_cross_mandir}/*

%changelog
8 changes: 8 additions & 0 deletions variants/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions variants/aws-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ included-packages = [
"strace",
"chrony-tools",
"soci-snapshotter",
"socat",
]

[lib]
Expand All @@ -56,3 +57,4 @@ iputils = { path = "../../packages/iputils" }
strace = { path = "../../packages/strace" }
chrony = { path = "../../packages/chrony" }
soci-snapshotter = { path = "../../packages/soci-snapshotter" }
socat = { path = "../../packages/socat" }

0 comments on commit 618ec7a

Please sign in to comment.