All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Junling Zheng <zhengjunling@huawei.com>
Cc: "peifeiyue@huawei.com" <peifeiyue@huawei.com>,
	OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] file: remove the original magic.h
Date: Sat, 28 Mar 2015 11:05:46 +0000	[thread overview]
Message-ID: <1427540746.14020.224.camel@linuxfoundation.org> (raw)
In-Reply-To: <5516764F.8050805@huawei.com>

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



  reply	other threads:[~2015-03-28 11:06 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  9:18 [PATCH] file: remove the original magic.h Junling Zheng
2015-03-26  9:54 ` Richard Purdie
2015-03-26 11:31   ` Junling Zheng
2015-03-26 11:58     ` Jack Mitchell
2015-03-26 12:58       ` Junling Zheng
2015-03-26 13:08         ` Burton, Ross
2015-03-27  3:31           ` Junling Zheng
2015-03-27  9:56             ` Burton, Ross
2015-03-28  2:36               ` Junling Zheng
2015-03-28  8:53                 ` Richard Purdie
2015-03-28  9:37                   ` Junling Zheng
2015-03-28 11:05                     ` Richard Purdie [this message]
2015-03-30  1:49                       ` Junling Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1427540746.14020.224.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=peifeiyue@huawei.com \
    --cc=zhengjunling@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.