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

Switch away from apt-key in Debian/Ubuntu instruction #960

Closed
TobiX opened this issue Apr 1, 2021 · 7 comments
Closed

Switch away from apt-key in Debian/Ubuntu instruction #960

TobiX opened this issue Apr 1, 2021 · 7 comments

Comments

@TobiX
Copy link

TobiX commented Apr 1, 2021

The apt maintainer has recently announced that apt-key is deprecated and its use is seen as an antipattern by other Debian developers.

I would suggest to adopt something like the Kubernetes instructions or even follow the guide in the Debian wiki for packaging the key inside the repository (in a package named adoptopenjdk-archive-keyring) to allow automatic key rollovers.

@aahlenst
Copy link
Collaborator

aahlenst commented Apr 1, 2021

The information how to do this properly is super hard to find (at least for me). So thanks a lot for the links.

It's already planned to create a keyring package, but that won't happen with the old AdoptOpenJDK repository that's going to be replaced soon-ish anyway. Development happens in my private repository (ticket: aahlenst/adoptium-packages-linux#2).

I'm happy to review a PR that updates the instructions on the website to match the Kubernetes instructions.

@aahlenst
Copy link
Collaborator

aahlenst commented Apr 1, 2021

To turn it into an issue for newcomers, what to do:

  1. Checkout the website (this) repository.
  2. Look for the page that contains the install instructions and for the segment that mentions how to install using a Debian repository.
  3. Change the existing instructions so that they no longer use apt-key. Instead adapt the instructions provided for Kubernetes to AdoptOpenJDK.

The key parts from the Kubernetes instructions are:

Download the Google Cloud public signing key (take AdoptOpenJDK's instead, change URLs)

sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg

Add the Kubernetes apt repository: (use AdoptOpenJDK's key, change URLs)

echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list

@Martins-O-U
Copy link
Contributor

Hello @

The information how to do this properly is super hard to find (at least for me). So thanks a lot for the links.

It's already planned to create a keyring package, but that won't happen with the old AdoptOpenJDK repository that's going to be replaced soon-ish anyway. Development happens in my private repository (ticket: aahlenst/adoptium-packages-linux#2).

I'm happy to review a PR that updates the instructions on the website to match the Kubernetes instructions.

@aahlenst I'm an Outreachy Applicant here and I am interested in updating the website instructions to match the Kubernetes instructions.
@smlambert @sophia-guo @llxia please could this task be assigned to me for my Outreachy contribution?

@karianna karianna added this to the April 2021 milestone Apr 18, 2021
@Martins-O-U
Copy link
Contributor

Thanks @karianna

@Martins-O-U
Copy link
Contributor

Hello @karianna, I have opened a Pull Request ( #973 ) for the documentation update. I did it a little different from that of Kubernetes due to errors I had while testing theirs.
Please review/test for confirmation.
Thanks

Cc: @aahlenst

Martins-O-U added a commit to Martins-O-U/openjdk-website that referenced this issue Apr 19, 2021
Update for installing the adoptopenjdk key to Debian/Ubuntu systems. Fixes AdoptOpenJDK#960
@karianna karianna modified the milestones: April 2021, May 2021 May 2, 2021
@karianna karianna modified the milestones: May 2021, June 2021 Jun 6, 2021
@karianna
Copy link
Member

instructions updated at adoptium.net

@TobiX
Copy link
Author

TobiX commented Feb 22, 2022

This one? https://github.com/adoptium/website-v2/blob/main/src/asciidoc-pages/installation/linux.adoc#deb-installation-on-debian-or-ubuntu - That still uses apt-key 😞

I'll try to send a new pull request to that repo this evening...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants