Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #82 from AkihiroSuda/dev
Browse files Browse the repository at this point in the history
pkg/distro/ubuntu: support Launchpad
  • Loading branch information
AkihiroSuda authored Jul 25, 2023
2 parents fda4259 + 89097ff commit dc52407
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,25 @@ Setting up hello (2.10-2) ...
| Distro | "Batteries included" | Support generating Dockerfiles | Support verifying package signatures |
| ----------------------- | -------------------- | ------------------------------ | ------------------------------------ |
| `debian` ||| [](https://github.com/reproducible-containers/repro-get/issues/10) |
| `ubuntu` | |||
| `ubuntu` | |||
| `fedora` (Experimental) ||||
| `alpine` (Experimental) ||||
| `arch` ||||

<details>
<summary> "Batteries included" for Debian, Fedora, and Arch Linux.</summary>
<summary> "Batteries included" for Debian, Ubuntu, Fedora, and Arch Linux.</summary>

<p>

On Debian, the packages are fetched from the following URLs by default:
- `http://deb.debian.org/debian/{{.Name}}` for recent packages (fast, multi-arch, but ephemeral)
- `http://deb.debian.org/debian/{{.Name}}` for recent packages (fast, but ephemeral)
- `http://snapshot-cloudflare.debian.org/archive/debian/{{timeToDebianSnapshot .Epoch}}/{{.Name}}` for archived packages (slow, but persistent)

On Fedora: `https://kojipkgs.fedoraproject.org/packages/{{.Name}}` (multi-arch and persistent)
On Ubuntu: `http://launchpad.net/ubuntu/+archive/primary/+files/{{.Basename}}`

On Arch Linux: `https://archive.archlinux.org/packages/{{.Name}}` (multi-arch and persistent)
On Fedora: `https://kojipkgs.fedoraproject.org/packages/{{.Name}}`

On Arch Linux: `https://archive.archlinux.org/packages/{{.Name}}`

</p>

Expand Down Expand Up @@ -296,9 +298,6 @@ See [`./hack/test-dockerfile-repro.sh`](./hack/test-dockerfile-repro.sh) for tes
However, it should be noted that the reproducibility is not guaranteed across different versions of BuildKit.
The host operating system version, filesystem configuration, etc. may affect reproducibility too.

### Does this work with Ubuntu?
Yes, but Ubuntu lacks an equivalent of http://snapshot.notset.fr/ , so you have to upload your cache to somewhere by yourself.

### How to use HTTPS on Debian/Ubuntu?
```bash
repro-get --provider='https://deb.debian.org/debian/{{.Name}},https://debian.notset.fr/snapshot/by-hash/SHA256/{{.SHA256}}' install
Expand Down
1 change: 0 additions & 1 deletion examples/neofetch-ubuntu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ docker run -it --rm \
ubuntu:jammy-20221003@sha256:35fb073f9e56eb84041b0745cb714eff0f7b225ea9e024f703cab56aaa5c7720 \
sh -euxc 'repro-get install /mnt/SHA256SUMS-amd64 && neofetch'
```
:warning: Ubuntu requires specifying a custom `--provider=<YOUR_OWN_PROVIDER>` for long-term persistence of old packages.
8 changes: 4 additions & 4 deletions pkg/distro/debian/debian.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ func NewUbuntu() distro.Distro {
Name: NameUbuntu,
DefaultProviders: []string{
// HTTPS is not used by default in the apt-get ecosystem. See also README.md.
"http://ports.ubuntu.com/{{.Name}}", // multi-arch, ephemeral
"http://archive.ubuntu.com/ubuntu/{{.Name}}", // amd64 only, ephemeral
// Ubuntu has no equivalent of debian.notset.fr
"http://old-releases.ubuntu.com/ubuntu/{{.Name}}", // multi-arch, persistent, EOL only
"http://ports.ubuntu.com/{{.Name}}", // multi-arch, ephemeral
"http://launchpad.net/ubuntu/+archive/primary/+files/{{.Basename}}", // multi-arch, persistent
"http://archive.ubuntu.com/ubuntu/{{.Name}}", // amd64 only, ephemeral
"http://old-releases.ubuntu.com/ubuntu/{{.Name}}", // multi-arch, persistent, EOL only
},
},
}
Expand Down

0 comments on commit dc52407

Please sign in to comment.