fedpkg(1) - Linux man page

Name

fedpkg - RPM Packaging utility

Synopsis

fedpkg [ global_options ] command [ command_options ] [ command_arguments ]
fedpkg help
fedpkg
command --help

Description

fedpkg is a script to interact with the RPM Packaging system.

Global Options

--config CONFIG, -c CONFIG Specify a config file to use --dist DIST Override the discovered distribution --user USER Override the discovered user name --path PATH Define the directory to work in (defaults to cwd) -v Run with verbose debug output -q Run quietly only displaying errors

Command Overview

fedpkg build [-h] [--nowait] [--target TARGET] [--background] [--skip-tag] [--scratch] [--srpm [SRPM]]

Request build
fedpkg chain-build [-h] [--nowait] [--target TARGET] [--background] package [package ...]
Build current package in order with other packages
fedpkg ci [-h] [-c] [-t] [-m MESSAGE] [-F FILE] [-p] [files [files ...]]
Alias for commit
fedpkg clean [-h] [--dry-run] [-x]
Remove untracked files
fedpkg clog [-h]
Make a clog file containing top changelog entry
fedpkg clone [-h] [--branches] [--branch BRANCH] [--anonymous] module
Clone and checkout a module
fedpkg co [-h] [--branches] [--branch BRANCH] [--anonymous] module
Alias for clone
fedpkg commit [-h] [-c] [-t] [-m MESSAGE] [-F FILE] [-p] [files [files ...]]
Commit changes
fedpkg compile [-h] [--arch ARCH] [--short-circuit]
Local test rpmbuild compile
fedpkg diff [-h] [--cached] [files [files ...]]
Show changes between commits, commit and working tree, etc
fedpkg gimmespec [-h]
Print the spec file name
fedpkg gitbuildhash [-h] build
Print the git hash used to build the provided n-v-r
fedpkg giturl [-h]
Print the git url for building
fedpkg help [-h]
Show usage
fedpkg import [-h] srpm
Import srpm content into a module
fedpkg install [-h] [--arch ARCH] [--short-circuit]
Local test rpmbuild install
fedpkg lint [-h] [--info] [--rpmlintconf RPMLINTCONF]
Run rpmlint against local spec and build output if present. Rpmlint can be configured using the --rpmlintconf/-r option or by setting a .rpmlint file in the working directory
fedpkg local [-h] [--arch ARCH] [--md5]
Local test rpmbuild binary
fedpkg mock-config [-h] [--target TARGET] [--arch ARCH]
Generate a mock config
fedpkg mockbuild [-h] [--root ROOT]
Local test build using mock
fedpkg new [-h]
Diff against last tag
fedpkg new-sources [-h] files [files ...]
Upload new source files
fedpkg patch [-h] [--rediff] suffix
Create and add a gendiff patch file
fedpkg prep [-h] [--arch ARCH]
Local test rpmbuild prep
fedpkg pull [-h] [--rebase] [--no-rebase]
Pull changes from remote repository and update working copy.
fedpkg push [-h]
Push changes to remote repository
fedpkg retire [-h] [-p] [msg]
Retire a package
fedpkg scratch-build [-h] [--nowait] [--target TARGET] [--background] [--arches [ARCHES [ARCHES ...]]] [--srpm [SRPM]]
Request scratch build
fedpkg sources [-h] [--outdir OUTDIR]
Download source files
fedpkg srpm [-h] [--md5]
Create a source rpm
fedpkg switch-branch [-h] [-l] [branch]
Work with branches
fedpkg tag [-h] [-f] [-m MESSAGE] [-c] [-F FILE] [-l] [-d] [tag]
Management of git tags
fedpkg tag-request [-h] [--desc DESC] [--build BUILD]
Submit current build nvr as a releng tag request
fedpkg unused-patches [-h]
Print list of patches not referenced by name in the specfile
fedpkg update [-h]
Submit last build as an update
fedpkg upload [-h] files [files ...]
Upload source files
fedpkg verify-files [-h]
Locally verify %%files section
fedpkg verrel [-h]
Print the name-version-release

Command Reference

fedpkg build

usage: fedpkg build [-h] [--nowait] [--target TARGET] [--background] [--skip-tag] [--scratch] [--srpm [SRPM]]

This command requests a build of the package in the build system. By default it discovers the target to build for based on branch data, and uses the latest commit as the build source.

optional arguments: -h, --help show this help message and exit --nowait Don't wait on build --target TARGET Define build target to build into --background Run the build at a low priority --skip-tag Do not attempt to tag package --scratch Perform a scratch build --srpm [SRPM] Build from an srpm. If no srpm is provided with this option an srpm will be generated from current module content.

fedpkg chain-build

usage: fedpkg chain-build [-h] [--nowait] [--target TARGET] [--background] package [package ...]

Build current package in order with other packages.

example: fedpkg chain-build libwidget libgizmo

The current package is added to the end of the CHAIN list. Colons (:) can be used in the CHAIN parameter to define groups of packages. Packages in any single group will be built in parallel and all packages in a group must build successfully and populate the repository before the next group will begin building.

For example:

fedpkg chain-build libwidget libaselib : libgizmo :

will cause libwidget and libaselib to be built in parallel, followed by libgizmo and then the currect directory package. If no groups are defined, packages will be built sequentially.

positional arguments: package List the packages and order you want to build in

optional arguments: -h, --help show this help message and exit --nowait Don't wait on build --target TARGET Define build target to build into --background Run the build at a low priority

fedpkg ci

usage: fedpkg ci [-h] [-c] [-t] [-m MESSAGE] [-F FILE] [-p] [files [files ...]]

This envokes a git commit. All tracked files with changes will be committed unless a specific file list is provided. $EDITOR will be used to generate a changelog message unless one is given to the command. A push can be done at the same time.

positional arguments: files Optional list of specific files to commit

optional arguments: -h, --help show this help message and exit -c, --clog Generate the commit message from the Changelog section -t, --tag Create a tag for this commit -m MESSAGE, --message MESSAGE Use the given <msg> as the commit message -F FILE, --file FILE Take the commit message from the given file -p, --push Commit and push as one action

fedpkg clean

usage: fedpkg clean [-h] [--dry-run] [-x]

This command can be used to clean up your working directory. By default it will follow .gitignore rules.

optional arguments: -h, --help show this help message and exit --dry-run, -n Perform a dry-run -x Do not follow .gitignore rules

fedpkg clog

usage: fedpkg clog [-h]

This will create a file named "clog" that contains the latest rpm changelog entry. The leading "- " text will be stripped.

optional arguments: -h, --help show this help message and exit

fedpkg clone

usage: fedpkg clone [-h] [--branches] [--branch BRANCH] [--anonymous] module

This command will clone the named module from the configured repository base URL. By default it will also checkout the master branch for your working copy.

positional arguments: module Name of the module to clone

optional arguments: -h, --help show this help message and exit --branches, -B Do an old style checkout with subdirs for branches --branch BRANCH, -b BRANCH Check out a specific branch --anonymous, -a Check out a module anonymously

fedpkg co

usage: fedpkg co [-h] [--branches] [--branch BRANCH] [--anonymous] module

This command will clone the named module from the configured repository base URL. By default it will also checkout the master branch for your working copy.

positional arguments: module Name of the module to clone

optional arguments: -h, --help show this help message and exit --branches, -B Do an old style checkout with subdirs for branches --branch BRANCH, -b BRANCH Check out a specific branch --anonymous, -a Check out a module anonymously

fedpkg commit

usage: fedpkg commit [-h] [-c] [-t] [-m MESSAGE] [-F FILE] [-p] [files [files ...]]

This envokes a git commit. All tracked files with changes will be committed unless a specific file list is provided. $EDITOR will be used to generate a changelog message unless one is given to the command. A push can be done at the same time.

positional arguments: files Optional list of specific files to commit

optional arguments: -h, --help show this help message and exit -c, --clog Generate the commit message from the Changelog section -t, --tag Create a tag for this commit -m MESSAGE, --message MESSAGE Use the given <msg> as the commit message -F FILE, --file FILE Take the commit message from the given file -p, --push Commit and push as one action

fedpkg compile

usage: fedpkg compile [-h] [--arch ARCH] [--short-circuit]

This command calls rpmbuild to compile the source. By default the prep and configure stages will be done as well, unless the short-circuit option is used.

optional arguments: -h, --help show this help message and exit --arch ARCH Arch to compile for --short-circuit short-circuit compile

fedpkg diff

usage: fedpkg diff [-h] [--cached] [files [files ...]]

Use git diff to show changes that have been made to tracked files. By default cached changes (changes that have been git added) will not be shown.

positional arguments: files Optionally diff specific files

optional arguments: -h, --help show this help message and exit --cached View staged changes

fedpkg gimmespec

usage: fedpkg gimmespec [-h]

Print the spec file name.

optional arguments: -h, --help show this help message and exit

fedpkg gitbuildhash

usage: fedpkg gitbuildhash [-h] build

This will show you the commit hash string used to build the provided build n-v-r

positional arguments: build name-version-release of the build to query.

optional arguments: -h, --help show this help message and exit

fedpkg giturl

usage: fedpkg giturl [-h]

This will show you which git URL would be used in a build command. It uses the git hashsum of the HEAD of the current branch (which may not be pushed).

optional arguments: -h, --help show this help message and exit

fedpkg help

usage: fedpkg help [-h]

Show usage.

optional arguments: -h, --help show this help message and exit

fedpkg import

usage: fedpkg import [-h] srpm

This will extract sources, patches, and the spec file from an srpm and update the current module accordingly. It will import to the current branch by default.

positional arguments: srpm Source rpm to import

optional arguments: -h, --help show this help message and exit

fedpkg install

usage: fedpkg install [-h] [--arch ARCH] [--short-circuit]

This will call rpmbuild to run the install section. All leading sections will be processed as well, unless the short-circuit option is used.

optional arguments: -h, --help show this help message and exit --arch ARCH Arch to install for --short-circuit short-circuit install

fedpkg lint

usage: fedpkg lint [-h] [--info] [--rpmlintconf RPMLINTCONF]

Run rpmlint against local spec and build output if present. Rpmlint can be configured using the --rpmlintconf/-r option or by setting a .rpmlint file in the working directory.

optional arguments: -h, --help show this help message and exit --info, -i Display explanations for reported messages --rpmlintconf RPMLINTCONF, -r RPMLINTCONF Use a specific configuration file for rpmlint

fedpkg local

usage: fedpkg local [-h] [--arch ARCH] [--md5]

Locally test run of rpmbuild producing binary RPMs. The rpmbuild output will be logged into a file named .build-%{version}-%{release}.log

optional arguments: -h, --help show this help message and exit --arch ARCH Build for arch --md5 Use md5 checksums (for older rpm hosts)

fedpkg mock-config

usage: fedpkg mock-config [-h] [--target TARGET] [--arch ARCH]

This will generate a mock config based on the buildsystem target

optional arguments: -h, --help show this help message and exit --target TARGET Override target used for config --arch ARCH Override local arch

fedpkg mockbuild

usage: fedpkg mockbuild [-h] [--root ROOT]

This will use the mock utility to build the package for the distribution detected from branch information. This can be overridden using the global --dist option. Your user must be in the local "mock" group.

optional arguments: -h, --help show this help message and exit --root ROOT Override mock root

To generate a mock config for the current branch use mock-config target and save it to /etc/mock/<branch>-candidate-<arch>.cfg

fedpkg new

usage: fedpkg new [-h]

This will use git to show a diff of all the changes (even uncommited changes) since the last git tag was applied.

optional arguments: -h, --help show this help message and exit

fedpkg new-sources

usage: fedpkg new-sources [-h] files [files ...]

This will upload new source files to the lookaside cache and remove any existing files. The "sources" and .gitignore file will be updated for the new file(s).

positional arguments: files

optional arguments: -h, --help show this help message and exit

fedpkg patch

usage: fedpkg patch [-h] [--rediff] suffix

Create and add a gendiff patch file.

positional arguments: suffix Look for files with this suffix to diff

optional arguments: -h, --help show this help message and exit --rediff Recreate gendiff file retaining comments Saves old patch file with a suffix of ~

Patch file will be named: package-version-suffix.patch and the file will be added to the repo index

fedpkg prep

usage: fedpkg prep [-h] [--arch ARCH]

Use rpmbuild to "prep" the sources (unpack the source archive(s) and apply any patches.)

optional arguments: -h, --help show this help message and exit --arch ARCH Prep for a specific arch

fedpkg pull

usage: fedpkg pull [-h] [--rebase] [--no-rebase]

This command uses git to fetch remote changes and apply them to the current working copy. A rebase option is available which can be used to avoid merges.

optional arguments: -h, --help show this help message and exit --rebase Rebase the locally committed changes on top of the remote changes after fetching. This can avoid a merge commit, but does rewrite local history. --no-rebase Do not rebase, override .git settings to automatically rebase

See git pull --help for more details

fedpkg push

usage: fedpkg push [-h]

Push changes to remote repository.

optional arguments: -h, --help show this help message and exit

fedpkg retire

usage: fedpkg retire [-h] [-p] [msg]

This command will remove all files from the repo and leave a dead.package file.

positional arguments: msg Message for retiring the package

optional arguments: -h, --help show this help message and exit -p, --push Push changes to remote repository

fedpkg scratch-build

usage: fedpkg scratch-build [-h] [--nowait] [--target TARGET] [--background] [--arches [ARCHES [ARCHES ...]]] [--srpm [SRPM]]

This command will request a scratch build of the package. Without providing an srpm, it will attempt to build the latest commit, which must have been pushed. By default all approprate arches will be built.

optional arguments: -h, --help show this help message and exit --nowait Don't wait on build --target TARGET Define build target to build into --background Run the build at a low priority --arches [ARCHES [ARCHES ...]] Build for specific arches --srpm [SRPM] Build from an srpm. If no srpm is provided with this option an srpm will be generated from current module content.

fedpkg sources

usage: fedpkg sources [-h] [--outdir OUTDIR]

Download source files.

optional arguments: -h, --help show this help message and exit --outdir OUTDIR Directory to download files into (defaults to pwd)

fedpkg srpm

usage: fedpkg srpm [-h] [--md5]

Create a source rpm.

optional arguments: -h, --help show this help message and exit --md5 Use md5 checksums (for older rpm hosts)

fedpkg switch-branch

usage: fedpkg switch-branch [-h] [-l] [branch]

This command can create or switch to a local git branch. It can also be used to list the existing local and remote branches.

positional arguments: branch Switch to or create branch

optional arguments: -h, --help show this help message and exit -l, --list List both remote-tracking branches and local branches

fedpkg tag

usage: fedpkg tag [-h] [-f] [-m MESSAGE] [-c] [-F FILE] [-l] [-d] [tag]

This command uses git to create, list, or delete tags.

positional arguments: tag Name of the tag

optional arguments: -h, --help show this help message and exit -f, --force Force the creation of the tag -m MESSAGE, --message MESSAGE Use the given <msg> as the tag message -c, --clog Generate the tag message from the spec changelog section -F FILE, --file FILE Take the tag message from the given file -l, --list List all tags with a given pattern, or all if not pattern is given -d, --delete Delete a tag

fedpkg tag-request

usage: fedpkg tag-request [-h] [--desc DESC] [--build BUILD]

This command files a ticket with release engineering, usually for a buildroot override. It will discover the build n-v-r automatically but can be overridden.

optional arguments: -h, --help show this help message and exit --desc DESC Description of tag request --build BUILD Override the build n-v-r

fedpkg unused-patches

usage: fedpkg unused-patches [-h]

Print list of patches not referenced by name in the specfile.

optional arguments: -h, --help show this help message and exit

fedpkg update

usage: fedpkg update [-h]

This will create a bodhi update request for the current package n-v-r.

optional arguments: -h, --help show this help message and exit

fedpkg upload

usage: fedpkg upload [-h] files [files ...]

This command will add a new source archive to the lookaside cache. The sources and .gitignore file will be updated with the new file(s).

positional arguments: files

optional arguments: -h, --help show this help message and exit

fedpkg verify-files

usage: fedpkg verify-files [-h]

Locally run 'rpmbuild -bl' to verify the spec file's %files sections. This requires a successful run of the 'compile' target.

optional arguments: -h, --help show this help message and exit

fedpkg verrel

usage: fedpkg verrel [-h]

Print the name-version-release.

optional arguments: -h, --help show this help message and exit

See Also

https://fedorahosted.org/fedora-packager/