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

Add support to ubuntu 22.04 and 24.04 in arm64 #181

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chileung-b4b
Copy link

@chileung-b4b chileung-b4b commented Sep 10, 2024

The binary is the same for Ubuntu 22.04 and 24.04

Important

To check the binary is the same as the one from https://wkhtmltopdf.org/downloads.html before using and/or merging this branch, run the following:

$ curl -L https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_arm64.deb > wkhtmltox_0.12.6.1-2.jammy_arm64.deb
$ dpkg -x wkhtmltox_0.12.6.1-2.jammy_arm64.deb wkhtmltox/
$ git clone -b add-ubuntu-24-04-arm --single-branch --depth 1 https://github.com/chileung-b4b/wkhtmltopdf_binary_gem.git
$ gunzip -c ./wkhtmltopdf_binary_gem/bin/wkhtmltopdf_ubuntu_22.04_arm64.gz | sha256sum -
00fbba5e1ee392776c2978b45503c07af34c42086c842b31dc9d7a76d52fcf29  -
$ sha256sum wkhtmltox/usr/local/bin/wkhtmltopdf
00fbba5e1ee392776c2978b45503c07af34c42086c842b31dc9d7a76d52fcf29  wkhtmltox/usr/local/bin/wkhtmltopdf

@@ -28,3 +28,4 @@ bin/wkhtmltopdf_ubuntu_20.04_amd64
bin/wkhtmltopdf_ubuntu_20.04_arm64
bin/wkhtmltopdf_ubuntu_21.10_amd64
bin/wkhtmltopdf_ubuntu_22.04_amd64
bin/wkhtmltopdf_ubuntu_22.04_arm64
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean this to be bin/wkhtmltopdf_ubuntu_24.04_arm64? It's the same as the line above it.

Copy link
Author

@chileung-b4b chileung-b4b Sep 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean this to be bin/wkhtmltopdf_ubuntu_24.04_arm64? It's the same as the line above it.

No, I think it is correct. The line above is ignoring the amd64 one whereas this is for arm64. The file that should be ignored comes from https://github.com/zakird/wkhtmltopdf_binary_gem/pull/181/files#diff-5c40b9ebb9c6c8386d46fdafd1a1b8e564c5f6c6bc719676a2ce59337f8ea1cc when uncompressed (which happens when you run

Zlib::GzipReader.open("#{binary}.gz") { |gzip| file << gzip.read }
)

Also, it's only ignoring this specific one because for 24.04, it would use the 22.04 binary

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@drsharp I missed it at first too, it's not the 22.04 part, it's the arm64 vs amd64 part.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha! My old eyes. 👓 🤦

I see it now. ✔️

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm glad it is resolved :)

Does this PR need any additional changes before it's ready to be merged @unixmonkey?

@ksamc
Copy link

ksamc commented Sep 16, 2024

Thank you @chileung-b4b. I just used your addition on my Ubuntu 22.04 ARM installation and it worked great. I hope to see this merged in.

@g3ortega
Copy link

Thank you @chileung-b4b! I was about to work in this direction, but your changes are working like a charm while testing some CI stuff on GitHub Actions with ARM.

@chileung-b4b
Copy link
Author

Updated description with instructions to check the added binary's hash

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.

5 participants