Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/2] core/legal-info: Add package dependencies with licenses to the manifest
Date: Mon, 20 Aug 2018 16:59:20 +0200	[thread overview]
Message-ID: <20180820145920.GI15347@scaer> (raw)
In-Reply-To: <20180820141217.17322-2-sojkam1@fel.cvut.cz>

Michal, All,

On 2018-08-20 16:12 +0200, Michal Sojka spake thusly:
> From: Michal Sojka <sojka@merica.cz>
> 
> This adds one column to the legal-info manifest table. It contains the
> dependencies of the given package and their licenses. This information
> is useful when assessing license compatibility of the packages and
> their libraries.
> 
> An example of the content of the new column for the MPD package is
> shown below:
> 
>     "alsa-lib [LGPL-2.1+ (library), GPL-2.0+ (aserver)] boost
>     [BSL-1.0] libid3tag [GPL-2.0+] libmad [GPL-2.0+] libogg
>     [BSD-3-Clause] libvorbis [BSD-3-Clause] libzlib [Zlib]
>     skeleton-init-common [unknown] skeleton-init-sysv [unknown] sqlite
>     [Public domain] toolchain-external-linaro-arm [unknown]"
> 
> [Credits to Yann E. MORIN <yann.morin.1998@free.fr> for suggesting a
> few simplifications.]
> 
> Signed-off-by: Michal Sojka <sojka@merica.cz>

Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Yet, a little comment, see below...

[--SNIP--]
> diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk
> index 8d5ea234e4..8add57cf32 100644
> --- a/package/pkg-utils.mk
> +++ b/package/pkg-utils.mk
[--SNIP--]
> @@ -95,3 +95,12 @@ define legal-license-file # pkgname, pkgname-pkgver, pkgdir, filename, file-full
>  	} && \
>  	cp $(5) $(LICENSE_FILES_DIR_$(6))/$(2)/$(4)
>  endef
> +
> +non-virtual-deps = $(foreach p,$(1),$(if $($(call UPPERCASE,$(p))_IS_VIRTUAL),,$(p)))
> +
> +# $1: package name, lowercase
> +legal-deps = \

It is not directly obvious what this macro does, so maybe a little bit
of comment would be zelcome, something alomng the lines of:

    # Returns the recursive list of dependencies and their licensing terms
    # for the package specified in parameter. If that package is a target
    # package, remove host packages from the list.

Regards,
Yann E. MORIN.

> +    $(foreach p,\
> +        $(filter-out $(if $(1:host-%=),host-%),\
> +            $(call non-virtual-deps,\
> +                $($(call UPPERCASE,$(1))_FINAL_RECURSIVE_DEPENDENCIES))),$(p) [$($(call UPPERCASE,$(p))_LICENSE)])
> -- 
> 2.18.0
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2018-08-20 14:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 14:03 [Buildroot] [PATCH v2] core/legal-info: Add package dependencies with licenses to the manifest sojkam1 at fel.cvut.cz
2018-08-12 14:22 ` Yann E. MORIN
2018-08-13 13:40   ` Matthew Weber
2018-08-13 15:18     ` Yann E. MORIN
2018-08-20 13:57   ` Michal Sojka
2018-08-20 14:12     ` [Buildroot] [PATCH v3 1/2] core/legal-info: Change order of legal-manifest parameters Michal Sojka
2018-08-20 14:12       ` [Buildroot] [PATCH v3 2/2] core/legal-info: Add package dependencies with licenses to the manifest Michal Sojka
2018-08-20 14:59         ` Yann E. MORIN [this message]
2018-08-20 14:44       ` [Buildroot] [PATCH v3 1/2] core/legal-info: Change order of legal-manifest parameters Yann E. MORIN

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=20180820145920.GI15347@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /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