From a9e692bd0fb6b15cb349fa19c8c6b28194fee8c1 Mon Sep 17 00:00:00 2001 From: Guohan Lu Date: Wed, 8 Feb 2017 10:32:57 +0000 Subject: [PATCH] [build_debian]: install deps in rootfs instead of just extracting the packages packages contains post-install that needs to be performed --- .gitmodules | 4 ++-- build_debian.sh | 5 +---- files/build_templates/sonic_debian_extension.j2 | 15 +++++++++++++++ platform/broadcom/docker-syncd-brcm.mk | 1 + platform/broadcom/sonic-platform-modules-arista | 2 +- slave.mk | 1 + 6 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.gitmodules b/.gitmodules index 35e7290b8000..472c4bc60186 100644 --- a/.gitmodules +++ b/.gitmodules @@ -50,6 +50,6 @@ [submodule "platform/broadcom/sonic-platform-modules-s6000"] path = platform/broadcom/sonic-platform-modules-s6000 url = https://github.com/Azure/sonic-platform-modules-s6000 -[submodule "sonic-platform-modules-arista"] +[submodule "platform/broadcom/sonic-platform-modules-arista"] path = platform/broadcom/sonic-platform-modules-arista - url = https://github.com/lguohan/sonic-1 + url = https://github.com/aristanetworks/sonic diff --git a/build_debian.sh b/build_debian.sh index 76cd4467ce10..46d23355dd63 100755 --- a/build_debian.sh +++ b/build_debian.sh @@ -58,7 +58,7 @@ DEFAULT_USERINFO="Default admin user,,," ## Prepare the file system directory if [[ -d $FILESYSTEM_ROOT ]]; then - sudo rm -r $FILESYSTEM_ROOT || die "Failed to clean chroot directory" + sudo rm -rf $FILESYSTEM_ROOT || die "Failed to clean chroot directory" fi mkdir -p $FILESYSTEM_ROOT @@ -272,6 +272,3 @@ pushd $FILESYSTEM_ROOT && sudo tar czf $OLDPWD/$FILESYSTEM_DOCKERFS -C var/lib/d ## Compress together with /boot and /var/lib/docker as an installer payload zip file pushd $FILESYSTEM_ROOT && sudo zip $OLDPWD/$ONIE_INSTALLER_PAYLOAD -r boot/; popd sudo zip -g $ONIE_INSTALLER_PAYLOAD $FILESYSTEM_SQUASHFS $FILESYSTEM_DOCKERFS - -## Remove fsroot -sudo rm -rf $FILESYSTEM_ROOT diff --git a/files/build_templates/sonic_debian_extension.j2 b/files/build_templates/sonic_debian_extension.j2 index be7f338dae81..edb941c01904 100644 --- a/files/build_templates/sonic_debian_extension.j2 +++ b/files/build_templates/sonic_debian_extension.j2 @@ -95,9 +95,24 @@ sudo mv sonic_version.yml $FILESYSTEM_ROOT/etc/sonic/ # Copy sudoers configuration file sudo cp $IMAGE_CONFIGS/sudoers/sudoers $FILESYSTEM_ROOT/etc/ +## Install package without starting service +## ref: https://wiki.debian.org/chroot +sudo tee -a $FILESYSTEM_ROOT/usr/sbin/policy-rc.d > /dev/null <