macadmins / macadmins/python

Replace munki-pkg with swiftpkg for managed Python packaging

未关闭
#94 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
Shell
星标
257
派生
29
PR 合并指标
30 天内没有已合并 PR

描述

Objective

Migrate this repository's managed Python installer packaging to codecarton/swiftpkg and retire the munki-pkg build dependency.

Current behavior

build_python_framework_pkgs.zsh downloads a pinned munki-pkg commit using MP_SHA, MP_BINDIR, and MP_ZIP. Its build_pkg() function generates recommended/build-info.json, stages preinstall-cleanup, invokes munkipkg, and moves the signed package into outputs/. Notarization and stapling run separately. Without an installer identity, the script skips package creation and still produces the framework ZIP.

Implementation scope

  • Select and pin a published swiftpkg CLI release compatible with Apple Silicon build hosts; verify the downloaded artifact against a pinned SHA-256 and document prerequisites.
  • Replace the munki-pkg download, temporary paths, and invocation with swiftpkg; propagate failures clearly.
  • Validate compatibility of every generated build-info setting, especially ownership, suppress_bundle_relocation, preserve_xattr, distribution_style, and signing_info. Implement equivalent behavior for any unsupported settings.
  • Preserve the package identifier (io.macadmins.python.recommended), version derivation, output filename/location, payload layout, permissions, symlinks, extended attributes, and preinstall cleanup behavior.
  • Preserve framework code signing and the existing installer signing/notarization/stapling sequence; avoid duplicate notarization.
  • Ensure Python 3.11, 3.12, 3.13, and 3.14 workflows use the replacement and continue publishing expected artifacts; update workflows only where necessary.
  • Update README build prerequisites and credits. Remove active munki-pkg dependencies and obsolete bootstrap references while retaining appropriate historical attribution.

Acceptance criteria

  • Local and CI packaging use the pinned swiftpkg CLI with verified artifact integrity; no active build path downloads or executes munki-pkg.
  • All generated build-info options have verified equivalent behavior, with any migration differences documented.
  • On Apple Silicon, inspect a baseline munki-pkg package and replacement package to confirm equivalent receipts, version, install paths, payload, ownership/modes, symlinks, extended attributes, installer scripts, and non-relocation behavior.
  • Signed packages pass signature checks, notarization, and stapling validation using the existing signing credentials.
  • Clean-install and upgrade smoke tests on a disposable Apple Silicon Mac confirm preinstall cleanup, framework installation at /Library/ManagedFrameworks/Python/Python3.framework, the managed_python3 symlink, and execution/imports of the managed runtime and bundled dependencies.
  • The no-installer-identity path continues producing the framework ZIP without requiring signing credentials.
  • Each supported Python workflow builds and publishes the expected package artifact.
  • zsh -n build_python_framework_pkgs.zsh passes; any modified workflow YAML parses successfully.
  • README documents the replacement tool, pinned version/update procedure, and prerequisites.

Boundaries

This change replaces the package builder. It does not remove support for deploying the resulting installer through Munki, change Python/runtime dependencies, add the Swiftpkgr desktop app, or change the managed framework's installation contract.

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 build_python_framework_pkgs.zsh 开始,重点检查 build_pkg()、munki-pkg bootstrap 变量以及现有的 build-info.json 生成流程。然后检查 Python 3.11–3.14 的 workflow 文件和 README 中的前置条件。在 Apple Silicon 上比较 baseline package 和替换 package,并使用列出的 shell、签名、notarization、smoke test 和 artifact 检查来验证是否完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
shell
领域
build-system, ci-cd, tooling
Issue 类型
重构
难度
5/5
预计耗时
一周以上
活跃度
活跃
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。