[
https://issues.apache.org/jira/browse/CASSANDRA-19110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17831696#comment-17831696
]
Tibor Repasi edited comment on CASSANDRA-19110 at 3/28/24 9:56 AM:
-------------------------------------------------------------------
I just got focus on this one and have some notes:
# On Debian (checked on buster, bullseye and bookworm) the package
[debian-archive-keyring|https://packages.debian.org/bookworm/debian-archive-keyring]
- installed by default - is placing keyring files under
{{/usr/share/keyrings/}}, thus this directory is available by default.
# Apt is also supporting armored keyring files; thus you can skip the dearmor
step, if the filename is tailed with {{.asc}}.
This is how we deal with Cassandra installations on our Debian hosts:
{code}
curl -o /usr/share/keyrings/apache-cassandra.asc
https://downloads.apache.org/cassandra/KEYS
{code}
{code}
echo "deb [signed-by=/usr/share/keyrings/apache-cassandra.asc]
https://debian.cassandra.apache.org 41x main" >
/etc/apt/sources.d/apache-cassandra.list
{code}
was (Author: rtib):
I just got focus on this one and have some notes:
# On Debian (checked on buster, bullseye and bookworm) the package
[debian-archive-keyring|https://packages.debian.org/bookworm/debian-archive-keyring]
- installed by default - is placing keyring files under
{{/usr/share/keyrings/}}, thus this directory is available by default.
# Apt is also supporting armored keyring files; thus you can skip the dearmor
step, if the filename is tailed with {{.asc}}.
{code}
curl -o /usr/share/keyrings/apache-cassandra.asc
https://downloads.apache.org/cassandra/KEYS
{code}
{code}
echo "deb [signed-by=/usr/share/keyrings/apache-cassandra.asc]
https://debian.cassandra.apache.org 41x main" >
/etc/apt/sources.d/apache-cassandra.list
{code}
> apt-key deprecation, replace with gpg --dearmor in the docs.
> ------------------------------------------------------------
>
> Key: CASSANDRA-19110
> URL: https://issues.apache.org/jira/browse/CASSANDRA-19110
> Project: Cassandra
> Issue Type: Improvement
> Components: Documentation/Website
> Reporter: Simon K
> Assignee: Simon K
> Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.0.x, 5.x
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> the command `apt-key` is deprecated and soon to be removed, especially on
> Ubuntu.
> the directory `/usr/share/keyrings` for shared keys are also being removed.
> I suggest to convert the docs from
> {code:java}
> curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add - {code}
> to a simpler command:
> {code:java}
> curl https://downloads.apache.org/cassandra/KEYS | sudo gpg --dearmor -o
> /etc/apt/keyrings/cassandra-archive-keyring.gpg {code}
> The path `/etc/apt/keyrings` doesn't exists by default on Ubuntu 20.04 but it
> does on 22.04.
> I also suggest to add the source.list.d text from
> {code:java}
> $ echo "deb https://debian.cassandra.apache.org 42x main" | sudo tee -a
> /etc/apt/sources.list.d/cassandra.sources.list
> deb https://debian.cassandra.apache.org 42x main{code}
> to
> {code:java}
> $ echo "deb [signed-by=/etc/apt/keyrings/cassandra-archive-keyring.gpg]
> https://debian.cassandra.apache.org 42x main" | sudo tee -a
> /etc/apt/sources.list.d/cassandra.sources.list
> deb [signed-by=/etc/apt/keyrings/cassandra-archive-keyring.gpg]
> https://debian.cassandra.apache.org 42x main {code}
> I have made a [PR|https://github.com/apache/cassandra/pull/2936]
> I have tested the gpg --dearmor on a VM with Ubuntu 22.04 myself recently and
> it works just fine.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]