canonical / chisel

GNU Affero General Public License v3.0
259 stars 39 forks source link

Support multiple archives #20

Open woky opened 2 years ago

woky commented 2 years ago

Currently chisel fetches only from single suite archive. For example for jammy, in sources.list that would look like:

deb http://archive.ubuntu.com/ubuntu/ jammy main universe

https://github.com/canonical/chisel/pull/19 adds support for -updates and -security but this is not general solution. We should follow Debian RFC822 control data format for sources[1] and instead specify archives in chisel.yaml like so:

format: chisel-v1

archives:
    ubuntu:
        uri: "http://archive.ubuntu.com/ubuntu/"
        suite: jammy
        components: [main, universe]
        arch: [amd64, i386]
    ubuntu-updates:
        uri: "http://archive.ubuntu.com/ubuntu/"
        suite: jammy-updates
        components: [main, universe]
        arch: [amd64, i386]
    ubuntu-security:
        uri: "http://archive.ubuntu.com/ubuntu/"
        suite: jammy-security
        components: [main, universe]
        arch: [amd64, i386]
    ubuntu-ports:
        uri: "http://ports.ubuntu.com/ubuntu-ports/"
        suite: jammy
        components: [main, universe]
        arch: [arm64, armhf, ppc64el, riscv64, s390x]
    ubuntu-ports-updates:
        uri: "http://ports.ubuntu.com/ubuntu-ports/"
        suite: jammy-updates
        components: [main, universe]
        arch: [arm64, armhf, ppc64el, riscv64, s390x]
    ubuntu-ports-security:
        uri: "http://ports.ubuntu.com/ubuntu-ports/"
        suite: jammy-security
        components: [main, universe]
        arch: [arm64, armhf, ppc64el, riscv64, s390x]

With this we will only have to change the parser and few references to release variables and keep most of archive.go as it is.

[1] https://manpages.debian.org/testing/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT

cjdcordeiro commented 2 years ago

see: https://github.com/canonical/chisel/pull/19#discussion_r944278049 as a reference request for implementation

endersonmaia commented 4 months ago

Would it be in the scope of chisel to suport a debian (or any other debian base distro) ?

Something like:

format: chisel-v1

archives:
    debian:
        uri: "http://archive.debian.org/debian/"
        suite: bookworm
        components: [main, universe]
        arch: [amd64, i386]
cjdcordeiro commented 4 months ago

@endersonmaia I'm afraid not, at least not for now. The initial support for multiple archives will only target Ubuntu archives.