macadmins / macadmins/nudge

Replace munki-pkg with SwiftPkg for installer packaging

Open
#707 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Swift
Stars
1.3k
Forks
207
PR merge metrics
No merged PRs in 30d

Description

Replace the `munki-pkg` dependency in Nudge's packaging workflow with the [SwiftPkg CLI](https://github.com/codecarton/swiftpkg).

`build_nudge.zsh` currently downloads `munki/munki-pkg` at commit `71c57fcfdf43692adcd41fa7305be08f66bae3e5` and invokes it through Python to build five installer packages. [Upstream has announced the retirement of munkipkg and recommends SwiftPkg](https://github.com/munki/munki-pkg#readme). SwiftPkg supports the existing package-project layout and build-info formats, but compatibility with Nudge's actual artifacts needs validation before switching.

## Scope

- Select a published stable SwiftPkg CLI release and pin the version and artifact checksum (and action commit if using its GitHub Action). Verify the chosen release's actual assets and supported CLI options rather than relying on development-branch examples.
- Replace the munki-pkg download/extraction setup and all five Python/munkipkg invocations in `build_nudge.zsh`.
- Remove obsolete munki-pkg variables, temporary archive handling, and the Python dependency specifically used for packaging. Keep unrelated Python simulation tooling.
- Update automatic and manual release/prerelease workflows and the signed PR workflow where dependency installation is needed. Keep local builds supported.
- Preserve package names, identifiers, versioning, install locations, payload contents, ownership/modes, postinstall scripts, distribution behavior, and bundle-relocation settings for Nudge, LaunchAgent, Logger, Essentials, and Suite packages.
- Preserve Developer ID signing and the existing notarization/stapling flow unless a change is required and validated. Propagate nonzero build/signing failures immediately.
- Document the new build dependency and migration in the changelog. The SwiftPkg CLI's build-host requirements must not raise Nudge's macOS 12 deployment target or the resulting packages' intended client compatibility.

## Acceptance criteria

- [ ] No active packaging step downloads or invokes munki-pkg.
- [ ] SwiftPkg is reproducibly provisioned on the macOS GitHub runner and documented for local builds.
- [ ] All five packages build successfully; expanded payloads, receipts/identifiers, versions, install locations, permissions, and installer scripts match the existing output's intended behavior.
- [ ] Signed packages pass signature verification, notarization, and stapler validation using the existing certificate-import configuration.
- [ ] Installation/upgrade checks on disposable test machines confirm the application and LaunchAgent/Logger behavior, including a macOS 12 client compatibility check.
- [ ] An isolated package-build failure produces a failed workflow instead of allowing release publication to continue.
- [ ] A prerelease packaging run produces all expected artifacts with validation results recorded before using SwiftPkg for a stable release.

This ticket covers the packaging migration only; it does not require adopting the Swiftpkgr desktop app or changing Nudge's runtime/update policy.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with build_nudge.zsh and the automatic, manual, prerelease, and signed PR workflow files to map the five packaging invocations, dependency setup, signing, and failure handling. Verify a stable SwiftPkg release and its actual macOS runner assets and CLI options before changing the workflows. Done means reproducible local and CI builds preserve package behavior, validation, notarization, and macOS 12 compatibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, macos, swift, zsh
Domain
build-system, ci-cd, release
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.