Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-19110

apt-key deprecation, replace with gpg --dearmor in the docs.

    XMLWordPrintableJSON

Details

    Description

      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

      curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add - 

      to a simpler command:

      curl https://downloads.apache.org/cassandra/KEYS | sudo gpg --dearmor -o /etc/apt/keyrings/cassandra-archive-keyring.gpg 

      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 

      $ 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

      to 

      $ 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 

      I have made a PR

      I have tested the gpg --dearmor on a VM with Ubuntu 22.04 myself recently and it works just fine.

      Attachments

        Activity

          People

            rtib Tibor Repasi
            simonk Simon K
            Tibor Repasi
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m