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

Upgrade ifupdown2 to version 1.2.8 #3180

Merged
merged 2 commits into from
Jul 20, 2019
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
1 change: 0 additions & 1 deletion build_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
file \
ifupdown2 \
iproute2 \
bridge-utils \
isc-dhcp-client \
Expand Down
4 changes: 4 additions & 0 deletions files/build_templates/sonic_debian_extension.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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_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 || \
pavel-shirshov marked this conversation as resolved.
Show resolved Hide resolved
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install -f

# Install dependencies for SONiC config engine
sudo LANG=C DEBIAN_FRONTEND=noninteractive chroot $FILESYSTEM_ROOT apt-get -y install \
python-dev \
Expand Down
11 changes: 11 additions & 0 deletions rules/ifupdown2.mk
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions slave.mk
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ $(addprefix $(TARGET_PATH)/, $(SONIC_INSTALLERS)) : $(TARGET_PATH)/% : \
$(LINUX_KERNEL) \
$(SONIC_DEVICE_DATA) \
$(PYTHON_CLICK) \
$(IFUPDOWN2) \
$(LIBPAM_TACPLUS) \
$(LIBNSS_TACPLUS)) \
$$(addprefix $(TARGET_PATH)/,$$($$*_DOCKERS)) \
Expand Down
21 changes: 21 additions & 0 deletions src/ifupdown2/Makefile
Original file line number Diff line number Diff line change
@@ -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)/