[Rpm-ecosystem] Getting started with DNF plugin development

Honza Šilhan jsilhan at redhat.com
Tue Jul 7 10:12:12 UTC 2015

> From: "Nick Coghlan" <ncoghlan at gmail.com>
> Hi folks,
> I recently started working with the software package management team
> at Red Hat, and my initial focus is going to be on helping to migrate
> further plugins from yum to dnf.
> I only get to be a complete noob once, so while I'm getting started
> and if folks are amenable to the idea, I'd like to take a run at
> putting together a contributor's guide for the main DNF documentation:
> https://bugzilla.redhat.com/show_bug.cgi?id=1240171
> The idea would be to initially cover:
> * how to get started working on dnf-plugins-extras
> * how to get started working on dnf-plugins-core

make sure you have dnf installed.
git clone https://github.com/rpm-software-management/dnf-plugins-core
cd dnf-plugins-core
cmake .
# run the tests for python2 and python3
/usr/bin/nosetests-3.* tests/ -x
/usr/bin/nosetests-2.* tests/ -x
# test the dnf plugin command without the need of plugin installation
dnf-2 <plugincommand> --setopt pluginpath="../dnf-plugins-core/plugins .../dnf-plugins-extras/plugins" --disableplugin="..."
dnf-2 <plugincommand> --setopt pluginpath="../dnf-plugins-core/plugins .../dnf-plugins-extras/plugins" --disableplugin="..."

> * how to get started working on dnf itself
> The last case was already covered in its README file, so this would
> just be about making those instructions a bit easier to find.
> However, for working on plugins, it isn't immediately obvious to me
> how to invoke their respective test suites - while there are tests in
> the tests subdirectories, their generated Makefiles have no "make
> test" command, and running ctest directly reports no tests were found.
> Finally, I'm looking for recommendations on an initial plugin to try porting.

You can start with `install_weak_deps` plugin [1]. It should be easy.
Find all recommended packages [2] and then install them [3]. The functionality
for suggests and reverse weak deps could be extended later.

> In researching that, I found the tasks listed at
> https://github.com/rpm-software-management/dnf/wiki/Become-a-contributor
> are all currently marked as done. Would it make sense to populate that
> page with the list of yum plugins still to be ported?

The page was done for high school interns to make them ready for dnf development.
I would recommend you to look at BZ for dnf-plugins-core and dnf-plugins-extras
components. Start with the most wanted RFEs (most CCs). There's the list
of not yet ported plugins [4]. Please discuss with us (jsilhan, rholy, mraka,
mluscon) the plugin you wanna port first. Michaal Mraka could be working on it too
or we have already decided that we don't want to port the plugin at all (the use case
could be achieved the other way).

Hope that helps,

[1] https://fedoraproject.org/wiki/PackagingDrafts/WeakDependencies
[2] http://hawkey.readthedocs.org/en/latest/tutorial-py.html#queries
[3] http://dnf.readthedocs.org/en/latest/use_cases.html
[4] https://fedoraproject.org/wiki/Yum_to_DNF_Cheatsheet

> Regards,
> Nick.
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Rpm-ecosystem mailing list
> Rpm-ecosystem at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-ecosystem

More information about the Rpm-ecosystem mailing list