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

Documentation feedback on /docs/install/redhat.rst (SUSE support) #72

Open
amotl opened this issue Apr 29, 2024 · 6 comments
Open

Documentation feedback on /docs/install/redhat.rst (SUSE support) #72

amotl opened this issue Apr 29, 2024 · 6 comments

Comments

@amotl
Copy link
Member

amotl commented Apr 29, 2024

Hi again. Coming from GH-71, we wanted to report that installation on SUSE and derivates fails with an error about signing.

Problem

zypper --plus-content=cratedb-ce-stable install -y crate
Temporarily enabling repository 'CrateDB RPM package repository - x86_64 - Stable'. [--plus-content]
Warning: File 'repomd.xml' from repository 'CrateDB RPM package repository - x86_64 - Stable' is unsigned.

    Note: Signing data enables the recipient to verify that no modifications occurred after the data
    were signed. Accepting data with no, wrong or unknown signature can lead to a corrupted system
    and in extreme cases even to a system compromise.

    Note: File 'repomd.xml' is the repositories master index file. It ensures the integrity of the
    whole repo.

    Warning: We can't verify that no one meddled with this file, so it might not be trustworthy
    anymore! You should not continue unless you know it's safe.
Repository 'CrateDB RPM package repository - x86_64 - Stable' is invalid.
[cratedb-ce-stable|https://cdn.crate.io/downloads/yum/7/x86_64] Valid metadata not found at specified URL
History:
 - Signature verification failed for repomd.xml
@amotl
Copy link
Member Author

amotl commented Apr 29, 2024

@matriv suggested:

Isn't there a way for Suse to skip this verification, and only verify the package itself?
The signing of the repo data is optional (at least for Centos and Redhat).

@amotl
Copy link
Member Author

amotl commented Apr 29, 2024

There is a corresponding setting, right. It is called repo_gpgcheck=0, or, alternatively, use the zypper parameter --gpgcheck-allow-unsigned-repo.

@amotl
Copy link
Member Author

amotl commented Apr 29, 2024

Problem

When adding repo_gpgcheck=0 to /etc/zypp/repos.d/cratedb.repo, there is an error:

Signature verification failed [4-Signatures public key is not available]

Solution

Public key must be imported upfront.

rpm --import https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate

zypper parameter --gpg-auto-import-keys did not work.

References

Details

zypper --plus-content=cratedb-ce-stable install -y crate
Temporarily enabling repository 'CrateDB RPM package repository - x86_64 - Stable'. [--plus-content]
Retrieving repository 'CrateDB RPM package repository - x86_64 - Stable' metadata ........................................................................................................[done]
Building repository 'CrateDB RPM package repository - x86_64 - Stable' cache .............................................................................................................[done]
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
  crate

1 new package to install.
Overall download size: 127.0 MiB. Already cached: 0 B. After the operation, additional 235.1 MiB will be used.

Backend:  classic_rpmtrans
Continue? [y/n/v/...? shows all options] (y): y
Retrieving: crate-5.7.0-1.x86_64 (CrateDB RPM package repository - x86_64 - Stable)                                                                                         (1/1), 127.0 MiB
Retrieving: crate-5.7.0-1.x86_64.rpm .........................................................................................................................................[done (6.0 MiB/s)]
crate-5.7.0-1.x86_64.rpm:
    Header V4 RSA/SHA256 Signature, key ID 7faae51a06f6eaeb: NOKEY
    V4 RSA/SHA256 Signature, key ID 7faae51a06f6eaeb: NOKEY

warning: /var/tmp/AP_0xML3p6q/crate-5.7.0-1.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 06f6eaeb: NOKEY
Looking for gpg key ID 06F6EAEB in cache /var/cache/zypp/pubkeys.
Looking for gpg key ID 06F6EAEB in repository CrateDB RPM package repository - x86_64 - Stable.
  gpgkey=https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate
Retrieving: RPM-GPG-KEY-crate ...........................................................................................................................................................[error]
crate-5.7.0-1.x86_64 (CrateDB RPM package repository - x86_64 - Stable): Signature verification failed [4-Signatures public key is not available]
Abort, retry, ignore? [a/r/i] (a): a
Problem occurred during or after installation or removal of packages:
Installation has been aborted as directed.
Please see the above error message for a hint.

@amotl
Copy link
Member Author

amotl commented Apr 30, 2024

CrateDB on SUSE in a nutshell.

Use that config in /etc/zypp/repos.d/cratedb.repo.

[cratedb-ce-stable]
name=CrateDB RPM package repository - $basearch - Stable
baseurl=https://cdn.crate.io/downloads/yum/7/$basearch
enabled=0
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate
autorefresh=1
type=rpm-md

[cratedb-ce-testing]
name=CrateDB RPM package repository - $basearch - Testing
baseurl=https://cdn.crate.io/downloads/yum/testing/7/$basearch
enabled=0
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate
autorefresh=1
type=rpm-md

Use that command to import the public GPG key, in order to make signature validation work.

rpm --import https://cdn.crate.io/downloads/yum/RPM-GPG-KEY-crate

Finally, use those commands to install and start CrateDB.

zypper --plus-content=cratedb-ce-stable install -y crate
systemctl start crate

@matriv
Copy link
Contributor

matriv commented May 2, 2024

@amotl
Copy link
Member Author

amotl commented May 2, 2024

Excellent. Thanks for adding software tests!

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