コレグレーデギネード

WindowsとかUbuntuとかRubyとかRailsとか

apt-key deprecation warning

$ sudo apt update
ヒット:1 http://ftp.riken.jp/Linux/ubuntu jammy InRelease
ヒット:2 http://ftp.riken.jp/Linux/ubuntu jammy-updates InRelease              
ヒット:3 http://ftp.riken.jp/Linux/ubuntu jammy-backports InRelease            
ヒット:4 http://ftp.riken.jp/Linux/ubuntu jammy-security InRelease             
ヒット:5 https://dl.yarnpkg.com/debian stable InRelease                        
ヒット:6 https://deb.nodesource.com/node_14.x jammy InRelease                  
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
状態情報を読み取っています... 完了        
パッケージはすべて最新です。
W: https://dl.yarnpkg.com/debian/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
$ apt-key list
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
/etc/apt/trusted.gpg
--------------------
pub   rsa4096 2016-10-05 [SC]
      72EC F46A 56B4 AD39 C907  BBB7 1646 B01B 86E5 0310
uid           [  不明  ] Yarn Packaging <yarn@dan.cx>
sub   rsa4096 2016-10-05 [E]
sub   rsa4096 2019-01-02 [S] [有効期限: 2023-01-24]
sub   rsa4096 2019-01-11 [S] [有効期限: 2023-01-24]

/etc/apt/trusted.gpg.d/ubuntu-keyring-2012-cdimage.gpg
------------------------------------------------------
pub   rsa4096 2012-05-11 [SC]
      8439 38DF 228D 22F7 B374  2BC0 D94A A3F0 EFE2 1092
uid           [  不明  ] Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu.com>

/etc/apt/trusted.gpg.d/ubuntu-keyring-2018-archive.gpg
------------------------------------------------------
pub   rsa4096 2018-09-17 [SC]
      F6EC B376 2474 EDA9 D21B  7022 8719 20D1 991B C93C
uid           [  不明  ] Ubuntu Archive Automatic Signing Key (2018) <ftpmaster@ubuntu.com>
$ sudo mkdir -p /usr/local/share/keyrings
$ sudo apt-key export 86E50310 | sudo gpg --dearmour -o /usr/local/share/keyrings/yarn.gpg
$ sudo vim /etc/apt/sources.list.d/yarn.list
-  deb https://dl.yarnpkg.com/debian/ stable main
+ deb [signed-by=/usr/local/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main