lxc-templates icon indicating copy to clipboard operation
lxc-templates copied to clipboard

Debian `security bullseye/updates Release` does not have a Release file

Open maxkratz opened this issue 2 years ago • 2 comments

Similar to https://github.com/lxc/lxc-templates/issues/39, the current apt configuration in the image debian:bullseye seems to be broken. apt update fails with:

E: The repository 'http://security.debian.org/debian-security bullseye/updates Release' does not have a Release file.

Steps to reproduce:

$ lxc-create --template debian --name bullseye-test -- --release bullseye
$ lxc-start bullseye-test                                                
$ lxc-attach bullseye-test
# apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Ign:2 http://security.debian.org/debian-security bullseye/updates InRelease
Err:3 http://security.debian.org/debian-security bullseye/updates Release
  404  Not Found [IP: 146.75.122.132 80]
Get:4 http://deb.debian.org/debian bullseye/main Translation-en [6,240 kB]
Reading package lists... Done             
E: The repository 'http://security.debian.org/debian-security bullseye/updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Content of /etc/apt/sources.list:

# cat /etc/apt/sources.list
deb http://deb.debian.org/debian          bullseye         main
deb http://security.debian.org/debian-security bullseye/updates main

AFAIK, the content of a new Debian Bullseye installation contains the following lines in /etc/apt/sources.list:

deb http://deb.debian.org/debian bullseye main contrib non-free
deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free

maxkratz avatar Feb 05 '23 08:02 maxkratz

@maxkratz, what version of lxc-templates were you using? Vanilla lxc-templates creates a line similar to

deb http://security.debian.org/ bullseye-security main

and lxc-templates as packaged in bookworm produces a line like

deb http://security.debian.org/debian-security bullseye-security main

Your reported apt line doesn't match either, so I'm not sure exactly what is happening to give you a bad URL.

gibmat avatar Feb 10 '24 20:02 gibmat

@maxkratz, what version of lxc-templates were you using? Vanilla lxc-templates creates a line similar to

deb http://security.debian.org/ bullseye-security main

and lxc-templates as packaged in bookworm produces a line like

deb http://security.debian.org/debian-security bullseye-security main

I was using version 3.0.4-5 on Debian GNU/Linux 11 (bullseye):

$ apt show lxc-templates         
Package: lxc-templates
Version: 3.0.4-5
Architecture: amd64
Installed: yes
Priority: optional
Essential: no
Section: admin
Source: lxc-templates
Origin: Debian
Maintainer: pkg-lxc <[email protected]>
Installed-Size: 513 KB
Depends: lxc (>= 1:3.0.2-1~exp+1)
Recommends: 
  bridge-utils
  busybox-static
  cloud-image-utils | cloud-utils
  debootstrap | cdebootstrap
  distro-info
  mmdebstrap
  openssl
  rsync
  uuid-runtime
  xz-utils
Suggests: qemu-user-static
Homepage: https://linuxcontainers.org/
Download-Size: 85 KB
APT-Sources: http://mirror.hetzner.com/debian/ oldstable/main amd64 Packages
Description: Linux Containers userspace tools (templates)
 Containers are insulated areas inside a system, which have their own namespace
 for filesystem, network, PID, IPC, CPU and memory allocation and which can be
 created using the Control Group and Namespace features included in the Linux
 kernel.
 .
 This package contains the templates.

However, as a workaround, I was able to resolve the issue with these commands:

$ /usr/sbin/chroot /var/cache/lxc/debian/rootfs-bullseye-amd64 apt-get update
$ /usr/sbin/chroot /var/cache/lxc/debian/rootfs-bullseye-amd64 apt-get dist-upgrade

After running these commands, I found the following content in the /etc/apt/sources.list of the container:

$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian          bullseye         main
deb http://security.debian.org/debian-security bullseye/updates main

maxkratz avatar Feb 13 '24 09:02 maxkratz