Skip to content

Instantly share code, notes, and snippets.

@ionelmc ionelmc/.gitignore
Last active Jun 16, 2019

Embed
What would you like to do?
Socat PPA (readline)
diff --git a/debian/rules b/debian/rules
old mode 100755
new mode 100644
index 5c58737..bc03c62
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,6 @@
dh $@
override_dh_auto_configure:
- dh_auto_configure -- --disable-readline
+ dh_auto_configure -- --disable-openssl
override_dh_auto_test:
diff --git a/debian/patches/fix-include b/debian/patches/fix-include
new file mode 100644
index 0000000..96c7412
--- /dev/null
+++ b/debian/patches/fix-include
@@ -0,0 +1,12 @@
+Fix missing include.
+
+--- a/nestlex.c 2016-05-17 17:10:01.200441730 +0300
++++ b/nestlex.c 2016-05-17 17:10:47.512404942 +0300
+@@ -5,6 +5,7 @@
+ /* a function for lexical scanning of nested character patterns */
+
+ #include "config.h"
++#include <stddef.h>
+ #include "mytypes.h"
+
+ #include "sysincludes.h"
#!/bin/bash -eux
if ! which gpg-agent; then
sudo apt-get install gnupg-agent
fi
if ! which pull-lp-source; then
sudo apt-get install ubuntu-dev-tools
fi
if ! which /dh_autoreconf; then
sudo apt-get install dh-autoreconf
fi
gpg-agent || eval `gpg-agent --daemon`
echo ==============================
echo making packages
echo ==============================
for dist in trusty xenial; do
rm -rf socat*
pull-lp-source socat $dist
(
cd socat*
dch --force-distribution -D $dist -l"ionelmc1~ppa" "Enable readline. Disable openssl."
patch -lp1 < ../enable-readline.patch
sed -i 's/libssl-dev/libreadline6-dev/' debian/control
sed -i 's/^Depends: /Depends: libreadline6,/' debian/control
echo fix-include >> debian/patches/series
debuild -S -sd
)
dput -f ppa:ionel-mc/socat *.changes
done
@hilbix

This comment has been minimized.

Copy link

commented Jun 16, 2019

If you need readline with OpenSSL you can use the "standard" socat and something like following recipe:

rlwrap -- socat - openssl:example.com:443,capath=/etc/ssl/certs

Note for those who do not know:

The licences of OpenSSL and GNU-readline are incompatible. So socat can only be distributed either with OpenSSL compiled in or GNU-readline compiled in, but not both. As socat is mainly a networking tool distributions usually add OpenSSL and leave GNU-readline out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.