1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 15:45:53 +01:00

53 Commits

Author SHA1 Message Date
John Eckersberg
3c8a681537 xtask: post-process manpages to fix broken apostrophes
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-06-27 17:35:36 -04:00
Colin Walters
58fa21e54f build-sys: Rework vendoring for source archive
In preparation for vendoring composefs-rs from git.
Basically before, things work fine when we're just vendoring
from crates.io, but fall over when we add a git dependency.
The Fedora `cargo_prep` macro writes a hardcoded `.cargo/config.toml`
which only has a replacement for `crates.io`, but we need
the generated replacement for git too which is output by
`cargo vendor-filterer` - which previously we were
discarding.

This was surprisingly difficult!

- Capture the output of `vendor-filterer`
- Work around a bug where it puts a broken `directory` path in
  the generated TOML
- Insert that as a new `vendor-config.toml` in our source
- Do use `cargo_prep` to init the RPM config in the spec,
  but re-inject our vendor config appended to that one.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-03 09:10:37 -05:00
Colin Walters
63d1199e44 progress: Emit a Start message with API version, drop from fields
And use a semantic version for the API version as this allows
a clearer evolution.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-01-08 15:23:04 -05:00
Antheas Kapenekakis
c2a7d606e2 docs: Describe --progress-fd, add rendered JSON schema
Signed-off-by: Antheas Kapenekakis <git@antheas.dev>
Signed-off-by: Colin Walters <walters@verbum.org>
2025-01-08 13:24:49 -05:00
Xiaofeng Wang
3aada94752 test: Remove tmt bootc plugin code and use released bootc plugin
Remove tests-intetration folder because TMT bootc plugin replaces
tests-integration

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-12-07 14:33:13 +08:00
Colin Walters
3b61d2cadc Drop copy of tmt bootc plugin
It's now merged and shipped, and us having a copy breaks things.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-12-05 13:56:36 -05:00
Chris Kyrouac
66b5aaafdb tmt: Add TMT_TEST env variable to specify single test to run
e.g. `TMT_TEST=test-21-logically-bound-switch make test-tmt`
will run all the tmt setup code then run test-21-logically-bound-switch.
This is useful when developing a test.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-11-08 15:35:20 -05:00
Chris Kyrouac
e04955c5c1 lbi: Switch to unauthenticated ubi9 for lbi test
This way we don't need to add any credentials to github.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-10-16 16:15:15 -04:00
Chris Kyrouac
bd8a9263ec lbi: Add --remove-signatures to install time lbi copy
We are unable to copy a signed image from c/storage -> c/storage while
preserving the signature. See
https://github.com/containers/image/issues/2599

fixes #812

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-10-15 09:40:21 -04:00
Colin Walters
a821bc1021 Merge pull request #792 from ckyrouac/lbi-install-tmt
tests: Add tmt test for bootc install with LBI
2024-09-19 16:10:45 -04:00
Chris Kyrouac
0f09ae234e tests: Add tmt test for bootc install with LBI
Along with the test, this will install the LBIs on the machine running
the tests prior to running the tests. Also refactors the existing LBI
test into a separate test plan to make room for the install tests.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-09-18 15:37:37 -04:00
Colin Walters
97692bd1c2 Make lints stricter, apply crate wide
Add `dead_code = "deny"` to our default lints; we had
a compiler warning for this in main.

Fix the warning by moving the human readable test code into
`#[cfg(test)]`.

While we're here, move the other lib.rs lints into the crate;
enforcing docs for *everything* at first I thought might be heavy
handed but actually is fine as it only applies to things that
are `pub`, of which we don't actually have that much so it
mainly forced me to add some stub docs for the modules, which
is probably a good idea.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-09-18 13:10:49 -04:00
Chris Kyrouac
355810f461 tmt: Remove cached testcloud image before each test
This is required for the bootc install tests that use a custom image.
Otherwise, the cached image will be used instead of the image built from
the bootc provision plugin.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-09-18 07:45:48 -04:00
Chris Kyrouac
26e73f8e6b tmt: Add TMT_VERBOSE env var
1 -> enabled. This adds -vvvvv to the tmt run invocation when using
`make test-tmt` to stream detailed test run output.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-09-17 13:09:16 -04:00
Chris Kyrouac
0b78490933 tmt: Add TMT_PLUGINS env to tmt run invocation
This is temporary while waiting for tmt to release the bootc provision
plugin.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-09-17 13:07:32 -04:00
Colin Walters
5b5b5721e9 Stabilize the current schema
There's...a variety of warts in the current API schema.
In particular I really dislike `.image.image.image`.

But...but...changing it now would in practice be somewhat
difficult, and it's hard to say that just *that* tweak
would be really useful.

Let's just stabilize the existing spec as `v1` and commit
to maintaining it.

We've already added notes to ask callers to use `--format-version 1`
to specify what they want so we can compatibly add new things
in the future.

Speaking of, this also makes `--format-version=1` be the
same thing as `--format-version=0` so that all the versions
are just "1".

Closes: https://github.com/containers/bootc/issues/518

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-31 14:21:43 -04:00
Colin Walters
20d5146e1e tests: Split up tmt tests into separate plans
Because tmt right now doesn't support isolation automatically,
and many of the tests we'll want to write mutate the system,
we'll need to copy-paste the base plan.

This changes the `make test-tmt` to have its own little
tmt wrapper that dynamically scans the plans/ and sorts
them by a priority, then runs them one by one currently.

Closes: https://github.com/containers/bootc/issues/735

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-26 10:43:39 -04:00
Colin Walters
48b40297d6 tests: Run tmt report on failure
It's annoying to have to go dig through the logs when something
fails. We do have the tmt logs in CI, but again, more clicks.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-26 10:08:10 -04:00
Colin Walters
c29b364529 Add JSON schema and guidance on API usage to docs
- Add a hidden command to generate JSON schema
- Wire it up to the new `make update-generated`
- Describe how to use it in the docs

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-17 16:14:54 -04:00
John Eckersberg
5366cfc28e Merge pull request #701 from cgwalters/minor-local-buildstuff2
build-sys: Generalize manpage bits to `make update-generated`
2024-07-17 14:31:55 -04:00
Colin Walters
63bcf63868 build: Use workspace global lints
In relatively recent rust there's a nice way to globally
configure clippy lints for the whole workspace. We can
kill the `custom-lints` target because relatively
recently clippy has a lint for `todo!` and `dbg!` itself.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-17 13:48:12 -04:00
Colin Walters
9b9583327b build-sys: Generalize manpage bits to make update-generated
I plan to add more generated-from-source files, so generalize
the target which is currently specialized to manpages.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-17 13:45:10 -04:00
Colin Walters
c67b9acb2f build-sys: Switch to workspace dependencies
Prep for addding another crate, where I want to avoid
duplicating all the versions again.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-16 13:41:03 -04:00
Xiaofeng Wang
8d51287de4 test: add cargo xtask spec to configure bootc.spec
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-07-03 22:19:41 +08:00
Colin Walters
34a8133d9f tree-wide: Convert to let-else syntax
Convert to [let else](https://doc.rust-lang.org/rust-by-example/flow_control/let_else.html)
where possible. I've been coding Rust long before it was stable,
and my muscle memory has the expanded form.

But the short form is nicer.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-28 12:56:34 -04:00
Colin Walters
cc42685ea8 tests: Prune testcloud cache on each run
Because it's not a cache, it's a copy (there's no cache invalidation,
GC, etc.)

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-24 13:08:16 -04:00
Xiaofeng Wang
a5630ca79d tmt: rename plan files: build.fmf to integration-build.fmf,
integration.fmf to integration-run.fmf

And rename tmt test from build-tmt.fmf to build-image.fmf

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-06-24 22:33:11 +08:00
Colin Walters
36be46a9e3 tests-integration: Add basic local tmt flow
Part of https://github.com/containers/bootc/issues/543

I'm not totally happy with this, but it does demonstrate the basic
wiring flow of:

- `cargo xtask test-tmt`

That will do a container build, make a disk image from it,
and run a "hello world" tmt test.

A lot more to do here including wiring up our existing tests
into this, and deduplicating with the other integration tests.

A key aspect too will be exploring workflows that e.g. expose
a registry locally.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-06-17 10:37:18 -04:00
John Eckersberg
2a77ecf691 Fix deprecation warning with rust 1.79.0
New stable gives warning:

`default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-06-13 10:55:20 -04:00
Platform Engineering Bot
031c5f1272 fix(deps): update all patch dependencies
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2024-05-01 17:08:14 +02:00
Platform Engineering Bot
95eea00ba8 fix(deps): update rust crate chrono to 0.4.38
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-04-15 09:10:10 -04:00
platform-engineering-bot
21c2a01861 fix(deps): update all patch dependencies
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-04-11 09:11:58 -04:00
Colin Walters
d2ddaacf35 docs: Various updates and fixes
I went through the docs and cleaned some things up, fixed
some missing content, etc.

Also a patch to `xtask` to make it so that `cargo xtask manpages`
works even when $PWD is in `docs`.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-29 14:33:22 -04:00
Colin Walters
bcffa37408 xtask/docs: Fix man2markdown to write to new docs location
Missed this when doing the mdbook conversion.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-03-17 20:20:05 -04:00
null
27bfc85cf1 fix(deps): update all patch dependencies
Signed-off-by: null <platform-engineering@redhat.com>
2024-03-12 23:16:30 +00:00
John Eckersberg
1ea5df7df9 Cleanup clippy lints
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-03-12 09:46:22 -04:00
null
c0bbe47b14 fix(deps): update rust crate chrono to 0.4.35
Signed-off-by: null <platform-engineering@redhat.com>
2024-03-06 14:15:30 +00:00
Colin Walters
b1d9cd6540 docs: Switch to mdbook, rework
- I don't want my life to involve ruby, and in particular `mdbook serve`
  Just Works out of the box with a single binary
- Reorganize the sections
- Some content cleanup and fixes
- Integrate the man pages into the docs (hooray!)

Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-29 21:43:26 -05:00
null
32015a3d1c fix(deps): update all patch dependencies
Signed-off-by: null <platform-engineering@redhat.com>
2024-02-19 06:19:28 +00:00
Colin Walters
169dc549a4 xtask: Fixes for cargo xtask package
The release process has drifted with xtask; I forget exactly
why but I ended up with `.zstd`, not `.zst` in the tarballs
and I've been hand-hacking that manually.

Fix things up so that `cargo xtask package` generates the source
snapshot and the vendor tarball named exactly how we release
them now.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-15 10:58:42 -05:00
renovate[bot]
a04fc3e505 fix(deps): update all patch dependencies
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-11 20:09:40 +00:00
Colin Walters
ffa527b440 xtask: Use mandown, not pandoc
I forgot that this direction of things is used when
we're making a default tarball, and we didn't
currently depend on pandoc there.  Let's use this
`mandown` crate instead which definitely does the
trick.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-01-17 19:48:16 -05:00
Colin Walters
afb34bdcf5 Fix manpage for service
We need `-s` for the pandoc invocation to render this right.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-01-17 19:48:16 -05:00
Colin Walters
c13c9eb8dc systemd: New bootc-fetch-apply-updates.{timer,service}
Let's ship a baseline systemd unit that can be enabled
for automatic updates.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-01-15 15:08:54 -05:00
Colin Walters
69bbf510de xtask: Fix man2markdown to use new location
We moved these in an earlier commit.

Signed-off-by: Colin Walters <walters@verbum.org>
2023-12-19 16:41:52 -05:00
Colin Walters
6d992aaf16 docs: Generate docs/man
This will help motivate us to improve our man pages, by making
them much more visible as pre-generated markdown that can
be conveniently viewed from e.g. the Github web UI.

For now, anytime we change the CLI we'll need to manually
run `cargo xtask man2markdown`, and commit and push the result.
This requires `pandoc` in the environment.

If this becomes burdensome I will likely investigate doing
e.g. a Github action which either automates doing it post-commit,
or enforces that it's done as part of the commit which introduces
the change.  However the problem with the latter will be the
`pandoc` requirement.

It may make sense to investigate e.g.
[clap-markdown](https://docs.rs/clap-markdown/latest/clap_markdown/)
in the future instead.

Signed-off-by: Colin Walters <walters@verbum.org>
2023-12-18 14:57:25 -05:00
Colin Walters
01c26df6b0 xtask: Fix srpm generation
Fixing the tagged generation broke the untagged case.

Signed-off-by: Colin Walters <walters@verbum.org>
2023-10-23 13:52:22 -04:00
Colin Walters
7d621270c9 Rework build infra, add manpages into tarball
- Inject pre-generated manpages into the source tarball we make
- Ensure we use the git tag for version if there is one

Immediate motivation is making sure man pages end up in e.g.
RPM builds.

Signed-off-by: Colin Walters <walters@verbum.org>
2023-10-12 15:55:36 -04:00
Colin Walters
84bc608c25 xtask: Fix package builds
No idea how it worked before; we don't want to include the diff
output which can lead to us failing to parse an integer:

```
error: Packaging

Caused by:
    0: Finding git timestamp
    1: invalid digit found in string
```

Signed-off-by: Colin Walters <walters@verbum.org>
2023-02-26 13:50:12 -05:00
Colin Walters
0c8c6834f0 xtask: Inject timestamp into version
I was hitting an issue with our COPR builds where we were getting
*earlier* builds because the git hash was the first component
of the version, and the leading numbers there don't increment,
and RPM wants higher versions.

Force newer-is-better by injecting the date (up to the minute, not
second because we're not going to build more than one a second).

Signed-off-by: Colin Walters <walters@verbum.org>
2023-02-04 13:50:19 -05:00