From patchwork Tue Jul 9 17:31:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 193 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 09 Jul 2024 19:31:51 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f191.google.com (mail-lj1-f191.google.com [209.85.208.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 469HVpQi006542 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 9 Jul 2024 19:31:51 +0200 Received: by mail-lj1-f191.google.com with SMTP id 38308e7fff4ca-2ee87e69b53sf60142071fa.0 for ; Tue, 09 Jul 2024 10:31:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1720546304; cv=pass; d=google.com; s=arc-20160816; b=go+9nMhE9VTVtKALWEyZ5tVYoMBQohlPZjPBls9Z3hWqFL+PxRcK3zUsf3dxsJyuEf vFfocacj3X2Iq+tPHfaTL8BjGpHlLtmYaAnSM99ACBSa07JikonKZ359vBz6uP1dOkI7 yUNAcOWjYReFaG3t64t02FE+d+RefTfsbWgNj/WDAip0Yfcf5WCVq7NPW54O9fd5UfMm ZHpdb3N7OBUwL3tz6y9SxQc/7Q1bvyuhAXoRS8E1J5Nz7BwmnK3m0yNvNnd1bOOVIKSa Ad9H1yKTrjQR/gFk6t86NGw5VpPhUc4o3it3c1PajPM+vB2cm4hU5U1RMmY/89+cs3fx 1B1w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :message-id:date:subject:to:from:dkim-signature; bh=ZrcV44522oHSrBQnUYFdib8lEsVXvfRqNoHHejFJcis=; fh=RyGNNbNQ+lkpmnfpJGNVXLLVTPwPTu2g58S+bPqLMME=; b=Kd8PZifugkmm2qd+rBSf3D1s9JyTVRLsvQVzUsWziXwnjpXRfEgfmBoxbMeKKeq9Q0 B7xT8QbPgqVESboCKWEkj8nLEtlYEC7nsIL1NJRwA9K3jYxtfxBn+P7XQKxmsGntHfue S4+TGbIwnjybsikNIBUtKUrQHKMJhGgqtM1QAQ8jiAO81VBoMN5oMCD+DcUNsfHMDYvN h59Q8LX/AgytscQBNCWfaKoqmX3dTSzT3nEEarXGHVqqDiDDjYoKQyPm/H7bX3Zz/eRT HbqydJa2SUIOM3aFICVa0TyFkr6DnK8ucjuKg+AIv9w18PHlwzjC9gbKFRCPHgE4edeW FDnQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=WpK0ihML; spf=pass (google.com: domain of fm-294854-20240709173139e2ce8e6eca79f45fb9-ugaaxl@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-20240709173139e2ce8e6eca79f45fb9-UgAaXl@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1720546304; x=1721151104; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ZrcV44522oHSrBQnUYFdib8lEsVXvfRqNoHHejFJcis=; b=FdNLwqv0qqSONG5lM2CUyOo9QtjKeMxdgzjUbqMAQ0ottJLymgY4smZ68SYpA5IBe5 l4i7Kc9FxbGxyYP5lkyJpi3edCW7fc34j2L3t6Rx4UMf1c7AAWK5kBWfom5wvpSjQ3kH eWJbPFXWjcQv5Ci8V2aJ1yh7pCupAMTMfwsIYsdl5wreNNSAo29PxavhMyaQgneXvIMm iiKE6Oc1AN9ouDK91D6JPu110yNzNrw4JyQT+7T+bqUdlPjwHlCD+L4N2mXt2HAx2m4T Y6tdPWhedNuFEaf7u1ov/ifBQuc75OnxOLefhcipB3dCDsnmFhZvsW81Nf4sVd6qCM9z q2ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720546304; x=1721151104; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ZrcV44522oHSrBQnUYFdib8lEsVXvfRqNoHHejFJcis=; b=bAhXBcXspa/W1n9JrcNWVseDoUjkLKCKHZeNLQUMtULg6B6mSSRSZq6uKIkc26ouVl 5rD56glQHfyuEGVkapfYHawubDoqBffZt502KHsRDIUaUlpW73Ui/7T0NPXuyk+N+kna 0vrdXTUxr86x+l8BTb5fCxlhyG6aSv98pPRrCFm/TC6Mr2nrt9UDkH7HQsAnQBvNm+uu VAY8VsjTSTnw3hFw0QpSfyO/OaPpkzacWrREiSIsgBBF4QLfbjIzxuemgpElZLLIFMe4 rJoC3go53WqJjOh18oubHcVrvF7klFdm/e7lRW5VnKwrqIHuXbaYh7r8nWVSDTD2JsKC 8xLg== X-Forwarded-Encrypted: i=2; AJvYcCXopzvSzn/zEumibizFGc4ApKgq/7dBLka/GgHiAcLS3plsx4Kv7O9G05WdcYc/gsjnF3zUQ/qOokphztYvHJWeCAzWTU0= X-Gm-Message-State: AOJu0YzSIERcoDz0HfbEgwKb4bWcVmjvH82lypM/Ld4/lfQHDdUX9RKu I3V9XQJRxM7mph5gg7krUfCYPvczVtj4BpoaYkY847UhlPSiBGgb X-Google-Smtp-Source: AGHT+IEXgDb0gZ7mhRmx66vWyhFM8NfNlk/pd0Pw/+dV4b0tCI0x74jYhIqbpmh/xFJa4HSCNw8aag== X-Received: by 2002:a2e:804a:0:b0:2ee:8f3d:e68d with SMTP id 38308e7fff4ca-2eeb3188cddmr26151831fa.44.1720546304040; Tue, 09 Jul 2024 10:31:44 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:651c:335:b0:2ec:4f80:327a with SMTP id 38308e7fff4ca-2ee8ccbab59ls17800761fa.0.-pod-prod-05-eu; Tue, 09 Jul 2024 10:31:42 -0700 (PDT) X-Received: by 2002:a05:651c:23b:b0:2ec:56b9:258b with SMTP id 38308e7fff4ca-2eeb316b00amr27234511fa.33.1720546300712; Tue, 09 Jul 2024 10:31:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1720546300; cv=none; d=google.com; s=arc-20160816; b=B65v9JAwZRcCWKHiQcsAVj/tVyJnlohkVmyFieRRp3zbJWOtB2a6a4OvmBQ8mJo/O/ vnedgYjAQP74JJ4au46uVC/+JCT5dz4qaHirjWxpllmPOgG1+ioQRybY0Y8SnMoxLjdO lD2kwEjCJAiWJZZC5eqoEJGAXSZF/jok7vEDqdkjFsZoGAAOX7DuT959PaRJCTo44Erk hfk2rN94xkTKzlAHt1Y00KfXpCDZQdySrZH5L0L79quZAyYcuBx8xBUBV+IceMsge80K j35D9H/13ErHaRAOGKJ9yKspVUZSu5oxhQ+af2xS8aAUpuIoc7j3Z5LAE6pfxprbUHp6 a4GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:message-id:date :subject:to:from:dkim-signature; bh=ep0F+fRg/jyt0Ld7qAg7BpCD/ddcFuBZ6IR0s9BDDKU=; fh=hOBXq6nisExkIRIwN8IDOmOCLKwX8PM0ANlxQbNMEqA=; b=HXfoDfV6KCJtTMGw5wYNzA9U8KWR/FjZ301U71UE8zwQsIOyoJN0EL6oMIdBvVjdq1 L48S3/MdO/aX+6AKGa+U4NPL33KGdpeX02hJr0tQ4Hv3UIcGLOJ44MTMziYDGcmvDoPR 6cGHXkvhgDvDIbxuRibrBauP+mddakQ57btDECowCsRG1SpMlLGvC8hBxyK9/Zy+X4df 88CCXAiA7EqR+YOdbZ2tWHW9I5/ureDUrSP1Bku2LIK7OYbl1drSDGslDw+nxPnpgbRQ qBLFYEA4p3BGkGc/TU42/JHdZpg/3RJ1nl/CVwxfHUi2HUupTDQ5MLRPajGymwD6+vYl d+bw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=WpK0ihML; spf=pass (google.com: domain of fm-294854-20240709173139e2ce8e6eca79f45fb9-ugaaxl@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-20240709173139e2ce8e6eca79f45fb9-UgAaXl@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id 38308e7fff4ca-2eebd3b1c8esi93061fa.8.2024.07.09.10.31.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Jul 2024 10:31:40 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-294854-20240709173139e2ce8e6eca79f45fb9-ugaaxl@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20240709173139e2ce8e6eca79f45fb9 for ; Tue, 09 Jul 2024 19:31:40 +0200 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Subject: [RFC][PATCH 0/3] Introduce container fetcher and pre-loader Date: Tue, 9 Jul 2024 19:31:36 +0200 Message-ID: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=WpK0ihML; spf=pass (google.com: domain of fm-294854-20240709173139e2ce8e6eca79f45fb9-ugaaxl@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-20240709173139e2ce8e6eca79f45fb9-UgAaXl@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka Reply-To: Jan Kiszka 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-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= We noticed internally that there are at least 3 implementations for solving the task of pre-loading container images into isar-built base systems, may it be that the images are not publicly available or the device is only poorly connected, if at all. This series tries to solve the task generically - hopefully. This still needs at least documentation and CI hook-up, possibly more, but I'd like to invite colleagues and the community in general to early feedback. BTW, patch 1 also introduces a fairly nice pattern to register a real bitbake fetcher, rather than meddling with SRC_URI like we do for apt:// right now. Therefore, I'm planning to refactor the apt fetcher soon as well, maybe even with progress reporting... Jan Jan Kiszka (3): Introduce fetcher from container registries container-loader: Introduce helper to load container images into local registry meta-isar: Add demo packages for installing prebuilt containers kas/package/Kconfig | 19 ++++ kas/package/pkg_prebuilt-docker-img.yaml | 9 ++ kas/package/pkg_prebuilt-podman-img.yaml | 9 ++ .../prebuilt-docker-img_0.1.bb | 10 +++ .../prebuilt-podman-img_0.1.bb | 10 +++ meta/classes/dpkg-base.bbclass | 6 ++ meta/lib/container_fetcher.py | 90 +++++++++++++++++++ .../container-loader/container-loader.inc | 76 ++++++++++++++++ .../container-loader/docker-loader.inc | 10 +++ .../files/container-loader.service.tmpl | 11 +++ .../files/container-loader.sh.tmpl | 13 +++ .../container-loader/podman-loader.inc | 10 +++ 12 files changed, 273 insertions(+) create mode 100644 kas/package/pkg_prebuilt-docker-img.yaml create mode 100644 kas/package/pkg_prebuilt-podman-img.yaml create mode 100644 meta-isar/recipes-app/prebuilt-container/prebuilt-docker-img_0.1.bb create mode 100644 meta-isar/recipes-app/prebuilt-container/prebuilt-podman-img_0.1.bb create mode 100644 meta/lib/container_fetcher.py create mode 100644 meta/recipes-support/container-loader/container-loader.inc create mode 100644 meta/recipes-support/container-loader/docker-loader.inc create mode 100644 meta/recipes-support/container-loader/files/container-loader.service.tmpl create mode 100755 meta/recipes-support/container-loader/files/container-loader.sh.tmpl create mode 100644 meta/recipes-support/container-loader/podman-loader.inc