Skip to content

Commit 9a9b29d

Browse files
[nightly] Update dependencies from syft
1 parent 050a351 commit 9a9b29d

400 files changed

Lines changed: 1440 additions & 1189 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ The following examples illustrate how to run `update-dependencies`:
179179
- Update the PowerShell version used in the 9.0 images
180180

181181
``` console
182-
> dotnet run --project .\eng\update-dependencies\ -- 9.0 --product-version powershell=7.5.0 --compute-shas
182+
> dotnet run --project .\eng\update-dependencies\ -- 9.0 --product-version powershell=7.5.0
183183
```
184184

185185
#### Checking Markdown links locally

eng/Set-DotnetVersions.ps1

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@ param(
3636
[string]
3737
$AspireVersion,
3838

39-
# Compute the checksum if a published checksum cannot be found
40-
[Switch]
41-
$ComputeShas,
42-
4339
# Use stable branding version numbers to compute paths
4440
[Switch]
4541
$UseStableBranding,
@@ -109,10 +105,6 @@ if ($AspireVersion) {
109105
$productMajorVersion = $ProductVersion.Split('.', 2)[0]
110106
}
111107

112-
if ($ComputeShas) {
113-
$updateDepsArgs += "--compute-shas"
114-
}
115-
116108
if ($ChecksumsFile) {
117109
$updateDepsArgs += "--checksums-file=$ChecksumsFile"
118110
}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
{{
2-
set dotnetVersion to join(slice(split(PRODUCT_VERSION, "."), 0, 2), ".")
3-
}}# .NET globalization APIs will use invariant mode by default because DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true is set
1+
# .NET globalization APIs will use invariant mode by default because DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true is set
42
# by the base runtime-deps image. See https://aka.ms/dotnet-globalization-alpine-containers for more information.

eng/dockerfile-templates/Dockerfile.linux.download-and-install

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{{
2+
_ ARGS:
3+
download-url : URL to download .NET from
4+
extract-to : Directory where .NET will be extracted
5+
extract-paths : (optional) Paths within the tarball to extract
6+
out-file : (optional) Name of the output file
7+
8+
The following arguments are mutually exclusive:
9+
sha : (optional) The checksum of the downloaded file
10+
sha-url : (optional) URL to download checksum file
11+
sha-url-aggregate : (optional) URL to download aggregate checksum file
12+
^
13+
14+
set urlParts to split(ARGS["download-url"], "/") ^
15+
set fileName to
16+
when(ARGS["out-file"],
17+
ARGS["out-file"],
18+
urlParts[len(urlParts) - 1]) ^
19+
set fileNameParts to split(fileName, ".") ^
20+
set fileExtension to fileNameParts[len(fileNameParts) - 1]
21+
22+
}}{{InsertTemplate("Dockerfile.linux.download-validate-file", [
23+
"url": ARGS["download-url"],
24+
"out-file": ARGS["out-file"],
25+
"sha": ARGS["sha"],
26+
"sha-url": ARGS["sha-url"],
27+
"sha-url-aggregate": ARGS["sha-url-aggregate"],
28+
"sha-var-name": ARGS["sha-var-name"]
29+
])}}{{
30+
if ARGS["extract-to"]: \
31+
&& mkdir --parents {{ARGS["extract-to"]}} \
32+
&& {{if (fileExtension = "zip"):{{
33+
InsertTemplate("Dockerfile.linux.extract-zip", [
34+
"file": fileName,
35+
"dest-dir": ARGS["extract-to"],
36+
"extract-paths": ARGS["extract-paths"]
37+
])}}^else:{{
38+
InsertTemplate("Dockerfile.linux.extract-tarball", [
39+
"file": fileName,
40+
"dest-dir": ARGS["extract-to"],
41+
"extract-paths": ARGS["extract-paths"]
42+
])}}}}}}

eng/dockerfile-templates/Dockerfile.linux.download-file

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 59 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,62 @@
11
{{
2-
_ ARGS:
3-
files: Array of metadata describing the files to be downloaded and installed
2+
_ Downloads one or more files using curl or wget as appropriate.
3+
4+
ARGS:
5+
files: array of files to download, with the following format:
6+
[
7+
url: URL to download the file from
8+
out-file: (optional) name of the output file
9+
]
10+
^
11+
12+
_ Documentation for using Managed Identity/OAuth tokens to access Azure storage accounts:
13+
https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory#call-storage-operations-with-oauth-tokens ^
14+
15+
for i, file in ARGS["files"]:{{
16+
if (find(file["url"], "dotnetstage") >= 0):{{
17+
set isInternal to 1
18+
}}}}^
19+
20+
set isAlpine to find(OS_VERSION, "alpine") >= 0 ^
21+
set useWget to isAlpine ^
22+
23+
set downloadCommand to when(useWget, "wget", "curl") ^
24+
25+
_ Add authentication header for internal builds, if appropriate. The same
26+
header works for both wget and curl. ^
27+
_ When downloading multiple files, the same header argument applies to all
28+
files in the download. ^
29+
if (isInternal):{{
30+
set downloadCommand to cat(downloadCommand, ' --header "Authorization: Bearer $ACCESSTOKEN" --header "x-ms-version: 2017-11-09"')
31+
}}^
32+
33+
_ Add extra arguments required by curl ^
34+
set downloadCommand to when(!useWget,
35+
cat(downloadCommand, " --fail --show-error --location"),
36+
downloadCommand) ^
37+
38+
set perFileArgs(file) to:{{
39+
40+
if (useWget):{{
41+
if (file["out-file"]):{{
42+
return cat("--output-document ", file["out-file"], " ", file["url"])
43+
}}^
44+
return file["url"]
45+
}}^
46+
47+
if (file["out-file"]):{{
48+
return cat("--output ", file["out-file"], " ", file["url"])
49+
}}^
50+
return cat("--remote-name ", file["url"])
51+
52+
}}^
53+
54+
set numFiles to len(ARGS["files"]) ^
55+
set indent to when(numFiles > 1, " ", "")
56+
57+
}}{{downloadCommand}} {{if (numFiles > 1): \
458
}}{{
5-
for i, file in ARGS["files"]:{{if i > 0:&& }}{{
6-
set isLastFile to (i = len(ARGS["files"]) - 1) ^
7-
InsertTemplate("Dockerfile.linux.download-file",
8-
[
9-
"out-file": file["filename"],
10-
"url": file["url"],
11-
"sha": file["sha"],
12-
"sha-var-name": file["sha-var-name"]
13-
])}}{{if !isLastFile: \}}{{if len(ARGS["files"]) > 1 && !isLastFile:
14-
\
59+
for i, file in ARGS["files"]:{{indent}}{{
60+
set isLastFile to (i = len(ARGS["files"]) - 1)
61+
}}{{perFileArgs(file)}}{{if !isLastFile: \
1562
}}}}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{{
2+
_ Downloads a file and verifies its checksum
3+
4+
ARGS:
5+
url : URL to download the file from
6+
out-file : (optional) Name of the output file. If not provided, the filename will
7+
be determined by the server.
8+
sha-function : (optional) SHA function to use (e.g. 256, 384, 512). Defaults to 512.
9+
10+
The following argument groups are mutually exclusive:
11+
12+
sha : (optional) Expected checksum of the downloaded file.
13+
sha-var-name : (optional) Name of variable that stores the checksum. If not provided,
14+
the checksum will be written inline with the call to the sha*sum check tool.
15+
16+
sha-url : (optional) URL to download the checksum file. The file should contain
17+
a single line with the expected checksum and the file name, separated
18+
by one or two spaces. See `man cksum` or `man sha512sum` for details.
19+
20+
sha-url-aggregate : (optional) URL to download the aggregate checksum file. The file may
21+
contain one or more lines with expected checksums and file names
22+
separated by one or two spaces. One line should have a filename
23+
and checksum matching the file to download.
24+
^
25+
26+
set isInternal to find(ARGS["url"], "dotnetstage") >= 0 ^
27+
set isAlpine to find(OS_VERSION, "alpine") >= 0 ^
28+
set useWget to isAlpine ^
29+
30+
set shaFunction to ARGS["sha-function"] ^
31+
set shaFunction to when(shaFunction, shaFunction, "512") ^
32+
33+
set downloadCommand to when(useWget, ["wget"], ["curl"]) ^
34+
35+
_ Add authentication header for internal builds, if appropriate. The same
36+
header works for both wget and curl. ^
37+
_ Documentation for using Managed Identity/OAuth tokens to access Azure storage accounts:
38+
https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-azure-active-directory#call-storage-operations-with-oauth-tokens ^
39+
if (isInternal):{{
40+
set downloadCommand to cat(downloadCommand, ['--header "Authorization: Bearer $ACCESSTOKEN" --header "x-ms-version: 2017-11-09"'])
41+
}}^
42+
43+
if (useWget):{{
44+
set downloadCommand to cat(downloadCommand, ["--output-document", ARGS["out-file"]])
45+
}}^
46+
elif (ARGS["out-file"]):{{
47+
_ Add options specific to curl. ^
48+
set downloadCommand to cat(downloadCommand, ["--fail", "--show-error", "--location"]) ^
49+
set downloadCommand to
50+
when(ARGS["out-file"],
51+
cat(downloadCommand, ["--output", ARGS["out-file"]]),
52+
cat(downloadCommand, ["--remote-name"]))
53+
}}^
54+
55+
set downloadCommand to cat(downloadCommand, [ARGS["url"]])
56+
57+
}}{{InsertTemplate("Dockerfile.linux.download-files", [
58+
"files": [
59+
["url": ARGS["url"], "out-file": ARGS["out-file"]],
60+
]
61+
])}}{{if (ARGS["sha"]): \
62+
&& {{InsertTemplate("Dockerfile.linux.validate-checksum", [
63+
"file": ARGS["out-file"],
64+
"sha": ARGS["sha"],
65+
"sha-var-name": ARGS["sha-var-name"],
66+
"sha-function": shaFunction
67+
])}}}}

eng/dockerfile-templates/Dockerfile.linux.extract-tarball

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
_ Extracts a tarball file and cleans it up
33

44
ARGS:
5-
file: Tarball to extract
6-
extract-paths: Paths within the tarball to extract
7-
dest-dir: Destination directory
5+
file : Tarball to extract
6+
extract-paths : (optional) Paths within the tarball to extract
7+
dest-dir : Destination directory
8+
89
}}tar --gzip --extract --no-same-owner --file {{ARGS["file"]}}{{if ARGS["dest-dir"]: --directory {{ARGS["dest-dir"]}}}}{{if ARGS["extract-paths"]: {{join(ARGS["extract-paths"], " ")}}}} \
910
&& rm {{ARGS["file"]}}

eng/dockerfile-templates/Dockerfile.linux.install-files

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)