# Adapted from upstream contrib/packaging/bootc.spec # https://github.com/containers/bootc %global debug_package %{nil} Name: bootc Version: 1.16.3 Release: 1.1%{?dist} Summary: Bootable container system License: Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT) URL: https://github.com/containers/bootc Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.zstd Source1: %{url}/releases/download/v%{version}/%{name}-%{version}-vendor.tar.zstd ExclusiveArch: x86_64 aarch64 BuildRequires: cargo >= 1.85 BuildRequires: rust >= 1.85 BuildRequires: make BuildRequires: ostree-devel BuildRequires: openssl-devel BuildRequires: libzstd-devel BuildRequires: zstd BuildRequires: golang-github-cpuguy83-md2man BuildRequires: systemd-rpm-macros %{?systemd_requires} # Backing storage tooling Requires: composefs Requires: ostree Requires: skopeo Requires: podman Requires: util-linux-core # For bootloader updates Recommends: bootupd # Provide ostree container functionality Provides: ostree-cli(ostree-container) %description bootc is a tool for using container images to update a Linux system. It transports and manages base operating system updates using OCI/Docker container images as a delivery format. %package -n system-reinstall-bootc Summary: Utility to reinstall the current system using bootc Recommends: podman %description -n system-reinstall-bootc This package provides a utility to simplify reinstalling the current system to a given bootc image. %prep %autosetup -n %{name}-%{version} -p1 # Unpack vendored dependencies zstd -d %{SOURCE1} --stdout | tar xf - # Setup vendor config for cargo cp .cargo/vendor-config.toml . cat > .cargo/config.toml << 'EOF' [alias] xtask = "run --package xtask --" EOF cat vendor-config.toml >> .cargo/config.toml rm vendor-config.toml %build # Build manpages first (uses xtask from cargo) cargo run --release --package xtask -- manpages # Build all binaries cargo build --release --frozen --bins # Build completions mkdir -p target/completion for shell in bash fish zsh; do target/release/bootc completion $shell > target/completion/bootc.$shell done %install %make_install INSTALL="install -p -c" CARGO_FEATURES="" # Install ostree hooks make install-ostree-hooks DESTDIR=%{?buildroot} # Install install-podman script for system-reinstall-bootc mkdir -p %{buildroot}%{_prefix}/lib/system-reinstall-bootc cat > %{buildroot}%{_prefix}/lib/system-reinstall-bootc/install-podman << 'EOF' #!/bin/bash exec dnf -y install podman EOF chmod +x %{buildroot}%{_prefix}/lib/system-reinstall-bootc/install-podman # Remove unsupported shell completions rm -f %{buildroot}%{_datadir}/elvish/lib/bootc.elv rm -f %{buildroot}%{_datadir}/powershell/Modules/Bootc/Bootc.psm1 %check target/release/bootc --version target/release/bootc --help target/release/system-reinstall-bootc --help %files %license LICENSE-MIT LICENSE-APACHE %doc README.md %{_bindir}/bootc %{_prefix}/lib/bootc/ %{_prefix}/lib/systemd/system-generators/* %{_prefix}/lib/dracut/modules.d/51bootc/ %{_prefix}/libexec/libostree/ext/* %{_unitdir}/* %{_mandir}/man*/*bootc* %{_datadir}/bash-completion/completions/bootc %{_datadir}/zsh/site-functions/_bootc %{_datadir}/fish/vendor_completions.d/bootc.fish %doc %{_docdir}/bootc/baseimage/ %files -n system-reinstall-bootc %{_bindir}/system-reinstall-bootc %{_prefix}/lib/system-reinstall-bootc/ %changelog * Fri Jul 11 2025 Yonghang Wang - 1.16.3-1.1 - Build for al-stream-2023 COPR - Adapted from upstream contrib/packaging/bootc.spec - Build with vendored deps without cargo-rpm-macros