From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 16 Jan 2025 08:01:54 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f187.google.com (mail-lj1-f187.google.com [209.85.208.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 50G71rD3031373 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 16 Jan 2025 08:01:53 +0100 Received: by mail-lj1-f187.google.com with SMTP id 38308e7fff4ca-30232891c1fsf3206521fa.2 for ; Wed, 15 Jan 2025 23:01:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1737010908; cv=pass; d=google.com; s=arc-20240605; b=UJK/okPasFktx6r9w63h3tM6NYadgkjzwGQv+2rdyHoTcYAOH6VWvgb3FxPFaVCDCn 7qUT4uurqNi3MUpiyyjNX2p2FC2tHoMoScWmDEkIf/1PF/gyd+AI/kTD4d0kszA3NRmz wuZBHyv0Si+y1z4MPHRUygXvPZ9aS/dJv4X9TCWqAloixZB8u76WtKTq2rLFd/q5+DEH Kgm2NlSObRs8XIqPRrQKOMCY3tkkuVGnNY9vYRq5GjwVgdmfpgm4kxndcZz5H/5QO8oO N42b0KdkPnhtrRDbPSstTTWu02+FegM3A+YGd/pP/YROb6yiImvAZedPR4mLOjWT9KSA lL0Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:to:from :subject:message-id:sender:dkim-signature; bh=mrawpachxQOYmQheVdVhiuNX2dUDSrzxYvEVrWRQzcA=; fh=B3hJik3/3xaC6chIHuQugmLR8mUiRMeOVMZCWlxVGJ4=; b=IKgaRWyWm2NojK+giu7E4m5jFOSRq4a12Z2U5RI9pn72JxGkI5iH31Waf0YuhzwVM1 cw+HQoByc2PmqG4KjjD5V7Zh5Z7clAF1FjOJOMbX8cK2ExWiWWsebsYIgpq8QKv9IEoC 2W+C62SZBtpulV4O8vYJQmZUCmyCA5vYWf72XEyz7TkMKB/FLcTr3FUXsVww9YPfMm0/ S8tUeK6a5Iztb6r+pjcm4PscpMVnis5yRkmdpiG8gEbdUPzLD+eki7BBJ8e2WOm74yco ZYAMGNX0eDRGE+HSysSFWyZvTjNJrAXkdaZey1d6cr7azkkcbq7yaVn7frwFkfkloECT chNA==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1737010908; x=1737615708; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:user-agent:content-transfer-encoding :references:in-reply-to:date:to:from:subject:message-id:sender:from :to:cc:subject:date:message-id:reply-to; bh=mrawpachxQOYmQheVdVhiuNX2dUDSrzxYvEVrWRQzcA=; b=XgZtKzTVjkEX6uaoO3JzkiIREC1y2l1F5Z7994u3dMK/4g1+jS+qeoXWAMd/cZECCe JN7Mv2CsEnE7DkNqCIDibATE2iaIPn5NkgRoAZaYBxC2dXGJJuTnqG4+d3PlC5uZrRaH 6Qy553MnWe7iz8vAPvPWa1YGUj3/nkKxtZoDTKON/9E8QOlGMlRDR64lBgj6VwYJcXbJ KwvNeFdUablfNKgb7h1M1LO5xIMByNq8J7GaTtMV7RzsohuT9JwK57DXX6DlEpIZ5ByU hFCJ4+dBm6I0fum1ks8WQ7i8cgAyw53bseAoDFIlPumUVkCnaMzfSWNapxthiTEyoPKW h7Tg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737010908; x=1737615708; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :user-agent:content-transfer-encoding:references:in-reply-to:date:to :from:subject:message-id:x-beenthere:x-gm-message-state:sender:from :to:cc:subject:date:message-id:reply-to; bh=mrawpachxQOYmQheVdVhiuNX2dUDSrzxYvEVrWRQzcA=; b=BuXfZTP7qMQlySoQ1GcI7VL5ds36Hui6dCDHyRMa9ybhs3Sh26RNZV2Dab6Tmd08ub fZGyrfgvpCPpj56+V7gka7XqYFp/RAu2ind5QltYNZdh16rju3TuxYqOpfBNq7WlyCjn cqblxVCzpoFt+do95PWitUKDKXZVwIi97I7Qn8Rsmo6c7CL2zT+sm1zinsTPxAFkXgDt HuYzC48nygOBQevtxJd2WD5g+B+KYOza9xjXOakmvrD6GoB8q0kNnaDRdb92BaOuOo77 xijP+r4vfGfDirYL9Dzhps6tgzESR5o0TxRMV79h0DsfcSPqKRhFj+Xrp1eIoLsuewhf GeoA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCW7Fpy7dHaSvowMrzKt28jSqUkifv/Lakj72zBLmoNPUMgm5hYMw/wHdBPzUr5879aWvOJ5@ilbers.de X-Gm-Message-State: AOJu0YykfGFPCz3lUZH52+BoVyPBGPNHihZNRpx3icoZUY8FqipQ719E QL3SUUn5YqMyhfyESdDFiX4kdP1wVKkU/fcptVGdqAURbgG/ZQA2 X-Google-Smtp-Source: AGHT+IG10wKOKyEXawUAODanHHFUA6XlZH34xYUpFVSbJRpMGFw9tsaMt/Si6c2l+Ioeg7xZgH1KZQ== X-Received: by 2002:a2e:a546:0:b0:304:4e03:f9bd with SMTP id 38308e7fff4ca-305f45f6468mr88787971fa.31.1737010907531; Wed, 15 Jan 2025 23:01:47 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:94c4:0:b0:2ff:e298:bc48 with SMTP id 38308e7fff4ca-30637e0b8bbls1308531fa.1.-pod-prod-06-eu; Wed, 15 Jan 2025 23:01:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVhJ/89nOPrKo/man59wZxObq+M/sCCIoxpaC5nMLjUYqmPu2fdkSVQkiOy+ry/tJfetJAcb7N74BIV@googlegroups.com X-Received: by 2002:a05:6512:3a83:b0:542:2990:6e9b with SMTP id 2adb3069b0e04-54284526e66mr9840664e87.14.1737010904762; Wed, 15 Jan 2025 23:01:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737010904; cv=none; d=google.com; s=arc-20240605; b=OTRkMAZ3NEF0n+A7KWMGgor9ffbfbONqhHQhnuFkcsQZHTfyfOLuFHnthPVAnUntP8 TU0LRsskAeDJ4Nt45ZVR8BttpBPjxQ6mzC4hSf1nF50MY+Og36ljgPvJrPwRPTmXIk7u 3S7B1F7V83hP58h/1LyEwmUSfDsJdFQo55YhkchEPxbR6Rqv3yaYsrd6Fd+Q9tBMdVIl X0yEVFn/IYhcakJlLbA/PKuT2XtWVoUEjuZLk9DQNC26/diKRhQWqhqa8D+2uLWESZX1 3B4xQz4MoY8hZjRHJnYweE3MxS+AsOy31VgH+vwOfGXnHYa/J8ysYiTVSOis/9gEDy8M Q+1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id; bh=Q6koDoJ9/YN14AWvzs7nuQzZ59dnjiQ3TRX3L9MCJqU=; fh=IxbeHM4vWxalf1XNf2rnGcQL+r1v0Lr0C6ICsGNNkYw=; b=Co5TbyXOh0Z5ITg9rAXJ2tdRBH63qGF7lTmIJfqmxCF6tdCyaTeM2VptKEbDJaRw7Q PIYWgLOECkxKWKj2yv7WqyX8nw/DK0q7D/5zo03PSgU96R6PRyS0W5dX+zIHU01GAhNH vWLz8pZJ6uD/UtnUdWXj87KHBCHe7jAIISBliLrEMFUVjIpcP8jUrH7bMOKhVzXW0zRp CJtjq8N7Nj1T24al6CyiDkHq0AdbF7vJR7Nwu4idn94xwxFlA1bXZXeq74e9rU1lzv4c EJCIjQ8Y+P9ZX8twk+xUdhxF/TghdGUO1i4AgYzLyF/a526AQ+HU1Gv1Eh6iaMqy5ENv WH7g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-305ff17fd21si2753831fa.4.2025.01.15.23.01.44 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Jan 2025 23:01:44 -0800 (PST) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 50G71gtr031361 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 16 Jan 2025 08:01:43 +0100 Message-ID: <4ed31e979ba932719cf9131b759e579176abd09f.camel@ilbers.de> Subject: Re: [PATCH] imagetypes_container: Enable customization of CMD and ENTRYPOINT From: Uladzimir Bely To: Jan Kiszka , isar-users Date: Thu, 16 Jan 2025 10:01:41 +0300 In-Reply-To: <9c383301-0a7c-471a-9d6d-454fe3a0be16@siemens.com> References: <9c383301-0a7c-471a-9d6d-454fe3a0be16@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: ubely@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: ciCf/v1fwHa7 On Mon, 2025-01-06 at 16:41 +0100, 'Jan Kiszka' via isar-users wrote: > From: Jan Kiszka >=20 > Enable recipes to define their own CMD value and also ENTRYPOINT. > This > permits to build more commonly useful containers. >=20 > Signed-off-by: Jan Kiszka > --- > =C2=A0meta/classes/imagetypes_container.bbclass | 17 +++++++++++++---- > =C2=A01 file changed, 13 insertions(+), 4 deletions(-) >=20 > diff --git a/meta/classes/imagetypes_container.bbclass > b/meta/classes/imagetypes_container.bbclass > index 862ce197..1a6f3669 100644 > --- a/meta/classes/imagetypes_container.bbclass > +++ b/meta/classes/imagetypes_container.bbclass > @@ -1,5 +1,5 @@ > =C2=A0# This software is a part of ISAR. > -# Copyright (C) Siemens AG, 2021 > +# Copyright (C) Siemens AG, 2021-2025 > =C2=A0# > =C2=A0# SPDX-License-Identifier: MIT > =C2=A0# > @@ -11,6 +11,8 @@ USING_CONTAINER =3D > "${@bb.utils.contains_any('IMAGE_BASETYPES', d.getVar('CONTAIN > =C2=A0 > =C2=A0CONTAINER_IMAGE_NAME ?=3D "${PN}-${DISTRO}-${DISTRO_ARCH}" > =C2=A0CONTAINER_IMAGE_TAG ?=3D "${PV}-${PR}" > +CONTAINER_IMAGE_CMD ?=3D "/bin/dash" > +CONTAINER_IMAGE_ENTRYPOINT ?=3D "" > =C2=A0 > =C2=A0python() { > =C2=A0=C2=A0=C2=A0=C2=A0 if not bb.utils.to_boolean(d.getVar('USING_CONTA= INER')): > @@ -24,7 +26,8 @@ python() { > =C2=A0} > =C2=A0 > =C2=A0do_containerize() { > -=C2=A0=C2=A0=C2=A0 local cmd=3D"/bin/dash" > +=C2=A0=C2=A0=C2=A0 local cmd=3D"${CONTAINER_IMAGE_CMD}" > +=C2=A0=C2=A0=C2=A0 local entrypoint=3D"${CONTAINER_IMAGE_ENTRYPOINT}" > =C2=A0=C2=A0=C2=A0=C2=A0 local empty_tag=3D"empty" > =C2=A0=C2=A0=C2=A0=C2=A0 local tag=3D"${CONTAINER_IMAGE_TAG}" > =C2=A0=C2=A0=C2=A0=C2=A0 local oci_img_dir=3D"${WORKDIR}/oci-image" > @@ -35,8 +38,14 @@ do_containerize() { > =C2=A0=C2=A0=C2=A0=C2=A0 sudo rm -rf "${oci_img_dir}" "${oci_img_dir}_unp= acked" > =C2=A0=C2=A0=C2=A0=C2=A0 sudo umoci init --layout "${oci_img_dir}" > =C2=A0=C2=A0=C2=A0=C2=A0 sudo umoci new --image "${oci_img_dir}:${empty_t= ag}" > -=C2=A0=C2=A0=C2=A0 sudo umoci config --image "${oci_img_dir}:${empty_tag= }" \ > -=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --config.cmd=3D"${cmd}" > +=C2=A0=C2=A0=C2=A0 if [ -n "${cmd}" ]; then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sudo umoci config --image "${= oci_img_dir}:${empty_tag}" \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --con= fig.cmd=3D"${cmd}" > +=C2=A0=C2=A0=C2=A0 fi > +=C2=A0=C2=A0=C2=A0 if [ -n "${entrypoint}" ]; then > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 sudo umoci config --image "${= oci_img_dir}:${empty_tag}" \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 --con= fig.entrypoint=3D"${entrypoint}" > +=C2=A0=C2=A0=C2=A0 fi > =C2=A0=C2=A0=C2=A0=C2=A0 sudo umoci unpack --image "${oci_img_dir}:${empt= y_tag}" \ > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 "${oci_img_dir}_unpacked= " > =C2=A0 > --=20 > 2.43.0 >=20 Applied to next, thanks. --=20 Best regards, Uladzimir. --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= 4ed31e979ba932719cf9131b759e579176abd09f.camel%40ilbers.de.