All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Havelange <patrick.havelange@essensium.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 10/10] docs/manual/adding-packages-cargo: Update for legal-info
Date: Thu, 20 Feb 2020 17:01:19 +0100	[thread overview]
Message-ID: <20200220160119.3407-10-patrick.havelange@essensium.com> (raw)
In-Reply-To: <20200220160119.3407-1-patrick.havelange@essensium.com>

Added a bit of explanations regarding the vendored licenses.

Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
---
 docs/manual/adding-packages-cargo.txt | 45 ++++++++++++++++++++-------
 1 file changed, 34 insertions(+), 11 deletions(-)

diff --git a/docs/manual/adding-packages-cargo.txt b/docs/manual/adding-packages-cargo.txt
index e7d03eb7b5..e92b8bc353 100644
--- a/docs/manual/adding-packages-cargo.txt
+++ b/docs/manual/adding-packages-cargo.txt
@@ -38,19 +38,25 @@ with an example:
 04: #
 05: ################################################################################
 06:
-07: FOO_VERSION = 1.0
-08: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz
-09: FOO_SITE = http://www.foosoftware.org/download
-10: FOO_LICENSE = GPL-3.0+
-11: FOO_LICENSE_FILES = COPYING
-12:
-13: $(eval $(cargo-package))
+07: include package/foo/vendor.inc
+08:
+09: FOO_VERSION = 1.0
+10: FOO_SOURCE = foo-$(FOO_VERSION).tar.gz
+11: FOO_SITE = http://www.foosoftware.org/download
+12: FOO_LICENSE = GPL-3.0+
+13: FOO_LICENSE_FILES = COPYING $(FOO_VENDOR_LICENSE_FILES)
+14:
+15: $(eval $(cargo-package))
 --------------------------------
 
-The Makefile starts with the definition of the standard variables for package
-declaration (lines 7 to 11).
+The Makefile starts with the inclusion of a second file that
+contains the vendored licenses, more info on that topic later.
+Then it continues with the definition of the standard variables
+for package declaration (lines 9 to 13).
 
-As seen in line 13, it is based on the cargo-package infrastructure. Cargo will
+FOO_VENDOR_LICENSE_FILES is defined in the previously included file vendor.inc
+
+As seen in line 15, it is based on the cargo-package infrastructure. Cargo will
 be invoked automatically by this infrastructure. The required dependencies of the
 crate will be downloaded and the buildroot dependencies will also be set.
 
@@ -58,7 +64,20 @@ It is still possible to define custom build commands or install commands (i.e.
 with FOO_BUILD_CMDS and FOO_INSTALL_TARGET_CMDS).
 Those will then replace the commands from the cargo infrastructure.
 
-==== About Dependencies Management
+The file vendor.inc contains only one variable :
+
+------------------------------
+01: FOO_VENDOR_LICENSES_FILES = \
+02: 	VENDOR/bar/COPYING \
+03: 	VENDOR/blah/LICENSE-MIT \
+04:	VENDOR/bleh/COPYING \
+05: 
+--------------------------------
+
+It is recommended to generate the list via scripting.
+A script example can be found in the ripgrep directory.
+
+==== About Dependencies Management and Licenses
 
 A crate can depend on other libraries from crates.io or git repositories, listed
 in its Cargo.toml file. Before starting a build, the +cargo vendor+ command
@@ -66,3 +85,7 @@ will be run and will take care of downloading those dependencies.
 
 The final source tarball will contain all the required dependencies, effectively
 permitting us to do an offline build.
+
+In order for the +legal-info+ target to work as expected, it is necessary to list
+the licenses of the vendored dependencies. Each of those entries should be added
+to the +.mk+ and +.hash+ files.
-- 
2.17.1

  parent reply	other threads:[~2020-02-20 16:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 16:01 [Buildroot] [PATCH v3 01/10] package/pkg-cargo.mk: Introduce the cargo package infrastructure Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 02/10] docs/manual/cargo: Update manual for cargo packages Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 03/10] package/ripgrep: convert to cargo infrastructure Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 04/10] support/download/dl-wrapper: rework backend parsing Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 05/10] docs/manual/adding-packages-generic: update for new FOO_PKGMGR value Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 06/10] package/pkg-cargo.mk: Introduce the cargo dl backend Patrick Havelange
2020-08-26 19:22   ` Thomas Petazzoni
2020-02-20 16:01 ` [Buildroot] [PATCH v3 07/10] docs/manual/adding-packages-cargo: update doc for new infra Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 08/10] package/ripgrep: bump to version 11.0.1 Patrick Havelange
2020-02-20 16:01 ` [Buildroot] [PATCH v3 09/10] package/ripgrep: add legal-info for dependencies Patrick Havelange
2020-08-26 19:26   ` Thomas Petazzoni
2020-02-20 16:01 ` Patrick Havelange [this message]
2020-04-29 13:53 ` [Buildroot] [PATCH v3 01/10] package/pkg-cargo.mk: Introduce the cargo package infrastructure Romain Naour

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=20200220160119.3407-10-patrick.havelange@essensium.com \
    --to=patrick.havelange@essensium.com \
    --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 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.