Introducing the Cake DNF Module

I've just published another new module for Cake: Cake.DNF.Module

This module, when included in your build environment, allows you to install tools and packages as part of your build using the DNF package manager!

What does it do?

Many so-called Red Hat-based (better described as rpm-based) Linux distributions, including Fedora, CentOS, and Red Hat Enterprise Linux support the new DNF (Dandified Yum) package manager for installing and managing local software.

This module allows Cake scripts to install tools using the familiar #tool syntax, but instead of downloading a package from NuGet, it will install the package locally using DNF commands.

This means you can ensure your build's dependencies will always be available, even on a clean system or environment!

Where can I use it?

Obviously, this module will only install successfully on Linux distributions with DNF available and installed (such as Fedora 22+). Fortunately, the module will simply do nothing on if it's not running on a Linux host, so your Windows and macOS builds won't be broken by an errant tool install.

That being said, you'll need to make sure the module is present, even on Windows, since it tells Cake what to do with DNF packages.

How do I use it?

If you're using the latest bootstrapper example (always available in this repo), you can simply add a tools/Modules/packages.config file and the bootstrapper will install it for you.

Otherwise, just make sure the NuGet package is installed to your tools/Modules folder and the module should kick in when needed.

Finally, to actually install a package, use the same #tool directive you use for NuGet packages but this time use dnf as the source, like the below:

#tool dnf:?package=glx-utils

You can also add more parameters to control the installation:

#tool dnf:?package=glx-utils&version=8.3.0

Full documentation including examples and more information on the supported parameters is available in the online documentation.

How do I contribute?

The module is fully open-source and has been published under the cake-contrib organisation on GitHub for anyone to contribute to. I always accept bugs, feedback, feature requests and PRs on GitHub.

Build and Release status

Status master develop
Build master Build develop Build
Release NuGet NuGet Pre Release

Comments

comments powered by Disqus