Skip to content

Commit 8c8abd0

Browse files
committed
rpm/fedora: Update rust macro usage
Changes based on patch by Yaakov Selkowitz on Fedora Signed-off-by: Anderson Toshiyuki Sasaki <[email protected]>
1 parent 0aad36e commit 8c8abd0

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

rpm/fedora/keylime-agent-rust.spec

+9-10
Original file line numberDiff line numberDiff line change
@@ -80,19 +80,11 @@ Conflicts: keylime-agent
8080
Rust agent for Keylime
8181

8282
%prep
83-
%autosetup -n rust-keylime-%{version} -N
83+
%autosetup -n rust-keylime-%{version} -N %{?bundled_rust_deps:-a1}
8484
%if 0%{?bundled_rust_deps}
8585
%autopatch -m 100 -p1
8686
# Source1 contains vendored dependencies
87-
%cargo_prep
88-
tar -xoaf %{SOURCE1}
89-
sed -i 's/^\(replace-with\).*$/\1 = "vendored-sources"/g' .cargo/config
90-
cat >> .cargo/config << EOF
91-
92-
[source.vendored-sources]
93-
directory = "./vendor"
94-
EOF
95-
87+
%cargo_prep -v vendor
9688
%cargo_generate_buildrequires
9789
%else
9890
%autopatch -M 99 -p1
@@ -102,6 +94,11 @@ EOF
10294

10395
%build
10496
%cargo_build -ftesting
97+
%cargo_license_summary
98+
%{cargo_license} > LICENSE.dependencies
99+
%if 0%{?bundled_rust_deps}
100+
%cargo_vendor_manifest
101+
%endif
105102

106103
%install
107104

@@ -149,6 +146,8 @@ chown -R keylime:keylime %{_sysconfdir}/keylime
149146

150147
%files
151148
%license LICENSE
149+
%license LICENSE.dependencies
150+
%license cargo-vendor.txt
152151
%doc README.md
153152
%attr(500,keylime,keylime) %dir %{_sysconfdir}/keylime
154153
%attr(500,keylime,keylime) %dir %{_sysconfdir}/keylime/agent.conf.d

0 commit comments

Comments
 (0)