Re: generating patches for debian packages
I demand that Kamaraju S Kusumanchi may or may not have written...
> I am looking for some tricks for generating patches for the debian source
> Let's say I download the source of a package foo
> apt-get source foo
> Now I change somefiles inside foo. How can I easily generate a patch so
> that I can send it to bts/maintainer etc.,? Currently what I do is unpack
> the source again into another temp directory and then use "diff -r" and
> then delete the temp directory. But this is time consuming. Is there any
> easy way? Are there any books which deal with practical issues such as
You could add a new changelog entry (use dch, or do it manually), then
$ interdiff -zp1 ../foo_1.2-3.diff.gz ../foo_1.2-3+my-patches.diff.gz |
filterdiff -x \*/debian/rules > ../foo.patch
(Doing this requires devscripts and patchutils.)
If the source uses tools such as dpatch or quilt then that may not work quite
so well - you could use the same tools or you could hack it a bit: patch the
source ("debian/rules patch" or "debian/rules apply-patches" or something
like that), configure it ("debian/rules configure") then, BEFORE doing
anything else, make a copy of the source tree (hard-linking files is good, so
long as your text editor breaks links when saving). Diffing is suddenly
| Darren Salt | linux or ds at | nr. Ashington, | Toon
| RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army
| + Lobby friends, family, business, government. WE'RE KILLING THE PLANET.
Do not merely believe in miracles, rely on them.