Creating RPMs
First you need to understand how to create RPMs. Most of the work will be writting .spec files.
-
RedHat guide: How to create a Linux RPM package
-
Another good guide: How to create an RPM package from a tarball
-
An example using git as a source: Automate RPM Builds from Git Sources using COPR
-
Arch AUR scripts can be useful
-
Copy what other packages do:
dnf download --source --downloaddir=/tmp/ qbittorrent
Spec file documentation
-
The book Maximum RPM - Edward C Bailey, 1997 is still mostly up to date and documents options to spec file macros. Use it as a reference.
-
rpm.org I never used this one very much.
Python spec files
-
Ignore tutorials using py3_build and py3_install commands, those are deprecated. Instead use python -m build and python -m installer. You need
BuildRequires: python3
. -
Red Hat python3 packaging guide this will probably be deprecaded in favor of the fedora guideline but just in case you need it.
-
How to fix this error without having to change upstream:
*** ERROR: ambiguous python shebang in /usr/bin/taskotron_result: #!/usr/bin/python. Change it to python3 (or python2) explicitly.
.desktop files
-
I found that reading spec files for other packages helped the most.
Copr docs
-
Copr user documentation including the CLI.
-
Copr screenshot tutorial - A good introduction, just click around the WebUI after that.
-
The Copr WebUI doesn’t save the option “Enable internet access during this build”, you have to re-enable it on every new attempt after an error.
Git
-
On fedora and probably related distributions .spec files are in .gitigonre by default. You can use
git add -f
to force. -
The URL on spec files should be https://github.com/me/repo without a .git at the end, since it will be appended with /archive/version.tar.gz.
Make software packagable
Don’t keep a fork with a few changes only you use for copr. Make a pull request and write general guidelines on how to package.
Ask for help
There isn’t that much documentation on how to use copr, not like PPAs and AUR. Don’t be afraid to ask on forums or contact me for help (I can’t give any guarantees).