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

Re: [PATCH v5 1/3] automation: Create Yocto docker images


  • To: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Wed, 30 Nov 2022 16:41:56 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v7E+yrdO2pVsYu+qCoQa2KfdQIXmZQ0ArivRQAXTY/s=; b=C1rxVXmIfEV7gcb4Zo4Ypy8j0fajo5DDl19i5y0dKD1HKTUmZza6rZ3ziB0CE0pMUpVycL3zpKGvt5gLTFBAGKfQnV1oLU8ZDfDGgaYE+ULMoHFI7MFOBMH3o3A3zkuuxa7lw2oblU8jwz2vlsrU+QjADmIo/iW6BaKjlV4jB1UlbQFiVg07HuVD338+V6JmIEuMBfbFLHguz4aJR9r48+SDevKshAvQwKavJutZGZNwVY0jicsdEsiQIx9Wkvu7TLoxjeJ8QGt7WmgXXOEXBi+BZhCLOpMNHejU2wNc9CQEDJhM9ynFpJBc6JTaj0IS5576hFVsVpaLb6F8uaz6wA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mI22q9HUpJ2FWnmifpt5/qV0DX+dGluLMnNza9xxyXgs9K2AWm3Xjyhh5BmMgECSSjFbM3Ob6QMfmGq3o1to3iAEM7YB+gue0eayCsuGVGEPzntjScwac9b6uOdAt0zwJU2I1ftiVgIufHYMs7lluaAwkBCsnu4JvKqZucpxzKgXGrcQY8uJ+Ohb9/KtAH+2QAvdeJhDLVuXNfjmRoLFOXI5CIeALtCnjyWgMYCLpcm/GhaRkYyyq7HTgqQZ5FpJ9r+XqgN/R7kswrSY2E3Du06MThHNo7Z2UT3Auth8fg3E+w/HPcvhgI3gI+FtiC+VHhkpTv92oD/UDPkHG4DytQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "michal.orzel@xxxxxxx" <michal.orzel@xxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 16:42:02 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Thread-index: AQHZBLWFmb3GO0y8oEy6bIpMhPppa65XpzsAgAAEqYA=
  • Thread-topic: [PATCH v5 1/3] automation: Create Yocto docker images

Hi Anthony,

> On 30 Nov 2022, at 16:25, Anthony PERARD <anthony.perard@xxxxxxxxxx> wrote:
> 
> On Wed, Nov 30, 2022 at 12:15:07PM +0000, Bertrand Marquis wrote:
>> diff --git a/automation/build/Makefile b/automation/build/Makefile
>> index a4b2b85178cf..72a5335baec1 100644
>> --- a/automation/build/Makefile
>> +++ b/automation/build/Makefile
>> @@ -1,13 +1,18 @@
>> 
>> # the base of where these containers will appear
>> REGISTRY := registry.gitlab.com/xen-project/xen
>> -CONTAINERS = $(subst .dockerfile,,$(wildcard */*.dockerfile))
>> +CONTAINERS = $(filter-out yocto/%,$(subst .dockerfile,,$(wildcard 
>> */*.dockerfile)))
> 
> Nit: while there, could you use ":=" instead of "=" ? The value of
> CONTAINERS is always going to be evaluated by make because it's used as
> a prerequisite of "all", so we can at least tell make to evaluate the
> value right away.

Will do

> 
>> +CONTAINERS_EXTRA =
>> DOCKER_CMD ?= docker
>> 
>> +include yocto/yocto.inc
>> +
>> help:
>>      @echo "Builds containers for building Xen based on different distros"
>>      @echo "To build one run 'make DISTRO/VERSION'. Available containers:"
>>      @$(foreach file,$(sort $(CONTAINERS)),echo ${file};)
>> +    @echo "Extra containers (not built using make all):"
>> +    @$(foreach file,$(sort $(CONTAINERS_EXTRA)),echo ${file};)
> 
> I wonder why the help syntax uses both ${} and $() for make variables, is
> it to confuse people? :-)
> 
> You can write $(file) instead of ${file}, I think this would be less
> confusing. I rarely see ${} been used in make, so seen ${} can be
> confusing. I've learned (relearned?) this alternative syntax only a few
> weeks ago as it's used by automake or autoconf.

Definitely a typo, I will fix that in v6 (you have good eyes)

> 
>>      @echo "To push container builds, set the env var PUSH"
>> 
>> %: %.dockerfile ## Builds containers
>> @@ -16,5 +21,10 @@ help:
>>              $(DOCKER_CMD) push $(REGISTRY)/$(@D):$(@F); \
>>      fi
>> 
>> -.PHONY: all
>> +.PHONY: all clean
>> all: $(CONTAINERS)
>> +
>> +# Remove generated dockerfiles for yocto
>> +clean:
>> +    rm -f yocto/*.dockerfiles
> 
> There's an extra 's', I guess you want to remove "*.dockerfile" instead
> of "*.dockerfiles".

Ack

> 
> You could also add those to a .gitignore, even if there are likely to be
> removed by make.

Sure

Thanks for the review
Bertrand

> 
> 
> Cheers,
> 
> -- 
> Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.