# Migrate APT trusted keys Script to handle migration of obsolete /etc/apt/trusted.gpg to split GPG keyrings in /etc/apt/trusted.gpg.d. Note: Useful to fix this type of APT error: ``` Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. ``` ## Installation ```bash apt install python3 wget wget -O /usr/local/sbin/migrate-apt-trusted-keys \ https://gitea.zionetrix.net/bn8/migrate-apt-trusted-keys/raw/branch/main/migrate-apt-trusted-keys chmod 750 /usr/local/sbin/migrate-apt-trusted-keys ``` ## Usage ``` usage: migrate-apt-trusted-keys [-h] [-p KEYRING_PATH] [-o OUTPUT_PATH] [-a] [-f] Script to manage the migration from the deprecated /etc/apt/trusted.gpg file to splited GPG keyring in /etc/apt/trusted.gpg.d. options: -h, --help show this help message and exit -p KEYRING_PATH, --keyring-path KEYRING_PATH APT keyring file path. -o OUTPUT_PATH, --output-path OUTPUT_PATH Output directory path. -a, --auto Migrate all GPG keys, without user interaction. -f, --force Force mode: overwrite output file if already exists. ``` ## Copyright Copyright (c) 2023 Benjamin Renard ## License This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.