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

Use poppler-utils from stack #32

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Use poppler-utils from stack #32

merged 1 commit into from
Mar 8, 2023

Conversation

dzuelke
Copy link
Contributor

@dzuelke dzuelke commented Mar 1, 2023

Current main and update-ffmpeg will now fail, as the recent stack image update brought in all the libraries that poppler-utils needs as part of the libvips install.

As a result, the find for .so files piped to xargs dirname in bin/compile will fail, because no .so files are actually added:

remote: -----> ActiveStorage Preview app detected
remote: -----> Installing binary dependencies for ActiveStorage Preview
remote:        Detected ffmpeg version change, flushing cache
remote:        Downloading packagesW: http://apt.postgresql.org/pub/repos/apt/dists/jammy-pgdg/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
remote: ..
remote:        Installing packages..
remote: dirname: missing operand
remote: Try 'dirname --help' for more information.
remote:  !     Push rejected, failed to compile ActiveStorage Preview app.
remote: 
remote:  !     Push failed

This simplifies bin/compile greatly by removing all the now-unnecessary Apt trickery:

% heroku buildpacks:set -i 1 https://github.com/heroku/heroku-buildpack-activestorage-preview.git#stack-poppler
Buildpack set. Next release on blooming-castle-09486 will use:
  1. https://github.com/heroku/heroku-buildpack-activestorage-preview.git#stack-poppler
  2. heroku/ruby
Run git push heroku main to create a new release using these buildpacks.

% git push heroku master
…
remote: -----> ActiveStorage Preview app detected
remote: -----> Installing binary dependencies for ActiveStorage Preview
remote:        Downloading ffmpeg version 5.1.2
remote:        Installing ffmpeg
remote:        Done
remote:        Exporting environment variables
remote:        Done
…

% heroku run which ffmpeg pdftocairo
Running which ffmpeg pdftocairo on ⬢ blooming-castle-09486... up, run.3697 (Basic)
/app/.heroku/activestorage-preview/bin/ffmpeg
/usr/bin/pdftocairo

GUS-W-12618598

Also closes #21

GUS-W-8276306

@dzuelke
Copy link
Contributor Author

dzuelke commented Mar 1, 2023

(CI will likely fail until rollout of https://devcenter.heroku.com/changelog-items/2549 has propagated)

@dzuelke
Copy link
Contributor Author

dzuelke commented Mar 1, 2023

Rebased on top of update-ffmpeg.

Once ready, please merge this after #31, and using a regular merge commit to ease merging/rebasing of stacked PR #34

@dzuelke dzuelke mentioned this pull request Mar 1, 2023
bin/compile Show resolved Hide resolved
@edmorley edmorley linked an issue Mar 3, 2023 that may be closed by this pull request
Base automatically changed from update-ffmpeg to main March 8, 2023 11:10
@dzuelke dzuelke merged commit ebdc740 into main Mar 8, 2023
@dzuelke dzuelke deleted the stack-poppler branch March 8, 2023 11:15
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.

Invalidate the cache on stack upgrade
2 participants