Linux command
copr-cli 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show the authenticated user
copr-cli whoami
Create a new COPR project
copr-cli create [project_name] --chroot [fedora-rawhide-x86_64] --chroot [epel-9-x86_64]
Build a package from a local SRPM
copr-cli build [project_name] [package.src.rpm]
Build from an SRPM URL
copr-cli build [project_name] [https://example.com/package.src.rpm]
Build from a PyPI package
copr-cli buildpypi [project_name] --packagename [requests]
Watch an in-progress build
copr-cli watch-build [build_id]
List your COPR projects
copr-cli list
Check build status
copr-cli status [build_id]
Cancel a running build
copr-cli cancel [build_id]
Download built packages
copr-cli download-build [build_id]
Delete a project
copr-cli delete [project_name]
说明
copr-cli is the command-line client for Fedora's COPR build system. It allows developers to create projects, submit builds, manage repositories, and automate package distribution without using the web interface. The tool handles the complete package lifecycle: creating projects with specified build targets (chroots), submitting source RPMs for building, monitoring build progress, and downloading the resulting packages. It supports building from local files, URLs, or SCM repositories. copr-cli is essential for CI/CD pipelines that automatically build and publish packages to COPR. Authentication is handled via API tokens stored in a configuration file, enabling scripted operations.
参数
- whoami
- Print the user authenticated by the configured API token.
- list _OWNER_
- List projects belonging to the current user or the specified owner.
- list-chroots
- List chroots available on the COPR server.
- create _NAME_
- Create a new COPR project (requires at least one --chroot).
- modify _PROJECT_
- Modify settings of an existing project.
- delete _PROJECT_
- Delete a project.
- build _PROJECT_ _SRPM_|_URL_
- Submit a build from a local SRPM or an SRPM URL.
- buildpypi _PROJECT_
- Build from a PyPI source package.
- buildgem _PROJECT_
- Build from a RubyGems gem.
- buildscm _PROJECT_
- Build from a remote SCM repository (git/svn).
- build-distgit _PROJECT_
- Build a package from a DistGit repository.
- status _BUILD_ID_
- Print the current status of a build.
- watch-build _BUILD_ID_
- Follow a build until it completes.
- cancel _BUILD_ID_
- Cancel a running build.
- download-build _BUILD_ID_ _DEST_
- Download the built RPMs for the given build.
- regenerate-repos _PROJECT_
- Regenerate the repository metadata for a project.
- -r, --chroot _CHROOT_
- Specify the build target (e.g., fedora-rawhide-x86_64, epel-9-x86_64). May be repeated.
- --nowait
- Submit the build without waiting for it to finish.
- --background
- Run the build in the background (lower priority than normal builds).
- --after-build-id _ID_
- Make this build run after the specified build completes (batch dependency).
- --timeout _SECONDS_
- Override the default build timeout.
- --config _FILE_
- Use an alternate configuration file (default: ~/.config/copr).
FAQ
What is the copr-cli command used for?
copr-cli is the command-line client for Fedora's COPR build system. It allows developers to create projects, submit builds, manage repositories, and automate package distribution without using the web interface. The tool handles the complete package lifecycle: creating projects with specified build targets (chroots), submitting source RPMs for building, monitoring build progress, and downloading the resulting packages. It supports building from local files, URLs, or SCM repositories. copr-cli is essential for CI/CD pipelines that automatically build and publish packages to COPR. Authentication is handled via API tokens stored in a configuration file, enabling scripted operations.
How do I run a basic copr-cli example?
Run `copr-cli whoami` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does whoami do in copr-cli?
Print the user authenticated by the configured API token.