All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel Sangorrin" <daniel.sangorrin@toshiba.co.jp>
To: <jan.kiszka@web.de>, <cip-dev@lists.cip-project.org>
Subject: Re: [cip-dev] [isar-cip-core] image: export dpkg status file for debsecan
Date: Thu, 1 Oct 2020 00:20:33 +0000	[thread overview]
Message-ID: <OSBPR01MB2053D9A590ED2C8F264206CDD0300@OSBPR01MB2053.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <7596cf39-b8f9-cedc-3b51-b164553b3ee4@web.de>

[-- Attachment #1: Type: text/plain, Size: 2547 bytes --]

OK, I will send it to ISAR then.

> -----Original Message-----
> From: Jan Kiszka <jan.kiszka@web.de>
> Sent: Wednesday, September 30, 2020 4:12 PM
> To: cip-dev@lists.cip-project.org; sangorrin daniel(サンゴリン ダニエル □SWC◯ACT) <daniel.sangorrin@toshiba.co.jp>
> Subject: Re: [cip-dev] [isar-cip-core] image: export dpkg status file for debsecan
> 
> On 30.09.20 04:08, Daniel Sangorrin wrote:
> > 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
> 
> This is just a copy-out, I don't see the chroot need here.
> 
> > +}
> > 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
> > +}
> >
> 
> Please avoid code duplication. We have means like "require some.inc" in bitbake.
> 
> I'm also wondering if this should go to isar upstream directly. debsecan is a generic Debian tool, nothing CIP-specific per se.
> 
> Jan

[-- Attachment #2: Type: text/plain, Size: 420 bytes --]


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5483): https://lists.cip-project.org/g/cip-dev/message/5483
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]
-=-=-=-=-=-=-=-=-=-=-=-


  reply	other threads:[~2020-10-01  0:20 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 ` [cip-dev] [isar-cip-core] image: export dpkg status file " Daniel Sangorrin
2020-09-30  7:11   ` Jan Kiszka
2020-10-01  0:20     ` Daniel Sangorrin [this message]
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=OSBPR01MB2053D9A590ED2C8F264206CDD0300@OSBPR01MB2053.jpnprd01.prod.outlook.com \
    --to=daniel.sangorrin@toshiba.co.jp \
    --cc=cip-dev@lists.cip-project.org \
    --cc=jan.kiszka@web.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.