1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-06 09:45:32 +01:00
Commit Graph

3139 Commits

Author SHA1 Message Date
Omer Tuchfeld
c737dfd4e0 install: Do not clean boot directories on ostree systems
On ostree systems, the boot directory already has our desired format, we
should only remove the bootupd-state.json file to avoid bootupctl
complaining about it already existing.

The motivation is that this will preserve the boot entry for the
original deployment, allowing the user to boot into it if they want to.

This also makes sure `ostree admin status` continues working - since if
we're in a booted ostree system but `ostree` can't find its physically
(through boot entries) it complains.
2025-03-12 18:26:39 +01:00
Colin Walters
bcfe9e5458 Merge pull request #1184 from jeckersb/cncf-coc
README.md: Add reference to CNCF Code of Conduct
2025-03-11 18:27:59 -04:00
John Eckersberg
ca2e179acb README.md: Add reference to CNCF Code of Conduct
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-03-11 10:35:50 -04:00
Colin Walters
14bf78699b Merge pull request #1185 from cgwalters/timestamp-no-nanos
status: Drop nanoseconds from time
2025-03-11 09:57:05 -04:00
Colin Walters
6426b4618e Merge pull request #1189 from gursewak1997/update-maintainers
Maintainers.md: Update and add users
2025-03-11 09:56:53 -04:00
Colin Walters
8e32773d28 Merge pull request #1186 from jmarrero/cncf-footer
docs: add footer with CNCF trademark notice
2025-03-11 09:55:58 -04:00
gursewak1997
68addf14c9 Maintainers.md: Update and add users 2025-03-10 21:44:22 -07:00
Joseph Marrero Corchado
5229fbb1fe docs: add footer with CNCF trademark notice
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
2025-03-10 20:59:28 -04:00
Colin Walters
4fe87b3e84 Merge pull request #1187 from cgwalters/debug-test-manifest-diff
tests: Diff manifests if digest is different
2025-03-10 18:01:46 -04:00
Colin Walters
f35358ebdb tests: Diff manifests if digest is different
To debug https://github.com/containers/bootc/issues/1172

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-10 15:04:37 -04:00
Colin Walters
aae859f98e status: Drop nanoseconds from time
This is just irrelevant noise; nanoseconds never matter for container
builds. Motivated by just making this look visually nicer.

In the future I'd like to look at rendering this how e.g. systemd
does it also including a "; 1 day ago" humantime suffix.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-10 13:38:16 -04:00
Colin Walters
8e2cf08ae0 Merge pull request #1183 from jeckersb/new-docs-site
Update links to new docs site
2025-03-10 09:42:57 -04:00
John Eckersberg
8ac427dade Update links to new docs site
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-03-10 09:40:26 -04:00
Colin Walters
190085d57e Merge pull request #1176 from jeckersb/update-generated
docs: Update generated
2025-03-06 18:08:06 -05:00
John Eckersberg
dbd9e447e5 Merge pull request #1175 from cgwalters/update-verity-required2
ostree-ext: Update parser to honor `composefs=verity`
2025-03-06 17:49:33 -05:00
John Eckersberg
e246a56411 docs: Update generated
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-03-06 17:24:24 -05:00
Colin Walters
06933ed3a2 ostree-ext: Update parser to honor composefs=verity
We have duplicate code to parse this between C and Rust
unfortunately; update the Rust side to honor what landed
in https://github.com/ostreedev/ostree/pull/3354

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-06 17:01:59 -05:00
Valentin Rothberg
b233fe0db2 Merge pull request #1169 from cgwalters/readonly-test
tests: Fix naming of readonly tests
2025-03-06 11:10:11 +01:00
Colin Walters
967a238e2a tests: Fix naming of readonly tests
This ensures the tests actually run...

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-05 17:38:04 -05:00
Colin Walters
60b73be339 Merge pull request #1167 from cgwalters/reallyclean
store: Really remove empty /etc/resolv.conf and /etc/hostname
2025-03-05 17:05:23 -05:00
Colin Walters
98995f662b store: Really remove empty /etc/resolv.conf and /etc/hostname
The previous change here was a no-op for two reasons:

- It's actually usr/etc at this point
- We were operating on the wrong rootfs

Fixes: 57bd0dc983
Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-05 14:52:56 -05:00
Colin Walters
f1ab7754e3 Merge pull request #1164 from ckyrouac/reinstall-cloudinit
reinstall: Pull podman image early
2025-03-04 18:17:34 -05:00
ckyrouac
3e1b0bf370 reinstall: Prompt before installing podman
Since podman needs to be installed at the start of the flow, let's add a
prompt so the user doesn't get surprised by the podman install
automatically running when simply testing the command.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-03-04 14:11:53 -05:00
ckyrouac
54983631df reinstall: Pull podman image early
This splits the `podman pull <image>` and the
`podman ... bootc install to-existing` command to prepare for
future features that will require inspecting the image before
constructing the bootc install command.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-03-04 14:11:53 -05:00
Colin Walters
b26d5ca099 Merge pull request #1162 from cgwalters/release
Release 1.1.6
v1.1.6
2025-03-03 10:37:08 -05:00
Colin Walters
6f1bb750e6 Release 1.1.6
A fair numebr of fixes and smaller features here.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-03 08:27:10 -05:00
Platform Engineering Bot
89c89d61c7 fix(deps): update auto merged updates (#1161)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-03-03 08:19:50 -05:00
Colin Walters
eb585e08c8 Merge pull request #1157 from cgwalters/install-finalize
install: Add a generic `install finalize`
2025-03-01 14:08:17 -05:00
Colin Walters
112e36d759 install: Add a generic install finalize
Basically I want to get Anaconda to run this, then we
can perform arbitrary fixups on whatever it did
between the install and reboot without changing Anaconda's
code.

This also applies to user `%post` scripts for example;
maybe those break the bootloader entries in /boot;
we have the opportunity to catch such things here.

Or we may choose to start forcibly relabeling the target
`/etc`.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-01 13:13:29 -05:00
Colin Walters
5b15d686c2 build: Tweak make validate-rust
This took me some thinking and experimenting. Basically we want:

- Hard deny some warnings (this is covered by the Cargo.toml
  workspace.lints.rust)
- Gate merging to main in CI on an exact set of warnings we
  want to forbid, but *without* also using a blanket
  -Dwarning deny policy because that could break our build
  when the compiler revs.
- A corollary to the previous: allow developing locally
  without killing the build just because
  you have an unused import or some dead code (for example).
  So we don't want to add `dead_code = deny` into the Cargo.toml.
- Be able to easily reproduce locally what CI is gating on
  in an efficient way.

We already had `make validate-rust` which was intending to navigate
this, but what was missing was the "deny extended set of warnings"
so we got code committed to git main which hit `unused_imports`.

Clippy upstream docs recommend the `RUSTFLAGS = -Dwarnings`
approach in e.g.
https://doc.rust-lang.org/clippy/continuous_integration/github_actions.html
but again I think this is a problem because it can break with
updated Rust/clippy versions (unless you pin on those, but that
becomes a pain in and of itself).

The problem also with doing `RUSTFLAGS = -Dwarnings` *locally*
is it blows out the cargo cache.

So here's the solution I came to: We run `cargo clippy -A clippy:all`,
and then deny some specific clippy lints *and* the core Rust
warnings we want (`unused_imports` type things) at this stage.
The advantage is this doesn't blow out the main Cargo cache,
and I can easily reproduce locally exactly what CI would gate on.

Also while we're here, add `make fix-rust` which is a handy
way to use the existing `clippy --fix` to locally fix things
like unused imports as well as other machine-applicable
things that are in e.g. `clippy::suspicious`.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-03-01 13:04:03 -05:00
Chris Kyrouac
859bf9e1e0 Merge pull request #1153 from ckyrouac/reinstall-followup
Reinstall ssh followup cleanup
2025-02-27 15:27:00 -05:00
Colin Walters
d95767886b Merge pull request #1151 from cgwalters/tmpfiles-gen
tmpfiles: Support multiple generations
2025-02-27 14:37:20 -05:00
ckyrouac
8a5f5e24a1 reinstall: Use indoc to format prompts
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-27 14:21:53 -05:00
ckyrouac
d1b3ea1a22 reinstall: Use workspace=true for tempfile dep
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-27 14:09:22 -05:00
ckyrouac
0dd32de0f3 reinstall: Remove options from ssh keys
These options could contain a command which will cause the new bootc
system to be inaccessible.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-27 13:12:57 -05:00
ckyrouac
865cc8468a reinstall: Use openssh-keys crate to parse authorized_keys
This provides stricter parsing (e.g. fails when the authorized_keys file
contains invalid content), and is groundwork for removing the command
field from keys.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-27 13:12:43 -05:00
Colin Walters
53c167146e tmpfiles: Support multiple generations
Way back in rpm-ostree's original code here, it always assumed
that it owned The Build.

But in a container-native flow we may have a chain of builds
across an organization and want to generate tmpfiles.d entries
multiple times.

When we do this, we can't just blow away the existing `/usr/lib/tmpfiles.d/bootc-generated.conf`.

Teach the tmpfiles code to have "generations" - we pick a new
file name like `bootc-generated-0.conf`, `bootc-generated-1.conf`
etc.

Also, change the generation code to return a struct with more
info about what it did, which will be used in the linting code.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-27 12:43:24 -05:00
Colin Walters
55303aef06 Merge pull request #1146 from ckyrouac/reinstall-ssh
Smarter ssh authorized key search for system-reinstall-bootc
2025-02-27 11:50:26 -05:00
ckyrouac
870da95782 reinstall: Enable ssh keys for all users
Prior to this, the prompt to select users other that root would result
in an error. Now, all ssh keys will be gathered into a single file
and passed to bootc install to-existing-root --root-ssh-authorized-keys.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-27 10:54:18 -05:00
John Eckersberg
73de2a8ef0 Merge pull request #1147 from cgwalters/lint-ctor
lints: Add a set_root_type helper
2025-02-26 17:47:03 -05:00
Colin Walters
ffaf108257 Merge pull request #1145 from cgwalters/filesystem-tweaks
storage: Drop duplicate SELinux section
2025-02-26 17:12:36 -05:00
Colin Walters
4559d05461 lints: Add a set_root_type helper
We have two patterns to initialize a lint:

- Bare struct init
- A helper function

This changes to just one path: A helper function, plus setters
for the optional fields.

Prep for adding a new lint option, which would otherwise
require changes to everything using the bare struct init.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-26 16:50:38 -05:00
ckyrouac
3f5a43b40d reinstall: Parse sshd config into struct
This is prep for running authorizedkeyscommand to collect the user's
authorized keys.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-26 14:46:23 -05:00
Colin Walters
8f60e20195 storage: Drop duplicate SELinux section
The info in this one was outdated and wrong (we now support labeling
dynamically).

Signed-off-by: Colin Walters <walters@verbum.org>
2025-02-26 09:58:25 -05:00
Colin Walters
22c743fef7 Merge pull request #1142 from ckyrouac/trace-env-fix
tracing: Fix RUST_LOG parsing
2025-02-25 11:17:17 -05:00
ckyrouac
d3959e5532 tracing: Fix RUST_LOG parsing
This used to work and I'm not exactly sure what changed. For some reason
`with_env_filter` needs to be at the end of the chain for the RUST_LOG
env var parsing to work.

Signed-off-by: ckyrouac <ckyrouac@redhat.com>
2025-02-25 10:22:09 -05:00
Platform Engineering Bot
b088833e7f fix(deps): update auto merged updates (#1118)
Signed-off-by: Platform Engineering Bot <platform-engineering@redhat.com>
2025-02-25 01:24:02 +00:00
Colin Walters
880c40d45e Merge pull request #1140 from jeckersb/clear_diff_ids
ostree-ext: store: clear diff_ids when exporting to oci
2025-02-24 19:15:00 -05:00
John Eckersberg
72edcb27fa ostree-ext: store: clear diff_ids when exporting to oci
Resolves: #1134

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-02-24 18:19:58 -05:00
Colin Walters
9b01127743 Merge pull request #1133 from ckyrouac/reinstall-old-versions2
reinstall: Support legacy images in system-reinstall-bootc
2025-02-24 15:05:22 -05:00