View Single Post
Posts: 81 | Thanked: 342 times | Joined on Jul 2012 @ Finland
#34
Originally Posted by BluesLee View Post
Just out of curiosity: How one would generate an rpm package based on such a patch source repository in general, using the SDK and downloading sources for the stuff one wants to patch? Is there a howto?
I haven't done this in Sailfish, but I'm doing it a lot in GNU Linux. Short instructions that should apply mostly in Jolla, too:
  • Setup the rpm build environment (see guides).
  • Grab the source rpm, install it as user (not root!).
  • Put your new patch file in rpmbuild/SOURCES.
  • Edit the spec file in rpmbuild/SPECS.
  • In the beginning, after Sourcex: rows, add "Patch0: <name_of_patch_file>.patch"
  • In %prep section, add a new row at the end of the section "%patch0 -p1" (depending on the patch, adjust -p0, p1 etc.)
  • Run "rpmbuild -ba <spec file>" as user and Bob's your uncle.
(don't know why people are a pain in the *** and advices to build rpms as root. Don't do it. Just don't.)

If you need to replace the whole source, you are a bit on your own. You need to compare the upstream or patched code to the one downstream in the rpm. Does the rpm contain other patches etc. If no patches at all, it could work right away.

Last edited by jukk; 2017-11-01 at 13:19.
 

The Following 6 Users Say Thank You to jukk For This Useful Post: