sourCEntral - mobile manpages




Fedora::Rebuild − Rebuilds Fedora packages from scratch


Main goal is to rebuild perl modules packages for Fedora. The rebuild is driven from bottom to top, i.e. from perl interpreter to modules depending on intermediate modules. This way, it’s possible to upgrade perl interpreter to incompatible version and to rebuild all modules against the new interpreter.

Procedure is following: We have a set of source package to rebuild. We distill all build-time dependencies for each source package. We ignore non-perl dependencies as we focus on Perl only.

We select all source packages that do not depend on anything and push them into Koji to rebuild. Obviously, the only fulfilling package is Perl interpret only.

Once the first subset of packages is rebuilt, we gather their binary packages and distill their binary provides. These freshly available provides are put into new set of available provides. At the same time we remove the rebuilt subset from original set of all source packages.

Then we wait for build root rotation in Koji to get rebuilt binary packages available in build root.

(Of course we could get provides of new binary packages from koji repository after rotation and we can get provides through repoquery instead of inspecting binary packages manually.)

If package rebuild fails, the package is removed from future consideration.

Then we return to start of this procedure to select other subset of source packages whose build-time dependecies can be satisfied from set of binary provides we have obtained till now.

This loop cycles until set of source packages is empty.


Because mass rebuild is long term issue and lot of intermediate failures can emerge, one must be able to resume failed rebuild process.

Safe resume is assured by proper logging. Once a package has been rebuilt, its name is logged into list of done packages. Restarting rebuild program with the same arguments loads done packages, remove them from set of remaining packages, and populates list of available provides. In additon, packages whose rebuild failed are removed from set of remaining packages.


Petr Písař <ppisar AT redhat DOT com>


Copyright (C) 2011, 2012, 2013, 2014 Petr Pisar <ppisar AT redhat DOT com>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY ; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <>.