<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>The Wombelix Post - Packit</title><link href="https://dominik.wombacher.cc/" rel="alternate"/><link href="/feeds/tag_packit.atom.xml" rel="self"/><id>https://dominik.wombacher.cc/</id><updated>2024-05-05T00:00:00+02:00</updated><entry><title>Fedora dist-git Packit onboarding</title><link href="https://dominik.wombacher.cc/posts/fedora-dist-git-packit-onboarding.html" rel="alternate"/><published>2024-05-05T00:00:00+02:00</published><updated>2024-05-05T00:00:00+02:00</updated><author><name>Dominik Wombacher</name></author><id>tag:dominik.wombacher.cc,2024-05-05:/posts/fedora-dist-git-packit-onboarding.html</id><summary type="html">&lt;!-- SPDX-FileCopyrightText: 2024 Dominik Wombacher &lt;dominik@wombacher.cc&gt; --&gt;
&lt;!--  --&gt;
&lt;!-- SPDX-License-Identifier: CC-BY-SA-4.0 --&gt;
&lt;p&gt;Packit, oh my god, that's a tool and service that gave
me a pretty hard time to understand how it works.
Not necessarily because it's a complicated tool.
But it  ... &lt;a class="read-more" href="/posts/fedora-dist-git-packit-onboarding.html"&gt; [read more]&lt;/a&gt;&lt;/p&gt;</summary><content type="html">&lt;!-- SPDX-FileCopyrightText: 2024 Dominik Wombacher &lt;dominik@wombacher.cc&gt; --&gt;
&lt;!--  --&gt;
&lt;!-- SPDX-License-Identifier: CC-BY-SA-4.0 --&gt;
&lt;p&gt;Packit, oh my god, that's a tool and service that gave
me a pretty hard time to understand how it works.
Not necessarily because it's a complicated tool.
But it expects a good portion of background knowledge how
things work in Fedora and the specific wording.
If you are new and make your first steps, it becomes
very challenging and frustrating to get started.&lt;/p&gt;
&lt;p&gt;So first, what's &lt;a class="reference external" href="https://packit.dev"&gt;Packit&lt;/a&gt;?
Very simplified: Packit get triggered
when a new version of a software is released. It can then trigger
package builds. Or create PRs in Fedora packages to update them.
The main goal is to reduce the work maintainer have to keep Fedora
packages up to date.&lt;/p&gt;
&lt;p&gt;My first false assumption was that Packit always requires
to have a configuration in the repository of the upstream project.
Another mistake was that Packit will help me to test and build packages
during development.
You can probably imagine that those two misunderstandings lead to a
good portion of confusion and wasted time.&lt;/p&gt;
&lt;p&gt;So how to benefit from Packit if you don't control the upstream project
and they are not interested to onboard their repository to the Packit Service?
Fedora runs &lt;a class="reference external" href="https://www.release-monitoring.org"&gt;Release Monitoring&lt;/a&gt;
a service that checks for new releases in configured projects on a regular basis.
If there is one, it will publish a message into Fedora Messaging. A RabbitMQ based
messaging service that allows other services to react on events. Packit will pick up
such an event and check if there is a packit configuration file in the &lt;a class="reference external" href="https://src.fedoraproject.org"&gt;dist-git&lt;/a&gt;
package repo. If that's the case, Packit will execute the configured actions.&lt;/p&gt;
&lt;p&gt;So for example, Packit creates a PR in the package repo.
The PR bumps the package version and adds a changelog entry.
Package maintainer can add additional changes
to the PR if necessary and upload the new source file into the &lt;a class="reference external" href="https://fedoraproject.org/wiki/Package_Source_Control#Lookaside_Cache"&gt;lookaside cache&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then your job boils down to merge the PR into the rawhide branch.
If correctly configured, Packit will pick up this event,
remember everything in the Fedora world becomes an event in the Fedora Messaging bus,
and trigger the build. If that build is successful the update is triggered
and the package becomes available in rawhide.
Next, if you have other branches you want to make the package available,
you merge it and then again Packit picks up the event, starts a build and the update.&lt;/p&gt;
&lt;p&gt;This is a massive time saver already, even if you still have a couple of steps to do.
That's the workflow I prefer, but you can of course adjust it and
let Packit do even more in an automated way. The decision is up to you :)&lt;/p&gt;
&lt;p&gt;What I explained here is just one part of what Packit can do. I encourage you to
explore the project and &lt;a class="reference external" href="https://packit.dev/docs"&gt;documentation&lt;/a&gt; to dive deeper.&lt;/p&gt;
&lt;p&gt;For me it was a massive &amp;quot;AHA&amp;quot; moment when I had my first Packit config working and saw the magic happen :)&lt;/p&gt;
&lt;p&gt;Following the &lt;code&gt;.packit.yaml&lt;/code&gt; file I prepared for the first Fedora package I'm going to release:&lt;/p&gt;
&lt;pre class="code yaml literal-block"&gt;
&lt;span class="pygments-c1"&gt;# See the documentation for more information:&lt;/span&gt;&lt;span class="pygments-w"&gt;
&lt;/span&gt;&lt;span class="pygments-c1"&gt;# https://packit.dev/docs/configuration/&lt;/span&gt;&lt;span class="pygments-w"&gt;

&lt;/span&gt;&lt;span class="pygments-nt"&gt;upstream_project_url&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;https://github.com/aws/aws-ec2-instance-connect-config&lt;/span&gt;&lt;span class="pygments-w"&gt;
&lt;/span&gt;&lt;span class="pygments-nt"&gt;upstream_package_name&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;aws-ec2-instance-connect-config&lt;/span&gt;&lt;span class="pygments-w"&gt;
&lt;/span&gt;&lt;span class="pygments-nt"&gt;downstream_package_name&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;ec2-instance-connect&lt;/span&gt;&lt;span class="pygments-w"&gt;

&lt;/span&gt;&lt;span class="pygments-nt"&gt;jobs&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-nt"&gt;job&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;pull_from_upstream&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;trigger&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;release&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;# Keeping dist-git branches non-divergent&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;# Requirs manual local merge from rawhide to stable release branches&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;# https://packit.dev/docs/fedora-releases-guide#keeping-dist-git-branches-non-divergent&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;dist_git_branches&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;fedora-rawhide&lt;/span&gt;&lt;span class="pygments-w"&gt;

&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-nt"&gt;job&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;koji_build&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;trigger&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;commit&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;allowed_pr_authors&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;packit&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;all_admins&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;all_committers&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-s"&gt;'&amp;#64;cloud-sig'&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-c1"&gt;# string with &amp;#64; needs quotes to be valid yaml&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-nt"&gt;allowed_committers&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;all_admins&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;all_committers&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-s"&gt;'&amp;#64;cloud-sig'&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-c1"&gt;# string with &amp;#64; needs quotes to be valid yaml&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-nt"&gt;dist_git_branches&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;fedora-all&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;epel-all&lt;/span&gt;&lt;span class="pygments-w"&gt;

&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-nt"&gt;job&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;bodhi_update&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;trigger&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;commit&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;allowed_builders&lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;packit&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;all_admins&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;all_committers&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-s"&gt;'&amp;#64;cloud-sig'&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-c1"&gt;# string with &amp;#64; needs quotes to be valid yaml&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-nt"&gt;dist_git_branches&lt;/span&gt;&lt;span class="pygments-p"&gt;:&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;fedora-branched&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-c1"&gt;# rawhide updates are created automatically&lt;/span&gt;&lt;span class="pygments-w"&gt;
    &lt;/span&gt;&lt;span class="pygments-p-Indicator"&gt;-&lt;/span&gt;&lt;span class="pygments-w"&gt; &lt;/span&gt;&lt;span class="pygments-l-Scalar-Plain"&gt;epel-all&lt;/span&gt;&lt;span class="pygments-w"&gt;
&lt;/span&gt;
&lt;/pre&gt;
</content><category term="Linux"/><category term="Packit"/><category term="Fedora"/><category term="Packages"/><category term="Packaging"/><category term="dist-git"/></entry></feed>