From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6790334981638979584 X-Received: by 2002:a17:906:1993:: with SMTP id g19mr7671670ejd.70.1585729174362; Wed, 01 Apr 2020 01:19:34 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:906:aad0:: with SMTP id kt16ls14663480ejb.2.gmail; Wed, 01 Apr 2020 01:19:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuv/tuLju9XPS/Oxhw3mUjgaCTqtihG8OGPVOCcxDvvInWawnHaENMkTKrqt1tClhMEMPP/ X-Received: by 2002:a17:906:4351:: with SMTP id z17mr19298212ejm.346.1585729173851; Wed, 01 Apr 2020 01:19:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585729173; cv=none; d=google.com; s=arc-20160816; b=GeGQlcYhWBurRVpnxIlSqqt8vrrGknULDA5kne3a7Sd35iNwuuJzXfG8FO/g/DFZvq p70f3Xt1/0EJ/ys/ZBlDz4j0wT54czr9kbTE1lfEWspXPDfTZdLNYNBgW4vXV5TCmMrW U1xSc/DZuDyHm+fnK9Gg7fDp4+FKiLvqx5u6h5RESENirMfSTGG2lRgMNO3A6Q5J2Mbq Z7qFDctFs3lkknMxjhRimIuxssPM6MZ84bN77QeoV/VGR+QdcxQxsfLtUpvtsHvgrOuo OLX5E4hP7WJq+88Mb4C9kN25+Zym9iRWlkOAmv61nuP4gmUYjGkIMRBj416WnlXiIN9k frSA== 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=PdPVCnQYX5t2d9CmG0SADuVnzXWiwB2QJs7owWzEkIc=; b=st4FkeKFiZ2ZUtj53IxLzi4v0Lm9WoltH+BrNqrFOg4WI2ILiXmrNNztwlEEYBQtsr 1i7mc0e60/fRDa8dJFbhhB9fi6NHVmh2tuEY8DiskHL+wyO/tL+9GqbyYjQ5Q2eTg7wF mwiZ8GDmJsd+CCJ/6YLKltXkwTiydc4PXn8aAb6Fz1TF56oxPH1BwOG6l+5pKCFpyRbD 34pgADKQyT5btAKgm70b4lGG4pQsRE6USDlAtln9FGqhavaEGLxTzVm9ZCHbQ+vPH/8g Awfcv4AC0hx3SDxPvh/+452fgE5v0UQEgdff3V5MWSN292scsd1F2mK4UocoZf+Lc/e4 Pi+w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 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 david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id v14si57012edr.4.2020.04.01.01.19.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 Apr 2020 01:19:33 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=henning.schild@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 0318JW3r015435 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 1 Apr 2020 10:19:32 +0200 Received: from md1za8fc.ad001.siemens.net ([167.87.12.78]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 0318JWWV011633; Wed, 1 Apr 2020 10:19:32 +0200 Date: Wed, 1 Apr 2020 10:19:25 +0200 From: Henning Schild To: vijai kumar Cc: isar-users , Baurzhan Ismagulov , Jan Kiszka Subject: Re: [PATCH v3 1/2] rootfs: Make rootfs finalize a separate task Message-ID: <20200401101838.29a3938e@md1za8fc.ad001.siemens.net> In-Reply-To: References: <20200213100820.23444-2-Vijaikumar_Kanagarajan@mentor.com> <20200214054801.11870-1-Vijaikumar_Kanagarajan@mentor.com> <7a71ebe9-9846-41ed-beae-a02360129b89@googlegroups.com> X-Mailer: Claws Mail 3.17.4 (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: IzOP78qlloT5 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. > 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. 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. > >