Re: applying a patch to nullmailer
On Wed, Jul 11, 2001 at 02:59:59PM +0100, john gennard wrote:
> On Tue, 10 Jul 2001, Joost Kooij wrote:
>
> [snip]
> >
> > You need to apply the patch before building the deb, obviously.
> > Don't use the '-b' option to apt-get.
> >
> > cd /foodir
> > apt-get source xxxx
> > cd xxxx-*
> >
> > >> apply patch <<
> >
> > fakeroot debian/rules binary
> > su -
> > dpkg -i /foodir/xxxx*.deb
> >
> > Cheers, Joost
>
> I still can't apply the patch, and am unable to understand why. The
> man page gives no examples and all the notes I kept on applying
> kernel patches do not help here.
Did you also read the patch manpage?
man patch
> What I have is:-
>
> a. /foodir, containing, foo_xxxx.tar.gz, foo_xxxxx.diff and
> foo_xxxxx.dsc (all obtained by 'apt-get source foo')
There should also be a foo-xxxx directory. If not, run
dpkg-source -x foo_xxx.dsc
to create it.
> b. foo-xxx.patch which I placed in the same directory (although I
> believe it's not necessary to place it here)
cd foo-xxxx
patch -p0 --dry-run < ../foo-xxx.patch
The "--dry-run" option makes patch not actually do anything. That
way, you can figure out if you need -p0 or -p1 or if there are just
too many rejects to apply the patch as a whole.
> With a wide variety of commands, all I get is a complete failure
> along the following lines. There is a .orig file which is an exact
> copy ot the original .tar.gz and the reject file which contains
> virtually all the patch file:-
Don't patch the tarball, patch the unpacked tree inside the tarball.
> --------
> john@Arley:~/nullmailer$ patch -p0 nullmailer_1.00RC5.tar.gz nullmailer-helohost
> .patch
> patching file `nullmailer_1.00RC5.tar.gz'
> Hunk #1 FAILED at 20.
> Hunk #2 FAILED at 31.
> Hunk #3 FAILED at 142.
> 3 out of 3 hunks FAILED -- saving rejects to nullmailer_1.00RC5.tar.gz.rej
> --------
No good. :-)
> I presume the .dsc file is Debian specific and will not be needed
> until I create a .deb from the patched source file. Also I've tried
> to look at the source file (using 'zcat') and the patch file (using
> 'cat'), but just do not have the knowledge to work out what starts
> the process. I'm told the patch has been tested and works.
>
> What am I doing wrong or overlooking.
Your version of apt-get doesn't auto unpack sources. I incorrectly
assumed that it would.
Cheers,
Joost
Reply to: