Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpack/Repack Pkg Tooling and Tests #15205

Merged
merged 15 commits into from
Nov 21, 2024
Merged

Conversation

ellahathaway
Copy link
Member

@ellahathaway ellahathaway commented Oct 29, 2024

Related to #14438

This PR introduces a tool that unpacks and repacks .pkg files and nested .app bundles. It also includes test cases and test data for the tool.

The MacOS PKG tool includes the following components:

  • Program.cs: Driver for unpacking and packing .pkg files and .app bundles.
  • Package.cs: Class representing a .pkg, responsible for unpacking and repacking .pkg installer packages and component packages.
  • AppBundle.cs: Class representing an .app bundle, which unpacks and repacks .app directories into .zip files. This is necessary for Enable signing and notarization of .pkg files using SignTool #14435
  • Utilities.cs: Class that contains helper functions.
  • ExecuteHelper.cs: Class that runs processes.

@ellahathaway
Copy link
Member Author

I'm going to update the tests to include checks against the checksums. When I did this check locally, the checksums were different. I verified that it's the Bom files that are different, so I'm currently working to identify why that is.

In the meantime, I think that the PR is still worth reviewing so I'm going to leave this undrafted.

@ellahathaway
Copy link
Member Author

I'm going to update the tests to include checks against the checksums. When I did this check locally, the checksums were different. I verified that it's the Bom files that are different, so I'm currently working to identify why that is.

In the meantime, I think that the PR is still worth reviewing so I'm going to leave this undrafted.

Filed #15219 to investigate this at a later time.

src/Microsoft.DotNet.Pkg.Tests/UnpackRepackTests.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg.Tests/UnpackRepackTests.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg.Tests/UnpackRepackTests.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/AppBundle.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/PackageBundle.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/Processor.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/Processor.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/Processor.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/Program.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/ExecuteHelper.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg/Program.cs Outdated Show resolved Hide resolved
src/Microsoft.DotNet.Pkg.Tests/UnpackPackTests.cs Outdated Show resolved Hide resolved
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(NetToolCurrent);$(NetFrameworkToolCurrent)</TargetFrameworks>
Copy link
Member

Choose a reason for hiding this comment

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

Because this can only be run on Mac, this should not need NetFrameworkToolCurrent, correct?

@ellahathaway ellahathaway enabled auto-merge (squash) November 21, 2024 17:04
@ellahathaway ellahathaway merged commit 22f9fcf into dotnet:main Nov 21, 2024
11 checks passed
@ellahathaway ellahathaway deleted the pkgtool branch November 21, 2024 19:05
@ellahathaway ellahathaway mentioned this pull request Nov 21, 2024
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.

7 participants