Patch Tuesday August 2023. (#33088)

* Update PowerShell to 7.3.6

* Add asan install as requested by @Neumann-A

* Use 1ES for Android docker hosts.

* Update pools.

* Update patch tuesday checklist to reflect 1ES.

* [openslide] Fix missing header.

* [libxt] Add missing header.
This commit is contained in:
Billy O'Neal 2023-08-14 13:58:43 -07:00 committed by GitHub
parent 4e2b371cb5
commit 5fa92f467e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 51 additions and 349 deletions

View File

@ -0,0 +1,14 @@
diff --git a/src/Shell.c b/src/Shell.c
index fcf10a5..67e24bf 100644
--- a/src/Shell.c
+++ b/src/Shell.c
@@ -90,6 +90,9 @@ in this Software without prior written authorization from The Open Group.
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#ifdef _WIN32
+#include <process.h>
+#endif // _WIN32
#ifdef EDITRES
#include <X11/Xmu/Editres.h>

View File

@ -20,10 +20,12 @@ vcpkg_from_gitlab(
REF edd70bdfbbd16247e3d9564ca51d864f82626eb7 # 1.2.1
SHA512 c49876253dfd187e7d56a098d3d992157daefa2c25ee732eaae5818ee04513bedd807d2f265085db2e82c0b1821e152a88fb4998c0002f6ac57204543fe18566
HEAD_REF master
PATCHES windows_build.patch
globals.patch
getcwd.patch
${PATCHES}
PATCHES
windows_build.patch
globals.patch
getcwd.patch
add-missing-process-h.patch
${PATCHES}
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")

View File

@ -1,6 +1,7 @@
{
"name": "libxt",
"version": "1.2.1",
"port-version": 1,
"description": "X Toolkit Intrinsics library",
"homepage": "https://gitlab.freedesktop.org/xorg/lib/libxt",
"license": null,

View File

@ -1,5 +1,5 @@
diff --git a/src/openslide-decode-tifflike.c b/src/openslide-decode-tifflike.c
index 63e0ad5f2..8de1abb38 100644
index 63e0ad5..8de1abb 100644
--- a/src/openslide-decode-tifflike.c
+++ b/src/openslide-decode-tifflike.c
@@ -348,7 +348,7 @@ static bool populate_item(struct _openslide_tifflike *tl,
@ -21,7 +21,7 @@ index 63e0ad5f2..8de1abb38 100644
"Value count too large");
goto FAIL;
diff --git a/src/openslide-features.h b/src/openslide-features.h
index a5328fbf4..db7593d6f 100644
index a5328fb..db7593d 100644
--- a/src/openslide-features.h
+++ b/src/openslide-features.h
@@ -22,26 +22,7 @@
@ -53,7 +53,7 @@ index a5328fbf4..db7593d6f 100644
// for exporting from shared libraries or DLLs
#if defined _WIN32
diff --git a/src/openslide-private.h b/src/openslide-private.h
index a70bcba4a..e39f288ed 100644
index a70bcba..e39f288 100644
--- a/src/openslide-private.h
+++ b/src/openslide-private.h
@@ -34,6 +34,11 @@
@ -80,13 +80,14 @@ index a70bcba4a..e39f288ed 100644
#define g_ascii_strtod _OPENSLIDE_POISON(_openslide_parse_double_)
#define sqlite3_open _OPENSLIDE_POISON(_openslide_sqlite_open)
diff --git a/test/test-common.c b/test/test-common.c
index 8003128c9..3f369435b 100644
index 8003128..b7c4bd4 100644
--- a/test/test-common.c
+++ b/test/test-common.c
@@ -22,11 +22,12 @@
@@ -22,11 +22,13 @@
#ifdef WIN32
#define _WIN32_WINNT 0x0600
#include <windows.h>
+#include <io.h>
+#else
+#include <unistd.h>
#endif
@ -98,7 +99,7 @@ index 8003128c9..3f369435b 100644
#include <glib.h>
diff --git a/test/test.c b/test/test.c
index 50f0651d3..7fb192a57 100644
index 50f0651..7fb192a 100644
--- a/test/test.c
+++ b/test/test.c
@@ -32,7 +32,7 @@
@ -111,7 +112,7 @@ index 50f0651d3..7fb192a57 100644
#include <glib.h>
#include <cairo.h>
diff --git a/test/try_open.c b/test/try_open.c
index dd3a6a2f6..ad9233eb1 100644
index dd3a6a2..ad9233e 100644
--- a/test/try_open.c
+++ b/test/try_open.c
@@ -24,7 +24,7 @@

View File

@ -1,7 +1,7 @@
{
"name": "openslide",
"version": "3.4.1",
"port-version": 2,
"port-version": 3,
"description": "OpenSlide is a C library for reading whole slide image files (also known as virtual slides). It provides a consistent and simple API for reading files from multiple vendors.",
"homepage": "https://openslide.org/",
"license": "LGPL-2.1-or-later",

View File

@ -39,7 +39,7 @@ jobs:
value: "x-azurl,$(root-url-ea),$(sas-ea),readwrite"
- group: vcpkg-binary-caching-credentials
- name: X_VCPKG_BINARY_SOURCE_STUB
value: "x-azblob,$(root-bin-url-ea),$(sas-bin-ea)"
value: "x-azblob,$(root-bin-url-wus3),$(sas-bin-wus3)"
steps:
# Note: /mnt is the Azure machines' temporary disk.
@ -133,4 +133,4 @@ jobs:
testRunTitle: ${{ parameters.triplet }}
testResultsFormat: xUnit
testResultsFiles: $(XML_RESULTS_FILE)
platform: ${{ parameters.triplet }}
platform: ${{ parameters.triplet }}

View File

@ -1,6 +1,6 @@
# Create Docker image for Android
$Location = 'eastasia'
$Location = 'westus3'
$Date = (Get-Date -Format 'yyyy-MM-dd')
$ResourceGroupName = "And-Registry"
$ContainerRegistryName = "AndContainerRegistry"

View File

@ -1 +0,0 @@
& "$PSScriptRoot/../linux/create-image.ps1" -Prefix "And-" -ProvisionScript "$PSScriptRoot/provision-image.sh"

View File

@ -1,6 +0,0 @@
[CmdLetBinding()]
Param(
[parameter(Mandatory=$true)]
[string]$ImageName
)
& "$PSScriptRoot/../linux/create-vmss.ps1" -ImageName $ImageName -Prefix "PrAnd-" -AddAndroidContainerRegistryPermissions

View File

@ -2,9 +2,9 @@
# SPDX-License-Identifier: MIT
#
variables:
android-pool: 'PrAnd-2023-07-12'
android-pool: 'PrAnd-1ES-Pool'
linux-pool: 'PrLin-1ES-Pool'
windows-pool: 'PrWin-2023-07-12'
windows-pool: 'PrWin-2023-08-09'
osx-pool: 'PrOsx-2022-02-04'
linux-docker-image: 'andcontainerregistry.azurecr.io/vcpkg-android:2023-04-20'

View File

@ -34,7 +34,7 @@ $assetSas = Get-SasToken -KeyNumber 1 -ResourceGroupName vcpkg-asset-cache -Stor
# Read, Create, List, Write
$binarySas = Get-SasToken -KeyNumber 1 -ResourceGroupName vcpkg-binary-cache -StorageAccountName vcpkgbinarycache -ContainerName cache -Permission rclw
$binaryEASas = Get-SasToken -KeyNumber 1 -ResourceGroupName vcpkg-binary-cache -StorageAccountName vcpkgbinarycacheeastasia -ContainerName cache -Permission rclw
$binaryWUS3as = Get-SasToken -KeyNumber 1 -ResourceGroupName vcpkg-binary-cache -StorageAccountName vcpkgbinarycacheewus3 -ContainerName cache -Permission rclw
$binaryWUS3as = Get-SasToken -KeyNumber 1 -ResourceGroupName vcpkg-binary-cache -StorageAccountName vcpkgbinarycachewus3 -ContainerName cache -Permission rclw
$response = "Asset Cache SAS: Update`n" + `
"https://dev.azure.com/vcpkg/public/_library?itemType=VariableGroups&view=VariableGroupView&variableGroupId=6&path=vcpkg-asset-caching-credentials`n" + `

View File

@ -1,187 +0,0 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
#
<#
.SYNOPSIS
Creates a Linux virtual machine image, set up for vcpkg's CI.
.DESCRIPTION
create-image.ps1 creates an Azure Linux VM image, set up for vcpkg's CI system.
This script assumes you have installed Azure tools into PowerShell by following the instructions
at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1
or are running from Azure Cloud Shell.
This script assumes you have installed the OpenSSH Client optional Windows component.
#>
[CmdLetBinding()]
Param(
[parameter(Mandatory=$false)]
[string]$Prefix = "Lin-",
[parameter(Mandatory=$false)]
[string]$ProvisionScript
)
$Location = 'eastasia'
$Prefix += (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D8a_v4'
$ProtoVMName = 'PROTOTYPE'
$ErrorActionPreference = 'Stop'
$ProgressActivity = 'Creating Linux Image'
$TotalProgress = 11
$CurrentProgress = 1
Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Creating SSH key' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
$sshDir = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName()
mkdir $sshDir
try {
ssh-keygen.exe -q -b 2048 -t rsa -f "$sshDir/key" -P [string]::Empty
$sshPublicKey = Get-Content "$sshDir/key.pub"
} finally {
Remove-Item $sshDir -Recurse -Force
}
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Creating resource group' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
$ResourceGroupName = Find-ResourceGroupName $Prefix
$AdminPW = New-Password
New-AzResourceGroup -Name $ResourceGroupName -Location $Location
$AdminPWSecure = ConvertTo-SecureString $AdminPW -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ("AdminUser", $AdminPWSecure)
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Creating virtual network' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
$VirtualNetwork = Create-LockedDownNetwork -ResourceGroupName $ResourceGroupName -Location $Location
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Creating prototype VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
$NicName = $ResourceGroupName + 'NIC'
$Nic = New-AzNetworkInterface `
-Name $NicName `
-ResourceGroupName $ResourceGroupName `
-Location $Location `
-Subnet $VirtualNetwork.Subnets[0]
$VM = New-AzVMConfig -Name $ProtoVMName -VMSize $VMSize -Priority 'Spot' -MaxPrice -1
$VM = Set-AzVMOperatingSystem `
-VM $VM `
-Linux `
-ComputerName $ProtoVMName `
-Credential $Credential `
-DisablePasswordAuthentication
$VM = Add-AzVMNetworkInterface -VM $VM -Id $Nic.Id
$VM = Set-AzVMSourceImage `
-VM $VM `
-PublisherName 'Canonical' `
-Offer '0001-com-ubuntu-server-jammy' `
-Skus '22_04-lts' `
-Version latest
$VM = Set-AzVMBootDiagnostic -VM $VM -Disable
$VM = Add-AzVMSshPublicKey `
-VM $VM `
-KeyData $sshPublicKey `
-Path "/home/AdminUser/.ssh/authorized_keys"
New-AzVm `
-ResourceGroupName $ResourceGroupName `
-Location $Location `
-VM $VM
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Waiting 1 minute to let Azure VM customizations be applied' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
Start-Sleep -Seconds 60
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Restarting VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
Restart-AzVm -ResourceGroupName $ResourceGroupName -Name $ProtoVMName
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Running provisioning script provision-image.sh in VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
if($ProvisionScript.Length -eq 0) {
$ProvisionScript = "$PSScriptRoot\provision-image.sh"
}
$ProvisionImageResult = Invoke-AzVMRunCommandWithRetries `
-ResourceGroupName $ResourceGroupName `
-VMName $ProtoVMName `
-CommandId 'RunShellScript' `
-ScriptPath $ProvisionScript
Write-Host "provision-image.sh output: $($ProvisionImageResult.value.Message)"
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Restarting VM' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
Restart-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Converting VM to Image' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
Stop-AzVM `
-ResourceGroupName $ResourceGroupName `
-Name $ProtoVMName `
-Force
Set-AzVM `
-ResourceGroupName $ResourceGroupName `
-Name $ProtoVMName `
-Generalized
$VM = Get-AzVM -ResourceGroupName $ResourceGroupName -Name $ProtoVMName
$ImageConfig = New-AzImageConfig -Location $Location -SourceVirtualMachineId $VM.ID
$ImageName = Find-ImageName -ResourceGroupName 'vcpkg-image-minting' -Prefix $Prefix
New-AzImage -Image $ImageConfig -ImageName $ImageName -ResourceGroupName 'vcpkg-image-minting'
####################################################################################################
Write-Progress `
-Activity $ProgressActivity `
-Status 'Deleting unused temporary resources' `
-PercentComplete (100 / $TotalProgress * $CurrentProgress++)
Remove-AzResourceGroup $ResourceGroupName -Force
####################################################################################################
Write-Progress -Activity $ProgressActivity -Completed
Write-Host "Generated Image: $ImageName"
Write-Host 'Finished!'

View File

@ -1,127 +0,0 @@
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: MIT
#
<#
.SYNOPSIS
Creates a Linux virtual machine scale set, set up for vcpkg's CI.
.DESCRIPTION
create-vmss.ps1 creates an Azure Linux VM scale set, set up for vcpkg's CI
system. See https://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/overview
for more information.
This script assumes you have installed Azure tools into PowerShell by following the instructions
at https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.6.1
or are running from Azure Cloud Shell.
This script assumes you have installed the OpenSSH Client optional Windows component.
.PARAMETER ImageName
The name of the image to deploy into the scale set.
#>
[CmdLetBinding()]
Param(
[parameter(Mandatory=$true)]
[string]$ImageName,
[parameter(Mandatory=$false)]
[string]$Prefix = "PrLin-",
[switch]$AddAndroidContainerRegistryPermissions
)
$Location = 'eastasia'
$Prefix += (Get-Date -Format 'yyyy-MM-dd')
$VMSize = 'Standard_D32a_v4'
$LiveVMPrefix = 'BUILD'
$ErrorActionPreference = 'Stop'
Import-Module "$PSScriptRoot/../create-vmss-helpers.psm1" -DisableNameChecking
$sshDir = [System.IO.Path]::GetTempPath() + [System.IO.Path]::GetRandomFileName()
mkdir $sshDir
try {
ssh-keygen.exe -q -b 2048 -t rsa -f "$sshDir/key" -P [string]::Empty
$sshPublicKey = Get-Content "$sshDir/key.pub"
} finally {
Remove-Item $sshDir -Recurse -Force
}
$ResourceGroupName = Find-ResourceGroupName $Prefix
$AdminPW = New-Password
$Image = Get-AzImage -ResourceGroupName 'vcpkg-image-minting' -ImageName $ImageName
New-AzResourceGroup -Name $ResourceGroupName -Location $Location
$VirtualNetwork = Create-LockedDownNetwork -ResourceGroupName $ResourceGroupName -Location $Location
$VmssIpConfigName = $ResourceGroupName + 'VmssIpConfig'
$VmssIpConfig = New-AzVmssIpConfig -SubnetId $VirtualNetwork.Subnets[0].Id -Primary -Name $VmssIpConfigName
$VmssName = $ResourceGroupName + 'Vmss'
$Vmss = New-AzVmssConfig `
-Location $Location `
-SkuCapacity 0 `
-SkuName $VMSize `
-SkuTier 'Standard' `
-Overprovision $false `
-UpgradePolicyMode Manual `
-EvictionPolicy Delete `
-Priority Spot `
-MaxPrice -1 `
-IdentityType SystemAssigned
$NicName = $ResourceGroupName + 'NIC'
New-AzNetworkInterface `
-Name $NicName `
-ResourceGroupName $ResourceGroupName `
-Location $Location `
-Subnet $VirtualNetwork.Subnets[0]
$Vmss = Add-AzVmssNetworkInterfaceConfiguration `
-VirtualMachineScaleSet $Vmss `
-Primary $true `
-IpConfiguration $VmssIpConfig `
-NetworkSecurityGroupId $VirtualNetwork.Subnets[0].NetworkSecurityGroup.Id `
-Name $NicName
$VmssPublicKey = New-Object -TypeName 'Microsoft.Azure.Management.Compute.Models.SshPublicKey' `
-ArgumentList @('/home/AdminUser/.ssh/authorized_keys', $sshPublicKey)
$Vmss = Set-AzVmssOsProfile `
-VirtualMachineScaleSet $Vmss `
-ComputerNamePrefix $LiveVMPrefix `
-AdminUsername AdminUser `
-AdminPassword $AdminPW `
-LinuxConfigurationDisablePasswordAuthentication $true `
-PublicKey @($VmssPublicKey)
$Vmss = Set-AzVmssStorageProfile `
-VirtualMachineScaleSet $Vmss `
-OsDiskCreateOption 'FromImage' `
-OsDiskCaching ReadOnly `
-DiffDiskSetting Local `
-ImageReferenceId $Image.Id
$Vmss = Set-AzVmssBootDiagnostic `
-VirtualMachineScaleSet $Vmss `
-Enabled $true
$VmssCreated = New-AzVmss `
-ResourceGroupName $ResourceGroupName `
-Name $VmssName `
-VirtualMachineScaleSet $Vmss
if ($AddAndroidContainerRegistryPermissions) {
$spID = $VmssCreated.Identity.PrincipalId
$acrGroup = "And-Registry"
$acrName = "AndContainerRegistry"
$resourceID = (Get-AzContainerRegistry -ResourceGroupName $acrGroup -Name $acrName).Id
# needs admin privileges
New-AzRoleAssignment -ObjectId $spID -Scope $resourceID -RoleDefinitionName AcrPull
}
Write-Host "Location: $Location"
Write-Host "Resource group name: $ResourceGroupName"
Write-Host 'Finished!'

View File

@ -5,15 +5,9 @@
* [ ] Check for depends:vm-update PRs and make relevant changes if possible.
* [ ] Check for Service 360 alerts about vulnerable software we are installing in the VMs and
update that. (Most often PowerShell needs to be updated to the current 7.2.x release)
* [ ] Run android/create-image.ps1
* [ ] Run linux/create-image.ps1
* [ ] Run windows/create-image.ps1
* [ ] Run android/create-vmss.ps1
* [ ] Run linux/create-vmss.ps1
* [ ] Run windows/create-vmss.ps1
* [ ] Create new pools for all 3 of these in Azure DevOps: https://dev.azure.com/vcpkg/public/_settings/agentqueues
* Android: 4 agents
* Linux: 4 agents
* [ ] Create new pools for these in Azure DevOps: https://dev.azure.com/vcpkg/public/_settings/agentqueues
* Windows: 22 agents
* [ ] Update azure-pipelines.yml to point to the new pools.
* [ ] Submit PR with those changes.

View File

@ -5,5 +5,5 @@
# REPLACE WITH UTILITY-PREFIX.ps1
$PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.5/PowerShell-7.3.5-win-x64.msi'
$PwshUrl = 'https://github.com/PowerShell/PowerShell/releases/download/v7.3.6/PowerShell-7.3.6-win-x64.msi'
InstallMSI -Url $PwshUrl -Name 'PowerShell Core'

View File

@ -12,6 +12,7 @@ $Workloads = @(
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
'Microsoft.VisualStudio.Component.VC.Tools.ARM',
'Microsoft.VisualStudio.Component.VC.Tools.ARM64',
'Microsoft.VisualStudio.Component.VC.ASAN',
'Microsoft.VisualStudio.Component.VC.ATL',
'Microsoft.VisualStudio.Component.VC.ATLMFC',
'Microsoft.VisualStudio.Component.VC.ATL.ARM',

View File

@ -4930,7 +4930,7 @@
},
"libxt": {
"baseline": "1.2.1",
"port-version": 0
"port-version": 1
},
"libxtst": {
"baseline": "1.2.4",
@ -6082,7 +6082,7 @@
},
"openslide": {
"baseline": "3.4.1",
"port-version": 2
"port-version": 3
},
"openssl": {
"baseline": "3.1.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "f31aa9aa9e1f86b0f2ca59be16b76ceb156696e1",
"version": "1.2.1",
"port-version": 1
},
{
"git-tree": "ec0636529740c0931c0c31006dc22d5d599f080d",
"version": "1.2.1",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "3693e3b54096deebd97f8a71e91636d88941637a",
"version": "3.4.1",
"port-version": 3
},
{
"git-tree": "dafb9bb4d2ad8dc07570e45c4f5a4794ca016778",
"version": "3.4.1",