Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[baseimage]: install picocom 3.1 in base image #1943

Merged
merged 3 commits into from
Aug 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,7 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in
hping3 \
python-scapy \
tcptraceroute \
mtr-tiny \
picocom
mtr-tiny

sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \
grub-pc-bin
Expand All @@ -238,6 +237,9 @@ sudo mv $FILESYSTEM_ROOT/grub-pc-bin*.deb $FILESYSTEM_ROOT/$PLATFORM_DIR/x86_64-
sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/libwrap0_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

sudo dpkg --root=$FILESYSTEM_ROOT -i target/debs/picocom_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

## Disable kexec supported reboot which was installed by default
sudo sed -i 's/LOAD_KEXEC=true/LOAD_KEXEC=false/' $FILESYSTEM_ROOT/etc/default/kexec

Expand Down
11 changes: 11 additions & 0 deletions rules/picocom.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# picocom packages

PICOCOM_VERSION = 3.1-2

export PICOCOM_VERSION

PICOCOM = picocom_$(PICOCOM_VERSION)_amd64.deb
$(PICOCOM)_SRC_PATH = $(SRC_PATH)/picocom
SONIC_MAKE_DEBS += $(PICOCOM)

SONIC_STRETCH_DEBS += $(PICOCOM)
3 changes: 2 additions & 1 deletion slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,8 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(BASH) \
$(LIBWRAP) \
$(LIBPAM_TACPLUS) \
$(LIBNSS_TACPLUS)) \
$(LIBNSS_TACPLUS) \
$(PICOCOM)) \
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \
$$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2))
Expand Down
4 changes: 3 additions & 1 deletion sonic-slave-stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ RUN apt-get update && apt-get install -y \
# For pam_tacplus build
autoconf-archive \
# For initramfs
bash-completion
bash-completion \
# For picocom
pandoc

# For linux build
RUN apt-get -y build-dep linux
Expand Down
28 changes: 28 additions & 0 deletions src/picocom/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e

MAIN_TARGET = picocom_$(PICOCOM_VERSION)_amd64.deb

$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
rm -rf ./picocom-3.1

# Get source package
wget -NO picocom_$(PICOCOM_VERSION).dsc "https://sonicstorage.blob.core.windows.net/packages/debian/picocom_3.1-2.dsc?sv=2015-04-05&sr=b&sig=puo9KA27jT9Ey%2FkxRPBLIm30gFDdQJF85VKA7vuv9hk%3D&se=2155-07-10T08%3A03%3A50Z&sp=r"
wget -NO picocom_$(PICOCOM_VERSION).debian.tar.xz "https://sonicstorage.blob.core.windows.net/packages/debian/picocom_3.1-2.debian.tar.xz?sv=2015-04-05&sr=b&sig=4HPuUi2FTb0AzCEsH9%2FsSfj17qIukyyOdRrHQFtjyBE%3D&se=2155-07-10T08%3A04%3A23Z&sp=r"
wget -NO picocom_3.1.orig.tar.gz "https://sonicstorage.blob.core.windows.net/packages/debian/picocom_3.1.orig.tar.gz?sv=2015-04-05&sr=b&sig=RjQ84sf%2B%2FQuI%2B0PAcbPHXvnlNAuP%2BQoVrp2xzDJZfX4%3D&se=2155-07-10T08%3A04%3A45Z&sp=r"

dpkg-source -x picocom_$(PICOCOM_VERSION).dsc

# Build source and Debian packages
pushd picocom-3.1
patch -p0 < ../debhelper_10.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)

11 changes: 11 additions & 0 deletions src/picocom/debhelper_10.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- debian/control.old 2018-08-17 08:05:35.996230100 +0000
+++ debian/control 2018-08-17 08:05:43.712230100 +0000
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Matt Palmer <[email protected]>
Uploaders: W. Martin Borgert <[email protected]>
-Build-Depends: debhelper (>= 11),
+Build-Depends: debhelper (>= 10),
pandoc
Standards-Version: 4.1.3
Rules-Requires-Root: no