On Wed, 11 Jul 2001, Joost Kooij wrote: > 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 > Yes, I had but found it confusing.
> > 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. > Now this is strange. As I'd messed around with the original apt-get files, I decided to remove all and start again. Using exactly the same syntax (from my notes), I replaced them and this time the tarball was unpacked and a foo-xxxx directory created and the logging showed that this was done. Don't know why it didn't do so the first time. > > 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. > I'd tried the --dry-run option earlier, but it just showed the same complete failure. My actual attempt was merely frustration. > > 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. > This was the main (of my many) misunderstandings - things are now consideably clearer. Joost, I'm very grateful to you for all the advice. The .deb is created and has been installed (have yet to see if it solves the problem, but that's another matter). Having seen how to compile the .deb takes my limited knowledge a lot further - many thanks. Regards, John.