Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[macOS] Pin version for tcl/tk and pkg-config #10971

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion images/macos/scripts/build/install-common-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ for package in $common_packages; do
# Packer has been deprecated in Homebrew. Use tap to install Packer.
brew install hashicorp/tap/packer
else
brew_smart_install "$package"
if [[ $package == "tcl-tk" ]]; then
# Pin the version for tcl/tk to 8 as a temporary measure.
brew_smart_install "tcl-tk@8"
else
brew_smart_install "$package"
fi
fi
fi
done
Expand Down
15 changes: 15 additions & 0 deletions images/macos/scripts/build/install-pkg-config.sh
Original file line number Diff line number Diff line change
@@ -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/[email protected]

invoke_tests "Common" "pkg-config"
2 changes: 1 addition & 1 deletion images/macos/scripts/docs-gen/SoftwareReport.Common.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
6 changes: 6 additions & 0 deletions images/macos/scripts/tests/Common.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ Describe "Unxip" {
"unxip --version" | Should -ReturnZeroExitCode
}
}

Describe "pkg-config" {
It "pkg-config" {
"pkg-config --version" | Should -ReturnZeroExitCode
}
}
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-13.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-13.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-14.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-14.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-15.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
3 changes: 2 additions & 1 deletion images/macos/templates/macOS-15.arm64.anka.pkr.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}

Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-13.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"p7zip",
"packer",
"perl",
"pkg-config",
"swiftformat",
"tcl-tk",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What will be changed if we just use a package with a version here instead of another condition? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could update as "tcl-tk@8" directly here as well..just thought this would be neat and similar format to earlier pinned versions.

"zstd",
Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-14.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"p7zip",
"packer",
"perl",
"pkg-config",
"swiftformat",
"tcl-tk",
"zstd",
Expand Down
1 change: 0 additions & 1 deletion images/macos/toolsets/toolset-15.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@
"p7zip",
"packer",
"perl",
"pkg-config",
"swiftformat",
"zstd",
"gmp",
Expand Down