Skip to content

Commit

Permalink
Unconditionally add updates and security apt repos (#265)
Browse files Browse the repository at this point in the history
By testing on my local machine, I verified that debootstrap only install the
main release repository. We also want <release>-updates and <release>-security
repositories, especially the latter. Without the latter unattended upgrades for
security updates will not work.
  • Loading branch information
nkinkade authored Jul 15, 2024
1 parent f14d3f3 commit 4ba57d2
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions setup_stage3_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,12 @@ fi
trap "umount_proc_and_sys $BOOTSTRAP" EXIT

mount_proc_and_sys $BOOTSTRAP
# Add extra apt sources to install latest kernel image and headers.
LINE='deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe multiverse'
if ! grep -q "$LINE" $BOOTSTRAP/etc/apt/sources.list ; then
chroot $BOOTSTRAP bash -c "echo '$LINE' >> /etc/apt/sources.list"
fi
# Add updates and security repositories to apt
UPDATES_REPO='deb http://archive.ubuntu.com/ubuntu/ jammy-updates main universe multiverse'
chroot $BOOTSTRAP bash -c "echo '$UPDATES_REPO' >> /etc/apt/sources.list"
SECURITY_REPO='deb http://archive.ubuntu.com/ubuntu/ jammy-security main universe multiverse'
chroot $BOOTSTRAP bash -c "echo '$SECURITY_REPO' >> /etc/apt/sources.list"

# Update the apt repositories.
chroot $BOOTSTRAP apt-get update --fix-missing

Expand Down

0 comments on commit 4ba57d2

Please sign in to comment.