On Fri, Apr 13, 2007 at 12:47:59AM +0100, Darren Salt wrote: > I demand that Kamaraju S Kusumanchi may or may not have written... > > 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 > > You could add a new changelog entry (use dch, or do it manually), then > $ debuild > $ 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.)
Did you mean debian/changelog instead of rules in there? I like using "debdiff" instead of interdiff (less to type): $ apt-get source thingy # this will grab the current .dsc file $ cd thingy-* $ <make changes> $ dch -n "<describe changes>" # this will add a NMU versioned change $ debuild -uc -us # this will build the new package and .dsc $ cd .. $ debdiff $(ls -latr thingy_*.dsc | tail -n -2) > thingy_change.debdiff > 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 > easier. I used to get hung up trying to figure out which patch system is in use for a package. Lacking a better way, I wrote a script[1] to try and guess for me. I feel like there should be a simpler way, but it eluded me. :) -Kees [1] http://outflux.net/debian/scripts/what-patch -- Kees Cook @outflux.net -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]