Skip to content

rbrauner/dotbot-dnf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

24 Commits

Repository files navigation

DotbotdnfPlugin

Plugin forDotbot,that addsdnfdirective, which allows you to install and upgrade packages and groups usingdnf.

Installation

  1. Simply add this repo as a submodule of your dotfiles repository:
git submodule add https://github /rbrauner/dotbot-dnf.git
  1. 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 placednftasks in a separate config!

Options

options- Command line options to be passed to dnf. Seeman dnffor possible command line options.

group- If the package(s) listed are dnf groups, set this toTrue.Default isFalse.This changes the command fromdnf installtodnf 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 thednfdirective in your main dotbot config and your user account is a sudoer you may use this to run only yourdnfdirectives under sudo privileges instead of having to run your entire config with root privileges. Default isFalse

stdin- Set toTruethis enables stdin. Default isFalse

stdout- Set toTruethis enables stdout. Default isFalse

stderr- Set toTruethis enables stderr. Default isFalse

Defaults

Default options are applied to alldnftasks, but can be overridden per task.

Example

-defaults:
dnf:
options:"-q -y"
stdout:False
stderr:True

Supported task variants

The various formats supported are shown below. If you want to bundle a group of packages in the samednfcall use the list format. This speeds up the process as the dependency scan only happens once instead of for each package individually.

Formats Supported

-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.

Specifying package names

Again seeman dnffor 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

Usage

Examplepackages.conf.yaml

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]

Execution

./install -p dotbot-dnf/dnf.py -c packages.conf.yaml

Output

Here is the output from a sample config showing all possible formats. It is an unrealistic config, but shows all supported formats and output.

cli_out

Original repository

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages