Skip to content

Refactor packaging install pipeline to shared DESTDIR-based library - #750

Merged
rafatosta merged 20 commits into
mainfrom
codex/refactor-packaging-infrastructure-for-consistency
Jun 25, 2026
Merged

Refactor packaging install pipeline to shared DESTDIR-based library#750
rafatosta merged 20 commits into
mainfrom
codex/refactor-packaging-infrastructure-for-consistency

Conversation

@rafatosta

Copy link
Copy Markdown
Owner

Motivation

  • Centralize all installation/build logic so DEB, AppImage and Snap reuse one installation pipeline and avoid duplicated code.
  • Ensure the wheel is the single build artifact and that no packaging step installs into the host filesystem by enforcing installs into DESTDIR.
  • Make Snapcraft package an already-prepared installation (no rebuild in the snap build step) using plugin: dump and prepare_package.

Description

  • Add builders/common/common.sh providing log, build_wheel, install_wheel, project_version, find_qt_dir, install_dictionaries, validate_install and prepare_package, all operating against DESTDIR only.
  • Update builders/anylinux-appimage/get-dependencies.sh to source builders/common/common.sh, download dictionaries if missing, set DESTDIR/PREFIX, and call prepare_package instead of building/installing directly into the host.
  • Modify builders/anylinux-appimage/make-appimage.sh to consume the prepared AppDir/usr/bin/zapzap executable and remove duplicated installation and dictionary copy logic so it focuses only on quick-sharun/AppImage generation.
  • Add builders/deb/build.sh that sources the common library, exports DESTDIR to a package root, runs prepare_package, and then builds a .deb; add builders/snap/snapcraft.yaml using plugin: dump and an override-build that sources builders/common/common.sh, sets DESTDIR=$CRAFT_PART_INSTALL and calls prepare_package; add a small builders/snap/build.sh wrapper to run snapcraft.

Testing

  • Performed shell syntax checks with sh -n on builders/common/common.sh, builders/anylinux-appimage/get-dependencies.sh, builders/anylinux-appimage/make-appimage.sh, builders/deb/build.sh and builders/snap/build.sh, which returned no syntax errors.
  • Sourced the new library and ran project_version with . builders/common/common.sh; project_version, which printed the package version successfully.
  • Attempted to run DESTDIR=/tmp/zapzap-package-test ./builders/deb/build.sh, which exercised the pipeline but failed in this environment because python -Im build (and installer) are not available, and attempts to pip install them failed due to network/proxy restrictions.

Codex Task

@rafatosta
rafatosta changed the base branch from dev to main June 25, 2026 18:11
@rafatosta
rafatosta merged commit e2f3f85 into main Jun 25, 2026
@rafatosta
rafatosta deleted the codex/refactor-packaging-infrastructure-for-consistency branch June 27, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant