New Package Process for New Contributors

This is a long version of the New Package Process, containing more details so new contributors can follow it more easily. Also the mandatory sponsoring step is included.

Install Packager Tools

Check if the package already exists

If some useful software is not included in Fedora already, you can submit it as a new package. The package you are submitting can be of any Free and Open Source project.

Before creating your package, make sure that the software is not already in the Fedora repository:

Make a Package

Upload Your Package

Upload your SRPM and SPEC files onto the Internet somewhere so that others can retrieve them. This can be anywhere accessible by a URL, but it is important that the files be directly accessible, not hidden behind some service that makes people wait to download things or redirects through advertising pages.

If you want to make ad-hoc builds available for users while you are getting the package into the official repositories, consider using Copr. It is a lightweight automated build system that can create repositories using the SRPM you upload. You can use this Copr space to point reviewers to your src.rpm and spec.

Create Your Review Request

  • Before submitting your request, be sure there’s not a previous request for the same package. There is a convenient search box on the package review status page.

  • Make sure that you put the name of the package (excluding version and release numbers) in the Review Summary field, along with a very brief summary of what the package is.

  • Put a description of your package (usually, this can be the same thing as what you put in the spec %description) in the Review Description field. Include the URLs to your SRPM and SPEC files.

  • Explain in the ticket that this is your first package and you need a sponsor. Also, include any information that may help prospective sponsors. If you’ve been active in other review work, include links. If you’re the upstream maintainer, be sure to say so.

  • For bonus points, include a link to a successful koji build so that everyone knows you did all of your homework.

The review process is described in detail on the Package Review Process page.

Inform Upstream

The Fedora Project prefers Staying Close to Upstream Projects. Inform the developers that you are packaging the software. You can do that by sending them an email introducing yourself and pointing out the review request. This sets up the stage for future conversations. They will usually advertise the fact that their software is now part of Fedora or might want to inform you of important bugs in the existing release, future roadmaps etc.

Watch for Feedback

Watch the Bugzilla report for your first package. You should get notifications of changes by email. Fix any blockers that the reviewer(s) point out.

Get Sponsored

When the package is APPROVED by the reviewer, you must separately obtain member sponsorship in order to check in and build your package. Sponsorship is not automatic and may require that you further participate in other ways in order to demonstrate your understanding of the packaging guidelines. The key to becoming sponsored is to convince an existing sponsor-level member that you understand and follow the project’s guidelines and processes.

See How to Get Sponsored into the Packager Group for more information on the process of becoming sponsored.

Your sponsor can add you to the packager group. You should receive an email confirmation of your sponsorship.

Add Package to Source Code Management (SCM) system and Set Owner

Before proceeding, please sync your account by login on Fedora Package Sources using your FAS credentials.

If you are becoming a maintainer for a new package, instead of being a co-maintainer, use fedpkg to request a new git repository for your package. The sub-command is fedpkg request-repo which includes help text for setting up the Pagure API token the command requires. When creating your API-key choose toggle-all for the ACLs. You must specify the repository name and review bug number. For example:

fedpkg request-repo python-prometheus_client 1590452

The request will be reviewed and processed automatically. After processing, you will have access to commit and build the package. In case the automation does not work, you can report the problem to Toddlers issue tracker.

fedpkg request-repo only creates a branch for Rawhide. To request branches for other Fedora releases, use fedpkg request-branch:

fedpkg request-branch --repo python-prometheus_client f40

You will need to run this for each non-rawhide branch. If you wish, you can also use the --all-releases flag to request branches for all current Fedora releases.

Check out the distgit repository

You could check out your distgit repository now, but before doing that, consider doing mkdir ~/fedora-scm ; cd ~/fedora-scm — that way, all your files are inside a single directory. Also, run ssh-add, so that you won’t have to keep typing in your key password.

Now you are ready to checkout your distgit repository from the SCM:

 fedpkg clone your-package

Test Your Package

Refer to Using Mock to test package builds and Koji Scratch Builds for more information on testing your package. Mock uses your local system while Koji command line tool uses the Fedora build system server.

Import, commit, and build your package

Now that you’ve checked out your (empty) distgit repository with fedpkg, cd into the repository’s main branch:

cd <packagename>

Run fedpkg to import the contents of the SRPM into the SCM:

fedpkg import PATH_TO_SRPM
# Review Changes, press 'q' to stop; Revert with: git reset --hard HEAD
git commit -m "Initial import (fedora#XXXXXX)."
git push
fedpkg build

Obviously, replace PATH_TO_SRPM with the full path (not URL) to your approved SRPM, and XXXXXX with the package review bug number.

If your package is using autochangelog, writing the bug number as specified will make the Fedora update system automatically close the bug when your package is submitted to Rawhide stable repository.

This imports into, commits, and builds only the main (Rawhide) branch.

If the push fails with this kind of message:

W access for why DENIED to YOUR_ACCOUNT
fatal: The remote end hung up unexpectedly
Could not push: Command '['git', 'push']' returned non-zero exit status 128

Then you don’t have the necessary rights to modify that package branch. View to request those rights.

For more information on using the Fedora package maintenance system, see the Package maintenance guide.

Update Your Branches (if desired)

Branches are f# (formerly F- and before that FC-), main, etc. So f is the branch for Fedora.

To switch to a branch first:

fedpkg switch-branch BRANCH

(e.g. f40)

Merge the initial commit from main (Rawhide), creating an identical commit in the branch:

git merge rawhide

Push the changes to the server:

git push

Build the package:

fedpkg build

If there is another branch to work with repeat To switch to a branch and import and commit to each branch.

If everything goes well, it should queue up your branch for building, the package will cleanly build, and you’re done!

If it fails to build, the build system will send you an email to report the failure and show you to the logs. Commit any needed changes to git, bump the SPEC release number, and request a new build.

Submit Package as Update in Bodhi

The Fedora update system called Bodhi is used for pushing updates, classifying packages etc. You do not need to submit updates for Rawhide (main) manually because these are automatically created for you when the build completes. For all other branches, you must manually push updates for all builds that you would like to make available to users.

You can push an update using Bodhi via the command line using this in each branch:

fedpkg update

It is often easier to complete builds for all your branches and then push a single update using the Bodhi web interface. Bodhi is smart enough to split your update into individual updates, one for each Fedora release branch.

You can also select multiple builds from different packages to include in a single update using the web interface. This is useful when you would like to push linked builds, for example: an application package and its dependencies that are necessary for it to run correctly.

Please see the Package Update Guide for more details.

Make the package available in "comps" files

If appropriate for the package, make it available in "comps" files so that it can be selected during installation and included in dnf package group operations. See How to use and edit comps.xml for package groups for more info.

Watch for updates

Fedora has the infrastructure available for monitoring new upstream releases of the software you are packaging. Refer to Upstream Release Monitoring for more details.