From 8f82a6446a3fcd099cf7f003b2b70900ccfa2b95 Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Mon, 9 Dec 2024 06:20:17 -0700 Subject: [PATCH 1/5] Add install of .NET 3.5 Adds install of .NET 3.5 for building the MSI installer --- provisioning/windows-provision.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/provisioning/windows-provision.ps1 b/provisioning/windows-provision.ps1 index c130c5d45..9e861df97 100644 --- a/provisioning/windows-provision.ps1 +++ b/provisioning/windows-provision.ps1 @@ -259,6 +259,8 @@ $downloads = [ordered]@{ # Installation of make for Windows & "choco.exe" install make --yes --no-progress --limit-output --fail-on-error-output; & "choco.exe" install vagrant --yes --no-progress --limit-output --fail-on-error-output --version "${env:VAGRANT_VERSION}"; + # install .NET 3.5 for MSI build + & "choco.exe" install dotnet3.5 --yes --no-progress --limit-output --fail-on-error-output # Append a ".1" as all ruby packages in chocolatey have this suffix. Not sure why (maybe a package build id) & "choco.exe" install ruby --yes --no-progress --limit-output --fail-on-error-output --version "${env:RUBY_VERSION}.1"; & "choco.exe" install packer --yes --no-progress --limit-output --fail-on-error-output --version "${env:PACKER_VERSION}"; From 1d9864a3a4c92152c79730b80f27de994f6d16ee Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Mon, 9 Dec 2024 10:54:24 -0700 Subject: [PATCH 2/5] Update windows-provision.ps1 Try different install method --- provisioning/windows-provision.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/provisioning/windows-provision.ps1 b/provisioning/windows-provision.ps1 index 9e861df97..0d4435c02 100644 --- a/provisioning/windows-provision.ps1 +++ b/provisioning/windows-provision.ps1 @@ -259,8 +259,6 @@ $downloads = [ordered]@{ # Installation of make for Windows & "choco.exe" install make --yes --no-progress --limit-output --fail-on-error-output; & "choco.exe" install vagrant --yes --no-progress --limit-output --fail-on-error-output --version "${env:VAGRANT_VERSION}"; - # install .NET 3.5 for MSI build - & "choco.exe" install dotnet3.5 --yes --no-progress --limit-output --fail-on-error-output # Append a ".1" as all ruby packages in chocolatey have this suffix. Not sure why (maybe a package build id) & "choco.exe" install ruby --yes --no-progress --limit-output --fail-on-error-output --version "${env:RUBY_VERSION}.1"; & "choco.exe" install packer --yes --no-progress --limit-output --fail-on-error-output --version "${env:PACKER_VERSION}"; @@ -342,6 +340,9 @@ foreach($k in $downloads.Keys) { } } +# Install .NET 3.5 for MSI build +Install-WindowsFeature Net-Framework-Core + # Special case for Powershell, we need to make sure powershell.exe and pwsh.exe are both available # On Windows Server, Windows Powershell 5.1 is installed by default (powershell.exe) # On nanoserver, Powershell Core 7 is installed by default (pwsh.ex) From b6d06607e7ce4aa7168bb4c39d8804115741937b Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Mon, 9 Dec 2024 14:05:52 -0700 Subject: [PATCH 3/5] Update windows-provision.ps1 Dump the log file from DISM --- provisioning/windows-provision.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/provisioning/windows-provision.ps1 b/provisioning/windows-provision.ps1 index 0d4435c02..1f2234ebe 100644 --- a/provisioning/windows-provision.ps1 +++ b/provisioning/windows-provision.ps1 @@ -259,6 +259,11 @@ $downloads = [ordered]@{ # Installation of make for Windows & "choco.exe" install make --yes --no-progress --limit-output --fail-on-error-output; & "choco.exe" install vagrant --yes --no-progress --limit-output --fail-on-error-output --version "${env:VAGRANT_VERSION}"; + # install .NET 3.5 for MSI build + & "choco.exe" install dotnet3.5 --yes --no-progress --limit-output --fail-on-error-output + if(Test-Path "C:\Windows\Logs\DISM\dism.log") { + Get-Content "C:\Windows\Logs\DISM\dism.log" + } # Append a ".1" as all ruby packages in chocolatey have this suffix. Not sure why (maybe a package build id) & "choco.exe" install ruby --yes --no-progress --limit-output --fail-on-error-output --version "${env:RUBY_VERSION}.1"; & "choco.exe" install packer --yes --no-progress --limit-output --fail-on-error-output --version "${env:PACKER_VERSION}"; @@ -340,9 +345,6 @@ foreach($k in $downloads.Keys) { } } -# Install .NET 3.5 for MSI build -Install-WindowsFeature Net-Framework-Core - # Special case for Powershell, we need to make sure powershell.exe and pwsh.exe are both available # On Windows Server, Windows Powershell 5.1 is installed by default (powershell.exe) # On nanoserver, Powershell Core 7 is installed by default (pwsh.ex) From 256c39e20eb15d6d41fc81d5a33d5b91b7c98a94 Mon Sep 17 00:00:00 2001 From: Alex Earl Date: Mon, 16 Dec 2024 08:37:16 -0700 Subject: [PATCH 4/5] Add dotnet35 test Adds test for .NET 3.5 installation --- tests/goss-windows.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/goss-windows.yaml b/tests/goss-windows.yaml index 2592f3440..9dffe2e76 100644 --- a/tests/goss-windows.yaml +++ b/tests/goss-windows.yaml @@ -61,6 +61,11 @@ command: exit-status: 0 stdout: - 2.4.3 + dotnet35: + exec: pwsh -command "Test-Path -Path 'HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5'" + exit-status: 0 + stdout: + - True file: C:\Program Files\Chromium\Application\: contains: [] From 8a840c0623bf68ec9ab5cbc507512e0a3b9ad9ac Mon Sep 17 00:00:00 2001 From: Damien Duportal Date: Wed, 18 Dec 2024 10:35:47 +0100 Subject: [PATCH 5/5] Update tests/goss-windows.yaml --- tests/goss-windows.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/goss-windows.yaml b/tests/goss-windows.yaml index 9dffe2e76..919be905b 100644 --- a/tests/goss-windows.yaml +++ b/tests/goss-windows.yaml @@ -65,7 +65,7 @@ command: exec: pwsh -command "Test-Path -Path 'HKLM:\\SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5'" exit-status: 0 stdout: - - True + - 'True' file: C:\Program Files\Chromium\Application\: contains: []