From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6617812835611181056 X-Received: by 2002:a2e:844d:: with SMTP id u13-v6mr184225ljh.17.1541620010822; Wed, 07 Nov 2018 11:46:50 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:67:: with SMTP id 100-v6ls3664883lja.15.gmail; Wed, 07 Nov 2018 11:46:50 -0800 (PST) X-Google-Smtp-Source: AJdET5fET4FQHkazbXETdVijBm41fuQJ/RifHSSqpPRkQFbtepkfoadPCXxbI7A3iHG1wjV9vwIS X-Received: by 2002:a2e:5d0c:: with SMTP id r12-v6mr201259ljb.8.1541620010280; Wed, 07 Nov 2018 11:46:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541620010; cv=none; d=google.com; s=arc-20160816; b=v6StY35pTlBUEkrImZ32ioTw0afLi2IPwlsLDihbYn6HIOcnS0NEkng1YukDO73Dnn sE8neICT5hFgUEVVJSzvmnoyEEoTa5oCvL4UaHlIpIyKxrD9w+/yChHhVz8EQHlXsUu7 CCk6KIubLGQfcGGOQosgCKVyOOV/mgOVEEwNu1+fI7quCTSu+Y9IsK9Gq26+xxPpygct x+cINdOdCCh9awdXRBigKfKe4y3P8Vyvw5z6e76iueD2mquxRiJxF3rZsdUcxff4bkWM TfbtoMFgsfbM72JQ9zX7JGxaAvPHCnG+vRpL8EdImrNHLohJS2RnM2WVHP+gD03OKcuT 7fMQ== 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=GyQO+K7uShqMsIXleBi1miXDmlusWXLk9mk/6Ned6+M=; b=ru11XPza2fgU+lpXSnIq2In0GKPjWiOqZb1r9lQHLXj7lXbFKDaH3tR689Znp+yOvv KdYwXK6KfoROEkfO3TaKbJSjw9k8ha3T0WjZdfgEqdlwE8+fDwBH7soa5Hp0RBhqkHBS 9ydb4a+95OfiueBSnFHABUQvop5I+yUnznBKTBT9XlA7zNM0kxZgnoYf8M7fbhDRhysd iKeoUfR1QtVinDiRGGHhNOiJ1tc9wIVpKH5yfPDUx+zc5cTglyNsQMGgIoQdVI1q2ckt HMKPN+eDgSdQRkbHnzr8OO+q21uLyKel0TD77XsmT23zABXTS0rTZkwgtBNoV1lGztO1 v4zA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="h/yp07s4"; spf=pass (google.com: domain of chombourger@gmail.com designates 2a00:1450:4864:20::12c 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-lf1-x12c.google.com (mail-lf1-x12c.google.com. [2a00:1450:4864:20::12c]) by gmr-mx.google.com with ESMTPS id y12-v6si56283lfh.4.2018.11.07.11.46.50 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 11:46:50 -0800 (PST) Received-SPF: pass (google.com: domain of chombourger@gmail.com designates 2a00:1450:4864:20::12c as permitted sender) client-ip=2a00:1450:4864:20::12c; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="h/yp07s4"; spf=pass (google.com: domain of chombourger@gmail.com designates 2a00:1450:4864:20::12c as permitted sender) smtp.mailfrom=chombourger@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-lf1-x12c.google.com with SMTP id p86so12392402lfg.5 for ; Wed, 07 Nov 2018 11:46:50 -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=GyQO+K7uShqMsIXleBi1miXDmlusWXLk9mk/6Ned6+M=; b=h/yp07s474tmCMniAVQfqQxzySU9EJdCWCjEgBgKfbLFOMnn7n/KgzAmz2wVon3mYp bnGEtndhVKuouPFdhivBjdMuWgqWA4ByoBW+xXWcsz/TGPv73fQ4YTagK5bQyJNRcpVN jHrJr4aZuj1KWfhn+yLQJPRGKcPSO1EtwChFr/eN1MiSWU8x/CMuSQzKM+vIIoeWquOL UpBwf2eDcnRnh1PFvT4LxGNkXho99o4D6jewr9WM1un3vauGgnsXL5jIgVSydxd96jtX 9BlXuZNZ6slOsS0yXxVZc9bDlUYG8CBUban6KKNQ2VkasBPrXhVT3PjXnwR1vyqqxDft Etbg== 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=GyQO+K7uShqMsIXleBi1miXDmlusWXLk9mk/6Ned6+M=; b=QIjVxhB9XWTwFV+v+m5lKZZ+uoPjt/H6x+1O8KrCubA4bi7kDE7K0cAjfVQvMu++3V wJaI9lxg3xPQlRp+cO1I5Y7fW6HlwrQTIqGR5NwtOlOrNrGNbjgdqoFlzf7TiliEb4aw R10ruF5RELqojNaB9nApBeBbafkGDyTlQrq24ER7DvfTsjSXPqD2zVJrFVjcMBSlBCDq BuN+7zp4jyybdAgvgn/EEta4XknPYzgYbg2oqrHKP3MN1BbbqS+BpX153r/pDhOL2+S/ K8SGxe0s0rNDRQllJUP4ZyZgkFaNEgFWLEPuwqAJeH8ZRsSxAi5EW7l2n3L293HazFB9 JKrw== X-Gm-Message-State: AGRZ1gLo5XtsMPvpptQMy4hZgQpExHvJPd2dpeavIgFzONerzVp//nuq Hhtl3Onf4FluMt5AWDvwF2WGMOzI9Pks1sicfn7M5vjy X-Received: by 2002:a19:4ace:: with SMTP id x197mr915462lfa.39.1541620009747; Wed, 07 Nov 2018 11:46:49 -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: <20181107194531.17356c59@md1za8fc.ad001.siemens.net> From: Cedric Hombourger Date: Wed, 7 Nov 2018 20:46:37 +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="0000000000000f4b2b057a186132" X-TUID: 9VnHpnKgS6Jx --0000000000000f4b2b057a186132 Content-Type: text/plain; charset="UTF-8" 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. > --0000000000000f4b2b057a186132 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Henning,

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

DEBUG: Executing python function do_rootfs
D= EBUG: Executing shell function root_cleandirs
DEBUG: Shell functi= on root_cleandirs finished
DEBUG: Executing shell function isar_i= mage_gen_fstab
DEBUG: Shell function isar_image_gen_fstab finishe= d
DEBUG: Executing shell function isar_image_gen_rootfs
######## http_proxy=3Dhttp://127.0.0.1:3= 142 ##########

I also checked my apt-cac= her-ng and I saw a bunch of requests coming in while do_rootfs was executin= g.
Will double-check on a machine that does not have direct acces= s to the Internet to make sure.

Cedric
=
On Wed, 7 Nov 2018 at= 19:45, Henning Schild <he= nning.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.
--0000000000000f4b2b057a186132--