Skip to content

feat(aqua): make bin paths executable#6010

Merged
jdx merged 15 commits into
jdx:mainfrom
risu729:aqua-executable
Aug 13, 2025
Merged

feat(aqua): make bin paths executable#6010
jdx merged 15 commits into
jdx:mainfrom
risu729:aqua-executable

Conversation

@risu729

@risu729 risu729 commented Aug 13, 2025

Copy link
Copy Markdown
Contributor

Reapplies #5998 (reverted in #6004) with some changes.

Some tools don't set +x permissions to their executable files in the archives:

Since both .tar and .zip can include permissions in the archive, this is not a mise bug, but their issues.
However, I think supporting them would be beneficial for some users.

aqua supports this because they use shims. ubi backend also supports this but I'm not sure why.

Copilot AI review requested due to automatic review settings August 13, 2025 12:16

This comment was marked as outdated.

@risu729 risu729 requested a review from Copilot August 13, 2025 12:34

This comment was marked as outdated.

@risu729 risu729 requested a review from Copilot August 13, 2025 13:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables making binary paths executable for aqua-managed tools that don't have proper executable permissions in their archives. It reapplies a previously reverted change with improvements to handle multiple binary files and ensures executability for formats like tar, zip, and compressed files.

  • Adds logic to make binary paths executable for certain archive formats
  • Refactors binary path handling to support multiple binaries per package
  • Updates registry to re-enable aqua backends for tools that previously had permission issues

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/backend/aqua.rs Implements executable permission setting for binary paths and refactors to handle multiple binaries
registry.toml Re-enables aqua backends for tools that previously had executable permission issues

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread src/backend/aqua.rs Outdated
Comment thread src/backend/aqua.rs
@jdx jdx enabled auto-merge (squash) August 13, 2025 14:17
@jdx jdx disabled auto-merge August 13, 2025 14:17
@jdx

jdx commented Aug 13, 2025

Copy link
Copy Markdown
Owner

bugbot run

cursor[bot]

This comment was marked as outdated.

@jdx

jdx commented Aug 13, 2025

Copy link
Copy Markdown
Owner

bugbot run

Comment thread src/backend/aqua.rs
file::un_bz2(&tarball_path, &bin_path)?;
file::make_executable(&bin_path)?;
file::un_bz2(&tarball_path, first_bin_path)?;
make_executable = true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: Package Installation Fails for Subdirectories and Executable Permissions

The commit introduces two issues during package installation:

  1. For raw, gz, xz, zst, and bz2 formats, file::copy or file::un_* operations fail if first_bin_path (derived from file.src()) includes subdirectories. This occurs because only the install_path is created, not the necessary parent directories for the target binary.
  2. For GithubArchive and GithubContent package types, the make_executable flag is not set. Consequently, extracted binaries are not made executable, potentially leaving tools unusable if their archives lack executable permissions.
Fix in Cursor Fix in Web

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

  1. That's true, but I don't think we need to care about it, as we shouldn't have files[].src for single binaries.
  2. I intentionally excluded it because they should set permissions in Git. I'll consider it if someone find such cases.

@jdx jdx merged commit 2118830 into jdx:main Aug 13, 2025
22 of 23 checks passed
@risu729 risu729 deleted the aqua-executable branch August 13, 2025 16:36
jdx pushed a commit that referenced this pull request Aug 14, 2025
### 📦 Registry

- enable kubecolor test by [@risu729](https://github.com/risu729) in
[#6008](#6008)
- fix os specific backends for usage by
[@risu729](https://github.com/risu729) in
[#6007](#6007)
- use aqua backend for restish by [@risu729](https://github.com/risu729)
in [#5986](#5986)
- add cfssljson
([aqua:cloudflare/cfssl/cfssljson](https://github.com/cloudflare/cfssl/cfssljson))
by [@disintegrator](https://github.com/disintegrator) in
[#6013](#6013)
- add claude-squad
([aqua:smtg-ai/claude-squad](https://github.com/smtg-ai/claude-squad))
by [@TyceHerrman](https://github.com/TyceHerrman) in
[#5894](#5894)

### 🚀 Features

- **(aqua)** make bin paths executable by
[@risu729](https://github.com/risu729) in
[#6010](#6010)
- added header bar during `mise install` by
[@jdx](https://github.com/jdx) in
[#6022](#6022)

### 🐛 Bug Fixes

- **(aqua)** improve warnings for packages without repo_owner and
repo_name (2nd attempt) by [@risu729](https://github.com/risu729) in
[#6009](#6009)
- version prefix detection by [@risu729](https://github.com/risu729) in
[#5943](#5943)
- respect MISE_DEFAULT_CONFIG_FILENAME by
[@risu729](https://github.com/risu729) in
[#5899](#5899)

### New Contributors

- @disintegrator made their first contribution in
[#6013](#6013)
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.

3 participants