On 04/23/2017 03:16 PM, Andrei Borzenkov wrote:
23.04.2017 08:38, Bernhard M. Wiedemann пишет:
On 2017-04-22 20:18, Axel Braun wrote:
Unarchive, make your changes in a copy of the source, create a diff and apply this as patch to your branched project. So the original source remains untouched.
and that part can be nicely done with a tool called 'quilt' when in the checkout of package foo, you typically do quilt setup foo.spec cd foo-VERSIONNUMBER quilt push -a quilt new NAME_OF_YOUR_NEW.patch quilt edit PATH/FILE_TO_EDIT
Alternatively instead of quilt edit, "quilt add PATH/FILE_TO_EDIT" then edit in a graphical editor of your choice, not all of these work with quilt edit.
quilt diff # optional
quilt header -e # to supply meaningful description to your patch
quilt refresh cp patches/NAME_OF_YOUR_NEW.patch ..
Not needed (or probably fails), quilt makes patches symlink to .. already.
cd .. /usr/lib/build/spec_add_patch NAME_OF_YOUR_NEW.patch
Note that quilt depends on RPM to extract sources/apply patches which means if any macro references in spec is missing quilt fails. This is especially the problem with spec files created for different distribution. Less so for openSUSE, still may happen.
-- Simon Lees (Simotek) http://simotek.net Emergency Update Team keybase.io/simotek SUSE Linux Adelaide Australia, UTC+10:30 GPG Fingerprint: 5B87 DB9D 88DC F606 E489 CEC5 0922 C246 02F0 014B