Skip to content

CentOS Development Guide

Endi S. Dewata edited this page Apr 28, 2021 · 13 revisions

Prerequisites

$ dnf install centpkg

Packages

The dist-git projects for PKI packages are located at:

Authentication

To set up the authentication, login with Fedora FAS account to https://accounts.centos.org, then add SSH public key into https://gitlab.com.

Cloning a Project

To clone a project into a local repository:

$ centpkg clone <project>

Forking a Project

To fork a project, visit the main project page and click the Fork button at the top of the page. The forked project should appear at https://gitlab.com/<username>/<project>/.

Does not work: Alternatively, create a personal access token with scope api at https://gitlab.com/-/profile/personal_access_tokens. Store the token in ~/.config/rpkg/centpkg.conf as follows:

[centpkg.distgit]
token = <token>

Then execute:

$ centpkg fork

Adding Forked Project

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

$ git remote add <username> [email protected]:<username>/<project>.git
$ git fetch <username>

Creating a Scratch Build

To create a scratch build:

$ centpkg scratch-build

The scratch build will be created in https://kojihub.stream.rdu2.redhat.com.

Creating a Merge 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, click Merge requests, select the source and target branches, click Compare branches and continue, and click Create merge request.

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

$ git checkout <main branch>
$ git pull

Creating an Official Build

To create an optional build:

$ centpkg build

The official build will be created in https://kojihub.stream.rdu2.redhat.com. It will also trigger gating process.

See Also

Clone this wiki locally