DistGit provides home for linux distribution packages.
Find a file
2023-01-04 16:17:12 +01:00
.github/workflows chore: pre-commit automation 2023-01-04 16:17:12 +01:00
.tito Wait with tito->rpkg migration, we still need tito here and there 2018-02-26 09:34:05 +01:00
beaker-tests Update README.md 2020-05-17 14:43:13 +02:00
configs allow to configure name of the master (main) branch 2021-09-19 21:25:25 +02:00
docs/scripts/httpd add lookaside_dir option, deprecate cache_dir 2018-08-14 21:06:50 +02:00
images add link to DistGit tutorial 2021-09-19 21:25:25 +02:00
scripts Avoid using "whitelist" word 2021-11-23 18:00:50 +01:00
selinux give optional map permission to git_system_t on git_user_content_t 2018-01-13 16:40:16 +01:00
tests Use fixed port number for our python tests 2020-05-25 01:10:33 +02:00
.gitignore fix tests and cleanup the repo after last two unintended commits 2017-07-25 15:13:27 +02:00
.packit.yaml chore: pre-commit automation 2023-01-04 16:17:12 +01:00
COPYING follow up of pkgdb_sync_git_branches.py removal 2022-12-05 13:22:21 +01:00
dist-git.spec use SPDX format for license 2022-12-05 13:22:21 +01:00
LICENSE nothing is lisenced under GPLv2, remove it from LICENSE 2022-12-05 13:22:21 +01:00
README.md migrate to use tito as releng tool 2023-01-04 07:26:01 +01:00
Vagrantfile apply e499ce6916 fix to other vms too 2020-05-16 16:32:08 +02:00

DistGit

DistGit (Distribution Git) is Git with additional data storage. It is designed to hold content of source rpms and consists of these three main components:

  1. Git repositories
  2. Lookaside cache to store source tarballs
  3. Scripts to manage both

Read here for information about the most recent release: https://github.com/release-engineering/dist-git/wiki

How Does It Work

RPM source package typically contains a spec file and the sources (upstream tarball + additional patches). Source tarballs, being binary and potentially large, are not very well suited to be placed in a Git repository. On each their update, Git would produce a huge, meaningless diff. That's why DistGit was introduced as it employs an efficient lookaside cache where the tarballs can be stored. The Git repo itself can then be left to do what it does best: keep track of changes on the spec file, downstream patches, and an additional text file called sources that contains link to the source tarball in the lookaside cache.

storage

Video Tutorial

DistGit video tutorial

User Guide

1. Build and Install the Package:

The project is prepared to be built as an RPM package. You can easily build it on Fedora or CentOS with EPEL7 enabled using a tool called tito. To build the current release, use the following command in the repo directory:

$ tito build --rpm 

Install the resulting RPM package:

# tito build --rpm -i

2. Configuration:

Enable the lookaside cache by using and modifying the example httpd config:

# cd /etc/httpd/conf.d/dist-git/
# cp lookaside-upload.conf.example lookaside-upload.conf
# vim lookaside-upload.conf

Lookaside Cache uses https communication and client authenticates with ssl client certificate. The Dist Git service provider needs to issue the client certificate for every user.

3. Users and Groups:

All DistGit users need to:

  1. have an ssh server access with private key authentication
  2. be in a packager group on the server
  3. be provided with an ssl client certificate to authenticate with the lookaside cache

4. Install DistGit Web Interface:

Install Cgit, the web interface for Git:

# dnf install cgit

And point it to the DistGit repositories:

echo "scan-path=/var/lib/dist-git/git/" >> /etc/cgitrc

It is useful to comment out cache-size entry in /etc/cgitrc (or set it to zero) to always get up-to-date repository state at each page refresh.

The web interface will be available on address like http://your-server/cgit.

5. Systemd Services:

# systemctl start sshd
# systemctl start httpd
# systemctl start dist-git.socket

6. DistGit client tools:

To interact with DistGit server, you can use use rpkg or fedpkg command-line tools.

7. Deployment

You can see examples of Ansible deployment scripts in Fedora Infastructure dist-git role and Copr dist-git role.

  • Source-git - project started in 2020. Intended as layer on top of dist-git.

Developer Guide

Unit tests

nosetests -vs .

Integration tests

Please, see beaker-tests/README.md.

LICENSE

Whole project use MIT license. File upload.cgi uses GPLv1.