Pagure

With pagure you can host your project with its documentation, let your users
report issues or request enhancements using the ticketing system and build your
community of contributors by allowing them to fork your projects and contribute
to it via the now-popular pull-request mechanism.

If you have any questions or just would like to discuss about pagure,
feel free to drop by on IRC in the channel #pagure of the freenode server

About its name

The name Pagure is taken from the French word 'pagure'. Pagure in French is used as the
common name for the crustaceans from the Paguroidea
superfamily, which is basically the family of the Hermit crabs.

Originating from French it is pronounced with a strong 'g' as you can hear
on this recording.

Get it running

There are several options when it comes to a development environment.
They are: Docker Compose, Vagrant, and manual. Choose an option below.

If you get this error Block in synced_folders: Internal error. Invalid: sshfs,
when you run vagrant up , you need to install vagrant sshfs plugin, which can be done by:

$ vagrant plugin install vagrant--sshfs

and then:

$ vagrant up

The default Vagrantfile forwards ports from the host to the guest,
so you can interact with the application as if it were running on your
host machine.

Note

vagrant-hostmanager will automatically maintain /etc/hosts for you so you
can access the development environment from the host using its hostname, which
by default is pagure-dev.example.com. You can choose not to use this
functionality by simply not installing the vagrant-hostmanager plugin, but
if you want Pagure to provide valid URLs in the UI for git repositories, you
will need to adjust Pagure's configuration found in ~/pagure.cfg on the guest.

When the vagrant VM is up and running, connect to it with:

$ vagrant ssh

This will log you into the VM as the user vagrant which has a couple of aliases
preconfigured:

Manually

Do note the version of libgit2 that you install, for example
in libgit2-0.23.4-1 you need to keep in mind the 0.23

Note

On RHEL and derivative (CentOS, Scientific Linux) there is no
python3 package. Just python36 or python34 available in
EPEL 7 (EPEL 6 only has python34). Choose the one you prefer
(3.6 is newer and generally a better choice).

Retrieve the sources:

git clone https://pagure.io/pagure.git
cd pagure

Install dependencies

create the virtual environment (use pytohn3.X explicitly on EPEL):

python3 -m venv pagure_env
source ./pagure_env/bin/activate

Install the correct version of pygit2:

pip install pygit2==<version of libgit2 found>.*

So in our example:

pip install pygit2==0.23.*

Install the rest of the dependencies:

pip install -r requirements.txt

Create the folder that will receive the projects, forks, docs, requests and
tickets' git repo:

mkdir -p lcl/{repos,remotes,attachments,releases}

Copy and edit the alembic.ini file (especially the script_location key):

cp files/alembic.ini .
vim alembic.ini

Set the script_location to alembic, ie: the folder where the revisions
are stored, relative to the location of the alembic.ini file.

While testing for worker tasks, pagure uses celery in /usr/bin/
Celery then looks for eventlet (which we use for testing only) at
system level and not in virtual environment. You will need to
install eventlet outside of your virtual environment if you are
using one.