Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 77132 - sys-devel/patch: patch reports uncorrect failures with --dry-run
Summary: sys-devel/patch: patch reports uncorrect failures with --dry-run
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High blocker (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://dev.gentoo.org/~kang/rsbac/pat...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-08 05:50 UTC by Guillaume Destuynder (RETIRED)
Modified: 2005-01-20 12:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
just the bad hunk (1506_rsbac_bugfix_v1.2.3-9-2.patch,566 bytes, patch)
2005-01-18 13:01 UTC, Guillaume Destuynder (RETIRED)
Details | Diff
the whole patch (rsbac-bugfix-v1.2.3-9.diff,10.66 KB, patch)
2005-01-18 13:02 UTC, Guillaume Destuynder (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-08 05:50:05 UTC
With a patch I have, when applied with --dry-run, patch reports rejects failure.
The same patch without dry run applies fine without even fuzz.

Reproducible: Always
Steps to Reproduce:
Here's a demo:

root@insecure linux-2.6.10-rsbac # patch -p1 --dry-run -f < /var/tmp/portage/rsbac-dev-sources-2.6.10/work/patches/1/rsbac-patches-2.6-10.0/1505_rsbac_bugfix_v1.2.3-9.patch
patching file include/rsbac/aci.h
patching file include/rsbac/fs.h
patching file rsbac/adf/auth/auth_main.c
patching file rsbac/adf/reg/kproc_hide.c
patching file rsbac/adf/reg/root_plug.c
patching file rsbac/data_structures/aci_data_structures.c
patching file rsbac/data_structures/auth_data_structures.c
patching file rsbac/help/syscalls.c
patching file rsbac/data_structures/aci_data_structures.c
patching file include/rsbac/fs.h
Hunk #1 FAILED at 33.
1 out of 1 hunk FAILED -- saving rejects to file include/rsbac/fs.h.rej
patching file include/rsbac/helpers.h
patching file rsbac/help/helpers.c
patching file rsbac/help/debug.c
patching file rsbac/data_structures/aci_data_structures.c
patching file rsbac/help/pm_getname.c
root@insecure linux-2.6.10-rsbac #

root@insecure linux-2.6.10-rsbac # patch -p1 -f < /var/tmp/portage/rsbac-dev-sources-2.6.10/work/patches/1/rsbac-patches-2.6-10.0/1505_rsbac_bugfix_v1.2.3-9.patch
patching file include/rsbac/aci.h
patching file include/rsbac/fs.h
patching file rsbac/adf/auth/auth_main.c
patching file rsbac/adf/reg/kproc_hide.c
patching file rsbac/adf/reg/root_plug.c
patching file rsbac/data_structures/aci_data_structures.c
patching file rsbac/data_structures/auth_data_structures.c
patching file rsbac/help/syscalls.c
patching file rsbac/data_structures/aci_data_structures.c
patching file include/rsbac/fs.h
patching file include/rsbac/helpers.h
patching file rsbac/help/helpers.c
patching file rsbac/help/debug.c
patching file rsbac/data_structures/aci_data_structures.c
patching file rsbac/help/pm_getname.c
root@insecure linux-2.6.10-rsbac #

Actual Results:  
Refuses to patch in dry-un (rejects).

Expected Results:  
Should patch!

Using: sys-devel/patch-2.5.9
The patch is:
http://dev.gentoo.org/~kang/rsbac/patches/1.2.3/2.6/rsbac-patches-2.6-10.0/1505_rsbac_bugfix_v1.2.3-9.patch
The kernel is:
vanilla 2.6.10 + rsbac patch for 2.6.10 + pax test17 for 2.6.10 + patches found in:
http://dev.gentoo.org/~kang/rsbac/patches/1.2.3/2.6/rsbac-patches-2.6-10.0

For your convenience, the ebuild used is here:
http://dev.gentoo.org/~kang/rsbac/rsbac-dev-sources-2.6.10.ebuild

And patching problem summary is here:
http://dev.gentoo.org/~kang/rsbac/patch.txt

I tried to use -i instead of < redirection to prevent buffer problems, but I get
the same errors.
Comment 1 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-08 05:50:54 UTC
According to metadata.xml, assigning to base-system herd.
Comment 2 SpanKY gentoo-dev 2005-01-08 13:47:42 UTC
try cutting the patch file down to the 1 problematic hunk ... if it still fails with just that 1 hunk, attach it here along with the file it applies against
Comment 3 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-08 16:57:46 UTC
It works if i split hunks
while this is a work around, shouldn't this still be a bug ? ever experienced it ?
Comment 4 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-08 17:17:57 UTC
I did a few more tests...
if i put any other hunk with the failing one, dry-run *never* works
if its alone it does indeed work
Comment 5 SpanKY gentoo-dev 2005-01-08 23:06:01 UTC
i didnt tell you to fix your patch, i told you to attach the problematic files here so i could test :P
Comment 6 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-18 13:01:17 UTC
...
 if it still fails with just that 1 hunk, attach it here along with the file it applies against
...
I see a IF so yes, you did tell me that ;)
Sorry for the delay, my ISP was down for longer than a week :(
Comment 7 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-18 13:01:53 UTC
Created attachment 48872 [details, diff]
just the bad hunk
Comment 8 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-18 13:02:36 UTC
Created attachment 48873 [details, diff]
the whole patch
Comment 9 Guillaume Destuynder (RETIRED) gentoo-dev 2005-01-20 12:06:10 UTC
Ok, I finally got the explanation why it's like that:

< ferringb> so... like I said, later hunk relying on an earlier patch, something dry-run doesn't pick up on (nor is it easy to implement, long standing issue with patch actually)


And I didn't know. The bug is probably invalid. (I let you mark it so) Sorry :)
Comment 10 SpanKY gentoo-dev 2005-01-20 12:30:25 UTC
sounds good ;)