Setup

The instructions given in these pages assume that you have installed Fedora Workstation. If you have installed some other Fedora edition or spin, additional steps may be necessary.

Install some packages

To prepare for Fedora packaging activities, install the fedora-packager and fedora-review packages. To do that with dnf, run:

sudo dnf install fedora-packager fedora-review

DNF automatically installs a number of other tools, such as mock, that will come in handy.

Add yourself to the mock group

If your account is not part of the mock group, then you will have to type your password a lot. Save your sanity and add your user to the mock group now. To do so on the command line, run:

sudo usermod -a -G mock [username]

where you replace [username] with your actual username, of course.

Set up package development directories

Run this command as a normal (i.e., non-root) user:

rpmdev-setuptree

You should now have a directory named rpmbuild in your home directory, with a handful of subdirectories (BUILD, RPMS, SOURCES, SPECS, and SRPMS). We will use those when developing a package from scratch.

Brush up on your git skills

If you are not familiar with git, now is the time to learn a few basic git commands. See this site for a good introduction. There are many excellent books that can help you get started, as well.