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

Are custom apt repos actually supported at all? #101

Open
jrochkind opened this issue Mar 1, 2023 · 4 comments
Open

Are custom apt repos actually supported at all? #101

jrochkind opened this issue Mar 1, 2023 · 4 comments

Comments

@jrochkind
Copy link

jrochkind commented Mar 1, 2023

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 #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!

@Ruffle
Copy link

Ruffle commented Mar 24, 2023

Instead of defining an unofficial repo and a key you can use a link to the .deb of the package

Alternatively, there are forks of this buildpack which allow you to specify a key
https://elements.heroku.com/buildpacks/reveel-it/heroku-buildpack-apt

I managed to get rid of the errors during deployment thanks to this.
However the package still wasn't available in the dynos on runtime so it was a dead end.

@jrochkind
Copy link
Author

Thanks @Ruffle -- I was going to ask for more details about what you did (i'm not sure how to find the URL of the .deb package directly) -- but do I understand you are saying it didn't work, you did not succesfully get packages installed that way? If you are describing an approach that didn't work, I am less interested than if you are describing something you successfully got to work!

@Ruffle
Copy link

Ruffle commented Mar 28, 2023

@jrochkind you can find the link to .deb on launchpad.net
first look up the author https://launchpad.net/~alex-p/
then navigate to the package that is specific to your system
for example for focal amd64:
https://launchpad.net/~alex-p/+archive/ubuntu/tesseract-ocr5/+files/libtesseract-dev_5.3.0-1ppa1~focal1_amd64.deb

@rschwiebert
Copy link

rschwiebert commented Apr 17, 2023

@Ruffle Am I reading it right that your link might be the solution to #98 ? (I've been getting crickets for a long time on that.) I don't understand exactly what is going on so I may well have misunderstood.

If so, how would I adapt
:key:confluent:http://packages.confluent.io/deb/5.5/archive.key

to suit
sudo wget https://souffle-lang.github.io/ppa/souffle-key.public -O /usr/share/keyrings/souffle-archive-keyring.gpg ?

Would it be just
:key:github:https://souffle-lang.github.io/ppa/souffle-key.public ?

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