diff --git a/tools/packages.microsoft.com/mapping.json b/tools/packages.microsoft.com/mapping.json index 5e468041253d..8bb238e1e8f1 100644 --- a/tools/packages.microsoft.com/mapping.json +++ b/tools/packages.microsoft.com/mapping.json @@ -18,13 +18,13 @@ { "url": "cbl-mariner-2.0-prod-Microsoft-x86_64", "distribution" : ["bionic"], - "PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.cm1.x86_64.rpm", + "PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.cm.x86_64.rpm", "channel" : "stable" }, { "url": "cbl-mariner-2.0-preview-Microsoft-x86_64", "distribution" : ["bionic"], - "PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.cm1.x86_64.rpm", + "PackageFormat" : "PACKAGE_NAME-POWERSHELL_RELEASE-1.cm.x86_64.rpm", "channel" : "preview" }, { diff --git a/tools/packaging/packaging.psm1 b/tools/packaging/packaging.psm1 index 05f431af6473..044e1acd5232 100644 --- a/tools/packaging/packaging.psm1 +++ b/tools/packaging/packaging.psm1 @@ -8,7 +8,7 @@ $packagingStrings = Import-PowerShellDataFile "$PSScriptRoot\packaging.strings.p Import-Module "$PSScriptRoot\..\Xml" -ErrorAction Stop -Force $DebianDistributions = @("deb") $RedhatFullDistributions = @("rh") -$RedhatFddDistributions = @("cm1") +$RedhatFddDistributions = @("cm") $RedhatDistributions = @() $RedhatDistributions += $RedhatFullDistributions $RedhatDistributions += $RedhatFddDistributions @@ -1354,7 +1354,7 @@ function Get-PackageDependencies "openssl-libs", "libicu" ) - } elseif ($Distribution -eq 'cm1') { + } elseif ($Distribution -eq 'cm') { # Taken from the list here: # https://github.com/dotnet/dotnet-docker/blob/d451d6e9427f58c8508f1297c862663a27eb609f/src/runtime-deps/6.0/cbl-mariner1.0/amd64/Dockerfile#L6 $Dependencies = @( diff --git a/tools/packaging/releaseTests/sbom.tests.ps1 b/tools/packaging/releaseTests/sbom.tests.ps1 index 9469f68576ea..7c0c73ed17ef 100644 --- a/tools/packaging/releaseTests/sbom.tests.ps1 +++ b/tools/packaging/releaseTests/sbom.tests.ps1 @@ -47,8 +47,8 @@ Describe "Verify SBOMs" { try { if (Get-Command -Name rpm2cpio -ErrorAction SilentlyContinue) { rpm2cpio $case.FilePath | cpio -i --make-directories 2>cpio.log - $manifestPath = Get-ChildItem -Path manifest.spdx.json -Recurse | Select-Object -First 1 -ExpandProperty FullName $extractedPath = Get-ChildItem -Path system.management.automation.dll -Recurse | Select-Object -First 1 -ExpandProperty DirectoryName + $manifestPath = Join-Path $extractedPath -ChildPath '/_manifest/spdx_2.2/manifest.spdx.json' } else { $skip = "rpm2cpio not found" } diff --git a/tools/releaseBuild/azureDevOps/templates/linux.yml b/tools/releaseBuild/azureDevOps/templates/linux.yml index 92224a74d041..53057fec716e 100644 --- a/tools/releaseBuild/azureDevOps/templates/linux.yml +++ b/tools/releaseBuild/azureDevOps/templates/linux.yml @@ -84,6 +84,16 @@ jobs: PackageVersion: $(Version) sourceScanPath: '$(PowerShellRoot)/tools' + - ${{ if eq(variables.build,'rpm') }} : + - template: Sbom.yml@ComplianceRepo + parameters: + BuildDropPath: '$(System.ArtifactsDirectory)/pwshMarinerBuildAmd64' + Build_Repository_Uri: $(Github_Build_Repository_Uri) + displayName: Mariner SBOM + PackageName: PowerShell Linux Framework Dependent + PackageVersion: $(Version) + sourceScanPath: '$(PowerShellRoot)/tools' + - ${{ if eq(variables.build,'deb') }} : - template: Sbom.yml@ComplianceRepo parameters: @@ -269,7 +279,8 @@ jobs: signOutputPath: $(Build.StagingDirectory)\signedPackages certificateId: "CP-459159-Pgp" pattern: | - **\*.cm1.*.rpm + **\*.cm.*.rpm + **\*.cm?.*.rpm useMinimatch: true shouldSign: $(SHOULD_SIGN) displayName: Sign Mariner RPM diff --git a/tools/releaseBuild/azureDevOps/templates/release-ValidatePackageNames.yml b/tools/releaseBuild/azureDevOps/templates/release-ValidatePackageNames.yml index d50c94bcba14..c0e71d4dd94a 100644 --- a/tools/releaseBuild/azureDevOps/templates/release-ValidatePackageNames.yml +++ b/tools/releaseBuild/azureDevOps/templates/release-ValidatePackageNames.yml @@ -30,7 +30,7 @@ steps: - pwsh: | $message = @() Get-ChildItem $(System.ArtifactsDirectory)\* -recurse -filter *.rpm | ForEach-Object { - if($_.Name -notmatch 'powershell\-(preview-|lts-)?\d\.\d\.\d(_[a-z]*\.\d+)?-1.(rh|cm1).x86_64\.rpm') + if($_.Name -notmatch 'powershell\-(preview-|lts-)?\d+\.\d+\.\d+(_[a-z]*\.\d+)?-1.(rh|cm).x86_64\.rpm') { $messageInstance = "$($_.Name) is not a valid package name" $message += $messageInstance