Literally just find and replace github.com/containers/bootc with
github.com/bootc-dev/bootc
We have the redirect in place so none of this is really important, but
I figure removing as many instances of the old repo and replacing them
with the current can't hurt for things like search engine
optimization. Plus some non-zero number of people might assume one is
a fork of the other or something.
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
When set, the bootc-destructive-cleanup flag is added to /sysroot/etc
which enables the bootc-destructive-cleanup systemd service to remove
the previous installation's rpm packages and podman containers/images.
The service is only installed on fedora based systems.
Signed-off-by: ckyrouac <ckyrouac@redhat.com>
Previously this was just running a "normal" `cargo build` a second
time, and overwriting the rhsm feature flags in the main bootc binary
Resolves: BIFROST-658
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
Fixes #1104
Make the podman dependency of system-reinstall-bootc optional
* Change the spec file to recommend podman instead of requiring it (this
will make it more palatable to have this package included in distros
by default)
* Now that podman is only recommended, the system-reinstall-bootc binary
must check whether podman is installed and try to install it. This is
done by launching the install-podman script that is included with the
system-reinstall-bootc RPM. The exact location where
system-reinstall-bootc will look for this script is defined in the
build environment variable `SYSTEM_REINSTALL_BOOTC_INSTALL_PODMAN_PATH`
Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
The subpackage name was left to be bootc-reinstall even though we
decided on a name change.
This commit changes the package name to match the binary name which is `system-reinstall-bootc`
# Implementation
By default .spec files will prepend the main package name to the
subpackage name, the `-n` flag of the `%package` directive prevents that
(this is also needed in the %files and %description directives)
Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
Modified the bootc.spec file to generate a new subpackage which includes
the new system-reinstall-bootc binary.
# Try
Try out instructions:
```bash
# Make srpm
cargo xtask package-srpm
# Mock group
sudo usermod -a -G mock $(whoami)
newgrp mock
# Build RPM for RHEL
mock --rebuild -r rhel+epel-9-x86_64 --rebuild target/bootc-*.src.rpm
```
Then install the RPM (`/var/lib/mock/rhel+epel-9-x86_64/result/bootc-reinstall-2*.el9.x86_64.rpm`) on [a rhel9 gcp vm](https://console.cloud.google.com/compute/instanceTemplates/details/rhel9-dev-1?project=bifrost-devel&authuser=1&inv=1&invt=Abn-jg) instance template
Signed-off-by: Omer Tuchfeld <omer@tuchfeld.dev>
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>
The Go macros for Fedora, RHEL 10, and ELN (the future RHEL 11) are all in
sync; only RHEL 9 and earlier need the old syntax.
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This directory will contain expected files in the base image.
That said, I may change the container import path to auto-create
at least the sysroot dir and symlink at some point and these
can just be dropped.
And for that matter after
9a0acd7249
"libostree/deploy: enable composefs by default"
we can likely just drop the prepare-root bit too.
But for now this is needed.
Motivated by improving base image generation from
https://gitlab.com/fedora/bootc/tracker/-/issues/32
Signed-off-by: Colin Walters <walters@verbum.org>
This is a giant and hacky workaround for
https://github.com/ostreedev/ostree/issues/3193
The better real fix is probably in either systemd or anaconda
(more realistically both) but let's paper over things here for now.
Having code to run as a generator will likely be useful in the
future anyways.
Signed-off-by: Colin Walters <walters@verbum.org>
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>
I decided to just do a release anyways, so we don't need to track
git.
This (effectively) reverts commit 79295cedaf.
Signed-off-by: Colin Walters <walters@verbum.org>
- 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>
First, this adds `cargo xtask` following
https://github.com/matklad/cargo-xtask/
We use this to write "external glue scripts" in Rust, not bash.
Specifically we now have e.g. `cargo xtask vendor` which just
wraps running `cargo vendor-filterer`.
Then build on that and add `cargo xtask package-srpm` which generates
a `.src.rpm`.
And build on that by adding the requisite glue to have Fedora's COPR
be able to understand it, so that we can get auto-built and shipped
packages there.
This will make trying out bootc a bit easier.
Signed-off-by: Colin Walters <walters@verbum.org>