DBus daemon for doing package action with the dnf package manager
AdamWill and Conan-Kudo Handle additional DNF transaction callback actions in DNF 3
See https://bugzilla.redhat.com/show_bug.cgi?id=1624652 and
https://bugzilla.redhat.com/show_bug.cgi?id=1630113 . It seems
that a change in DNF 3 causes transaction callbacks to use
actions that aren't included in the callback API definition or
docs. Because dnfdaemon/dnfdragora currently kinda assume they
know all *possible* callback actions, this winds up causing
dnfdragora to crash if it tries to handle a callback with one
of these unknown actions.

This commit adds the extra actions to the const <-> string dict
in dnfdaemon's TransactionProgress callback, so that in the dbus
RPMProgress message it sends out, the action will be a string,
as dnfdragora's handler for the message expects. A companion
commit for dnfdragora will add handling for the new string
values, and also make it not crash if an unexpected action shows

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Latest commit 5858310 Sep 18, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
dbus Added systemd service for org.baseurl.DnfSystem Nov 28, 2015
policykit1 split PolicyKit action in a read & write rule Oct 16, 2014
python Handle additional DNF transaction callback actions in DNF 3 Sep 18, 2018
test [tests]: use SWDB instead of YumDB and GroupPersistor Jun 27, 2018
tools remove dnf-system.xml from git Oct 12, 2014
.gitignore build: build rpms into build dir in source tree May 9, 2014
COPYING Initial commit Mar 8, 2014
ChangeLog Finalize 0.3.19 release Jun 27, 2018
Makefile Enforce usage of versioned Python interpreter in Makefiles Jul 22, 2018
README.md dnf-daemon is under active development again Mar 22, 2017
dnfdaemon.spec Add missing %files section for selinux subpackage Jun 27, 2018



dnf-daemon is a 2 DBus services there make part for dnf's API available for application via DBus calls.

There is a DBus session bus service runnning as current user for performing readonly actions.

There is a DBus system bus service runnning as root for performing actions there is making changes to the system

This make it easy to do packaging action from your application no matter what language it is written in, as long as there is DBus binding for it.

dnf-daemon uses PolicyKit for authentication for the system service, so when you call one of the commands (as normal users) you will get a
PolicyKit dialog to ask for password of a priviledged user like root.

dnf-daemon is still under heavy development and the API is not stable or complete yet

Source overview

dnfdaemon/      Contains the daemon python source
client/         Contains the client API bindings for python 2.x & 3.x
test/           Unit test for the daemon and python bindings
dbus/           DBus system service setup files
policykit1/     PolicyKit authentication setup files

How to install services and python bindings:

Run the following

	git clone ...
	cd dnf-daemon
	make test-inst

How to test:

just run:

make test-verbose

to run the unit test with output to console

or this to just run the unit tests.

make test

To make the daemons shutdown


make exit-session


make exit-system


make exit-both

to run the daemons in debug mode from checkout:

session (readonly as current user)

make run-session

system (as root)

make run-system

API Definitions:

The dnfdaemon api is documented here

The API is under development, so it might change, when we hit version 1.0, API methods will be frozen and API method names, parameters and return types will not change in future releases, new API can be added, but the old ones stays as is

API Addition Checklist:

  • Add the new API methods to dnfdaemon-system.py and optional dnfdaemon-session.py
  • Add client api method in DnfDaemonBase if it is available in both daemon or in DnfDaemonClient is it is a system only api.
  • Add unit tests for the api in test/test-system-api.py and optional to test/test-system-api.py if it exists in the session api
  • Update docs/server.rst and docs/client-python.api ( add new api method to members )
  • All unit tests must pass (make test) before pushing to github