Skip to content

Fix RPM packaging output paths - #190

Draft
zzwong wants to merge 1 commit into
mainfrom
codex/fix-rpm-output-paths-20261110
Draft

zzwong wants to merge 1 commit into
mainfrom
codex/fix-rpm-output-paths-20261110

Conversation

@zzwong

@zzwong zzwong commented Nov 10, 2026

Copy link
Copy Markdown
Owner

Summary

Fix directory overrides in the Linux RPM helper without changing the package spec or release workflow.

  • Resolve output, staging and build directories once. Absolute RPM_TOPDIR and DIFFZ_DIST values no longer get an extra checkout prefix in RPM macros.
  • Create the output directory when the build directory is separate.
  • Preserve quoted shell arguments and propagate output-copy failures instead of printing success.
  • Add ten regressions to the existing RPM test file, already run by CI.

Reproduction

Baseline: Diffz 0.4.0 source at 7b68d0b6959607ff094745f8ab28a123ef2de2a8; local checks ran on Linux x86_64.

With an existing staged tree, invoke the helper with an absolute RPM_TOPDIR, or an absolute DIFFZ_DIST and the default build directory. The helper copies the payload to the chosen directory but previously passed $PWD/$top/SOURCES to rpmbuild. Expected: the declared RPM source directory is the directory containing the copied payload.

A separate relative build directory also left a new output directory uncreated. The old find -exec cp ... \\; ignored copy failures and could print a success message without a collected package.

Validation

  • python3 -B scripts/tests/test_smoke_linux_rpm.py -v: 33 passed (23 existing checks and ten new regressions).
  • The same final tests against the unchanged helper: four assertion failures and two missing-output errors, demonstrating regression sensitivity.
  • Bash syntax, Python parsing, patch applicability and whitespace checks passed.
  • Verified the source files against GitHub blob hashes and the final remote tree as an exact two-file change.

These fixtures execute the actual Bash helper with real temporary filesystem operations and a recording rpmbuild shim. The shim emits a synthetic marker, not an RPM. They cover defaults, relative/absolute overrides, shell argument boundaries, stage preservation, missing staging, packager failure and collection failure.

Remaining qualification

scripts/check.sh core and scripts/check.sh native both stopped at the Cargo preflight with exit 127. Cargo/Rust, rpmbuild, ShellCheck and actionlint are unavailable locally. No tools were installed.

Real Fedora RPM creation and clean-runtime installation, Rust tests/Clippy/audit, macOS checks and hosted CI remain unrun at submission. The unchanged spec's native handling of paths with spaces is not qualified by the shell/shim tests. This remains a draft pending the existing CI and Fedora packaging gates.

No application source, RPM dependency declarations, workflow permissions, release configuration or cache policy changed.

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.

1 participant