[socat]: build socat with readline (#1919)
support readline in bcmsh Signed-off-by: Guohan Lu <gulv@microsoft.com>
This commit is contained in:
parent
f3ca7c422f
commit
0cd4ef0c85
@ -34,9 +34,6 @@ RUN apt-get -y install \
|
||||
# eliminating memory leaks
|
||||
RUN apt-get -y -t jessie-backports install rsyslog
|
||||
|
||||
# Pre-install troubleshooting packages
|
||||
RUN apt-get -y install socat
|
||||
|
||||
COPY ["etc/rsyslog.conf", "/etc/rsyslog.conf"]
|
||||
COPY ["etc/rsyslog.d/*", "/etc/rsyslog.d/"]
|
||||
COPY ["root/.vimrc", "/root/.vimrc"]
|
||||
|
@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
docker exec -i syncd bcmsh "$@"
|
||||
docker exec -it syncd bcmsh "$@"
|
||||
|
@ -31,5 +31,5 @@ if [ "$quiet" = false ]; then
|
||||
echo "$banner"
|
||||
fi
|
||||
|
||||
/usr/bin/socat - UNIX-CONNECT:/var/run/sswsyncd/sswsyncd.socket
|
||||
/usr/bin/socat readline UNIX-CONNECT:/var/run/sswsyncd/sswsyncd.socket
|
||||
|
||||
|
@ -5,6 +5,7 @@ $(DOCKER_BASE)_PATH = $(DOCKERS_PATH)/docker-base
|
||||
$(DOCKER_BASE)_DEPENDS += $(SUPERVISOR)
|
||||
$(DOCKER_BASE)_DEPENDS += $(LIBWRAP)
|
||||
$(DOCKER_BASE)_DEPENDS += $(BASH)
|
||||
$(DOCKER_BASE)_DEPENDS += $(SOCAT)
|
||||
|
||||
ifeq ($(SONIC_INSTALL_DEBUG_TOOLS),y)
|
||||
GDB = gdb
|
||||
|
9
rules/socat.mk
Normal file
9
rules/socat.mk
Normal file
@ -0,0 +1,9 @@
|
||||
# socat packages
|
||||
|
||||
SOCAT_VERSION = 1.7.3.1-2+deb9u1
|
||||
|
||||
export SOCAT_VERSION
|
||||
|
||||
SOCAT = socat_$(SOCAT_VERSION)_amd64.deb
|
||||
$(SOCAT)_SRC_PATH = $(SRC_PATH)/socat
|
||||
SONIC_MAKE_DEBS += $(SOCAT)
|
28
src/socat/Makefile
Normal file
28
src/socat/Makefile
Normal file
@ -0,0 +1,28 @@
|
||||
.ONESHELL:
|
||||
SHELL = /bin/bash
|
||||
.SHELLFLAGS += -e
|
||||
|
||||
MAIN_TARGET = socat_$(SOCAT_VERSION)_amd64.deb
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# Remove any stale files
|
||||
rm -rf ./socat-1.7.3.1
|
||||
|
||||
# Get source package
|
||||
wget -NO socat_$(SOCAT_VERSION).dsc "https://sonicstorage.blob.core.windows.net/packages/debian/socat_1.7.3.1-2+deb9u1.dsc?sv=2015-04-05&sr=b&sig=Ph7aMqb%2F%2FE%2F8qwxMXoXb5oK1YPkfVt6PV8mBBv5Wi%2F4%3D&se=2155-07-05T11%3A42%3A29Z&sp=r"
|
||||
wget -NO socat_$(SOCAT_VERSION).debian.tar.xz "https://sonicstorage.blob.core.windows.net/packages/debian/socat_1.7.3.1-2+deb9u1.debian.tar.xz?sv=2015-04-05&sr=b&sig=yv77Fr5RtZgRTPmJK3j0lZ0BzsCiGaSs2i7NqQKEy2Y%3D&se=2155-07-05T11%3A39%3A59Z&sp=r"
|
||||
wget -NO socat_1.7.3.1.orig.tar.gz "https://sonicstorage.blob.core.windows.net/packages/debian/socat_1.7.3.1.orig.tar.gz?sv=2015-04-05&sr=b&sig=0Ai1FM604aGsF5uBu2yN8w9O1a6zNjIDCdaiTo24DyQ%3D&se=2155-07-05T11%3A40%3A14Z&sp=r"
|
||||
|
||||
dpkg-source -x socat_$(SOCAT_VERSION).dsc
|
||||
|
||||
# Build source and Debian packages
|
||||
pushd socat-1.7.3.1
|
||||
patch -p0 < ../enable_readline.patch
|
||||
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
|
||||
popd
|
||||
|
||||
# Move the newly-built .deb packages to the destination directory
|
||||
mv $(DERIVED_TARGETS) $* $(DEST)/
|
||||
|
||||
$(addprefix $(DEST)/, $(DERIVED_TARGETS)): $(DEST)/% : $(DEST)/$(MAIN_TARGET)
|
||||
|
13
src/socat/enable_readline.patch
Normal file
13
src/socat/enable_readline.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- debian/rules.old 2018-08-12 11:48:42.220230100 +0000
|
||||
+++ debian/rules 2018-08-12 11:48:52.072230100 +0000
|
||||
@@ -12,9 +12,6 @@
|
||||
%:
|
||||
dh $@ --with=autoreconf
|
||||
|
||||
-override_dh_auto_configure:
|
||||
- dh_auto_configure -- --disable-readline
|
||||
-
|
||||
override_dh_auto_test:
|
||||
|
||||
-.PHONY: override_dh_auto_configure override_dh_auto_test
|
||||
+.PHONY: override_dh_auto_test
|
Loading…
Reference in New Issue
Block a user