Skip to content

Commit 1e7e387

Browse files
committed
contrib/packaging/bootc.spec: sync with current Fedora rawhide
1 parent 8dff320 commit 1e7e387

File tree

1 file changed

+80
-34
lines changed

1 file changed

+80
-34
lines changed

contrib/packaging/bootc.spec

Lines changed: 80 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,103 @@
11
%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
213

314
Name: bootc
4-
Version: 0.1
5-
Release: 1%{?dist}
6-
Summary: Boot containers
15+
Version: 1.1.4
16+
Release: %{autorelease}
17+
Summary: Bootable container system
718

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)
928
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}
1234

35+
BuildRequires: libzstd-devel
1336
BuildRequires: make
14-
BuildRequires: openssl-devel
15-
BuildRequires: cargo
16-
BuildRequires: systemd
17-
# For autosetup -Sgit
18-
BuildRequires: git
19-
BuildRequires: zlib-devel
2037
BuildRequires: ostree-devel
2138
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
2461

2562
%description
2663
%{summary}
2764

65+
%prep
66+
%autosetup -p1 -a1
67+
%cargo_prep -v vendor
68+
69+
%build
70+
%cargo_build %{?with_rhsm:-f 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+
2886
%files
29-
%license LICENSE-APACHE LICENSE-MIT
87+
%license LICENSE-MIT
88+
%license LICENSE-APACHE
89+
%license LICENSE.dependencies
90+
%license cargo-vendor.txt
3091
%doc README.md
3192
%{_bindir}/bootc
93+
%{_prefix}/lib/bootc/
3294
%{_prefix}/lib/systemd/system-generators/*
33-
%{_prefix}/lib/bootc
95+
%if %{with ostree_ext}
96+
%{_prefix}/libexec/libostree/ext/*
97+
%endif
3498
%{_unitdir}/*
3599
%{_docdir}/bootc/*
36100
%{_mandir}/man*/bootc*
37101

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-
56102
%changelog
57103
%autochangelog

0 commit comments

Comments
 (0)