From e7acc742be39a50a7fa2bd0121684233652e7c78 Mon Sep 17 00:00:00 2001 From: iliana destroyer of worlds Date: Tue, 18 Feb 2020 18:12:22 +0000 Subject: [PATCH] Remove _cross_os prefix from license dirs --- macros/shared | 10 ++++++---- packages/systemd/systemd.spec | 4 +--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/macros/shared b/macros/shared index e0c1c039e3f..15d3fdb13b1 100644 --- a/macros/shared +++ b/macros/shared @@ -45,6 +45,8 @@ %_cross_usrsrc %{_cross_prefix}/src %_cross_licensedir %{_cross_datadir}/licenses %_defaultlicensedir %{_cross_licensedir} +%_uncross_name %(name=%{name}; echo ${name#%{_cross_os}}) +%_docdir_fmt %{_uncross_name} %set_cross_build_flags \ CFLAGS="${CFLAGS:-%{_cross_cflags}}" ; export CFLAGS ; \ @@ -178,14 +180,14 @@ CROSS_COMPILATION_CONF_EOF\ %set_cross_go_flags \ cd GOPATH/src/%1 ; \ -%_cross_attribution_file %{_cross_licensedir}/%{name}/attribution.txt +%_cross_attribution_file %{_cross_licensedir}/%{_uncross_name}/attribution.txt %cross_generate_attribution \ if [ 0%{?_cross_first_party} -eq 0 ]; then \ - mkdir -p %{buildroot}%{_cross_licensedir}/%{name} \ + mkdir -p %{buildroot}%{_cross_licensedir}/%{_uncross_name} \ echo "%{name} - %{url}" >> %{buildroot}%{_cross_attribution_file} \ echo "SPDX-License-Identifier: %{license}" >> %{buildroot}%{_cross_attribution_file} \ fi -%_cross_attribution_vendor_dir %{_cross_licensedir}/%{name}/vendor +%_cross_attribution_vendor_dir %{_cross_licensedir}/%{_uncross_name}/vendor %cross_scan_attribution \ bottlerocket-license-scan --spdx-data /usr/libexec/tools/spdx-data --out-dir %{buildroot}%{_cross_attribution_vendor_dir} @@ -213,6 +215,6 @@ CROSS_COMPILATION_CONF_EOF\ %__brp_mangle_shebangs /bin/true %__arch_install_post \ - /usr/lib/rpm/check-rpaths \ + %{?!_cross_allow_rpath:/usr/lib/rpm/check-rpaths} \ /usr/lib/rpm/check-buildroot \ %cross_generate_attribution diff --git a/packages/systemd/systemd.spec b/packages/systemd/systemd.spec index 4c6ede3f653..0ccf0f46d4d 100644 --- a/packages/systemd/systemd.spec +++ b/packages/systemd/systemd.spec @@ -1,7 +1,5 @@ # Skip check-rpaths since we expect them for systemd. -%global __arch_install_post \ - /usr/lib/rpm/check-buildroot \ - %cross_generate_attribution +%global _cross_allow_rpath 1 Name: %{_cross_os}systemd Version: 244