From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7069776205411516416 X-Received: by 2002:a05:600c:a4b:b0:37b:ea2b:5583 with SMTP id c11-20020a05600c0a4b00b0037bea2b5583mr16820675wmq.139.1646130545806; Tue, 01 Mar 2022 02:29:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a5d:47c6:0:b0:1ef:f983:3883 with SMTP id o6-20020a5d47c6000000b001eff9833883ls2870282wrc.2.gmail; Tue, 01 Mar 2022 02:29:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzjulXFHVGo4bwgrCNFYvhZXMWVLxNcYWH1gwodEr7uB8Nc1zydXFyEudyHlCPgDApPYEHj X-Received: by 2002:a5d:4e41:0:b0:1ef:5b29:3156 with SMTP id r1-20020a5d4e41000000b001ef5b293156mr16088797wrt.341.1646130544769; Tue, 01 Mar 2022 02:29:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646130544; cv=none; d=google.com; s=arc-20160816; b=dl4mHqzVcWJpE4cQgKftTxYPWf63GXffGEZQ5lXXKpbf/MZvCY0hX+mC786MiLl1Ng yavnq0In6Ie8RRsdWj8fHK0xf/K/B5/Q+/JwV53bz8sjdvZ1ZsWT3kMyJjJ0MtdjPglz ZpxZhJ+BlSNV/THwCKW6gPeDGiYVH9BHikBndCMGcEV47CyoSW5cHW8JVTjDCH+t7Rrw WUylTHt25/nUta6PR6PMBc0BAVy/KkK0C4Lmbp25mivDwgyZmnzVadQntRswr842H60n 0M0VUAc39d1k1fLIEdBqOBKLlfv1xU4S4M2X+4Ioyvhe0QiAcHVl2tZXwnfQfINUZ91R mPOw== 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=ikf58rAWUcIYs80iMMFYZo9NsTpqt9IQFjAii15oFOw=; b=p2UFu71gjqbT7QEhChNBSQYSSeV7RnvBGYmjHEtpz167oMbIsdjUw+lOL2hRYUo0Uf gY6+JF3zF4AnY6/bSLlQm7pLLeKdOSuRS/Dxsfzz3aSZOW3Y6Miwko3VUdghQ9uZGD1e 4BKYk5vAy9BBDyYOJ4TydzpZmR98rsCYOAsSBWJ+doaaFe1ge0yohlP+UEIhd0DqT5UB PZDfr7N18c0PhlaVhbcd4/z07F0X7mlEO9mZbrrg08vauTbm/GVGJlqCi5vJHvd7YIB1 u1HrBJOiQkgYQg0gWzlRhHovfOdXKoZBTPLNsTiEsYCiqJ6L2pLzzlweX195OvkX/6C6 5cTg== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pVvPFWb8; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::432 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-wr1-x432.google.com (mail-wr1-x432.google.com. [2a00:1450:4864:20::432]) by gmr-mx.google.com with ESMTPS id bh15-20020a05600c3d0f00b003816cb48925si109696wmb.0.2022.03.01.02.29.04 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Mar 2022 02:29:04 -0800 (PST) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::432 as permitted sender) client-ip=2a00:1450:4864:20::432; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=pVvPFWb8; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2a00:1450:4864:20::432 as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-wr1-x432.google.com with SMTP id d17so19687571wrc.9 for ; Tue, 01 Mar 2022 02:29:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ikf58rAWUcIYs80iMMFYZo9NsTpqt9IQFjAii15oFOw=; b=pVvPFWb886qYS+nVLNh+Nv3d0KueuQP5DfU1cyCJN1JLC9XZkHd6wAEbczKPszBbNl qOVswmsC2psJhaByVIvG+rV1NbUJ77vcUDvsPM+Eb0uHEGGm8nV9IIFrTtXXoBWmcQyg ul2q1p/BqxihHxJqnDXtIbwCpLTDYAvB7PNL+2GFD1Z4Bu/Mu24pclN8/0X19C7r+FRF OL/guli/m0YniUOgsjRicEXN+EUuYyTtZmSJEf75KLmbqaDM2QYThcGE8sC1wD9UlTh9 usroZ1g5lDj5SsFHVp2Cb+livmA1RL2Str6jAkxWhfN1I+zhUfzpL4CqKJPd3FIQpOam iF/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ikf58rAWUcIYs80iMMFYZo9NsTpqt9IQFjAii15oFOw=; b=MSXpswbQYNhuueUmblBClNVJwwY0m1gl0Ts6H7N/S/S0/J6rhGN3Ex86UEBXF87zgD jQyjpCHCiKyixCUpzUubg9E1tz7VbdcwAbin8rAL3jDo+iLJHmB0VeKIsunPa/NR9WFJ nimmv7xHhEDZUPlLwV2Wnp6ALWY+otJZf8yvbJ6kxEMM09uGqTFoTuQkxB/HrFl4c4C7 kXUq4IRyDVWmhc4zb96Yqr7HH0VnXMe8/cReQyZYDgeJIS2pnhHt1hK5ABWbC1/G9qqy P9u7ygWiPVapZOQujjTj6WW5wrB+W1QagZotvW51Ej5e94kJanBt/9ExN9NHIeObIdI7 V6jg== X-Gm-Message-State: AOAM531VpdldobImbMQEp/qIC7U7W3bov1pI+DZ0LsQGHTwUQrLoXQfc gJXcvvDKBy6pjlhC7ZfYieeMrflbH5M8yCm5Uj/OaoKGW5o= X-Received: by 2002:a05:6000:184c:b0:1ef:f8a2:3283 with SMTP id c12-20020a056000184c00b001eff8a23283mr4471778wri.467.1646130544227; Tue, 01 Mar 2022 02:29:04 -0800 (PST) MIME-Version: 1.0 References: <20220228145918.387-1-work@hennsch.de> <20220228160210.6ca63409@md1za8fc.ad001.siemens.net> In-Reply-To: <20220228160210.6ca63409@md1za8fc.ad001.siemens.net> From: vijai kumar Date: Tue, 1 Mar 2022 15:58:53 +0530 Message-ID: Subject: Re: [PATCH] meta: add quality check helper to image class To: Henning Schild Cc: isar-users , Vijai Kumar K , Jan Kiszka Content-Type: text/plain; charset="UTF-8" X-TUID: 8UDmCBCPod8T Hi Henning, On Mon, Feb 28, 2022 at 8:32 PM Henning Schild wrote: > > Hi all, > > this is inspired by the discussion around "[RFC PATCH] image: Reorder > do_copy_boot_files task". > > Early tests suggest that this works well. Everybody might want to try > this on their most hacky layer. Even in plain ISAR the rpi target complains. We made some changes to fstab and other files as part of DISTRO_CONFIG_SCRIPT[1]. As the name implies I would not be surprised if a downstream user creates a simple distro config script to reconfigure plymouth to have a different theme for that distro. If everything except certain modifications should come from a package, then obviously this has to go away. WARNING: Files changed after package install. The following files seem WARNING: to have changed where they probably should not have. WARNING: You might have a custom task or writing POSTPROCESS function. WARNING: /home/gomti/vijai_workspace/isar-upstream/isar/build/tmp/work/raspios-bullseye-arm64/isar-image-base-rpi-arm64-v8-rpi-sdimg/1.0-r0/rootfs/boot/cmdline.txt /home/gomti/vijai_workspace/isar-upstream/isar/build/tmp/work/raspios-bullseye-arm64/isar-image-base-rpi-arm64-v8-rpi-sdimg/1.0-r0/rootfs/boot/config.txt /home/gomti/vijai_workspace/isar-upstream/isar/build/tmp/work/raspios-bullseye-arm64/isar-image-base-rpi-arm64-v8-rpi-sdimg/1.0-r0/rootfs/etc/fstab [1] https://github.com/ilbers/isar/blob/next/meta-isar/conf/distro/raspios-configscript.sh Thanks, VIjai Kumar K > > I could envision future QA checks like ... do we find any files that do > not belong to packages but live in package manager locations. > > regards, > Henning > > Am Mon, 28 Feb 2022 15:59:18 +0100 > schrieb Henning Schild : > > > From: Henning Schild > > > > Content of rootfs should ideally all be coming from packages and their > > hooks. POSTPROCESSing and custom tasks should be handled with a lot of > > care and avoided where possible. > > > > This commit introduces a quality check task to help devs not > > accidentially abuse POSTPROCESS, while allowing them to add files to > > an ignore list. > > > > Signed-off-by: Henning Schild > > --- > > meta/classes/image.bbclass | 28 ++++++++++++++++++++++++++++ > > 1 file changed, 28 insertions(+) > > > > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > > index d44298bcdd7c..a0d44489d5bb 100644 > > --- a/meta/classes/image.bbclass > > +++ b/meta/classes/image.bbclass > > @@ -231,5 +231,33 @@ EOSUDO > > } > > addtask rootfs_finalize before do_rootfs after do_rootfs_postprocess > > > > +ROOTFS_QA_FIND_ARGS ?= "" > > + > > +do_rootfs_quality_check() { > > + rootfs_install_stamp=$( ls -1 "${STAMP}".do_rootfs_install.* | > > head -1 ) > > + test -f $rootfs_install_stamp > > + > > + args="$ROOTFS_QA_FIND_ARGS" > > + # rootfs_finalize chroot-setup.sh > > + args="${args} ! -path ${ROOTFSDIR}/var/lib/dpkg/diversions" > > + for cmd in ${ROOTFS_POSTPROCESS_COMMAND}; do > > + case "${cmd}" in > > + image_postprocess_mark) > > + args="${args} ! -path ${ROOTFSDIR}/etc/os-release";; > > + image_postprocess_machine_id) > > + args="${args} ! -path ${ROOTFSDIR}/etc/machine-id";; > > + esac > > + done > > + found=$( sudo find ${ROOTFSDIR} -type f -newer > > $rootfs_install_stamp $args ) > > + if [ -n "$found" ]; then > > + bbwarn "Files changed after package install. The following > > files seem" > > + bbwarn "to have changed where they probably should not have." > > + bbwarn "You might have a custom task or writing POSTPROCESS > > function." > > + bbwarn "$found" > > + fi > > +} > > + > > +addtask rootfs_quality_check after do_rootfs_finalize before > > do_rootfs + > > # Last so that the image type can overwrite tasks if needed > > inherit ${IMAGE_FSTYPES} > > -- > 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/20220228160210.6ca63409%40md1za8fc.ad001.siemens.net.