fbrnch: Build and create Fedora package repos and branches

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Fed Br*nch is a convenient packaging tool for Fedora Packagers, with integration for bugzilla, koji, and bodhi. Features include: - merging and building a package across release branches - automatic parallel builds of sets of packages in dependency order - creating, updating and listing package reviews - requesting repo for new approved packages and branch requests - import srpms from package reviews - progressive copr builds - and many more commands.


[Skip to Readme]

Properties

Versions 0.6.6, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.9, 0.9.1, 0.9.1.1
Change log None available
Dependencies aeson, async, base (<5), bodhi, bugzilla-redhat (>=0.3), bytestring, config-ini, copr, directory (>=1.2.3), email-validate, extra, fedora-dists (>2.0), filepath, http-conduit, http-directory (>=0.1.5), http-query, koji, network-uri, optparse-applicative, pagure, pretty-terminal, process, rpmbuild-order (>=0.4.2), semigroups, simple-cmd (>=0.2.0), simple-cmd-args (>=0.1.6), text, time, typed-process (>=0.2.4.0), utf8-string, xdg-basedir [details]
License GPL-2.0-only
Copyright 2019-2020 Jens Petersen
Author Jens Petersen
Maintainer petersen@fedoraproject.org
Category Utility
Home page https://github.com/juhp/fbrnch
Bug tracker https://github.com/juhp/fbrnch/issues
Source repo head: git clone https://github.com/juhp/fbrnch.git
Uploaded by JensPetersen at 2020-12-17T05:57:17Z

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for fbrnch-0.6.6

[back to package description]

fbrnch - "Fed Brunch"

GPL-2 license

Tool to help Fedora Packagers build package branches and add new packages.

Fedora developers use a lot of time building packages across releases and workflow for adding new packages, etc. The motivation for fbrnch is to help to (semi-)automate common workflows to save time and effort.

fbrnch is distributed under the GPL license version 2 or later.

Description

fbrnch is a Fedora Packager client which tries to automate some common tasks like:

and more.

Usage

Creating new packages/branches

Creating a new package

$ fbrnch create-review [my-new-package]

This will create (or update) an srpm, run rpmlint, then upload it to fedorapeople, perform a scratch build, and open a Review Request in Bugzilla (similar to fedora-create-review).

Update a package review

$ fbrnch update-review [my-new-package]

Similar to create-review: uploads to fedorapeople and posts updated package links to the open package review.

List open package reviews

$ fbrnch reviews

This lists one's open package reviews. Various options like --approved or --created allow filtering by status.

One can also search for reviews with:

$ fbrnch find-review package-name

Request repos

Once a review has been approved

$ fbrnch request-repos

will request repos for approved package(s).

Import a new package

With fbrnch this can be done in one step - no need to clone first.

$ fbrnch import [my-new-package]

will offer to import the srpm from the approved review (similar to fedpkg import). Without any arguments it will offer to import any approved package reviews one by one. The imported package is then built in Koji Rawhide, and the package review updated.

Request branches

Finally you can request branches with

$ fbrnch request-branches

which will confirm which branches you want, unless given.

Optionally a mock build can be done first.

Building

Cloning and switching branch

$ fbrnch clone [package] ...

(one can also clone all one's packages or another user's packages).

$ fbrnch switch f33 [package] ...

You can also git pull:

$ fbrnch pull [package] ...

Package status

$ fbrnch status -B [package]

outputs information about the status of each branch. The status command can also be used with --reviews to check the build status of new packages.

List package bugs:

$ fbrnch bugs [package]

Commit, Merging and Building in Koji

You can commit to the current branch:

$ fbrnch commit

uses any rpm changelog, or you can pass -m "..." or amend with -a.

You can merge branches with:

$ fbrnch merge f32 package

which will offer to merge f33 (or some of it) into f32.

Merging can also be done together with building:

$ fbrnch build f33 package

will offer to merge newer commits from the newer branch. If the branch NVR is also ready pushed and built it will be skipped. Branch builds are pushed to Bodhi.

You can also build all branches:

$ fbrnch build -B package

Scratch builds can also be done:

$ fbrnch scratch master

optionally a different koji target can be given.

You can sort packages by build dependency order:

$ fbrnch sort master package1 package2 package3 package4 ...

Local commands

$ fbrnch prep master package

Build locally:

$ fbrnch local

this works in the current package dir like other commands and one can also specify package.

Locally build and install:

$ fbrnch install package1 package2 package3 ...

Parallel building

fbrnch can automatically sort packages and build them in parallel in Koji in dependency layers (using low-priority background builds to avoid grabbing too many Koji resources).

$ fbrnch parallel --sidetag master pkg-x pkg-y pkg-z pkg-xy pkg-xyz

builds a list of packages in parallel ordered by build dependencies.

Note it requires a sidetag in general, so you need to manage and select them if using more than one per branch with --target.

Other commands

There are more commands like nvr, install-deps, copr.

See fbrnch --help for details and the full list.

Known issues

Motivation and history

This project started off (as "fedbrnch") basically as a simple tool to build a package across branches (ie for current releases). Then bugzilla and Bodhi integration was added, and gradually more features, including some generic commands across packages which had already been done before in fedora-haskell-tools.

Installation

On Fedora the easiest way to install is using my copr repo.

Build from source

  1. Install openssl-devel

  2. Clone the git repo and either:

a) Using stack >= 2.1, in the source dir run: stack install

or

b) With cabal-install (probably 2.4 or later) and cabal-rpm, in the source dir run:

$ cabal-rpm builddep
$ cabal new-install --installdir=~/bin

Contributing

Bug reports, feedback, and fixes are welcome.

See the TODO list and also the many FIXME comments scattered across the source. It is better to ask before embarking on large changes.

Usual disclaimer

This is still in active development. While it is generally works well for me, if it should breaks things for you, you get to keep the pieces. :) But please do report unsupported or unintuitive workflows.