From dea1dcedfb944a5dcb11d7d6c35596fabae853d6 Mon Sep 17 00:00:00 2001 From: Josh Lay Date: Fri, 8 Nov 2024 15:40:55 -0600 Subject: [PATCH] packer-rocm: niccli build fixes (#64) * packer-rocm/niccli: +build deps for certain permutations, handle no-amdgpu/rocm --- .../roles/amdgpu_install/vars/main.yml | 4 +- .../playbooks/roles/niccli/defaults/main.yml | 41 ++----------------- .../playbooks/roles/niccli/vars/main.yml | 41 +++++++++++++++++++ 3 files changed, 47 insertions(+), 39 deletions(-) diff --git a/packer-rocm/playbooks/roles/amdgpu_install/vars/main.yml b/packer-rocm/playbooks/roles/amdgpu_install/vars/main.yml index 1b15ac2..a4c657d 100644 --- a/packer-rocm/playbooks/roles/amdgpu_install/vars/main.yml +++ b/packer-rocm/playbooks/roles/amdgpu_install/vars/main.yml @@ -10,6 +10,8 @@ amdgpu_install_pkg_patts: # indexed by 'ansible_distribution' fact # Packages to install after 'amdgpu-install' but before the usecases amdgpu_install_pre: common: + - automake # only 'suggested' by 'build-essential' metapkg, not mentioned by 'Development Tools' group + - autoconf # " - cmake - curl - dkms @@ -25,8 +27,6 @@ amdgpu_install_pre: - wget - zip Debian: - - autoconf - - automake - libstdc++-12-dev - "linux-headers-{{ ansible_kernel }}" - "linux-modules-extra-{{ ansible_kernel }}" diff --git a/packer-rocm/playbooks/roles/niccli/defaults/main.yml b/packer-rocm/playbooks/roles/niccli/defaults/main.yml index 76940bb..897eebc 100644 --- a/packer-rocm/playbooks/roles/niccli/defaults/main.yml +++ b/packer-rocm/playbooks/roles/niccli/defaults/main.yml @@ -8,45 +8,12 @@ # - 'Broadcom NetXtreme-E Linux Installer' # - 'NetXtreme-E Linux Driver' # -# NOTE/warning: URL patterns are not consistent enough for templating to make much sense; provide/set the full URL at once. See above for discovery process. -niccli_url: 'https://docs.broadcom.com/docs-and-downloads/ethernet-network-adapters/NXE/Thor2/GCA1/bcm5760x_230.2.52.0a.zip' +# NOTE/Warning: Patterns in URLs have not been consistent enough for templating to make [much] sense. Directories change along with releases. +niccli_url: 'https://docs.broadcom.com/docs-and-downloads/ethernet-network-adapters/NXE/Thor2/GCA2/bcm5760x_231.2.63.0a.zip' -# 'niccli_sum' deliberately is *not* defaulted with the URL. if users want to change the URL... this should not require the checksum be corrected/emptied -# this should act as opt-in validation, not a requirement +# 'niccli_sum' deliberately is *not* defaulted with the URL. +# if users want to change the link... they should not be required to correct or empty the checksum. this should act as opt-in validation, not a requirement. # install the CLI and driver by default, may opt out niccli_driver: true niccli_wanted: true - -niccli_requirements: # mapped by 'ansible_os_family' fact - common: - - dkms - - pciutils - - unzip - Debian: - - build-essential - - ibverbs-providers - - ibverbs-utils - - libaio-dev - - libibverbs1 - - libibverbs-dev - - libstdc++-12-dev - - libelf-dev - - libibumad-dev - - librdmacm-dev - - linux-headers-generic - - "linux-headers-{{ ansible_kernel }}" - - "linux-modules-extra-{{ ansible_kernel }}" - - rdmacm-utils - RedHat: - - '@Development Tools' # group notation (@...) requires quoting - - kernel-headers - - kernel-devel-matched - - kernel-modules-extra - - libstdc++-devel - - libaio-devel - - libibumad - - libibverbs - - libibverbs-utils - - elfutils-libelf-devel - - librdmacm-utils diff --git a/packer-rocm/playbooks/roles/niccli/vars/main.yml b/packer-rocm/playbooks/roles/niccli/vars/main.yml index a9a50a0..f84cf6e 100644 --- a/packer-rocm/playbooks/roles/niccli/vars/main.yml +++ b/packer-rocm/playbooks/roles/niccli/vars/main.yml @@ -10,3 +10,44 @@ niccli_pkg_anyarch: niccli_pkg_ext: Debian: '.deb' RedHat: '.rpm' + +# distribution packages to install before those for 'niccli'; mapped by 'ansible_os_family' fact +niccli_requirements: + common: + - automake # only 'suggested' by 'build-essential' metapkg, not mentioned by 'Development Tools' group + - autoconf # " + - cmake + - dkms + - infiniband-diags + - pciutils + - rdma-core + - strace + - unzip + Debian: + - build-essential + - ibverbs-providers + - ibverbs-utils + - libaio-dev + - libibverbs1 + - libibverbs-dev + - libstdc++-12-dev + - libelf-dev + - libibumad-dev + - librdmacm-dev + - linux-headers-generic + - "linux-headers-{{ ansible_kernel }}" + - "linux-modules-extra-{{ ansible_kernel }}" + - pkg-config + - rdmacm-utils + RedHat: + - '@Development Tools' # group notation (@...) requires quoting + - kernel-headers + - kernel-devel-matched + - kernel-modules-extra + - libstdc++-devel + - libaio-devel + - libibumad + - libibverbs + - libibverbs-utils + - elfutils-libelf-devel + - librdmacm-utils