Packaging RPMs and Copr: tips and links

Packaging RPMs and Copr: tips and links

Creating RPMs

First you need to understand how to create RPMs. Most of the work will be writting .spec files.

Spec file documentation

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.

  • Fedora packaging guidelines - Python

  • 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

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).