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

Release packages for RHEL / CentOS 8 and 9 #13000

Closed
proddata opened this issue Sep 12, 2022 · 5 comments
Closed

Release packages for RHEL / CentOS 8 and 9 #13000

proddata opened this issue Sep 12, 2022 · 5 comments
Assignees

Comments

@proddata
Copy link
Member

Problem Statement

Provide (yum/rpm) releases packages for RHEL and CentOS 8 and 9 (and other compatible Linux distributions)

Possible Solutions

No response

Considered Alternatives

No response

@amotl
Copy link
Member

amotl commented Oct 4, 2022

Hi.

I've just verified the situation on both CentOS Linux 8 and CentOS Stream 9 with our existing packages / package repository for CentOS 7.

Status

While running the canonical setup guidelines for Red Hat based systems 1 seems to work successful on CentOS 8, importing the GPG key fails on CentOS 9.

Problem

On the most recent release of CentOS 9, it reports:

[root@racker-centos-9 /]# rpm --import https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate
warning: Signature not supported. Hash algorithm SHA1 not available.
error: https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate: key 1 import failed.

On an earlier release, it just reported:

[root@racker-centos-9 /]# rpm --import https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate
error: https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate: key 1 import failed.

Workaround

While Red Hat Enterprise Linux 9 (RHEL 9) deprecated SHA-1 for signing for security reasons, it is still used by many for signing packages 2.

A workaround exists to temporarily allow SHA1 for the purpose of installing the package 3.

update-crypto-policies --set DEFAULT:SHA1
# Run package installation procedure.
update-crypto-policies --set DEFAULT:NO-SHA1

However, this will not cover package upgrade situations, so one would have to leave SHA1 enabled.

$ yum update
warning: Signature not supported. Hash algorithm SHA1 not available.

With kind regards,
Andreas.

Footnotes

  1. https://crate.io/docs/crate/tutorials/en/latest/self-hosted/red-hat.html

  2. https://www.redhat.com/en/blog/rhel-security-sha-1-package-signatures-distrusted-rhel-9

  3. https://github.com/k3s-io/k3s/issues/5588

@amotl amotl self-assigned this Feb 6, 2023
@seut seut unassigned amotl Jan 11, 2024
@seut seut added the needs planning Needs a planning session label Apr 9, 2024
@BaurzhanSakhariev
Copy link
Contributor

BaurzhanSakhariev commented Apr 9, 2024

Related: elastic/elasticsearch#85876 and gocd/gocd#10722 (both applying same workaround)

@seut
Copy link
Member

seut commented Apr 26, 2024

We've changed our signing key to support (and prefer) the SHA512 algorithm using the great example at https://github.com/chrisberkhout/sha1-key-fix/blob/master/SHA1KeyFix.ipynb.
The public key at https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate was updated also, so installations on RHEL 8/9 should work now.

@seut seut closed this as completed Apr 26, 2024
@amotl
Copy link
Member

amotl commented Apr 26, 2024

Excellent. Thank you very much.

@matriv matriv removed the needs planning Needs a planning session label Apr 29, 2024
@matriv
Copy link
Contributor

matriv commented Apr 29, 2024

For future reference:
We tested and verified that:

  • with the updated key, .rpm and .deb users with the old public key can install new packages, signed with the updated private key.
  • .rpm and .deb new users, who download the new public key can also install old packages, signed with the old private key.

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

No branches or pull requests

6 participants