From 0bcb543922c08f2f9f61814bdcff9de2015c48be Mon Sep 17 00:00:00 2001 From: James Antill Date: Mon, 8 Aug 2022 12:40:18 -0400 Subject: [PATCH] Import rpm: 3bd99e09b995097af6fa40247f50715c70563243 --- .fmf/version | 1 + .gitignore | 0 gating.yaml | 22 +++++ llvm-toolset.spec | 146 ++++++++++++++++++++++++++++ sources | 0 tests/build-gating-alternatives.fmf | 36 +++++++ tests/build-gating-libomp.fmf | 47 +++++++++ tests/build-gating.fmf | 76 +++++++++++++++ 8 files changed, 328 insertions(+) create mode 100644 .fmf/version create mode 100644 .gitignore create mode 100644 gating.yaml create mode 100644 llvm-toolset.spec create mode 100644 sources create mode 100644 tests/build-gating-alternatives.fmf create mode 100644 tests/build-gating-libomp.fmf create mode 100644 tests/build-gating.fmf diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..eb5faf3 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,22 @@ +# There are no tests/ yet in this repo, therefore leaving Fedora policies commented out. +# The downstream will run sanity tests instead, that can be controlled from an external +# config file, and removed once actual tests land in c9s stream. + +# --- !Policy +# product_versions: +# - fedora-* +# decision_context: bodhi_update_push_testing +# rules: +# - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +# --- !Policy +# product_versions: +# - fedora-* +# decision_context: bodhi_update_push_stable +# rules: +# - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier0.functional} diff --git a/llvm-toolset.spec b/llvm-toolset.spec new file mode 100644 index 0000000..3567180 --- /dev/null +++ b/llvm-toolset.spec @@ -0,0 +1,146 @@ +%global maj_ver 14 +%global min_ver 0 +%global patch_ver 0 +#%%global rc_ver 2 +%global baserelease 1 + +Summary: Package that installs llvm-toolset +Name: llvm-toolset +Version: %{maj_ver}.%{min_ver}.%{patch_ver} +Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist} +License: NCSA + +Requires: clang = %{version} + +Requires: llvm = %{version} +%ifnarch s390x +Requires: lld = %{version} +%endif + +%description +This is the main package for llvm-toolset. + +%files + +%changelog +* Thu Apr 07 2022 Timm Bäder - 14.0.0-1 +- Update to 14.0.0 + +* Thu Feb 03 2022 Tom Stellard - 13.0.1-1 +- 13.0.1 Release + +* Fri Oct 22 2021 Tom Stellard - 13.0.0-2 +- Drop Requres: lldb + +* Fri Oct 15 2021 Tom Stellard - 13.0.0-1 +- 13.0.0 Release + +* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1 +- 12.0.1 release + +* Thu May 6 2021 sguelton@redhat.com - 12.0.0-1 +- 12.0.0 release + +* Wed Nov 11 2020 sguelton@redhat.com - 11.0.0-1 +- 11.0.0 release + +* Wed Sep 23 2020 sguelton@redhat.com - 11.0.0-0.2.rc2 +- Fix version number + +* Mon Sep 21 2020 sguelton@redhat.com - 11.0.0-0.1.rc2 +- 11.0.1.rc2 Release + +* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1 +- 10.0.1 Release + +* Tue Apr 14 2020 sguelton@redhat.com - 10.0.0-1 +- 10.0.0 Release + +* Mon Jan 06 2020 Tom Stellard - 9.0.1-1 +- Fix version number + +* Mon Jan 06 2020 Tom Stellard - 9.0.1-1 +- 9.0.1 Release + +* Tue Oct 01 2019 Tom Stellard - 9.0.0-2 +- 9.0.0 Release + +* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1 +- 8.0.1 release + +* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2 +- 8.0.1rc2 Release + +* Wed Apr 17 2019 sguelton@redhat.com - 8.0.0-1 +- 8.0.0 Release + +* Sat Dec 15 2018 Tom Stellard - 7.0.1-1 +- 7.0.1 Release + +* Mon Dec 10 2018 Tom Stellard - 7.0.1-0.1.rc3 +- 7.0.1-rc3 Release + +* Thu Oct 11 2018 Tom Stellard - 6.0.1-5 +- Add empty files section + +* Mon Oct 01 2018 Tom Stellard - 6.0.1-4 +- Drop SCL macros + +* Fri Sep 21 2018 Tom Stellard - 6.0.1-3 +- Install lld by default + +* Fri Aug 03 2018 Vít Ondruch - 6.0.1-2 +- scl_files hack is not needed anymore. + +* Tue Jul 10 2018 Tom Stellard - 6.0.1-1 +- LLVM 6.0.1 release + +* Fri Feb 16 2018 Tilmann Scheller - 5.0.1-5 +- Move %enable_llvmtoolset7 macro to the -build subpackage to avoid conflicts + between multiple definitions of %scl when using llvm-toolset-7 to build a SCL + +* Thu Feb 08 2018 Tilmann Scheller - 5.0.1-4 +- Add %enable_llvmtoolset7 macro to make it easier to activate llvm-toolset-7 + during package builds. + +* Fri Feb 02 2018 Tom Stellard - 5.0.1-3 +- Only install build tools + +* Fri Feb 02 2018 Tom Stellard - 5.0.1-2 +- Work around bug in scl_files + +* Wed Jan 17 2018 Tom Stellard - 5.0.1-1 +- LLVM 5.0.1 release + +* Wed Jan 17 2018 Tom Stellard - 4.0.1-5 +- Drop dockerfiles package + +* Wed Oct 04 2017 Tom Stellard - 4.0.1-4 +- Update Dockerfile + +* Wed Sep 20 2017 Tom Stellard - 4.0.1-3 +- Update Dockerfile + +* Wed Aug 09 2017 Tom Stellard - 4.0.1-2 +- Add docker file + +* Wed Jun 21 2017 Tom Stellard - 4.0.1-1 +- 4.0.1 Release. + +* Wed Jun 21 2017 Tom Stellard - 4.0.0-6 +- Fix Requires for lldb, this package is not built on all arches + +* Mon Jun 05 2017 Tom Stellard - 4.0.0-5 +- Remove scldevel package + +* Mon Jun 05 2017 Tom Stellard - 4.0.0-4 +- Remove unnecessary code + +* Fri May 12 2017 Tom Stellard - 4.0.0-3 +- Add clang, lldb, and python-lit to Requires + +* Wed May 10 2017 Tilmann Scheller - 4.0.0-2 +- Update PYTHONPATH to point to the scl's Python site-packages directory + +* Mon Apr 24 2017 Tom Stellard 4.0.0-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..e69de29 diff --git a/tests/build-gating-alternatives.fmf b/tests/build-gating-alternatives.fmf new file mode 100644 index 0000000..13054e1 --- /dev/null +++ b/tests/build-gating-alternatives.fmf @@ -0,0 +1,36 @@ +# +# Build/PR gating tests for *LLVM 13* +# +# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version. +# +# NOTE: *always* keep this file in sync with upstream, i.e. Fedora. Since we cannot "discover" a plan, +# we must duplicate at least some part of upstream plan setup, like `adjust` or `provision`. Not necessarily +# all steps, but if we do need some of them here, let's focus on making changes in upstream first, to preserve +# one source of truth. Once TMT learns to include whole plans, we could drop the copied content from here. +# + +summary: LLD tests for build/PR gating, testing alternatives and spoiling the installation +adjust: + - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." + when: >- + trigger is defined + and trigger != commit + and trigger != build + enabled: false + + - because: "When testing SCL-ized LLVM, the collection must be enabled first" + environment+: + WITH_SCL: "scl enable llvm-toolset-13.0" + when: "collection == llvm-toolset-13.0" + +discover: + - name: lld-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/lld.git + ref: rawhide + test: ld-alternative +execute: + how: tmt +provision: + hardware: + memory: ">= 4 GiB" diff --git a/tests/build-gating-libomp.fmf b/tests/build-gating-libomp.fmf new file mode 100644 index 0000000..e61824c --- /dev/null +++ b/tests/build-gating-libomp.fmf @@ -0,0 +1,47 @@ +# +# Build/PR gating tests for *LLVM 13* +# +# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version. +# +# NOTE: *always* keep this file in sync with upstream, i.e. Fedora. Since we cannot "discover" a plan, +# we must duplicate at least some part of upstream plan setup, like `adjust` or `provision`. Not necessarily +# all steps, but if we do need some of them here, let's focus on making changes in upstream first, to preserve +# one source of truth. Once TMT learns to include whole plans, we could drop the copied content from here. +# + +summary: libomp clang tests for build/PR gating +adjust: + - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." + when: >- + trigger is defined + and trigger != commit + and trigger != build + enabled: false + + - because: "When testing SCL-ized LLVM, the collection must be enabled first" + environment+: + WITH_SCL: "scl enable llvm-toolset-13.0" + when: "collection == llvm-toolset-13.0" + + - because: "libomp not supported in s390x" + when: arch == s390x + enabled: false + +discover: + - name: clang-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/clang.git + ref: rawhide + test: libomp +execute: + how: tmt +prepare: + # We want to make sure libomp is not already present on the system to ensure + # that clang pulls in the correct libomp dependencies when it is installed. + - name: Drop libomp + how: shell + script: | + yum erase -y libomp libomp-devel clang clang-libs +provision: + hardware: + memory: ">= 4 GiB" \ No newline at end of file diff --git a/tests/build-gating.fmf b/tests/build-gating.fmf new file mode 100644 index 0000000..b967b21 --- /dev/null +++ b/tests/build-gating.fmf @@ -0,0 +1,76 @@ +# +# Build/PR gating tests for *LLVM 13* +# +# Imports and runs tests provided by Fedora LLVM git for the matching LLVM version. +# + +summary: LLVM tests for build/PR gating + +adjust: + - because: "Plan to be ran when either executed locally, or executed by CI system to gate a build or PR." + when: >- + trigger is defined + and trigger != commit + and trigger != build + enabled: false + + # Unfortunately, TMT does not support more declarative approach, we need to run commands on our own. + - because: "On RHEL, CRB must be enabled to provide rarer packages" + prepare+: + - name: Enable CRB + how: shell + script: dnf config-manager --set-enabled rhel-CRB + when: >- + distro == centos + or distro == rhel-9 + or distro == rhel-8 + +discover: + - name: llvm-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/llvm.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: clang-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/clang.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: python-lit-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/python-lit.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: lldb-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/lldb.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: lld-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/lld.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: libomp-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/libomp.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + + - name: compiler-rt-upstream + how: fmf + url: https://src.fedoraproject.org/rpms/compiler-rt.git + ref: rawhide + filter: "tag:-spoils-installation & tag:-not-in-default" + +execute: + how: tmt + +provision: + hardware: + memory: ">= 4 GiB" \ No newline at end of file