From 8ab3d3d63aea2e9fa0c4631baa4b3ee2d0321676 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 11 Sep 2024 08:08:23 +0000 Subject: [PATCH] Make rawhide compatible with snapshot builds --- ...move-myst_parser-dependency-for-RHEL.patch | 0 ...move-myst_parser-dependency-for-RHEL.patch | 41 +++++++++++++++++++ files.spec.inc | 11 +++++ install.spec.inc | 4 ++ llvm.spec | 6 ++- packages.spec.inc | 12 +++--- 6 files changed, 67 insertions(+), 7 deletions(-) rename 0001-Remove-myst_parser-dependency-for-RHEL.patch => 0001-19-Remove-myst_parser-dependency-for-RHEL.patch (100%) create mode 100644 0001-20-Remove-myst_parser-dependency-for-RHEL.patch diff --git a/0001-Remove-myst_parser-dependency-for-RHEL.patch b/0001-19-Remove-myst_parser-dependency-for-RHEL.patch similarity index 100% rename from 0001-Remove-myst_parser-dependency-for-RHEL.patch rename to 0001-19-Remove-myst_parser-dependency-for-RHEL.patch diff --git a/0001-20-Remove-myst_parser-dependency-for-RHEL.patch b/0001-20-Remove-myst_parser-dependency-for-RHEL.patch new file mode 100644 index 0000000..0d25a83 --- /dev/null +++ b/0001-20-Remove-myst_parser-dependency-for-RHEL.patch @@ -0,0 +1,41 @@ +From 984f59020617649e8b9c76ff255f1ea6ad11976e Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Wed, 22 May 2024 09:39:26 +0200 +Subject: [PATCH] Remove myst_parser dependency for RHEL + +--- + clang/docs/conf.py | 3 +-- + llvm/docs/conf.py | 3 +-- + 2 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/clang/docs/conf.py b/clang/docs/conf.py +index 4cee382a718f..d2e2198e05d4 100644 +--- a/clang/docs/conf.py ++++ b/clang/docs/conf.py +@@ -43,8 +43,7 @@ try: + + extensions.append("myst_parser") + except ImportError: +- if not tags.has("builder-man"): +- raise ++ pass + + + # The encoding of source files. +diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py +index a40da828ae2a..e38c009a457d 100644 +--- a/llvm/docs/conf.py ++++ b/llvm/docs/conf.py +@@ -36,8 +36,7 @@ try: + + extensions.append("myst_parser") + except ImportError: +- if not tags.has("builder-man"): +- raise ++ pass + + # Automatic anchors for markdown titles + myst_heading_anchors = 6 +-- +2.46.0 + diff --git a/files.spec.inc b/files.spec.inc index d00fc1c..6e4b814 100644 --- a/files.spec.inc +++ b/files.spec.inc @@ -69,6 +69,9 @@ %{_mandir}/man1/mlir-tblgen%{exec_suffix}.1.gz %{_mandir}/man1/opt%{exec_suffix}.1.gz %{_mandir}/man1/tblgen%{exec_suffix}.1.gz +%if %{maj_ver} >= 20 +%{_mandir}/man1/llvm-cgdata%{exec_suffix}.1.gz +%endif %{install_bindir}/bugpoint %{install_bindir}/dsymutil @@ -153,6 +156,10 @@ %{install_bindir}/UnicodeNameMappingGenerator %{install_bindir}/verify-uselistorder %{install_bindir}/yaml2obj +%if %{maj_ver} >= 20 +%{install_bindir}/llvm-cgdata +%{install_bindir}/llvm-ctxprof-util +%endif %if %{with compat_build} @@ -240,6 +247,10 @@ %{_bindir}/UnicodeNameMappingGenerator%{exec_suffix} %{_bindir}/verify-uselistorder%{exec_suffix} %{_bindir}/yaml2obj%{exec_suffix} +%if %{maj_ver} >= 20 +%{_bindir}/llvm-cgdata%{exec_suffix} +%{_bindir}/llvm-ctxprof-util%{exec_suffix} +%endif %endif diff --git a/install.spec.inc b/install.spec.inc index 4e60ad5..49916e7 100644 --- a/install.spec.inc +++ b/install.spec.inc @@ -199,7 +199,11 @@ rm -rf %{buildroot}/%{install_datadir}/gdb %ifnarch %{ix86} # Remove files that we don't package, yet. +%if %{maj_ver} >= 20 +rm %{buildroot}%{install_bindir}/llvm-offload-device-info +%else rm %{buildroot}%{install_bindir}/llvm-omp-device-info +%endif rm %{buildroot}%{install_bindir}/llvm-omp-kernel-replay %endif diff --git a/llvm.spec b/llvm.spec index 6180cce..d3f270c 100644 --- a/llvm.spec +++ b/llvm.spec @@ -78,7 +78,11 @@ Patch3002: 0001-Always-build-shared-libs-for-LLD.patch #region RHEL patches # All RHEL -Patch9001: 0001-Remove-myst_parser-dependency-for-RHEL.patch +%if %{maj_ver} >= 20 +Patch9001: 0001-20-Remove-myst_parser-dependency-for-RHEL.patch +%else +Patch9001: 0001-19-Remove-myst_parser-dependency-for-RHEL.patch +%endif # RHEL 8 only Patch9002: 0001-Fix-page-size-constant-on-aarch64-and-ppc64le.patch diff --git a/packages.spec.inc b/packages.spec.inc index 0d0773b..a2fe0a0 100644 --- a/packages.spec.inc +++ b/packages.spec.inc @@ -6,8 +6,8 @@ Summary: LLVM lit test runner for Python 3 BuildArch: noarch Requires: python%{python3_pkgversion}-setuptools %if 0%{?rhel} == 8 -# Became python3.12-clang in LLVM 20 -Obsoletes: python3-lit < 19.9 +# Became python3.12-clang in LLVM 19 +Obsoletes: python3-lit < 18.9 %else # This optional dependency is not available for python3.12 on RHEL 8. Recommends: python%{python3_pkgversion}-psutil @@ -213,8 +213,8 @@ Summary: Python3 bindings for clang Requires: %{pkg_name_clang}-devel%{?_isa} = %{version}-%{release} Requires: python%{python3_pkgversion} %if 0%{?rhel} == 8 -# Became python3.12-clang in LLVM 20 -Obsoletes: python3-clang < 19.9 +# Became python3.12-clang in LLVM 19 +Obsoletes: python3-clang < 18.9 %endif %description -n python%{python3_pkgversion}-clang %{summary}. @@ -345,8 +345,8 @@ Summary: Python module for LLDB Requires: %{pkg_name_lldb}%{?_isa} = %{version}-%{release} %if 0%{?rhel} == 8 -# Became python3.12-lldb in LLVM 20 -Obsoletes: python3-lldb < 19.9 +# Became python3.12-lldb in LLVM 19 +Obsoletes: python3-lldb < 18.9 %endif %description -n python%{python3_pkgversion}-lldb