LWN.net Logo

Fedora mining for COPR

By Nathan Willis
September 5, 2013

Ubuntu's Personal Package Archive (PPA) feature is a popular way for developers—and, in some cases, project teams—to publish binary packages without risking too much upheaval to the end user's local package set. Ubuntu has offered the service since 2007, and while other distributions have rolled out similar services of one form or another over the years, Fedora is now targeting the complete "PPA-like" offering with an effort of its own. That effort is called the COPR project, which has existed in limbo for several years. But COPR recently acquired a new maintainer, who is asking hard questions about how much of the service Fedora should really be building from scratch.

According to the Fedora wiki, COPR stands for "Cool Other Package Repo," though there is little reference to that acronym expansion anywhere else (perhaps understandably, for those who remember the origins of KDE). In any case, the COPR project was initiated in 2010 with an eye toward offering a PPA-like service for Fedora developers, although it appears that no substantial development began until 2012.

Building packages and the case for PPAs

Of critical interest was duplicating the ease-of-use of the Ubuntu PPA system. The Launchpad PPA service automatically builds programs for both the 32- and 64-bit x86 architectures, with any number of Ubuntu releases available as the target environment, and serves up the resulting packages as an Apt repository. Users can add the PPA repository with a variety of Apt tools, then install, update, and remove the PPA-provided packages just like those from the distribution itself. Just as importantly, developers only need to upload source packages to the system—although, of course, they are responsible for hunting down and fixing any build errors.

On the Red Hat/Fedora side, it has long been possible to set up a private RPM repository. Over the years many such repositories were established and proved popular for acquiring packages outside of—or newer than—the official Fedora releases. Dag Wieers, for example, ran his eponymous "DAG" repository for many years using a homebrew build system, and later followed it up with the RepoForge project. But both required packagers to oversee the build process manually.

More recently, the Fedora People Repositories project offered Fedora packagers server space to publish unofficial RPM packages, although again, manual effort was required to set up the build environment and to publish the resulting packages. The wiki also states that the repositories "should only be used for packages that are intended for end-user non-transient use," a use case that excludes putting packages out for public review.

At the same time, Fedora has developed the Koji build system to automatically build RPM packages for the distribution's core components. It would seem, then, that Koji is a natural fit to take the place of the manual package-building process usually required of those wishing to publish a personal RPM repository.

But there is another build system that has seen wider usage than Koji, the Open Build Service (OBS). Originally designed by openSUSE, OBS can be used to build packages, package sets, or even entire distribution releases, targeting a wide variety of distributions and architectures.

COPR returns

As mentioned earlier, the COPR concept has been around since 2010, but it was not until late 2012 that Slavek Kabrda and Seth Vidal began coding on it in earnest. They produced a working prototype (although it has not been open to public testing). But due to the tragic loss of Vidal in July and Kabrda's commitments to other projects, the future of COPR seemed, at the very least, uncertain.

But the project soon gained the attention of Miroslav Suchý, who has since undertaken a reassessment of the community's specific requirements of a PPA-like service, and has started asking hard questions about the architecture best suited to implement them.

In Suchý's first blog post on the subject, he enumerated the higher-level use cases for the service. The existing COPR prototype takes a single source RPM as input, builds the package on a virtual machine, and imports it into a Yum repository. In addition to that basic functionality, Suchý said, COPR needs to be usable for projects built on top of Fedora (such as OpenShift or the various Fedora SIGs' "spins"), it should provide personal—perhaps even private—repositories for users, and it should facilitate automated rebuilds of upstream packages for testing purposes. These missing features are what will make COPR useful for teams of developers, for individuals doing testing or branch development, and for monitoring the build-ability of packages.

Those useful outcomes constitute the real goals of the system, after all: making COPR a service that improves the development process, not just automating a single task. But the problem is that COPR is currently a standalone system, not integrated with the other pieces of the Fedora infrastructure. To meet the community's real needs, Suchý said, COPR should either be rebased on Koji or Fedora should adopt OBS. Koji, of course, is already a Fedora project, but OBS offers more features.

In a second post, Suchý explored the costs and benefits of rebasing COPR on Koji. There would need to be changes to Koji itself, including adding support for multiple packages of the same name scattered among different user accounts (and for multiple branches of a project within one user account) and adapting Koji to build packages on virtual machines instead of in chroots. On the other hand, those changes to Koji would improve it in its own right. In addition, the Fedora project would benefit from improved tooling all around, because other components (like mock and various other existing build scripts) will receive attention. The downside would be that Koji cannot easily be modified to add support for monitoring and automatically rebuilding packages, and its support for collaborative team features is minimal.

Suchý then examined the prospect of rebuilding COPR on top of OBS. In the plus column, OBS already supports many of the features missing from Koji (such as teams, package monitoring, and multiple branches of a package). It is also more mature, has six full-time developers, and has a more full-featured web interface. In fact, OBS already supports virtually the full feature set desired for COPR, including automatically publishing a Yum repository for built packages; the existing COPR prototype code would not really be necessary.

In the minus column, however, OBS uses a significantly different build system than the one used to build Fedora packages elsewhere. The workflow would be different than the one used to build official packages on Koji, and dependency resolution is performed using a different utility. A different workflow would require re-educating packagers, but using a different dependency resolver brings in the possibility that Koji and OBS would actually produce different packages.

The great debate

Suchý does not propose an answer in his posts. There are pros and cons to each path forward, and he estimated six to seven months would be required to implement either solution. Ultimately, he put the question to the community to decide—which, for a community-driven distribution like Fedora, is probably the most appropriate approach.

The options received quite a bit of debate on the fedora-devel list. Some, like Colin Walters, found the prospect of differences between the OBS and Koji build systems to be a major problem (and a point in favor of the Koji-based approach). Toshio Kuratomi said that asking the Fedora system administrators to add OBS to their already-full plates would be too costly, while others pointed out that asking packagers to learn two build systems would increase the packager's workload (in addition to the technical differences between the systems). There were also security questions raised, since OBS uses virtual machines rather than Koji's chroot-based approach.

In the end, Suchý concluded that the consensus leaned toward rolling out the existing version of COPR in the short term, and working on integration with Koji over the coming seven months. But he did not give up on OBS altogether. Although few in the mailing list discussion were excited by it, Suchý said he still thought it offered more than COPR and Koji can together, so he also vowed to "try to get (in spare time) OBS to Fedora anyway and build some community around it. And revisit the decision in two-three years." So Fedora packagers actually have more than one option to look forward to, regardless of which build system they prefer.


(Log in to post comments)

Fedora mining for COPR

Posted Sep 6, 2013 7:05 UTC (Fri) by dlang (✭ supporter ✭, #313) [Link]

minor nit to pick, the introduction talks about how it has long been possible to setup a private RPM repository, in context this makes it sound like this is something that rpm has that apt has not. Apt has also had the ability to setup additional repositories, private or third party that work just like any other repositories with the standard tools

PPAs don't change this, they just wrap tools for creating the repositories, provide easy cut-n-paste instructions for adding them (and the needed encryption keys to validate signatures) to the system

Fedora mining for COPR

Posted Sep 6, 2013 16:27 UTC (Fri) by raven667 (subscriber, #5198) [Link]

I am a bystander but I too would like to see a migration to OBS rather than continuing to spend development time on koji and copr just to make an inferior clone of the rather mature OBS. It seems that this is one of those core infrastructure pieces where diversity is more of a cost than the benefit is worth. Active Fedora developers would know better but from the peanut gallery it seems to me that the effort of migrating to OBS is less than the effort of adding all the features to koji that are required.

Fedora mining for COPR

Posted Sep 6, 2013 23:25 UTC (Fri) by jengelh (subscriber, #33263) [Link]

>rather than continuing to spend development time on koji and copr just to make an inferior clone

That just follows after having dismissed zypper and instead writing another UI on top of libzypp.

Fedora mining for COPR

Posted Sep 6, 2013 23:36 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

That is a misleading statement. libzypp won't be used in Fedora at all.

Yum existed long before zypper and Fedora users are well accustomed to it since atleast Fedora Core 2 and some from even before that. Yum has been forked into a prototype called dnf to adopt libsolv, the sat solver library that libzypp itself uses and dnf once it has been tested well will eventually just become the new yum around Fedora 22. So the plan really it for Fedora and SUSE to share the core dependency resolver (libsolv) which might even be merged into RPM itself.

Fedora mining for COPR

Posted Sep 7, 2013 0:38 UTC (Sat) by jengelh (subscriber, #33263) [Link]

>libzypp won't be used in Fedora at all.

And that is what I am criticizing;

>Yum existed long before zypper,

The parent posting recommended migrating to OBS rather than adding to koji, the latter of which also existed long before OBS. I intended to just echo that with different parameters: migrate to zypper rather than adding to yum.

Accustomization is not a showstopper for migration, at least it did not stop Fedora from migrating to systemd instead of spending development efforts on adding to sysvinit. Just like the sysvinit compatibility is in/ontop systemd, yum compatibility could be in/ontop of zypp.

Fedora mining for COPR

Posted Sep 7, 2013 0:46 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link]

You made a clearly erroneous claim that Fedora is developing a new UI on top of libzypp. Fedora is instead adopting yum to use libsolv. This gets the advantage of a shared resolver without the difficulty of learning a new UI.

Fedora mining for COPR

Posted Sep 7, 2013 0:59 UTC (Sat) by jengelh (subscriber, #33263) [Link]

>You made a clearly erroneous claim that Fedora is developing a new UI

Yes I did. (

>Fedora is instead adopting yum to use libsolv. This gets the advantage of a shared resolver without the difficulty of learning a new UI.

And I am still asking why does Fedora updates some old tools to new tech, when at the same time, Fedora has just moved to a new tool with old UI compatibility in another case?

Fedora mining for COPR

Posted Sep 7, 2013 1:17 UTC (Sat) by rahulsundaram (subscriber, #21946) [Link]

Fedora is not a monolithic entity and a lot of the decisions are based on rough consensus between different stakeholders which is different from one project to another. You compared this decision to systemd project which isn't specific to Fedora and is developed entirely independent from any distribution and freely adopts several Debian conventions on a routine basis for example and you can't really introduce new features of systemd with a old sysv init style ui which itself is different between different distributions. Neverthless compatibility shims between systemd and service and chkconfig commands were provided in Fedora before it was made the default.

For OBS, it has more features but the cost of switching is high enough (new resolver, doesn't use mock, uses Ruby for UI which Fedora infrastructure team hasn't deployed before, uses vm instead of chroot, doesn't integrate well with SELinux, uses a very different build workflow etc) that it isn't a obvious win to switch over yet but the developer who is leading the effort of merging copr with koji has noted that he is still in favor of switching over at a later point once enough of a community developers around the project. The first step would be getting into the repository and see if enough Fedora developers get involved to move it forward.

Fedora mining for COPR

Posted Sep 6, 2013 17:19 UTC (Fri) by ballombe (subscriber, #9523) [Link]

copr- is the Greek prefix for shit. Food for thought...
Ref: <http://en.wiktionary.org/wiki/copro->

Fedora mining for COPR

Posted Sep 7, 2013 2:16 UTC (Sat) by jzbiciak (✭ supporter ✭, #5246) [Link]

Or, more accurately, copro-, just as your link indicates. That makes my 5th-grader self from the 80s snicker retrospectively at the phrase "floating point copro."

But on the topic of COPR, it seems irrelevant.

Fedora mining for COPR

Posted Sep 6, 2013 22:08 UTC (Fri) by pjtait (subscriber, #17475) [Link]

On the resolver difference issue - what is happening with DNF, which uses openSUSE libsolv - seems that would "resolve" the issue...

https://lwn.net/Articles/503581/

Fedora mining for COPR

Posted Sep 6, 2013 22:45 UTC (Fri) by rahulsundaram (subscriber, #21946) [Link]

Eventually, yes. That's atleast a couple of releases away since at that point dnf will become the new yum.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds