aboutsummaryrefslogtreecommitdiff
path: root/bootstrap.d/11-apt.sh
diff options
context:
space:
mode:
authorVincent Knecht <vincent.knecht@mailoo.org>2016-03-12 00:54:23 +0100
committerVincent Knecht <vincent.knecht@mailoo.org>2016-03-12 00:54:23 +0100
commit061173da65b0b6061d7fa46066c69737bc4957fe (patch)
treec472df2edb495adb8e0a9012de5bb14242865f82 /bootstrap.d/11-apt.sh
parent54acc1e70a3e357d0c60e4d9a9afd99077edce84 (diff)
parent80185bd93dd9eecb1b41ef8ac9a186aff19ab33e (diff)
downloadrpi2-gen-image-061173da65b0b6061d7fa46066c69737bc4957fe.tar.gz
rpi2-gen-image-061173da65b0b6061d7fa46066c69737bc4957fe.tar.bz2
rpi2-gen-image-061173da65b0b6061d7fa46066c69737bc4957fe.zip
Added ENABLE_SPLITFS option to produce distinct /boot/firmware and root images
Diffstat (limited to 'bootstrap.d/11-apt.sh')
-rw-r--r--bootstrap.d/11-apt.sh40
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