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

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


  • To: Bertrand Marquis <bertrand.marquis@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Wed, 30 Nov 2022 16:25:14 +0000
  • Authentication-results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, <michal.orzel@xxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • Delivery-date: Wed, 30 Nov 2022 16:25:32 +0000
  • Ironport-data: A9a23:RgkRoKA6FcRjYhVW//7jw5YqxClBgxIJ4kV8jS/XYbTApDkggmYGx mQcWD+OOPreZWP3Kd50O4zk8BkBsZLVzYNqQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8nk/nNHuCnYAL9EngZbRd+Tys8gg5Ulec8g4p56fC0GArIs t7pyyHlEAbNNwVcbyRFtcpvlDs15K6o4WpD5gRkDRx2lAS2e0c9Xcp3yZ6ZdxMUcqEMdsamS uDKyq2O/2+x13/B3fv8z94X2mVTKlLjFVDmZkh+AsBOsTAbzsAG6Y4pNeJ0VKtio27hc+ada jl6ncfYpQ8BZsUgkQmGOvVSO3kW0aZuoNcrLZUj2CA6IoKvn3bEmp1T4E8K0YIw3/dNC25N9 aIjKDkHcRqKrOSrmryYRbw57igjBJGD0II3v3hhyXfSDOo8QICFSKLPjTNa9G5u3IYUR6+YP pdHL2o0BPjDS0Qn1lM/AZQinOCulz/nfidRsl69rqsr+WnDigd21dABNfKFKoDTH5oFxC50o Erj8W6jUyM6EeCD1DuA/VmP2uHdswHSDdd6+LqQqacx3Qz7KnYoIBYfT1e8rNGyg1SyXN8ZI EsRkgI1trQ7/kGvStj7XjW7rWSCsxpaXMBfe8U/6QqNw66S5ByLC2wsRztNLtchsaceTzEwy kWAmd+vADV1qaCUUlqU7LLSpjS3UQAFIGlHaSIaQA8t59j4vJp1nh/JVsxkEqO+kpvyAz6Y/ tyRhHFg3fNJ15dNjvjluwCc696xmnTXZisk3A/YXWL71QNwbpGvbqeu9ALVzvkVee51UWK9l HQDnsGf6sUHApeMiDGBTY0xIV252xqWGGaC2AAyRvHN4xzooif+Jt4IvFmSMW8zaq45lSnVj Fg/UO+7zLtaJzOUYKB+eOpd4Ox6nPG7RbwJuh05B+eig6SdlifdpEmChmbKhQgBdXTAdolhU ap3ie72UR4n5V1PlVJavds1374x3TwZzmjOX539xBnP+ePAOi/KFelbbQXSMr5RAEa4TOP9q Y432yyikkU3bQEDSnOPrd57wa4ichDX+qwaW+QIL7Xec2KK6UkqCuPLwKNJRmCWt/09qws8x VnkAhUw4AOm1RX6xfCiNigLhEXHAcwu8hrW/EUEYT6V5pTUSdzwtPpBL8tsIeVPGS4K5accc sTpsv6oWpxnIgkrMRxHBXUhhOSOrCiWuD8=
  • Ironport-hdrordr: A9a23:l2CC+KqCrdc5WIVk9edn4qQaV5oReYIsimQD101hICG9JPbo8P xG+85rtiMc6QxwZJhOo7u90cW7K080lqQV3WByB9iftVLdyQ+VxehZhOPfKlvbdhEWndQy6U 4PScRD4HKbNykdsS5XijPIcerJYbO8gcWVuds=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

> +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.

>       @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".

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


Cheers,

-- 
Anthony PERARD



 


Rackspace

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