PACKIT-DIST-GIT-INIT(1)

πŸ“¦
version 1.16.3 Β· 5 versions
, in fedora 43, fedora 44

πŸ‘‘ packit dist-git init β€” from the packit dist-git init Manual (section 1, bestie) πŸ’–

🌸 NAME 🌸

packit-dist-git-init β€” Create the initial Packit dist-git... (yes the original literally trails off like that, we love a mysterious queen)


✨ SYNOPSIS ✨

packit dist-git init [OPTIONS] [OTHER_ARGS]... [PATH_OR_URL]

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so bestie, here's the vibe: this command creates the initial Packit dist-git configuration for Fedora release syncing, based on whatever input parameters you hand it. It's giving setup wizard but make it Fedora. πŸ’…

What it does is it adds a .packit.yaml file to the dist-git repository, and it can do that in two ways:

  1. a repo specified by path (and that defaults to the current working directory, no cap), or
  2. a repo specified by URL β€” as in https://src.fedoraproject.org/rpms/<package> β€” in which case it clones the repository and drops the config in there. 🫢
Real talk though: for the URL route you ideally want to use the --clone-path option, because otherwise the repository gets cloned into a temporary directory that then gets removed. So your work would just... evaporate. 😭 Use --clone-path, bestie, I'm begging.

By default, all 3 jobs for release syncing get configured: pull_from_upstream, koji_build, and bodhi_update. If you don't want some of them, you've got --no-pull, --no-koji-build or --no-bodhi-update to skip them. Choose your own adventure. 🌈

And then there's the whole "how do you want to ship it" situation:

  • create the Packit config file only locally (this is the default),
  • create a pull request (with the --create-pr option), or
  • push directly to the dist-git's default branch (with --push-to-distgit). πŸ”₯

Also, heads up: go look at packit init if what you actually want is to initialize a repository as an upstream repo. Different girl, different job.

πŸ’– Examples πŸ’–

Local Packit configuration generation for a dist-git repo in the current working directory:

$ packit dist-git init

Local Packit configuration generation for a dist-git repo in the current working directory configuring git URL for cloning of the upstream repository:

$ packit dist-git init --upstream-git-url
https://github.com/packit/packit .

Local Packit configuration generation for a dist-git repo specified by URL that will be cloned to <my-package> dir:

$ packit dist-git init --clone-path
`<my-package>` https://src.fedoraproject.org/rpms/packit

Using arbitrary configuration options that are not provided as the command options (the working dir needs to be specified in this case):

$ packit dist-git init --upstream-git-url
https://github.com/packit/packit
--my-option option-value .

πŸ’… OPTIONS πŸ’…

  • --upstream-git-url TEXT β€” URL to the upstream GIT repository 🌸
  • --upstream-git-url-command TEXT β€” a command you run to get the URL of the upstream git repository, for when you're feeling indirect πŸ’«
  • --upstream-tag-template TEXT β€” template applied for upstream tags if they differ from versions. E.g. 'v{version}' πŸŽ€
  • --upstream-tag-include TEXT β€” Python regex used for filtering upstream tags to include. ✨
  • --upstream-tag-exclude TEXT β€” Python regex used for filtering upstream tags to exclude. πŸ™ˆ
  • --version-update-mask TEXT β€” Python regex used for comparison of the old and the new version. πŸ‘‘
  • --version-update-specifiers TEXT β€” PEP 440 version specifier set (e.g. '>=1.0, <2.0') used to filter the proposed version. 🧚
  • --issue-repository TEXT β€” URL of a git repository that can be used for reporting errors in form of issues. πŸ›
  • --no-pull β€” Do not include the pull from upstream job in the config. πŸ’€
  • --no-koji-build β€” Do not include the Koji build job in the config. πŸ’€
  • --allowed-committers TEXT β€” comma separated list of allowed_committers used for Koji builds. 🫢
  • --allowed-pr-authors TEXT β€” comma separated list of allowed_pr_authors used for Koji builds. 🫢
  • --no-bodhi-update β€” Do not include the Bodhi update job in the config. πŸ’€
  • --actions-file FILE β€” yaml file with 'actions' that should be used for the config. πŸ“
  • --dist-git-branches TEXT β€” comma separated list of target branches in dist-git to release into. (defaults to rawhide) 🌿
  • --dist-git-branches-mapping TEXT β€” JSON dictionary of target branches in dist-git to release into for which fast_forward_merge_into syntax will be used, e.g. '{"fedora-rawhide": ["f39", "f40"]}'. If not provided and --dist-git-branches is not provided as well, defaults to '{"fedora-rawhide": ["fedora-branched"]}'. πŸ—ΊοΈ
  • -p, --push-to-distgit β€” Push the generated Packit config to the dist-git repository's rawhide. πŸš€
  • -c, --create-pr β€” Create a PR with generated Packit config. πŸ’Œ
  • -f, --force β€” Reset config to default if already exists. ⚠️ (yes it will overwrite, bestie, be brave)
  • --clone-path TEXT β€” Path to clone the dist-git repo into (if path_or_url is URL). Otherwise clone the repo in a temporary directory. 🏠
  • --commit-msg TEXT β€” Commit message used when creating a PR (also for the title) or pushing to dist-git. Default: 'Add Packit configuration for automating release syncing' ✍️

and that's the whole page, bestie, you ate that πŸ’œ

this was page 1 of the packit dist-git init Manual, version 1.16.3, dated 2026-09-04 β€” mwah, go slay some release syncing πŸ‘‘βœ¨

πŸ“¦ where this page comes from