From f72db173895db0f08fd5a4ef0d6d0245bab97300 Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan Date: Sun, 8 Dec 2024 19:05:32 -0600 Subject: [PATCH 1/5] [macOS] Add Symlink for tcl-tk8 --- images/macos/scripts/build/install-common-utils.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/images/macos/scripts/build/install-common-utils.sh b/images/macos/scripts/build/install-common-utils.sh index 96a46826b459..b0525c49dfec 100644 --- a/images/macos/scripts/build/install-common-utils.sh +++ b/images/macos/scripts/build/install-common-utils.sh @@ -21,7 +21,13 @@ 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@8" ]]; then + brew_smart_install "$package" + # Fix for https://github.com/actions/runner-images/issues/11074 + ln -sf $(brew --prefix tcl-tk@8) /usr/local/opt/tcl-tk + else + brew_smart_install "$package" + fi fi fi done From b94f50c463920c5efa59de466c7f866b752b58b8 Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan Date: Fri, 13 Dec 2024 11:04:59 -0600 Subject: [PATCH 2/5] [macOS] Add condition for tcl tk only for macOS13 and macOS14 Intel machines --- images/macos/scripts/build/install-common-utils.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/images/macos/scripts/build/install-common-utils.sh b/images/macos/scripts/build/install-common-utils.sh index b0525c49dfec..9f9013538b70 100644 --- a/images/macos/scripts/build/install-common-utils.sh +++ b/images/macos/scripts/build/install-common-utils.sh @@ -21,10 +21,11 @@ for package in $common_packages; do # Packer has been deprecated in Homebrew. Use tap to install Packer. brew install hashicorp/tap/packer else - if [[ $package == "tcl-tk@8" ]]; then + if (is_VenturaX64 || is_SonomaX64) && [[ $package == "tcl-tk@8" ]]; then brew_smart_install "$package" # Fix for https://github.com/actions/runner-images/issues/11074 - ln -sf $(brew --prefix tcl-tk@8) /usr/local/opt/tcl-tk + ln -sf $(brew --prefix tcl-tk@8)/lib/libtcl8.6.dylib /usr/local/lib/libtcl8.6.dylib + ln -sf $(brew --prefix tcl-tk@8)/lib/libtk8.6.dylib /usr/local/lib/libtk8.6.dylib else brew_smart_install "$package" fi From ee1015c4a168d6705593f51795c3b3431acf3eee Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan Date: Fri, 13 Dec 2024 11:28:06 -0600 Subject: [PATCH 3/5] [macOS] Update test case for tcl/tk --- images/macos/scripts/tests/BasicTools.Tests.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images/macos/scripts/tests/BasicTools.Tests.ps1 b/images/macos/scripts/tests/BasicTools.Tests.ps1 index 2db65a1a910f..a879701bfe2b 100644 --- a/images/macos/scripts/tests/BasicTools.Tests.ps1 +++ b/images/macos/scripts/tests/BasicTools.Tests.ps1 @@ -62,10 +62,10 @@ Describe "Perl" { } } -Describe "Tcl/Tk" { +Describe "Tcl/Tk" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) { It "libtcl" { - "file /usr/local/lib/libtcl8.6.dylib" | Should -ReturnZeroExitCode - "file /usr/local/lib/libtk8.6.dylib" | Should -ReturnZeroExitCode + [ -f /usr/local/lib/libtcl8.6.dylib ] | Should -ReturnZeroExitCode + [ -f /usr/local/lib/libtk8.6.dylib ] | Should -ReturnZeroExitCode } } From dc46bb92b223415dfd3a673db09950537e073b69 Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan Date: Fri, 13 Dec 2024 12:12:16 -0600 Subject: [PATCH 4/5] [macOS] Update test cases for tcl/tk for macOS15 --- images/macos/scripts/tests/BasicTools.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/macos/scripts/tests/BasicTools.Tests.ps1 b/images/macos/scripts/tests/BasicTools.Tests.ps1 index a879701bfe2b..b7935850cd59 100644 --- a/images/macos/scripts/tests/BasicTools.Tests.ps1 +++ b/images/macos/scripts/tests/BasicTools.Tests.ps1 @@ -62,7 +62,7 @@ Describe "Perl" { } } -Describe "Tcl/Tk" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64) { +Describe "Tcl/Tk" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoia) { It "libtcl" { [ -f /usr/local/lib/libtcl8.6.dylib ] | Should -ReturnZeroExitCode [ -f /usr/local/lib/libtk8.6.dylib ] | Should -ReturnZeroExitCode From 65dba614f1262a20b97c289eb34c930f6694e0ce Mon Sep 17 00:00:00 2001 From: sarathrajsrinivasan Date: Sat, 14 Dec 2024 00:08:28 -0600 Subject: [PATCH 5/5] [macOS] Update tcl/tk test cases --- images/macos/scripts/tests/BasicTools.Tests.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/macos/scripts/tests/BasicTools.Tests.ps1 b/images/macos/scripts/tests/BasicTools.Tests.ps1 index b7935850cd59..53942da4de88 100644 --- a/images/macos/scripts/tests/BasicTools.Tests.ps1 +++ b/images/macos/scripts/tests/BasicTools.Tests.ps1 @@ -64,8 +64,8 @@ Describe "Perl" { Describe "Tcl/Tk" -Skip:($os.IsVenturaArm64 -or $os.IsSonomaArm64 -or $os.IsSequoia) { It "libtcl" { - [ -f /usr/local/lib/libtcl8.6.dylib ] | Should -ReturnZeroExitCode - [ -f /usr/local/lib/libtk8.6.dylib ] | Should -ReturnZeroExitCode + Test-Path "/usr/local/lib/libtcl8.6.dylib" | Should -BeTrue + Test-Path "/usr/local/lib/libtk8.6.dylib" | Should -BeTrue } }