From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6519062226403328000 X-Received: by 10.99.64.130 with SMTP id n124mr5946002pga.120.1517837457693; Mon, 05 Feb 2018 05:30:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 10.101.82.198 with SMTP id z6ls1626142pgp.11.gmail; Mon, 05 Feb 2018 05:30:57 -0800 (PST) X-Google-Smtp-Source: AH8x226jt8YUj5wsK6TD3FunNrsdGpcsJYNB1PhVtpZ7M9l18kROQMJAdA5L1I9IVsBkyQqpt/Dh X-Received: by 10.101.99.143 with SMTP id h15mr7751361pgv.126.1517837457170; Mon, 05 Feb 2018 05:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517837457; cv=none; d=google.com; s=arc-20160816; b=uVHcoMtOYA8rSdwf+IhgTRHEfJvZ1bOXrm8gtP1ZE2VxY1UEHDXf/gVQFB9Aka+E3p q9Rq2PTd0qYdOED3q+myq7livgVvZYWZd6xe3qO3mQY2bQ8hHahVZtoYHQBZNm0+ddDQ vjJzM8apD6VtaGExYzcdFcaTJzQacR05hWuLUVJq2lMDF+WGfFVsm+E7mu4W19yzB0wo qjMvdhdKgeClMj/lyZw2m+wxyCuC8G0YrUUPiZ4ESKiTnWym0JxSA2+JOEB45oukOoEE AST0ip8lYXWbxHhzeDJKgzggAhyL7EDdch3sLkCSdGsd2pYFzn7fh0qQmRqUAt/04sGs InrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:arc-authentication-results; bh=HjJhU46TPHMSjZsnm1rg4/HpDdAUrm01GMaY3F+ev+c=; b=if3DpoyOA/gh+zkKqf2NG7J457UpUFQuUXyKKuZuGR9n3a5aVeA1itbNvpYtbZbvFJ 86opSeuMZ8MHKbphqeApGOzMItaSSVZViWbSeMNb0VWBiHTO6ON0a2RTCmeAhr2XVQ1m fGrVFb8gme6b2Tk1IoOOplSaNH8dSbtCJ/gKUM91OUU0DxP1cuNBEwAyhQnBQkbEeW7j 4j5jhXVBAfnucDxeDS2m5vZFFdePWIs+WgxiG6yYbCv7YgusKWetzSAfVxTPdf2HP5gB V1GsnPkT9os4+pdvjP3A8QRYvs5RfM5l1mcKoI+DFQ00ILNmMsCPGW1Aph9aWXIMniTW Xihg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Return-Path: Received: from relay1.mentorg.com (relay1.mentorg.com. [192.94.38.131]) by gmr-mx.google.com with ESMTPS id b36-v6si639094pli.0.2018.02.05.05.30.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2018 05:30:57 -0800 (PST) Received-SPF: pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) client-ip=192.94.38.131; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of cedric_hombourger@mentor.com designates 192.94.38.131 as permitted sender) smtp.mailfrom=Cedric_Hombourger@mentor.com Received: from nat-ies.mentorg.com ([192.94.31.2] helo=svr-ies-mbx-02.mgc.mentorg.com) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1eigrI-0004vd-UB from Cedric_Hombourger@mentor.com for isar-users@googlegroups.com; Mon, 05 Feb 2018 05:30:56 -0800 Received: from 3a23c91bf2ab.anacadf.mentorg.com (137.202.0.87) by svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Mon, 5 Feb 2018 13:30:53 +0000 From: To: CC: Cedric Hombourger Subject: [PATCH 1/1] image: create an image manifest listing installed packages Date: Mon, 5 Feb 2018 13:30:41 +0000 Message-ID: <20180205133041.69108-2-Cedric_Hombourger@mentor.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205133041.69108-1-Cedric_Hombourger@mentor.com> References: <20180205133041.69108-1-Cedric_Hombourger@mentor.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [137.202.0.87] X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-TUID: BL0MA+U5T0nA From: Cedric Hombourger Produce an image manifest that lists all packages installed into the image. Note the architecture, version and (when specified) the source package. The package details are tab-separated and may easily be imported into a spreadsheet (e.g. should you need to provide a Bill Of Material). Signed-off-by: Cedric Hombourger --- meta/classes/image.bbclass | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 2c2bafc..c7aa698 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -84,6 +84,16 @@ do_populate() { addtask populate before do_build after do_unpack do_populate[deptask] = "do_deploy_deb" +# Create a manifest of installed packages and their versions +do_manifest() { + install -m 755 -d ${DEPLOY_DIR_IMAGE} + sudo chroot ${IMAGE_ROOTFS} dpkg-query \ + -W -f '${Package}\t${Architecture}\t${Version}\t${Source}\n' \ + >${DEPLOY_DIR_IMAGE}/${PN}-${DISTRO}-${MACHINE}.manifest +} + +addtask manifest before do_build after do_populate + do_copy_boot_files() { KERNEL_IMAGE=${@get_image_name(d, 'vmlinuz')} if [ -n "${KERNEL_IMAGE}" ]; then -- 2.11.0