Subject: Re: Clarify Patch Application Method Please ?
To: Nick Boyce <nick@glimmer.demon.co.uk>
From: David Brownlee <abs@netbsd.org>
List: netbsd-help
Date: 09/27/2000 09:16:45
On Wed, 27 Sep 2000, Nick Boyce wrote:
> I wasn't sure where to find file src/libexec/ftpd/ftpd.c; I've now
> tracked it down to being included in sys.tgz (is that the right place
> ?) - and downloaded that from
> ftp.netbsd.org/pub/NetBSD/NetBSD-1.4.2/source/sets to
> /usr/local/updates on my box.
>
Hmm - syssrc.tgz should be the kernelsource - it should be in
'src.tgz'.
> I found the document "NetBSD Package System" by Hubert Feyrer &
> Alistair Crooks, which seems to talk mainly about pkgsrc.tgz, but
> seems likely also to apply to the contents of sys.tgz.
>
That shouldn't really apply.
> So I unpacked the ftpd directory from sys.tgz by
> cd /; tar -xvzf /usr/local/updates/sys.tgz usr/src/libexec/ftpd
>
> ( I didn't see much point in unpacking the whole thing just for this
> patch - reasonable ? )
>
Modulus sys -> src, that should be ideal.
> and applied the patch 20000708-ftpd from
> ftp://ftp.netbsd.org/pub/NetBSD/misc/security/patches/ using
> cd /usr/src/libexec/ftpd
> patch < 20000708-ftpd
> make
> and got the following binary :
> -rwxr-xr-x 1 root wheel 109383 Sep 26 20:57 ftpd
>
> But this binary is considerably larger than the released 1.4.2
> binary :
> # ls -l /usr/libexec/ftpd
> -r-xr-xr-x 1 root wheel 85460 Mar 3 2000 /usr/libexec/ftpd
>
> and since the patch doesn't seem to introduce a significant amount of
> code, I wonder how this can be. Have I missed a step, or done
> something wrong, or used the wrong ftpd source ... or just not used an
> optimisation option I should have .. or something ?
>
It may be that its stripped when being installed - try 'strip
ftpd'.
> Also, how should I install the new binary ? Using "make install", or
> do I just copy the binary to /usr/libexec and make sure it's
> permissions are set the same as the original ?
>
'make install' should do the right thing.
> I'll be grateful for any comments on the above, and especially
> grateful if anyone can point me at a URL for the required steps.
>
I don't know if we have one. We definitely should. When you
have everything working your end would you be willing to
contribute a set of notes?
> Sorry for the basic question - I'm a NetBSD newbie.
No problem :)
David/absolute
-- www.netbsd.org: A pmap for every occasion --