Skip to content

Reapply "Deduplicate files using links in mac and linux installers" (#4800) - #4879

Merged
MichaelSimons merged 1 commit into
dotnet:mainfrom
MichaelSimons:linux-installers
Feb 17, 2026
Merged

MichaelSimons merged 1 commit into
dotnet:mainfrom
MichaelSimons:linux-installers

Conversation

@MichaelSimons

Copy link
Copy Markdown
Member

This reverts commit d5a0c5a.

The arcade signing fixes flowed in with #4862

Validated with a real sign build.

Copilot AI review requested due to automatic review settings February 14, 2026 16:08
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team February 14, 2026 16:08

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 reapplies the deduplication feature (#4800) that creates symbolic links in Mac and Linux installers to reduce package size, after the required Arcade signing fixes flowed in via PR #4862. The PR includes a new MSBuild task for copying files while preserving symbolic links, comprehensive end-to-end tests for various installer formats, and refactored test infrastructure.

Changes:

  • Introduces CopyPreservingRelativeSymlinks MSBuild task that preserves relative symbolic links during file copy operations, essential for maintaining deduplicated SDK layouts in installers
  • Adds comprehensive end-to-end tests for verifying symbolic link preservation in Linux (.deb, .rpm) and macOS (.pkg) installer packages
  • Refactors test infrastructure by extracting MockBuildEngine to a shared file and adding reusable helper methods for artifact discovery and installer validation

Reviewed changes

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

Show a summary per file
File Description
src/sdk/src/Tasks/sdk-tasks/CopyPreservingRelativeSymlinks.cs New MSBuild task that copies files while preserving relative symbolic links instead of resolving them
src/sdk/src/Tasks/sdk-tasks/sdk-tasks.InTree.targets Registers the new CopyPreservingRelativeSymlinks task for use in build targets
src/sdk/src/Layout/redist/targets/GenerateInstallerLayout.targets Uses CopyPreservingRelativeSymlinks to preserve symlinks when copying SDK layout to installer staging directory
src/sdk/src/Layout/pkg/dotnet-sdk.proj Uses CopyPreservingRelativeSymlinks to preserve symlinks when creating package layout
src/sdk/test/sdk-tasks.Tests/CopyPreservingRelativeSymlinksTests.cs Comprehensive unit tests for the new task covering regular files, symlinks, edge cases, and error conditions
src/sdk/test/sdk-tasks.Tests/MockBuildEngine.cs Extracted shared mock IBuildEngine implementation for reuse across test files
src/sdk/test/sdk-tasks.Tests/DeduplicateAssembliesWithLinksTests.cs Removed embedded MockBuildEngine class (now uses shared implementation)
src/sdk/test/Microsoft.NET.TestFramework/SdkTestContext.cs Refactored artifact finding methods to support optional artifacts with filtering and better error messages
src/sdk/test/EndToEnd.Tests/Utilities/SymbolicLinkHelpers.cs Refactored to add VerifyInstallerSymlinks helper that consolidates platform checking, artifact discovery, and validation
src/sdk/test/EndToEnd.Tests/GivenSdkArchives.cs Updated to use refactored ExtractTar helper and improved skip message
src/sdk/test/EndToEnd.Tests/GivenDotNetMacInstallers.cs New test class verifying .pkg packages preserve symbolic links on macOS
src/sdk/test/EndToEnd.Tests/GivenDotNetLinuxInstallers.cs Expanded with new tests for verifying .deb and .rpm packages preserve symbolic links

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

@MichaelSimons
MichaelSimons merged commit 94c063c into dotnet:main Feb 17, 2026
17 checks passed
@MichaelSimons
MichaelSimons deleted the linux-installers branch February 17, 2026 14:30
@dotnet-policy-service
dotnet-policy-service Bot requested a review from a team February 17, 2026 14:30
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