[OE-core] [PATCH] file: remove the original magic.h

Richard Purdie richard.purdie at linuxfoundation.org
Sat Mar 28 11:05:46 UTC 2015


On Sat, 2015-03-28 at 17:37 +0800, Junling Zheng wrote:
> On 2015/3/28 16:53, Richard Purdie wrote:
> > On Sat, 2015-03-28 at 10:36 +0800, Junling Zheng wrote:
> > We ran into this problem in our branches. You need to ensure that your
> > CVE patches just touch magic.h.in and *not* magic.h. If you do that, the
> > timestamp of magic.h.in will be more recent that magic.h and your build
> > will function correctly.
> > 
> > The problem is that patch can patch those two files "at the same time"
> > on fast machines. You should never patch generated filed in patches in
> > OE in general.
> > 
> > Cheers,
> > 
> > Richard
> >
> Hi, Richard
> 
> You're right. My CVE patches indeed touch the original magic.h, and that's also why this problem reproduces probabilistic.
> 
> I remove the modifying of magic.h in my patches, and this problem seems to be fixed.
> 
> However, I still think the origin magic.h is confusing and redundant...:)

There is actually more to this. magic.h is listed as a BUILT_SOURCES
file which means it is not regenerated by the usual dependency magic and
timestamps, only if it doesn't exist or you run make all/check/install.

http://www.gnu.org/software/automake/manual/html_node/Sources.html

So you do need it in your patch however you need to ensure your patch
generates a magic.h which matches magic.h.in.

Cheers,

Richard




More information about the Openembedded-core mailing list