|
|
Subscribe / Log in / New account

Pagure and Fedora

By Jake Edge
May 18, 2016

There are a fair number of options for project hosting these days, from the largely moribund SourceForge to the ever-popular GitHub, but many of these sites either do not release their software or are largely company-run projects, without much in the way of an external development community. A relatively new entrant in the "forge" scene (where "forge" hearkens back to SourceForge, which was one of the earliest) is pagure. It is gaining a bit of traction as the Fedora project has started using it for some of its projects. One of its headline features, that distinguishes it from some other project-hosting tools, is that the discussion metadata for bugs and pull requests is also available, which allows projects to easily move or to keep multiple pagure instances in sync.

Python and Git

Pagure is written in Python and uses Git for its repositories. It includes the usual set of features that projects have come to expect from this type of package, like issue tracking, repository forking, pull requests, and so on. Its genesis is in the Fedora infrastructure project and it was originally called "progit" by its creator Pierre-Yves Chibon.

As would be expected, the project itself is hosted within pagure, which easily allows those interested to browse its documentation and issues (bugs and feature requests). On the main page for a repository, there are the expected URLs for the source code Git repository and (a bit hidden behind a "more" link on the project page) a Git repository for the documentation. While the issues and pull-request information is also stored in Git repositories, URLs for those are not apparent (or at least obvious) in the web interface. There is also scant mention of those repositories in the documentation, which is a little bit sparse at this point.

One of the big complaints about GitHub is that much of the metadata that a project accumulates is not easily retrieved should the project want to move elsewhere. Making that easier, while also allowing other use cases such as synchronization between multiple project sites, is one of the more interesting features of pagure.

Installation and workflow

Installation from source into a Python virtual environment is fairly straightforward as described on the main project page. Installing on Fedora or RHEL/CentOS can be done using RPMs or, for other distributions, setup.py can be used. There are some fairly lengthy instructions on configuring the web server, setting up repository directories, and creating the database once pagure itself has been installed.

By default, pagure uses SQLite, but that is not sufficient for running a production instance, so either PostgreSQL, MySQL, or MariaDB need to be available for those types of systems. For managing updates to the database tables, the Alembic "lightweight database migration tool" is used. It works with the SQLAlchemy database toolkit for Python to allow the database schema to evolve relatively painlessly as pagure adds new features.

The workflow in pagure is fairly easy to pick up as it should be familiar to those who have used GitHub or similar sites. Repositories are forked and modified, then submitted back to the project as pull requests. In addition, pull requests can be created from forks that are hosted elsewhere and changes pushed into a branch that a pull request was created from will automatically update the request with the new changes.

Architecture

The architecture of the tool is based on a number of cooperating processes. The main application is a Flask-based web application that provides a user interface to the Git repositories, issues, and pull requests. Gitolite is used to control SSH access to the repositories. The documentation server is a separate web application that can (and probably should) be hosted on its own system:

While integrated into the main application at first, it has been split out for security concern, displaying information directly provided by the user without a clear/safe way of filtering for un-safe script or hacks is a security hole. For this reason we also strongly encourage anyone wanting to deploy their own instance of pagure with the doc server, to run this application on a completely different domain name (not just a sub-domain) in order to reduce the cross-site forgery risks.

Beyond that, there is a "milter" (mail filter) that allows people receiving comments on issues or pull requests to reply directly in email and have their message be added—alleviating the need to call up the web page before replying. There is an "EventSource" server that handles live refreshing of web page contents (such as comments on an issue being viewed). The "web-hook" server handles third-party notifications, such as to Fedora infrastructure's fedmsg message bus.

Releases for pagure are coming at a fairly quick pace. The project appears to be a little more than a year old and, unlike many projects that languish with 0.x releases for years, is up to version 2.1.1. The 1.0 release was made back in January; Fedora Magazine reviewed at that time, noting that the name comes from the French word for "hermit crab". In his post announcing that the project was being renamed, Chibon explained the connection: "This little crab moves from shell to shell as it grows up. I found it was a nice analogy with this forge where [a] project can move from place to place."

As with many projects these days, pagure has a list of easy fixes for those who want to get involved. A look through the issue tracker will provide a sense for where things may be headed. For example, Python 3 support is in the plans, and there is a "py3_work" branch where that work is going on, though, at this point, running pagure on Python 3 is a bit of a "bumpy ride", Chibon said.

Overall, it seems like an interesting project that fills an important niche, though it is not the only project of that sort. For example, Kallithea is a free-software, Python-based forge with both Git and Mercurial support. It is GPLv3-licensed, rather than the GPLv2 chosen by pagure, but the goals of the projects are similar. Some may question the need for both.

In some sense, Fedora project leader Matthew Miller touched on that with an issue (tagged "wishful") he posted about integrating pagure with the Taiga project management platform. He was concerned that pagure was not getting enough traction to attract a development community outside of the Fedora world, not to mention that it was adding yet another bug tracker for Fedora.

While pagure certainly seems like a nice tool, there is a risk of "too many" efforts like these. A major part of GitHub's appeal is the network effects that come from many developers already having an account with the service and the knowledge of how to use it. Splitting the free-software community's attention into multiple different platforms, each with its own idiosyncrasies, accounts, and so on, may not lead to a freedom-focused alternative and, instead, continue the fractured landscape we see today. On the other hand, there may be ways to link up pagure, Kallithea, and others to create some kind of federated, free meta-forge for hosting projects—one that is large enough to benefit from network effects of its own.

[ Thanks to Bruno Wolff III for suggesting the topic. ]


to post comments

Pagure and Fedora

Posted May 19, 2016 13:07 UTC (Thu) by xav (guest, #18536) [Link] (5 responses)

I wonder how pagure does compare to https://gitlab.com/ ? The latter looks like a good replacement for github to me.

Pagure and Fedora

Posted May 19, 2016 18:47 UTC (Thu) by mcatanzaro (subscriber, #93033) [Link] (4 responses)

I've hardly used Pagure, but I will mention my thoughts on GitLab since you brought it up. GitLab has lots of nice features, definitely better than GitHub (e.g. rebase-style merge requests). I haven't used Pagure much, but it would be difficult to compete with GitHub on features and even harder with GitLab. But the official GitLab server is very slow and frankly unreliable (whereas GitHub is very fast and usually reliable). If you host your own GitLab instance, you have to choose between the free and enterprise versions. Pagure is completely free. Also, GitLab's UI is relatively confusing whereas GitHub's is very easy. Conclusion: idk, just dumping some thoughts.

Pagure and Fedora

Posted May 19, 2016 18:51 UTC (Thu) by mcatanzaro (subscriber, #93033) [Link]

I will just add that Pagure is clearly nicer than most of its competition (SourceForge, Redmine, etc.)

Pagure and Fedora

Posted May 20, 2016 22:34 UTC (Fri) by vstinner (subscriber, #42675) [Link] (1 responses)

Does GitLab give an easy access to the data storage of bugs, pull requests (comments, all versions of a pull request, etc.), doc, etc.? I like the Pagure idea of storage all data (bugs, pull requests, comments, etc.) in Git. I hope that it makes easier to move to a different forge tomorrow. At least, I expect such migration very painful when using GitHub. At least, I'm not aware of any way to export *all* data of a project.

In the past, I moved many times some tiny personal projects from one forge to another (ex: from Trac to Bitbucket). At least migration, I lost data because it was painful to convert data, or simply because it was not possible to automatically export data.

Pagure and Fedora

Posted May 21, 2016 23:19 UTC (Sat) by mathstuf (subscriber, #69389) [Link]

GitLab's API is pretty easy and doesn't have rate limits (certainly not if you host it). Just have an administrator user do the queries and you'll get all the info (profile contact emails and such are hidden to regular users).

Pagure and Fedora

Posted May 21, 2016 23:31 UTC (Sat) by mathstuf (subscriber, #69389) [Link]

Enterprise features of GitLab do eventually make their way into the Free version. When new features arrive which allow there to still be a separation. Upstream is also very friendly and I haven't seen them reject anything for being an Enterprise feature (links welcome though). I think the Enterprise source code is available, but I don't remember.

Pagure and Fedora

Posted May 19, 2016 22:12 UTC (Thu) by morksigens (guest, #92681) [Link] (13 responses)

> On the other hand, there may be ways to link up pagure, Kallithea, and others to create some kind of federated, free meta-forge for hosting projects—one that is large enough to benefit from network effects of its own.

The first step: using a service like Mozilla's Persona or whatsitcalled to provide a painless way to login WITHOUT SIGNING UP FOR EVERY DAMN PROJECT.

Pagure and Fedora

Posted May 19, 2016 22:49 UTC (Thu) by pizza (subscriber, #46) [Link]

...Too bad Persona is being discontinued at the end of the year.

Pagure and Fedora

Posted May 20, 2016 8:30 UTC (Fri) by dr@jones.dk (subscriber, #7907) [Link] (4 responses)

Persona is (or was, it is abandoned) by design tied to interactive users of web browsers, I believe.

The IMO more sensible alternative is WebID: http://webid.info/

The most active development/integration of WebID is probably in the field of SoLiD (the fusion of RDF a.k.a. Linked Data with Social media): https://github.com/solid/solid

Pagure and Fedora

Posted May 20, 2016 23:28 UTC (Fri) by flussence (guest, #85566) [Link] (3 responses)

It's nice to see someone working with OpenID instead of against it, for a change.

Pagure and Fedora

Posted May 20, 2016 23:41 UTC (Fri) by dr@jones.dk (subscriber, #7907) [Link] (2 responses)

Not sure if that was meant as sarcasm, but if genuine: Please notice that OpenID and WebID are different things.

Pagure and Fedora

Posted May 21, 2016 4:18 UTC (Sat) by flussence (guest, #85566) [Link] (1 responses)

Well the page says “OpenID compatible”... what am I supposed to take away from that?

Pagure and Fedora

Posted May 21, 2016 4:28 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link]

>Well the page says “OpenID compatible”... what am I supposed to take away from that?

That it is a compatible superset as it says in the page?

Pagure and Fedora

Posted May 21, 2016 7:47 UTC (Sat) by misc (guest, #73730) [Link] (1 responses)

Pagure use ipsilon (https://pagure.io/ipsilon), that's a identity provider written in python, offering saml, openid and others protocols support. That's also used by gnome and it support persona, ldap, or whatever you want.

Now, pagure.io (the service) is the fedora forge, and so by design, it use the fedora authentication system, since that's used for centralized access control, and stats (the so called badge system is also used to get numbers for the comm ops team so they know what work and what doesn't and where to put efforts).

Pagure and Fedora

Posted Jun 12, 2016 19:45 UTC (Sun) by sathieu (guest, #61749) [Link]

> Pagure use ipsilon [...]

I can't see any reference to ipsilon in pagure source code, and the doc only mentions FAS or local authentications (https://docs.pagure.org/pagure/configuration.html#pagure-...)

Pagure and Fedora

Posted Nov 20, 2016 11:19 UTC (Sun) by catalinuxboie (guest, #112452) [Link] (4 responses)

RocketGit (AGPLv3) allows contributing to projects without having an account. The feature is named "anonymous push". Any push you do (https/ssh/GIT) is transformed into a pull request.

Disclaimer: I am the main author.
Site: https://rocketgit.com

Pagure and Fedora

Posted Nov 21, 2016 1:25 UTC (Mon) by pabs (subscriber, #43278) [Link] (3 responses)

This is an awesome feature that should really be much more widespread. It might be interesting for you to write an LWN article about how it works in RocketGit.

Another place that has anonymous push is Branchable, but there anonymous pushes are just accepted without transforming them to pull requests.

Pagure and Fedora

Posted Nov 21, 2016 4:55 UTC (Mon) by mathstuf (subscriber, #69389) [Link] (1 responses)

And what happens when comments need addressed on the request? Does it languish? Send the emails to…authors of commit messages? Committer? What if those are dead ends? (More curious than dismissive, but I do see those as larger obstacles to it being a useful feature.)

Pagure and Fedora

Posted Nov 21, 2016 17:05 UTC (Mon) by catalinuxboie (guest, #112452) [Link]

For now, you may use the e-mail address. I am thinking, for the future, to provide a special URL (in one of the hooks), which will be visible to the author. That URL can be used to destroy the pull request, or to comment.

Pagure and Fedora

Posted Nov 21, 2016 17:10 UTC (Mon) by catalinuxboie (guest, #112452) [Link]

Thank you for your kind words! An article is planned for the near future!

Continuous Integration close to being added

Posted Jun 2, 2016 16:06 UTC (Thu) by brunowolff (guest, #71160) [Link] (3 responses)

Pagure is under pretty active development right now and there have been a number of improvements in the couple of weeks since the article was posted. There is now a pull request for CI support. I don't know if it will be accepted as is, but it does look like CI support is likely to be added soon.

Continuous Integration close to being added

Posted Jun 3, 2016 11:49 UTC (Fri) by brunowolff (guest, #71160) [Link] (2 responses)

There is an update on this at https://lists.fedoraproject.org/archives/list/infrastruct...
There are three main goals for pagure for this summer:
- Support for private git repos (Farhaan Bukhsh)
- Pagure/Jenkins integration (Farhaan Bukhsh)
- Adjust pagure and crons to have pagure run at pkgs.fp.o (Vivek Anand)

Continuous Integration close to being added

Posted Jun 3, 2016 12:33 UTC (Fri) by mathstuf (subscriber, #69389) [Link] (1 responses)

> Adjust pagure and crons to have pagure run at pkgs.fp.o

Does this mean it runs on top of existing gitolite configuration or is it a replacement of the existing gitolite setup?

I guess I should file an issue, but I'd also like for the URLs to be more consistent. Right now, I have to have different insteadOf config for forks versus real repos.

Continuous Integration close to being added

Posted Jun 3, 2016 13:10 UTC (Fri) by brunowolff (guest, #71160) [Link]

I don't know. I'm guessing there will be one gitolite config in the end, but I don't know how they are planning to do that. I don't see an open issue in Pagure that seems to cover this.


Copyright © 2016, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds