[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: patching debian source: fails!



On Mon, Dec 19, 2005 at 01:52:17PM +0100, Renato Serodio wrote:
> And that's the thing.. In 3.0 I got a directory with the sources, and
> I just had to patch the files. In addition, every howto around seems
> to depend on this source dir being created. Now, if I simply extract
> this last tgz file, the changes will be overwritten. And I even tried
> the naive approach of repacking the changed sources, but to no avail.

It looks like bash 3.1 uses the `dpatch' system. Install dpatch and
check /usr/share/doc/dpatch. A dpatch is an executable patch file. It's
not nice, but try

a) unpacking source
b) copying source dir (cp -rp whatever whatever-pristine)
c) hacking
d) getting a diff (diff -ruN whatever-pristine whatever > your-patch)
e) rejigging the paths in your diff (check existing patches; what paths
   do they have?)
f) BACK UP YOUR PATCH OUTSIDE THE CWD :)

You may then be able to stick your patch in the ./debian/patches dir and
build with their source tarball. HOWEVER, you'd need to somehow massage
your GNU diff file into an executable (there's probably a trivial way of
doing this, maybe just adding a #!/usr/bin/patch hashbang and setting
+x)

I've had similarly horrific experiences working with the debian PHP
package. I expect I could unravel the proper way to do it, but right
now, I have to delete all my orig.tar.gz (which are repackaged after
patching or something), do a fresh apt-get source and apply my patch
(safely stored away from the working directory) on every change :/
`ccache' makes this marginally more bearable.

-- 
Jon Dowland
http://alcopop.org/



Reply to: