Bug 1298110 - patch: **** Only garbage was found in the patch input.
patch: **** Only garbage was found in the patch input.
Product: Fedora
Classification: Fedora
Component: patch (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tim Waugh
Fedora Extras Quality Assurance
Depends On:
Blocks: 1245310
  Show dependency treegraph
Reported: 2016-01-13 04:22 EST by Jan Synacek
Modified: 2016-01-13 09:18 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-01-13 09:18:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
purple-url-handler (11.50 KB, text/x-python)
2016-01-13 04:22 EST, Jan Synacek
no flags Details
purple-url-handler.new (11.63 KB, text/plain)
2016-01-13 04:22 EST, Jan Synacek
no flags Details
tmp.patch (515 bytes, patch)
2016-01-13 04:23 EST, Jan Synacek
no flags Details | Diff

  None (edit)
Description Jan Synacek 2016-01-13 04:22:23 EST
Created attachment 1114342 [details]

Description of problem:
See steps to reproduce. I'm not sure if this is a bug in diffutils or patch...

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. diff purple-url-handler purple-url-handler.new  > tmp.patch
2. patch < tmp.patch
patch: **** Only garbage was found in the patch input.

Actual results:

Expected results:
Patch works.

Additional info:
It doesn't matter if the unified format is used or not. Also, the behavior is the same on RHEL-7.2 with diffutils-3.3-4.el7.x86_64 and patch-2.7.1-8.el7.x86_64.
Comment 1 Jan Synacek 2016-01-13 04:22 EST
Created attachment 1114343 [details]
Comment 2 Jan Synacek 2016-01-13 04:23 EST
Created attachment 1114344 [details]

tmp.patch as it came out on my machine, in case it's needed.
Comment 3 Jan Synacek 2016-01-13 04:26:31 EST
As bizzare as this may sound, I can't fix https://bugzilla.redhat.com/show_bug.cgi?id=1245310 because of this.
Comment 4 Tim Waugh 2016-01-13 07:48:32 EST
Is there a reason you're not using diff's -u switch to specify that you want 'unified' format output?

When using diff with no options and two files are arguments, you'll get 'normal' format diff output with no filename header. This means you'll need to tell patch which file to apply the diff to. For example:

diff purple-url-handler purple-url-handler.new  > tmp.patch
patch purple-url-handler < tmp.patch
Comment 5 Jan Synacek 2016-01-13 09:18:52 EST
Well, the problem seems to be between the chair and the machine... The patch works fine if applied manually, it just doesn't work when I'm building an rpm using fedpkg... Anyway, this is not a patch/diffutils bug. Sorry for the noise.

Note You need to log in before you can comment on or make changes to this bug.