heroku-buildpack-apt icon indicating copy to clipboard operation
heroku-buildpack-apt copied to clipboard

Are custom apt repos actually supported at all?

Open jrochkind opened this issue 1 year ago • 4 comments

The README still suggests:

# or add custom apt repos (only required if using packages outside of the standard Ubuntu APT repositories)
:repo:deb https://apt.example.com/ example-distro main

But some Issue comments suggest this may be generally not working. For instance, at 82, @edmorley writes:

Making custom APT repos work likely depends on https://github.com/heroku/heroku-buildpack-apt/issues/33.

Does this suggest that custom APT repos actually are known not to be generally working, or not working at all?

Should the README be changed, to either eliminate the line suggest custom apt repos are supported, or, if they still work in some circumstances, add more info about in what circumstances they are or aren't supported? This might save people time fighting to get something to work that is actually known not to work but documented working.

I have been trying to see if I can install tessract 5.x from the tesseract-ocr package in the custom ppa:alex-p/tesseract-ocr. I don't really know what I'm doing with apt, so I wasn't sure how to format this in the heroku-buildpack-apt Aptfile, so wasn't sure if I was just getting the formatting wrong, but perhaps this is actually just not possible?

I tried adding to Aptfile:

:repo:deb [trusted=yes] https://ppa.launchpad.net/alex-p/tesseract-ocr5/ tesseract-ocr main

This results in some errors in console output from build. The build DOES proceed without aborting. But the package I meant to install does not actually seem to be installed.

remote: -----> Updating apt caches
remote:        Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
remote:        Hit:2 http://archive.ubuntu.com/ubuntu jammy-security InRelease
remote:        Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
remote:        Hit:4 http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease
remote:        Ign:5 https://ppa.launchpad.net/alex-p/tesseract-ocr5 tesseract-ocr InRelease
remote:        Ign:5 https://ppa.launchpad.net/alex-p/tesseract-ocr5 tesseract-ocr InRelease
remote:        Ign:5 https://ppa.launchpad.net/alex-p/tesseract-ocr5 tesseract-ocr InRelease
remote:        Err:5 https://ppa.launchpad.net/alex-p/tesseract-ocr5 tesseract-ocr InRelease
remote:          Certificate verification failed: The certificate is NOT trusted. The name in the certificate does not match the expected.  Could not handshake: Error in the certificate verification. [IP: 185.125.190.52 443]
remote:        Reading package lists...
remote: W: 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: W: Failed to fetch https://ppa.launchpad.net/alex-p/tesseract-ocr5/dists/tesseract-ocr/InRelease  Certificate verification failed: The certificate is NOT trusted. The name in the certificate does not match the expected.  Could not handshake: Error in the certificate verification. [IP: 185.125.190.52 443]
remote: W: Some index files failed to download. They have been ignored, or old ones used instead.

I am still not certain if I am doing something wrong, or custom repos are just known not working, or other.

Feedback would be welcome: on the issue generally; on my specific issue; on any other known ways to get the latest tessract 5.x installed on a heroku dyno!

It is somewhat disappointing to see comments like this from about a year ago:

this buildpack isn't really owned by any team (it's an "unofficial" buildpack sadly, even though IMO it's an important buildpack)

I had mistakenly thought the buildpack existing in github heroku organization indicated that it was supported by heroku. As you say, it is a very important buildpack, which, if it works properly, really extends the reach of the heroku stack. It is disappointing if heroku is not interested in supporting or investing in it -- although I guess I'm glad that it is still working at all, and works for many packages, if it really isn't actually supported by heroku!

jrochkind avatar Mar 01 '23 16:03 jrochkind