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

Compiling fails with custom apt repo #83

Closed
Jachobsen opened this issue Jan 25, 2021 · 3 comments
Closed

Compiling fails with custom apt repo #83

Jachobsen opened this issue Jan 25, 2021 · 3 comments

Comments

@Jachobsen
Copy link

Jachobsen commented Jan 25, 2021

I've been using heroku/python + heroku-buildpack-apt for years with the following Aptfile to build maxminds C extension:

:repo:deb http://ppa.launchpad.net/maxmind/ppa/ubuntu xenial main
libmaxminddb0 libmaxminddb-dev mmdb-bin

but deploys started failing about a week ago.

Build log shows very limited information:

remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Building on the Heroku-20 stack
remote: -----> Apt app detected
remote: -----> Detected Aptfile or Stack changes, flushing cache
remote: -----> Adding custom repositories
remote: -----> Updating apt caches
remote:        Get:1 http://ppa.launchpad.net/maxmind/ppa/ubuntu focal InRelease [18.1 kB]
remote:        Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
remote:        Get:3 http://archive.ubuntu.com/ubuntu focal-security InRelease [109 kB]
remote:        Err:1 http://ppa.launchpad.net/maxmind/ppa/ubuntu focal InRelease
remote:          The following signatures couldn't be verified because the public key is not available: NO_PUBKEY DE1997DCDE742AFA
remote:        Hit:4 http://apt.postgresql.org/pub/repos/apt focal-pgdg InRelease
remote:        Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
remote:        Get:6 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [974 kB]
remote:        Get:7 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [910 kB]
remote:        Reading package lists...
remote: W: GPG error: http://ppa.launchpad.net/maxmind/ppa/ubuntu focal InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY
remote: E: The repository 'http://ppa.launchpad.net/maxmind/ppa/ubuntu focal InRelease' is not signed.
remote:  !     Push rejected, failed to compile Apt app.
remote:
remote:  !     Push failed

It started out on the Heroku-18 stack but upgrading to Heroku-20 didn't change anything. I also tried changing the repository list to focal main which made no difference.

The GPG warning + "repository is not signed" error hasn't previously stopped builds from compiling.

Pushing a commit with an empty Aptfile results in a successful deploy.

Any idea why this started to fail now?

@Jachobsen Jachobsen changed the title Compiling fails Compiling fails with custom apt repo Jan 25, 2021
@edmorley
Copy link
Member

edmorley commented Jan 25, 2021

Hi!

Try removing the :repo:deb http://ppa.launchpad.net/maxmind/ppa/ubuntu xenial main and the build should now succeed.

Previously the APT buildpack ignored errors and continued the build regardless. Now after #79, any failures result in the build aborting correctly. For more details see:
#79 (comment)

At a guess I would imagine the reason your builds appeared to work as expected before, was that the packages were previously being installed from the standard Ubuntu APT repository (eg https://packages.ubuntu.com/focal-updates/libmaxminddb0) - ie: the custom APT repository (:repo:deb http://ppa.launchpad.net/maxmind/ppa/ubuntu xenial main) wasn't actually being used, since the apt-get update from it failed. Making custom APT repos work likely depends on #33.

@Jachobsen
Copy link
Author

That did it! Thank you very much for the explanation, that sounds reasonable.

And thanks for being so responsive. I thought I had traversed the repo for possible causes, but managed to overlook your solution already mentioned in #79.

@edmorley
Copy link
Member

No problem! Glad that resolved it :-)

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

2 participants