From def0a09b9f9db8cc0cfdcb7d6767a178ec0d68c4 Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Tue, 21 Jun 2022 12:09:56 +0200 Subject: [PATCH] Make f35 compat builds work This PR fixes a few issues when building in compat mode: --- We don't want to package the `macros.clang` package when building clang in compat mode Fixes: ``` error: Bad file: /builddir/build/SOURCES/macros.clang13: No such file or directory ``` See also https://src.fedoraproject.org/rpms/clang/c/967d1e9cb7ee6afbb33a7cd13c2ac3941467a02a?branch=rawhide by @tbaeder where this change is already applied. --- Don't install libear and libscanbuild in compat build Fixes: ``` Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/clang13-13.0.0-3.fc35.ppc64le error: Installed (but unpackaged) file(s) found: /usr/lib64/llvm13/lib/libear/__init__.py /usr/lib64/llvm13/lib/libear/config.h.in /usr/lib64/llvm13/lib/libear/ear.c /usr/lib64/llvm13/lib/libscanbuild/__init__.py /usr/lib64/llvm13/lib/libscanbuild/analyze.py /usr/lib64/llvm13/lib/libscanbuild/arguments.py /usr/lib64/llvm13/lib/libscanbuild/clang.py /usr/lib64/llvm13/lib/libscanbuild/compilation.py /usr/lib64/llvm13/lib/libscanbuild/intercept.py /usr/lib64/llvm13/lib/libscanbuild/report.py /usr/lib64/llvm13/lib/libscanbuild/resources/scanview.css /usr/lib64/llvm13/lib/libscanbuild/resources/selectable.js /usr/lib64/llvm13/lib/libscanbuild/resources/sorttable.js /usr/lib64/llvm13/lib/libscanbuild/shell.py ``` --- clang.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/clang.spec b/clang.spec index 44a6553..8d4fe5c 100644 --- a/clang.spec +++ b/clang.spec @@ -84,7 +84,7 @@ Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_ Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{clang_version}%{?rc_ver:-rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz.sig %endif Source4: tstellar-gpg-key.asc -%if !0%{?compat_build} +%if %{without compat_build} Source5: macros.%{name} %endif @@ -384,6 +384,8 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py rm -Rf %{buildroot}%{install_bindir} rm -Rf %{buildroot}%{install_prefix}/share rm -Rf %{buildroot}%{install_prefix}/libexec +rm -Rf %{buildroot}%{install_prefix}/lib/libear +rm -Rf %{buildroot}%{install_prefix}/lib/libscanbuild %else