public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: "[ext] Q. Gylstorff" <Quirin.Gylstorff@siemens.com>,
	<isar-users@googlegroups.com>
Subject: Re: [PATCH] meta/classes: generate bill of material from image
Date: Mon, 5 Aug 2019 17:08:46 +0200	[thread overview]
Message-ID: <20190805170846.20218e13@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <be60f552-0e44-66d9-1a38-9a53b1ec76bb@siemens.com>

Am Mon, 5 Aug 2019 16:48:36 +0200
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> On 05.08.19 16:43, [ext] Henning Schild wrote:
> > Hi Quirin,
> > 
> > do you have a real use-case for that? In fact we do have similar
> > things internally already but did not propose it yet. Reason is you
> > still need to find all the magic switches to collect the source and
> > binary package versions, and you most likely want a machine
> > readable format.  
> 
> The use cases are the same what we have that internal stuff for.
> 
> > 
> > In fact we should just fix that broken offline cache thing and
> > enable src-packages for it. That would generate a list that will
> > hopefully be complete and in a well defined format.  
> 
> Good points: The format should be easily parseable.
> 
> > 
> > Without the real use-case and the post-processing this is just
> > another obscure Isar feature and i am against merging it.  
> 
> How would you do it otherwise? Tell the beginners to remember which
> command to run with which switches on which subdirs?
> 
> Quirin and I were also discussing the first extension: We need to
> collect information about additional packages that are not part of
> the rootfs but the image, primarily bootloaders. Providing a
> framework - however that may look like
> - for recipe authors to report them would be valuable and can be
> achieved by any local solution that cleanly.

What i meant to say was. Please contact all the people that are already
doing that and collect the requirements.
Because if we miss any of the known ones, the feature will be an obscure
one.

Henning

> Jan
> 
> > 
> > Henning
> > 
> > Am Mon, 5 Aug 2019 16:07:42 +0200
> > schrieb "[ext] Q. Gylstorff" <Quirin.Gylstorff@siemens.com>:
> >   
> >> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> >>
> >> To create products it is necessary to have a list
> >> of used packages for clearance and to security monitoring.
> >> To get a simple list of packages use dpkg-query and generate
> >> a list with the following pattern:
> >>
> >> source name| source version | binary package name | binary version
> >>
> >> To use it add following line to the local.conf:
> >> ISAR_DO_PACKAGE_LIST ?= "1"
> >>
> >> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> >> ---
> >>  meta-isar/conf/local.conf.sample                 |  4 ++++
> >>  .../classes/image-package-list-extension.bbclass | 16
> >> ++++++++++++++++ meta/classes/image.bbclass                       |
> >> 1 + 3 files changed, 21 insertions(+)
> >>  create mode 100644
> >> meta/classes/image-package-list-extension.bbclass
> >>
> >> diff --git a/meta-isar/conf/local.conf.sample
> >> b/meta-isar/conf/local.conf.sample index 5b3a0a1..d188051 100644
> >> --- a/meta-isar/conf/local.conf.sample
> >> +++ b/meta-isar/conf/local.conf.sample
> >> @@ -170,6 +170,10 @@ IMAGE_INSTALL = "hello-isar example-raw
> >> example-module-${KERNEL_NAME} enable-fsc # NOTE: this works on
> >> build host >= stretch for armhf, arm64 and amd64 targets for now.
> >> ISAR_CROSS_COMPILE ?= "0" 
> >> +#
> >> +# Generate package list 
> >> +ISAR_DO_PACKAGE_LIST ?= "1"
> >> +
> >>  #
> >>  # Uncomment this to enable use of cached base repository
> >>  #ISAR_USE_CACHED_BASE_REPO ?= "1"
> >> diff --git a/meta/classes/image-package-list-extension.bbclass
> >> b/meta/classes/image-package-list-extension.bbclass new file mode
> >> 100644 index 0000000..558922e
> >> --- /dev/null
> >> +++ b/meta/classes/image-package-list-extension.bbclass
> >> @@ -0,0 +1,16 @@
> >> +# This software is a part of ISAR.
> >> +# Copyright (C) Siemens AG, 2019
> >> +#
> >> +# SPDX-License-Identifier: MIT
> >> +
> >> +ISAR_DO_PACKAGE_LIST ??= "0"
> >> +image_package_list[dirs] = "${DEPLOY_DIR_IMAGE}"
> >> +image_package_list() {
> >> +    if
> >> [ "${@repr(bb.utils.to_boolean(d.getVar('ISAR_DO_PACKAGE_LIST')))}"
> >> = 'True' ]; then
> >> +      dpkg-query --admindir=${IMAGE_ROOTFS}/var/lib/dpkg/ \
> >> +          -f
> >> '${source:Package}|${source:Version}|${binary:Package}|${Version}\n'
> >> -W > \
> >> +          ${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.packages.lst
> >> +    fi
> >> +}
> >> +ROOTFS_POSTPROCESS_COMMAND =+ "image_package_list"
> >> +
> >> diff --git a/meta/classes/image.bbclass
> >> b/meta/classes/image.bbclass index ec6bd39..85bab64 100644
> >> --- a/meta/classes/image.bbclass
> >> +++ b/meta/classes/image.bbclass
> >> @@ -68,6 +68,7 @@ inherit image-tools-extension
> >>  inherit image-postproc-extension
> >>  inherit image-locales-extension
> >>  inherit image-account-extension
> >> +inherit image-package-list-extension
> >>  
> >>  # Extra space for rootfs in MB
> >>  ROOTFS_EXTRA ?= "64"  
> >   


  reply	other threads:[~2019-08-05 15:08 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-05 14:07 Q. Gylstorff
2019-08-05 14:37 ` vijai kumar
2019-08-05 14:43 ` Henning Schild
2019-08-05 14:48   ` Jan Kiszka
2019-08-05 15:08     ` Henning Schild [this message]
2019-08-05 15:10       ` Jan Kiszka
2019-08-05 15:00   ` Baurzhan Ismagulov
2019-08-06  8:07 ` Claudius Heine
2019-08-06  8:36   ` Baurzhan Ismagulov
2019-08-06  8:47     ` Claudius Heine
2019-08-06  9:03       ` Baurzhan Ismagulov
2019-08-06 10:38         ` Claudius Heine
2019-08-06  8:38   ` Jan Kiszka
2019-08-06  8:48     ` Claudius Heine
2019-08-06 10:51       ` Quirin Gylstorff
2019-08-06 13:55 ` [PATCH v2] " Q. Gylstorff
2019-08-07  7:52   ` Quirin Gylstorff
2019-08-07  7:56     ` Gernot Hillier
2019-08-07  8:01       ` Claudius Heine
2019-08-07  8:08         ` Gernot Hillier
2019-08-07  8:21           ` Claudius Heine
2019-08-07  8:29             ` Gernot Hillier
2019-08-07 10:00               ` Gernot Hillier
2019-08-07 10:59                 ` Baurzhan Ismagulov
2019-08-07 11:27                 ` Claudius Heine
2019-08-07 12:27                   ` Quirin Gylstorff
2019-08-09 10:30                     ` [PATCH v3] " Q. Gylstorff
2019-08-12  8:04                       ` Claudius Heine
2019-08-12  9:09                         ` Quirin Gylstorff
2019-08-12  9:57                           ` Claudius Heine
2019-08-13  8:18                           ` [PATCH v4] " Q. Gylstorff
2019-08-13  8:53                             ` Claudius Heine
2019-08-13 13:40                               ` [PATCH v5] " Q. Gylstorff
2019-09-21 13:02                                 ` Jan Kiszka
2019-09-23 12:25                                   ` [PATCH v6] " Q. Gylstorff
2019-09-23 13:51                                     ` [PATCH v7] " Q. Gylstorff
2019-10-16 12:26                                       ` Baurzhan Ismagulov

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=20190805170846.20218e13@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=Quirin.Gylstorff@siemens.com \
    --cc=isar-users@googlegroups.com \
    --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