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

wkhtmltox 0.12.4 Debian package not available anymore #93

Closed
ncharlot opened this issue Aug 7, 2018 · 11 comments
Closed

wkhtmltox 0.12.4 Debian package not available anymore #93

ncharlot opened this issue Aug 7, 2018 · 11 comments

Comments

@ncharlot
Copy link
Contributor

ncharlot commented Aug 7, 2018

https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-stretch-amd64.deb is now a 404.

Changing version var to 0.12.5 didn't fixed the issue since the new URL don't match the pattern (adding a "-1" and removing "-linux_"):

For instance with Stretch / amd64 :

https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb

@sebalix
Copy link
Collaborator

sebalix commented Aug 7, 2018

Hi,

There was no Debian package for 0.12.4 since the beginning. The pattern https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/{{ odoo_wkhtmltox_version }}/wkhtmltox-{{ odoo_wkhtmltox_version }}_linux-{{ ansible_distribution_release }}-{{ odoo_debian_arch }}.deb works for some releases, but not for others, that's why the role attempts to download wkhtmltox from several URLs, and regarding the 0.12.4 the following pattern is working:
https://github.com/OCA/ansible-odoo/blob/master/vars/main.yml#L26 (a generic tar.gz, not a Debian package).

For the 0.12.5, a fix is to add a new pattern to the existing list as you did. A PR for that will be welcome.

@ncharlot
Copy link
Contributor Author

ncharlot commented Aug 7, 2018

Hi @sebalix,

Install of generic package won't work on my Stretch:

TASK [sebalix.odoo : Install wkhtmltox (generic package)] 
**************************************************************************************
fatal: [145.239.194.108]: FAILED! => {"changed": false, "msg": "Failed to find handler for \"/opt/wkhtmltox-0.12.4_linux-stretch-amd64\". Make sure the required command to extract the file is installed. Command \"/bin/tar\" could not handle archive. Command \"unzip\" not found."}

It's a .tar.xz compressed with xz so the xz-utils package must be installed.

I should make a PR with :

  • upgrade to 0.12.5
  • fix debian pattern (guess it will be wrong for next version)
  • a task to install xz-utils

Is that ok?

@sebalix
Copy link
Collaborator

sebalix commented Aug 7, 2018

  • I don't think there is a need to upgrade to 0.12.5 (Odoo supports this release?), but it's OK to give the possibility to the user to install 0.12.5 if he wants by changing the version in its playbook.
  • don't fix existing patterns (they work for others releases, if we change them we'll introduce regressions), just add a new pattern to the list
  • yes we need to install xz-utils, but no need to create a new task for that, just append the xz-utils to odoo_required_tools https://github.com/OCA/ansible-odoo/blob/master/vars/main.yml#L6

@ncharlot
Copy link
Contributor Author

ncharlot commented Aug 7, 2018

  • It's ok for me to keep 0.12.4. The upgrade was a workaround for the 404.
  • So no need to add pattern since there is no 0.12.4 debian package

I started a PR to complete odoo_required_tools with xz-utils.
In my case, I miss the python-setuptools package too. Ok to add this second one?

One more thing, I did not figure how to override variables like odoo_wkhtmltox_version or odoo_wkhtmltox_urls in my playbook. I did it as for defaults ones, but it don't work. How to override them correctly?

Thx.

@pedrobaeza
Copy link
Member

I don't think there is a need to upgrade to 0.12.5 (Odoo supports this release?), but it's OK to give the possibility to the user to install 0.12.5 if he wants by changing the version in its playbook.

I would recommend to go to 0.12.5, as it fixes a very annoying bug about a random error present in all previous versions, and you don't have any regressions in layout (like it was in 0.12.4).

@sebalix
Copy link
Collaborator

sebalix commented Aug 7, 2018

@pedrobaeza thank you for the feedback!
@ncharlot so feel free to integrate the 0.12.5 release :)

About python-setuptools, if you have encountered a bug I prefer to treat it in another PR/issue.

@ncharlot
Copy link
Contributor Author

ncharlot commented Aug 7, 2018

Ok for 0.12.5 without setuptools.

@ncharlot
Copy link
Contributor Author

ncharlot commented Aug 7, 2018

Arf there is no generic package for 0.12.5...

@sebalix
Copy link
Collaborator

sebalix commented Aug 7, 2018

It does not matter, if there is a Debian package, just add the corresponding template URL for this Debian package. URLs are not intended to work for all releases, the role will just try all of them and stop when one matches.

@ncharlot
Copy link
Contributor Author

ncharlot commented Aug 7, 2018

Ok.

@ncharlot
Copy link
Contributor Author

ncharlot commented Aug 8, 2018

Fix by PR #94

@ncharlot ncharlot closed this as completed Aug 8, 2018
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

No branches or pull requests

3 participants