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

26 Commits

Author SHA1 Message Date
Colin Walters
b86be3df18 packaging/rpm: Be sure we pull in chcon (and util-linux)
We execute it, and Anaconda was somehow omitting this.

Also pull in util-linux-core because we also depend on that.

https://github.com/bootc-dev/bootc/discussions/1383#discussioncomment-13585806
Signed-off-by: Colin Walters <walters@verbum.org>
2025-06-30 13:42:02 -04:00
Colin Walters
7658653aee build-sys: Add a link to rpm-ostree issue
Just to meke it easier to find.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-06-12 06:50:48 +02:00
Etienne Champetier
256361956e specfile: exclude doc directories from package
When we don't install the documentation, rpm still install
empty directories, leading to lint failures.
2025-06-04 09:53:53 -04:00
John Eckersberg
ca7b38f699 Rewrite containers org links to bootc-dev org
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>
2025-05-22 09:07:36 -04:00
ckyrouac
85b2419f09 install: Add cleanup option to install to-existing-root
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>
2025-05-01 18:28:27 -04:00
John Eckersberg
19604b43fc specfile: fix system-reinstall-bootc cargo build invocation
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>
2025-02-18 18:34:28 -05:00
John Eckersberg
01ce67cf66 specfile: bump version to 1.1.5
TODO: fix packit config to figure this out automatically from git tags

Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2025-02-18 16:38:26 -05:00
Omer Tuchfeld
d707b57119 reinstall: Ensure podman is installed
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>
2025-02-12 13:50:55 +01:00
Omer Tuchfeld
cec66bfe25 spec: rename the bootc-reinstall subpackage
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>
2025-02-07 11:12:15 +01:00
Omer Tuchfeld
e589fe15d7 cli: add RPM package for system-reinstall-bootc
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>
2025-02-06 01:50:08 +01: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
Yaakov Selkowitz
a115560dcd spec: fix build with rhsm
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>
2025-01-16 12:23:02 -05:00
Joseph Marrero Corchado
211598a017 contrib/packaging/bootc.spec: sync with current Fedora rawhide
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
2025-01-14 17:08:46 -05:00
Colin Walters
1ba69d1a2e install: Add /usr/share/doc/bootc/baseimage
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>
2024-12-20 11:13:40 -05:00
Chris Kyrouac
9fa341eb27 boundimages: Switch from bootc-experimental to bootc
This is a stable enough feature to be included in the
primary bootc directory.

Signed-off-by: Chris Kyrouac <ckyrouac@redhat.com>
2024-07-22 11:08:40 -04:00
Colin Walters
fdf660f48f spec: Add the new bootc-experimental dir
Sadly RPM requires that we explicitly enumerate all the files
we ship.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-07-18 11:05:58 -04:00
John Eckersberg
df9c842bd2 contrib: Add libzstd-devel to specfile
Signed-off-by: John Eckersberg <jeckersb@redhat.com>
2024-06-05 13:19:02 -04:00
Colin Walters
d46b072cd2 Add a systemd generator to fixup Anaconda's /etc/fstab
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>
2024-03-22 13:57:27 -04:00
Xiaofeng Wang
3909def9a7 spec: %autorelease can't be resolved by COPR
Fix bootc RPM pakcage name issue like
"bootc-202403011229.g5dde9d8842-%autorelease.x86_64"

Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
2024-03-05 22:47:21 +08: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
Colin Walters
55befb8845 Update to ostree-ext 0.13.2
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>
2024-02-12 17:57:59 -05:00
Colin Walters
79295cedaf Track ostree-ext git
This way we'll get the updated `/var` handling in our -dev
images for ease of testing.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-02-11 14:23:13 -05:00
Colin Walters
c60a6cc0a9 contrib/packaging: Updates for manpages and systemd unit
The COPR build is failing due to this.
While we're here, also switch to autochangelog/autorelease.

Personally I think spec files upstream makes little sense, but
COPR wants it.  Also for the files section,
it is tempting to copy/paste https://src.fedoraproject.org/rpms/rpm-ostree/blob/rawhide/f/rpm-ostree.spec#_191
here too.

Signed-off-by: Colin Walters <walters@verbum.org>
2024-01-18 10:56:49 -05: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
3167d6e2e9 spec: Add /usr/lib/bootc to installed files
Sigh, so annoying that RPM makes one allowlist installed files.

Signed-off-by: Colin Walters <walters@verbum.org>
2023-02-28 14:18:13 -05:00
Colin Walters
b274b315c2 Add cargo xtask and packaging infrastructure
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>
2023-01-19 19:52:55 -05:00