diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 index 0253016cb..d10d82510 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Generator.ps1 @@ -91,7 +91,9 @@ $toolsList = @( (Get-AzCopy10Version), (Get-BazelVersion), (Get-BazeliskVersion), + (Get-BinUtilsVersion), (Get-CodeQLBundleVersion), + (Get-CoreUtilsVersion), (Get-CMakeVersion), (Get-CurlVersion), (Get-DockerMobyVersion), diff --git a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 index 937d5aca8..9226ad055 100644 --- a/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 +++ b/images/linux/scripts/SoftwareReport/SoftwareReport.Tools.psm1 @@ -34,6 +34,12 @@ function Get-BazeliskVersion { return "Bazelisk $bazeliskVersion" } +function Get-BinUtilsVersion { + $result = Get-CommandResult "dpkg-query --show binutils" + $binUtilsVersion = $result.Output| Take-OutputPart -Part 1 -Delimiter "`t" | Take-OutputPart -Part 0 -Delimiter "-" + return "binutils $binUtilsVersion" +} + function Get-CodeQLBundleVersion { $CodeQLVersionsWildcard = Join-Path $Env:AGENT_TOOLSDIRECTORY -ChildPath "CodeQL" | Join-Path -ChildPath "*" $CodeQLVersionPath = Get-ChildItem $CodeQLVersionsWildcard | Select-Object -First 1 -Expand FullName @@ -42,6 +48,12 @@ function Get-CodeQLBundleVersion { return "CodeQL Action Bundle $CodeQLVersion" } +function Get-CoreUtilsVersion { + $result = Get-CommandResult "dpkg-query --show coreutils" + $coreUtilsVersion = $result.Output | Take-OutputPart -Part 1 -Delimiter "`t" | Take-OutputPart -Part 0 -Delimiter "-" + return "coreutils $coreUtilsVersion" +} + function Get-PodManVersion { $podmanVersion = podman --version | Take-OutputPart -Part 2 return "Podman $podmanVersion" diff --git a/images/linux/scripts/tests/Apt.Tests.ps1 b/images/linux/scripts/tests/Apt.Tests.ps1 index 1306f5537..3fc00f2c1 100644 --- a/images/linux/scripts/tests/Apt.Tests.ps1 +++ b/images/linux/scripts/tests/Apt.Tests.ps1 @@ -24,6 +24,16 @@ Describe "Apt" { $toolName = "searchd" } + if ($toolName -eq "binutils") + { + $toolName = "strings" + } + + if ($toolName -eq "coreutils") + { + $toolName = "tr" + } + (Get-Command -Name $toolName).CommandType | Should -BeExactly "Application" } } \ No newline at end of file diff --git a/images/linux/toolsets/toolset-1604.json b/images/linux/toolsets/toolset-1604.json index 9dcf5f464..f9ef6c681 100644 --- a/images/linux/toolsets/toolset-1604.json +++ b/images/linux/toolsets/toolset-1604.json @@ -181,9 +181,11 @@ "zsync" ], "cmd_packages": [ + "binutils", "bison", "brotli", "bzip2", + "coreutils", "curl", "file", "flex", diff --git a/images/linux/toolsets/toolset-1804.json b/images/linux/toolsets/toolset-1804.json index e71c96b81..0b385d491 100644 --- a/images/linux/toolsets/toolset-1804.json +++ b/images/linux/toolsets/toolset-1804.json @@ -175,9 +175,11 @@ "zsync" ], "cmd_packages": [ + "binutils", "bison", "brotli", "bzip2", + "coreutils", "curl", "file", "flex", diff --git a/images/linux/toolsets/toolset-2004.json b/images/linux/toolsets/toolset-2004.json index 7655703f0..a3696fcdc 100644 --- a/images/linux/toolsets/toolset-2004.json +++ b/images/linux/toolsets/toolset-2004.json @@ -151,9 +151,11 @@ "zsync" ], "cmd_packages": [ + "binutils", "bison", "brotli", "bzip2", + "coreutils", "curl", "file", "flex",