|
Packit Service |
27f74b |
..
|
|
Packit Service |
27f74b |
Copyright (C) 2015 Red Hat, Inc.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
This copyrighted material is made available to anyone wishing to use,
|
|
Packit Service |
27f74b |
modify, copy, or redistribute it subject to the terms and conditions of
|
|
Packit Service |
27f74b |
the GNU General Public License v.2, or (at your option) any later version.
|
|
Packit Service |
27f74b |
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit Service |
27f74b |
ANY WARRANTY expressed or implied, including the implied warranties of
|
|
Packit Service |
27f74b |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
|
Packit Service |
27f74b |
Public License for more details. You should have received a copy of the
|
|
Packit Service |
27f74b |
GNU General Public License along with this program; if not, write to the
|
|
Packit Service |
27f74b |
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
Packit Service |
27f74b |
02110-1301, USA. Any Red Hat trademarks that are incorporated in the
|
|
Packit Service |
27f74b |
source code or documentation are not subject to the GNU General Public
|
|
Packit Service |
27f74b |
License and may only be used or replicated with the express permission of
|
|
Packit Service |
27f74b |
Red Hat, Inc.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
======================
|
|
Packit Service |
27f74b |
DNF versionlock Plugin
|
|
Packit Service |
27f74b |
======================
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
-----------
|
|
Packit Service |
27f74b |
Description
|
|
Packit Service |
27f74b |
-----------
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
`versionlock` is a plugin that takes a set of names and versions for packages and
|
|
Packit Service |
27f74b |
excludes all other versions of those packages. This allows you to protect
|
|
Packit Service |
27f74b |
packages from being updated by newer versions. Alternately, it accepts a specific
|
|
Packit Service |
27f74b |
package version to exclude from updates, e.g. for when it's necessary to skip a
|
|
Packit Service |
27f74b |
specific release of a package that has known issues.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
The plugin provides a command `versionlock` which allows you to view and edit the
|
|
Packit Service |
27f74b |
list of locked packages easily.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
The plugin will walk each line of the versionlock file, and parse out the name and
|
|
Packit Service |
27f74b |
version of the package. It will then exclude any package by that name that
|
|
Packit Service |
27f74b |
doesn't match one of the versions listed within the file. This is basically
|
|
Packit Service |
27f74b |
the same as using `dnf --exclude` for the package name itself (as you cannot exclude
|
|
Packit Service |
27f74b |
installed packages), but dnf will still see the versions you have
|
|
Packit Service |
27f74b |
installed/versionlocked as available so that `dnf reinstall` will still
|
|
Packit Service |
27f74b |
work, etc.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
It can also work in the opposite way, like a fast exclude, by prefixing a '!'
|
|
Packit Service |
27f74b |
character to the version recorded in the lock list file. This specifically
|
|
Packit Service |
27f74b |
excludes a package that matches the version exactly.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
Note the versionlock plugin does not apply any excludes in non-transactional
|
|
Packit Service |
27f74b |
operations like `repoquery`, `list`, `info`, etc.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
--------
|
|
Packit Service |
27f74b |
Synopsis
|
|
Packit Service |
27f74b |
--------
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``dnf versionlock [options] [add|exclude|list|delete|clear] [<package-name-spec>]``
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
---------
|
|
Packit Service |
27f74b |
Arguments
|
|
Packit Service |
27f74b |
---------
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``<package-name-spec>``
|
|
Packit Service |
27f74b |
Package spec to lock or exclude.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
-----------
|
|
Packit Service |
27f74b |
Subcommands
|
|
Packit Service |
27f74b |
-----------
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``dnf versionlock add <package-name-spec>``
|
|
Packit Service |
27f74b |
Add a versionlock for all available packages matching the spec. It means that only versions of
|
|
Packit Service |
27f74b |
packages represented by ``<package-name-spec>`` will be available for transaction operations.
|
|
Packit Service |
27f74b |
Each ``<package-name-spec>`` is converted to concrete NEVRAs which are used for locking. The NEVRAs to lock to are first searched among installed packages and then (if none is found) in all currently available packages.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
Examples::
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
Locking a package to the version installed:
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf repoquery --installed bash
|
|
Packit Service |
27f74b |
bash-0:5.0.7-1.fc30.x86_64
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf repoquery bash
|
|
Packit Service |
27f74b |
bash-0:5.0.2-1.fc30.i686
|
|
Packit Service |
27f74b |
bash-0:5.0.2-1.fc30.x86_64
|
|
Packit Service |
27f74b |
bash-0:5.0.7-1.fc30.i686
|
|
Packit Service |
27f74b |
bash-0:5.0.7-1.fc30.x86_64
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf versionlock add bash
|
|
Packit Service |
27f74b |
Adding versionlock on: bash-0:5.0.7-1.fc30.*
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
Locking not installed package to any of available versions:
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf repoquery --installed mutt
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf repoquery mutt
|
|
Packit Service |
27f74b |
mutt-5:1.11.4-1.fc30.x86_64
|
|
Packit Service |
27f74b |
mutt-5:1.12.1-3.fc30.x86_64
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf versionlock add mutt
|
|
Packit Service |
27f74b |
Adding versionlock on: mutt-5:1.11.4-1.fc30.*
|
|
Packit Service |
27f74b |
Adding versionlock on: mutt-5:1.12.1-3.fc30.*
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``dnf versionlock exclude <package-name-spec>``
|
|
Packit Service |
27f74b |
Add an exclude (within versionlock) for the available packages matching the spec. It means that
|
|
Packit Service |
27f74b |
packages represented by ``<package-name-spec>`` will be excluded from transaction operations.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``dnf versionlock list`` or ``dnf versionlock``
|
|
Packit Service |
27f74b |
List the current versionlock entries.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``dnf versionlock delete <package-name-spec>``
|
|
Packit Service |
27f74b |
Remove any matching versionlock entries.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``dnf versionlock clear``
|
|
Packit Service |
27f74b |
Remove all versionlock entries.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
-------
|
|
Packit Service |
27f74b |
Options
|
|
Packit Service |
27f74b |
-------
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
All general DNF options are accepted, see `Options` in :manpage:`dnf(8)` for details.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``--raw``
|
|
Packit Service |
27f74b |
Do not resolve ``<package-name-spec>`` to NEVRAs to find specific version to lock to. Instead ``<package-name-spec>`` are used as they are. This enables locking to not yet available versions of the package.
|
|
Packit Service |
27f74b |
For example you may want to keep the `bash` package on major version 5 and consume any future updates as far as they keep the major version::
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
$ dnf versionlock add --raw 'bash-5.*'
|
|
Packit Service |
27f74b |
Adding versionlock on: bash-5.*
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
-------------
|
|
Packit Service |
27f74b |
Configuration
|
|
Packit Service |
27f74b |
-------------
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``/etc/dnf/plugins/versionlock.conf``
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
The minimal content of conf file should contain ``main`` sections with ``enabled`` and
|
|
Packit Service |
27f74b |
``locklist`` parameters.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
``locklist``
|
|
Packit Service |
27f74b |
This option is a string that points to the file which has the versionlock
|
|
Packit Service |
27f74b |
information in it. Note that the file has to exist (or the versionlock plugin
|
|
Packit Service |
27f74b |
will make dnf exit). However, it can be empty.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
The file takes entries in the format of ``<package-name-spec>`` (optionally prefixed with '!' for
|
|
Packit Service |
27f74b |
excludes).
|
|
Packit Service |
27f74b |
See `Specifying packages` in :manpage:`dnf(8)` for details.
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
-----
|
|
Packit Service |
27f74b |
Notes
|
|
Packit Service |
27f74b |
-----
|
|
Packit Service |
27f74b |
|
|
Packit Service |
27f74b |
A specified package does not have to exist within the available cache of repository data
|
|
Packit Service |
27f74b |
to be considered valid for locking or exclusion. This is by design, to accommodate use
|
|
Packit Service |
27f74b |
cases such as a presently disabled repository. However, a package must exist in the
|
|
Packit Service |
27f74b |
repository cache when the ``add`` or ``exclude`` subcommands are invoked for it.
|