Herbert J. Skuhra
2015-Oct-30 10:18 UTC
Compilation problem since SA-15:25 for FreeBSD 10.2-RELEASE
On Fri, Oct 30, 2015 at 09:24:03AM +0100, Dag-Erling Sm?rgrav wrote:> Guillaume Bibaut <freebsd-security at iaelu.net> writes: > > Herbert J. Skuhra <herbert at oslo.ath.cx> writes: > > > OK, with 'patch -p0 < /path/to/ntp-102.patch' I get only [...] > > As far as I know, the SA does not mention 'patch -p0'. Shouldn?t this > > be mentioned? > > BSD patch(1) assumes -p0. GNU patch(1) does not. I assume Herbert is > used to GNU patch(1) and used -p0 out of habit. It is harmless, but not > necessary.I simply tried '-p0' because the instructions in the SA didn't work at all! With '-p0' I end up with a src tree that builds at least (only a few man pages failed to patch). Tested on stable/10 and head. % fetch ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/10.2-RELEASE/src.txz % fetch https://security.FreeBSD.org/patches/SA-15:25/ntp-102.patch.bz2 % tar xfJ src.txz % bunzip2 ntp-102.patch.bz2 % cd usr/src Apply the patches from the other SAs (doesn't make any difference). They apply cleanly. % patch < ../../ntp-102.patch A lot of *.c, *.h and *.orig files are created in the wrong place! So can anyone confirm that the ntp patches in the SA are correct and we are just too stupid to use patch? Thanks. -- Herbert
Franco Fichtner
2015-Oct-30 10:28 UTC
Compilation problem since SA-15:25 for FreeBSD 10.2-RELEASE
I had a similar issue with git-format-patch and git-am (on 10.1) where the generated patch output was mangled or could not be imported correctly. I ended up omitting the actual text patch extraction by going directly to the git objects with git-cherry-pick. No idea how to fix this though, sorry.> On 30 Oct 2015, at 11:18 am, Herbert J. Skuhra <herbert at oslo.ath.cx> wrote: > > On Fri, Oct 30, 2015 at 09:24:03AM +0100, Dag-Erling Sm?rgrav wrote: >> Guillaume Bibaut <freebsd-security at iaelu.net> writes: >>> Herbert J. Skuhra <herbert at oslo.ath.cx> writes: >>>> OK, with 'patch -p0 < /path/to/ntp-102.patch' I get only [...] >>> As far as I know, the SA does not mention 'patch -p0'. Shouldn?t this >>> be mentioned? >> >> BSD patch(1) assumes -p0. GNU patch(1) does not. I assume Herbert is >> used to GNU patch(1) and used -p0 out of habit. It is harmless, but not >> necessary. > > I simply tried '-p0' because the instructions in the SA didn't work at > all! With '-p0' I end up with a src tree that builds at least (only a > few man pages failed to patch). Tested on stable/10 and head. > > % fetch ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/10.2-RELEASE/src.txz > % fetch https://security.FreeBSD.org/patches/SA-15:25/ntp-102.patch.bz2 > % tar xfJ src.txz > % bunzip2 ntp-102.patch.bz2 > % cd usr/src > > Apply the patches from the other SAs (doesn't make any difference). They > apply cleanly. > > % patch < ../../ntp-102.patch > > A lot of *.c, *.h and *.orig files are created in the wrong place! > > So can anyone confirm that the ntp patches in the SA are correct and we > are just too stupid to use patch? > > Thanks. > > -- > Herbert > _______________________________________________ > freebsd-security at freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-security > To unsubscribe, send any mail to "freebsd-security-unsubscribe at freebsd.org"
Gleb Smirnoff
2015-Oct-30 10:29 UTC
Compilation problem since SA-15:25 for FreeBSD 10.2-RELEASE
Herbert, On Fri, Oct 30, 2015 at 11:18:11AM +0100, Herbert J. Skuhra wrote: H> On Fri, Oct 30, 2015 at 09:24:03AM +0100, Dag-Erling Sm?rgrav wrote: H> > Guillaume Bibaut <freebsd-security at iaelu.net> writes: H> > > Herbert J. Skuhra <herbert at oslo.ath.cx> writes: H> > > > OK, with 'patch -p0 < /path/to/ntp-102.patch' I get only [...] H> > > As far as I know, the SA does not mention 'patch -p0'. Shouldn?t this H> > > be mentioned? H> > H> > BSD patch(1) assumes -p0. GNU patch(1) does not. I assume Herbert is H> > used to GNU patch(1) and used -p0 out of habit. It is harmless, but not H> > necessary. H> H> I simply tried '-p0' because the instructions in the SA didn't work at H> all! With '-p0' I end up with a src tree that builds at least (only a H> few man pages failed to patch). Tested on stable/10 and head. H> H> % fetch ftp.freebsd.org/pub/FreeBSD/releases/amd64/amd64/10.2-RELEASE/src.txz H> % fetch https://security.FreeBSD.org/patches/SA-15:25/ntp-102.patch.bz2 H> % tar xfJ src.txz H> % bunzip2 ntp-102.patch.bz2 H> % cd usr/src H> H> Apply the patches from the other SAs (doesn't make any difference). They H> apply cleanly. H> H> % patch < ../../ntp-102.patch H> H> A lot of *.c, *.h and *.orig files are created in the wrong place! H> H> So can anyone confirm that the ntp patches in the SA are correct and we H> are just too stupid to use patch? What does patch -v say for you? -- Totus tuus, Glebius.
Dag-Erling Smørgrav
2015-Oct-30 10:46 UTC
Compilation problem since SA-15:25 for FreeBSD 10.2-RELEASE
"Herbert J. Skuhra" <herbert at oslo.ath.cx> writes:> So can anyone confirm that the ntp patches in the SA are correct and we > are just too stupid to use patch?I looked at the SA-15:25 patch, and it is incorrect. I will work with the so@ to get correct patches released. DES -- Dag-Erling Sm?rgrav - des at des.no