From: "Daniel Sangorrin" <daniel.sangorrin@toshiba.co.jp>
To: jan.kiszka@siemens.com
Cc: cip-dev@lists.cip-project.org
Subject: [cip-dev] [isar-cip-core] image: export dpkg status file for debsecan
Date: Wed, 30 Sep 2020 11:08:15 +0900 [thread overview]
Message-ID: <20200930020815.2474349-2-daniel.sangorrin@toshiba.co.jp> (raw)
In-Reply-To: <20200930020815.2474349-1-daniel.sangorrin@toshiba.co.jp>
[-- Attachment #1: Type: text/plain, Size: 1600 bytes --]
Although the currently exported manifest probably has
enough information, the tool debsecan and our wrapper
cip-core-sec depend on the dpkg status format.
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
recipes-core/images/cip-core-image-security.bb | 8 ++++++++
recipes-core/images/cip-core-image.bb | 8 ++++++++
2 files changed, 16 insertions(+)
diff --git a/recipes-core/images/cip-core-image-security.bb b/recipes-core/images/cip-core-image-security.bb
index 61ddc39..928774c 100644
--- a/recipes-core/images/cip-core-image-security.bb
+++ b/recipes-core/images/cip-core-image-security.bb
@@ -34,3 +34,11 @@ IMAGE_PREINSTALL += " \
uuid-runtime \
sudo \
"
+
+# for cip-core-sec/debsecan
+ROOTFS_POSTPROCESS_COMMAND += "export_dpkg_status"
+export_dpkg_status() {
+ sudo -E chroot --userspec=$(id -u):$(id -g) '${ROOTFSDIR}' \
+ cat /var/lib/dpkg/status > \
+ ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".dpkg_status
+}
diff --git a/recipes-core/images/cip-core-image.bb b/recipes-core/images/cip-core-image.bb
index 2cecde3..0139819 100644
--- a/recipes-core/images/cip-core-image.bb
+++ b/recipes-core/images/cip-core-image.bb
@@ -19,3 +19,11 @@ IMAGE_INSTALL += "customizations"
# for swupdate
SWU_DESCRIPTION ??= "swupdate"
include ${SWU_DESCRIPTION}.inc
+
+# for cip-core-sec/debsecan
+ROOTFS_POSTPROCESS_COMMAND += "export_dpkg_status"
+export_dpkg_status() {
+ sudo -E chroot --userspec=$(id -u):$(id -g) '${ROOTFSDIR}' \
+ cat /var/lib/dpkg/status > \
+ ${ROOTFS_MANIFEST_DEPLOY_DIR}/"${PF}".dpkg_status
+}
--
2.25.1
[-- Attachment #2: Type: text/plain, Size: 420 bytes --]
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5480): https://lists.cip-project.org/g/cip-dev/message/5480
Mute This Topic: https://lists.cip-project.org/mt/77210404/4520388
Group Owner: cip-dev+owner@lists.cip-project.org
Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129055/727948398/xyzzy [cip-dev@archiver.kernel.org]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2020-09-30 2:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-30 2:08 [cip-dev] [isar-cip-core] export dpkg status for debsecan Daniel Sangorrin
2020-09-30 2:08 ` Daniel Sangorrin [this message]
2020-09-30 7:11 ` [cip-dev] [isar-cip-core] image: export dpkg status file " Jan Kiszka
2020-10-01 0:20 ` Daniel Sangorrin
2020-10-01 0:23 ` Daniel Sangorrin
2020-10-01 3:03 ` Daniel Sangorrin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200930020815.2474349-2-daniel.sangorrin@toshiba.co.jp \
--to=daniel.sangorrin@toshiba.co.jp \
--cc=cip-dev@lists.cip-project.org \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).