debuerreotype / docker-debian-eol-artifacts

Official builds of debuerreotype-generated Debian EOL tarballs for use in Docker (archive.debian.org)
https://hub.docker.com/r/debian/eol
Apache License 2.0
6 stars 1 forks source link

apt update failed for Debian Jessie due to outdated image on Docker Hub #8

Open n-thumann opened 1 year ago

n-thumann commented 1 year ago

The image for Debian Jessie on Docker Hub seems to contain https://github.com/debuerreotype/docker-debian-eol-artifacts/commit/6367504da56fda73f5f9bd5542d13e44b2ffbb92#diff-d05c18c4bd37fc62338a374267def1cd34cda8a03f5191e4337a1dc59fdc9f54 and hasn't been updated ever since.

Now, as of https://lists.debian.org/debian-devel-announce/2023/03/msg00006.html / https://lists.debian.org/debian-devel-announce/2023/02/msg00004.html, the repositories for Debian Jessie are no longer available in the main archive, causing aupt update to fail:

➜  ~ docker pull debian/eol:jessie                   
jessie: Pulling from debian/eol
Digest: sha256:2082a3a524dec0f7a5b147c89c26970378726c819b35faaabf10728f339f2c56
Status: Image is up to date for debian/eol:jessie
docker.io/debian/eol:jessie
➜  ~ docker run --rm debian/eol:jessie apt-get update
Ign http://deb.debian.org jessie-updates InRelease
Ign http://security.debian.org jessie/updates InRelease
Ign http://archive.debian.org jessie InRelease
Ign http://deb.debian.org jessie-updates Release.gpg
Ign http://security.debian.org jessie/updates Release.gpg
Get:1 http://archive.debian.org jessie Release.gpg [2420 B]
Ign http://deb.debian.org jessie-updates Release
Ign http://security.debian.org jessie/updates Release
Get:2 http://archive.debian.org jessie Release [148 kB]
Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages
  404  Not Found
Err http://security.debian.org jessie/updates/main amd64 Packages
  404  Not Found [IP: 151.101.130.132 80]
Get:3 http://archive.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 9249 kB in 3s (2830 kB/s)
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.130.132 80]

E: Some index files failed to download. They have been ignored, or old ones used instead.

Building the image locally from thedist-jessie branch and running apt update in there, works fine, because it doesn't contain the main archive.

Can the image on Docker Hub be updated?

sigmike commented 1 year ago

There's also another problem with the jessie image: if I understand correctly it was made when the jessie-updates repository was available but it looks like this repository was deleted and not moved to archive (https://superuser.com/a/1417751). So when I try to install some packages it fails because it cannot install dependencies that are older than the already installed versions:

$ docker run --rm --ulimit nofile=1024:1024 debian/eol:jessie bash -c "apt-get update; apt-get install -y build-essential"
[same apt-get update result as in the comment above]
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: gcc (>= 4:4.9.1) but it is not going to be installed
                   Depends: g++ (>= 4:4.9.1) but it is not going to be installed
                   Depends: dpkg-dev (>= 1.17.11) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Trying to install the dependencies manually leads to errors like this:

# apt-get install -y cpp-4.9
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 cpp-4.9 : Depends: gcc-4.9-base (= 4.9.2-10+deb8u1) but 4.9.2-10+deb8u2 is to be installed
E: Unable to correct problems, you have held broken packages.

I guess rebuilding the image will fix that since jessie-updates cannot be used.

haiyamading commented 1 year ago

I can confirm both problems above. Unfortunately I still need jessie and strech to build some legacy embedded root filesystems.

mh@DEV1-AP-04:~/workspace_bsp/mil-bsp$ sudo docker system prune --all
WARNING! This will remove:
  - all stopped containers
  - all networks not used by at least one container
  - all images without at least one container associated to them
  - all build cache

Are you sure you want to continue? [y/N] y
Deleted Images:
untagged: debian/eol:jessie
untagged: debian/eol@sha256:2082a3a524dec0f7a5b147c89c26970378726c819b35faaabf10728f339f2c56
deleted: sha256:a3af4b58fe22aa7543e96200434b61f9419645fd699696c8daff2444e7d6b71f
deleted: sha256:7f3b4ff524f3a1350886dbcecf6f92ca2f00eb2214e52e196d9e09c9bb069359

Total reclaimed space: 129.1MB
mh@DEV1-AP-04:~/workspace_bsp/mil-bsp$ sudo docker run --rm -it --ulimit nofile=1024:1024 debian/eol:jessie bash
Unable to find image 'debian/eol:jessie' locally
jessie: Pulling from debian/eol
2b2fa7211760: Pull complete 
Digest: sha256:2082a3a524dec0f7a5b147c89c26970378726c819b35faaabf10728f339f2c56
Status: Downloaded newer image for debian/eol:jessie
root@49bc89918ea1:/# apt-get update
Ign http://security.debian.org jessie/updates InRelease
Ign http://security.debian.org jessie/updates Release.gpg
Ign http://archive.debian.org jessie InRelease                           
Ign http://deb.debian.org jessie-updates InRelease                       
Ign http://security.debian.org jessie/updates Release
Ign http://deb.debian.org jessie-updates Release.gpg
Err http://security.debian.org jessie/updates/main amd64 Packages

Get:1 http://archive.debian.org jessie Release.gpg [2420 B]
Ign http://deb.debian.org jessie-updates Release                                   
Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://security.debian.org jessie/updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages

Get:2 http://archive.debian.org jessie Release [148 kB]
Err http://security.debian.org jessie/updates/main amd64 Packages           

Err http://deb.debian.org jessie-updates/main amd64 Packages                

Err http://security.debian.org jessie/updates/main amd64 Packages
  404  Not Found [IP: 151.101.194.132 80]
Err http://deb.debian.org jessie-updates/main amd64 Packages

Err http://deb.debian.org jessie-updates/main amd64 Packages
  404  Not Found
Get:3 http://archive.debian.org jessie/main amd64 Packages [9098 kB]
Fetched 9249 kB in 1s (7971 kB/s)   
W: Failed to fetch http://security.debian.org/debian-security/dists/jessie/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.194.132 80]

W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages  404  Not Found

E: Some index files failed to download. They have been ignored, or old ones used instead.
root@49bc89918ea1:/# apt-get install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 git : Depends: liberror-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

root@49bc89918ea1:/# apt-get install liberror-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 liberror-perl : Depends: perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@49bc89918ea1:/# apt-get install perl         
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 perl : Depends: perl-base (= 5.20.2-3+deb8u11) but 5.20.2-3+deb8u12 is to be installed
        Recommends: netbase but it is not going to be installed
        Recommends: rename but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
root@49bc89918ea1:/# 
haiyamading commented 1 year ago

The following Dockerfile can be used as a workaround:

mh@DEV1-AP-04:~/workspace_bsp/mil-bsp$ cat Dockerfile 
FROM debian/eol:jessie

# Workaround for issue 8: https://github.com/debuerreotype/docker-debian-eol-artifacts/issues/8
RUN echo "deb http://archive.debian.org/debian/ jessie main contrib non-free\ndeb http://archive.debian.org/debian/ jessie-backports main contrib non-free\ndeb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free" > /etc/apt/sources.list && apt-get update
mh@DEV1-AP-04:~/workspace_bsp/mil-bsp$ sudo docker build -t debian-jessie-eol-fix -f Dockerfile .
Sending build context to Docker daemon    394MB
Step 1/2 : FROM debian/eol:jessie
 ---> a3af4b58fe22
Step 2/2 : RUN echo "deb http://archive.debian.org/debian/ jessie main contrib non-free\ndeb http://archive.debian.org/debian/ jessie-backports main contrib non-free\ndeb http://archive.debian.org/debian-security/ jessie/updates main contrib non-free" > /etc/apt/sources.list && apt-get update
 ---> Running in a31e01c49806
Ign http://archive.debian.org jessie InRelease
Get:1 http://archive.debian.org jessie-backports InRelease [166 kB]
Get:2 http://archive.debian.org jessie/updates InRelease [44.9 kB]
Get:3 http://archive.debian.org jessie Release.gpg [2420 B]
Get:4 http://archive.debian.org jessie-backports/main amd64 Packages [1171 kB]
Get:5 http://archive.debian.org jessie-backports/contrib amd64 Packages [10.8 kB]
Get:6 http://archive.debian.org jessie-backports/non-free amd64 Packages [33.2 kB]
Get:7 http://archive.debian.org jessie Release [148 kB]
Get:8 http://archive.debian.org jessie/updates/main amd64 Packages [992 kB]
Get:9 http://archive.debian.org jessie/updates/contrib amd64 Packages [2389 B]
Get:10 http://archive.debian.org jessie/updates/non-free amd64 Packages [4950 B]
Get:11 http://archive.debian.org jessie/main amd64 Packages [9098 kB]
Get:12 http://archive.debian.org jessie/contrib amd64 Packages [59.2 kB]
Get:13 http://archive.debian.org jessie/non-free amd64 Packages [101 kB]
Fetched 11.8 MB in 8s (1384 kB/s)
Reading package lists...
Removing intermediate container a31e01c49806
 ---> 95133b4e4bf6
Successfully built 95133b4e4bf6
Successfully tagged debian-jessie-eol-fix:latest
mh@DEV1-AP-04:~/workspace_bsp/mil-bsp$ sudo docker run -it debian-jessie-eol-fix /bin/bash
root@c0354e1cd28f:/# apt install git
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  ca-certificates git-man ifupdown isc-dhcp-client isc-dhcp-common krb5-locales less libalgorithm-c3-perl libarchive-extract-perl libbsd0 libcgi-fast-perl libcgi-pm-perl libclass-c3-perl
  libclass-c3-xs-perl libcpan-meta-perl libcurl3-gnutls libdata-optlist-perl libdata-section-perl libdns-export100 libedit2 liberror-perl libexpat1 libfcgi-perl libgdbm3 libgssapi-krb5-2 libidn11
  libirs-export91 libisc-export95 libisccfg-export90 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblog-message-perl liblog-message-simple-perl libmodule-build-perl
  libmodule-pluggable-perl libmodule-signature-perl libmro-compat-perl libpackage-constants-perl libparams-util-perl libpod-latex-perl libpod-readme-perl libpopt0 libregexp-common-perl librtmp1
  libsasl2-2 libsasl2-modules libsasl2-modules-db libsoftware-license-perl libssh2-1 libssl1.0.0 libsub-exporter-perl libsub-install-perl libterm-ui-perl libtext-soundex-perl libtext-template-perl
  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 netbase openssh-client openssl patch perl perl-modules rename rsync xauth
Suggested packages:
  gettext-base git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-arch git-cvs git-mediawiki git-svn ppp rdnssd net-tools resolvconf avahi-autoipd krb5-doc
  krb5-user libsasl2-modules-otp libsasl2-modules-ldap libsasl2-modules-sql libsasl2-modules-gssapi-mit libsasl2-modules-gssapi-heimdal ssh-askpass libpam-ssh keychain monkeysphere ed diffutils-doc
  perl-doc libterm-readline-gnu-perl libterm-readline-perl-perl make libb-lint-perl libcpanplus-dist-build-perl libcpanplus-perl libfile-checktree-perl libobject-accessor-perl openssh-server
Recommended packages:
  ssh-client libarchive-tar-perl
The following NEW packages will be installed:
  ca-certificates git git-man ifupdown isc-dhcp-client isc-dhcp-common krb5-locales less libalgorithm-c3-perl libarchive-extract-perl libbsd0 libcgi-fast-perl libcgi-pm-perl libclass-c3-perl
  libclass-c3-xs-perl libcpan-meta-perl libcurl3-gnutls libdata-optlist-perl libdata-section-perl libdns-export100 libedit2 liberror-perl libexpat1 libfcgi-perl libgdbm3 libgssapi-krb5-2 libidn11
  libirs-export91 libisc-export95 libisccfg-export90 libk5crypto3 libkeyutils1 libkrb5-3 libkrb5support0 libldap-2.4-2 liblog-message-perl liblog-message-simple-perl libmodule-build-perl
  libmodule-pluggable-perl libmodule-signature-perl libmro-compat-perl libpackage-constants-perl libparams-util-perl libpod-latex-perl libpod-readme-perl libpopt0 libregexp-common-perl librtmp1
  libsasl2-2 libsasl2-modules libsasl2-modules-db libsoftware-license-perl libssh2-1 libssl1.0.0 libsub-exporter-perl libsub-install-perl libterm-ui-perl libtext-soundex-perl libtext-template-perl
  libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 libxext6 libxmuu1 netbase openssh-client openssl patch perl perl-modules rename rsync xauth
0 upgraded, 75 newly installed, 0 to remove and 0 not upgraded.
Need to get 21.3 MB of archives.
After this operation, 86.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] 
Get:1 http://archive.debian.org/debian/ jessie/main libgdbm3 amd64 1.8.3-13.1 [30.0 kB]
Get:2 http://archive.debian.org/debian/ jessie/main libpopt0 amd64 1.16-10 [49.2 kB]

[....]

root@c0354e1cd28f:/# 
mckaygerhard commented 11 months ago

Jessie tags are on https://hub.docker.com/repository/docker/venenux/venenuxdock/tags?page=1&ordering=last_updated up to date with some security fixed.. more to come later