Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitwarden_rs/releases/latest tag_name detection #4105

Closed
kel-mo opened this issue Feb 13, 2021 · 2 comments · Fixed by #4106
Closed

bitwarden_rs/releases/latest tag_name detection #4105

kel-mo opened this issue Feb 13, 2021 · 2 comments · Fixed by #4106
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@kel-mo
Copy link

kel-mo commented Feb 13, 2021

Required Information

  • DietPi version | 6.34.3
  • Distro version | buster
  • Kernel version | Linux DietPi 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux
  • SBC model | Native PC (x86_64) (Proxmox)

Steps to reproduce

dietpi-software reinstall 183

Expected behaviour

Download and install bitwarden_rs/archive/1.19.0.tar.gz (latest at time of writing)

Actual behaviour

Download and install bitwarden_rs/archive/1.17.0.tar.gz (fallback version)

Extra info

If the relevant lines from software_id=183 install section of dietpi-software is executed in terminal:

$ INSTALL_URL_ADDRESS='https://api.github.com/repos/dani-garcia/bitwarden_rs/releases/latest'
$ curl -sSfL "$INSTALL_URL_ADDRESS" | mawk -F" '/^[[:blank:]]"tag_name":/{print $4;exit}'
$ curl -sSfL "$INSTALL_URL_ADDRESS" | grep -m1 '^[[:blank:]]
"tag_name":' | cut -d " -f 4
1.19.0

It appears the mawk line is failing to detect the leading whitespace.

@MichaIng MichaIng added this to the v6.35 milestone Feb 13, 2021
@MichaIng
Copy link
Owner

You're right, only on latest Debian (Bullseye) with finally the new mawk developer accepted, it supports [[:something:]] regex. Many thanks for reporting. I'll also print an extra line if the fallback URL is used, so that bugs or changes in latest download URL detection are recognised better and users encouraged to open an issue here.

@MichaIng
Copy link
Owner

PR up to fix it: #4106
I went through all cases of GitHub URL/version auto-detection and ruTorrent + Koel were affected as well. I aligned now the way we do this, to use mawk where possible and grep where required (only in case variables are used now, e.g. the system's architecture, since ^[[:blank:]]* is overkill when we check "tag_name": and "browser_download_url": ). And whenever a fallback URL or version is used, a related error message is printed, informing about the used fallback and asking for a report here, so that we can check and fix the repo URL or regex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants