As announced in Percona’s Important Update, effective July 1st, the percona/original and tools repositories will no longer be updated. This means that users need to check their systems and ensure that the necessary repositories are enabled to maintain the security and reliability of their installations.
When managing a complex system, ensuring that the software packages are installed from the correct repositories is essential. This helps in maintaining security, receiving timely updates, and ensuring compatibility. However, manually checking the repository sources for your installed packages can be daunting due to several reasons:
Given the recent changes announced by Percona, it is crucial to ensure that all necessary repositories are enabled and that packages are installed from the correct sources so that no one ever misses an important update from us. Performing these checks manually can be both daunting and error-prone.
For RPM-based systems like CentOS, Red Hat, and Fedora, you can manually check which packages are installed from Percona or Tools repositories by using the yum or dnf package manager.
List all installed packages:
|
1 |
yum list installed |
or
|
1 |
dnf list installed |
Check the repository for a specific package:
|
1 |
yum info <package_name> |
or
|
1 |
dnf info <package_name> |
Look for the From repo field in the output to identify the repository.
For example, to check the percona-toolkit package:
|
1 |
yum info percona-toolkit |
The output should include a line like:
|
1 |
From repo : percona-release |
List all packages installed from a specific repository:
|
1 |
yum list installed | grep @<repository_name> |
or
|
1 |
dnf list installed | grep @<repository_name> |
For example, to list all packages installed from the percona-release repository:
|
1 |
yum list installed | grep @percona-release |
For Debian-based systems like Debian and Ubuntu, you can use the dpkg-query and apt-cache tools.
List all installed packages:
|
1 |
dpkg-query -W -f='${binary:Package}' |
Check the repository for a specific package:
|
1 |
apt-cache policy <package_name> |
Look for the http or https lines in the output to identify the repository URL.
For example, to check the percona-toolkit package:
|
1 |
apt-cache policy percona-toolkit |
The output should include lines like:
|
1 |
500 http://repo.percona.com/percona/apt focal/main amd64 Packages |
At Percona, we care deeply about our users and strive to make their experience seamless. To help our users navigate these changes effortlessly, we have prepared a script that automates checking installed packages and their repositories. This script works for both RPM-based and Debian-based systems. It will also suggest enabling the repositories that are needed automatically.
Here are examples of the script’s output for RPM-based and Debian-based systems.
RPM-based systems
|
1 |
Checking installed packages and repositories for RPM-based system...<br>Packages that should be installed from a different repository:<br> - percona-toolkit<br> Possible repositories: pt<br>To enable the necessary repositories, run the following commands:<br> sudo percona-release enable pt release<br>Summary:<br> - 1 packages should be installed from a different repository.<br> - 1 repositories need to be enabled. |
Debian-based systems
|
1 |
Checking installed packages and repositories for Debian-based system...<br>Packages installed from the correct repositories:<br> - percona-xtrabackup-83<br>Packages that should be installed from a different repository:<br> - percona-toolkit<br> Possible repositories: pt<br> - pmm2-client<br> Possible repositories: pmm2-client<br>To enable the necessary repositories, run the following commands:<br> sudo percona-release enable pt release<br> sudo percona-release enable pmm2-client release<br>Summary:<br> - 1 packages are installed from the correct repositories.<br> - 2 packages should be installed from a different repository.<br> - 2 repositories need to be enabled. |
You can download the script here to automate the process of checking installed packages and their repositories here.
So once you download it, do the following:
|
1 |
chmod +x check_percona_packages.py<br>python3 check_percona_packages.py<br> |
By automating the process with this script, you ensure that your system remains secure and up-to-date with packages installed from the correct repositories, thus maintaining the integrity and reliability of your software environment.
Resources
RELATED POSTS