Patch 009_httpd.patch did not apply cleanly

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch 009_httpd.patch did not apply cleanly

Raimo Niskanen-7
Hi.

I applied patch 009_httpd.patch extracted from a downloaded 5.6.tar.gz
according to inline instructions on a source tree from the 5.6 release CD,
and approximately 6 hunks in 3 files were rejected.

This was late last evening and I will try again any day to produce proper
logs and double check what source tree I tried to patch, but if this is a
simple mistake from the patch writer's side I think the information above
might be sufficient...

Best Regards
--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply | Threaded
Open this post in threaded view
|

Re: Patch 009_httpd.patch did not apply cleanly

trondd
I had noticed the same thing.  The src tarball on the CD is different from
the tarball on the mirrors.  I had taken a quick look and it was just
whitespace differences that I saw.

Tim.

Reply | Threaded
Open this post in threaded view
|

Re: Patch 009_httpd.patch did not apply cleanly

Raimo Niskanen-7
On Tue, Nov 25, 2014 at 11:45:26AM -0500, trondd wrote:
> I had noticed the same thing.  The src tarball on the CD is different from
> the tarball on the mirrors.  I had taken a quick look and it was just
> whitespace differences that I saw.
>
> Tim.

I have investigated more now, and it sure seems as the 5.6 CD src.tar.gz
does not have the same content as the download site's 5.6 src.tar.gz
(besides sys.tar.gz, of course).  Some parts of patch 009 (on httpd)
were already present in my source tree which is the CD src.tar.gz.

But on the downloadable 5.6 src.tar.gz patch 009 did apply cleanly.

That suggests that the CD src.tar.gz is a slightly later src tree then the
downloadable src.tar.gz.  I have not compared both trees in full,
only ./usr.sbin/httpd.

And yes, I have checked the signatures and SHA sums for both tarballs
against the pub key installed by the 5.6 CD set.

I have also learned to use the -C flag to patch...

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply | Threaded
Open this post in threaded view
|

Re: Patch 009_httpd.patch did not apply cleanly

Libertas
On 11/27/2014 07:38 AM, Raimo Niskanen wrote:
> I have also learned to use the -C flag to patch...

Have we ever considered changing the suggested shell commands in the
patches to ensure that the patch will apply cleanly before trying? We
could wrap the actual patch command an if-block with a 'patch -C' condition.

Reply | Threaded
Open this post in threaded view
|

Re: Patch 009_httpd.patch did not apply cleanly

Ted Unangst-6
In reply to this post by trondd
On Sat, Nov 29, 2014 at 16:08, Libertas wrote:
> On 11/27/2014 07:38 AM, Raimo Niskanen wrote:
>> I have also learned to use the -C flag to patch...
>
> Have we ever considered changing the suggested shell commands in the
> patches to ensure that the patch will apply cleanly before trying? We
> could wrap the actual patch command an if-block with a 'patch -C' condition.

There are few circumstances in which that would matter. The
expectation is that the patch should apply.

Now, you are always welcome to run patch -C on your systems, but
otherwise it complicates the instructions and we'd prefer to keep them
simple.

Reply | Threaded
Open this post in threaded view
|

Re: Patch 009_httpd.patch did not apply cleanly

Raimo Niskanen-7
On Sat, Nov 29, 2014 at 05:44:17PM -0500, Ted Unangst wrote:

> On Sat, Nov 29, 2014 at 16:08, Libertas wrote:
> > On 11/27/2014 07:38 AM, Raimo Niskanen wrote:
> >> I have also learned to use the -C flag to patch...
> >
> > Have we ever considered changing the suggested shell commands in the
> > patches to ensure that the patch will apply cleanly before trying? We
> > could wrap the actual patch command an if-block with a 'patch -C' condition.
>
> There are few circumstances in which that would matter. The
> expectation is that the patch should apply.

I do not remember from the output of patch if it printed at the bottom that
some hunks were rejected.  I kind of remember to have to scroll back quite
far to find that out - which I did because the compilation failed.

So if my vague memories are incorrect and patch indeed warns at the end of
the run that some hunks in some file(s) were rejceted then all is well.
Otherwise it might be nice to have "patch... || echo Warning" in the patch
instruction, or a warning after all files from patch.

>
> Now, you are always welcome to run patch -C on your systems, but
> otherwise it complicates the instructions and we'd prefer to keep them
> simple.

Yes. Observing the result from patch should be sufficient since it leaves
backup and reject files behind so you can analyze and revert if want.

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB