From patchwork Mon Aug 20 14:12:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Sojka X-Patchwork-Id: 959734 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fel.cvut.cz Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vG4x6vrLz9s5c for ; Tue, 21 Aug 2018 00:13:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EF1E1824FD; Mon, 20 Aug 2018 14:13:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bT8VJGWe2lAd; Mon, 20 Aug 2018 14:13:50 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D8E828310A; Mon, 20 Aug 2018 14:13:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 635801C25D9 for ; Mon, 20 Aug 2018 14:13:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 611D986699 for ; Mon, 20 Aug 2018 14:13:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id q00b6aBX+K-K for ; Mon, 20 Aug 2018 14:13:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtpx.feld.cvut.cz (smtpx.feld.cvut.cz [147.32.192.33]) by hemlock.osuosl.org (Postfix) with ESMTP id A679A861FB for ; Mon, 20 Aug 2018 14:13:47 +0000 (UTC) Received: from localhost (unknown [192.168.200.7]) by smtpx.feld.cvut.cz (Postfix) with ESMTP id 6FB84DCBFA; Mon, 20 Aug 2018 16:13:46 +0200 (CEST) X-Virus-Scanned: IMAP STYX AMAVIS Received: from smtpx.feld.cvut.cz ([192.168.200.6]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10054) with ESMTP id dTd6hxCu_xBz; Mon, 20 Aug 2018 16:13:45 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by smtpx.feld.cvut.cz (Postfix) with ESMTP id DF5B3DCBC6; Mon, 20 Aug 2018 16:13:44 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.91) (envelope-from ) id 1frkux-0004W6-2s; Mon, 20 Aug 2018 16:12:27 +0200 From: Michal Sojka To: "Yann E. MORIN" Date: Mon, 20 Aug 2018 16:12:16 +0200 Message-Id: <20180820141217.17322-1-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 2.18.0 In-Reply-To: <87h8jpcf9k.fsf@steelpick.2x.cz> References: <87h8jpcf9k.fsf@steelpick.2x.cz> Subject: [Buildroot] [PATCH v3 1/2] core/legal-info: Change order of legal-manifest parameters X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Sojka , buildroot@buildroot.org MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Michal Sojka The last parameter {HOST|TARGET} is now first. With this change, adding new columns to the legal manifest file (as in the next commit) will be slightly easier to review. Signed-off-by: Michal Sojka Tested-by: "Yann E. MORIN" Acked-by: "Yann E. MORIN" --- Makefile | 6 +++--- package/pkg-generic.mk | 2 +- package/pkg-utils.mk | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index f79d39fd26..3d8106e201 100644 --- a/Makefile +++ b/Makefile @@ -781,9 +781,9 @@ legal-info-clean: legal-info-prepare: $(LEGAL_INFO_DIR) @$(call MESSAGE,"Buildroot $(BR2_VERSION_FULL) Collecting legal info") @$(call legal-license-file,buildroot,buildroot,support/legal-info,COPYING,COPYING,HOST) - @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,TARGET) - @$(call legal-manifest,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,HOST) - @$(call legal-manifest,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved,HOST) + @$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE) + @$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE) + @$(call legal-manifest,HOST,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved) @$(call legal-warning,the Buildroot source code has not been saved) @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 91b61c6de0..6c9592123d 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -936,7 +936,7 @@ ifeq ($$($(2)_REDISTRIBUTE),YES) endif # redistribute endif # other packages - @$$(call legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call UPPERCASE,$(4))) + @$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE)) endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),) $$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep)) diff --git a/package/pkg-utils.mk b/package/pkg-utils.mk index c3acc22b17..8d5ea234e4 100644 --- a/package/pkg-utils.mk +++ b/package/pkg-utils.mk @@ -79,8 +79,8 @@ define legal-warning-nosource # pkg, {local|override} $(call legal-warning-pkg,$(1),sources not saved ($(2) packages not handled)) endef -define legal-manifest # pkg, version, license, license-files, source, url, {HOST|TARGET} - echo '"$(1)","$(2)","$(3)","$(4)","$(5)","$(6)"' >>$(LEGAL_MANIFEST_CSV_$(7)) +define legal-manifest # {HOST|TARGET}, pkg, version, license, license-files, source, url + echo '"$(2)","$(3)","$(4)","$(5)","$(6)","$(7)"' >>$(LEGAL_MANIFEST_CSV_$(1)) endef define legal-license-file # pkgname, pkgname-pkgver, pkgdir, filename, file-fullpath, {HOST|TARGET} From patchwork Mon Aug 20 14:12:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Sojka X-Patchwork-Id: 959735 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=fel.cvut.cz Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vG522sGWz9s5c for ; Tue, 21 Aug 2018 00:13:58 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 7994C86DA6; Mon, 20 Aug 2018 14:13:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Zt1Xl0fwVuz9; Mon, 20 Aug 2018 14:13:51 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 54B3286A44; Mon, 20 Aug 2018 14:13:50 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 3A3E61C25D9 for ; Mon, 20 Aug 2018 14:13:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 37C05824FD for ; Mon, 20 Aug 2018 14:13:49 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P3h3Qu3YzXe9 for ; Mon, 20 Aug 2018 14:13:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtpx.feld.cvut.cz (smtpx.feld.cvut.cz [147.32.192.33]) by whitealder.osuosl.org (Postfix) with ESMTP id 10FD4813F8 for ; Mon, 20 Aug 2018 14:13:48 +0000 (UTC) Received: from localhost (unknown [192.168.200.7]) by smtpx.feld.cvut.cz (Postfix) with ESMTP id 6C8F3DCBC6; Mon, 20 Aug 2018 16:13:47 +0200 (CEST) X-Virus-Scanned: IMAP STYX AMAVIS Received: from smtpx.feld.cvut.cz ([192.168.200.6]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10054) with ESMTP id iNWW62dp1iKb; Mon, 20 Aug 2018 16:13:45 +0200 (CEST) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by smtpx.feld.cvut.cz (Postfix) with ESMTP id D79EBDCB9B; Mon, 20 Aug 2018 16:13:45 +0200 (CEST) Received: from wsh by steelpick.2x.cz with local (Exim 4.91) (envelope-from ) id 1frkv5-0004W8-0T; Mon, 20 Aug 2018 16:12:35 +0200 From: Michal Sojka To: "Yann E. MORIN" Date: Mon, 20 Aug 2018 16:12:17 +0200 Message-Id: <20180820141217.17322-2-sojkam1@fel.cvut.cz> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180820141217.17322-1-sojkam1@fel.cvut.cz> References: <87h8jpcf9k.fsf@steelpick.2x.cz> <20180820141217.17322-1-sojkam1@fel.cvut.cz> Subject: [Buildroot] [PATCH v3 2/2] core/legal-info: Add package dependencies with licenses to the manifest X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michal Sojka , buildroot@buildroot.org MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Michal Sojka 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 for suggesting a few simplifications.] Signed-off-by: Michal Sojka Tested-by: "Yann E. MORIN" Reviewed-by: "Yann E. MORIN" --- Makefile | 4 ++-- package/pkg-generic.mk | 10 +++++++++- package/pkg-utils.mk | 13 +++++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 3d8106e201..d6809642bd 100644 --- a/Makefile +++ b/Makefile @@ -781,8 +781,8 @@ legal-info-clean: legal-info-prepare: $(LEGAL_INFO_DIR) @$(call MESSAGE,"Buildroot $(BR2_VERSION_FULL) Collecting legal info") @$(call legal-license-file,buildroot,buildroot,support/legal-info,COPYING,COPYING,HOST) - @$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE) - @$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE) + @$(call legal-manifest,TARGET,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES) + @$(call legal-manifest,HOST,PACKAGE,VERSION,LICENSE,LICENSE FILES,SOURCE ARCHIVE,SOURCE SITE,DEPENDENCIES WITH LICENSES) @$(call legal-manifest,HOST,buildroot,$(BR2_VERSION_FULL),GPL-2.0+,COPYING,not saved,not saved) @$(call legal-warning,the Buildroot source code has not been saved) @cp $(BR2_CONFIG) $(LEGAL_INFO_DIR)/buildroot.config diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 6c9592123d..a3bedb660f 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -609,6 +609,14 @@ $(2)_FINAL_ALL_DEPENDENCIES = \ $$($(2)_FINAL_DEPENDENCIES) \ $$($(2)_FINAL_EXTRACT_DEPENDENCIES) \ $$($(2)_FINAL_PATCH_DEPENDENCIES)) +$(2)_FINAL_RECURSIVE_DEPENDENCIES = \ + $$(sort \ + $$(foreach p,\ + $$($(2)_FINAL_ALL_DEPENDENCIES),\ + $$(p)\ + $$($$(call UPPERCASE,$$(p))_FINAL_RECURSIVE_DEPENDENCIES)\ + )\ + ) $(2)_INSTALL_STAGING ?= NO $(2)_INSTALL_IMAGES ?= NO @@ -936,7 +944,7 @@ ifeq ($$($(2)_REDISTRIBUTE),YES) endif # redistribute endif # other packages - @$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE)) + @$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1))) endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),) $$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep)) 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 @@ -79,8 +79,8 @@ define legal-warning-nosource # pkg, {local|override} $(call legal-warning-pkg,$(1),sources not saved ($(2) packages not handled)) endef -define legal-manifest # {HOST|TARGET}, pkg, version, license, license-files, source, url - echo '"$(2)","$(3)","$(4)","$(5)","$(6)","$(7)"' >>$(LEGAL_MANIFEST_CSV_$(1)) +define legal-manifest # {HOST|TARGET}, pkg, version, license, license-files, source, url, dependencies + echo '"$(2)","$(3)","$(4)","$(5)","$(6)","$(7)","$(8)"' >>$(LEGAL_MANIFEST_CSV_$(1)) endef define legal-license-file # pkgname, pkgname-pkgver, pkgdir, filename, file-fullpath, {HOST|TARGET} @@ -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 = \ + $(foreach p,\ + $(filter-out $(if $(1:host-%=),host-%),\ + $(call non-virtual-deps,\ + $($(call UPPERCASE,$(1))_FINAL_RECURSIVE_DEPENDENCIES))),$(p) [$($(call UPPERCASE,$(p))_LICENSE)])