|
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 | +%cargo_build %{?with_rhsm:--features rhsm} |
| 71 | +%cargo_vendor_manifest |
| 72 | +%cargo_license_summary |
| 73 | +%{cargo_license} > LICENSE.dependencies |
| 74 | + |
| 75 | +%install |
| 76 | +%make_install INSTALL="install -p -c" |
| 77 | +%if %{with ostree_ext} |
| 78 | +make install-ostree-hooks DESTDIR=%{?buildroot} |
| 79 | +%endif |
| 80 | + |
| 81 | +%if %{with check} |
| 82 | +%check |
| 83 | +%cargo_test |
| 84 | +%endif |
| 85 | + |
28 | 86 | %files
|
29 |
| -%license LICENSE-APACHE LICENSE-MIT |
| 87 | +%license LICENSE-MIT |
| 88 | +%license LICENSE-APACHE |
| 89 | +%license LICENSE.dependencies |
| 90 | +%license cargo-vendor.txt |
30 | 91 | %doc README.md
|
31 | 92 | %{_bindir}/bootc
|
| 93 | +%{_prefix}/lib/bootc/ |
32 | 94 | %{_prefix}/lib/systemd/system-generators/*
|
33 |
| -%{_prefix}/lib/bootc |
| 95 | +%if %{with ostree_ext} |
| 96 | +%{_prefix}/libexec/libostree/ext/* |
| 97 | +%endif |
34 | 98 | %{_unitdir}/*
|
35 | 99 | %{_docdir}/bootc/*
|
36 | 100 | %{_mandir}/man*/bootc*
|
37 | 101 |
|
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 | 102 | %changelog
|
57 | 103 | %autochangelog
|
0 commit comments