]> gitweb.fluxo.info Git - hydra.git/commitdiff
Apt config at provision
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 28 Jun 2017 13:44:50 +0000 (10:44 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 28 Jun 2017 13:44:50 +0000 (10:44 -0300)
share/hydractl/provision
share/hydractl/provision-chroot
share/hydractl/provision-raspi

index 97d99378b7be35b2da18b8a95149ca9d11c8b97c..8d20df5c526a266be1256c3f082b13890f08e35d 100755 (executable)
@@ -334,6 +334,12 @@ echo "127.0.0.1 $hostname.$domain $hostname" | $SUDO tee -a $WORK/etc/hosts > /d
 tac $WORK/etc/hosts | $SUDO tee $WORK/etc/hosts.new > /dev/null
 hydra_sudo_run mv $WORK/etc/hosts.new $WORK/etc/hosts
 
+# Apt
+if [ "$version" != "sid" ]; then
+  echo "deb http://security.debian.org/ $version/updates main contrib non-free"     | $SUDO tee $WORK/etc/apt/sources.list
+  echo "deb-src http://security.debian.org/ $version/updates main contrib non-free" | $SUDO tee $WORK/etc/apt/sources.list
+fi
+
 # Initial upgrade.
 echo "Applying initial upgrades..."
 hydra_sudo_run chroot $WORK/ apt-get update
index ff771cfee433da26359a990b5c9e154ef617e156..e8ce9b54805730ea2e8657a30e1d765351303e95 100755 (executable)
@@ -48,6 +48,17 @@ done
 hydra_sudo_run mkdir -p /var/chroot
 hydra_sudo_run debootstrap --variant=minbase --arch $arch $version $WORK $mirror
 
+# Apt
+if [ "$version" != "sid" ]; then
+  echo "deb http://security.debian.org/ $version/updates main contrib non-free"     | $SUDO tee $WORK/etc/apt/sources.list
+  echo "deb-src http://security.debian.org/ $version/updates main contrib non-free" | $SUDO tee $WORK/etc/apt/sources.list
+fi
+
+# Initial upgrade.
+echo "Applying initial upgrades..."
+hydra_sudo_run chroot $WORK/ apt-get update
+hydra_sudo_run chroot $WORK/ apt-get upgrade -y
+
 # Arch specific procedures
 if [ "$arch" == "armel" ] || [ "$arch" == "armhf" ]; then
   if [ ! -f '/usr/bin/qemu-arm-static' ]; then
index 173d7767284362a294de3a1f14808ffb2bec88c4..a54422c029d4f679e49c9baa177c41ba6d55ba9b 100755 (executable)
@@ -72,7 +72,7 @@ hydra_sudo_run cp /usr/bin/qemu-arm-static $WORK/usr/bin/
 $CHROOT /debootstrap/debootstrap --second-stage
 
 # Apt configuration
-echo "deb $mirror $version main contrib non-free"      | hydra_sudo_run tee    $WORK/etc/apt/sources.list > /dev/null
+echo "deb $mirror $version main contrib non-free"                             | hydra_sudo_run tee    $WORK/etc/apt/sources.list > /dev/null
 echo "deb http://security.debian.org/ $version/updates main contrib non-free" | hydra_sudo_run tee -a $WORK/etc/apt/sources.list > /dev/null
 
 # Basic packages