Video summary
Jens Peterson presents a collection of essential tools designed to streamline Fedora packaging workflows, with a primary focus on F Branch, a utility that semi-automates the repetitive process of updating packages across multiple branches. Originally conceived to make package maintenance more reliable while keeping human oversight in the loop, F Branch 1.7 introduces significant enhancements such as support for minor branches like Apple 10.0 and improved merge strategies from origin. The tool now performs rigorous pre-flight checks, verifying commit access and group permissions before attempting builds, and it intelligently manages dependencies by ordering them automatically without relying on potentially outdated repository queries. Additionally, recent updates allow users to request branches that wait for packages to be available in Copr, preventing build failures caused by timing issues, while new features like the `unspec` command offer flexibility for special packaging scenarios.
Beyond F Branch, Peterson highlights several other utilities that address specific pain points in the Fedora ecosystem, including DNF-Repo and DL-Fedora. DNF-Repo acts as a powerful wrapper for DNF commands, enabling users to dynamically enable or disable repositories based on patterns without needing sudo privileges, which is particularly useful for managing large numbers of enabled repos efficiently. Similarly, DL-Fedora simplifies the download of ISO images for various Fedora editions, spins, and respins, while also improving file management by organizing downloads into subdirectories to avoid cluttering the main directory with partial files. These tools collectively aim to reduce manual effort and minimize errors in daily tasks, such as tracking build progress or querying bugs via generated URLs, making the overall development environment more efficient for contributors.
The presentation concludes with a discussion on the underlying technologies and future directions of these projects, noting that most are written in Rust rather than Python due to performance considerations and the author's personal preference, though he welcomes contributions and reimplementations in other languages. Peterson emphasizes that while some aspects like CMake dependency resolution are not yet perfect, the tools continue to evolve based on community feedback and practical needs. He also mentions related projects like fedrq for repository querying and DNF-simple for more concise output formatting, showcasing a broader ecosystem of small, focused utilities that enhance the Fedora packaging experience. Ultimately, these tools represent an ambitious effort to improve reliability and productivity in a complex environment where repetitive work can easily lead to mistakes or inefficiencies.
Read the full video transcript
Welcome to this talk about tools. Um
my name is Jens Peterson. Um
yeah, I I think that tooling is really
important and uh yeah, maybe it's not
one of our biggest strengths in Fedora,
but um
so I spend some of my
spare time writing some tools. Um I
thought I'd talk about doing them today.
Um yeah so quite a few maybe it's a bit
ambitious but I listed quite a few here
um
mainly I wanted to talk about app branch
a bit and some of the other tools like
DL Fedora DL DNF repo um
yeah maybe I'll just start with this CLI
tool
reverb
So it's kind of surprising we we don't
actually this this is actually the only
I think CLI tool for u
for creating pure we have in fedora this
packaged in fedora. Um
so yeah this can this defaults to using
the disc kit. So you can use this it's a
simple tool to like list packages. It
supports globing and so on. So
yeah, you can also count the number of
packages which I kind of like sometimes
to uh
you can see there's about 700 Rust
packages in Fedora now
3,100
plus Python packages and so on. Um yeah,
but you can also actually um
yeah, you can also do things like list
groups. Um you can also list packages by
user or by groups. So you can list all
the
packages for a sync or something like
that. Um
yeah um well this the actual listing
functionality is already integrated into
F branch. So yeah you don't actually
need to use um
so if you use por list it you'll
actually prefix the packages with this
RPM name space which is kind of annoying
sometimes.
use sorry it's a very long list.
So if you use FBS it doesn't prefix them
with RPM. So anyway
yeah it's probably enough on that. Um
so let me talk a bit more about F
branch. So, FPM started off as a very
simple idea. Um, there's a lot of
repetitive work in packaging. Um, say
you have a new version of a package you
want to update to, then uh, you know,
you have to update your spec file
obviously and commit the changes, add
the sources
uh um, then push uh your commits and uh,
start your build and then it get pushed
to bod then you also have to do it again
say you want to update all the branches
like 42 and 41 and apple and so on and
it's [snorts] very repetitive process so
the idea of initial idea of f branch was
just to have a way to kind of
semi-automate the process to make it
more reliable so
um yeah just also keep the human in the
loop so it's not sort of completely
blinding
blindly running. Um
[snorts] yeah, so I just yesterday
released FB branch 1.7 and built it for
rawhide. Um
I think um [snorts]
yeah.
>> [snorts]
>> So maybe yeah, maybe we can build um
build it for 42 since I only built it
for raw height.
Um yeah, there's there's a couple of
dependencies which are also needed uh
also being updated at the same time. So
this is a parallel build um
with um yeah these two libraries um and
the dependent auto
automatically be sorted into dependency
order. So, and this minus s means that
it's using a side branch. Um
this case, um yeah, it's manually
prompting me to merge the changes into
the F42 branches.
[snorts]
>> [snorts]
>> So yes, this is now pushing the builds
to code and it'll build the two
libraries in parallel
and then wait for those to
in the build before building the branch
package.
Um
so yeah I mean having fant is
particularly useful for packages we have
very large package sets um
so yeah not so it supports not only
building across branches but also yeah
so iterating over many packages
>> [snorts]
>> Okay. And uh yeah, there's actually a
lot of commands. So I'm not obviously
time to talk about all of those today.
Um you can ask questions. Um
maybe I'll continue and we can return um
[snorts]
more detail.
time later.
So you have if you have questions do
raise your hand and I can take short
questions during the talk.
So yeah what's new in 1.7 um actually
the biggest thing is now it supports um
Apple minor branches like Apple 10.0
um also now merges are done from origin
which was previous not the case. So
previously you
could merge in unpushed commits from a
new branch. Um you decided to
enforce this to make things more
consistent.
Another nice new feature is that um if
you have multiple site tags for a branch
now
using the side tag uh sorry the side tag
option will now prompt you to choose
which one you want to use [snorts]
and already existing open site tags.
There's also a new experimental mock
install option which allow you to
install packages that you've built via
mock locally.
Um yeah, another nice feature I think um
is the request branches command now
also.
So yeah, so F branch tries to check lots
of things before doing things that might
fail. So in this case it checks if you
have permission to make a branch which
request to have a branch made.
Previously it only did that as a sort of
user query. It would check if you have
the commit access, but now it also
checks if you have access via a group
like a seek something.
Um,
yeah.
Yeah, there's a few. Yeah, another
recent feature is that it when you
request branches, it now also waits for
the um um package to be available in CG.
So, um you won't get a build failure if
you try to build it too quickly. Um
if you're requesting branches for many
packages, it will now do all the
requests first and then check the cg
afterwards to save time. Um
I've changed the default review package
mode to this sort of streamline
interactive mode now which I quite like.
Um
it's also uninstall
complaint that crates were not
recognized as archives. So that's fixed.
Another good feature though it only
works for a couple of weeks per year is
that it now checks for o branches
approaching. So if you're like less than
a week away from it will warn you not to
build
this was a previous release
had support for local local builds from
detached head which I think is something
that package can't do.
Um
[snorts]
and
there's oh there's also unspec command
which might surprise people but yeah
this is occasionally useful if you have
some package that for some
special reason you want to unspec
>> [snorts]
>> Yeah, last year the 1.5 release was
quite a big thing because the change
user changed from PDC to Bodhi for
release
metadata. So,
[snorts]
Yeah, that release also introduced uh
the use of chain build style args with
colons between different
dependency layers. So that's
requested by people.
Okay.
>> [snorts]
>> All right. Um,
under the hood, um, also uses this RPM
build order, uh, tool, which is also a
library, um, which is what it actually
uses to order dependencies. It's not
quite perfect. works fairly well. Um I
think the biggest deficiency may be
around CMake dependencies. I mean build
dependencies. Um
yeah.
[snorts]
Yes.
>> Yes, it does. Yeah. it generates some of
your
BR summ
yeah but it's not perfect I mean they so
maybe I should add a bit more about so
this RPM build and also f branch when
it's trying to do dependency ordering it
doesn't use any repo queries it's just
trying to use the raw
sources on your in your package like
your spec files and so on so the idea
being that well potentially the repo
queries might be out of date in the
sense there may be dependency changes.
Yeah, obviously in many cases that
wouldn't be the case. So you could maybe
maybe have an option to defer to repo
query but also reper is not particularly
fast. So if you have like hundreds of
thousands of packages
directed
there's a few libraries that are being
used. So one is this Fedora releases
library which I I briefly mentioned so
it's also being used by um DL Fedora and
um
here
so actually the Apple 10.0
supported actually mainly here but
anyway um
And this this select RPMs is kind of
interesting. It's also used by the CGI
tool install command. Um this lets you
select which kind of sub packages you
want to install. Um so if you do
[clears throat]
Um
so yeah nearly all the FB commands have
their own help and they all have their
own help. So
so here for example um you can
you can use globing here too. So you can
specify which sub packages to include or
exclude
for some like packages where you don't
say don't want to install the devel
package or you don't want to install
some subset of packages you can
control
Okay, maybe I'll move on. Um, this DNF
repo, which I find quite useful. I'm not
sure many people are aware of it. Um,
especially allows you to control which
repos are enabled. a particular DNF
invocation. So I don't know I I have
quite a few proper repos say and maybe I
turn them off by default and then I only
update them sort of periodically so save
some time um [snorts]
yeah and
yeah you can use it with any DNF command
obviously so it's just a wrapper also it
combine it's also avoid having to sudo
so it's sort of
Oh yeah, it does pattern matching on
repo repo. So you don't need to type out
the full repo. You can just type a few
letters of sub string of the repo name
to
>> [snorts]
>> So yeah, by default it just lists all
the enabled. In this case I have the VS
code and all a bunch of records and
stuff
for example could just enable all copper
records like this. Um this case it just
tells you what it's going to do.
Something like this
going to do that.
conversely you can also disable repo. So
you can
so say you had all the copy enabled you
could then say I don't want to use any
copy repos in this
command
[snorts]
right to
I I use this quite a bit. Um
the two most noble things are there's
this progress command which lets you um
see
what this is
>> [clears throat]
>> So this just tracks a ongoing build. It
just looks at the size of the build log
files. So for longer builds sometimes
it's nice to see how
progress.
But yeah, I think the code install
command tool install command is quite
useful. Um, [snorts]
>> right.
Um, not exactly that. I think I've
thought of it, but um,
[snorts]
>> yeah. Um, true.
I can't do it exactly. I think
>> right. Yeah, I get your idea. It's Yeah,
it's not a bad idea. I think it could be
done.
[snorts]
>> Well, but it's not Yeah,
>> but it's not Yeah, that's the thing. So,
you can get
>> right. Yeah. And also I also use this in
F branch. If there's a failure, it'll
it'll print out the tail of the build
log um or the root log if it determines
that it's probably the root log.
I guess I could
since I built this yesterday
install.
Okay, so now it's actually asking me if
I want to install these. It's to update
all these packages, but [snorts] I only
want to
to update the
packages.
Um,
so download
Um,
okay.
There's also this find command which is
kind of cute. It allows you to write
things like um
find my last fail. So find the last
bit. what it can do. But it has some
different keywords
[snorts]
to get something.
Um,
[snorts] maybe a little bit about the
fedora. Um
[snorts]
a few minutes left I guess. So this tool
is for downloading ISO images. Um
yeah,
so yeah, it supports quite a few um
most of the additions and spins and
whatnot and also respins.
It has support for central stream live
images
that you've downloaded with QMU.
[snorts]
One of the things I in the last version
stages of downloads in a sort of a
subdirectory because I often find I
start downloading something and then oh
maybe it's too slow I just get aborted
download but then would would leave a
partial download in the main download
directory which is not nice
yeah
one thing is that the like the naming of
the ISO files is quite
somewhat random or I don't know also the
move the key and so on. It's a bit of a
effort to sometimes uh keep up all these
changes but
try to do that
[snorts]
for query but I probably won't talk
about it
this if you're using
RP
I found is really useful. It's very
simple thing. It just pins a currently
deployed um current deployment. So
yeah, if you want to kind of preserve
that um
finished my talk now
this one is pinned here as you can see.
I'm actually running this one. So I can
do
this current. That's all it does
basically. Very simple, but it's a bit
tedious to write all the commands.
And um
yeah, this is also quite nice. Um this
is just a tool for querying bugs. It
just generates a URL based on
some keywords.
Yeah, I' run out of time. So there's
also [snorts] DF simple. I prefer the I
don't know. I find the default DF output
quite difficult to pass. So
Sorry
[snorts] just provides a rather more
concise more or less presides the same
info but in just four lines.
Sorry.
Um okay there's a few minutes for
questions.
I can relay the question.
Right.
>> No, you're right. Yeah.
Um is true. Um that would be better. I
agree. Um I mean one part of it is
language. So yeah I mean so the sort of
elephant in the room that these are all
written in hasll. So it's a bit of a
yeah that's one thing. So firstly I'm
very happy for people to steal any
features and reimplement them or to yeah
I don't really do heavy sort of deep
Python myself so it's one limitation. Um
you're right I I feel like fat package
has also improved a bit lately. I
whether it's at all influenced by but
yeah I also think of fbres as kind of a
testing ground for future possible
features but um no you're not wrong I
agree it would be good to
>> no yeah no it's a good question yeah
there's also yeah I should also mention
the there's also fed RQ another repro
query um I didn't talk much about
Any
questions?
>> Oh, that's a good question. Thanks. Um
yes. Um, see,
so it's not super friendly. But yeah, it
sort of basically does the animal
version of the um JSON. So this is bash
for example. You can see the
name here and so
thank you much.
[applause]