Tecnativa / doodba

Base image for making the creation of customized Odoo environments a piece of cake
Apache License 2.0
423 stars 303 forks source link

[FIX] 1[12].0: use archive for debian stretch packages #546

Closed ap-wtioit closed 1 year ago

ap-wtioit commented 1 year ago

Fix building images with debian stretch. Depending on the selected mirror we saw more and more issues with building the stretch images.

#6 1.419 Reading package lists...
#6 1.437 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
#6 1.437 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
#6 1.437 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
#6 1.437 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found
#6 1.437 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
#6 1.437 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
#6 1.437 E: Some index files failed to download. They have been ignored, or old ones used instead.

It seems like the mirrors are slowly removing the packages for debian stretch.

In this pull request:

Info @wt-io-it

ap-wtioit commented 1 year ago

We are replacing the lines with sed -i 's,http://deb.debian.org,http://archive.debian.org,g;s,http://security.debian.org,http://archive.debian.org,g;s,\(.*stretch-updates\),#\1,' /etc/apt/sources.list.

Old version (docker run --rm tecnativa/doodba:11.0 cat /etc/apt/sources.list):

# deb http://snapshot.debian.org/archive/debian/20200908T070000Z stretch main
deb http://deb.debian.org/debian stretch main
# deb http://snapshot.debian.org/archive/debian-security/20200908T070000Z stretch/updates main
deb http://security.debian.org/debian-security stretch/updates main
# deb http://snapshot.debian.org/archive/debian/20200908T070000Z stretch-updates main
deb http://deb.debian.org/debian stretch-updates main

after the patch

# deb http://snapshot.debian.org/archive/debian/20210721T000000Z stretch main
deb http://archive.debian.org/debian stretch main
# deb http://snapshot.debian.org/archive/debian-security/20210721T000000Z stretch/updates main
deb http://archive.debian.org/debian-security stretch/updates main
## deb http://snapshot.debian.org/archive/debian/20210721T000000Z stretch-updates main
#deb http://archive.debian.org/debian stretch-updates main

So no new lines are added only the existing lines are fixed.