public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Cc: <isar-users@googlegroups.com>
Subject: Re: [PATCH v2 03/10] wic-img: Satisfy the quirks of latest wic
Date: Sat, 5 Sep 2020 10:30:57 +0200	[thread overview]
Message-ID: <20200905103057.2a95e915@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <20200902185624.15044-4-Vijaikumar_Kanagarajan@mentor.com>

On Thu, 3 Sep 2020 00:26:17 +0530
Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com> wrote:

> The latest WIC doesnot use fakeroot if
> pseudo_dir(IMAGE_ROOTFS/../pseudo) is non-existent. This results in
> wic_fakeroot not being used. Create a dummy pseudo_dir to satisfy wic.
> 
> WIC hardcodes the python(/usr/bin/python3-native/python3) to be used
> while running bmaptool. The above path is OE specific and hence breaks
> build in ISAR. Create a symbolic link in the above location to satisfy
> wic.
> 
> Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> ---
>  meta/classes/wic-img.bbclass | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/classes/wic-img.bbclass
> b/meta/classes/wic-img.bbclass index afab394..a2c9627 100644
> --- a/meta/classes/wic-img.bbclass
> +++ b/meta/classes/wic-img.bbclass
> @@ -143,6 +143,7 @@ EOSUDO
>      export FAKEROOTCMD=${FAKEROOTCMD}
>      export BUILDDIR=${BUILDDIR}
>      export MTOOLS_SKIP_CHECK=1
> +    mkdir -p ${IMAGE_ROOTFS}/../pseudo
>  
>      # create the temp dir in the buildchroot to ensure uniqueness
>      WICTMP=$(cd ${BUILDCHROOT_DIR}; mktemp -d -p tmp)
> @@ -157,22 +158,31 @@ EOSUDO
>            IMAGE_FULLNAME="$6"
>            IMAGE_BASENAME="$7"
>            shift 7
> -
> +          # The python path is hard-coded as
> /usr/bin/python3-native/python3 in wic. Handle that.
> +          mkdir -p /usr/bin/python3-native/
> +          if [ $(head -1 $(which bmaptool) | grep python3) ];then
> +            ln -s /usr/bin/python3 /usr/bin/python3-native/python3
> +          else
> +            ln -s /usr/bin/python2 /usr/bin/python3-native/python3
> +          fi

Can this be moved to wic_fakeroot? That script was designed to hold all
the weird hacks ...

I guess you need to "ln -sf" to make that whole thing executable
multiple times.

Can you explain why we need the case where python2 is linked as python3?

>            export PATH="$ISARROOT/bitbake/bin:$PATH"
>            "$ISARROOT"/scripts/wic create "$WKS_FULL_PATH" \
>              --vars "$STAGING_DIR/$MACHINE/imgdata/" \
>              -o "/$WICTMP/${IMAGE_FULLNAME}.wic/" \
>              --bmap \
> -            -e "$IMAGE_BASENAME" $@' \
> +            -e "$IMAGE_BASENAME" $@
> +          rm -rf /usr/bin/python3-native' \

This looks like the rm is in the middle of wic, should probably come
after.

>                my_script "${ISARROOT}" "${WKS_FULL_PATH}"
> "${STAGING_DIR}" \ "${MACHINE}" "${WICTMP}" "${IMAGE_FULLNAME}"
> "${IMAGE_BASENAME}" \ ${WIC_CREATE_EXTRA_ARGS}
> +
>      sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta
> ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true WIC_DIRECT=$(ls -t
> -1 ${BUILDCHROOT_DIR}/$WICTMP/${IMAGE_FULLNAME}.wic/*.direct | head
> -1) sudo chown -R $(id -u):$(id -g) ${BUILDCHROOT_DIR}/${WICTMP} mv
> -f ${WIC_DIRECT} ${WIC_IMAGE_FILE} mv -f ${WIC_DIRECT}.bmap
> ${WIC_IMAGE_FILE}.bmap rm -rf ${BUILDCHROOT_DIR}/${WICTMP}
> +    rm -rf ${IMAGE_ROOTFS}/../pseudo
>  }
>  
>  do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"


  reply	other threads:[~2020-09-05  8:30 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-02 18:56 [PATCH v2 00/10] WIC update Vijai Kumar K
2020-09-02 18:56 ` [PATCH v2 01/10] wic: Update to the latest wic from openembedded core Vijai Kumar K
2020-09-05  9:00   ` Henning Schild
2020-09-05  9:21     ` vijai kumar
2020-09-02 18:56 ` [PATCH v2 02/10] wic/plugins: Fix wic plugins to work with the latest wic Vijai Kumar K
2020-09-02 18:56 ` [PATCH v2 03/10] wic-img: Satisfy the quirks of " Vijai Kumar K
2020-09-05  8:30   ` Henning Schild [this message]
2020-09-05 16:24     ` vijaikumar....@gmail.com
2020-09-09 14:52       ` Henning Schild
2020-09-02 18:56 ` [PATCH v2 04/10] oe.path: Add copyhardlink() helper function Vijai Kumar K
2020-09-02 18:56 ` [PATCH v2 05/10] lib/oe/path: try hardlinking instead of guessing when it might fail Vijai Kumar K
2020-09-02 18:56 ` [PATCH v2 06/10] wic_fakeroot: Handle standalone pseudo invocations Vijai Kumar K
2020-09-05  8:38   ` Henning Schild
2020-09-05 15:19     ` vijaikumar....@gmail.com
2020-09-05  9:19   ` Henning Schild
2020-09-05 15:22     ` vijaikumar....@gmail.com
2020-09-02 18:56 ` [PATCH v2 07/10] meta-isar/conf: Add provision to debug WIC Vijai Kumar K
2020-09-02 18:56 ` [PATCH v2 08/10] debian-common: Add tar as a dependency for wic Vijai Kumar K
2020-09-02 19:02   ` [PATCH v2 09/10] wic: misc: Add /bin to the list of searchpaths Vijai Kumar K
2020-09-02 19:02     ` [PATCH v2 10/10] meta-isar/canned-wks: Remove /boot mountpoint Vijai Kumar K
2020-09-05  8:58       ` Henning Schild
2020-09-05 16:06         ` vijaikumar....@gmail.com
2020-09-09 15:09           ` Henning Schild
2020-09-14  5:32             ` vijaikumar....@gmail.com
2020-09-05  8:45     ` [PATCH v2 09/10] wic: misc: Add /bin to the list of searchpaths Henning Schild
2020-09-05  9:33       ` vijai kumar
2020-09-03  5:46 ` [PATCH v2 00/10] WIC update vijaikumar....@gmail.com
2020-09-05  9:04   ` Henning Schild
2020-09-05  9:25     ` vijai kumar

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=20200905103057.2a95e915@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=Vijaikumar_Kanagarajan@mentor.com \
    --cc=isar-users@googlegroups.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