From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6790334981638979584 X-Received: by 2002:a67:6896:: with SMTP id d144mr4657048vsc.104.1585736994533; Wed, 01 Apr 2020 03:29:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a1f:2096:: with SMTP id g144ls1453797vkg.7.gmail; Wed, 01 Apr 2020 03:29:53 -0700 (PDT) X-Google-Smtp-Source: APiQypKigNYkb71kG40IZ0dosDB9sWZFIctdOYTzcZ2sVXOdAG94/0jomluIS/+Qd2WfMXh1sfy7 X-Received: by 2002:a1f:7c45:: with SMTP id x66mr14875706vkc.45.1585736993456; Wed, 01 Apr 2020 03:29:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585736993; cv=none; d=google.com; s=arc-20160816; b=DkXOf9BNtTB01EB6sR5zvPH09XCzzrniUbizgUCLzCH83VwdiGnGPljzstr7f4Umdj Xz/wiwwaDf08ryuFf+bLo/JBIaLTcm9uzGFk8fDcmz1WyRNfLlwP6k4dN77AIsH2rwvz KlgOvvdn+8DZW7CChLp4c1l38MqzdlHXahT32GyCdf9YIwS/V8iDfxDcQzseAgCTbE+s UBS13wKaWl8wfoqV2iDD2NM8DpC5wFsH+ts9f80cFL+ggYmuYgZ6bfIDcGZa4z4HdAFv raR4OSQSC6FI1XrNw7CKUwod1lMbLMyo5HT8Ggi/WaeBFy4yDimgTtAVUmZI5B9S+U+i fP4w== 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=W6Hn1ZKYTYKRNNe6qCIdpWo+fQrkcjT5/Vygk6loQ2A=; b=t84NGI2ylrfi+B9xl8z0ZXYW/dympWCTdPulvcG1zhp2+2iYp7cSaZO72y9us4ecux YwYIkhSpJ3hrJx/R4cFR5qvconHCgfU9f6hBYAcPNyoPSQzpNFya6Ng0fpvZg42M4Hgs vJ7X1miqWKlXidc08NeUBHukXOMbCfxzGjMl+wtNiBaRUuo2pRQEuCJkW2SZ5TYlXjwf PxGAs/EKZLQ/ylkHl1vcdnyF+OSr68X/sHlQIFyq0UtsieEelUl20aNqGu6B9y3bNHMh C3PcUXi/HhwlRuOarqgmBgwNqoude2ONQCo50dIECAdr+luM8m7U1V+VTcgOYVSiSSCc I7hw== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Y/ha2eu2"; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::f41 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qv1-xf41.google.com (mail-qv1-xf41.google.com. [2607:f8b0:4864:20::f41]) by gmr-mx.google.com with ESMTPS id 203si103728vkx.3.2020.04.01.03.29.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Apr 2020 03:29:53 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::f41 as permitted sender) client-ip=2607:f8b0:4864:20::f41; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Y/ha2eu2"; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::f41 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qv1-xf41.google.com with SMTP id bp12so8505775qvb.7 for ; Wed, 01 Apr 2020 03:29:53 -0700 (PDT) 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=W6Hn1ZKYTYKRNNe6qCIdpWo+fQrkcjT5/Vygk6loQ2A=; b=Y/ha2eu2mw6zdEgCkXLp5hz8czAK1+oOuDqt1CJZrsWx/sGqeoRDP2PLWITUfSI/CG MJA3EzRLSJtkmRHj/YdLdODWDtvYhnZA2qL1gjwsMvoaacqY4W1Cy1Zs7Kwb/07A9Bkq 3tyxCkW+PhD4Z43gJ5RXR8SCHWGI1c7KcvKaQrBmdsmKU6anMVEkrKh+9XnvRccVmncm lhhpNDfMEoMLfOPOVdRof5AIZN7G3LpEeGxV5vDvekgN7VzwsmFbji5z9gpa/v3f1Pcy xDTzx8EvRaF5mSvFbupqe9npM8xAvJ8AAodMzcVgo1nPANfHFpZYKgn9eHo9+6IIAmu8 TECw== 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=W6Hn1ZKYTYKRNNe6qCIdpWo+fQrkcjT5/Vygk6loQ2A=; b=YtSsTiTulme5kK9TGesU1e1tTwAbGT/zWTmAg0IpYaBFjX56JVPsofbgAtF6VOWpF3 LSTCRAQGCK1hVnlDPijDa1ABCS1y0GG2Ay+vfSMizRR0mkHj7UaK/yl4FbzngdWCDICe SjzQ//lHF2Gc/7pb8WmBKdDGrTX6frpcYyp1pKbmT292BxVp6aw2golp0hZHnCJxMiCK AMpOA08TamL8pHyDJbqnciyfbt9kFy7Tp4NbHDLZSV9RRvxPlE4LxB7Mvsem8Vo+oDMG 5r3SEJ9+HQpjqITN00sIYNg9ZUlqU7BsnMOfJeu7f8Rezu9+txCoh+kPiBDXcbSMv23q Fk/Q== X-Gm-Message-State: ANhLgQ1hYGriTW0m+GlOv2IVulRHGEdFI8tHzR1/Kev03xiOQ4zmh7WL Z27xOTrsa9C2CbhKWoW27MOMVqMifMsHd0MbBc4= X-Received: by 2002:ad4:58b3:: with SMTP id ea19mr21182589qvb.8.1585736992826; Wed, 01 Apr 2020 03:29:52 -0700 (PDT) MIME-Version: 1.0 References: <20200213100820.23444-2-Vijaikumar_Kanagarajan@mentor.com> <20200214054801.11870-1-Vijaikumar_Kanagarajan@mentor.com> <7a71ebe9-9846-41ed-beae-a02360129b89@googlegroups.com> <20200401101838.29a3938e@md1za8fc.ad001.siemens.net> In-Reply-To: <20200401101838.29a3938e@md1za8fc.ad001.siemens.net> From: vijai kumar Date: Wed, 1 Apr 2020 15:59:41 +0530 Message-ID: Subject: Re: [PATCH v3 1/2] rootfs: Make rootfs finalize a separate task To: Henning Schild Cc: isar-users , Baurzhan Ismagulov , Jan Kiszka Content-Type: text/plain; charset="UTF-8" X-TUID: KDwTomDsysl3 On Wed, Apr 1, 2020 at 1:49 PM Henning Schild wrote: > > On Wed, 1 Apr 2020 12:55:43 +0530 > vijai kumar wrote: > > > On Wed, Mar 11, 2020 at 12:46 PM vijai kumar > > wrote: > > > > > > As said before, this series, atleast the second patch, depends on > > > Henning's base-apt series. > > > > > > I am going to rebase my changes on top of Hennings v5 and test it > > > out. > > > > > > Also, should we have these changes as part of Hennings series? Or > > > should I wait for the series to get in and address these later? > > > > > Hi All, > > > > While testing this series on top of the current next I got the below > > error. Any pointers? I am yet to try a local build. > > I guess the main question is whether that issue just came up once, or > whether it consist over several builds. It came up last night. I haven't seen these errors before. > > > Failed to fetch > > http://deb.debian.org/debian/pool/main/g/gettext/gettext_0.19.8.1.orig.tar.xz > > Writing more data than expected (7210080 > 7209808) > > > > Hashes of expected file: > > - > > SHA256:105556dbc5c3fbbc2aa0edb46d22d055748b6f5c7cd7a8d99f8e7eb84e938be4 > > - Filesize:7209808 [weak] > > > > - MD5Sum:df3f5690eaa30fd228537b00cb7b7590 [weak] > > E: Failed to fetch some archives. > > A fetch should not be affected by what is in next. I would guess/hope > that you just into a temporary network hickup. I am assuming the same. I hit it in a couple of builds. Anyway my local build got through. Triggered another job in CI to see if this issues goes away. Thanks, Vijai Kumar K > > Henning > > > http://ci.isar-build.org:8080/job/isar_vkk_devel/40/consoleFull > > > > Also, there are some more fixes, to strip the version info from Source > > field, so v4 is in pipeline. > > > > Thanks, > > Vijai Kumar K > > > > > > > Thanks, > > > Vijai Kumar K > > > > > > On Friday, February 14, 2020 at 11:18:11 AM UTC+5:30, vijai kumar > > > wrote: > > >> > > >> With the current implementation it is difficult to append a > > >> postprocess function which requires a chroot environment. > > >> For example, to add a postprocess function which runs apt-get to > > >> download all source of packages installed in the target. > > >> > > >> rootfs_postprocess_finalize is not actually an optional feature > > >> but instead a necessary cleanup function for image class. > > >> So, move the implementation to image class and make it as a task. > > >> > > >> Signed-off-by: Vijai Kumar K > > >> --- > > >> Changes in v3: > > >> - Take care of non-existent downloads/deb-src directory. > > >> > > >> meta/classes/image.bbclass | 41 > > >> ++++++++++++++++++++++++++++++++++++- meta/classes/rootfs.bbclass > > >> | 39 ----------------------------------- 2 files changed, 40 > > >> insertions(+), 40 deletions(-) > > >> > > >> diff --git a/meta/classes/image.bbclass > > >> b/meta/classes/image.bbclass index cfd617a..c5fddba 100644 > > >> --- a/meta/classes/image.bbclass > > >> +++ b/meta/classes/image.bbclass > > >> @@ -60,7 +60,7 @@ image_do_mounts() { > > >> } > > >> > > >> ROOTFSDIR = "${IMAGE_ROOTFS}" > > >> -ROOTFS_FEATURES += "clean-package-cache finalize-rootfs > > >> generate-manifest" +ROOTFS_FEATURES += "copy-package-cache > > >> clean-package-cache generate-manifest" ROOTFS_PACKAGES += > > >> "${IMAGE_PREINSTALL} ${IMAGE_INSTALL}" ROOTFS_MANIFEST_DEPLOY_DIR > > >> ?= "${DEPLOY_DIR_IMAGE}" > > >> > > >> @@ -168,5 +168,44 @@ python do_deploy() { > > >> } > > >> addtask deploy before do_build after do_image > > >> > > >> +do_rootfs_finalize() { > > >> + sudo -s <<'EOSUDO' > > >> + test -e "${ROOTFSDIR}/chroot-setup.sh" && \ > > >> + "${ROOTFSDIR}/chroot-setup.sh" "cleanup" > > >> "${ROOTFSDIR}" > > >> + rm -f "${ROOTFSDIR}/chroot-setup.sh" > > >> + > > >> + test ! -e "${ROOTFSDIR}/usr/share/doc/qemu-user-static" > > >> && \ > > >> + find "${ROOTFSDIR}/usr/bin" \ > > >> + -maxdepth 1 -name 'qemu-*-static' -type f -delete > > >> + > > >> + mountpoint -q '${ROOTFSDIR}/isar-apt' && \ > > >> + umount -l ${ROOTFSDIR}/isar-apt > > >> + rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt > > >> + > > >> + mountpoint -q '${ROOTFSDIR}/base-apt' && \ > > >> + umount -l ${ROOTFSDIR}/base-apt > > >> + rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt > > >> + > > >> + mountpoint -q '${ROOTFSDIR}/dev' && \ > > >> + umount -l ${ROOTFSDIR}/dev > > >> + mountpoint -q '${ROOTFSDIR}/sys' && \ > > >> + umount -l ${ROOTFSDIR}/proc > > >> + mountpoint -q '${ROOTFSDIR}/sys' && \ > > >> + umount -l ${ROOTFSDIR}/sys > > >> + > > >> + rm -f > > >> "${ROOTFSDIR}/etc/apt/apt.conf.d/55isar-fallback.conf" + > > >> + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" > > >> + rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" > > >> + rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" > > >> + > > >> + mv "${ROOTFSDIR}/etc/apt/sources-list" \ > > >> + "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" > > >> + > > >> + rm -f "${ROOTFSDIR}/etc/apt/sources-list" > > >> +EOSUDO > > >> +} > > >> +addtask rootfs_finalize before do_rootfs after > > >> do_rootfs_postprocess + > > >> # Last so that the image type can overwrite tasks if needed > > >> inherit ${IMAGE_TYPE} > > >> diff --git a/meta/classes/rootfs.bbclass > > >> b/meta/classes/rootfs.bbclass index 54b5e5c..c3af7c1 100644 > > >> --- a/meta/classes/rootfs.bbclass > > >> +++ b/meta/classes/rootfs.bbclass > > >> @@ -201,45 +201,6 @@ rootfs_generate_manifest () { > > >> ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".manifest > > >> } > > >> > > >> -ROOTFS_POSTPROCESS_COMMAND += > > >> "${@bb.utils.contains('ROOTFS_FEATURES', 'finalize-rootfs', > > >> 'rootfs_postprocess_finalize', '', d)}" > > >> -rootfs_postprocess_finalize() { > > >> - sudo -s <<'EOSUDO' > > >> - test -e "${ROOTFSDIR}/chroot-setup.sh" && \ > > >> - "${ROOTFSDIR}/chroot-setup.sh" "cleanup" > > >> "${ROOTFSDIR}" > > >> - rm -f "${ROOTFSDIR}/chroot-setup.sh" > > >> - > > >> - test ! -e "${ROOTFSDIR}/usr/share/doc/qemu-user-static" > > >> && \ > > >> - find "${ROOTFSDIR}/usr/bin" \ > > >> - -maxdepth 1 -name 'qemu-*-static' -type f -delete > > >> - > > >> - mountpoint -q '${ROOTFSDIR}/isar-apt' && \ > > >> - umount -l ${ROOTFSDIR}/isar-apt > > >> - rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/isar-apt > > >> - > > >> - mountpoint -q '${ROOTFSDIR}/base-apt' && \ > > >> - umount -l ${ROOTFSDIR}/base-apt > > >> - rmdir --ignore-fail-on-non-empty ${ROOTFSDIR}/base-apt > > >> - > > >> - mountpoint -q '${ROOTFSDIR}/dev' && \ > > >> - umount -l ${ROOTFSDIR}/dev > > >> - mountpoint -q '${ROOTFSDIR}/sys' && \ > > >> - umount -l ${ROOTFSDIR}/proc > > >> - mountpoint -q '${ROOTFSDIR}/sys' && \ > > >> - umount -l ${ROOTFSDIR}/sys > > >> - > > >> - rm -f > > >> "${ROOTFSDIR}/etc/apt/apt.conf.d/55isar-fallback.conf" - > > >> - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/isar-apt.list" > > >> - rm -f "${ROOTFSDIR}/etc/apt/preferences.d/isar-apt" > > >> - rm -f "${ROOTFSDIR}/etc/apt/sources.list.d/base-apt.list" > > >> - > > >> - mv "${ROOTFSDIR}/etc/apt/sources-list" \ > > >> - "${ROOTFSDIR}/etc/apt/sources.list.d/bootstrap.list" > > >> - > > >> - rm -f "${ROOTFSDIR}/etc/apt/sources-list" > > >> -EOSUDO > > >> -} > > >> - > > >> do_rootfs_postprocess[vardeps] = "${ROOTFS_POSTPROCESS_COMMAND}" > > >> python do_rootfs_postprocess() { > > >> # Take care that its correctly mounted: > > >> -- > > >> 2.17.1 > > >> > > > -- > > > 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 on > > > the web visit > > > https://groups.google.com/d/msgid/isar-users/7a71ebe9-9846-41ed-beae-a02360129b89%40googlegroups.com. > > > >