From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a50:ce09:: with SMTP id y9mr12309513edi.91.1599294659808; Sat, 05 Sep 2020 01:30:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:38c6:: with SMTP id r6ls5818142ejd.9.gmail; Sat, 05 Sep 2020 01:30:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5SNuPXyTgBOUgtW0lQuAhwMSaP26QNAZVghfa2PYMc0ThVoFmislEgkqAxUxh8mL0rHs8 X-Received: by 2002:a17:907:b0b:: with SMTP id h11mr11734334ejl.330.1599294659126; Sat, 05 Sep 2020 01:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599294659; cv=none; d=google.com; s=arc-20160816; b=R1gP9VxfXyZ9FzlY/ET7KjwnxwWYMmcH6DSYDoVzVvDJpGgY1iZkTNcQl1E6Kt2uL3 T7lEWDy28TgfKSnHW/gbgcmOVDkqnEfwwWSj+YrptNIJwEL/MpAxxW686vfUPllkW3SJ D/QRPlG2RNazQBGKH3Ep1K2MuOxxYo9sExsriPYcD/KOfAhW6Z2ODwEPB/6CMXj8fs1W qWJ1VFZYHYvEpmiBz/AsBKBFveRFbFp0HPW0jLssko3PH3CwDyElmEYvuZ2aoYfNPHy3 B+UECY1yXvhNOekgezmQ1tvx0BWZ5znQ/RHdsttJgQw9CWyaYWBHp4J9gcPMbUydnWZm thTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date; bh=6DpNyKp+29llFVT7zy+I44ehVzIljCvIGWaEZNtlxqw=; b=tZJjlEM7UlnAGGQPZ9u8gAT1/OBU4poW7wsxSF2QEMnBQN6Ns3opp7H94sLw3PC2hA e/Y4dTFlQFiGgP9/4sfz0g5PBbZmevI9n0QLdNaTNXt8Wy5rdFc/iv1fzednw/RpZgjW THGngSBbB1bjJiaKpLDB2ZgYeLEavQb4Zm1EJ+iV8osOFOC5MfacBfVbcj7CsNRiVAsM 37UMPHKo1C16hrI2dWA2sbqAZL7VnEaXWiBh1giWUcdoc3DfcR6pB2cvEyR+KGVuFypd a0m8xLMHSik9W/mqiIPeUI2cMEMiCMT0zRelGCUd8sgJsbXx/suT3SsQSWMntOT1F7ga zf0Q== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id a16si415840ejk.1.2020.09.05.01.30.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Sep 2020 01:30:59 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 0858Uw20020128 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 5 Sep 2020 10:30:58 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.13.147]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id 0858Uw6j026738; Sat, 5 Sep 2020 10:30:58 +0200 Date: Sat, 5 Sep 2020 10:30:57 +0200 From: Henning Schild To: Vijai Kumar K Cc: Subject: Re: [PATCH v2 03/10] wic-img: Satisfy the quirks of latest wic Message-ID: <20200905103057.2a95e915@md1za8fc.ad001.siemens.net> In-Reply-To: <20200902185624.15044-4-Vijaikumar_Kanagarajan@mentor.com> References: <20200902185624.15044-1-Vijaikumar_Kanagarajan@mentor.com> <20200902185624.15044-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: +9TZHHCkI2gt On Thu, 3 Sep 2020 00:26:17 +0530 Vijai Kumar K 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 > --- > 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}"