make errors
Denys Vlasenko
vda.linux at googlemail.com
Tue Dec 21 02:05:05 UTC 2010
On Monday 20 December 2010 21:21, David Henderson wrote:
> Denys Vlasenko wrote:
> > On Mon, Dec 20, 2010 at 5:26 PM, David Henderson
> > <dhenderson at digital-pipe.com> wrote:
> >
> >> If after applying all patches from
> >> http://busybox.net/downloads/fixes-1.18.0/
> >> it still doesn't build for you, let me know.
> >>
> >>
> >>
> >> I downloaded all the patches in that directory, but keep running into
> >> problems. I've tried placing the patch file outside and inside of the
> >> busybox-1.18.0 source directory and running "patch
> >> <busybox-1.18.0-*patch_name*" but keep getting an error saying that it can't
> >> find the file to patch and asks where the file is located.
> >>
> >
> > This should work:
> >
> > cd /path/to/busybox-1.18.0
> > cat /path/to/patches/*.patch | patch -p1
> >
> >
> Thanks for the refresher. :) Here's what I'm getting:
>
> $ ls -1
> busybox-1.18.0/
> busybox-1.18.0-buildsys.patch
> busybox-1.18.0-chat.patch
> busybox-1.18.0-hush.patch
> busybox-1.18.0-runsvdir.patch
> busybox-1.18.0-sha.patch
> busybox-1.18.0.tar.bz2
>
> $ cat *.patch | patch -p1
> can't find file to patch at input line 4
> Perhaps you used the wrong -p or --strip option?
> The text leading up to this was:
> --------------------------
> |diff -urpN busybox-1.18.0/Config.in busybox-1.18.0-buildsys/Config.in
> |--- busybox-1.18.0/Config.in 2010-11-22 21:43:21.000000000 +0100
> |+++ busybox-1.18.0-buildsys/Config.in 2010-12-05 23:14:04.000000000 +0100
> --------------------------
> File to patch: ^C
>
> $ cd busybox-1.18.0
> busybox-1.18.0$ cat *.patch | patch -p1
> patching file Config.in
> Reversed (or previously applied) patch detected! Assume -R? [n]
>
> Should I assume they're reversed?
No, you are using wrong patches in your last command:
when you run "cat *.patch | patch -p1"
IN busybox-1.18.0 directory, you are using *.patch
files IN busybox-1.18.0, not on PARENT directpory.
You need to use "cat ../*.patch | patch -p1"
Here is the test I did in an empty temporary directory:
$ wget http://busybox.net/downloads/busybox-1.18.0.tar.bz2
Connecting to busybox.net (140.211.167.224:80)
busybox-1.18.0.tar.b 100% |*****************************| 2080k 00:00:00 ETA
$ wget http://busybox.net/downloads/fixes-1.18.0/busybox-1.18.0-buildsys.patch
Connecting to busybox.net (140.211.167.224:80)
busybox-1.18.0-build 100% |*****************************| 2025 --:--:-- ETA
$ wget http://busybox.net/downloads/fixes-1.18.0/busybox-1.18.0-chat.patch
Connecting to busybox.net (140.211.167.224:80)
busybox-1.18.0-chat. 100% |*****************************| 1197 --:--:-- ETA
$ wget http://busybox.net/downloads/fixes-1.18.0/busybox-1.18.0-hush.patch
Connecting to busybox.net (140.211.167.224:80)
busybox-1.18.0-hush. 100% |*****************************| 2072 --:--:-- ETA
$ wget http://busybox.net/downloads/fixes-1.18.0/busybox-1.18.0-runsvdir.patch
Connecting to busybox.net (140.211.167.224:80)
busybox-1.18.0-runsv 100% |*****************************| 792 --:--:-- ETA
$ wget http://busybox.net/downloads/fixes-1.18.0/busybox-1.18.0-sha.patch
Connecting to busybox.net (140.211.167.224:80)
busybox-1.18.0-sha.p 100% |*****************************| 4189 00:00:00 ETA
$ tar xf busybox-1.18.0.tar.bz2
$ cd busybox-1.18.0
$ cat ../*.patch | patch -p1
patching file Config.in
patching file include/applets.src.h
patching file scripts/gen_build_files.sh
patching file miscutils/chat.c
patching file shell/hush.c
patching file runit/runsvdir.c
patching file libbb/pw_encrypt_sha.c
$
IOW: it works.
--
vda
More information about the busybox
mailing list