diff options
author | Filip Pytloun <filip@pytloun.cz> | 2016-03-09 11:09:41 +0100 |
---|---|---|
committer | Filip Pytloun <filip@pytloun.cz> | 2016-03-11 09:50:51 +0100 |
commit | ea1f8911cd69216027df5f9d727f47a1b67ef29b (patch) | |
tree | a1f2590c4b1be985b4a276ac291e0dfc9ad78484 /bootstrap.d/11-apt.sh | |
parent | 27d947162017091ac25267c7f235c97d5c685dd2 (diff) | |
download | rpi2-gen-image-ea1f8911cd69216027df5f9d727f47a1b67ef29b.tar.gz rpi2-gen-image-ea1f8911cd69216027df5f9d727f47a1b67ef29b.tar.bz2 rpi2-gen-image-ea1f8911cd69216027df5f9d727f47a1b67ef29b.zip |
Refactor: split bootstrap actions and allow custom
Diffstat (limited to 'bootstrap.d/11-apt.sh')
-rw-r--r-- | bootstrap.d/11-apt.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/bootstrap.d/11-apt.sh b/bootstrap.d/11-apt.sh new file mode 100644 index 0000000..9a4739d --- /dev/null +++ b/bootstrap.d/11-apt.sh @@ -0,0 +1,40 @@ +# +# Setup APT repositories +# + +. ./functions.sh + +# Use proxy inside chroot +if [ -z "$APT_PROXY" ] ; then + echo "Acquire::http::Proxy \"$APT_PROXY\";" >> $R/etc/apt/apt.conf.d/10proxy +fi + +# Pin package flash-kernel to repositories.collabora.co.uk +cat <<EOM >$R/etc/apt/preferences.d/flash-kernel +Package: flash-kernel +Pin: origin repositories.collabora.co.uk +Pin-Priority: 1000 +EOM + +# Upgrade collabora package index and install collabora keyring +echo "deb https://repositories.collabora.co.uk/debian ${RELEASE} rpi2" >$R/etc/apt/sources.list +chroot_exec apt-get -qq -y update +chroot_exec apt-get -qq -y --force-yes install collabora-obs-archive-keyring + +# Set up initial sources.list +cat <<EOM >$R/etc/apt/sources.list +deb http://${APT_SERVER}/debian ${RELEASE} main contrib +#deb-src http://${APT_SERVER}/debian ${RELEASE} main contrib + +deb http://${APT_SERVER}/debian/ ${RELEASE}-updates main contrib +#deb-src http://${APT_SERVER}/debian/ ${RELEASE}-updates main contrib + +deb http://security.debian.org/ ${RELEASE}/updates main contrib +#deb-src http://security.debian.org/ ${RELEASE}/updates main contrib + +deb https://repositories.collabora.co.uk/debian ${RELEASE} rpi2 +EOM + +# Upgrade package index and update all installed packages and changed dependencies +chroot_exec apt-get -qq -y update +chroot_exec apt-get -qq -y -u dist-upgrade |