Busybox patch command fails where normal patch succeeds

Denys Vlasenko vda.linux at googlemail.com
Mon Jun 7 00:18:12 UTC 2010


On Friday 04 June 2010 19:40, Rahul Nabar wrote:
> I was trying to patch a file and if I use my CentOS system's regular
> patch command it works but not with busybox patch. It seems that if I
> specify a filename to be patched the regular patch command honors it
> but busybox still insists on using the filename in the patchfile
> itself. Is this a bug or am I misinterpreting how to use the command?
> 
> diff -uN sshd.original sshd.new  > patchfile.sshd
> 
> cat patchfile.sshd
> --- sshd.original       2010-06-04 12:35:50.000000000 -0500
> +++ sshd.new    2010-06-04 12:36:08.000000000 -0500
> @@ -12,6 +12,8 @@
>  # config: /etc/ssh/sshd_config
>  # pidfile: /var/run/sshd.pid
> 
> +#Rahul Nabar June 2010
> +ulimit -l unlimited
> 
>  # source function library
>  . /etc/rc.d/init.d/functions
> 
> patch sshd < patchfile.sshd
> patching file sshd
> 
> cp sshd.original sshd
> 
> busybox patch sshd < patchfile.sshd
> patching file sshd.new
> patch: Bad src file

Please send the patch and the file you apply it to, both
as attachments.
Do not paste them inline, this can mangle them.
-- 
vda


More information about the busybox mailing list