|
| 1 | +# Smarter package maintenance with Packit (Flock 2025) |
| 2 | + |
| 3 | +## 🎯 Goal |
| 4 | + |
| 5 | +The main goal of this workshop is to **set up a complete Fedora release pipeline** for your package using the following Packit jobs: |
| 6 | + |
| 7 | +- `pull_from_upstream` (alternatively `propose_downstream`, if you already use Packit in upstream) |
| 8 | +- `koji_build` |
| 9 | +- `bodhi_update` |
| 10 | + |
| 11 | +By the end of this session, you should have a working configuration that automates these steps in the Fedora package release lifecycle. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## 🛠️ Instructions |
| 16 | + |
| 17 | +### Prerequisites |
| 18 | + |
| 19 | +Ensure you have a **Fedora package** you maintain/co-maintain. Ideally, pick one that has a **pending upstream release**, as this allows trying things out easily. |
| 20 | + |
| 21 | +### Setup |
| 22 | + |
| 23 | +For detailed setup instructions, you can follow [the documentation](https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding#setup). You can find a brief summary below. |
| 24 | + |
| 25 | +#### Create a working branch |
| 26 | + |
| 27 | +Before creating the configuration file, review [this section on how you'll be trying out the setup](https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding#release-syncing). |
| 28 | +Based on that, create a new branch in your dist-git repository (it's also recommended to do this in fork) for your Packit configuration |
| 29 | +(e.g., `packit-setup`). |
| 30 | + |
| 31 | +#### Create the Packit configuration file |
| 32 | + |
| 33 | +Packit uses a YAML configuration file, named `(.)packit.yaml`, to define its behavior. This file needs to be placed in your **dist-git repository**, |
| 34 | +in general in the `rawhide` branch, but for experimentation during the workshop in a new branch, to be able to try running the jobs from an open pull request. |
| 35 | + |
| 36 | +Then, the simplest ways of creating the config: |
| 37 | + |
| 38 | +- Use `packit dist-git init` (requires `packit` installed locally, e.g., `dnf install packit`) |
| 39 | + |
| 40 | + 1. In your cloned dist-git repository, switch to the target branch. |
| 41 | + 2. Run the command: |
| 42 | + ```bash |
| 43 | + packit dist-git init |
| 44 | + ``` |
| 45 | + |
| 46 | +- Use our template |
| 47 | + |
| 48 | + 1. Manually create a `.packit.yaml` file in your target branch. |
| 49 | + 2. Copy the content from the [Downstream configuration template](https://packit.dev/docs/configuration/downstream_configuration_template#template) and adjust it to your needs. |
| 50 | + |
| 51 | +#### Push your config |
| 52 | + |
| 53 | +Push your config to the dist-git repository target branch and open a pull request. |
| 54 | + |
| 55 | +#### Monitoring of the package |
| 56 | + |
| 57 | +For the `pull_from_upstream` job to work, the monitoring needs to be enabled for the package, see [details](https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding#2-monitoring-of-the-package). |
| 58 | + |
| 59 | +### Test your setup |
| 60 | + |
| 61 | +Now, verify that the Packit jobs are working correctly. |
| 62 | +Everything on how to test it out is described [here](https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding#how-to-try-that-for-real). |
| 63 | + |
| 64 | +Check the [Packit service dashboard](https://dashboard.packit.dev/jobs/pull-from-upstream) for detailed feedback and logs from your Packit jobs, |
| 65 | +more information also [here](https://packit.dev/docs/fedora-releases-guide/dist-git-onboarding#ui). |
| 66 | + |
| 67 | +--- |
| 68 | + |
| 69 | +## 📚 Video materials |
| 70 | + |
| 71 | +For a visual walkthrough and more in-depth explanations of the Packit jobs and concepts, please refer to our previous workshop materials: |
| 72 | + |
| 73 | +- [Packit workshops materials](https://packit.dev/docs/workshops-materials) |
0 commit comments