Skip to content

Sign Source Asset for Source-Build Release - #4937

Merged
mthalman merged 5 commits into
dotnet:mainfrom
ellahathaway:sign-source-asset
Mar 4, 2026
Merged

mthalman merged 5 commits into
dotnet:mainfrom
ellahathaway:sign-source-asset

Conversation

@ellahathaway

Copy link
Copy Markdown
Member

Related to https://github.com/dotnet/release/issues/1416

This PR enables the signing and signature verification of the source-built source-asset

Dry-run signing run

Copilot AI review requested due to automatic review settings February 18, 2026 17:41
@ellahathaway
ellahathaway requested review from a team as code owners February 18, 2026 17:41
@ellahathaway

Copy link
Copy Markdown
Member Author

This PR requires #4933 before it can be merged. I am adding the No Merge label until the dependent PR is merged.

@ellahathaway ellahathaway added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Feb 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enables signing and signature verification of source-built source assets for .NET releases. The implementation adds support for creating detached PGP signatures (.sig files) for source tarballs as part of the post-build signing process, addressing requirements from dotnet/release#1416.

Changes:

  • Adds LinuxSign500180PGP certificate configuration for signing source assets with detached signatures
  • Creates empty placeholder .sig files during build to ensure they are included in artifact publishing
  • Enables source artifact signing in the signing workflow by uncommenting previously disabled code

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/static/Signing.props Adds certificate configuration and FileSignInfo target to sign source tarballs with detached signatures using DoNotUnpack=true
eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/CreateSourceArtifact.cs Adds CreateEmptyDetachedSignature property and logic to create empty .sig placeholder files alongside source artifacts
eng/sign-source-built-artifacts.proj Enables source artifact signing by uncommenting the source tarball item groups and validation checks
eng/finish-source-only.proj Passes CreateEmptyDetachedSignature parameter to CreateSourceArtifact task based on DotNetSourceOnlyPostBuildSign property
eng/PublishSourceBuild.props Updates file patterns to include signature files ($(ArchiveExtension)) for publishing source artifacts and their signatures

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ellahathaway

Copy link
Copy Markdown
Member Author

@dotnet/source-build - friendly ping for a review

@ellahathaway

Copy link
Copy Markdown
Member Author

/azp run dotnet-unified-build-full

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@ellahathaway
ellahathaway enabled auto-merge (squash) March 4, 2026 17:03
@ellahathaway ellahathaway removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Mar 4, 2026
@ellahathaway
ellahathaway disabled auto-merge March 4, 2026 21:02
@ellahathaway

Copy link
Copy Markdown
Member Author

@dotnet/source-build - the build failures are unrelated to my changes. See the successful SB signing leg here. Can I get help merging this PR? Thanks in advance.

@mthalman

mthalman commented Mar 4, 2026

Copy link
Copy Markdown
Member

@dotnet/source-build - the build failures are unrelated to my changes. See the successful SB signing leg here. Can I get help merging this PR? Thanks in advance.

Are they for sure unrelated? The OSX leg failed in SignTool:

artifacts/source-built-sdks/Microsoft.DotNet.Arcade.Sdk/tools/Sign.proj(79,5): error : Unknown file format.
   at System.Reflection.PortableExecutable.PEHeaders..ctor(Stream peStream, Int32 size, Boolean isLoadedImage)
   at System.Reflection.PortableExecutable.PEReader.InitializePEHeaders()
   at Microsoft.DotNet.SignTool.VerifySignatures.IsSignedPE(String filePath) in /_/src/arcade/src/Microsoft.DotNet.SignTool/src/VerifySignatures.cs:line 192
   at Microsoft.DotNet.SignTool.Configuration.ExtractSignInfo(PathWithHash file, PathWithHash parentContainer, String collisionPriorityId, String wixContentFilePath) in /_/src/arcade/src/Microsoft.DotNet.SignTool/src/Configuration.cs:line 467
   at Microsoft.DotNet.SignTool.Configuration.TrackFile(PathWithHash file, PathWithHash parentContainer, String collisionPriorityId) in /_/src/arcade/src/Microsoft.DotNet.SignTool/src/Configuration.cs:line 217
   at Microsoft.DotNet.SignTool.Configuration.TryBuildZipData(FileSignInfo zipFileSignInfo, ZipData& zipData, String alternativeArchivePath) in /_/src/arcade/src/Microsoft.DotNet.SignTool/src/Configuration.cs:line 869

@ellahathaway

Copy link
Copy Markdown
Member Author

Are we sure they’re unrelated? The OSX leg failed in SignTool:

Yeah. This PR just enables the signing of the source asset in the SB_CentOSStream10_Offline_MsftSdk_x64 leg, and that OSX failure looks like the same issue as described in #4720 (comment).

@mthalman
mthalman merged commit 33f81f9 into dotnet:main Mar 4, 2026
57 of 64 checks passed
@ellahathaway
ellahathaway deleted the sign-source-asset branch March 4, 2026 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants