jdx / mise

dev tools, env vars, task runner
https://mise.jdx.dev
MIT License
9.89k stars 285 forks source link

UBI backend Support different file name #2429

Closed yodatak closed 1 week ago

yodatak commented 3 months ago

Describe the bug When i want to use ubi backend to download gitlab-cli and flux2 i don't work because they are name differents from their repo name

To Reproduce in mise config

# github-cli binary name
"ubi:cli/cli" = "v2.32.1"
# flux binary name
"ubi:fluxcd/flux2" = "v2.3.0"

Expected behavior To work with this repos

version: 2024.8.4 linux-x64 (8d2aed1 2024-08-02)
activated: yes
shims_on_path: no

build_info: 
  Target: x86_64-unknown-linux-gnu
  Features: DEFAULT, NATIVE_TLS, OPENSSL
  Built: Fri, 2 Aug 2024 13:30:49 +0000
  Rust Version: rustc 1.80.0 (051478957 2024-07-21)
  Profile: release

shell: 
  /bin/fish
  fish, version 3.7.0

dirs: 
  data: ~/.local/share/mise
  config: ~/.config/mise
  cache: ~/.cache/mise
  state: ~/.local/state/mise
  shims: ~/.local/share/mise/shims

config_files: 
  ~/.config/mise/config.toml

backends: 
  cargo
  core
  go
  npm
  pipx
  spm
  ubi

plugins: 
  argocd         https://github.com/beardix/asdf-argocd.git#429bbf9
  awscli         https://github.com/MetricMike/asdf-awscli.git#ac99537
  bitwarden      https://github.com/vixus0/asdf-bitwarden.git#c3679ff
  borg           https://github.com/lwiechec/asdf-borg#0922c60
  bun            (core)
  cargo-make     https://github.com/kachick/asdf-cargo-make.git#6d323bd
  choose         https://github.com/carbonteq/asdf-choose.git#0291009
  cmctl          https://github.com/asdf-community/asdf-cmctl.git#26740f9
  crane          https://github.com/dmpe/asdf-crane#dc3b71a
  deno           (core)
  dotnet         https://github.com/hensou/asdf-dotnet#832dcd5
  duf            https://github.com/NeoHsu/asdf-duf.git#61e14e2
  erlang         (core)
  exa            https://github.com/nyrst/asdf-exa.git#3f525b7
  eza            https://github.com/lwiechec/asdf-eza.git#eee3d59
  fd             https://gitlab.com/wt0f/asdf-fd.git#17d56e0
  flux2          https://github.com/tablexi/asdf-flux2.git#771755e
  fluxctl        https://github.com/stefansedich/asdf-fluxctl.git#c2ecce0
  fzf            https://github.com/kompiro/asdf-fzf.git#d19eb67
  github-cli     https://github.com/bartlomiejdanek/asdf-github-cli.git#e0605b7
  glab           https://github.com/particledecay/asdf-glab.git#2c081ae
  go             (core)
  helm           https://github.com/Antiarchitect/asdf-helm.git#f4b7f38
  java           (core)
  jq             https://github.com/lsanwick/asdf-jq.git#addae51
  jx             https://github.com/vbehar/asdf-jx.git#8a1a055
  k3d            https://github.com/spencergilbert/asdf-k3d.git#5b0e5b9
  k9s            https://github.com/looztra/asdf-k9s.git#2b3af87
  krew           https://github.com/bjw-s/asdf-krew.git#eea6046
  kubectl        https://github.com/asdf-community/asdf-kubectl.git#cbe6df4
  kubectx        https://gitlab.com/wt0f/asdf-kubectx.git#8c0b4aa
  kubetail       https://github.com/janpieper/asdf-kubetail.git#57d25ad
  kustomize      https://github.com/Banno/asdf-kustomize.git#8e929af
  mc             https://github.com/penpyt/asdf-mc.git#b0458cf
  mkcert         https://github.com/salasrod/asdf-mkcert.git#e706f46
  node           (core)
  packer         https://github.com/asdf-community/asdf-hashicorp.git#f1602b6
  php            https://github.com/asdf-community/asdf-php.git#1eaf4de
  pnpm           https://github.com/jonathanmorley/asdf-pnpm.git#305baff
  postgres       https://github.com/smashedtoatoms/asdf-postgres.git#acbbc49
  python         (core)
  ripgrep        https://gitlab.com/wt0f/asdf-ripgrep.git#e836665
  ruby           (core)
  rust-analyzer  https://github.com/Xyven1/asdf-rust-analyzer#301bc6a
  stern          https://github.com/looztra/asdf-stern.git#e17efba
  tealdeer       https://github.com/emersonmx/asdf-tealdeer.git#9b76995
  weave-gitops   https://github.com/deas/asdf-weave-gitops#296cdb4
  yq             https://github.com/sudermanjr/asdf-yq.git#772992f
  zig            (core)

toolset: 
  cargo:ripgrep@14.1.0  
  cargo:ripgrep_all@0.10.6  
  cargo:starship@1.20.1  
  cargo:eza@0.18.24     
  cargo:fd-find@10.1.0  
  cargo:cargo-make@0.37.15  
  cargo:ubi@0.1.1       
  ubi:cert-manager/cmctl@v2.1.0  
  ubi:buildpacks/pack@v0.35.0  
  ubi:derailed/k9s@v0.32.5  
  ubi:cli/cli@v2.32.1   (missing)
  ubi:fluxcd/flux2@v2.3.0  (missing)
  argocd@2.11.7         
  awscli@2.17.22        
  choose@1.3.4          
  crane@0.20.1          
  fzf@0.42.0            
  glab@1.31.0           
  helm@3.12.1           
  jq@1.6                
  jx@3.10.95            
  k3d@5.5.2             
  krew@0.4.4            
  kubectl@1.27.3        
  kubectx@0.9.4         
  kubetail@1.6.20       
  kustomize@5.1.0       
  mc@2023-08-08T17-23-59Z  
  mkcert@1.4.4          
  node@20.5.0           
  packer@1.9.1          
  pnpm@8.6.10           
  rust-analyzer@2024-07-29  
  stern@1.25.0          
  weave-gitops@0.29.0   
  yq@4.34.1             

env_vars: 
  MISE_SHELL=fish

settings: 
  activate_aggressive = false
  all_compile = false
  always_keep_download = false
  always_keep_install = false
  asdf_compat = false
  cargo_binstall = true
  color = true
  disable_default_shorthands = false
  disable_tools = []
  experimental = true
  go_default_packages_file = "~/.default-go-packages"
  go_download_mirror = "https://dl.google.com/go"
  go_repo = "https://github.com/golang/go"
  go_set_gopath = false
  go_set_goroot = true
  go_skip_checksum = false
  http_timeout = 30
  jobs = 4
  legacy_version_file = true
  legacy_version_file_disable_tools = []
  libgit2 = true
  node_compile = false
  not_found_auto_install = true
  paranoid = false
  plugin_autoupdate_last_check_duration = "7d"
  python_default_packages_file = "/var/home/yodatak/.default-python-packages"
  python_pyenv_repo = "https://github.com/pyenv/pyenv.git"
  raw = false
  trusted_config_paths = []
  quiet = false
  verbose = false
  yes = false
  ci = false
  debug = false
  trace = false
  log_level = "info"
  python_venv_auto_create = false

  [status]
  missing_tools = "if_other_versions_installed"
  show_env = false
  show_tools = false

No warnings found
2 problems found:

1. shims are missing, run mise reshim to create them
   Missing shims: pack

2. unused shims are present, run mise reshim to remove them
   Unused shims: kubectl-krew
yodatak commented 3 months ago

some more repo that failed

# gh
# "ubi:cli/cli" = "v2.32.1"
# flux
# "ubi:fluxcd/flux2" = "v2.3.0"
# Broken [ubi][ERROR] could not find a release for this OS (x86_64-unknown-linux-gnu) from
# "ubi:junegunn/fzf" = "v0.54.3"
# "ubi:helm/helm" = "v3.15.3"
# "ubi:kubernetes-sigs/krew" = "v0.4.4"
# "ubi:hashicorp/packer" = "v1.11.2"
# "ubi:bitwarden/clients" = "cli-v2024.7.2"
autarch commented 2 months ago

With the CLI version of ubi, you can pass an --exe flag to tell it the name of the executable to look for in the archive it downloads. In my PR for ubi-as-a-library, #2290, you can set this in the config, though I haven't actually tested this end-to-end with that code, so it only works in theory there.

yodatak commented 2 months ago

as workaround i use this

"ubi:https://github.com/cert-manager/cmctl/releases/download/v2.1.0/cmctl_linux_amd64" = "latest"
jimeh commented 2 weeks ago

As of v2023.10.3 released 2 days ago, UBI is now built-in to mise as a library, and includes the ability to pass extra options to UBI.

Installing GitHub's CLI for example can be done with:

[tools]
"ubi:cli/cli" = { version = "latest", exe = "gh" }
jdx commented 2 weeks ago

That one actually can be installed with mise use gh as a shorthand using ubi

yodatak commented 1 week ago

i close thanks a lot !