|
1 | 1 | %bcond_without check |
| 2 | +%if 0%{?rhel} >= 10 || 0%{?fedora} > 41 |
| 3 | + %bcond_without ostree_ext |
| 4 | +%else |
| 5 | + %bcond_with ostree_ext |
| 6 | +%endif |
| 7 | + |
| 8 | +%if 0%{?rhel} |
| 9 | + %bcond_without rhsm |
| 10 | +%else |
| 11 | + %bcond_with rhsm |
| 12 | +%endif |
2 | 13 |
|
3 | 14 | Name: bootc |
4 | | -Version: 0.1 |
| 15 | +Version: 1.1.4 |
5 | 16 | Release: 1%{?dist} |
6 | | -Summary: Boot containers |
| 17 | +Summary: Bootable container system |
7 | 18 |
|
8 | | -License: ASL 2.0 |
| 19 | +# Apache-2.0 |
| 20 | +# Apache-2.0 OR BSL-1.0 |
| 21 | +# Apache-2.0 OR MIT |
| 22 | +# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT |
| 23 | +# BSD-3-Clause |
| 24 | +# MIT |
| 25 | +# MIT OR Apache-2.0 |
| 26 | +# Unlicense OR MIT |
| 27 | +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) |
9 | 28 | URL: https://github.com/containers/bootc |
10 | | -Source0: https://github.com/containers/bootc/releases/download/v%{version}/bootc-%{version}.tar.zstd |
11 | | -Source1: https://github.com/containers/bootc/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd |
| 29 | +Source0: %{url}/releases/download/v%{version}/bootc-%{version}.tar.zstd |
| 30 | +Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd |
| 31 | + |
| 32 | +# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval |
| 33 | +ExcludeArch: %{ix86} |
12 | 34 |
|
| 35 | +BuildRequires: libzstd-devel |
13 | 36 | BuildRequires: make |
14 | | -BuildRequires: openssl-devel |
15 | | -BuildRequires: cargo |
16 | | -BuildRequires: systemd |
17 | | -# For autosetup -Sgit |
18 | | -BuildRequires: git |
19 | | -BuildRequires: zlib-devel |
20 | 37 | BuildRequires: ostree-devel |
21 | 38 | BuildRequires: openssl-devel |
22 | | -BuildRequires: systemd-devel |
23 | | -BuildRequires: libzstd-devel |
| 39 | +%if 0%{?rhel} |
| 40 | +BuildRequires: rust-toolset |
| 41 | +%else |
| 42 | +BuildRequires: cargo-rpm-macros >= 25 |
| 43 | +%endif |
| 44 | +BuildRequires: systemd |
| 45 | +# For tests |
| 46 | +BuildRequires: skopeo ostree |
| 47 | + |
| 48 | +# Backing storage tooling https://github.com/containers/composefs/issues/125 |
| 49 | +Requires: composefs |
| 50 | +# For OS updates |
| 51 | +Requires: ostree |
| 52 | +Requires: skopeo |
| 53 | +Requires: podman |
| 54 | +# For bootloader updates |
| 55 | +Recommends: bootupd |
| 56 | + |
| 57 | +# A made up provides so that rpm-ostree can depend on it |
| 58 | +%if %{with ostree_ext} |
| 59 | +Provides: ostree-cli(ostree-container) |
| 60 | +%endif |
24 | 61 |
|
25 | 62 | %description |
26 | 63 | %{summary} |
27 | 64 |
|
| 65 | +%prep |
| 66 | +%autosetup -p1 -a1 |
| 67 | +%cargo_prep -v vendor |
| 68 | + |
| 69 | +%build |
| 70 | +%if 0%{?rhel} == 10 |
| 71 | + %cargo_build %{?with_rhsm:-f rhsm} |
| 72 | +%else |
| 73 | + %cargo_build %{?with_rhsm:--features rhsm} |
| 74 | +%endif |
| 75 | + |
| 76 | +%cargo_vendor_manifest |
| 77 | +%cargo_license_summary |
| 78 | +%{cargo_license} > LICENSE.dependencies |
| 79 | + |
| 80 | +%install |
| 81 | +%make_install INSTALL="install -p -c" |
| 82 | +%if %{with ostree_ext} |
| 83 | +make install-ostree-hooks DESTDIR=%{?buildroot} |
| 84 | +%endif |
| 85 | + |
| 86 | +%if %{with check} |
| 87 | +%check |
| 88 | +%cargo_test |
| 89 | +%endif |
| 90 | + |
28 | 91 | %files |
29 | | -%license LICENSE-APACHE LICENSE-MIT |
| 92 | +%license LICENSE-MIT |
| 93 | +%license LICENSE-APACHE |
| 94 | +%license LICENSE.dependencies |
| 95 | +%license cargo-vendor.txt |
30 | 96 | %doc README.md |
31 | 97 | %{_bindir}/bootc |
| 98 | +%{_prefix}/lib/bootc/ |
32 | 99 | %{_prefix}/lib/systemd/system-generators/* |
33 | | -%{_prefix}/lib/bootc |
| 100 | +%if %{with ostree_ext} |
| 101 | +%{_prefix}/libexec/libostree/ext/* |
| 102 | +%endif |
34 | 103 | %{_unitdir}/* |
35 | 104 | %{_docdir}/bootc/* |
36 | 105 | %{_mandir}/man*/bootc* |
37 | 106 |
|
38 | | -%prep |
39 | | -%autosetup -p1 -Sgit |
40 | | -tar -xv -f %{SOURCE1} |
41 | | -mkdir -p .cargo |
42 | | -cat >>.cargo/config.toml << EOF |
43 | | -[source.crates-io] |
44 | | -replace-with = "vendored-sources" |
45 | | -
|
46 | | -[source.vendored-sources] |
47 | | -directory = "vendor" |
48 | | -EOF |
49 | | - |
50 | | -%build |
51 | | -make |
52 | | - |
53 | | -%install |
54 | | -%make_install INSTALL="install -p -c" |
55 | | - |
56 | 107 | %changelog |
57 | 108 | %autochangelog |
0 commit comments