Skip to content

Commit

Permalink
crossbuilder: add option to add PPAs and extra repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
mardy committed Jun 11, 2022
1 parent 199de4a commit 9f452fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions crossbuilder
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ display_help () {
echo " --packages - Packages to deploy [by default: all the ones already installed on device]."
echo " --architecture - Architecture to build for [defaults to architecture of connected device, if none then armhf]."
echo " --ubuntu - Version of Ubuntu to build for [defaults to version of connected device, if none then 16.04]."
echo " --extra-repo - Extra repository to enable (example: ppa:mardy/qbs-on-lts). This option can be repeated."
echo " --lxd-image - LXD image to use [defaults to the ones provided by the Ubuntu SDK (example: ubuntu-sdk-16.04-amd64-armhf-dev)."
echo " --privileged - Use a privileged container (disabled by default)."
echo " --ephemeral - Build using a short-lived container (disabled by default)."
Expand Down Expand Up @@ -500,6 +501,10 @@ create_container () {
exec_container_root "printf 'APT::Periodic::Update-Package-Lists \"0\";\n\
APT::Periodic::Unattended-Upgrade \"0\";\n\
' > /etc/apt/apt.conf.d/20auto-upgrades"
for EXTRA_REPO in $EXTRA_REPOS
do
exec_container_root "add-apt-repository -y $EXTRA_REPO"
done
exec_container_root apt update
exec_container_root apt install -y sudo debhelper ccache software-properties-common devscripts equivs qemu-user-static
exec_container_root adduser $USERNAME sudo
Expand Down Expand Up @@ -986,6 +991,9 @@ while [ "$1" != "" ]; do
--ubuntu)
TARGET_UBUNTU=$VALUE
;;
--extra-repo)
EXTRA_REPOS="$EXTRA_REPOS $VALUE"
;;
--lxd-image)
LXD_IMAGE=$VALUE
;;
Expand Down

0 comments on commit 9f452fe

Please sign in to comment.