File tree Expand file tree Collapse file tree 4 files changed +21
-4
lines changed
Expand file tree Collapse file tree 4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -280,12 +280,28 @@ function Update-PortSource
280280
281281 $portDir = Join-Path $OverlayRoot $Port
282282
283- Set-ParameterInPortFile $Port - ParameterName ' REF' - CurrentValuePattern ' [0-9a-f]{40}' - NewValue $Commit
283+ # For the REF, we also delete any comments after it that may say the wrong version
284+ Set-ParameterInPortFile $Port - ParameterName ' REF' - CurrentValuePattern ' [0-9a-f]{40}( #.*)?$' - NewValue " $Commit # Unreleased"
284285 Set-ParameterInPortFile $Port - ParameterName ' SHA512' - CurrentValuePattern ' [0-9a-f]{128}' - NewValue $SourceHash
285286}
286287
288+ # Updates the port version by one.
289+ function Update-PortVersion
290+ {
291+ param (
292+ [Parameter (Mandatory )]
293+ [string ]$Port
294+ )
295+
296+ $portJsonPath = Join-Path $OverlayRoot $Port " vcpkg.json"
297+ $portDefinition = Get-Content $portJsonPath | ConvertFrom-Json
298+ $portDefinition ." port-version" += 1
299+ $portDefinition | ConvertTo-Json - Depth 5 | Out-File $portJsonPath
300+ }
301+
287302New-PortOverlay cpprestsdk - Version 2.10 .18 - PortVersion 4
288303Add-PatchToPort cpprestsdk - PatchRepo ' microsoft/winget-cli' - PatchCommit ' 888b4ed8f4f7d25cb05a47210e083fe29348163b' - PatchName ' add-server-certificate-validation.patch' - PatchRoot ' src/cpprestsdk/cpprestsdk'
289304
290305New-PortOverlay libyaml - Version 0.2 .5 - PortVersion 5
291306Update-PortSource libyaml - Commit ' 840b65c40675e2d06bf40405ad3f12dec7f35923' - SourceHash ' de85560312d53a007a2ddf1fe403676bbd34620480b1ba446b8c16bb366524ba7a6ed08f6316dd783bf980d9e26603a9efc82f134eb0235917b3be1d3eb4b302'
307+ Update-PortVersion libyaml
Original file line number Diff line number Diff line change @@ -19,4 +19,5 @@ Changes:
1919We use an unreleased version that fixes a vulnerability.
2020
2121Changes:
22- * New source commit: https://github.com/yaml/libyaml/commit/840b65c40675e2d06bf40405ad3f12dec7f35923
22+ * New source commit: https://github.com/yaml/libyaml/commit/840b65c40675e2d06bf40405ad3f12dec7f35923
23+ * Increase the port version so that Component Governance doesn't see it as the vulnerable version anymore
Original file line number Diff line number Diff line change 55vcpkg_from_github(
66 OUT_SOURCE_PATH SOURCE_PATH
77 REPO yaml/libyaml
8- REF 840b65c40675e2d06bf40405ad3f12dec7f35923 # 0.2.5
8+ REF 840b65c40675e2d06bf40405ad3f12dec7f35923 # Unreleased
99 SHA512 de85560312d53a007a2ddf1fe403676bbd34620480b1ba446b8c16bb366524ba7a6ed08f6316dd783bf980d9e26603a9efc82f134eb0235917b3be1d3eb4b302
1010 HEAD_REF master
1111 PATCHES
Original file line number Diff line number Diff line change 11{
22 "name" : " libyaml" ,
33 "version" : " 0.2.5" ,
4- "port-version" : 5 ,
4+ "port-version" : 6 ,
55 "description" : " A C library for parsing and emitting YAML." ,
66 "homepage" : " https://github.com/yaml/libyaml" ,
77 "dependencies" : [
You can’t perform that action at this time.
0 commit comments