Skip to content

fix(build): resolve relative paths and preserve zip execute bits (#217)#220

Merged
BANANASJIM merged 1 commit intoBANANASJIM:masterfrom
K1ngst0m:fix/217-swig-autogen-not-executable
Apr 16, 2026
Merged

fix(build): resolve relative paths and preserve zip execute bits (#217)#220
BANANASJIM merged 1 commit intoBANANASJIM:masterfrom
K1ngst0m:fix/217-swig-autogen-not-executable

Conversation

@K1ngst0m
Copy link
Copy Markdown
Collaborator

@K1ngst0m K1ngst0m commented Apr 16, 2026

_safe_extractall() now restores Unix execute bits from zip entries, fixing SWIG autogen.sh exit-126 on Linux. CLI-supplied install/build dirs are resolved to absolute paths so cmake never mis-resolves them relative to the source tree.

Closes #217

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Fixed issue where Unix executable permissions were lost during the build extraction process. Executable permission bits are now properly restored after extraction.
    • Improved handling of CLI-provided installation and build directory paths with enhanced path resolution.

@K1ngst0m K1ngst0m requested a review from BANANASJIM as a code owner April 16, 2026 08:08
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 29d704a3-561c-4841-87e4-b85fe234912e

📥 Commits

Reviewing files that changed from the base of the PR and between 796f362 and c9bbdbc.

📒 Files selected for processing (1)
  • src/rdc/_build_renderdoc.py

📝 Walkthrough

Walkthrough

The changes fix Unix executable permission loss during zip file extraction by restoring mode bits from the zip metadata, and improve path handling in CLI arguments by resolving them to absolute paths before processing.

Changes

Cohort / File(s) Summary
Permission and Path Resolution
src/rdc/_build_renderdoc.py
Updated _safe_extractall() to restore Unix executable bits (0o111) from zip member's external_attr after extraction. Modified main() to call .resolve() on CLI-provided --install_dir and --build-dir paths for consistent absolute path handling.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 A zip file unpacked, but permissions were lost,
The rabbit restored them—no executable cost!
With paths now resolved to their absolute home,
The build commands dance, no more need to roam.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title accurately describes the main changes: restoring execute bits from zip files and resolving relative paths to absolute paths in the build system.
Linked Issues check ✅ Passed Changes directly address issue #217 by preserving Unix execute bits from zip extraction and resolving CLI-supplied paths to absolute values, fixing SWIG autogen.sh execution failure.
Out of Scope Changes check ✅ Passed All changes in _safe_extractall() and main() are directly scoped to fixing the zip executable bits and path resolution issues identified in issue #217.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

…ANASJIM#217)

_safe_extractall() now restores Unix execute bits from zip entries,
fixing SWIG autogen.sh exit-126 on Linux.  CLI-supplied install/build
dirs are resolved to absolute paths so cmake never mis-resolves them
relative to the source tree.

Closes BANANASJIM#217
@BANANASJIM BANANASJIM force-pushed the fix/217-swig-autogen-not-executable branch from 4420988 to c9bbdbc Compare April 16, 2026 15:31
Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@BANANASJIM BANANASJIM merged commit 3f385d6 into BANANASJIM:master Apr 16, 2026
17 checks passed
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.

setup-renderdoc: SWIG autogen.sh not executable after zip extraction (exit 126)

2 participants