Maintain and improve your packages with set of tools.
Rebase-helper is a tool which helps package maintainers with updating package to the latest upstream version. It automates a lot of manual tasks the package maintainer usually does, when a new upstream version of a package is released.
Begin installation on Fedora using the dnf
command:
sudo dnf install -y rebase-helper
It requires several other programs like abipkgdiff
, rpmdiff
, mock
, fedpkg
, meld
, etc.
These programs are installed automatically as dependencies of rebase-helper.
Note: rebase-helper is also available as EPEL-7 package. Feel free to use it on CentOS and RHEL systems.
Rebase-helper workflow can be summarized in following steps:
old
sources and a second one using the new
sources. Available build tools are mock
, rpmbuild
, fedpkg
.
new
RPMs build fails, downloads logs like build.log and root.logpkgdiff
, rpmdiff
, abipkgdiff
. Rebase-helper compares old and new packages and reports results.Let’s say, we want to rebase a package foobar from foobar-1.2.0
to foobar-1.2.1
.
To update to the latest upstream version execute command:
rebase-helper 1.2.1
If you do not want to be bothered, use option --non-interactive
After rebase-helper finishes, check the output.
This chapter demonstrates how to include rebase-helper in your upstream monitoring service. If you would like to integrate rebase-helper into your upstream monitoring services, this chapter is for you. Rebase-helper provides an API which you can use either directly from Python, or directly from the command line.
Example of patching new sources and starting scratch builds with fedpkg. This returns task_ids. The bash equivalents are included for comparison:
Python API
from rebasehelper.application import Application
cli = CLI([‘--non-interactive, ‘--builds-nowait’, ‘-buildtool’, ‘fedpkg’, upstream_version])
rh = Application(cli)
rh.set_upstream_monitoring() # Switch rebase-helper to upstream release monitoring mode.
rh.run()
BASH
rebase-helper --non-interactive --builds-nowait --buildtool fedpkg upstream_version
Python API
cli = CLI([‘--non-interactive, ‘--builds-nowait’, ‘--fedpkg-build-tasks old_id,new-id])
rh.run() # Downloads RPMs, logs and runs checkers and provides logs.
rh.get_rebasehelper_data() # Get all information about the results
BASH
rebase-helper --non-interactive --builds-nowait --fedpkg-build-tasks old_id,new-id