From 80ca463da4cb165e9ec0edcf78dd2b9a3474a0a3 Mon Sep 17 00:00:00 2001 From: Yangyang Shen Date: Wed, 19 Jul 2023 11:35:24 +0800 Subject: [PATCH] add compile option (cherry picked from commit c344746e7bf344408be82495e5769e39097235d9) --- sysmaster.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sysmaster.spec b/sysmaster.spec index 41aaf54..3708239 100644 --- a/sysmaster.spec +++ b/sysmaster.spec @@ -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 - 0.2.4-4 +- add compile option + * Thu Jul 06 2023 xujing - 0.2.4-3 - fix objcopy permission denied when rpmbuild