From 1773dd7a92ca417c6eb0982ff295baf074fe052d Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:44:24 +0300 Subject: [PATCH 01/50] Add msys2 install script --- .../Installers/Windows2019/Install-Msys2.ps1 | 79 +++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 diff --git a/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 b/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 new file mode 100644 index 00000000..88c6b6ef --- /dev/null +++ b/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 @@ -0,0 +1,79 @@ +################################################################################ +## File: Install-MSYS2.ps1 +## Desc: Install MSYS2 and 64-bit gcc, cmake, & llvm (32-bit commented out) +################################################################################ + +# References +# https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml +# https://packages.msys2.org/group/ + +$env:orig_path = $env:PATH +$env:git_path = "C:\Program Files\Git" + +# get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ +$msy2_uri = "https://netix.dl.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20190524.tar.xz" +$msy2_file = "C:\Windows\Temp\msys2.tar.xz" + +# Download the latest msys2 x86_64 +Write-Host "Starting msys2 download..." +(New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) +Write-Host "Finished download" + +$msy2_file_u = "/$msy2_file".replace(':', '') + +# git has tar.exe in usr/bin, but xz.exe is in mingw64/bin +$env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" +$tar = "$env:git_path\usr\bin\tar.exe" + +# extract tar.xz to C:\ +Write-Host "Starting extraction..." +&$tar -Jxf $msy2_file_u -C /c/ +Remove-Item $msy2_file + +Write-Host "Finished extraction" + +$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" + +Write-Host "bash.exe -c pacman-key --init" +bash.exe -c "pacman-key --init" + +Write-Host "bash.exe -c pacman-key --populate msys2" +bash.exe -c "pacman-key --populate msys2" + +Write-Host "pacman --noconfirm -Syyuu" +pacman.exe -Syyuu --noconfirm + +# install msys2 packages +Write-Host "Install msys2 packages" +pacman.exe -S --noconfirm --needed --noprogressbar base-devel compression + +# mingw package list +$tools = "___clang ___cmake ___llvm ___toolchain ___ragel" + +# install mingw64 packages +Write-Host "Install mingw64 packages" +$pre = "mingw-w64-x86_64-" +pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') + +# install mingw32 packages +Write-Host "Install mingw32 packages" +$pre = "mingw-w64-i686-" +pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') + +# clean all packages to decrease image size +Write-Host "Clean packages" +pacman.exe -Scc --noconfirm + +Write-Host +Write-Host "Installed mingw64 packages" +pacman.exe -Qs --noconfirm mingw-w64-x86_64- + +Write-Host +Write-Host "Installed mingw32 packages" +pacman.exe -Qs --noconfirm mingw-w64-i686- + +Write-Host +Write-Host "Installed msys2 packages" +pacman.exe -Qs --noconfirm + +exit 0 \ No newline at end of file From 9630ed7c1d2e4567577e1a05521a33b087b98f44 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:49:04 +0300 Subject: [PATCH 02/50] Add msys2 to template --- images/win/Windows2019-Azure.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index c6df555b..fd4e2685 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -139,6 +139,12 @@ "{{ template_dir }}/scripts/Installers/Update-ImageData.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-MSYS2.ps1" + ] + }, { "type": "powershell", "scripts":[ From 25ed30427cc08f63536eb756c433e13a4d7eb505 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:53:00 +0300 Subject: [PATCH 03/50] Fix filename --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index fd4e2685..0f432b6c 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -142,7 +142,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-MSYS2.ps1" + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" ] }, { From d4ef717e85e5df5eb099c36f1257465caea6e999 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 13 Mar 2020 14:55:39 +0300 Subject: [PATCH 04/50] Fix filename --- images/win/Windows2019-Azure.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 0f432b6c..eb574cec 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -142,7 +142,7 @@ { "type": "powershell", "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + "{{ template_dir }}/scripts/Installers/Windows2019/Install-Msys2.ps1" ] }, { From 1cfa87b4a6b2950af3dc9de3c5405d3f8e50e357 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov Date: Tue, 17 Mar 2020 10:54:05 +0300 Subject: [PATCH 05/50] remove boost binaries from path --- images/win/Windows2016-Azure.json | 9 ++---- images/win/Windows2019-Azure.json | 6 ++-- .../win/scripts/Installers/Install-Boost.ps1 | 8 ----- .../win/scripts/Installers/Validate-Boost.ps1 | 29 +------------------ 4 files changed, 6 insertions(+), 46 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 0ad1e3f4..ed318c65 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -30,8 +30,7 @@ "image_os": "win16", "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14", - "go_default": "1.14", - "boost_default": "1.69.0" + "go_default": "1.14" }, "sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"], "builders": [ @@ -517,8 +516,7 @@ { "type": "powershell", "environment_vars": [ - "ROOT_FOLDER={{user `root_folder`}}", - "BOOST_DEFAULT={{user `boost_default`}}" + "ROOT_FOLDER={{user `root_folder`}}" ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Boost.ps1" @@ -652,8 +650,7 @@ { "type": "powershell", "environment_vars": [ - "ROOT_FOLDER={{user `root_folder`}}", - "BOOST_DEFAULT={{user `boost_default`}}" + "ROOT_FOLDER={{user `root_folder`}}" ], "scripts":[ "{{ template_dir }}/scripts/Installers/Validate-Boost.ps1" diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 2023be50..0441f91f 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -30,8 +30,7 @@ "image_os": "win19", "github_feed_token": "{{env `GITHUB_FEED_TOKEN`}}", "go_versions": "1.9, 1.10, 1.11, 1.12, 1.13, 1.14", - "go_default": "1.14", - "boost_default": "1.72.0" + "go_default": "1.14" }, "sensitive-variables": ["install_password", "ssh_password", "client_secret", "github_feed_token"], "builders": [ @@ -498,8 +497,7 @@ { "type": "powershell", "environment_vars": [ - "ROOT_FOLDER={{user `root_folder`}}", - "BOOST_DEFAULT={{user `boost_default`}}" + "ROOT_FOLDER={{user `root_folder`}}" ], "scripts":[ "{{ template_dir }}/scripts/Installers/Install-Boost.ps1" diff --git a/images/win/scripts/Installers/Install-Boost.ps1 b/images/win/scripts/Installers/Install-Boost.ps1 index 0931fb25..d46a150c 100644 --- a/images/win/scripts/Installers/Install-Boost.ps1 +++ b/images/win/scripts/Installers/Install-Boost.ps1 @@ -9,7 +9,6 @@ Import-Module -Name ImageHelpers $SoftwareName = "Boost" $BoostDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $SoftwareName $BoostVersions = (Get-ToolsByName -SoftwareName $SoftwareName).Versions | Foreach-Object {"{0}.0" -f $_} -$BoostDefault = $env:BOOST_DEFAULT foreach($BoostVersion in $BoostVersions) { @@ -17,11 +16,4 @@ foreach($BoostVersion in $BoostVersions) $EnvBoostPath = "BOOST_ROOT_{0}" -f ($BoostVersion.Replace('.', '_')) setx $EnvBoostPath $BoostInstallationDir /M | Out-Null - - if ($BoostVersion -eq $BoostDefault) - { - Write-Host "Adding Boost $BoostVersion to the path..." - # Add the Boost binaries to the path - Add-MachinePathItem $BoostInstallationDir | Out-Null - } } diff --git a/images/win/scripts/Installers/Validate-Boost.ps1 b/images/win/scripts/Installers/Validate-Boost.ps1 index 6289e165..e9b7554e 100644 --- a/images/win/scripts/Installers/Validate-Boost.ps1 +++ b/images/win/scripts/Installers/Validate-Boost.ps1 @@ -18,7 +18,6 @@ function Validate-BoostVersion if (Test-Path "$ReleasePath\b2.exe") { Write-Host "Boost.Build $BoostRelease is successfully installed" - return } @@ -26,17 +25,6 @@ function Validate-BoostVersion exit 1 } -# Verify that Boost is on the path -if (Get-Command -Name 'b2') -{ - Write-Host "Boost is on the path" -} -else -{ - Write-Host "Boost is not on the path" - exit 1 -} - # Adding description of the software to Markdown $tmplMark = @" #### {0} [{2}] @@ -46,14 +34,6 @@ _Environment:_ "@ -$tmplMarkRoot = @" -#### {0} [{2}] - -_Environment:_ -* PATH: contains the location of Boost version {0} -* {1}: root directory of the Boost version {0} installation -"@ - $Description = New-Object System.Text.StringBuilder $SoftwareName = 'Boost' $BoostRootDirectory = Join-Path -Path $env:AGENT_TOOLSDIRECTORY -ChildPath $SoftwareName @@ -68,14 +48,7 @@ foreach ($BoostTool in $BoostTools) Validate-BoostVersion -BoostRootPath $BoostRootDirectory -BoostRelease $BoostVersion $BoostVersionTag = "BOOST_ROOT_{0}" -f $BoostVersion.Replace('.', '_') - if($BoostVersion -eq $env:BOOST_DEFAULT) - { - $null = $Description.AppendLine(($tmplMarkRoot -f $BoostVersion, $BoostVersionTag, $BoostToolsetName)) - } - else - { - $null = $Description.AppendLine(($tmplMark -f $BoostVersion, $BoostVersionTag, $BoostToolsetName)) - } + $null = $Description.AppendLine(($tmplMark -f $BoostVersion, $BoostVersionTag, $BoostToolsetName)) } } From ab8fb88d957e2a2c5fcc57bed00aec2515ff4015 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 17 Mar 2020 11:07:29 +0300 Subject: [PATCH 06/50] Add validate spript --- images/win/Windows2019-Azure.json | 18 ++++-- .../{Windows2019 => }/Install-Msys2.ps1 | 27 +++++---- .../win/scripts/Installers/Validate-Msys2.ps1 | 57 +++++++++++++++++++ 3 files changed, 84 insertions(+), 18 deletions(-) rename images/win/scripts/Installers/{Windows2019 => }/Install-Msys2.ps1 (78%) create mode 100644 images/win/scripts/Installers/Validate-Msys2.ps1 diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index eb574cec..a8623ef2 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -139,12 +139,6 @@ "{{ template_dir }}/scripts/Installers/Update-ImageData.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -470,6 +464,12 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -604,6 +604,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" + ] + }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 similarity index 78% rename from images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 rename to images/win/scripts/Installers/Install-Msys2.ps1 index 88c6b6ef..73d7b81d 100644 --- a/images/win/scripts/Installers/Windows2019/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -11,11 +11,11 @@ $env:orig_path = $env:PATH $env:git_path = "C:\Program Files\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ -$msy2_uri = "https://netix.dl.sourceforge.net/project/msys2/Base/x86_64/msys2-base-x86_64-20190524.tar.xz" +$msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" $msy2_file = "C:\Windows\Temp\msys2.tar.xz" # Download the latest msys2 x86_64 -Write-Host "Starting msys2 download..." +Write-Host "Starting download" (New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) Write-Host "Finished download" @@ -26,22 +26,26 @@ $env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" $tar = "$env:git_path\usr\bin\tar.exe" # extract tar.xz to C:\ -Write-Host "Starting extraction..." +Write-Host "Starting extraction" &$tar -Jxf $msy2_file_u -C /c/ Remove-Item $msy2_file -Write-Host "Finished extraction" +Write-Host Finished extraction $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" -Write-Host "bash.exe -c pacman-key --init" -bash.exe -c "pacman-key --init" +$ErrorActionPreference = "Continue" -Write-Host "bash.exe -c pacman-key --populate msys2" -bash.exe -c "pacman-key --populate msys2" +Write-Host "sh -c pacman-key --init" +Invoke-Expression "bash -c `"pacman-key --init 2>&1`"" + + +Write-Host "sh.exe -c pacman-key --populate msys2" +Invoke-Expression "sh -c `"pacman-key --populate msys2 2>&1`"" Write-Host "pacman --noconfirm -Syyuu" -pacman.exe -Syyuu --noconfirm +pacman.exe -Syyuu --noconfirm 2>$null +pacman.exe -Syuu --noconfirm 2>$null # install msys2 packages Write-Host "Install msys2 packages" @@ -64,16 +68,15 @@ pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).s Write-Host "Clean packages" pacman.exe -Scc --noconfirm -Write-Host Write-Host "Installed mingw64 packages" pacman.exe -Qs --noconfirm mingw-w64-x86_64- -Write-Host Write-Host "Installed mingw32 packages" pacman.exe -Qs --noconfirm mingw-w64-i686- -Write-Host Write-Host "Installed msys2 packages" pacman.exe -Qs --noconfirm +Write-Host "MSYS2 installation completed" + exit 0 \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 new file mode 100644 index 00000000..9b0492a3 --- /dev/null +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -0,0 +1,57 @@ +################################################################################ +## File: Validate-MSYS2.ps1 +## Desc: Validate MSYS2 +################################################################################ + +if (Get-Command -Name 'gcc') +{ + Write-Host "gcc is successfully installed:" + gcc --version | Write-Host +} +else +{ + Write-Host "gcc is not on PATH" + exit 1 +} + +if (Get-Command -Name 'g++') +{ + Write-Host "g++ is successfully installed:" + g++ --version | Write-Host +} +else +{ + Write-Host "g++ is not on PATH" + exit 1 +} + +if (Get-Command -Name 'make') +{ + Write-Host "make is successfully installed:" + make --version | Write-Host +} +else +{ + Write-Host "make is not on PATH" + exit 1 +} + +Adding description of the software to Markdown + +`gcc --version` gives output like: +gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 +Copyright (C) 2015 Free Software Foundation, Inc. +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + +$SoftwareName = "MinGW" +$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" +$minGwVersion = $matches[0] + +$Description = @" +_Version:_ $minGwVersion
+_Environment:_ +* PATH: contains location of the MinGW 'bin' directory +"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 8583664d46e0b4726bf407f8416efd33c967db9b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 17 Mar 2020 21:07:56 +0300 Subject: [PATCH 07/50] Test elevated user --- images/win/Windows2019-Azure.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index a8623ef2..f8ebb4bc 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -478,6 +478,8 @@ }, { "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-TypeScript.ps1" ] From 0b0f21043e6da2b4ee0145be9bcd65f67d987a8d Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 09:16:21 +0300 Subject: [PATCH 08/50] Test elevated user --- images/win/Windows2019-Azure.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index f8ebb4bc..eba725ee 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -151,6 +151,14 @@ "{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "windows-restart", "restart_timeout": "10m" @@ -464,12 +472,6 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -478,8 +480,6 @@ }, { "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", "scripts":[ "{{ template_dir }}/scripts/Installers/Install-TypeScript.ps1" ] From e68c39c1bd64ce38333b68a389bcbb6d5834757e Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 09:26:14 +0300 Subject: [PATCH 09/50] Test --- images/win/Windows2019-Azure.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index eba725ee..c32d8bb7 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -102,6 +102,14 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -151,14 +159,6 @@ "{{ template_dir }}/scripts/Installers/Install-PowershellCore.ps1" ] }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "windows-restart", "restart_timeout": "10m" From 7339af8a51262b2ba747cecc84225a3dc9f17731 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 10:19:10 +0300 Subject: [PATCH 10/50] Test --- images/win/Windows2019-Azure.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index c32d8bb7..e51a7281 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -102,6 +102,12 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Git.ps1" + ] + }, { "type": "powershell", "elevated_user": "SYSTEM", @@ -312,12 +318,6 @@ "{{ template_dir }}/scripts/Installers/Install-Perl.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Git.ps1" - ] - }, { "type": "powershell", "environment_vars": [ From e269c20b6a8968cfaf995e774e70a48f96a4ac52 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 18 Mar 2020 12:02:58 +0300 Subject: [PATCH 11/50] Test --- images/win/Windows2019-Azure.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index e51a7281..07674aaa 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -102,20 +102,6 @@ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Git.ps1" - ] - }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -318,6 +304,12 @@ "{{ template_dir }}/scripts/Installers/Install-Perl.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Git.ps1" + ] + }, { "type": "powershell", "environment_vars": [ @@ -472,6 +464,14 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ From 3f05ba0dba6724d6c84eec579d9c10b58212a217 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 19 Mar 2020 09:24:11 +0300 Subject: [PATCH 12/50] Add msys2 to windows-2016 --- images/win/Windows2016-Azure.json | 14 ++++++++++++++ images/win/scripts/Installers/Install-Msys2.ps1 | 14 ++++++-------- images/win/scripts/Installers/Validate-Msys2.ps1 | 10 +++++----- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 94f200b0..df3aa473 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -483,6 +483,14 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, + { + "type": "powershell", + "elevated_user": "SYSTEM", + "elevated_password": "", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -611,6 +619,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" + ] + }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 73d7b81d..62195aaa 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -15,7 +15,7 @@ $msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.ta $msy2_file = "C:\Windows\Temp\msys2.tar.xz" # Download the latest msys2 x86_64 -Write-Host "Starting download" +Write-Host "Starting msys2 download" (New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) Write-Host "Finished download" @@ -26,22 +26,20 @@ $env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" $tar = "$env:git_path\usr\bin\tar.exe" # extract tar.xz to C:\ -Write-Host "Starting extraction" +Write-Host "Starting msys2 extraction" &$tar -Jxf $msy2_file_u -C /c/ Remove-Item $msy2_file - -Write-Host Finished extraction +Write-Host "Finished extraction" $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" $ErrorActionPreference = "Continue" -Write-Host "sh -c pacman-key --init" +Write-Host "bash -c pacman-key --init" Invoke-Expression "bash -c `"pacman-key --init 2>&1`"" - -Write-Host "sh.exe -c pacman-key --populate msys2" -Invoke-Expression "sh -c `"pacman-key --populate msys2 2>&1`"" +Write-Host "bash -c pacman-key --populate msys2" +Invoke-Expression "bash -c `"pacman-key --populate msys2 2>&1`"" Write-Host "pacman --noconfirm -Syyuu" pacman.exe -Syyuu --noconfirm 2>$null diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 9b0492a3..31c8ea88 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -38,11 +38,11 @@ else Adding description of the software to Markdown -`gcc --version` gives output like: -gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 -Copyright (C) 2015 Free Software Foundation, Inc. -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# `gcc --version` gives output like: +# gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 +# Copyright (C) 2015 Free Software Foundation, Inc. +# This is free software; see the source for copying conditions. There is NO +# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $SoftwareName = "MinGW" $(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" From 07b107e7343312538a4577fdeb97a07168c30d96 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Thu, 19 Mar 2020 09:25:53 +0300 Subject: [PATCH 13/50] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 ++-- images/win/scripts/Installers/Validate-Msys2.ps1 | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 62195aaa..5f7ec137 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -1,6 +1,6 @@ ################################################################################ -## File: Install-MSYS2.ps1 -## Desc: Install MSYS2 and 64-bit gcc, cmake, & llvm (32-bit commented out) +## File: Install-Msys2.ps1 +## Desc: Install Msys2 and 64-bit gcc, cmake, & llvm (32-bit commented out) ################################################################################ # References diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 31c8ea88..3554b603 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -1,6 +1,6 @@ ################################################################################ -## File: Validate-MSYS2.ps1 -## Desc: Validate MSYS2 +## File: Validate-Msys2.ps1 +## Desc: Validate Msys2 ################################################################################ if (Get-Command -Name 'gcc') @@ -36,7 +36,7 @@ else exit 1 } -Adding description of the software to Markdown +# Adding description of the software to Markdown # `gcc --version` gives output like: # gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 From b7714ce050888355c6ac0611539afc190ffd8b1d Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Thu, 19 Mar 2020 15:37:31 +0300 Subject: [PATCH 14/50] added Win10 SDK to 2019 env --- images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 | 1 + 1 file changed, 1 insertion(+) diff --git a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 index a9658fd7..1ccd5c42 100644 --- a/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 +++ b/images/win/scripts/Installers/Windows2019/Install-VS2019.ps1 @@ -121,6 +121,7 @@ $WorkLoads = '--allWorkloads --includeRecommended ' + ` '--add Microsoft.VisualStudio.Component.VC.v141.MFC.ARM.Spectre ' + ` '--add Microsoft.VisualStudio.Component.VC.v141.MFC.ARM64.Spectre ' + ` '--add Microsoft.VisualStudio.Component.VC.v141.MFC.Spectre ' + ` + '--add Microsoft.VisualStudio.Component.Windows10SDK.14393 ' + ` '--add Microsoft.VisualStudio.Component.Windows10SDK.16299 ' + ` '--add Microsoft.VisualStudio.Component.Windows10SDK.17134 ' + ` '--add Microsoft.VisualStudio.Component.Windows10SDK.17763 ' + ` From 231b522b32c2618e052a847b6f8340955ef2cd8d Mon Sep 17 00:00:00 2001 From: Marco Mansi Date: Thu, 19 Mar 2020 16:20:32 +0100 Subject: [PATCH 15/50] Solve error with Set-ExecutionPolicy --- images/win/Windows2016-Azure.json | 3 ++- images/win/Windows2019-Azure.json | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 0ad1e3f4..16d9cea8 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -101,7 +101,8 @@ ], "scripts":[ "{{ template_dir }}/scripts/Installers/Windows2016/Initialize-VM.ps1" - ] + ], + "execution_policy": "unrestricted" }, { "type": "powershell", diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 2023be50..8c9aa7a2 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -101,7 +101,8 @@ ], "scripts":[ "{{ template_dir }}/scripts/Installers/Windows2019/Initialize-VM.ps1" - ] + ], + "execution_policy": "unrestricted" }, { "type": "powershell", From a0f02d634c32cf010c02f670c7aa2dfeb756d316 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 20 Mar 2020 09:42:31 +0300 Subject: [PATCH 16/50] fixed default version mark --- images/linux/scripts/installers/java-tools.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index 61d39af0..e24ebb24 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -71,8 +71,8 @@ echo "Lastly, documenting what we added to the metadata file" DocumentInstalledItem "Azul Zulu OpenJDK:" DocumentInstalledItemIndent "7 ($(/usr/lib/jvm/zulu-7-azure-amd64/bin/java -showversion |& head -n 1))" DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/zulu-8-azure-amd64/bin/java -showversion |& head -n 1))" -DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/zulu-11-azure-amd64/bin/java -showversion |& head -n 1))" -DocumentInstalledItemIndent "12 ($(/usr/lib/jvm/zulu-12-azure-amd64/bin/java -showversion |& head -n 1)) (default)" +DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/zulu-11-azure-amd64/bin/java -showversion |& head -n 1)) (default)" +DocumentInstalledItemIndent "12 ($(/usr/lib/jvm/zulu-12-azure-amd64/bin/java -showversion |& head -n 1))" DocumentInstalledItem "Ant ($(ant -version))" DocumentInstalledItem "Gradle ${gradleVersion}" DocumentInstalledItem "Maven ($(mvn -version | head -n 1))" From 326bf84da439768c3c7a14309e584e8a1818a38c Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 09:56:20 +0300 Subject: [PATCH 17/50] Fix var names --- .../win/scripts/Installers/Install-Msys2.ps1 | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 5f7ec137..312a9d02 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -7,31 +7,31 @@ # https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml # https://packages.msys2.org/group/ -$env:orig_path = $env:PATH -$env:git_path = "C:\Program Files\Git" +$env:origPath = $env:PATH +$env:gitPath = "C:\Program Files\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ -$msy2_uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" -$msy2_file = "C:\Windows\Temp\msys2.tar.xz" +$msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" +$msys2File = "C:\Windows\Temp\msys2.tar.xz" # Download the latest msys2 x86_64 Write-Host "Starting msys2 download" -(New-Object System.Net.WebClient).DownloadFile($msy2_uri, $msy2_file) +(New-Object System.Net.WebClient).DownloadFile($msys2Uri, $msys2File) Write-Host "Finished download" -$msy2_file_u = "/$msy2_file".replace(':', '') +$msys2FileU = "/$msys2File".replace(':', '') # git has tar.exe in usr/bin, but xz.exe is in mingw64/bin -$env:PATH = "$env:git_path\mingw64\bin;$env:orig_path" -$tar = "$env:git_path\usr\bin\tar.exe" +$env:PATH = "$env:gitPath\mingw64\bin;$env:origPath" +$tar = "$env:gitPath\usr\bin\tar.exe" # extract tar.xz to C:\ Write-Host "Starting msys2 extraction" -&$tar -Jxf $msy2_file_u -C /c/ -Remove-Item $msy2_file +&$tar -Jxf $msys2FileU -C /c/ +Remove-Item $msys2File Write-Host "Finished extraction" -$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:orig_path" +$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:origPath" $ErrorActionPreference = "Continue" From 3fdcbbd94f438643271d2948713b9f3cd8766ab3 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 09:58:12 +0300 Subject: [PATCH 18/50] Fix gcc version parsing --- images/win/scripts/Installers/Validate-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 3554b603..187e219d 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -45,7 +45,7 @@ else # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $SoftwareName = "MinGW" -$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d\.\d\.\d$" +$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+\.\d+$" $minGwVersion = $matches[0] $Description = @" From 1da149aefd72c3a6a07f4fd87ccdf74e695e99e2 Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Fri, 20 Mar 2020 10:22:15 +0300 Subject: [PATCH 19/50] fixed default version mark --- images/linux/scripts/installers/java-tools.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/linux/scripts/installers/java-tools.sh b/images/linux/scripts/installers/java-tools.sh index e24ebb24..c4586039 100644 --- a/images/linux/scripts/installers/java-tools.sh +++ b/images/linux/scripts/installers/java-tools.sh @@ -70,8 +70,8 @@ done echo "Lastly, documenting what we added to the metadata file" DocumentInstalledItem "Azul Zulu OpenJDK:" DocumentInstalledItemIndent "7 ($(/usr/lib/jvm/zulu-7-azure-amd64/bin/java -showversion |& head -n 1))" -DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/zulu-8-azure-amd64/bin/java -showversion |& head -n 1))" -DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/zulu-11-azure-amd64/bin/java -showversion |& head -n 1)) (default)" +DocumentInstalledItemIndent "8 ($(/usr/lib/jvm/zulu-8-azure-amd64/bin/java -showversion |& head -n 1)) (default)" +DocumentInstalledItemIndent "11 ($(/usr/lib/jvm/zulu-11-azure-amd64/bin/java -showversion |& head -n 1))" DocumentInstalledItemIndent "12 ($(/usr/lib/jvm/zulu-12-azure-amd64/bin/java -showversion |& head -n 1))" DocumentInstalledItem "Ant ($(ant -version))" DocumentInstalledItem "Gradle ${gradleVersion}" From a4c66572ab7d009b024edc907c89cd2f8620291f Mon Sep 17 00:00:00 2001 From: Michael Mainer Date: Fri, 20 Mar 2020 01:14:49 -0700 Subject: [PATCH 20/50] Update Install-PHP.ps1 to include Composer 1. Install Composer from Chocolatey. PHP needs its dependency manager. 2. Enable php_openssl.dll - believe this is necessary in the case someone wants to update Composer. **Reference** https://chocolatey.org/packages/composer https://github.com/actions/virtual-environments/issues/587 https://superuser.com/questions/1010080/the-openssl-extension-is-missing-on-windows-while-installing-composer --- images/win/scripts/Installers/Install-PHP.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-PHP.ps1 b/images/win/scripts/Installers/Install-PHP.ps1 index 02d38931..72db2ee2 100644 --- a/images/win/scripts/Installers/Install-PHP.ps1 +++ b/images/win/scripts/Installers/Install-PHP.ps1 @@ -10,8 +10,11 @@ Import-Module -Name ImageHelpers $installDir = "c:\tools\php" choco install php -y --force --params "/InstallDir:$installDir" -# update path to extensions and enable curl and mbstring extensions -((Get-Content -path $installDir\php.ini -Raw) -replace ';extension=curl','extension=curl' -replace ';extension=mbstring','extension=mbstring' -replace ';extension_dir = "ext"','extension_dir = "ext"') | Set-Content -Path $installDir\php.ini +# Install latest Composer in chocolatey +choco install composer --ia "/DEV=$installDir /PHP=$installDir" + +# update path to extensions and enable curl and mbstring extensions, and enable php openssl extensions. +((Get-Content -path $installDir\php.ini -Raw) -replace ';extension=curl','extension=curl' -replace ';extension=mbstring','extension=mbstring' -replace ';extension_dir = "ext"','extension_dir = "ext"' -replace 'extension=";php_openssl.dll"','extension_dir = "php_openssl.dll"') | Set-Content -Path $installDir\php.ini # Set the PHPROOT environment variable. setx PHPROOT $installDir /M From 030197e844770f3fe5bc46c0544499f43655f9aa Mon Sep 17 00:00:00 2001 From: Michael Mainer Date: Fri, 20 Mar 2020 01:50:21 -0700 Subject: [PATCH 21/50] Update Validate-PHP.ps1 Add validation for composer install --- .../win/scripts/Installers/Validate-PHP.ps1 | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/images/win/scripts/Installers/Validate-PHP.ps1 b/images/win/scripts/Installers/Validate-PHP.ps1 index a8663617..f2f26a52 100644 --- a/images/win/scripts/Installers/Validate-PHP.ps1 +++ b/images/win/scripts/Installers/Validate-PHP.ps1 @@ -33,6 +33,32 @@ else exit 1 } +# Verify that composer.exe is on the path +if(Get-Command -Name 'composer') +{ + Write-Host "$(composer --version) is on the path." +} +else +{ + Write-Host "composer is not on the path." + exit 1 +} + +# Get the composer version. +$composerVersion = $(composer --version) + +# Add composer version details in Markdown +$SoftwareName = "Composer" +$Description = @" +#### $composerVersion + +_Environment:_ +* PATH: contains the location of composer.exe version $composerVersion +* PHPROOT: root directory of the Composer $composerVersion installation +"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description + # Get available versions of PHP $phpVersionOnPath = Get-PHPVersion -phpRootPath "C:\tools\php72" From 58591f939b998e2ab0ebbca0c2f486e95f9647cc Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 12:47:52 +0300 Subject: [PATCH 22/50] Remove redirect stderr to stdout --- .../win/scripts/Installers/Install-Msys2.ps1 | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 312a9d02..197461c6 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -7,12 +7,12 @@ # https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml # https://packages.msys2.org/group/ -$env:origPath = $env:PATH -$env:gitPath = "C:\Program Files\Git" +$origPath = $env:PATH +$gitPath = "C:\Program Files\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ $msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" -$msys2File = "C:\Windows\Temp\msys2.tar.xz" +$msys2File = "$env:TEMP\msys2.tar.xz" # Download the latest msys2 x86_64 Write-Host "Starting msys2 download" @@ -22,8 +22,8 @@ Write-Host "Finished download" $msys2FileU = "/$msys2File".replace(':', '') # git has tar.exe in usr/bin, but xz.exe is in mingw64/bin -$env:PATH = "$env:gitPath\mingw64\bin;$env:origPath" -$tar = "$env:gitPath\usr\bin\tar.exe" +$env:PATH = "$gitPath\mingw64\bin;$origPath" +$tar = "$gitPath\usr\bin\tar.exe" # extract tar.xz to C:\ Write-Host "Starting msys2 extraction" @@ -31,21 +31,20 @@ Write-Host "Starting msys2 extraction" Remove-Item $msys2File Write-Host "Finished extraction" -$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$env:origPath" +$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" $ErrorActionPreference = "Continue" Write-Host "bash -c pacman-key --init" -Invoke-Expression "bash -c `"pacman-key --init 2>&1`"" +Invoke-Expression "bash -c `"pacman-key --init`"" Write-Host "bash -c pacman-key --populate msys2" -Invoke-Expression "bash -c `"pacman-key --populate msys2 2>&1`"" +Invoke-Expression "bash -c `"pacman-key --populate msys2`"" Write-Host "pacman --noconfirm -Syyuu" -pacman.exe -Syyuu --noconfirm 2>$null -pacman.exe -Syuu --noconfirm 2>$null +pacman.exe -Syyuu --noconfirm +pacman.exe -Syuu --noconfirm -# install msys2 packages Write-Host "Install msys2 packages" pacman.exe -S --noconfirm --needed --noprogressbar base-devel compression From 2123c3ae499326998b351ca1838be3d56207a57c Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 20 Mar 2020 13:46:12 +0300 Subject: [PATCH 23/50] Update templates --- .github/PULL_REQUEST_TEMPLATE/bug-fixing.md | 17 +++++++++++ .../PULL_REQUEST_TEMPLATE/new-tool-adding.md | 29 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE/bug-fixing.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/new-tool-adding.md diff --git a/.github/PULL_REQUEST_TEMPLATE/bug-fixing.md b/.github/PULL_REQUEST_TEMPLATE/bug-fixing.md new file mode 100644 index 00000000..751c1075 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/bug-fixing.md @@ -0,0 +1,17 @@ +--- +name: Bug fixing and improvements +about: Fix existing bug with images or code improvements +title: '' +labels: '' +assignees: '' + +--- + +**Description** + +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. + +**Check list** +- [ ] non-breaking change which fixes an issue +- [ ] breaking change / regression +- [ ] Related images are successfully generated \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE/new-tool-adding.md b/.github/PULL_REQUEST_TEMPLATE/new-tool-adding.md new file mode 100644 index 00000000..86b282d9 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/new-tool-adding.md @@ -0,0 +1,29 @@ +--- +name: Add new tool +about: Add a new tool or update the existing one +title: Update/Add [tool name] +labels: '' +assignees: '' + +--- + +**Tool information** +- Tool name: +- URL for tool's homepage: +- Installation time: +- Total size: +- Related issue: + +**Virtual environments affected** +- [ ] macOS 10.15 +- [ ] Ubuntu 16.04 LTS +- [ ] Ubuntu 18.04 LTS +- [ ] Windows Server 2016 R2 +- [ ] Windows Server 2019 + +**Check list** +- [ ] Installation time is provided +- [ ] Tool size is provided +- [ ] Tests are written +- [ ] Documentation is added +- [ ] Related images are successfully generated \ No newline at end of file From c826d5af2625c3aaa36331dc9a1589676ef0a01b Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Fri, 20 Mar 2020 14:06:42 +0300 Subject: [PATCH 24/50] try --- .github/PULL_REQUEST_TEMPLATE/bug-fixing.md | 17 ----------------- ...-tool-adding.md => pull_request_template.md} | 9 ++------- 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 .github/PULL_REQUEST_TEMPLATE/bug-fixing.md rename .github/{PULL_REQUEST_TEMPLATE/new-tool-adding.md => pull_request_template.md} (75%) diff --git a/.github/PULL_REQUEST_TEMPLATE/bug-fixing.md b/.github/PULL_REQUEST_TEMPLATE/bug-fixing.md deleted file mode 100644 index 751c1075..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/bug-fixing.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -name: Bug fixing and improvements -about: Fix existing bug with images or code improvements -title: '' -labels: '' -assignees: '' - ---- - -**Description** - -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - -**Check list** -- [ ] non-breaking change which fixes an issue -- [ ] breaking change / regression -- [ ] Related images are successfully generated \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE/new-tool-adding.md b/.github/pull_request_template.md similarity index 75% rename from .github/PULL_REQUEST_TEMPLATE/new-tool-adding.md rename to .github/pull_request_template.md index 86b282d9..c4074af8 100644 --- a/.github/PULL_REQUEST_TEMPLATE/new-tool-adding.md +++ b/.github/pull_request_template.md @@ -1,11 +1,6 @@ ---- -name: Add new tool -about: Add a new tool or update the existing one -title: Update/Add [tool name] -labels: '' -assignees: '' +**Description** ---- +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. **Tool information** - Tool name: From 5f459a3e58642bc8b2258524d7e83adc4e38b35b Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 14:48:49 +0300 Subject: [PATCH 25/50] Remove errors ignore command --- images/win/scripts/Installers/Install-Msys2.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 197461c6..67f43f9c 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -31,10 +31,9 @@ Write-Host "Starting msys2 extraction" Remove-Item $msys2File Write-Host "Finished extraction" +# Add msys2 bin tools folders to PATH $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" -$ErrorActionPreference = "Continue" - Write-Host "bash -c pacman-key --init" Invoke-Expression "bash -c `"pacman-key --init`"" From 7720b74a0096c1cfc9d646b66b05886e77bb7963 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 15:43:25 +0300 Subject: [PATCH 26/50] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 67f43f9c..9656ecc0 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -35,10 +35,10 @@ Write-Host "Finished extraction" $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" Write-Host "bash -c pacman-key --init" -Invoke-Expression "bash -c `"pacman-key --init`"" +bash.exe "pacman-key --init 2>&1" Write-Host "bash -c pacman-key --populate msys2" -Invoke-Expression "bash -c `"pacman-key --populate msys2`"" +bash.exe "pacman-key --populate msys2 2>&1" Write-Host "pacman --noconfirm -Syyuu" pacman.exe -Syyuu --noconfirm From 418d16888fca4934d89e9a9aaf33d551f16f70e7 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Fri, 20 Mar 2020 16:10:58 +0300 Subject: [PATCH 27/50] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 9656ecc0..4fe380cf 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -21,9 +21,7 @@ Write-Host "Finished download" $msys2FileU = "/$msys2File".replace(':', '') -# git has tar.exe in usr/bin, but xz.exe is in mingw64/bin -$env:PATH = "$gitPath\mingw64\bin;$origPath" -$tar = "$gitPath\usr\bin\tar.exe" +$tar = "$gitPath\usr\bin\tar.exe" # extract tar.xz to C:\ Write-Host "Starting msys2 extraction" @@ -34,10 +32,10 @@ Write-Host "Finished extraction" # Add msys2 bin tools folders to PATH $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" -Write-Host "bash -c pacman-key --init" +Write-Host "bash pacman-key --init" bash.exe "pacman-key --init 2>&1" -Write-Host "bash -c pacman-key --populate msys2" +Write-Host "bash pacman-key --populate msys2" bash.exe "pacman-key --populate msys2 2>&1" Write-Host "pacman --noconfirm -Syyuu" From de434649ee6484793fb17bd3d9dafb85d7d85540 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Mon, 23 Mar 2020 09:15:33 +0300 Subject: [PATCH 28/50] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 4fe380cf..9f57ea23 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -33,10 +33,10 @@ Write-Host "Finished extraction" $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" Write-Host "bash pacman-key --init" -bash.exe "pacman-key --init 2>&1" +bash.exe -c "pacman-key --init 2>&1" Write-Host "bash pacman-key --populate msys2" -bash.exe "pacman-key --populate msys2 2>&1" +bash.exe -c "pacman-key --populate msys2 2>&1" Write-Host "pacman --noconfirm -Syyuu" pacman.exe -Syyuu --noconfirm From 14e4c3e0413d6fad46cde60e6ff4454dbc2b8419 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Mon, 23 Mar 2020 12:44:41 +0300 Subject: [PATCH 29/50] update template --- .github/pull_request_template.md | 30 +++++++++--------------------- 1 file changed, 9 insertions(+), 21 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c4074af8..f6474e24 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,24 +1,12 @@ -**Description** +**Description** +New tool, Bug fixing, or Improvement? +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. +For new tools, provide total size and installation time. -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. - -**Tool information** -- Tool name: -- URL for tool's homepage: -- Installation time: -- Total size: -- Related issue: - -**Virtual environments affected** -- [ ] macOS 10.15 -- [ ] Ubuntu 16.04 LTS -- [ ] Ubuntu 18.04 LTS -- [ ] Windows Server 2016 R2 -- [ ] Windows Server 2019 +**Related issue:** **Check list** -- [ ] Installation time is provided -- [ ] Tool size is provided -- [ ] Tests are written -- [ ] Documentation is added -- [ ] Related images are successfully generated \ No newline at end of file +- [ ] Related issue / work item is attached +- [ ] Tests are written (if applicable) +- [ ] Documentation is updated (if applicable) +- [ ] Changes are tested and related VM images are succefully generated From 144081916b0180245c4fd1ff84cf7efcbc92b25d Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Mon, 23 Mar 2020 12:48:02 +0300 Subject: [PATCH 30/50] Update pull_request_template.md --- .github/pull_request_template.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f6474e24..9c65c9a7 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,11 +1,11 @@ -**Description** +**Description:** New tool, Bug fixing, or Improvement? -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. +Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. For new tools, provide total size and installation time. **Related issue:** -**Check list** +**Check list:** - [ ] Related issue / work item is attached - [ ] Tests are written (if applicable) - [ ] Documentation is updated (if applicable) From 60cfda73991c462ac484c2fb6c926c452777cc4e Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Mon, 23 Mar 2020 13:03:46 +0300 Subject: [PATCH 31/50] correct words --- .github/pull_request_template.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9c65c9a7..2ee51fcc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,7 @@ **Description:** New tool, Bug fixing, or Improvement? -Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. -For new tools, provide total size and installation time. +Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. +For new tools, please provide total size and installation time. **Related issue:** From dae1aa3be4f0b424b56b717a401c58bade51904f Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Mon, 23 Mar 2020 20:18:05 +0300 Subject: [PATCH 32/50] Update based on SergeyAkh comments --- .github/pull_request_template.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 2ee51fcc..e645fafc 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,11 +1,11 @@ -**Description:** +# Description New tool, Bug fixing, or Improvement? Please include a summary of the change and which issue is fixed. Also include relevant motivation and context. -For new tools, please provide total size and installation time. +**For new tools, please provide total size and installation time.** -**Related issue:** +#### Related issue: -**Check list:** +## Check list - [ ] Related issue / work item is attached - [ ] Tests are written (if applicable) - [ ] Documentation is updated (if applicable) From 62164dd90dc9d483aa1a329947398a60e615bdb7 Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 24 Mar 2020 08:09:54 +0300 Subject: [PATCH 33/50] fix spelling --- .github/pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index e645fafc..54085c9b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -9,4 +9,4 @@ Please include a summary of the change and which issue is fixed. Also include re - [ ] Related issue / work item is attached - [ ] Tests are written (if applicable) - [ ] Documentation is updated (if applicable) -- [ ] Changes are tested and related VM images are succefully generated +- [ ] Changes are tested and related VM images are successfully generated From 9b3924a23d947d636da1691f70b26230d174ddae Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov <61747324+dibir-magomedsaygitov@users.noreply.github.com> Date: Tue, 24 Mar 2020 09:17:38 +0300 Subject: [PATCH 34/50] Move "Run-Antivirus" step outside of image-generation (#574) * Move "Run-Antivirus" step outside of image-generation Co-authored-by: Dibir Magomedsaygitov --- images/win/Windows2016-Azure.json | 12 +++++++- images/win/Windows2019-Azure.json | 12 +++++++- .../Installers/Configure-Antivirus.ps1 | 2 ++ .../win/scripts/Installers/Run-Antivirus.ps1 | 30 +++++++++++++++++++ .../Installers/Windows2016/Run-Antivirus.ps1 | 19 ------------ .../Installers/Windows2019/Run-Antivirus.ps1 | 27 ----------------- 6 files changed, 54 insertions(+), 48 deletions(-) create mode 100644 images/win/scripts/Installers/Configure-Antivirus.ps1 create mode 100644 images/win/scripts/Installers/Run-Antivirus.ps1 delete mode 100644 images/win/scripts/Installers/Windows2016/Run-Antivirus.ps1 delete mode 100644 images/win/scripts/Installers/Windows2019/Run-Antivirus.ps1 diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 16d9cea8..2d5f86f0 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -15,6 +15,7 @@ "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "vm_size": "Standard_DS4_v2", + "run_scan_antivirus": "false", "root_folder": "C:", "image_folder": "C:\\image", @@ -876,8 +877,17 @@ }, { "type": "powershell", + "environment_vars":[ + "RUN_SCAN_ANTIVIRUS={{user `run_scan_antivirus`}}" + ], "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2016/Run-Antivirus.ps1" + "{{ template_dir }}/scripts/Installers/Run-Antivirus.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Configure-Antivirus.ps1" ] }, { diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 8c9aa7a2..5c7be897 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -15,6 +15,7 @@ "virtual_network_subnet_name": "{{env `VNET_SUBNET`}}", "private_virtual_network_with_public_ip": "{{env `PRIVATE_VIRTUAL_NETWORK_WITH_PUBLIC_IP`}}", "vm_size": "Standard_DS4_v2", + "run_scan_antivirus": "false", "root_folder": "C:", "image_folder": "C:\\image", @@ -869,8 +870,17 @@ }, { "type": "powershell", + "environment_vars":[ + "RUN_SCAN_ANTIVIRUS={{user `run_scan_antivirus`}}" + ], "scripts":[ - "{{ template_dir }}/scripts/Installers/Windows2019/Run-Antivirus.ps1" + "{{ template_dir }}/scripts/Installers/Run-Antivirus.ps1" + ] + }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Configure-Antivirus.ps1" ] }, { diff --git a/images/win/scripts/Installers/Configure-Antivirus.ps1 b/images/win/scripts/Installers/Configure-Antivirus.ps1 new file mode 100644 index 00000000..650d3a98 --- /dev/null +++ b/images/win/scripts/Installers/Configure-Antivirus.ps1 @@ -0,0 +1,2 @@ +Write-Host "Set antivirus parameters" +Set-MpPreference -ScanAvgCPULoadFactor 5 -ExclusionPath "D:\", "C:\" \ No newline at end of file diff --git a/images/win/scripts/Installers/Run-Antivirus.ps1 b/images/win/scripts/Installers/Run-Antivirus.ps1 new file mode 100644 index 00000000..7993146a --- /dev/null +++ b/images/win/scripts/Installers/Run-Antivirus.ps1 @@ -0,0 +1,30 @@ +################################################################################ +## File: Run-Antivirus.ps1 +## Desc: Run a full antivirus scan. +## Run right after cleanup before we sysprep +################################################################################ + +if ($env:run_scan_antivirus -eq $true) { + try { + Update-MpSignature + } + catch { + Write-Host "Some error was found" + Write-Host $_ + } + + Write-Host "Make sure windefend is going to start" + Start-Service windefend -ErrorAction Continue + Write-Host "Waiting for windefend to report as running" + $service = Get-Service "Windefend" + $service.WaitForStatus("Running","00:10:00") + + Write-Host "Run antivirus" + # Tell Defender to use 100% of the CPU during the scan + Set-MpPreference -ScanAvgCPULoadFactor 100 + # Full Scan + Start-Process -FilePath "C:\Program Files\Windows Defender\MpCmdRun.exe" -ArgumentList ("-Scan","-ScanType", 2) -Wait +} +else { + Write-Host "Scanning process has been skipped" +} \ No newline at end of file diff --git a/images/win/scripts/Installers/Windows2016/Run-Antivirus.ps1 b/images/win/scripts/Installers/Windows2016/Run-Antivirus.ps1 deleted file mode 100644 index 77b3b2bc..00000000 --- a/images/win/scripts/Installers/Windows2016/Run-Antivirus.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -################################################################################ -## File: Run-Antivirus.ps1 -## Desc: Run a full antivirus scan. -## Run right after cleanup before we sysprep -################################################################################ - -Write-Host "Run antivirus" -Push-Location "C:\Program Files\Windows Defender" - -# Tell Defender to use 100% of the CPU during the scan -Set-MpPreference -ScanAvgCPULoadFactor 100 - -# Full Scan -.\MpCmdRun.exe -Scan -ScanType 2 -Pop-Location - -Write-Host "Set antivirus parmeters" -Set-MpPreference -ScanAvgCPULoadFactor 5 ` - -ExclusionPath "D:\", "C:\" diff --git a/images/win/scripts/Installers/Windows2019/Run-Antivirus.ps1 b/images/win/scripts/Installers/Windows2019/Run-Antivirus.ps1 deleted file mode 100644 index e38126af..00000000 --- a/images/win/scripts/Installers/Windows2019/Run-Antivirus.ps1 +++ /dev/null @@ -1,27 +0,0 @@ -################################################################################ -## File: Run-Antivirus.ps1 -## Desc: Run a full antivirus scan. -## Run right after cleanup before we sysprep -################################################################################ - -Write-Host "Make sure windefend is going to start" -Start-Service windefend -ErrorAction Continue - -Write-Host "Waiting for windefend to report as running" -$service = Get-Service "Windefend" -$service.WaitForStatus("Running","00:10:00") - -Write-Host "Run antivirus" -Push-Location "C:\Program Files\Windows Defender" - -# Tell Defender to use 100% of the CPU during the scan -Set-MpPreference -ScanAvgCPULoadFactor 100 - -# Full Scan -.\MpCmdRun.exe -Scan -ScanType 2 -Pop-Location - -Update-MpSignature -Write-Host "Set antivirus parmeters" -Set-MpPreference -ScanAvgCPULoadFactor 5 ` - -ExclusionPath "D:\", "C:\" From 444ab15a64baa452e031f462b9696e72add44ca5 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Mon, 23 Mar 2020 07:54:11 +0700 Subject: [PATCH 35/50] rust: Use rustup's minimal profile --- images/linux/scripts/installers/rust.sh | 8 +++----- images/win/scripts/Installers/Install-Rust.ps1 | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/images/linux/scripts/installers/rust.sh b/images/linux/scripts/installers/rust.sh index 571538a3..850868a4 100644 --- a/images/linux/scripts/installers/rust.sh +++ b/images/linux/scripts/installers/rust.sh @@ -12,16 +12,14 @@ set -e export RUSTUP_HOME=/usr/share/rust/.rustup export CARGO_HOME=/usr/share/rust/.cargo -curl https://sh.rustup.rs -sSf | sh -s -- -y +curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal # Initialize environment variables source $CARGO_HOME/env # Install common tools -rustup component add rustfmt -rustup component add clippy -cargo install bindgen -cargo install cbindgen +rustup component add rustfmt clippy +cargo install bindgen cbindgen echo "Test installation of the Rust toochain" diff --git a/images/win/scripts/Installers/Install-Rust.ps1 b/images/win/scripts/Installers/Install-Rust.ps1 index e19cd4c1..61588a86 100644 --- a/images/win/scripts/Installers/Install-Rust.ps1 +++ b/images/win/scripts/Installers/Install-Rust.ps1 @@ -14,7 +14,7 @@ $env:CARGO_HOME="C:\Rust\.cargo" Invoke-WebRequest -UseBasicParsing -Uri "https://win.rustup.rs/x86_64" -OutFile rustup-init.exe # Install Rust by running rustup-init.exe (disabling the confirmation prompt with -y) -.\rustup-init.exe -y +.\rustup-init.exe -y --default-toolchain=stable --profile=minimal # Delete rustup-init.exe when it's no longer needed Remove-Item -Path .\rustup-init.exe @@ -24,10 +24,8 @@ Add-MachinePathItem "$env:CARGO_HOME\bin" $env:Path = Get-MachinePath # Install common tools -rustup component add rustfmt -rustup component add clippy -cargo install bindgen -cargo install cbindgen +rustup component add rustfmt clippy +cargo install bindgen cbindgen # Run script at startup for all users $cmdRustSymScript = @" From 8399806f3c02ba492d60f85cb083935fdbebc83e Mon Sep 17 00:00:00 2001 From: Maxim Lobanov Date: Tue, 24 Mar 2020 13:23:57 +0300 Subject: [PATCH 36/50] Fix NSIS documentation (#604) --- images/win/scripts/Installers/Validate-NSIS.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/win/scripts/Installers/Validate-NSIS.ps1 b/images/win/scripts/Installers/Validate-NSIS.ps1 index b38624e7..276eb139 100644 --- a/images/win/scripts/Installers/Validate-NSIS.ps1 +++ b/images/win/scripts/Installers/Validate-NSIS.ps1 @@ -28,5 +28,4 @@ $Description = @" _Version:_ $Version
"@ -#Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description -Write-Host $description +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 303d675ea24506f6dddd388565b48c7f5d5a9801 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 14:29:50 +0300 Subject: [PATCH 37/50] Reworked validation --- .../win/scripts/Installers/Validate-Msys2.ps1 | 75 ++++++++----------- 1 file changed, 32 insertions(+), 43 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 187e219d..b8eac3aa 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -3,55 +3,44 @@ ## Desc: Validate Msys2 ################################################################################ -if (Get-Command -Name 'gcc') -{ - Write-Host "gcc is successfully installed:" - gcc --version | Write-Host -} -else -{ - Write-Host "gcc is not on PATH" - exit 1 +$msys2BinDir = "C:\msys64\usr\bin" +$msys2mingwDir = "C:\msys64\mingw64\bin" + +$installedTools = @( + "bash", + "tar", + "make" +) + +Write-Host "Check installed tools in msys2/usr/bin directory" +$installedTools | ForEach-Object { + $toolName = $_ + try { + Invoke-Expression "$msys2BinDir\$_ --version" + } catch { + Write-Host "$toolName was not installed in MSYS2 bin directory" + Write-Error $_ + exit 1 + } } -if (Get-Command -Name 'g++') -{ - Write-Host "g++ is successfully installed:" - g++ --version | Write-Host -} -else -{ - Write-Host "g++ is not on PATH" - exit 1 -} - -if (Get-Command -Name 'make') -{ - Write-Host "make is successfully installed:" - make --version | Write-Host -} -else -{ - Write-Host "make is not on PATH" +Write-Host "Check gcc in msys2/mingw64/bin directory" +try { + Invoke-Expression "$msys2mingwDir\gcc --version" +} catch { + Write-Host "gcc was not installed in MSYS2 bin directory" + Write-Error $_ exit 1 } # Adding description of the software to Markdown -# `gcc --version` gives output like: -# gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 5.3.0 -# Copyright (C) 2015 Free Software Foundation, Inc. -# This is free software; see the source for copying conditions. There is NO -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# $SoftwareName = "MSYS2" +# $(pacman.exe --version).Split([System.Environment]::NewLine)[1] -match "v\d+\.\d+\.\d+" +# $pacmanVersion = $matches[0] -$SoftwareName = "MinGW" -$(gcc --version).Split([System.Environment]::NewLine)[0] -match "\d+\.\d+\.\d+$" -$minGwVersion = $matches[0] +# $Description = @" +# _Pacman version:_ $pacmanVersion
+# "@ -$Description = @" -_Version:_ $minGwVersion
-_Environment:_ -* PATH: contains location of the MinGW 'bin' directory -"@ - -Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description +# Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From 4f00d9bbfc2f63f74ef675988541e37e3a5503a9 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:11:27 +0300 Subject: [PATCH 38/50] Add tool versions to description --- .../win/scripts/Installers/Validate-Msys2.ps1 | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index b8eac3aa..7bed9c9f 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -35,12 +35,33 @@ try { # Adding description of the software to Markdown -# $SoftwareName = "MSYS2" -# $(pacman.exe --version).Split([System.Environment]::NewLine)[1] -match "v\d+\.\d+\.\d+" -# $pacmanVersion = $matches[0] +function Get-ToolVersion { + param( + [string] $ToolPath, + [int] $VersionLineNumber + ) -# $Description = @" -# _Pacman version:_ $pacmanVersion
-# "@ + $toolRawVersion = Invoke-Expression "$ToolPath --version" + $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" + $toolVersion = $matches[0] + return $toolVersion +} -# Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description +$SoftwareName = "MSYS2" +$pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1 +$bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 +$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -LineNumber 0 +$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -LineNumber 0 +$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -LineNumber 0 +$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -LineNumber 0 + +$Description = @" +_Pacman version:_ $pacmanVersion
+_Bash:_ $bashVersion
+_gcc:_ $gccVersion
+_tar:_ $tarVersion
+_make:_ $makeVersion
+_cmake:_ $cmakeVersion
+"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From a9c63356630063124b1d258b62732715d754bed4 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:12:57 +0300 Subject: [PATCH 39/50] Minor fix --- images/win/scripts/Installers/Validate-Msys2.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 7bed9c9f..0e7805d2 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -56,7 +56,8 @@ $makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -LineNumber 0 $cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -LineNumber 0 $Description = @" -_Pacman version:_ $pacmanVersion
+_Tool versions_ +_Pacman:_ $pacmanVersion
_Bash:_ $bashVersion
_gcc:_ $gccVersion
_tar:_ $tarVersion
From 53536cea29fffcb94ead6b7ad36185c610c28cf7 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:44:12 +0300 Subject: [PATCH 40/50] Add cmake check --- images/win/scripts/Installers/Validate-Msys2.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 0e7805d2..8358df53 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -33,6 +33,15 @@ try { exit 1 } +Write-Host "Check cmake in msys2/mingw64/bin directory" +try { + Invoke-Expression "$msys2mingwDir\cmake --version" +} catch { + Write-Host "cmake was not installed in MSYS2 bin directory" + Write-Error $_ + exit 1 +} + # Adding description of the software to Markdown function Get-ToolVersion { From e80bf9eefe1f4ab8d1e7effacf95db280726f0ab Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:47:56 +0300 Subject: [PATCH 41/50] Minor fix --- images/win/scripts/Installers/Install-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 9f57ea23..90e548b4 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -29,7 +29,7 @@ Write-Host "Starting msys2 extraction" Remove-Item $msys2File Write-Host "Finished extraction" -# Add msys2 bin tools folders to PATH +# Add msys2 bin tools folders to PATH temporary $env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" Write-Host "bash pacman-key --init" From 9f55156c04594bcc4ce4ef20d05fa2190e2cbf60 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 17:50:30 +0300 Subject: [PATCH 42/50] Fix typo --- images/win/scripts/Installers/Validate-Msys2.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index 8358df53..a6ec122e 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -59,10 +59,10 @@ function Get-ToolVersion { $SoftwareName = "MSYS2" $pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1 $bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 -$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -LineNumber 0 -$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -LineNumber 0 -$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -LineNumber 0 -$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -LineNumber 0 +$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0 +$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0 +$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -VersionLineNumber 0 +$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -VersionLineNumber 0 $Description = @" _Tool versions_ From 9e12e181a3322cbef9b0e7d2da5caddbda0e9985 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Tue, 24 Mar 2020 18:49:57 +0300 Subject: [PATCH 43/50] Reworked validation --- .../win/scripts/Installers/Validate-Msys2.ps1 | 40 +++++++++---------- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index a6ec122e..b249decb 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -12,6 +12,11 @@ $installedTools = @( "make" ) +$installedMinGWTools = @( + "gcc", + "cmake" +) + Write-Host "Check installed tools in msys2/usr/bin directory" $installedTools | ForEach-Object { $toolName = $_ @@ -24,22 +29,16 @@ $installedTools | ForEach-Object { } } -Write-Host "Check gcc in msys2/mingw64/bin directory" -try { - Invoke-Expression "$msys2mingwDir\gcc --version" -} catch { - Write-Host "gcc was not installed in MSYS2 bin directory" - Write-Error $_ - exit 1 -} - -Write-Host "Check cmake in msys2/mingw64/bin directory" -try { - Invoke-Expression "$msys2mingwDir\cmake --version" -} catch { - Write-Host "cmake was not installed in MSYS2 bin directory" - Write-Error $_ - exit 1 +Write-Host "Check installed tools in msys2/mingw/bin directory" +$installedMinGWTools | ForEach-Object { + $toolName = $_ + try { + Invoke-Expression "$msys2mingwDir\$_ --version" + } catch { + Write-Error "$toolName was not installed in MSYS2 mingw bin directory" + Write-Error $_ + exit 1 + } } # Adding description of the software to Markdown @@ -61,17 +60,14 @@ $pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNum $bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 $gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0 $tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0 -$makeVersion = Get-ToolVersion -ToolPath "$msys2BinDir/make" -VersionLineNumber 0 -$cmakeVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/cmake" -VersionLineNumber 0 $Description = @" _Tool versions_ -_Pacman:_ $pacmanVersion
-_Bash:_ $bashVersion
+_pacman:_ $pacmanVersion
+_bash:_ $bashVersion
_gcc:_ $gccVersion
_tar:_ $tarVersion
-_make:_ $makeVersion
-_cmake:_ $cmakeVersion
+MSYS2 location: C:\msys64 "@ Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description From b0a54cf66472bd79af353f99ee05d58487adecf1 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 25 Mar 2020 09:38:59 +0300 Subject: [PATCH 44/50] Minor change --- images/win/scripts/Installers/Install-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 index 90e548b4..49f75e43 100644 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ b/images/win/scripts/Installers/Install-Msys2.ps1 @@ -8,7 +8,7 @@ # https://packages.msys2.org/group/ $origPath = $env:PATH -$gitPath = "C:\Program Files\Git" +$gitPath = "$env:ProgramFiles\Git" # get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ $msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" From 89c2c31767be65bfa97d6923ff38523b6e652c69 Mon Sep 17 00:00:00 2001 From: Vladimir Safonkin Date: Wed, 25 Mar 2020 19:04:11 +0300 Subject: [PATCH 45/50] Minor fix --- images/win/scripts/Installers/Validate-Msys2.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 index b249decb..e7d2142a 100644 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ b/images/win/scripts/Installers/Validate-Msys2.ps1 @@ -50,7 +50,7 @@ function Get-ToolVersion { ) $toolRawVersion = Invoke-Expression "$ToolPath --version" - $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" + $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" | Out-Null $toolVersion = $matches[0] return $toolVersion } From 6e34be02e45564cb165fceec60412ad69d270e18 Mon Sep 17 00:00:00 2001 From: FrankZ <10498090+frankzo@users.noreply.github.com> Date: Wed, 25 Mar 2020 17:54:03 +0100 Subject: [PATCH 46/50] Removeboostenv (#619) * remove BOOST_DEFAULT from 2019 * refrain from format changes Co-authored-by: Frank Zomer --- images/win/Windows2019-Azure.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 3ebbea24..c93f79e7 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -639,8 +639,7 @@ { "type": "powershell", "environment_vars": [ - "ROOT_FOLDER={{user `root_folder`}}", - "BOOST_DEFAULT={{user `boost_default`}}" + "ROOT_FOLDER={{user `root_folder`}}" ], "scripts":[ "{{ template_dir }}/scripts/Installers/Validate-Boost.ps1" From cef6c2e54c2915719a6f3131f9cabb3382c091a5 Mon Sep 17 00:00:00 2001 From: Aleksandr Chebotov <47745270+al-cheb@users.noreply.github.com> Date: Wed, 25 Mar 2020 22:31:01 +0300 Subject: [PATCH 47/50] fix clang-8 installation --- images/linux/scripts/installers/clang.sh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/images/linux/scripts/installers/clang.sh b/images/linux/scripts/installers/clang.sh index 1ca4cde2..631be190 100644 --- a/images/linux/scripts/installers/clang.sh +++ b/images/linux/scripts/installers/clang.sh @@ -12,13 +12,11 @@ function InstallClang { version=$1 echo "Installing clang-$version..." - # Clang 6.0 is not supported by automatic installation script (`llvm.sh`) - # Thus we have to install it explicitly - if [[ $version == 6* ]]; then - apt-get install -y "clang-$version" "lldb-$version" "lld-$version" - else + if [[ $version =~ 9 ]]; then ./llvm.sh $version apt-get install -y "clang-format-$version" + else + apt-get install -y "clang-$version" "lldb-$version" "lld-$version" "clang-format-$version" fi # Run tests to determine that the software installed as expected @@ -35,11 +33,6 @@ function InstallClang { DocumentInstalledItem "Clang $version ($(clang-$version --version | head -n 1 | cut -d ' ' -f 3 | cut -d '-' -f 1))" } -# Install Clang compiler -wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - -apt-add-repository "deb http://apt.llvm.org/$(lsb_release -cs)/ llvm-toolchain-$(lsb_release -cs)-6.0 main" -apt-get update -y - # Download script for automatic installation wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh From b0882a148ca333f830198c3935b1e9f5d92be823 Mon Sep 17 00:00:00 2001 From: Andy Mishechkin <57713077+andy-mishechkin@users.noreply.github.com> Date: Thu, 26 Mar 2020 10:51:59 +0300 Subject: [PATCH 48/50] mac OS 10.15 software updates week 13 (#612) * macOS Catalina 10.15.3 sofware updates week 13 * Image date has been fixed --- images/macos/macos-10.15-Readme.md | 52 +++++++++++++++++------------- 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/images/macos/macos-10.15-Readme.md b/images/macos/macos-10.15-Readme.md index 10c9ac28..ec7f0a4e 100644 --- a/images/macos/macos-10.15-Readme.md +++ b/images/macos/macos-10.15-Readme.md @@ -1,5 +1,5 @@ # macOS Catalina 10.15.3 (19D76) -The following software is installed on machines with the 20200307.2 update. +The following software is installed on machines with the 20200321.1 update. #### Xcode 11.3.1 set by default ## Operating System @@ -13,37 +13,38 @@ The following software is installed on machines with the 20200307.2 update. - Java 11: Zulu11.37+17-CA (build 11.0.6+10-LTS) - Java 12: Zulu12.3+11-CA (build 12.0.2+3) - Java 13: Zulu13.29+9-CA (build 13.0.2+6-MTS) -- Rust 1.41.1 +- Java 14: Zulu14.27+1-CA (build 14+36) +- Rust 1.42.0 - Clang/LLVM 9.0.1 -- gcc-8 (Homebrew GCC 8.3.0_2) 8.3.0 -- gcc-9 (Homebrew GCC 9.2.0_3) 9.2.0 -- GNU Fortran (Homebrew GCC 8.3.0_2) 8.3.0 -- GNU Fortran (Homebrew GCC 9.2.0_3) 9.2.0 +- gcc-8 (Homebrew GCC 8.4.0) 8.4.0 +- gcc-9 (Homebrew GCC 9.3.0) 9.3.0 +- GNU Fortran (Homebrew GCC 8.4.0) 8.4.0 +- GNU Fortran (Homebrew GCC 9.3.0) 9.3.0 - Node.js v12.16.1 - NVM 0.33.11 -- NVM - Cached node versions: v6.17.1 v8.17.0 v10.19.0 v12.16.1 v13.10.1 +- NVM - Cached node versions: v6.17.1 v8.17.0 v10.19.0 v12.16.1 v13.11.0 - PowerShell 7.0.0 - Python 2.7.17 -- Python 3.7.6 +- Python 3.7.7 - Ruby 2.6.5p114 -- .NET SDK 2.0.0 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 +- .NET SDK 2.0.0 3.0.100 3.0.101 3.0.102 3.0.103 3.1.100 3.1.101 3.1.200 - Go 1.14 -- PHP 7.4.3 -- julia 1.3.1 +- PHP 7.4.4 +- julia 1.4.0 ### Package Management - Rustup 1.21.1 - Vcpkg 2020.02.04 - Bundler version 2.1.4 - Carthage 0.34.0 -- CocoaPods 1.9.0 -- Homebrew 2.2.9 +- CocoaPods 1.9.1 +- Homebrew 2.2.10 - NPM 6.13.4 -- Yarn 1.22.1 +- Yarn 1.22.4 - NuGet 5.4.0.6315 - Pip 19.3.1 (python 2.7) -- Pip 19.3.1 (python 3.7) -- Miniconda 4.7.12 +- Pip 20.0.2 (python 3.7) +- Miniconda 4.8.2 - RubyGems 3.1.2 ### Project Management @@ -51,9 +52,10 @@ The following software is installed on machines with the 20200307.2 update. - Gradle 6.2.2 ### Utilities -- Curl 7.69.0 -- Git: 2.25.1 +- Curl 7.69.1 +- Git: 2.25.2 - Git LFS: 2.10.0 +- Hub CLI: 2.14.2 - GNU Wget 1.20.3 - Subversion (SVN) 1.13.0 - Packer 1.5.4 @@ -67,19 +69,23 @@ The following software is installed on machines with the 20200307.2 update. - zstd 1.4.4 - bazel 2.2.0 - bazelisk v1.3.0 +- helm v3.1.2+gd878d4d +- Docker 19.03.8 +- docker-machine 0.16.2 +- docker-compose 1.25.4 ### Tools - Fastlane 2.143.0 - Cmake 3.16.5 -- App Center CLI 2.3.3 -- Azure CLI 2.1.0 +- App Center CLI 2.3.4 +- Azure CLI 2.2.0 ### Browsers -- Google Chrome 80.0.3987.132 +- Google Chrome 80.0.3987.149 - ChromeDriver 80.0.3987.106 -- Microsoft Edge 80.0.361.66 +- Microsoft Edge 80.0.361.69 - MSEdgeDriver 80.0.361.66 -- Mozilla Firefox 73.0.1 +- Mozilla Firefox 74.0 - geckodriver 0.26.0 ### Toolcache From fc17e909a8a743cfd10c30c4d0ec014d2784ea33 Mon Sep 17 00:00:00 2001 From: Image generation service account Date: Thu, 26 Mar 2020 09:39:29 +0000 Subject: [PATCH 49/50] Updating readme file for AzP.20200319.win19.1 version 20200319 --- images/win/Windows2019-Readme.md | 110 ++++++++++++++++--------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/images/win/Windows2019-Readme.md b/images/win/Windows2019-Readme.md index 9819f9a8..cd716b6e 100644 --- a/images/win/Windows2019-Readme.md +++ b/images/win/Windows2019-Readme.md @@ -1,6 +1,6 @@ # Windows Server 2019 -The following software is installed on machines with the 20200308.0 update. +The following software is installed on machines with the 20200319.1 update. Components marked with **\*** have been upgraded since the previous version of the image. @@ -23,6 +23,12 @@ _Version:_ 1.25.4
_Environment:_ * PATH: contains location of docker-compose.exe +## Helm + +_Version:_ v3.1.2+gd878d4d
+_Environment:_ +* PATH: contains location of helm + ## Powershell Core _Version:_ 7.0.0
@@ -30,15 +36,15 @@ _Version:_ 7.0.0
## Docker images The following container images have been cached: -* mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 (Digest: sha256:746e54a4398bff0ad516d02fdb9eec5cba1a3b5ba0c15a82c051fc3dc753fe85) -* mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 (Digest: sha256:708a9492c51140a07a0bd160c508dd6d17f3b061af0a3f53de607d671ee7176a) -* mcr.microsoft.com/windows/servercore:ltsc2019 (Digest: sha256:39ba615d7a739fcdd9fc95b97882672d5af7d0861dd16b51b238c822765d2b8d) -* mcr.microsoft.com/windows/nanoserver:1809 (Digest: sha256:4201fb07c1ece2ef0bad7b518fd487d030cd49de98b81b3ed8b98e71432df463) +* mcr.microsoft.com/dotnet/framework/aspnet:4.8-windowsservercore-ltsc2019 (Digest: sha256:24ffd5fad1becaf9b16f42ec6f40c90ddf56664986a87212d2d48164e3bb52ba) +* mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019 (Digest: sha256:ceaf6f000f0a0677510a5511f089071c2822dd40f34a77ca0280f96b10621858) +* mcr.microsoft.com/windows/servercore:ltsc2019 (Digest: sha256:8dcc65367c900f06ad386da6a1e25d578232f7b15981092986ade2f2fd9468b8) +* mcr.microsoft.com/windows/nanoserver:1809 (Digest: sha256:5de6bd32bd453d60c8f549d28845552e89ad3652566e141ac82023b6ba10374d) * microsoft/aspnetcore-build:1.0-2.0 (Digest: sha256:9ecc7c5a8a7a11dca5f08c860165646cb30d084606360a3a72b9cbe447241c0c) ## Visual Studio 2019 Enterprise -_Version:_ VisualStudio/16.4.5+29806.167
+_Version:_ VisualStudio/16.5.0+29911.84
_Location:_ C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise The following workloads and components are installed with Visual Studio 2019: @@ -132,13 +138,15 @@ The following workloads and components are installed with Visual Studio 2019: ## WIX Tools _Toolset Version:_ 3.11.4516
-_WIX Toolset Visual Studio Extension Version:_ 1.0.0.4
+_WIX Toolset Studio 2019 Extension Version:_ 1.0.0.4
_Environment:_ * WIX: Installation root of WIX -## Microsoft Analysis Services Projects Visual Studio Extension +## Microsoft SSDT Visual Studio 2019 Extensions -_Version:_ 2.9.5
+_Microsoft Analysis Services Projects Version:_ 2.9.6
+_SQL Server Integration Services Projects Version:_ 3.5
+_Microsoft Reporting Services Projects Version:_ 2.6.3
## .NET 4.8 @@ -408,7 +416,7 @@ _Description:_ .NET has been configured to use TLS 1.2 by default ## Azure CLI -_Version:_ 2.1.0 +_Version:_ 2.2.0 _Environment:_ * PATH: contains location of az.cmd @@ -418,7 +426,7 @@ _Version:_ azure-devops 0.17.0 ## Python -_Version:_ 2.7.17 (x64)
_Version:_ 3.5.4 (x64)
_Version:_ 3.6.8 (x64)
_Version:_ 3.7.6 (x64)
_Version:_ 3.8.2 (x64)
_Version:_ 2.7.17 (x86)
_Version:_ 3.5.4 (x86)
_Version:_ 3.6.8 (x86)
_Version:_ 3.7.6 (x86)
_Version:_ 3.8.2 (x86)
+_Version:_ 2.7.17 (x64)
_Version:_ 3.5.4 (x64)
_Version:_ 3.6.8 (x64)
_Version:_ 3.7.6 (x64)
_Version:_ 3.8.2 (x64)
_Version:_ 2.7.17 (x86)
_Version:_ 3.5.4 (x86)
_Version:_ 3.6.8 (x86)
_Version:_ 3.7.6 (x86)
_Version:_ 3.8.2 (x86)

__System default version:__ Python 3.7.6
_Environment:_
* Location: C:\hostedtoolcache\windows\Python\3.7.6\x64
* PATH: contains the location of Python 3.7.6
## PyPy @@ -426,21 +434,15 @@ _Version:_ 2.7.13 (x86)
_Version:_ 3.6.9 (x86)
## Ruby -_Version:_ 2.4.9 (x64)
_Version:_ 2.5.7 (x64)
_Version:_ 2.6.5 (x64)
_Version:_ 2.7.0 (x64)
+_Version:_ 2.4.9 (x64)
_Version:_ 2.5.7 (x64)
_Version:_ 2.6.5 (x64)
_Version:_ 2.7.0 (x64)

__System default version:__ Ruby 2.5.7p206
_Environment:_
* Location: C:\hostedtoolcache\windows\Ruby\2.5.7\x64\bin
* PATH: contains the location of Ruby 2.5.7p206
* Gem Version: 2.7.6.2
-## Python (64 bit) +## OpenSSL -#### Python 3.7.6 -_Environment:_ -* PATH: contains location of python.exe - -#### Python 2.7.17 - -_Location:_ C:/hostedtoolcache/windows/Python/2.7*/x64 +_Version:_ 1.1.1 at C:\Program Files\OpenSSL\bin\openssl.exe
_Version:_ 1.1.1d at C:\Strawberry\c\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\mingw64\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\usr\bin\openssl.exe
_Version:_ 1.0.2j at C:\Program Files (x86)\Subversion\bin\openssl.exe
## Perl -_Version:_ v5.30.1
+_Version:_ v5.30.2
## Git @@ -455,33 +457,45 @@ _Environment:_ * PATH: contains location of git-lfs.exe * GIT_LFS_PATH: location of git-lfs.exe +## Hub CLI + +_Version:_ 2.14.2
+_Environment:_ +* PATH: contains location of hub.exe + ## Go (x64) -#### 1.12.7 +#### 1.14 _Environment:_ -* PATH: contains the location of go.exe version 1.12.7 -* GOROOT: root directory of the Go 1.12.7 installation -* GOROOT_1_12_X64: root directory of the Go 1.12.7 installation -#### 1.13 - -_Environment:_ -* GOROOT_1_13_X64: root directory of the Go 1.13 installation - +* PATH: contains the location of go.exe version 1.14 +* GOROOT: root directory of the Go 1.14 installation +* GOROOT_1_14_X64: root directory of the Go 1.14 installation ## Boost -#### 1.69.0 +#### 1.69.0 [msvc-14.1] _Environment:_ * BOOST_ROOT_1_69_0: root directory of the Boost version 1.69.0 installation -#### 1.72.0 +#### 1.72.0 [msvc-14.2] +_Environment:_ * PATH: contains the location of Boost version 1.72.0 -* BOOST_ROOT: root directory of the Boost version 1.72.0 installation * BOOST_ROOT_1_72_0: root directory of the Boost version 1.72.0 installation + +#### _Notes:_ +Link: https://cmake.org/cmake/help/latest/module/FindBoost.html + +If Boost was built using the `boost-cmake` project or from `Boost 1.70.0` on it provides a package +configuration file for use with find\_package's config mode. This module looks for the package +configuration file called BoostConfig.cmake or boost-config.cmake and stores the result in CACHE entry "Boost_DIR". +If found, the package configuration file is loaded and this module returns with no further action. +See documentation of the Boost CMake package configuration for details on what it provides. + +Set `Boost_NO_BOOST_CMAKE to ON`, to disable the search for boost-cmake. ## PHP (x64) @@ -492,17 +506,9 @@ _Environment:_ * PATH: contains the location of php.exe version 7.4.3 * PHPROOT: root directory of the PHP 7.4.3 installation -## Ruby (x64) - -#### 2.5.7p206 -_Environment:_ -* Location: C:\hostedtoolcache\windows\Ruby\2.5.7\x64\bin -* PATH: contains the location of ruby.exe version 2.5.7p206 -* Gem Version: 3.1.2 - ## Rust (64-bit) -#### 1.41.1 +#### 1.42.0 _Location:_ C:\Rust\.cargo\bin _Environment:_ * PATH: contains the location of rustc.exe @@ -524,7 +530,7 @@ _Environment:_ ## Google Chrome _version:_ -80.0.3987.132 +80.0.3987.149 ## Microsoft Edge @@ -534,7 +540,7 @@ _version:_ ## Mozilla Firefox _version:_ -73.0.1 +74.0 ## Selenium Web Drivers @@ -580,7 +586,7 @@ _Environment:_ * PATH: contains location of node.exe
* Gulp CLI version: 2.2.0 Local version: Unknown
* Grunt grunt-cli v1.3.2
-* Yarn 1.22.1
+* Yarn 1.22.4
## npm @@ -591,7 +597,7 @@ _Environment:_ ## Java Development Kit -#### 1.8.0_222 +#### 1.8.0_222 (default) _Environment:_ * JAVA_HOME: location of JDK @@ -645,6 +651,7 @@ _Environment:_ * PATH: contains location of dotnet.exe _SDK:_ +* 3.1.200 C:\Program Files\dotnet\sdk\3.1.200 * 3.1.101 C:\Program Files\dotnet\sdk\3.1.101 * 3.1.100 C:\Program Files\dotnet\sdk\3.1.100 * 2.2.402 C:\Program Files\dotnet\sdk\2.2.402 @@ -702,6 +709,7 @@ _SDK:_ * 2.1.300 C:\Program Files\dotnet\sdk\2.1.300 _Runtime:_ +* 3.1.2 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.2 * 3.1.1 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.1 * 3.1.0 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.0 * 2.2.8 C:\Program Files\dotnet\shared\Microsoft.NETCore.App\2.2.8 @@ -788,15 +796,11 @@ _Version:_ 1.4.0
## Inno Setup -_Version:_ 6.0.3
+_Version:_ 6.0.4
## GitVersion -_Version:_ 5.2.0.0
- -## OpenSSL - -_Version:_ 1.1.1c at C:\Strawberry\c\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\mingw64\bin\openssl.exe
_Version:_ 1.1.1d at C:\Program Files\Git\usr\bin\openssl.exe
_Version:_ 1.0.2j at C:\Program Files (x86)\Subversion\bin\openssl.exe
_Version:_ 1.1.1 at C:\Program Files\OpenSSL\bin\openssl.exe
+_Version:_ 5.2.4.0
## Cloud Foundry CLI @@ -828,7 +832,7 @@ _Environment:_ ## bazel -_Version:_ bazel 2.1.0
+_Version:_ bazel 2.2.0
## bazelisk From a0587eafc0d1eaa3678d474335383ca08add98fd Mon Sep 17 00:00:00 2001 From: Alena Sviridenko Date: Thu, 26 Mar 2020 17:55:41 +0300 Subject: [PATCH 50/50] Revert "Install MSYS2 to Windows." (#630) --- images/win/Windows2016-Azure.json | 14 ---- images/win/Windows2019-Azure.json | 14 ---- .../win/scripts/Installers/Install-Msys2.ps1 | 76 ------------------- .../win/scripts/Installers/Validate-Msys2.ps1 | 73 ------------------ 4 files changed, 177 deletions(-) delete mode 100644 images/win/scripts/Installers/Install-Msys2.ps1 delete mode 100644 images/win/scripts/Installers/Validate-Msys2.ps1 diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index dc563c7e..e0bf37f5 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -491,14 +491,6 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -620,12 +612,6 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" - ] - }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index 022bb5ce..c93f79e7 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -472,14 +472,6 @@ "{{ template_dir }}/scripts/Installers/Install-AzureModules.ps1" ] }, - { - "type": "powershell", - "elevated_user": "SYSTEM", - "elevated_password": "", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Install-Msys2.ps1" - ] - }, { "type": "powershell", "scripts":[ @@ -607,12 +599,6 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureDevOpsCli.ps1" ] }, - { - "type": "powershell", - "scripts":[ - "{{ template_dir }}/scripts/Installers/Validate-Msys2.ps1" - ] - }, { "type": "powershell", "environment_vars":[ diff --git a/images/win/scripts/Installers/Install-Msys2.ps1 b/images/win/scripts/Installers/Install-Msys2.ps1 deleted file mode 100644 index 49f75e43..00000000 --- a/images/win/scripts/Installers/Install-Msys2.ps1 +++ /dev/null @@ -1,76 +0,0 @@ -################################################################################ -## File: Install-Msys2.ps1 -## Desc: Install Msys2 and 64-bit gcc, cmake, & llvm (32-bit commented out) -################################################################################ - -# References -# https://github.com/msys2/MINGW-packages/blob/master/azure-pipelines.yml -# https://packages.msys2.org/group/ - -$origPath = $env:PATH -$gitPath = "$env:ProgramFiles\Git" - -# get info from https://sourceforge.net/projects/msys2/files/Base/x86_64/ -$msys2Uri = "http://repo.msys2.org/distrib/x86_64/msys2-base-x86_64-20190524.tar.xz" -$msys2File = "$env:TEMP\msys2.tar.xz" - -# Download the latest msys2 x86_64 -Write-Host "Starting msys2 download" -(New-Object System.Net.WebClient).DownloadFile($msys2Uri, $msys2File) -Write-Host "Finished download" - -$msys2FileU = "/$msys2File".replace(':', '') - -$tar = "$gitPath\usr\bin\tar.exe" - -# extract tar.xz to C:\ -Write-Host "Starting msys2 extraction" -&$tar -Jxf $msys2FileU -C /c/ -Remove-Item $msys2File -Write-Host "Finished extraction" - -# Add msys2 bin tools folders to PATH temporary -$env:PATH = "C:\msys64\mingw64\bin;C:\msys64\usr\bin;$origPath" - -Write-Host "bash pacman-key --init" -bash.exe -c "pacman-key --init 2>&1" - -Write-Host "bash pacman-key --populate msys2" -bash.exe -c "pacman-key --populate msys2 2>&1" - -Write-Host "pacman --noconfirm -Syyuu" -pacman.exe -Syyuu --noconfirm -pacman.exe -Syuu --noconfirm - -Write-Host "Install msys2 packages" -pacman.exe -S --noconfirm --needed --noprogressbar base-devel compression - -# mingw package list -$tools = "___clang ___cmake ___llvm ___toolchain ___ragel" - -# install mingw64 packages -Write-Host "Install mingw64 packages" -$pre = "mingw-w64-x86_64-" -pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') - -# install mingw32 packages -Write-Host "Install mingw32 packages" -$pre = "mingw-w64-i686-" -pacman.exe -S --noconfirm --needed --noprogressbar $tools.replace('___', $pre).split(' ') - -# clean all packages to decrease image size -Write-Host "Clean packages" -pacman.exe -Scc --noconfirm - -Write-Host "Installed mingw64 packages" -pacman.exe -Qs --noconfirm mingw-w64-x86_64- - -Write-Host "Installed mingw32 packages" -pacman.exe -Qs --noconfirm mingw-w64-i686- - -Write-Host "Installed msys2 packages" -pacman.exe -Qs --noconfirm - -Write-Host "MSYS2 installation completed" - -exit 0 \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-Msys2.ps1 b/images/win/scripts/Installers/Validate-Msys2.ps1 deleted file mode 100644 index e7d2142a..00000000 --- a/images/win/scripts/Installers/Validate-Msys2.ps1 +++ /dev/null @@ -1,73 +0,0 @@ -################################################################################ -## File: Validate-Msys2.ps1 -## Desc: Validate Msys2 -################################################################################ - -$msys2BinDir = "C:\msys64\usr\bin" -$msys2mingwDir = "C:\msys64\mingw64\bin" - -$installedTools = @( - "bash", - "tar", - "make" -) - -$installedMinGWTools = @( - "gcc", - "cmake" -) - -Write-Host "Check installed tools in msys2/usr/bin directory" -$installedTools | ForEach-Object { - $toolName = $_ - try { - Invoke-Expression "$msys2BinDir\$_ --version" - } catch { - Write-Host "$toolName was not installed in MSYS2 bin directory" - Write-Error $_ - exit 1 - } -} - -Write-Host "Check installed tools in msys2/mingw/bin directory" -$installedMinGWTools | ForEach-Object { - $toolName = $_ - try { - Invoke-Expression "$msys2mingwDir\$_ --version" - } catch { - Write-Error "$toolName was not installed in MSYS2 mingw bin directory" - Write-Error $_ - exit 1 - } -} - -# Adding description of the software to Markdown - -function Get-ToolVersion { - param( - [string] $ToolPath, - [int] $VersionLineNumber - ) - - $toolRawVersion = Invoke-Expression "$ToolPath --version" - $toolRawVersion.Split([System.Environment]::NewLine)[$VersionLineNumber] -match "\d+\.\d+(\.\d+)?" | Out-Null - $toolVersion = $matches[0] - return $toolVersion -} - -$SoftwareName = "MSYS2" -$pacmanVersion = Get-ToolVersion -ToolPath "$msys2BinDir/pacman" -VersionLineNumber 1 -$bashVersion = Get-ToolVersion -ToolPath "$msys2BinDir/bash" -VersionLineNumber 0 -$gccVersion = Get-ToolVersion -ToolPath "$msys2mingwDir/gcc" -VersionLineNumber 0 -$tarVersion = Get-ToolVersion -ToolPath "$msys2BinDir/tar" -VersionLineNumber 0 - -$Description = @" -_Tool versions_ -_pacman:_ $pacmanVersion
-_bash:_ $bashVersion
-_gcc:_ $gccVersion
-_tar:_ $tarVersion
-MSYS2 location: C:\msys64 -"@ - -Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description