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

[Bug]: 2.2.1 .deb broken due to incorrect wget invocation #1092

Closed
deanishe opened this issue Oct 26, 2022 · 1 comment
Closed

[Bug]: 2.2.1 .deb broken due to incorrect wget invocation #1092

deanishe opened this issue Oct 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@deanishe
Copy link

deanishe commented Oct 26, 2022

Describe the issue

While running dpkg -i audiobookshelf_2.2.1_amd64.deb, the download of tone failed due to an invocation of wget that relies on non-standard configuration.

Specifically, in the preinst script, wget is called without a filename to save to. wget's default behaviour is to use the last path segment of the (final) URL, but the script expects it to use the filename from the Content-Disposition header. This requires the --content-disposition option to be passed to wget.

Better yet, the invocation should explicitly specify the path to save to with --output-document, seeing as the path is hardcoded later in the script, anyway.

Here's the log. As you can see, wget is saving the archive to 9882f966-0df1-4524-ae76-e172da4b9474..., not tone-0.1.1-linux-x64.tar.gz, like the script expects. As a workaround, specifying content_disposition = on in your ~/.wgetrc file allows the download to succeed. (Perhaps the person who wrote the script has this setting?)

Getting tone..
--2022-10-26 09:13:06--  https://github.com/sandreas/tone/releases/download/v0.1.1/tone-0.1.1-linux-x64.tar.gz
Resolving github.com (github.com)... 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/406651459/9882f966-0df1-4524-ae76-e172da4b9474?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T071307Z&X-Amz-Expires=300&X-Amz-Signature=5cd79e7617dc2f2aff2166acc0bf9ecfc1805aa2c0904fbf3a00e16dd355546f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=406651459&response-content-disposition=attachment%3B%20filename%3Dtone-0.1.1-linux-x64.tar.gz&response-content-type=application%2Foctet-stream [following]
The name is too long, 467 chars total.
Trying to shorten...
New name is 9882f966-0df1-4524-ae76-e172da4b9474?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T071307Z&X-Amz-Expires=300&X-Amz-Signature=5cd79e7617dc2f2aff2166a.
--2022-10-26 09:13:07--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/406651459/9882f966-0df1-4524-ae76-e172da4b9474?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T071307Z&X-Amz-Expires=300&X-Amz-Signature=5cd79e7617dc2f2aff2166acc0bf9ecfc1805aa2c0904fbf3a00e16dd355546f&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=406651459&response-content-disposition=attachment%3B%20filename%3Dtone-0.1.1-linux-x64.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.108.133, 185.199.110.133, 185.199.109.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 20113107 (19M) [application/octet-stream]
Saving to: ‘9882f966-0df1-4524-ae76-e172da4b9474?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T071307Z&X-Amz-Expires=300&X-Amz-Signature=5cd79e7617dc2f2aff2166a’

9882f966-0df1-4524-ae76-e172da4b9474? 100%[=======================================================================>]  19.18M  6.05MB/s    in 3.3s    

2022-10-26 09:13:11 (5.89 MB/s) - ‘9882f966-0df1-4524-ae76-e172da4b9474?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20221026%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20221026T071307Z&X-Amz-Expires=300&X-Amz-Signature=5cd79e7617dc2f2aff2166a’ saved [20113107/20113107]

tar: tone-0.1.1-linux-x64.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

Steps to reproduce the issue

  1. Run dpkg -i audiobookshelf_2.2.1_amd64.deb

Audiobookshelf version

v2.2.1

How are you running audiobookshelf?

Debian/PPA

@deanishe deanishe added the bug Something isn't working label Oct 26, 2022
@advplyr advplyr added the awaiting release Issue is resolved and will be in the next release label Oct 27, 2022
@advplyr
Copy link
Owner

advplyr commented Nov 5, 2022

Fixed in v2.2.2

@advplyr advplyr closed this as completed Nov 5, 2022
@advplyr advplyr removed the awaiting release Issue is resolved and will be in the next release label Nov 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants