add compile option

(cherry picked from commit c344746e7bf344408be82495e5769e39097235d9)
This commit is contained in:
Yangyang Shen 2023-07-19 11:35:24 +08:00 committed by openeuler-sync-bot
parent 8e6d9177bb
commit 80ca463da4

View File

@ -1,4 +1,3 @@
#needsrootforbuild
%global __cargo_skip_build 0
%global _debugsource_packages 1
%global _debuginfo_subpackages 1
@ -8,10 +7,11 @@
%global unit_install_source units
%global conf_install_source config/conf
%global __cargo_common_opts %{?__cargo_common_opts} --all
%global _cargo_build /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 %{_bindir}/cargo build %__cargo_common_opts
Name: sysmaster
Version: 0.2.4
Release: 3
Release: 4
Summary: redesign and reimplement process1.
License: Mulan PSL v2
@ -44,8 +44,9 @@ Summary: %{summary}
sed -i '/\[source.crates-io\]/{n;d}' ./.cargo/config
sed -i '/\[source.local-registry\]/{n;d}' ./.cargo/config
sed -i '/\[source.local-registry\]/a directory = "vendor"' ./.cargo/config
sed -i '/\[build\]/arustflags = \["-C", "target-feature=-crt-static", "-C", "link-arg=-fstack-protector-all", "-C", "link-arg=-fpie", "-C", "link-arg=-DFORTIFY=2 -O2"\]' ./.cargo/config
%cargo_build
%{_cargo_build} --profile release
%install
install -Dm0750 -t %{buildroot}/usr/bin %{sysmaster_install_source}/sctl
@ -77,6 +78,9 @@ install -Dm0640 -t %{sysmaster_install_target}/plugin %{conf_install_source}/plu
%attr(0550,-,-) /usr/lib/sysmaster/sysmaster
%changelog
* Wed Jul 19 2023 shenyangyang<shenyangyang4@huawei.com> - 0.2.4-4
- add compile option
* Thu Jul 06 2023 xujing<xujing125@huawei.com> - 0.2.4-3
- fix objcopy permission denied when rpmbuild