This is a detailed documentation for the update functionality of packit. The command creates a new pull request in Fedora using a selected or latest upstream release.
Place a file called
packit.yaml in the root of your upstream repository.
Place a spec file into your upstream project (and make sure that
specfile_path in the config has a correct value).
Create a new upstream release. The spec file needs to be included in the ref for upstream release, because packit checks out the tag for the upstream release before copying files downstream.
Starting with packit 0.5.2 and later, you only need to set a single token to interact with dist-git. You needed two in the past. Please populate your local config for packit so it can talk to the remote services:
# you can obtain the token over here: https://github.com/settings/tokens github_token: 123 # and this one right here: https://src.fedoraproject.org/settings#nav-api-tab pagure_user_token: 456
packit propose-updatein a working directory of your upstream repository:
$ git clone https://github.com/user-cont/colin.git $ cd colin $ packit propose-update using "master" dist-git branch syncing ./colin.spec INFO: Downloading file from URL https://files.pythonhosted.org/packages/source/c/colin/colin-0.3.0.tar.gz 100%[=============================>] 3.18M eta 00:00:00 downloaded archive: /tmp/tmpaanrpgjz/colin-0.3.0.tar.gz uploading to the lookaside cache PR created: https://src.fedoraproject.org/rpms/colin/pull-request/4
Usage: packit propose-update [OPTIONS] [PATH_OR_URL] [VERSION] Release current upstream release into Fedora PATH_OR_URL argument is a local path or a URL to the upstream git repository, it defaults to the current working directory VERSION argument is optional, the latest upstream version will be used by default Options: --dist-git-branch TEXT Target branch in dist-git to release into. --dist-git-path TEXT Path to dist-git repo to work in. Otherwise clone the repo in a temporary directory. --local-content Do not checkout release tag. Use the current state of the repo. --force-new-sources Upload the new sources also when the archive is already in the lookaside cache. -h, --help Show this message and exit.