Coder Social home page Coder Social logo

dotbot-dnf's Introduction

Dotbot dnf Plugin

Plugin for Dotbot, that adds dnf directive, which allows you to install and upgrade packages and groups using dnf.

Installation

  1. Simply add this repo as a submodule of your dotfiles repository:
git submodule add https://github.com/rbrauner/dotbot-dnf.git
  1. Pass this folder (or directly dnf.py file) path with corresponding flag to your Dotbot script:
-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 place dnf tasks in a separate config!

Options

options - Command line options to be passed to dnf. See man dnf for possible command line options.

group - If the package(s) listed are dnf groups, set this to True. Default is False. This changes the command from dnf install to dnf groupinstall

sudo - To execute the dnf command with sudo, set this to True. Use with caution! This option is normally not needed or suggested. If you are choosing to use the dnf directive in your main dotbot config and your user account is a sudoer you may use this to run only your dnf directives under sudo privileges instead of having to run your entire config with root privileges. Default is False

stdin - Set to True this enables stdin. Default is False

stdout - Set to True this enables stdout. Default is False

stderr - Set to True this enables stderr. Default is False

ย 

Defaults

Default options are applied to all dnf tasks, 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 same dnf call 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 see man 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

Usage

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

dotbot-dnf's People

Contributors

flyingchipmunk avatar rbrauner avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.