From 697b9ed50da07d09ac0d938b08ab15961c9f14d7 Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan Date: Thu, 14 Nov 2024 10:14:42 -0600 Subject: [PATCH] [macOS] Pin version for tcl/tk and pkg-config --- images/macos/scripts/build/install-pkg-config.sh | 15 +++++++++++++++ .../scripts/docs-gen/SoftwareReport.Common.psm1 | 2 +- images/macos/scripts/tests/Common.Tests.ps1 | 6 ++++++ images/macos/templates/macOS-13.anka.pkr.hcl | 3 ++- .../macos/templates/macOS-13.arm64.anka.pkr.hcl | 3 ++- images/macos/templates/macOS-14.anka.pkr.hcl | 3 ++- .../macos/templates/macOS-14.arm64.anka.pkr.hcl | 3 ++- images/macos/templates/macOS-15.anka.pkr.hcl | 3 ++- .../macos/templates/macOS-15.arm64.anka.pkr.hcl | 3 ++- images/macos/toolsets/toolset-13.json | 3 +-- images/macos/toolsets/toolset-14.json | 3 +-- images/macos/toolsets/toolset-15.json | 1 - 12 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 images/macos/scripts/build/install-pkg-config.sh diff --git a/images/macos/scripts/build/install-pkg-config.sh b/images/macos/scripts/build/install-pkg-config.sh new file mode 100644 index 000000000000..77969096b7b5 --- /dev/null +++ b/images/macos/scripts/build/install-pkg-config.sh @@ -0,0 +1,15 @@ +#!/bin/bash -e -o pipefail +################################################################################ +## File: install-pkg-config.sh +## Desc: Install pkg-config +################################################################################ + +source ~/utils/utils.sh + +echo "Installing pkg-config..." + +brew tap-new my-org/old-formulas +brew extract pkg-config my-org/old-formulas --version=0.29.2 +brew install my-org/old-formulas/pkg-config@0.29.2 + +invoke_tests "Common" "pkg-config" diff --git a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 index 158c38b99206..a6a6e2ff299a 100644 --- a/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 +++ b/images/macos/scripts/docs-gen/SoftwareReport.Common.psm1 @@ -538,7 +538,7 @@ function Get-LibXextVersion { } function Get-TclTkVersion { - $tcltkVersion = (Run-Command "brew info --json tcl-tk" | ConvertFrom-Json).installed.version + $tcltkVersion = (Run-Command "brew info --json tcl-tk@8" | ConvertFrom-Json).installed.version return $tcltkVersion } diff --git a/images/macos/scripts/tests/Common.Tests.ps1 b/images/macos/scripts/tests/Common.Tests.ps1 index 4d6ebf8e289c..a42722e39898 100644 --- a/images/macos/scripts/tests/Common.Tests.ps1 +++ b/images/macos/scripts/tests/Common.Tests.ps1 @@ -168,3 +168,9 @@ Describe "Unxip" { "unxip --version" | Should -ReturnZeroExitCode } } + +Describe "pkg-config" { + It "pkg-config" { + "pkg-config --version" | Should -ReturnZeroExitCode + } +} diff --git a/images/macos/templates/macOS-13.anka.pkr.hcl b/images/macos/templates/macOS-13.anka.pkr.hcl index 25789a533f79..e48cfe3c44ad 100644 --- a/images/macos/templates/macOS-13.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.anka.pkr.hcl @@ -218,7 +218,8 @@ build { "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", "${path.root}/../scripts/build/install-common-utils.sh", - "${path.root}/../scripts/build/install-unxip.sh" + "${path.root}/../scripts/build/install-unxip.sh", + "${path.root}/../scripts/build/install-pkg-config.sh" ] } diff --git a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl index 7e03aa8fe7ee..ef0156071fbf 100644 --- a/images/macos/templates/macOS-13.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-13.arm64.anka.pkr.hcl @@ -220,7 +220,8 @@ build { "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", "${path.root}/../scripts/build/install-common-utils.sh", - "${path.root}/../scripts/build/install-unxip.sh" + "${path.root}/../scripts/build/install-unxip.sh", + "${path.root}/../scripts/build/install-pkg-config.sh" ] } diff --git a/images/macos/templates/macOS-14.anka.pkr.hcl b/images/macos/templates/macOS-14.anka.pkr.hcl index a29cd926baff..a0ce3632f784 100644 --- a/images/macos/templates/macOS-14.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.anka.pkr.hcl @@ -217,7 +217,8 @@ build { "${path.root}/../scripts/build/install-rubygems.sh", "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" + "${path.root}/../scripts/build/install-common-utils.sh", + "${path.root}/../scripts/build/install-pkg-config.sh" ] } diff --git a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl index be90e1015288..319395dadb37 100644 --- a/images/macos/templates/macOS-14.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-14.arm64.anka.pkr.hcl @@ -219,7 +219,8 @@ build { "${path.root}/../scripts/build/install-rubygems.sh", "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" + "${path.root}/../scripts/build/install-common-utils.sh", + "${path.root}/../scripts/build/install-pkg-config.sh" ] } diff --git a/images/macos/templates/macOS-15.anka.pkr.hcl b/images/macos/templates/macOS-15.anka.pkr.hcl index 6e93eccf210f..7bb9068bad27 100644 --- a/images/macos/templates/macOS-15.anka.pkr.hcl +++ b/images/macos/templates/macOS-15.anka.pkr.hcl @@ -212,7 +212,8 @@ build { "${path.root}/../scripts/build/install-rubygems.sh", "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" + "${path.root}/../scripts/build/install-common-utils.sh", + "${path.root}/../scripts/build/install-pkg-config.sh" ] } diff --git a/images/macos/templates/macOS-15.arm64.anka.pkr.hcl b/images/macos/templates/macOS-15.arm64.anka.pkr.hcl index 8e72eace0760..4a4a0661fa38 100644 --- a/images/macos/templates/macOS-15.arm64.anka.pkr.hcl +++ b/images/macos/templates/macOS-15.arm64.anka.pkr.hcl @@ -214,7 +214,8 @@ build { "${path.root}/../scripts/build/install-rubygems.sh", "${path.root}/../scripts/build/install-git.sh", "${path.root}/../scripts/build/install-node.sh", - "${path.root}/../scripts/build/install-common-utils.sh" + "${path.root}/../scripts/build/install-common-utils.sh", + "${path.root}/../scripts/build/install-pkg-config.sh" ] } diff --git a/images/macos/toolsets/toolset-13.json b/images/macos/toolsets/toolset-13.json index 1518b52f0f04..e423ffdb5c14 100644 --- a/images/macos/toolsets/toolset-13.json +++ b/images/macos/toolsets/toolset-13.json @@ -72,9 +72,8 @@ "p7zip", "packer", "perl", - "pkg-config", "swiftformat", - "tcl-tk", + "tcl-tk@8", "zstd", "gmp", "yq", diff --git a/images/macos/toolsets/toolset-14.json b/images/macos/toolsets/toolset-14.json index 00d11a727f11..f8fc9eef3a1b 100644 --- a/images/macos/toolsets/toolset-14.json +++ b/images/macos/toolsets/toolset-14.json @@ -75,9 +75,8 @@ "p7zip", "packer", "perl", - "pkg-config", "swiftformat", - "tcl-tk", + "tcl-tk@8", "zstd", "gmp", "yq", diff --git a/images/macos/toolsets/toolset-15.json b/images/macos/toolsets/toolset-15.json index 26f4f849c542..6386bdc3e2aa 100644 --- a/images/macos/toolsets/toolset-15.json +++ b/images/macos/toolsets/toolset-15.json @@ -67,7 +67,6 @@ "p7zip", "packer", "perl", - "pkg-config", "swiftformat", "zstd", "gmp",