Skip to content

Commit

Permalink
Ensure texinfo can be installed on rhel-based systems
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 697748020
  • Loading branch information
m4r1k authored and copybara-github committed Nov 18, 2024
1 parent fa03314 commit 76f62a2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 7 deletions.
2 changes: 1 addition & 1 deletion perfkitbenchmarker/linux_packages/build_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def BuildGccFromSource(vm, gcc_version):
gcc_components = gcc_version.split('.')
major = int(gcc_components[0])
if major >= 13:
vm.InstallPackages('texinfo')
vm.Install('texinfo')

# build GCC on scratch disks for speed if possible
build_dir = vm.GetScratchDir() if vm.scratch_disks else '~/'
Expand Down
35 changes: 29 additions & 6 deletions perfkitbenchmarker/linux_packages/texinfo.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved.
# Copyright 2024 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,14 +13,37 @@
# limitations under the License.


"""Module containing build tools installation and cleanup functions."""
"""Module containing texinfo installation and cleanup functions."""

from perfkitbenchmarker import os_types

def YumInstall(_):
"""Installs build tools on the VM."""
pass

def YumInstall(vm):
"""Installs the texinfo package on the VM."""
if vm.OS_TYPE == os_types.ROCKY_LINUX8:
vm.RemoteCommand('sudo dnf config-manager --set-enabled powertools')
elif vm.OS_TYPE == os_types.ROCKY_LINUX9:
vm.RemoteCommand('sudo dnf config-manager --set-enabled crb')
elif vm.OS_TYPE == os_types.RHEL8:
vm.RemoteCommand(
'sudo dnf config-manager --set-enabled'
' rhui-codeready-builder-for-rhel-8-x86_64-rhui-rpms'
)
elif vm.OS_TYPE == os_types.RHEL9:
if vm.is_aarch64:
vm.RemoteCommand(
'sudo dnf config-manager --set-enabled'
' rhui-codeready-builder-for-rhel-9-aarch64-rhui-rpms'
)
else:
vm.RemoteCommand(
'sudo dnf config-manager --set-enabled'
' rhui-codeready-builder-for-rhel-9-x86_64-rhui-rpms'
)

vm.InstallPackages('texinfo')


def AptInstall(vm):
"""Installs build tools on the VM."""
"""Installs the texinfo package on the VM."""
vm.InstallPackages('texinfo')

0 comments on commit 76f62a2

Please sign in to comment.