Skip to content

Preserve exec bit in CLI zip; document installation via mise#267

Draft
rolang wants to merge 1 commit into
mainfrom
cli-mise-package
Draft

Preserve exec bit in CLI zip; document installation via mise#267
rolang wants to merge 1 commit into
mainfrom
cli-mise-package

Conversation

@rolang

@rolang rolang commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep producing the zipped CLI release asset, but fix buildCliBinary so the executable bit survives in the archive. sbt.IO.zip (via java.util.zip.ZipOutputStream) does not store Unix mode bits in the entry's external attributes, so the binary extracted as 0644 and mise produced Permission denied on run. Replace it with a call to the zip CLI (zip -X -j), which records the file mode in the entry's external attributes, so unzip/mise restore 0755 after extraction. The zip and chmod commands are available on the ubuntu and macOS runners used by CI.
  • Add a #### mise subsection to README.md and docs/README.md under the command-line install instructions, showing mise use -g github:rolang/dumbo@latest (or the mise.toml config).

Test plan

  • On a tag push, the Generate CLI native binary (release) step produces modules/cli/native/target/bin/dumbo-cli-<arch>-<os>.zip whose dumbo entry shows -rwxr-xr-x via unzip -ZT.
  • After the next tag is cut, mise use -g github:rolang/dumbo@<tag> installs and dumbo --version runs without chmod.
  • Manual unzip of the published asset on Linux and macOS yields an executable dumbo binary.
  • Existing ≤0.10.1 releases still require the user-side rename_exe = "dumbo" workaround; they are not affected by this change.

@rolang rolang changed the title Enable mise install of the CLI add installation of the CLI via mise docs Jul 26, 2026
sbt's IO.zip uses java.util.zip which does not store Unix mode bits, so
the executable bit on the native binary was lost in the archive and mise
extracted it as 0644, producing 'Permission denied' on run. Shell out
to the 'zip' CLI (available on the ubuntu/macos runners) which records
the file mode in the entry's external attributes, so unzip/mise keep the
0755 mode after extraction.

Also add a 'mise' subsection to the README so users can install via
'mise use -g github:rolang/dumbo@latest'.
@rolang
rolang force-pushed the cli-mise-package branch from e119eca to d59b5da Compare July 26, 2026 07:00
@rolang rolang changed the title add installation of the CLI via mise docs Preserve exec bit in CLI zip; enable mise install Jul 26, 2026
@rolang rolang changed the title Preserve exec bit in CLI zip; enable mise install Preserve exec bit in CLI zip; document installation via mise Jul 26, 2026
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