meta-debian / meta-debian

Meta-layer for Poky to build embedded Linux environments by Debian's source codes
MIT License
146 stars 93 forks source link

[warrior] The way to alternate the current buster repository that will eventually be inaccessible #369

Open teradat opened 3 months ago

teradat commented 3 months ago

Problem to be resolved

Debian 10 buster entered ELTS phase, then the URLs defined in DEBIAN_MIRROR and DEBIAN_SECURITY_UPDATE_MIRROR variables used in recipes-debian/sources/*.inc files will eventually become inaccessible because it is expected that buster directory will be removed by Debian side at some point.

Basis for this issue

For example, for the previous version of "stretch", http://ftp.debian.org/debian/dists/stretch is not exist, http://archive.debian.org/debian/dists/stretch is exist.

Similarly, expect "buster" will be moved to the archive at some point.

Current definition

Solution (idea)

There are four ideas. Which idea is best for the meta-debian?

1. Add to MIRRORS

Add alternative URL to MIRRORS.

1-1. Define in mirrors.bbclass

Step:

  1. Preparing mirrors.bbclass The handling for adding to MIRRORS is in Poky, so copy it and prepare it for meta-debian.

    cp <path-to>/poky/meta/classes/mirrors.bbclass <path-to>/meta-debian/classes/mirrors.bbclass
  2. Modify mirrors.bbclass Add http://archive.debian.org/debian/pool to MIRRORS as a mirror of DEBIAN_MIRROR. Add http://archive.debian.org/debian-security/pool/updates to MIRRORS as a mirror of DEBIAN_SECURITY_UPDATE_MIRROR. However, buster of http://archive.debian.org/debian-security/dists/buster/updates/Release does not exist yet.

    (On the way, might as well delete any old and unnecessary mirrors) And, maybe might try add new snapshot.

     MIRRORS += "\
    - ${DEBIAN_MIRROR}        http://snapshot.debian.org/archive/debian/20180310T215105Z/pool \n \
    - ${DEBIAN_MIRROR}        http://snapshot.debian.org/archive/debian-archive/20120328T092752Z/debian/pool \n \
    - ${DEBIAN_MIRROR}        http://snapshot.debian.org/archive/debian-archive/20110127T084257Z/debian/pool \n \
    - ${DEBIAN_MIRROR}        http://snapshot.debian.org/archive/debian-archive/20090802T004153Z/debian/pool \n \
    + ${DEBIAN_MIRROR}        http://archive.debian.org/debian/pool \n \
    + ${DEBIAN_MIRROR}        http://snapshot.debian.org/archive/debian-archive/20240331T102506Z/debian/pool \n \
    + ${DEBIAN_SECURITY_UPDATE_MIRROR}        http://archive.debian.org/debian-security/pool/updates \n \
    + ${DEBIAN_SECURITY_UPDATE_MIRROR}        http://snapshot.debian.org/archive/debian-security/20240701T082523Z/pool/updates \n \
     ${DEBIAN_MIRROR}        http://ftp.de.debian.org/debian/pool \n \
     ...

1-2. Define elsewhere

Might can also add MIRRORS definition in "conf/distro/deby.inc" or "conf/local.conf.sample".

+ MIRRORS += "\
+ ${DEBIAN_MIRROR}        http://archive.debian.org/debian/pool \n \
+ ${DEBIAN_MIRROR}        http://snapshot.debian.org/archive/debian-archive/20240331T102506Z/debian/pool \n \
+ ${DEBIAN_SECURITY_UPDATE_MIRROR}        http://archive.debian.org/debian-security/pool/updates \n \
+ ${DEBIAN_SECURITY_UPDATE_MIRROR}        http://snapshot.debian.org/archive/debian-security/20240701T082523Z/pool/updates \n \
+ "

Change URL of variable

In "conf/distro/deby.inc" or "conf/local.conf.sample", change URL for DEBIAN_MIRROR and DEBIAN_SECURITY_UPDATE_MIRROR. The candidate after the change is “archive.debian.org” or “snapshot.debian.org”.

2-1. Define in "conf/distro/deby.inc"

DEBIAN_MIRROR overrides the Poky define.

+ DEBIAN_MIRROR = "http://archive.debian.org/debian/pool"
...
- DEBIAN_SECURITY_UPDATE_MIRROR ?= "http://security.debian.org/debian-security/pool/updates"
+ DEBIAN_SECURITY_UPDATE_MIRROR ?= "http://snapshot.debian.org/archive/debian-security/20240701T082523Z/pool/updates"

2-2. Define in "conf/local.conf.sample"

This is the same as adding to "conf/local.conf".

+ DEBIAN_MIRROR = "http://archive.debian.org/debian/pool"
+ DEBIAN_SECURITY_UPDATE_MIRROR = "http://snapshot.debian.org/archive/debian-security/20240701T082523Z/pool/updates"
teradat commented 3 months ago

@zuka0828 Which way do you think is best?