Comment 9 for bug 1783129

Revision history for this message
Scott Moser (smoser) wrote :

Summary:
 Subiquity can feed curtin a sources.list template and curtin will do the
 right thing. config for that is 'apt/config/sources_list' which then
 will then have rendered '$MIRROR', and '$RELEASE'
   https://git.launchpad.net/curtin/tree/examples/apt-source.yaml#n93

More info:
Curtin is working as designed here, and replacing the ubuntu mirrors
it finds in the /etc/apt/sources.list with the requested mirrors. Other
than that, it does not change the content.

You can see in the provided curtin.log:
   No custom template provided, fall back to modifymirrors in /etc/apt/sources.list on the target system

To see what curtin got *in*, I make an educated guess that the 'filesystem.squashfs' image contains the relevant /etc/apt/sources.list.

   $ iso=ubuntu-18.04-live-server-amd64.iso
   $ isoinfo -i "$iso" -J -R -x /casper/filesystem.squashfs > fs.squashfs
   $ unsquashfs -dest squashfs-root/ fs.squashfs /etc/apt/sources.list
   $ cat squashfs-root/etc/apt/sources.list
   deb http://archive.ubuntu.com/ubuntu/ bionic main
   deb http://security.ubuntu.com/ubuntu/ bionic-security main
   deb http://archive.ubuntu.com/ubuntu/ bionic-updates main

That differs from a ubuntu server squash image.

   $ wget http://cloud-images.ubuntu.com/daily/server/bionic/current/bionic-server-cloudimg-amd64.squashfs
   $ unsquashfs -dest server-squashfs-root/ \
       bionic-server-cloudimg-amd64.squashfs /etc/apt/sources.list
   $ wc -l server-squashfs-root/etc/apt/sources.list
   49 server-squashfs-root/etc/apt/sources.list
   $ grep -v "^#" server-squashfs-root/etc/apt/sources.list

   $ pastebinit server-squashfs-root/etc/apt/sources.list
   http://paste.ubuntu.com/p/nQvtTksHRs/

   $ grep -v "^#" server-squashfs-root/etc/apt/sources.list | grep .
   deb http://archive.ubuntu.com/ubuntu/ bionic main restricted
   deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted
   deb http://archive.ubuntu.com/ubuntu/ bionic universe
   deb http://archive.ubuntu.com/ubuntu/ bionic-updates universe
   deb http://archive.ubuntu.com/ubuntu/ bionic multiverse
   deb http://archive.ubuntu.com/ubuntu/ bionic-updates multiverse
   deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
   deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted
   deb http://security.ubuntu.com/ubuntu/ bionic-security universe
   deb http://security.ubuntu.com/ubuntu/ bionic-security multiverse

If you're wondering why curtin updates the existing sources.list, that
is to avoid having to know what the right content is. See bug 1513529
or bug 1177432 for examples of why we are not interested in knowing the
right content and maintaining that knowledge.

What I suggest is to have the images built with the correct data,
Then it will all "just work".