Skip to content
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.

Update Ubuntu and Debian instructions to use new repository #106

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

mfussenegger
Copy link
Member

We now have a repository that only contains a single default
distribution, because the package is generic enough to works across all
recent Ubuntu and Debian releases.

The new repository includes old versions in the Packages index to
allow users to install old versions via apt install crate=x.y.z

It also contains ARM64 packages.

echo "deb https://cdn.crate.io/downloads/apt/stable/ $(lsb_release -cs) main" |
sudo tee /etc/apt/sources.list.d/crate-stable.list
# Add the CrateDB GPG key
sh$ wget -qO- https://cdn.crate.io/downloads/apt/DEB-GPG-KEY-crate | sudo tee /etc/apt/trusted.gpg.d/crate.asc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

apt-key emits deprecation warnings. Output of man 8 apt-key:

DEPRECATION
       Except for using apt-key del in maintainer scripts, the use of apt-key is deprecated. This section shows how to replace existing use of apt-key.

       If your existing use of apt-key add looks like this:

       wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add -

       Then you can directly replace this with (though note the recommendation below):

       wget -qO- https://myrepo.example/myrepo.asc | sudo tee /etc/apt/trusted.gpg.d/myrepo.asc

       Make sure to use the "asc" extension for ASCII armored keys and the "gpg" extension for the binary OpenPGP format (also known as "GPG key public ring"). The binary OpenPGP format works for all apt versions, while the
       ASCII armored format works for apt version >= 1.4.

       Recommended: Instead of placing keys into the /etc/apt/trusted.gpg.d directory, you can place them anywhere on your filesystem by using the Signed-By option in your sources.list and pointing to the filename of the key.
       See sources.list(5) for details. Since APT 2.4, /etc/apt/keyrings is provided as the recommended location for keys not managed by packages. When using a deb822-style sources.list, and with apt version >= 2.4, the
       Signed-By option can also be used to include the full ASCII armored keyring directly in the sources.list without an additional file.

Copy link
Member

@amotl amotl Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. We followed that guideline at 1 already, and removed the use of apt-key there. It looks like we missed this spot.

Footnotes

  1. https://cratedb.com/docs/crate/tutorials/en/latest/basic/index.html#configure-package-repository

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a fixup to update the second location too. We should eventually remove the duplication.
(I'd still go with having dedicated pages, it's easier to see what belongs together - having parallel tracks within a single page can get confusing because it's easy to miss where the tracks join again and where you should continue reading.)

Copy link
Member

@amotl amotl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

use the testing channel, replace ``stable`` with ``testing`` in the command
line above. You can read more about the `release workflow`_.

The walkthrough is based on the ``sudo`` program. If it is not installed on
Copy link
Member Author

@mfussenegger mfussenegger Dec 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this sudo note because it's incomplete. If you're not familiar with sudo, then installing it is likely not enough because you also need to ensure the user then has permission to use it for package installation. And if they don't know sudo, why assume that they know how to become root?

I think we can assume some basic system administration knowledge, and if not we should find some good resource we can link to.

@hammerhead
Copy link
Member

Thanks for updating the documentation! I just came here after looking for exactly this in connection with an ongoing support issue. Can we proceed with merging this PR?

We now have a repository that only contains a single `default`
distribution, because the package is generic enough to works across all
recent Ubuntu and Debian releases.

The new repository includes old versions in the `Packages` index to
allow users to install old versions via `apt install crate=x.y.z`

It also contains ARM64 packages.
@mfussenegger mfussenegger merged commit e768fb3 into master Jan 9, 2024
4 checks passed
@mfussenegger mfussenegger deleted the j/deb-repo branch January 9, 2024 10:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants