diff options
Diffstat (limited to 'openEuler-rpm-config.spec')
-rw-r--r-- | openEuler-rpm-config.spec | 149 |
1 files changed, 64 insertions, 85 deletions
diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index 96c2f95..938d5eb 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -2,56 +2,45 @@ %global rpmvdir /usr/lib/rpm/%{vendor} Name: %{vendor}-rpm-config -Version: 31 -Release: 3 +Version: 30 +Release: 59 License: GPL+ Summary: specific rpm configuration files -URL: https://gitee.com/src-openeuler/openEuler-rpm-config -Buildarch: noarch - -# Core rpm settings -Source0: macros -Source1: rpmrc - -# gcc specs files for hardened builds -Source10: generic-hardened-cc1 -Source11: generic-hardened-ld -Source12: generic-pie-cc1 -Source13: generic-pie-ld - -# clang config spec files -Source51: generic-hardened-clang.cfg - -# The macros defined by these files are for things that need to be defined -# at srpm creation time when it is not feasible to require the base packages -# that would otherwise be providing the macros. -Source100: macros.perl -Source101: macros.forge -Source102: macros.go -Source103: macros.python -Source104: macros.kmp - -# Dependency generator scripts -Source200: find-requires.ksyms - -# Misc helper scripts -Source300: kmodtool -Source301: find-requires - -# Snapshots from http://git.savannah.gnu.org/gitweb/?p=config.git -Source500: config.guess -Source501: config.sub - -# BRPs -Source700: brp-chrpath -Source701: brp-digest-list -Source702: brp-ebs-sign -Source703: brp-ldconfig -Source704: brp-remove-info-dir -Source705: brp-check-elf-files - -# Convenience lua functions -Source800: common.lua +URL: https://gitee.com/openeuler/openEuler-rpm-config + +Source0: https://gitee.com/openeuler/openEuler-rpm-config/repository/archive/%{version}.tar.gz + +Patch0: fix-error-message-for-kmodtool.patch +Patch1: 0001-1-Add-riscv64-to-golang_arches.patch +Patch2: Fix-a-typo-in-brp-digest-list.patch +Patch3: change-the-vendor-to-generic-for-common-use.patch +Patch4: remove-fexceptions.patch +Patch5: exclude-kernel-source-and-EFI-files-in-digest-list-building.patch +Patch6: add-brp-scripts-to-delete-rpath.patch +Patch7: add-common-script.patch +Patch8: Fix-python3_version-macros-for-Python-3.10.patch +Patch9: Give-a-warning-when-using-kabi-outside-our-stablelis.patch +Patch10: fixed-a-bug-that-missing_-p-in-macros.kmp.patch +Patch11: update-config.guess-and-config.sub-for-loongarch64.patch +Patch12: add-loongarch64-to-generic_arches.patch +Patch13: add-loongarch64-support-for-config.guess-and-config.sub.patch +Patch14: backport-kmp-feature.patch +Patch15: 0001-add-loongarch64-for-golang_arches.patch +Patch16: fix-config-error-for-loongarch64.patch +Patch17: Feature-support-EBS-sign-for-IMA-digest-list.patch +Patch18: fix-brp-ldconfig-riscv-default-library-directory.patch +Patch19: add-pyproject-macros.patch +Patch20: add-pytest-and-tox-macros.patch +Patch21: check-if-the-file-is-a-symbolic-link-in-brp-digest-list.patch +Patch22: fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch +Patch23: add-powerpc64le-and-ppc64le-support.patch +Patch24: Delete-the-commented-code.patch +Patch25: Add-support-for-selecting-clang-as-a-toolchain.patch +Patch26: Call-set_build_flags-cc-before-build-check-and-insta.patch +Patch27: openEuler-rpm-config-add-optflags-for-loongarch64-and-sw_64.patch +Patch28: add-riscv64-to-some-arches-macro.patch +Patch29: backport-Enable-as-needed-by-default.patch +Patch30: 0001-Enable-LTO-By-Default.patch Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} @@ -67,31 +56,30 @@ Provides: perl-srpm-macros = 1-28 Provides: rust-srpm-macros = 10-1 Provides: go-srpm-macros = 2-18 Provides: perl-macros = 4:5.32.0-1 -Obsoletes: perl-macros < 4:5.32.0-1 -Obsoletes: python-rpm-macros < %{?epoch:%{epoch}:}%{version}-%{release} -Obsoletes: python2-rpm-macros < %{?epoch:%{epoch}:}%{version}-%{release} -Obsoletes: python3-rpm-macros < %{?epoch:%{epoch}:}%{version}-%{release} -Obsoletes: python-srpm-macros < %{?epoch:%{epoch}:}%{version}-%{release} -Obsoletes: fpc-srpm-macros < 1.1-6 -Obsoletes: ghc-srpm-macros < 1.4.2-8 -Obsoletes: gnat-srpm-macros < 4-6 -Obsoletes: nim-srpm-macros < 1-3 -Obsoletes: ocaml-srpm-macros < 5-4 -Obsoletes: openblas-srpm-macros < 2-4 -Obsoletes: perl-srpm-macros < 1-28 -Obsoletes: rust-srpm-macros < 10-1 -Obsoletes: go-srpm-macros < 2-18 +Obsoletes: perl-macros <= 4:5.32.0-1 +Obsoletes: python-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: python2-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: python3-rpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: python-srpm-macros <= %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: fpc-srpm-macros <= 1.1-6 +Obsoletes: ghc-srpm-macros <= 1.4.2-8 +Obsoletes: gnat-srpm-macros <= 4-6 +Obsoletes: nim-srpm-macros <= 1-3 +Obsoletes: ocaml-srpm-macros <= 5-4 +Obsoletes: openblas-srpm-macros <= 2-4 +Obsoletes: perl-srpm-macros <= 1-28 +Obsoletes: rust-srpm-macros <= 10-1 +Obsoletes: go-srpm-macros <= 2-18 %if "%{vendor}" != "openEuler" Provides: openEuler-rpm-config = %{?epoch:%{epoch}:}%{version}-%{release} -Obsoletes: openEuler-rpm-config < %{?epoch:%{epoch}:}%{version}-%{release} +Obsoletes: openEuler-rpm-config <= %{?epoch:%{epoch}:}%{version}-%{release} %endif Requires: efi-srpm-macros Requires: qt5-srpm-macros -Requires: rpm >= 4.17.0 -Requires: rpm-build >= 4.17.0 +Requires: rpm >= 4.11.0 Requires: zip Requires: curl #Requires: (annobin if gcc) @@ -102,9 +90,10 @@ Requires: %{_bindir}/file Requires: %{_bindir}/grep Requires: %{_bindir}/sed Requires: %{_bindir}/xargs -Requires: %{_bindir}/chrpath +%if "%{_arch}" == "riscv64" Requires: coreutils +%endif # -fstack-clash-protection and -fcf-protection require GCC 8. Conflicts: gcc < 7 @@ -121,14 +110,12 @@ Summary: Macros and scripts for building kernel module packages Macros and scripts for building kernel module packages. %prep -%setup -Tc -n %{name}-%{version} -cp %{_sourcedir}/* . -rm -f generic-rpm-config.yaml -%autopatch -p1 +%autosetup -n openEuler-rpm-config -p1 %install mkdir -p %{buildroot}%{rpmvdir} -install -p -m 644 -t %{buildroot}%{rpmvdir} macros rpmrc +install -p -m 644 -t %{buildroot}%{rpmvdir} macros rpmrc lto_white_list +install -p -m 755 -t %{buildroot}%{rpmvdir} lto_flag install -p -m 755 -t %{buildroot}%{rpmvdir} config.* install -p -m 755 -t %{buildroot}%{_rpmconfigdir} brp-* install -p -m 644 -t %{buildroot}%{_rpmconfigdir} generic-* @@ -144,12 +131,14 @@ mkdir -p %{buildroot}%{_rpmluadir}/%{_vendor}/{rpm,srpm} install -p -m 644 -t %{buildroot}%{_rpmluadir}/%{_vendor} common.lua # Adaptive according to vendor -sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir}` +sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir}` %files %dir %{rpmvdir} %{rpmvdir}/macros %{rpmvdir}/rpmrc +%{rpmvdir}/lto_flag +%{rpmvdir}/lto_white_list %{_rpmconfigdir}/brp-* %{rpmvdir}/config.* %{_rpmconfigdir}/generic-* @@ -159,25 +148,15 @@ sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir %exclude %{_rpmconfigdir}/macros.d/macros.kmp %files -n kernel-rpm-macros +%exclude %{_prefix}/lib/rpm/*/__pycache__/* %{rpmvdir}/kmodtool %{_rpmconfigdir}/macros.d/macros.kmp %{rpmvdir}/find-requires %{rpmvdir}/find-requires.ksyms %changelog -* Thu Aug 29 2024 Funda Wang <fudnawang@yeah.net> - 31-3 -- Output elf check result for maintainer to analyse - -* Thu Aug 29 2024 Funda Wang <fudnawang@yeah.net> - 31-2 -- remove /usr/share/info/dir in buildroot automatically - -* Sun Aug 25 2024 Funda Wang <fudnawang@yeah.net> - 31-1 -- merge two messy repositories -- update config.sub and config.guess, without support on loongarchx32, - as it does not exist in real world -- add chrpath and coreutils runtime dependecies -- bump rpm version requirement for brp-remove-la-files -- package becomes noarch now +* Wed Aug 21 2024 wangchunyang <wangchunyang15@huawei.com> - 30-59 +- Enable LTO By Default * Tue Aug 6 2024 liyunfei <liyunfei33@huawei.com> - 30-58 - Fix for "%undefine _auto_set_build_XX" usage |