[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1118187: cloud-init: bug in deb822 sources.list template



Package: cloud-init
Version: 25.1.4-1
Severity: normal
Tags: patch upstream

Dear Maintainer,

On Debian Trixie, cloud-init 25.1.4-1 generates an invalid
deb822-format sources list entry because of a missing newline between
the “Suites” and “Components” fields in the template
`/etc/cloud/templates/sources.list.debian.deb822.tmpl`.a

---

Steps to reproduce:

1. Use a Debian Trixie system with cloud-init 25.1.4 installed.
2. Let cloud-init generate `/etc/apt/sources.list.d/sources.list.deb822`
   from the default template.
3. Inspect the resulting file.

Actual result: 

Suites: trixie-securityComponents: main non-free-firmware

Expected result:

Suites: trixie-security
Components: main non-free-firmware


Cause:
The  jinja template file currently contains: 

Suites: {{codename}}{% if codename in ('buster', 'stretch') %}/updates{% else %}-security{% endif %}
Components: main


Jinja renders this without a newline between the two lines.

Upstream fix:

This issue was fixed upstream in cloud-init 25.2 by commit:
https://github.com/canonical/cloud-init/commit/f21d266eb358b5591128db3b413a72c903cadac1

Please consider backporting this fix or updating to ≥ 25.2.

---

System information:
$ uname -a
Linux debian-trixie 6.12.48+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.48-1 (2025-09-20) x86_64 GNU/Linux

$ /usr/bin/cloud-init --version
/usr/bin/cloud-init 25.1.4


Best regards,  
Pavel Krasheninnikov


Reply to: