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

Breaking builds: Kindlegen dependency no longer available #1496

Closed
HonkingGoose opened this issue Aug 25, 2020 · 6 comments
Closed

Breaking builds: Kindlegen dependency no longer available #1496

HonkingGoose opened this issue Aug 25, 2020 · 6 comments

Comments

@HonkingGoose
Copy link
Contributor

HonkingGoose commented Aug 25, 2020

Which version of the book is affected?

⚠️ This issue affects all builds! ⚠️
Problem will be present on all future builds/releases once the Travis CI cache is expired. Problem is with source files.

Describe the bug:

The 'kindlegen' binary that we depend on to build/validate the Kindle files is no longer available to download from the rubygems.org website. Because this dependency is no longer available, Travis CI cannot build new releases of the book.

I'm specifically talking about this entry in the Gemfile:

gem 'kindlegen'

Steps to reproduce:

  1. Try to run a build on Travis CI.
  2. Build fails with:
mAn error occurred while installing kindlegen (3.0.5), and Bundler

cannot continue.

Make sure that `gem install kindlegen -v '3.0.5' --source

'https://rubygems.org/'` succeeds before bundling.

In Gemfile:

  kindlegen

The command "bundle install" failed and exited with 5 during .

Example of failed build: https://travis-ci.org/github/HonkingGoose/progit2/builds/721079601

Expected behavior:

Build passes.

Screenshots:

Additional context:

Upstream issue reports: tdtds/kindlegen#42 asciidoctor/asciidoctor-epub3#363
We also have some other issues outstanding with dependencies at: #1373 #1358

Amazon says to use Kindle Previewer instead, to get the same functionality:
https://www.amazon.com/gp/feature.html?docId=1000765211
This will not work for our project, as according to @slonopotamus the Kindle Previewer does not exist for Linux.

This problem is also present when I try to download the Kindlegen dependency locally. So it's not just Travis CI that's broken...

@slonopotamus
Copy link
Contributor

I've also created asciidoctor/asciidoctor-epub3#363 because chances that there will be any fix to tdtds/kindlegen#42 are very low. kindlegen gem is just a thin wrapper that downloads KindleGen binary to comply with EULA, but now there isn't anything to download unless someone publishes KindleGen binaries on their own website.

And the problem with Kindle Previewer is that it doesn't exist for Linux.

@HonkingGoose HonkingGoose changed the title Breaking builds: Kindlegen no longer available, use Kindle Previewer Breaking builds: Kindlegen no longer available Aug 25, 2020
@HonkingGoose
Copy link
Contributor Author

HonkingGoose commented Aug 25, 2020

Thanks for your feedback @slonopotamus! 😄
I've edited my top post to include your findings.

progit2/Rakefile

Lines 19 to 25 in 8b361da

puts "Converting to EPub..."
`bundle exec asciidoctor-epub3 #{params} progit.asc`
puts " -- Epub output at progit.epub"
puts "Converting to Mobi (kf8)..."
`bundle exec asciidoctor-epub3 #{params} -a ebook-format=kf8 progit.asc`
puts " -- Mobi output at progit.mobi"

@slonopotamus I noticed that you removed the kindlegen dependency with asciidoctor/asciidoctor-epub3#364 to get asciidoctor-epub3 working again?

We're using:

gem 'asciidoctor-epub3', '~> 1.5.0.alpha.9'

Could the ProGit2 project fix the broken builds, by upgrading to a newer version of the asciidoctor-epub3 dependency and dropping the kindlegen dependency from our Gemfile? Or would some further step(s) be needed? We're on:

gem 'asciidoctor', '1.5.6.2'

I do recall there being some issue with cross-reference links not working on newer versions of epub3/Asciidoctor??? So we would also maybe need to run the migration script that @jnavila is working on.

I'm trying to get a sense of what would be needed to fix this. 😄 I hope I'm not bothering you to much with this. 👍

@HonkingGoose HonkingGoose changed the title Breaking builds: Kindlegen no longer available Breaking builds: Kindlegen dependency no longer available Aug 25, 2020
@slonopotamus
Copy link
Contributor

I noticed that you removed the kindlegen dependency with asciidoctor/asciidoctor-epub3#364 to get asciidoctor-epub3 working again?

Yes, this is an emergency measure to unbreak CI builds until there is a solution for Mobi. Obviously it means that Mobi generation is no longer possible.

WRT progit2, you don't need a new version of asciidoctor-epub3. Dropping dependency on kindlegen and disabling Mobi creation in Rakefile is enough.

I'm currently trying to find out an exit from current situation on asciidoctor-epub3 side. Stay tuned.

@HonkingGoose
Copy link
Contributor Author

I'll make a pull-request to get the build at least functional until we can do more. 😄

@HonkingGoose
Copy link
Contributor Author

I'm closing this issue, as the build is not breaking anymore with the quick-fix of just not providing a mobi build anymore.

@KZiemian
Copy link

KZiemian commented Jul 9, 2024

I just found this problem with Kindlegen and following this discussion I commented out line gem 'kindlegen', '3.1.1' from Gemfile.

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