Skip to content

Conversation

@bruno-costanzo
Copy link
Contributor

@bruno-costanzo bruno-costanzo commented Aug 18, 2025

Issue 193

Add Support for Debian 13.

@bruno-costanzo
Copy link
Contributor Author

@zakird is this the only change needed to support a new version?

bin/wkhtmltopdf Outdated

os = 'debian_12' if !os_based_on_debian_9 && os.start_with?('debian_12')

os = 'debian_13' if !os_based_on_debian_9 && os.start_with?('debian_13')
Copy link
Collaborator

Choose a reason for hiding this comment

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

This change makes it so that this script looks for a wkhtmltopdf binary named wkhtmltopdf_debian_13_amd64.gz to unpack from the bin dir in this project, but I don't see that you added one in this PR.

Sometimes though, you can run the debian_12 binary on 13. Is that how you are doing it now? Unless I'm missing something, this looks like it would fail the unless File.exist? check on line 97 below this and still output an error mesage.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I think you are right and this will fail. Not sure how to address this, I'm running on a macbook.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@unixmonkey, if you can give me a guideline, I will follow it

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's kind of the problem. To get the binaries to include in this project, you'd typically download them from https://wkhtmltopdf.org/downloads.html , but there are currently no binaries for Debian 13, and GitHub is read-only because wkhtmltopdf is now a dead project.

When Debian 12 support was added here, it was only possible because the official project published debian packages for it that somehow didn't get posted to the downloads page above.

At this point, the only way to create a Debian 13-specific binary is to compile one from source, or find someone else who has already (and you can trust it to not have malware because it's not official).

But, as I said earlier, it might be possible that the Debian 12 binary still works on Debian 13, so changing it to os = 'debian_12' if !os_based_on_debian_9 && os.start_with?('debian_13') might work. I'd try that first if you can.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Collaborator

Choose a reason for hiding this comment

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

So I unpacked the debian13 binary you added to this PR, and it's MD5 (1da58f1851666118321f4a6316d49ad9) is identical to the unpacked debian12 binary already in this project.

If the 12 (bookworm) binaries are compatible with 13 (trixie), then the only change that is needed is this line to:

os = 'debian_12' if !os_based_on_debian_9 && os.start_with?('debian_13')

and no extra binaries. Does that work for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, perfectly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you want me to create the PR? I guess the test file and dockerfile are still good to go

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes please :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@unixmonkey unixmonkey merged commit eec3a70 into zakird:master Aug 20, 2025
8 of 10 checks passed
@unixmonkey
Copy link
Collaborator

This is now released in version 0.12.6.10 of this gem. Please let me know if you have any issues!

@alexwbuschle
Copy link

hey @unixmonkey the gem CI is failing on two checks after this merge.

@unixmonkey
Copy link
Collaborator

@alexwbuschle It doesn't appear related (build issues) & it's been failing for over a year. If you can help fix it, it would be appreciated.

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.

3 participants