Skip to content

Commit 1af8396

Browse files
authored
Merge pull request #838 from travier/main-sync-spec
contrib/packaging/spec: Sync with Fedora changes
2 parents b13dc60 + 55152f1 commit 1af8396

File tree

3 files changed

+41
-22
lines changed

3 files changed

+41
-22
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ install-grub-static:
4242
install -m 755 -d ${DESTDIR}$(PREFIX)/lib/bootupd/grub2-static/configs.d
4343

4444
install-systemd-unit:
45-
install -m 644 -D -t "${DESTDIR}$(PREFIX)/lib/systemd/system/" contrib/packaging/bootloader-update.service
45+
install -m 644 -D -t "${DESTDIR}$(PREFIX)/lib/systemd/system/" systemd/bootloader-update.service
4646

4747
bin-archive:
4848
rm target/inst -rf

contrib/packaging/bootupd.spec

+40-21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
%bcond_without check
2-
%global __cargo_skip_build 0
32

43
%global crate bootupd
54

@@ -8,29 +7,46 @@ Version: 0.2.9
87
Release: 1%{?dist}
98
Summary: Bootloader updater
109

11-
License: ASL 2.0
12-
URL: https://crates.io/crates/bootupd
13-
Source0: https://github.com/coreos/bootupd/releases/download/v%{version}/bootupd-%{version}.tar.zstd
14-
Source1: https://github.com/coreos/bootupd/releases/download/v%{version}/bootupd-%{version}-vendor.tar.zstd
10+
License: Apache-2.0
11+
URL: https://github.com/coreos/bootupd
12+
Source0: %{url}/releases/download/v%{version}/bootupd-%{version}.crate
13+
Source1: %{url}/releases/download/v%{version}/bootupd-%{version}-vendor.tar.zstd
14+
ExcludeArch: %{ix86}
1515

1616
# For now, see upstream
17-
# See https://github.com/coreos/fedora-coreos-tracker/issues/1716
18-
%if 0%{?fedora} || 0%{?rhel} >= 10
19-
ExcludeArch: %{ix86}
20-
%endif
2117
BuildRequires: make
22-
BuildRequires: cargo
23-
# For autosetup -Sgit
24-
BuildRequires: git
25-
BuildRequires: openssl-devel
26-
BuildRequires: systemd-devel
27-
BuildRequires: systemd-rpm-macros
18+
BuildRequires: openssl-devel
19+
%if 0%{?rhel}
20+
BuildRequires: rust-toolset
21+
%else
22+
BuildRequires: cargo-rpm-macros >= 25
23+
%endif
24+
BuildRequires: systemd
25+
26+
%global _description %{expand:
27+
Bootloader updater}
28+
%description %{_description}
29+
30+
%package -n %{crate}
31+
Summary: %{summary}
32+
# Apache-2.0
33+
# Apache-2.0 OR BSL-1.0
34+
# Apache-2.0 OR MIT
35+
# Apache-2.0 WITH LLVM-exception
36+
# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
37+
# BSD-3-Clause
38+
# MIT
39+
# MIT OR Apache-2.0
40+
# Unlicense OR MIT
41+
License: Apache-2.0 AND (Apache-2.0 WITH LLVM-exception) 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)
42+
%{?systemd_requires}
2843

29-
%description
30-
%{summary}
44+
%description -n %{crate} %{_description}
3145

32-
%files
46+
%files -n %{crate}
3347
%license LICENSE
48+
%license LICENSE.dependencies
49+
%license cargo-vendor.txt
3450
%doc README.md
3551
%{_bindir}/bootupctl
3652
%{_libexecdir}/bootupd
@@ -50,12 +66,15 @@ directory = "vendor"
5066
EOF
5167

5268
%build
53-
cargo build --release
69+
%cargo_build
70+
%cargo_vendor_manifest
71+
%cargo_license_summary
72+
%{cargo_license} > LICENSE.dependencies
5473

5574
%install
5675
%make_install INSTALL="install -p -c"
57-
make install-grub-static DESTDIR=%{?buildroot} INSTALL="%{__install} -p"
58-
make install-systemd-unit DESTDIR=%{?buildroot} INSTALL="%{__install} -p"
76+
%{__make} install-grub-static DESTDIR=%{?buildroot} INSTALL="%{__install} -p"
77+
%{__make} install-systemd-unit DESTDIR=%{?buildroot} INSTALL="%{__install} -p"
5978

6079
%changelog
6180
* Tue Oct 18 2022 Colin Walters <[email protected]> - 0.2.8-3
File renamed without changes.

0 commit comments

Comments
 (0)