# Copr SCM: method "make srpm" (.copr/Makefile), spec packaging/corium.spec, # committish main. Source0 is this repo. Source1 is produced by cargo vendor # when the SRPM is built. # # Generated by rust2rpm 28, then hand-tuned for this unpublished application: # - package name corium (not rust-corium); library sources are not installed # - %%cargo_prep -v vendor is the only crates.io vendored-sources redirect # - git crate sources come from cargo vendor's stdout, shipped in Source1 # - EPEL and CentOS Stream take the cargo macros from rust-toolset # - %%check is off: the non-PID-1 test refuses root, and VM tests need QEMU %bcond_with check # prevent library files from being installed %global cargo_install_lib 0 %global crate corium Name: corium Version: 0.2.0 Release: 1%{?dist} Summary: Minimal initramfs init: mount a read-only Carapace root and execute /sbin/init # Effective license of the linked binary (this crate plus bundled runtime # crates). From cargo tree --edges no-build,no-dev,no-proc-macro. License: Apache-2.0 AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND (MIT OR Apache-2.0) URL: https://github.com/pichi-vm/corium Source0: %{crate}-%{version}.tar.gz Source1: %{crate}-%{version}-vendor.tar.xz # Fedora ships %%cargo_prep / %%cargo_build / %%cargo_install in cargo-rpm-macros. # rust-toolset on RHEL and CentOS Stream provides those same macros and # conflicts with cargo-rpm-macros, which is not in the CentOS Stream repos. %if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: cargo-rpm-macros >= 26 %endif %global _description %{expand: Minimal initramfs init: mount a read-only Carapace root and execute /sbin/init.} %description %{_description} %files %license LICENSE %license LICENSE.dependencies %license cargo-vendor.txt %doc CONTRIBUTING.md %doc README.md %{_bindir}/%{crate} %prep %autosetup -n %{crate}-%{version} -p1 -a1 %cargo_prep -v vendor # Source1 carries cargo vendor's stdout. Drop the crates.io and # vendored-sources tables %%cargo_prep already wrote; keep git sources. printf '\n' >> .cargo/config.toml awk ' /^\[source\.crates-io\]/ { skip = 1; next } /^\[source\.vendored-sources\]/ { skip = 1; next } /^\[/ { skip = 0 } skip { next } { print } ' cargo-vendor-config.toml >> .cargo/config.toml printf '\n[net]\noffline = true\n' >> .cargo/config.toml %build # Use -- to pass Cargo flags through the RPM macros. export CARGO_NET_OFFLINE=true %cargo_build -- --locked %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %{cargo_vendor_manifest} %install export CARGO_NET_OFFLINE=true %cargo_install -- --locked %if %{with check} %check export CARGO_NET_OFFLINE=true %cargo_test -- --locked %endif %changelog * Tue Oct 27 2026 Nathaniel McCallum - 0.2.0-1 - Add Copr packaging with vendored crates