Fedora Packaging Guide - dogtagpki/pki GitHub Wiki

Prerequisites

  • Become a Fedora packager by submitting a request to packager-sponsors.

  • Install fedpkg:

$ dnf install fedpkg

Packages

See Fedora Packages.

Module (Unused)

The dist-git project for PKI module is located at:

See also Fedora Modules.

Authentication

SSH

Make sure the SSH key is set up properly in Fedora Account System. Verify by connecting to fedorapeople.org:

$ ssh -v <username>@fedorapeople.org

Log out from fedorapeople.org and continue on the local machine. See also Accessing your fedorapeople.org space.

Kerberos

Obtain a Kerberos ticket for FEDORAPROJECT.ORG:

$ kinit <username>@FEDORAPROJECT.ORG
Password for <username>@FEDORAPROJECT.ORG: ********

Verify with the following command:

$ klist
Ticket cache: KEYRING:persistent:13079:13079
Default principal: <username>@FEDORAPROJECT.ORG

Valid starting       Expires              Service principal
03/15/2018 21:37:11  03/16/2018 21:36:57  krbtgt/[email protected]
	renew until 03/22/2018 21:36:57

Note: If there’s no ticket issued, edit /etc/krb5.conf.d/kcm_default_ccache, and comment out the following lines:

[libdefaults]
    default_ccache_name = KCM:

Cloning a Project

To clone a project into a local repository:

$ fedpkg clone <project>

If there’s a problem, try running it in verbose mode:

$ fedpkg -v clone <project>

If the Fedora username is different from the local username, specify it using --user:

$ fedpkg --user <username> clone <project>

Forking a Project

To fork a project, visit the main Fedora project page (e.g. dogtag-pki) and click the Fork button at the top of the page. The forked project should appear under https://src.fedoraproject.org/fork/<username>/rpms/<project>/.

Adding Forked Project

To add the forked package into the local repository, execute:

$ git remote add <username> https://src.fedoraproject.org/forks/<username>/rpms/<project>.git
$ git fetch <username>

Creating a Pull Request

First, commit the changes into a temporary branch, and push the branch into the forked project:

$ git checkout -b <branch>
$ git commit -m "..."
$ git push <username> <branch>

Then open the forked project page, go to the Commits page of the branch, and click Create pull request.

After the request is merged, go back to the original branch and pull the changes:

$ git checkout <original branch>
$ git pull

Building a Single Package

If this is the only package to be built, it can be built directly without a side tag.

A scratch build can optionally be created before creating the official build. To create a scratch build:

$ fedpkg scratch-build

To create the official build:

$ fedpkg build --target <side tag>

The scratch/official build will be created in https://koji.fedoraproject.org.

Building Multiple Packages

If this package must be built together with some other packages (i.e. to avoid partial update), use a side tag to make sure the dependencies are available.

To list existing side tags:

$ fedpkg list-side-tags

To request a new side tag:

$ fedpkg request-side-tag

To create a scratch build with the side tag:

$ fedpkg scratch-build --target <side tag>

To create the official build with the side tag:

$ fedpkg build --target <side tag>

Wait for the new package to be available before building the next package:

$ koji wait-repo --build <package NVR> <side tag>

Once all packages are built, create an update in Bodhi using the side tag.

If necessary, the tags can be updated with the following commands:

$ koji tag <side tag> <package NVR>
$ koji untag <side tag> <package NVR>

See also Package update HOWTO - Multiple Packages.

Mailing List

See Also

⚠️ **GitHub.com Fallback** ⚠️