[baseimage]: Upgrade ifupdown2 to version 1.2.8 (#3180)

* Upgrade ifupdown2 to version 1.2.8

Required by ZTP to support ZTP over IPv6 transport

Signed-off-by: Rajendra Dendukuri <rajendra.dendukuri@broadcom.com>
This commit is contained in:
rajendra-dendukuri 2019-07-20 02:09:14 -04:00 committed by lguohan
parent 01a5bea450
commit 40c8bc14cd
5 changed files with 37 additions and 1 deletions

View File

@ -205,7 +205,6 @@ sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install \
## Note: don't install python-apt by pip, older than Debian repo one ## Note: don't install python-apt by pip, older than Debian repo one
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
file \ file \
ifupdown2 \
iproute2 \ iproute2 \
bridge-utils \ bridge-utils \
isc-dhcp-client \ isc-dhcp-client \

View File

@ -65,6 +65,10 @@ sudo mkdir -p $FILESYSTEM_ROOT/etc/modprobe.d/
sudo mkdir -p $FILESYSTEM_ROOT/var/cache/sonic/ sudo mkdir -p $FILESYSTEM_ROOT/var/cache/sonic/
sudo mkdir -p $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/ sudo mkdir -p $FILESYSTEM_ROOT_USR_SHARE_SONIC_TEMPLATES/
# Install a more recent version of ifupdown2 (and its dependencies via 'apt-get -y install -f')
sudo dpkg --root=$FILESYSTEM_ROOT -i $debs_path/ifupdown2_*.deb || \
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f
# Install dependencies for SONiC config engine # Install dependencies for SONiC config engine
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \ sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
python-dev \ python-dev \

11
rules/ifupdown2.mk Normal file
View File

@ -0,0 +1,11 @@
# ifupdown2 package
IFUPDOWN2_VERSION = 1.2.8-1
export IFUPDOWN2_VERSION
IFUPDOWN2 = ifupdown2_$(IFUPDOWN2_VERSION)_all.deb
$(IFUPDOWN2)_SRC_PATH = $(SRC_PATH)/ifupdown2
SONIC_MAKE_DEBS += $(IFUPDOWN2)
SONIC_STRETCH_DEBS += $(IFUPDOWN2)
export IFUPDOWN2

View File

@ -590,6 +590,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(LINUX_KERNEL) \ $(LINUX_KERNEL) \
$(SONIC_DEVICE_DATA) \ $(SONIC_DEVICE_DATA) \
$(PYTHON_CLICK) \ $(PYTHON_CLICK) \
$(IFUPDOWN2) \
$(LIBPAM_TACPLUS) \ $(LIBPAM_TACPLUS) \
$(LIBNSS_TACPLUS)) \ $(LIBNSS_TACPLUS)) \
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \ $$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \

21
src/ifupdown2/Makefile Normal file
View File

@ -0,0 +1,21 @@
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS += -e
MAIN_TARGET = $(IFUPDOWN2)
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
# Remove any stale files
rm -rf ./ifupdown2-$(IFUPDOWN2_VERSION) ./$(IFUPDOWN2_VERSION).tar.gz
# Get ifupdown2 release
wget --no-check-certificate https://github.com/CumulusNetworks/ifupdown2/archive/$(IFUPDOWN2_VERSION).tar.gz
tar -z -f $(IFUPDOWN2_VERSION).tar.gz -x
pushd ./ifupdown2-$(IFUPDOWN2_VERSION)
# Build source and Debian packages
dpkg-buildpackage -rfakeroot -b -us -uc -j$(SONIC_CONFIG_MAKE_JOBS)
popd
# Move the newly-built .deb packages to the destination directory
mv $* $(DEST)/