Skip to content

Commit 475fecb

Browse files
lbussellCopilot
andcommitted
Fix resolute chiseled expected package lists
- Remove openssl-provider-legacy from amd64 expected packages (no longer present in resolute amd64 images) - Add openssl-provider-legacy to arm32 expected packages (now detected by Syft on arm32) - Add tzdata-legacy to the extra packages for resolute chiseled images (present on all architectures) - Rename method to GetResoluteChiseledArchSpecificPackages Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 80af290 commit 475fecb

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

tests/Microsoft.DotNet.Docker.Tests/ProductImageTests.cs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ private static IEnumerable<string> GetRuntimeDepsPackages(ProductImageData image
313313
[
314314
"ca-certificates",
315315
"gcc-14-base",
316-
..GetResoluteChiseledAmd64Packages(imageData),
316+
..GetResoluteChiseledArchSpecificPackages(imageData),
317317
"libc6",
318318
"libgcc-s1",
319319
"libssl3t64",
@@ -392,11 +392,16 @@ private static string GetZLibPackage(OSInfo os)
392392
}
393393

394394
/// <summary>
395-
/// Syft detects gcc-16 and openssl-provider-legacy as separate binary packages
396-
/// on amd64 resolute chiseled images but not on arm64/arm32.
395+
/// Syft detects additional binary packages on specific architectures
396+
/// for resolute chiseled images: gcc-16 on amd64, openssl-provider-legacy on arm32.
397397
/// </summary>
398-
private static IEnumerable<string> GetResoluteChiseledAmd64Packages(ProductImageData imageData) =>
399-
imageData.Arch == Arch.Amd64 ? ["gcc-16", "openssl-provider-legacy"] : [];
398+
private static IEnumerable<string> GetResoluteChiseledArchSpecificPackages(ProductImageData imageData) =>
399+
imageData.Arch switch
400+
{
401+
Arch.Amd64 => ["gcc-16"],
402+
Arch.Arm => ["openssl-provider-legacy"],
403+
_ => []
404+
};
400405

401406
private static IEnumerable<string> GetExtraPackages(ProductImageData imageData) => imageData switch
402407
{
@@ -409,7 +414,8 @@ private static IEnumerable<string> GetResoluteChiseledAmd64Packages(ProductImage
409414
{
410415
"icu",
411416
"libicu78",
412-
"tzdata"
417+
"tzdata",
418+
"tzdata-legacy"
413419
},
414420
{ OS: var os } when os == OS.NobleChiseled => new[]
415421
{

0 commit comments

Comments
 (0)