Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions: debootstrap: Add parent-suite property to indicate which suite a downstream is based on #424

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ jobs:
test: { name: "apertis", case: "apertis" }
- backend: kvm
test: { name: "kali", case: "kali" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does kali not build without this? Fwiw i'm wary about adding rolling releases as they might break CI too easily

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Sjoerd,

Does kali not build without this

Nope, it doesn't, since it's based on Debian testing. I tried with latest debos from the Docker Hub, just to be sure:

$ cat recipe-kali.yaml 
architecture: amd64
actions:
  - action: debootstrap
    mirror: http://kali.download/kali/
    suite: kali-rolling
    components: [ main ]
    keyring-file: kali-archive-keyring.gpg
    keyring-package: kali-archive-keyring
  - action: apt
    packages: [ procps ]

$ podman run --rm -it --device /dev/kvm --workdir /recipes \
  --mount "type=bind,source=$(pwd),destination=/recipes" \
  --security-opt label=disable \
  godebos/debos:main-20240113 recipe-kali.yaml

Running /debos --artifactdir /recipes /recipes/recipe-kali.yaml using kvm backend
2024/01/15 04:49:58 ==== debootstrap ====
2024/01/15 04:49:58 excluding usr-is-merged as package is not in suite
2024/01/15 04:49:58 Debootstrap | I: Retrieving InRelease 
[...]
2024/01/15 04:51:41 Debootstrap | I: Base system installed successfully.
2024/01/15 04:51:42 ==== apt ====
2024/01/15 04:51:42 apt | Hit:1 http://kali.download/kali kali-rolling InRelease
2024/01/15 04:51:43 apt | Reading package lists...
2024/01/15 04:51:43 apt | Reading package lists...
2024/01/15 04:51:43 apt | Building dependency tree...
2024/01/15 04:51:43 apt | procps is already the newest version (2:4.0.4-2+b1).
2024/01/15 04:51:43 apt | You might want to run 'apt --fix-broken install' to correct these.
2024/01/15 04:51:43 apt | The following packages have unmet dependencies:
2024/01/15 04:51:43 apt |  init-system-helpers : Depends: usrmerge but it is not going to be installed or
2024/01/15 04:51:43 apt |                                 usr-is-merged
2024/01/15 04:51:43 apt | E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
2024/01/15 04:51:43 Action `apt` failed at stage Run, error: exit status 100

I suppose all derivatives based on Debian testing/sid are affected.

Note that we can (and we do) workaround by adding this just after the debootstrap step:

  - description: "Install usr-is-merged (cf. debos #361 and #362)"
    action: apt
    packages: [ usr-is-merged ]

So it's not a dealbreaker, we can live without the MR. But it's nicer when we don't have to use cryptic workarounds.

i'm wary about adding rolling releases as they might break CI too easily

Debootstrapping Kali rolling is just like debootstrapping Debian testing, only two packages in the set are forked, the rest is just Debian testing. Usually kali-dev (more or less equivalent to Debian sid) breaks every now and then, but we have solid QA that keeps kali-rolling working.

You might want to use the mirror kali.download instead of http.kali.org, so you'll hit Cloudflare CDN rather than our redirector, for maximum reliability.

Thanks

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to keep the Kali test in - with the mirror change @elboulangero mentions above.

@sjoerdsimons are you happy with that ?

- backend: kvm
test: { name: "apertis v2022", case: "apertis", variables: "-t suite:v2022" }
obbardc marked this conversation as resolved.
Show resolved Hide resolved
- backend: kvm
test: { name: "apertis v2024dev3", case: "apertis", variables: "-t suite:v2024dev3 -t parent_suite:bookworm" }
obbardc marked this conversation as resolved.
Show resolved Hide resolved
name: ${{matrix.test.name}} on ${{matrix.backend}}
runs-on: ${{ matrix.backend == 'kvm' && 'kvm' || 'ubuntu-latest' }}
steps:
Expand Down
11 changes: 8 additions & 3 deletions tests/apertis/test.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
---
# Test building a non-debian distribution such as apertis to ensure
# bootstrapping suites that debootstrap won't internally know about works
{{- $architecture := or .architecture "amd64"}}
architecture: {{$architecture}}

{{- $architecture := or .architecture "amd64" }}
{{- $suite := or .suite "v2022" }}
{{- $parent_suite := or .parent_suite "" }}

architecture: {{ $architecture }}

actions:
- action: debootstrap
suite: v2022
suite: {{ $suite }}
parent-suite: {{ $parent_suite }}
components:
- target
mirror: https://repositories.apertis.org/apertis/
Expand Down