From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6617812835611181056 X-Received: by 2002:a7b:c018:: with SMTP id c24-v6mr372774wmb.7.1541621783308; Wed, 07 Nov 2018 12:16:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:8212:: with SMTP id 18-v6ls4696630wrb.29.gmail; Wed, 07 Nov 2018 12:16:22 -0800 (PST) X-Google-Smtp-Source: AJdET5dbu1AFsqYrfw/yT/5YdcvG7EU7JL0YN9/X/AwM5Y2dmus12aFUq9c69WD0GDVXF3S0epdu X-Received: by 2002:adf:e948:: with SMTP id m8-v6mr362224wrn.6.1541621782844; Wed, 07 Nov 2018 12:16:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541621782; cv=none; d=google.com; s=arc-20160816; b=fIhq9hEjkwiskIHe84zGZVCO2vgMa4ADtu5AzwLdD/ZU12Lg/xxmHYvnFmGmsztlnR MO60IlTTvAZ5PTjx+mZaizz9Tsy2skoG7vqQWcXeAD8z95Ff3Ds/Bfd/tVTp7vEmKsvE AwoQ+8fG5QFw6OMI7VQ7N9ZtFXNhpsFnggWcZMUicxwxrlexRqYRMKXX3S0Jxyy+QNqj vla2F8RWAzBO/TmaDbQhH3fTZkLulu5Jsurv6VYl7zDtI1KSNrSlLbBRnfwHbfo+V/K9 9ZdmgbxTCYpPl82qZ2XE2m1pLgzUYV5qNdE+isEdzwvWek8XF5PNS1spSE3Uzn10o4Aq LLwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=G7m20ezbzC/lt45uUIuM/M6XzMl8Q7bxWOAMcv7WuhY=; b=Kq7WyKokj2oPUDNzoYWO1T+XcShaXjmlW6Ta+ACejZT80AVv9n7v4G1Liin2rjWjNP pK/RaVORKpCbGIX9iE4z9aLx2/Q46h6ohP2dQ+zKf9Ih1vmw352UV1NvD+4xtcykwzBx XEANxVId/deZrCJlvk/rwkhzKpQWEHW5f2A+Qpn6oVol4dF3vASClzhCOoQ2oEj/dmCt +rHeM4Ta3ZoGn159kSPCNX0UWkZj/9VYhAFTjvv2P28ToHr3b5X69W/losFtbN2jhqj2 8XVpUAfxI1vqtAzh78OCYKHJMrw+ibO5EP+mJ4xgwj731z/BMqowObLJdsRi8g64dFq8 N3bw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JpjopxO0; spf=pass (google.com: domain of chombourger@gmail.com designates 2a00:1450:4864:20::233 as permitted sender) smtp.mailfrom=chombourger@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com. [2a00:1450:4864:20::233]) by gmr-mx.google.com with ESMTPS id u13-v6si51174wrn.3.2018.11.07.12.16.22 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 12:16:22 -0800 (PST) Received-SPF: pass (google.com: domain of chombourger@gmail.com designates 2a00:1450:4864:20::233 as permitted sender) client-ip=2a00:1450:4864:20::233; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JpjopxO0; spf=pass (google.com: domain of chombourger@gmail.com designates 2a00:1450:4864:20::233 as permitted sender) smtp.mailfrom=chombourger@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-lj1-x233.google.com with SMTP id t22-v6so15921334lji.7 for ; Wed, 07 Nov 2018 12:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=G7m20ezbzC/lt45uUIuM/M6XzMl8Q7bxWOAMcv7WuhY=; b=JpjopxO0N5ftUi8ZIdVE48Dl6ySvbsRddhAroaerldjTqnS6Qsk4FUsFJkUpyYXpJV Pevn+Ipu9avfjBwwRdpw9YaKcJkw2aq5oxokK/DkjHMbUZ2zrvnS4JFx6fjsUASorxoW a7CVNEgYURcS475wrISA8FKT/gMjMIwuXzCzYxjrjT93cfudeXLRlT9eWJEP1qrioFVH rfxrxuLpnCxclPABrEycbAw9v7qVixcwwDYyuYrbsrCuu58qpO7EuVX/L5kTH6lVpQUs R42fb7XvozWG2oAqvH5QxsHwhBFYOJ85/5ht6QY1Bm55Fd1Z8JYW5ZblhgLw1mAn2ljr 9bNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=G7m20ezbzC/lt45uUIuM/M6XzMl8Q7bxWOAMcv7WuhY=; b=aEVtfCzk3/SMnsgGFWWPNMEyK9FEJJUFAEq0Z7AwDT26hjAd2SX3jV+OoeXfxlBBFn ox36T5mZUHTVCIH3DgSIopIZmRQ2C+NCXzDoh3/efJ9rh1gfFRggwJ/3oytZmsNDHc11 JnD6ECU8IT70yNvyZLfT6XmZuSX2BbpjptoIFJHGXCih9xjhzJyPTbclTgIrJZb0QudZ NmBH+uGXjRKaeTtyxaQQDUfYYRWDJoEH7W8Bzb9tm9hL0H4akkEEAd7D5zwl7GYri49U TC8Bl3ZXXwFBe9J43zecBNfu3BWKmKnLoXY10As3AxFGSSBs3mL8iiV5sggm0NEeot3n M01Q== X-Gm-Message-State: AGRZ1gIfP0U0mAaSPzz2uMbOLjqiPaiZufegSNJVxAHW3npI8r02hzSb bNSIKMxOXe9uv1Y9On6qkkErmvzd3AOsy6OYA9c= X-Received: by 2002:a2e:c52:: with SMTP id o18-v6mr1066370ljd.94.1541621782070; Wed, 07 Nov 2018 12:16:22 -0800 (PST) MIME-Version: 1.0 References: <57847f7a-9b85-65ef-b11e-8952bf532e0f@siemens.com> <20181101101302.8674-1-Cedric_Hombourger@mentor.com> <20181101101302.8674-2-Cedric_Hombourger@mentor.com> <20181107194531.17356c59@md1za8fc.ad001.siemens.net> In-Reply-To: From: Cedric Hombourger Date: Wed, 7 Nov 2018 21:16:08 +0100 Message-ID: Subject: Re: [PATCH v3 2/2] isar-image: refactor do_rootfs() To: Henning Schild Cc: Cedric Hombourger , isar-users@googlegroups.com Content-Type: multipart/alternative; boundary="000000000000b2cbcb057a18cada" X-TUID: pq6cSZWyGsJW --000000000000b2cbcb057a18cada Content-Type: text/plain; charset="UTF-8" Hi again, My test build on a machine _without_ a direct Internet connection has completed. Any idea how I can reproduce your issue? or help troubleshoot? Note: tested with HEAD = 60db83cdcae60bdca6d3e3ed2cc7c44712d4dd91 Cedric On Wed, 7 Nov 2018 at 20:46, Cedric Hombourger wrote: > Hi Henning, > > I apologize if that's the case. On my side, the proxy appears to be used > just fine. I have added a trace in isar_image_gen_rootfs() and I can see: > > DEBUG: Executing python function do_rootfs > DEBUG: Executing shell function root_cleandirs > DEBUG: Shell function root_cleandirs finished > DEBUG: Executing shell function isar_image_gen_fstab > DEBUG: Shell function isar_image_gen_fstab finished > DEBUG: Executing shell function isar_image_gen_rootfs > ######## http_proxy=http://127.0.0.1:3142 ########## > > I also checked my apt-cacher-ng and I saw a bunch of requests coming in > while do_rootfs was executing. > Will double-check on a machine that does not have direct access to the > Internet to make sure. > > Cedric > > On Wed, 7 Nov 2018 at 19:45, Henning Schild > wrote: > >> Am Thu, 1 Nov 2018 11:13:02 +0100 >> schrieb Cedric Hombourger : >> >> > Split the do_rootfs() shell function into four (smaller) shell >> > functions to generate the fstab file (isar_image_gen_fstab), populate >> > the root file-system (isar_image_gen_rootfs), configure it >> > (isar_image_conf_rootfs) and perform some house-keeping >> > (isar_image_cleanup). do_rootfs is now a python function and >> > sequentially calls the helper functions listed above. >> > >> > Signed-off-by: Cedric Hombourger >> > --- >> > meta/classes/isar-image.bbclass | 15 ++++++++++++++- >> > 1 file changed, 14 insertions(+), 1 deletion(-) >> > >> > diff --git a/meta/classes/isar-image.bbclass >> > b/meta/classes/isar-image.bbclass index ec2b9e3..e0508be 100644 >> > --- a/meta/classes/isar-image.bbclass >> > +++ b/meta/classes/isar-image.bbclass >> > @@ -21,7 +21,7 @@ ISAR_RELEASE_CMD ?= "${ISAR_RELEASE_CMD_DEFAULT}" >> > do_rootfs[root_cleandirs] = "${IMAGE_ROOTFS} \ >> > ${IMAGE_ROOTFS}/isar-apt" >> > >> > -do_rootfs() { >> > +isar_image_gen_fstab() { >> > cat > ${WORKDIR}/fstab << EOF >> > # Begin /etc/fstab >> > /dev/root / auto >> > defaults 0 0 @@ -33,11 +33,15 @@ >> > devtmpfs /dev devtmpfs >> > mode=0755,nosuid 0 0 # End /etc/fstab >> > EOF >> > +} >> > >> > +isar_image_gen_rootfs() { >> > setup_root_file_system --clean --keep-apt-cache \ >> > --fstab "${WORKDIR}/fstab" \ >> > "${IMAGE_ROOTFS}" ${IMAGE_PREINSTALL} ${IMAGE_INSTALL} >> > +} >> > >> > +isar_image_conf_rootfs() { >> > # Configure root filesystem >> > if [ -n "${DISTRO_CONFIG_SCRIPT}" ]; then >> > sudo install -m 755 "${WORKDIR}/${DISTRO_CONFIG_SCRIPT}" >> > "${IMAGE_ROOTFS}" @@ -45,7 +49,9 @@ EOF >> > >> "${BAUDRATE_TTY}" >> > sudo rm "${IMAGE_ROOTFS}/${DISTRO_CONFIG_SCRIPT}" >> > fi >> > +} >> > >> > +isar_image_cleanup() { >> > # Cleanup >> > sudo rm "${IMAGE_ROOTFS}/etc/apt/sources.list.d/isar-apt.list" >> > test ! -e "${IMAGE_ROOTFS}/usr/share/doc/qemu-user-static" && \ >> > @@ -57,3 +63,10 @@ EOF >> > sudo umount -l ${IMAGE_ROOTFS}/proc >> > sudo rm -f >> > "${IMAGE_ROOTFS}/etc/apt/apt.conf.d/55isar-fallback.conf" } >> > + >> > +python do_rootfs() { >> > + bb.build.exec_func("isar_image_gen_fstab", d) >> > + bb.build.exec_func("isar_image_gen_rootfs", d) >> > + bb.build.exec_func("isar_image_conf_rootfs", d) >> > + bb.build.exec_func("isar_image_cleanup", d) >> > +} >> >> I am loosing my proxies somewhere in current next ... i suspect this >> guy but did not confirm yet. >> >> Henning >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "isar-users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/isar-users/Pzt7vsbc8VE/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> isar-users+unsubscribe@googlegroups.com. >> To post to this group, send email to isar-users@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/isar-users/20181107194531.17356c59%40md1za8fc.ad001.siemens.net >> . >> For more options, visit https://groups.google.com/d/optout. >> > --000000000000b2cbcb057a18cada Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi again,

My test buil= d on a machine _without_ a direct Internet connection has completed.
<= div>Any idea how I can reproduce your issue? or help troubleshoot?

Note: tested with HEAD =3D=C2=A060db83cdcae60bdca6d3e3ed2c= c7c44712d4dd91

Cedric

On Wed, 7 Nov 2018 at 20:46, Cedri= c Hombourger <chombourger@gmail= .com> wrote:
Hi Henning,

I apologize if that's= the case. On my side, the proxy appears to be used just fine. I have added= a trace in isar_image_gen_rootfs() and I can see:

DEBUG: Executing python function do_rootfs
DEBUG: Executing= shell function root_cleandirs
DEBUG: Shell function root_cleandi= rs finished
DEBUG: Executing shell function isar_image_gen_fstab<= /div>
DEBUG: Shell function isar_image_gen_fstab finished
DEB= UG: Executing shell function isar_image_gen_rootfs
######## http_= proxy=3Dhttp://127.0.0.= 1:3142 ##########

I also checked my apt-= cacher-ng and I saw a bunch of requests coming in while do_rootfs was execu= ting.
Will double-check on a machine that does not have direct ac= cess to the Internet to make sure.

Cedric

On Wed, 7 Nov 2018= at 19:45, Henning Schild <henning.schild@siemens.com> wrote:
Am Thu, 1 Nov 2018 11:13:02 +0100
schrieb Cedric Hombourger <Cedric_Hombourger@mentor.com>:

> Split the do_rootfs() shell function into four (smaller) shell
> functions to generate the fstab file (isar_image_gen_fstab), populate<= br> > the root file-system (isar_image_gen_rootfs), configure it
> (isar_image_conf_rootfs) and perform some house-keeping
> (isar_image_cleanup). do_rootfs is now a python function and
> sequentially calls the helper functions listed above.
>
> Signed-off-by: Cedric Hombourger <Cedric_Hombourger@mentor.com>
> ---
>=C2=A0 meta/classes/isar-image.bbclass | 15 ++++++++++++++-
>=C2=A0 1 file changed, 14 insertions(+), 1 deletion(-)
>
> diff --git a/meta/classes/isar-image.bbclass
> b/meta/classes/isar-image.bbclass index ec2b9e3..e0508be 100644
> --- a/meta/classes/isar-image.bbclass
> +++ b/meta/classes/isar-image.bbclass
> @@ -21,7 +21,7 @@ ISAR_RELEASE_CMD ?=3D "${ISAR_RELEASE_CMD_DEFAU= LT}"
>=C2=A0 do_rootfs[root_cleandirs] =3D "${IMAGE_ROOTFS} \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0${IMAGE_ROOTFS}/isar-apt"
>=C2=A0
> -do_rootfs() {
> +isar_image_gen_fstab() {
>=C2=A0 =C2=A0 =C2=A0 cat > ${WORKDIR}/fstab << EOF
>=C2=A0 # Begin /etc/fstab
>=C2=A0 /dev/root=C2=A0 =C2=A0 /=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0auto
> defaults=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2= =A0 =C2=A0 =C2=A00 @@ -33,11 +33,15 @@
> devtmpfs=C2=A0 =C2=A0 =C2=A0 /dev=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 devtmpfs
> mode=3D0755,nosuid=C2=A0 =C2=A0 =C2=A0 0=C2=A0 =C2=A0 =C2=A0 =C2=A00 #= End /etc/fstab
>=C2=A0 EOF
> +}
>=C2=A0
> +isar_image_gen_rootfs() {
>=C2=A0 =C2=A0 =C2=A0 setup_root_file_system --clean --keep-apt-cache \<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 --fstab "${WORKDIR}/fstab"= \
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "${IMAGE_ROOTFS}" ${IMAGE_= PREINSTALL} ${IMAGE_INSTALL}
> +}
>=C2=A0
> +isar_image_conf_rootfs() {
>=C2=A0 =C2=A0 =C2=A0 # Configure root filesystem
>=C2=A0 =C2=A0 =C2=A0 if [ -n "${DISTRO_CONFIG_SCRIPT}" ]; the= n
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sudo install -m 755 "${WORKDIR}= /${DISTRO_CONFIG_SCRIPT}"
> "${IMAGE_ROOTFS}" @@ -45,7 +49,9 @@ EOF
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0"${BAUDRATE_TTY}"
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 sudo rm "${IMAGE_ROOTFS}/${DIST= RO_CONFIG_SCRIPT}"
>=C2=A0 =C2=A0 =C2=A0fi
> +}
>=C2=A0
> +isar_image_cleanup() {
>=C2=A0 =C2=A0 =C2=A0 # Cleanup
>=C2=A0 =C2=A0 =C2=A0 sudo rm "${IMAGE_ROOTFS}/etc/apt/sources.list= .d/isar-apt.list"
>=C2=A0 =C2=A0 =C2=A0 test ! -e "${IMAGE_ROOTFS}/usr/share/doc/qemu= -user-static" && \
> @@ -57,3 +63,10 @@ EOF
>=C2=A0 =C2=A0 =C2=A0 sudo umount -l ${IMAGE_ROOTFS}/proc
>=C2=A0 =C2=A0 =C2=A0 sudo rm -f
> "${IMAGE_ROOTFS}/etc/apt/apt.conf.d/55isar-fallback.conf" }<= br> > +
> +python do_rootfs() {
> +=C2=A0 =C2=A0 bb.build.exec_func("isar_image_gen_fstab", d)=
> +=C2=A0 =C2=A0 bb.build.exec_func("isar_image_gen_rootfs", d= )
> +=C2=A0 =C2=A0 bb.build.exec_func("isar_image_conf_rootfs", = d)
> +=C2=A0 =C2=A0 bb.build.exec_func("isar_image_cleanup", d) > +}

I am loosing my proxies somewhere in current next ... i suspect this
guy but did not confirm yet.

Henning

--
You received this message because you are subscribed to a topic in the Goog= le Groups "isar-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/isar-users/Pzt7vsbc8VE/unsubscribe<= /a>.
To unsubscribe from this group and all its topics, send an email to
isa= r-users+unsubscribe@googlegroups.com.
To post to this group, send email to isar-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/isa= r-users/20181107194531.17356c59%40md1za8fc.ad001.siemens.net.
For more options, visit https://groups.google.com/d/optout.
--000000000000b2cbcb057a18cada--