public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Jan Kiszka' via isar-users" <isar-users@googlegroups.com>
To: Anton Mikanovich <amikan@ilbers.de>, isar-users@googlegroups.com
Subject: Re: [PATCH v11 5/8] mmdebstrap: Fix missing dpkg available
Date: Wed, 20 Nov 2024 23:18:45 +0100	[thread overview]
Message-ID: <a26f9dfd-bd74-49bb-b295-78f04de1fc0e@siemens.com> (raw)
In-Reply-To: <20241106082117.1089554-6-amikan@ilbers.de>

On 06.11.24 09:21, Anton Mikanovich wrote:
> In some distros /var/lib/dpkg/available is required for
> do_rootfs_install task.
> The fix for it is present in jessie-or-older mmdebstrap hook in
> Bookworm and later, but maybe-jessie-or-older wrapper do not handle
> distro version check correctly.
> That's why we need to check and apply hook manually or create
> /var/lib/dpkg/available by hand for older distros.
> 
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
>  meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
> index 658d45be..e1c3832d 100644
> --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
> +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc
> @@ -17,6 +17,14 @@ DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = ",gnupg"
>  DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = ",ca-certificates"
>  BOOTSTRAP_TMPDIR = "${WORKDIR}/tempdir"
>  
> +# Fix for /var/lib/apt/available while maybe-jessie-or-older hook do not work
> +MM_HOOK_JESSIE = "/usr/share/mmdebstrap/hooks/jessie-or-older"
> +DPKG_HOOKS ?= "${@'--hook-dir='+d.getVar('MM_HOOK_JESSIE') \
> +              if os.path.isdir(d.getVar('MM_HOOK_JESSIE')) \
> +              else '--customize-hook=\'touch /var/lib/dpkg/available\''}"
> +MMHOOKS:ubuntu-focal ?= "${DPKG_HOOKS}"
> +MMHOOKS:debian-buster ?= "${DPKG_HOOKS}"

This breaks downstream buster (or focal) when setting custom DISTRO. Fix
will follow.

Jan

> +
>  def get_distro_primary_source_entry(d):
>      for source in generate_distro_sources(d):
>          if source[0] == "deb":
> @@ -98,6 +106,7 @@ do_bootstrap() {
>      sudo TMPDIR="${BOOTSTRAP_TMPDIR}" mmdebstrap $bootstrap_args \
>                     $arch_param \
>                     --mode=unshare \
> +                   ${MMHOOKS} \
>                     ${@get_distro_components_argument(d)} \
>                     "${@get_distro_suite(d)}" \
>                     "${WORKDIR}/rootfs.tar.zst" \

-- 
Siemens AG, Technology
Linux Expert Center

-- 
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 email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/a26f9dfd-bd74-49bb-b295-78f04de1fc0e%40siemens.com.

  reply	other threads:[~2024-11-20 22:18 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-06  8:21 [PATCH v11 0/8] Migrate to mmdebstrap Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 1/8] isar-bootstrap: Move common parts to bbclass Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 2/8] meta: Add mmdebstrap recipe Anton Mikanovich
2024-11-07  6:24   ` 'MOESSBAUER, Felix' via isar-users
2024-11-12 16:06     ` Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 3/8] meta: Allow selecting bootstrap providers Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 4/8] testsuite: Allow variable " Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 5/8] mmdebstrap: Fix missing dpkg available Anton Mikanovich
2024-11-20 22:18   ` 'Jan Kiszka' via isar-users [this message]
2024-11-06  8:21 ` [PATCH v11 6/8] mmdebstrap: Move preparations to hooks Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 7/8] isar-bootstrap: Use tar output instead of directory Anton Mikanovich
2024-11-06  8:21 ` [PATCH v11 8/8] user_manual.md: Update boostrap related documentation Anton Mikanovich
2024-11-07  6:26 ` [PATCH v11 0/8] Migrate to mmdebstrap 'MOESSBAUER, Felix' via isar-users
2024-11-14  8:50 ` Uladzimir Bely
2024-11-20  5:34 ` Uladzimir Bely

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a26f9dfd-bd74-49bb-b295-78f04de1fc0e@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=amikan@ilbers.de \
    --cc=jan.kiszka@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox