Re: 1 out of 3 hunks failed--saving rejects to kerberosV/src/lib/krb5/crypto.c.rej

Previous thread: Relayd & multiple X-Forwaded-For IP's by Keith on Friday, June 18, 2010 - 4:59 am. (1 message)

Next thread: OpenBSD 4.4 : snmp for monitoring interfaces by Rioux, Christophe on Friday, June 18, 2010 - 7:31 am. (4 messages)
From: Tony Berth
Date: Friday, June 18, 2010 - 6:43 am

when trying to patch a new i386 installation with the first patch I get the
following:

------------------------
# patch -p0 < 001_kerberos.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Apply by doing:
|       cd /usr/src
|       patch -p0 < 001_kerberos.patch
|
|Rebuild and install the Kerberos 5 library:
|       cd lib/libkrb5
|       make obj
|       make depend
|       make
|       make install
|
|And then rebuild and install the Kerberos 5 KDC:
|       cd ../../kerberosV/libexec/kdc
|       make obj
|       make depend
|       make
|       make install
|
|
|Index: kerberosV/src/lib/krb5/crypto.c
|===================================================================
|RCS file: /cvs/src/kerberosV/src/lib/krb5/crypto.c,v
|retrieving revision 1.10
|diff -p -u -p -u -r1.10 crypto.c
|--- kerberosV/src/lib/krb5/crypto.c    6 Oct 2006 07:09:10 -0000       1.10
|+++ kerberosV/src/lib/krb5/crypto.c    30 Mar 2010 17:17:43 -0000
--------------------------
Patching file kerberosV/src/lib/krb5/crypto.c using Plan A...
Hunk #1 succeeded at 3463 (offset 12 lines).
Hunk #2 failed at 3543.
Hunk #3 succeeded at 3607 (offset 7 lines).
1 out of 3 hunks failed--saving rejects to
kerberosV/src/lib/krb5/crypto.c.rej
done

-----------------------------------------

Thanks

Tony

From: Nick Holland
Date: Friday, June 18, 2010 - 9:40 pm

you did something wrong.
You didn't tell us what you did, so that's the most I can^Wwill say.
For giggles, I just tested it against the 4.7 source, and (surprise!)
it worked just fine.

So, start with faq5, starting at the top, and work your way through at
least to 5.4 (10.15 would be a good read after 5.1-5.4) and see if you
can find what variation from the proper process that you felt was
harmless or what command you typed in blindly without understanding
what it meant and how it interacted with other things.

(and yes, I have a pretty good idea what you did, and understanding
faq5.html will set you straight.  Assuming you can pick and chose
which parts you read is how you got in trouble.  It is a dense read,
but pretty important to understanding what you were trying to do here.
 It is worth the time to understand...)

Nick.

/nfs1/test $ patch -p0 <001_kerberos.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|Apply by doing:
|       cd /usr/src
|       patch -p0 < 001_kerberos.patch
|
|Rebuild and install the Kerberos 5 library:
|       cd lib/libkrb5
|       make obj
|       make depend
|       make
|       make install
|
|And then rebuild and install the Kerberos 5 KDC:
|       cd ../../kerberosV/libexec/kdc
|       make obj
|       make depend
|       make
|       make install
|
|
|Index: kerberosV/src/lib/krb5/crypto.c
|===================================================================
|RCS file: /cvs/src/kerberosV/src/lib/krb5/crypto.c,v
|retrieving revision 1.10
|diff -p -u -p -u -r1.10 crypto.c
|--- kerberosV/src/lib/krb5/crypto.c    6 Oct 2006 07:09:10 -0000
  1.10
|+++ kerberosV/src/lib/krb5/crypto.c    30 Mar 2010 17:17:43 -0000
--------------------------
Patching file kerberosV/src/lib/krb5/crypto.c using Plan A...
Hunk #1 succeeded at 3451.
Hunk #2 succeeded at 3531.
Hunk #3 succeeded at 3600.
done

From: Tony Berth
Date: Monday, June 21, 2010 - 6:03 am

did the following:

after navigating to: http://openbsd.org/anoncvs.html#starting

applied:

# *cd /usr; cvs checkout -P -rOPENBSD_4_7 src*

using *CVSROOT=anoncvs@anoncvs.fr.openbsd.org:/cvs*


Then downloaded: ftp://ftp.openbsd.org/pub/OpenBSD/patches/4.7.tar.gz

and applied:

cd /usr/src
patch -p0 < 001_kerberos.patch


as referred in:
ftp://ftp.openbsd.org/pub/OpenBSD/patches/4.7/common/001_kerberos.patch


Thanks

Tony

On Sat, Jun 19, 2010 at 6:40 AM, Nick Holland

From: Joachim Schipper
Date: Monday, June 21, 2010 - 6:12 am

That gets you -stable. Don't apply patches to that; just rebuild the
system from it (http://openbsd.org/faq/faq5.html#Bld).

		Joachim

From: Dennis Davis
Date: Monday, June 21, 2010 - 6:14 am

I think you missed the line:

  The OPENBSD_4_7 tag contains the release sources and errata already applied.

in: http://openbsd.org/anoncvs.html#starting

which would explain the failure to apply patches which are already
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@bath.ac.uk               Phone: +44 1225 386101

From: Nick Holland
Date: Monday, June 21, 2010 - 8:12 am

...
now, as I suggested, go read FAQ5 and find out what this does.

(and yes, I guessed right. :)

Nick.

From: Tony Berth
Date: Monday, June 21, 2010 - 11:11 am

but FAQ5 is about 'Building the System from Source' which I don't want! I
just want to patch an existing system!

Instead of

'# cd /usr; cvs checkout -P -rOPENBSD_4_7 src'

I applied

'# cd /usr; cvs checkout -P src'

in order to get the current tree but patch001 still gives the same error!


On Mon, Jun 21, 2010 at 5:12 PM, Nick Holland

From: Peter N. M. Hansteen
Date: Monday, June 21, 2010 - 11:22 am

That command would get most likey you -current source, so it's no
surprise the patch doesn't apply cleanly.  If you want -current, the
best advice is to install a snapshot and take it from there (or just
keep fetching snapshots).

On the other hand, if you want 4.7-stable, check out the 4.7 source
and apply the errata patches.

- P
-- 
Peter N. M. Hansteen, member of the first RFC 1149 implementation team
http://bsdly.blogspot.com/ http://www.bsdly.net/ http://www.nuug.no/
"Remember to set the evil bit on all malicious network traffic"
delilah spamd[29949]: 85.152.224.147: disconnected after 42673 seconds.

From: TeXitoi
Date: Monday, June 21, 2010 - 11:26 am

http://openbsd.org/faq/faq10.html#Patches
http://openbsd.org/faq/faq5.html#Flavors

-- 
Guillaume Pinot               http://www.irccyn.ec-nantes.fr/~pinot/

+ Les grandes personnes ne comprennent jamais rien toutes seules, et
c'est fatigant, pour les enfants, de toujours leur donner des
explications... ; -- Antoine de Saint-Exupiry, Le Petit Prince

()  ASCII ribbon campaign      -- Against HTML e-mail
/\  http://www.asciiribbon.org -- Against proprietary attachments

From: Ingo Schwarze
Date: Monday, June 21, 2010 - 11:32 am

Hi Tony,


http://www.openbsd.org/faq/faq10.html#Patches

Note that this one doesn't talk about cvs checkout at all,

None of these is RELEASE.

If you want to understand what these two commands do, follow Nick's advice
and read FAQ 5.  Granted, that's not required for patching your system, but
maybe you want to understand what you are doing and why it fails...

Sometimes, it *is* useful to read a bit more than the bare minimum
required to type the right commands, in order to be able to understand
your own errors and become able to help yourself.

Yours,
  Ingo

From: Tony Abernethy
Date: Monday, June 21, 2010 - 12:05 pm

Maybe I'm just being dense, but HOW can you patch a system without
"building from source"?

... unless you have binary patches for all the architectures
and that gets much more complicated if you have combinations of patches
...

From: Nick Holland
Date: Monday, June 21, 2010 - 6:18 pm

The difference is building everything vs. building just the parts you
need.  We do have users in parts of the world where buying on CDs is
not just about supporting the project, but also saves massive download
times, and the source code on CD is very useful as well.  Small patch
files make life so much easier for them.  It is also an issue with
very slow computers, where a complete build may take days.

Since most people now consider a 1GHz system "slow" and have
moderately high speed connections, I'm not really sure it matters that
much.  The time required to patch and build each individual file is
pretty substantial and interactive, as opposed to simply checking out
the appropriate source and letting it rip and come back a few hours
later and have a fully patched system.

However, in the time the OP has refused to understand the directions,
he could have rebuilt the system on a 66MHz 486DX2 with a bit of
off-chip cache...and obviously checking out the code is not a problem
for him either.

Nick.

Previous thread: Relayd & multiple X-Forwaded-For IP's by Keith on Friday, June 18, 2010 - 4:59 am. (1 message)

Next thread: OpenBSD 4.4 : snmp for monitoring interfaces by Rioux, Christophe on Friday, June 18, 2010 - 7:31 am. (4 messages)