From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dan.rpsys.net (5751f4a1.skybroadband.com [87.81.244.161]) by mail.openembedded.org (Postfix) with ESMTP id 549487392C for ; Sat, 28 Mar 2015 11:06:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t2SB62fV010092; Sat, 28 Mar 2015 11:06:02 GMT Received: from dan.rpsys.net ([127.0.0.1]) by localhost (dan.rpsys.net [127.0.0.1]) (amavisd-new, port 10024) with LMTP id C2aCtFY1h0JT; Sat, 28 Mar 2015 11:06:02 +0000 (GMT) Received: from [192.168.3.10] ([192.168.3.10]) (authenticated bits=0) by dan.rpsys.net (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id t2SB5k6r010086 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 28 Mar 2015 11:05:57 GMT Message-ID: <1427540746.14020.224.camel@linuxfoundation.org> From: Richard Purdie To: Junling Zheng Date: Sat, 28 Mar 2015 11:05:46 +0000 In-Reply-To: <5516764F.8050805@huawei.com> References: <1427361482-5775-1-git-send-email-zhengjunling@huawei.com> <1427363666.14020.62.camel@linuxfoundation.org> <5513EE0B.5070802@huawei.com> <5513F450.1010701@communistcode.co.uk> <5514025A.4080004@huawei.com> <5514CF16.2020804@huawei.com> <551613A2.10506@huawei.com> <1427532804.14020.220.camel@linuxfoundation.org> <5516764F.8050805@huawei.com> X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Cc: "peifeiyue@huawei.com" , OE-core Subject: Re: [PATCH] file: remove the original magic.h X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Mar 2015 11:06:16 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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