[lfs-dev] chapter 6 coreutils-8.28

Christoph Feikes cfeikes at gmx.net
Tue Oct 31 13:12:39 PDT 2017

> 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.

There is no "b" in "patch -Np1 -i $PACKAGES/coreutils-8.28-i18n-1.patch"

man patch says:

    Back up a file if the patch does not match the file exactly and
    if backups are not otherwise requested.
    This is the default unless patch is conforming to POSIX.

And if you read on you'll discover that the default naming scheme for
backup files is appending .orig to the original file name.

Invoking "patch --posix -Np1 -i $PACKAGES/coreutils-8.28-i18n-1.patch"

patching file bootstrap.conf
Hunk #1 succeeded at 154 (offset 2 lines).
patching file configure.ac
Hunk #1 succeeded at 433 (offset 4 lines).
patching file lib/linebuffer.h
can't find file to patch at input line 60
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
|diff -Naurp coreutils-8.27-orig/lib/mbfile.c coreutils-8.27/lib/mbfile.c
|--- coreutils-8.27-orig/lib/mbfile.c	1969-12-31 18:00:00.000000000 -0600
|+++ coreutils-8.27/lib/mbfile.c	2017-03-11 23:47:38.069058397 -0600
File to patch:

So adding --posix is clearly not the way to go.

Kind regards,

More information about the lfs-dev mailing list