From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6790334981638979584 X-Received: by 2002:a05:6830:2314:: with SMTP id u20mr5264748ote.166.1585896654191; Thu, 02 Apr 2020 23:50:54 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a9d:2e7:: with SMTP id 94ls2659909otl.6.gmail; Thu, 02 Apr 2020 23:50:53 -0700 (PDT) X-Google-Smtp-Source: APiQypLIP/YCXSKGNdt16BsxMuj1WpxHpsJzddK1WD/3pakg1rwwfFYlkMRHu5c032Wdd9dXOuPF X-Received: by 2002:a05:6830:10a:: with SMTP id i10mr5536148otp.190.1585896653566; Thu, 02 Apr 2020 23:50:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585896653; cv=none; d=google.com; s=arc-20160816; b=hDg0NWxMlBrEHqz7fQlyCHN9Xs/4Ahh3+Q89X24BD2OecIc9Rj5El8UbdknvlicdmE rQDCNO7nvK4OhDzH6ee9OPhuwHz25GXsdfySdT5vyUwwRYhwhiA+hWnaV1iEnYhNmIqZ vSBELcnL796OKaoi8HKM4sfgd66m39mefwz0a+2gAtvpMYKGcN+Jz+yUxvirDYHNAi6W RrEgtE3Gdy94RAgBOXjJ9U7NyTfLFdFedSoCmFCxcLy36+Lht2ShLyh/hA2EM1EFjJRT K8xUOGQdfxQDZmp22y055fJFbdVANJGwM7e230FcuhL7tbxa6K8KFi3CHa6NB8tBq5Da vWsw== 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=058GpDqXeUQPiYQrFqTdmftCZG+7cbko+n8qlzQG2Tk=; b=zx4lx5gTgnRL8u+FLMGmRLRfLsasIVk+tD1IEGpG2H2tQWkeT4LTUbeyqGI/TCs4R6 zfHwjfrGc9b8Xxqb2VD/1KLVArf4tyxyEjSBu4CZB4NrHHae61ygbQHdN+qVbBUXEsLz xMMB635MQyJ0175QHdsgg1tZGG0BYNuihTMtNRx+kngjZgmLqoHM5lZ2i3zdF8bJ9wj0 UNQkzkjzoCA0rABmpL/MQ1qlEIBLe/2a9XVBqvEmIhG2PzWfCdsyXalaVmgt+uqaJv6U ikp0qldCJa98mJNok2PUaXHKbcG75ku/OD0GyeVyoCHgkNWNfv3otTref6Vfc2dSzrMD rHyQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Oy/Qb2pd"; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::841 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-qt1-x841.google.com (mail-qt1-x841.google.com. [2607:f8b0:4864:20::841]) by gmr-mx.google.com with ESMTPS id x23si631620oif.2.2020.04.02.23.50.53 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 02 Apr 2020 23:50:53 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::841 as permitted sender) client-ip=2607:f8b0:4864:20::841; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="Oy/Qb2pd"; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::841 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qt1-x841.google.com with SMTP id c14so5698202qtp.0 for ; Thu, 02 Apr 2020 23:50: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=058GpDqXeUQPiYQrFqTdmftCZG+7cbko+n8qlzQG2Tk=; b=Oy/Qb2pdoazNYIbjspQ1zUIT4RcSwqXm3om7G/1IwODpZCDcPsFi5q0y7eCv/IFxlB rIg1Zuq56JQTBAIAigFy5emsBNALWmMSf9lfiHBYLJuPj+sVRDwFgDT3b5boiYLFdNlV mcK0nkueHj989SDwi38WiEzweBsWYQHDGVbVWXbY2HdsJby6Txj7rVsGXMFhSj77zmUN qDee/QOk2oyByBKZBMVhQt33sO+CF1fVFAuHpt3gJ5UJHhjoDCgwPUNowfN22lHo7483 jqI8mr3zRSZ/qck6veecl/ZwCCctTQDD2/7ZGZvxSd9igrriCAU81EYkp1giJUQ3a/Ht sZaw== 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=058GpDqXeUQPiYQrFqTdmftCZG+7cbko+n8qlzQG2Tk=; b=VAva6/npkRgiU6pyykadDJHCE58hMerWjL8OijvuykSzeD6MIjX8vUSPbfsk7Kbccw bJB4JqOv9gjaZjuO1aUK0alybpT5/ao69ryUm68UnmYIijXIpw7AMdA/LJAR3ZmkmCGZ cdtQhmspKQMVp19GRU8nmgb3G6txAD8oF0FnudNXxi9b85mh1nehc8u80F0H0zC1EwQ6 A5jBkpVto5s0QvqPqdcQECO7RPzjiHEFijrzpxpNJrabdpTjj7HYatGkmPy6wmyUrgeB 2GUucrmwoZWFz+xLlSP0jPqh5SPm94UrYzoWtdJuOu8A/YHCrhr3j98edvPNdNb/a0xC hKJA== X-Gm-Message-State: AGi0Puaxb2/nv1LsVaYywby+xp2PI1xYB3g16jWrXMjHm8LNzpqtbrZR eJQ+EIHgM10K0WyEa1ajNGgHX6AMhCM8J3omv88= X-Received: by 2002:ac8:1990:: with SMTP id u16mr4871966qtj.164.1585896652860; Thu, 02 Apr 2020 23:50: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: From: vijai kumar Date: Fri, 3 Apr 2020 12:20: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: /l46aFppiCr5 On Wed, Apr 1, 2020 at 3:59 PM vijai kumar wrote: > > 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 I am getting this fetcher issue consistently (packages differ) in the ISAR CI build. All my local builds went through. I believe there is more to it. Some proxy issues affecting apt fetch in CI? 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. > > > > > >