What is the simplest and fastest way to patch existing Fedora SRPM?

I want to patch an existing package with my custom patch - and maintain it. I know about COPR repos, and tried to add a new package - I have to create git repo, study the rpkg utility, and so on. Is there more convenient way to provide src.tar.gz+patch+spec and regularly get the updated newly built rpms?

You could try to get your custom patch incorporated upstream. Having multiple versions of a package usually confuses some fraction of the community and creates extra work for upstream devs.

Merge the patch to upstream - it’s a good point, but unfortunately the author doesn’t agree with my changes. So I want to maintain them for my personal use only.

Then, you’re back to COPR

1 Like

You can build it with mock on your local machine.

1 Like

What I do:

  1. Install Fedora .srpm
  2. in ~/rpmbuild/SOURCE add your patch
  3. in ~/rpmbuild/SPEC edit the .spec file to apply the patch and change version
  4. Build new .srpm rpmbuild -bs <spec>
  5. Build rpm using mock or submit to copr to build
2 Likes