I have built the Debian 11 image and uploaded it to MAAS, and added the custom curtin userdata to the correct place in my MAAS install.
When deploying the Debian image to a machine, everything works except the apt sources are not correct. By default, without modifying any of the pre-supplied code, the /etc/apt/sources.list file contains the following:
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.debian.tmpl
###
# See http://www.debian.org/releases/stable/i386/release-notes/ch-upgrading.html
# for how to upgrade to newer versions of the distribution.
deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main
## Major bug fix updates produced after the final release of the
## distribution.
deb http://security.debian.org bullseye/updates main
deb-src http://security.debian.org bullseye/updates main
deb http://deb.debian.org/debian bullseye-updates main
deb-src http://deb.debian.org/debian bullseye-updates main
## Uncomment the following two lines to add software from the 'backports'
## repository.
##
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
deb http://deb.debian.org/debian bullseye-backports main
deb-src http://deb.debian.org/debian bullseye-backports main
Comparing with a normal Debian's sources.list, there are differences with the security.debian.org sources which prevents apt update from working properly.
Differences:
security.debian.org should be security.debian.org/debian-security
bullseye/updates after security should be bullseye-security
To fix the first difference, I was able to modify the curtin custom userdata late_3 command to change the sed target.
Despite modifying other curtin custom userdata commands, I have been unable to resolve the second difference.
I have built the Debian 11 image and uploaded it to MAAS, and added the custom curtin userdata to the correct place in my MAAS install.
When deploying the Debian image to a machine, everything works except the apt sources are not correct. By default, without modifying any of the pre-supplied code, the
/etc/apt/sources.list
file contains the following:Comparing with a normal Debian's sources.list, there are differences with the
security.debian.org
sources which preventsapt update
from working properly.Differences:
security.debian.org
should besecurity.debian.org/debian-security
bullseye/updates
after security should bebullseye-security
To fix the first difference, I was able to modify the curtin custom userdata
late_3
command to change thesed
target.Despite modifying other curtin custom userdata commands, I have been unable to resolve the second difference.