1.6 KiB
1.6 KiB
LFCS 1.4: Software packages
Finding which package has a command, adding a third-party repository, verifying installed files, and holding a package at its version.
Before you start
The VM needs internet access. The lab makes sure dig isn't installed, and
changes one character in a configuration file of the openssh-server
package (a comment, so sshd keeps working). On Ubuntu, removing dig also
removes the ubuntu-standard metapackage; reset puts both back.
Tasks
- Find which package provides the
digcommand, install it, and list the package's files. Write the package's name to/root/lab-answers/1. - Add a third-party repository with its signing key (Docker's or another
vendor's published instructions are good practice), install a package
from it, then remove the repository so it's no longer used. Write the
package's name to
/root/lab-answers/2. - Find the changed file with the package manager, write its full path to
/root/lab-answers/3, and restore the packaged file.rpm -V openssh-serverordpkg --verify openssh-serverlists the file until it's restored. - Stop the package
curlfrom being upgraded.
Hints
dnf provides,rpm -qf,rpm -ql;apt-file search,dpkg -S,dpkg -L.- A
.repofile in/etc/yum.repos.d/, or a.sourcesfile in/etc/apt/sources.list.d/with a key in/etc/apt/keyrings/;dnf repolist,apt-cache policy. rpm -V,dpkg --verify; delete the file, thendnf reinstallorapt install --reinstall -o Dpkg::Options::=--force-confmiss.dnf versionlock(frompython3-dnf-plugin-versionlock),apt-mark hold.