[lfs-dev] chapter 6 coreutils-8.28

Bruce Dubbs bruce.dubbs at gmail.com
Tue Oct 31 13:30:10 PDT 2017

Ken Moffat wrote:
> On Tue, Oct 31, 2017 at 01:56:47PM -0500, Bruce Dubbs wrote:
>> Christoph Feikes wrote:
>>> and there is a file expand.c.orig after applying the patch:
>>> find . -iname "*.rej" -o -iname "*.orig"
>>> ./src/sort.c.orig
>>> ./src/expand.c.orig
>>> ./src/join.c.orig
>>> ./src/expand-common.c.orig
>>> ./src/pr.c.orig
>>> ./tests/misc/expand.pl.orig
>>> ./tests/local.mk.orig
>>> ./bootstrap.conf.orig
>>> ./configure.ac.orig
>>> md5sum of the patch is eaxctly as given in the current version of
>>> Development LFS on the web (SVN-20171028), but it doesn't apply clean,
>>> as it seems.
>>> Sorry, I can't get replying and quoting the meassage I'm replying to
>>> working in this ubuntu / firefox / thunderbird - combo I'm trying to use.
>> We don't normally rediff patches if the apply OK.  If you follow the book,
>> you do not get those .orig files.  For that you need the -b option to patch.
>> I do not know what else you may have done different form the book.  Our
>> automated tests do not show your problem.
>>    -- Bruce
> Bruce,
> I think you are mistaken about .orig files.  On an 8.1 system, using
> patch-2.7.5, I've just untarred coreutils-8.28 and applied the
> patch. I get a list of hte same 9 .orig files (in a different
> order).
> I believe that .orig files are created by most patches - certainly
> things with an offset or fuzz seem to create them.

I just re-read the man page.  That behavior does not seem to be documented.

I did some experimenting.  If the patch applies without fuzz or offset, 
the .orig file is not created, but it is silently created when either is 

It's always good to learn something new.

   -- Bruce

More information about the lfs-dev mailing list