Plugin forDotbot,that addsdnf
directive, which allows you to install and upgrade packages and groups usingdnf
.
- Simply add this repo as a submodule of your dotfiles repository:
git submodule add https://github /rbrauner/dotbot-dnf.git
- Pass this folder (or directly dnf.py file) path with corresponding flag to yourDotbotscript:
-p /path/to/file/dnf.py
or
--plugin-dir /path/to/plugin/folder
WARNING!
Dotbot (or install script) needs to be executed with root permissions (as sudo) in order to install/upgrade packages. It is strongly recommended to placednf
tasks in a separate config!
options
- Command line options to be passed to dnf. Seeman dnf
for possible command line options.
group
- If the package(s) listed are dnf groups, set this toTrue
.Default isFalse
.This changes the command fromdnf install
todnf groupinstall
sudo
- To execute the dnf command with sudo, set this toTrue
.Use with caution! This option is normally not needed or suggested.If you are choosing to use thednf
directive in your main dotbot config and your user account is a sudoer you may use this to run only yourdnf
directives under sudo privileges instead of having to run your entire config with root privileges. Default isFalse
stdin
- Set toTrue
this enables stdin. Default isFalse
stdout
- Set toTrue
this enables stdout. Default isFalse
stderr
- Set toTrue
this enables stderr. Default isFalse
Default options are applied to alldnf
tasks, but can be overridden per task.
-defaults:
dnf:
options:"-q -y"
stdout:False
stderr:True
The various formats supported are shown below. If you want to bundle a group of packages in the samednf
call use the list format. This speeds up the process as the dependency scan only happens once instead of for each package individually.
-dnf:package_one
-dnf:[package_one, package_two, package_three]
-dnf:
package_one:
options:"-v -y"
package_two:"-q -y"
package_three:
group:True
package_four:
Notes:The last format will do individual dnf install calls for each package listed. It is the only supported format for specifying a groupinstall. If you are installing local rpms and there are dependencies between your listed packages it will fail.
Again seeman dnf
for more details, but in general these formats are supported by dnf.
name
name.arch
name-ver
name-ver-rel
name-ver-rel.arch
name-epoch:ver-rel.arch
epoch:name-ver-rel.arch
To see a list of dnf groups that are available:
dnf grouplist -v
The suggested format is to group as many packages as possible in lists and set the default options.
-defaults:
dnf:
options:"-q -y"
stdout:False
stderr:True
-dnf:
dev-dnfgroup:
options:'-q -y --disablerepo=* --enablerepo=mainline --enablerepo=mainline-extra'
group:True
-dnf:[gdb, valgrind]
./install -p dotbot-dnf/dnf.py -c packages.conf.yaml
Here is the output from a sample config showing all possible formats. It is an unrealistic config, but shows all supported formats and output.