quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Quilt-dev] Patching binary files


From: Aidan
Subject: Re: [Quilt-dev] Patching binary files
Date: Fri, 9 Aug 2024 11:03:30 +0100

Hi Jean,

Thanks for the quick reply.

On Fri, 9 Aug 2024, 10:46 Jean Delvare, <jdelvare@suse.de> wrote:
Hi Aidan,

On Thu, 2024-08-08 at 09:26 +0100, Aidan wrote:
> I need to use quilt for patch binary files, however, quilt rejects
> this.
>
> Is this a deliberate decision or does it just need implemented?

This is a technical limitation. Quilt relies on GNU patch to apply the
patches and GNU diff to generate them. GNU diff doesn't support binary
files. I don't think GNU patch supports binary files either, the manual
page mentions a binary mode but I seem to understand it's only about
text file line ending conversion, not actual binary files.

I believe GNU patch and diff do work with binary files.
I've just tested this and it works:

diff --binary --text binary1 binary2 > mypatch

patch binary1 < mypatch



As long as GNU diff and GNU patch do not support binary files, quilt
won't support them either.

> Do you have a recommended approach for patches that require source
> code changes and binary file changes?

Git supports both text and binary files.

Unfortunately I am patching a git repo which contains git submodules. So I can not apply for patches at the top level and have them change the submodules.


--
Jean Delvare
SUSE L3 Support

reply via email to

[Prev in Thread] Current Thread [Next in Thread]