From 487bbe94358e459e13b4e61f02b0b8b7d46b4efa Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Fri, 17 Aug 2018 21:33:30 +0000 Subject: [PATCH] Download picocom version 3.1-2 from stretch-backports; No longer build from source --- build_debian.sh | 8 ++++-- files/apt/sources.list | 1 + ...ian_archive_trafficmanager_net_debian.list | 1 + rules/picocom.mk | 11 -------- slave.mk | 3 +- sonic-slave-stretch/Dockerfile | 6 ++-- src/picocom/Makefile | 28 ------------------- src/picocom/debhelper_10.patch | 11 -------- 8 files changed, 10 insertions(+), 59 deletions(-) delete mode 100644 rules/picocom.mk delete mode 100644 src/picocom/Makefile delete mode 100644 src/picocom/debhelper_10.patch diff --git a/build_debian.sh b/build_debian.sh index fea55144cfa0..28493ea16877 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -229,6 +229,11 @@ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y in tcptraceroute \ mtr-tiny +# Install certain fundamental packages from stretch-backports in order to get +# more up-to-date (but potentially less stable) versions +sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y -t stretch-backports install \ + picocom + sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y download \ grub-pc-bin @@ -237,9 +242,6 @@ 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 diff --git a/files/apt/sources.list b/files/apt/sources.list index bbcbbe64f691..b1ce507a44f5 100644 --- a/files/apt/sources.list +++ b/files/apt/sources.list @@ -5,3 +5,4 @@ deb http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-fr deb-src http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free deb http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free deb-src http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free +deb http://debian-archive.trafficmanager.net/debian/ stretch-backports main contrib non-free diff --git a/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list b/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list index 1ddb193b1034..cda7053c35c1 100644 --- a/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list +++ b/files/image_config/apt/sources.list.d/debian_archive_trafficmanager_net_debian.list @@ -1,2 +1,3 @@ deb http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free deb http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free +deb http://debian-archive.trafficmanager.net/debian/ stretch-backports main contrib non-free diff --git a/rules/picocom.mk b/rules/picocom.mk deleted file mode 100644 index a45ac9ecbbe6..000000000000 --- a/rules/picocom.mk +++ /dev/null @@ -1,11 +0,0 @@ -# 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) diff --git a/slave.mk b/slave.mk index a16a0cb488c1..4f1998680b29 100644 --- a/slave.mk +++ b/slave.mk @@ -462,8 +462,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \ $(BASH) \ $(LIBWRAP) \ $(LIBPAM_TACPLUS) \ - $(LIBNSS_TACPLUS) \ - $(PICOCOM)) \ + $(LIBNSS_TACPLUS)) \ $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \ $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_CONFIG_ENGINE)) \ $$(addprefix $(PYTHON_WHEELS_PATH)/,$(SONIC_PLATFORM_COMMON_PY2)) diff --git a/sonic-slave-stretch/Dockerfile b/sonic-slave-stretch/Dockerfile index 79f86bd7e255..d34cfda71c06 100644 --- a/sonic-slave-stretch/Dockerfile +++ b/sonic-slave-stretch/Dockerfile @@ -6,7 +6,7 @@ RUN echo "deb http://debian-archive.trafficmanager.net/debian/ stretch main cont echo "deb-src http://debian-archive.trafficmanager.net/debian/ stretch main contrib non-free" >> /etc/apt/sources.list && \ echo "deb http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \ echo "deb-src http://debian-archive.trafficmanager.net/debian-security/ stretch/updates main contrib non-free" >> /etc/apt/sources.list && \ - echo 'deb http://debian-archive.trafficmanager.net/debian stretch-backports main' >> /etc/apt/sources.list + echo "deb http://debian-archive.trafficmanager.net/debian stretch-backports main" >> /etc/apt/sources.list ## Make apt-get non-interactive ENV DEBIAN_FRONTEND=noninteractive @@ -201,9 +201,7 @@ RUN apt-get update && apt-get install -y \ # For pam_tacplus build autoconf-archive \ # For initramfs - bash-completion \ -# For picocom - pandoc + bash-completion # For linux build RUN apt-get -y build-dep linux diff --git a/src/picocom/Makefile b/src/picocom/Makefile deleted file mode 100644 index 46b6034da9fa..000000000000 --- a/src/picocom/Makefile +++ /dev/null @@ -1,28 +0,0 @@ -.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) - diff --git a/src/picocom/debhelper_10.patch b/src/picocom/debhelper_10.patch deleted file mode 100644 index 6c0ff47a553e..000000000000 --- a/src/picocom/debhelper_10.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 - Uploaders: W. Martin Borgert --Build-Depends: debhelper (>= 11), -+Build-Depends: debhelper (>= 10), - pandoc - Standards-Version: 4.1.3 - Rules-Requires-Root: no