Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-140417

[QE Task]: Rebase LLVM Toolset to LLVM 22 [rhel-9]

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • llvm
    • None
    • rhel-pt-llvm-rust
    • 5
    • False
    • Hide

      None

      Show
      None
    • None

      Do scratch rebuilds of the following packages:

      $ python3 clang-br-query.py 9.9

      ['annobin', 'bpftool', 'clang', 'dotnet10.0', 'dotnet6.0', 'dotnet7.0', 'dotnet8.0', 'dotnet9.0', 'fips-provider-next', 'firefox', 'gcc-toolset-12-annobin', 'gcc-toolset-13-annobin', 'gcc-toolset-14-annobin', 'golang', 'keylime-agent-rust', 'llvm', 'pcp', 'postgis', 'postgis', 'qemu-kvm', 'stalld', 'stratisd', 'thunderbird', 'v4l-utils', 'webkit2gtk3', 'xdp-tools', 'device-mapper-persistent-data', 'kernel', 'libkcapi']

      Here is the clang-br-query.py script. Run this before doing the rebuilds in
      order to ensure that you are using an up-to-date list of packages.

      import sys
      import hawkey
      import dnf
      
      
      def get_clang_br_pkgs(rhel_version : str) -> list[str]:
          rhel_major = rhel_version.split('.')[0]
          base = dnf.Base()
          conf = base.conf
      
          repos = base.repos.get_matching("*")
          repos.disable()
          for c in "AppStream", "BaseOS", "CRB":
              base.repos.add_new_repo(
                  f"{c}-source",
                  conf,
                  baseurl=[
                      f"http://download.hosts.prod.upshift.rdu2.redhat.com/rhel-{rhel_major}/nightly/RHEL-{rhel_major}/latest-RHEL-{rhel_version}/compose/{c}/source/tree/"
                  ],
              )
              repos = base.repos.get_matching("{c}-source")
              repos.enable()
      
          base.fill_sack()
          q = base.sack.query(flags=hawkey.IGNORE_MODULAR_EXCLUDES)
          q = q.filter(requires=["clang"])
          pkgs = [p.name for p in list(q)]
          return pkgs
      
      
      def get_llvm_libs_r_pkgs(rhel_version: str) -> list[str]:
          rhel_major = rhel_version.split('.')[0]
          base = dnf.Base()
          conf = base.conf
      
          repos = base.repos.get_matching("*")
          repos.disable()
          for c in "AppStream", "BaseOS", "CRB":
              base.repos.add_new_repo(
                  f"{c}",
                  conf,
                  baseurl=[
                      f"http://download.hosts.prod.upshift.rdu2.redhat.com/rhel-{rhel_major}/nightly/RHEL-{rhel_major}/latest-RHEL-{rhel_version}/compose/{c}/$basearch/os/"
                  ],
              )
              repos = base.repos.get_matching("{c}")
              repos.enable()
      
          base.fill_sack()
          q = base.sack.query(flags=hawkey.IGNORE_MODULAR_EXCLUDES)
          llvm_pkg=list(q.filter(name='llvm'))[0]
          subject = dnf.subject.Subject(str(llvm_pkg))
          nevra = subject.get_nevra_possibilities(forms=hawkey.FORM_NEVR)
          so_suffix = ".".join(nevra[0].version.split('.')[0:2])
          print(so_suffix)
      
          llvm_deps = [
              "llvm-libs",
              "clang-libs",
              "lldb-libs",
              "lld-libs",
              f"libLLVM.so.{so_suffix}()(64bit)",
              f"libclang.so.{so_suffix}()(64bit)",
              f"libclang-cpp.so.{so_suffix}()(64bit)",
              f"liblldb.so.{so_suffix}()(64bit)"
          ]
      
          pkgs = set()
          for dep in llvm_deps:
              for p in list(q.filter(requires=[dep])):
                  pkgs.add(p.source_name)
      
          return pkgs
      
      
      def main():
      
          print(get_clang_br_pkgs(sys.argv[1]))
          print(get_llvm_libs_r_pkgs(sys.argv[1]))
      
      
      if __name__ == "__main__":
          main()
      
      

              tstellar@redhat.com Thomas Stellard
              tstellar@redhat.com Thomas Stellard
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: