All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 18:48   ` Arnout Vandecappelle
  2016-05-11 21:23   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives Yann E. MORIN
                   ` (13 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

When preparing the legal-info, the source archives are copied in the
legal-info/ output directory. When the archives are big, it can take
quite a bit of time and unnecessarily uses disk space. When the
legal-info output directory is on the same filesystem as the BR2_DL_DIR,
we can easily reduce copy time and disk usage by just using hardlins
instead of copying. However, the BR2_DL_DIR may be on a different
filesystem, so we must fallback to copying in this case

Introduce a helper script that copies a source file into a destination
directory, by first attempting to hard-link, and falling back to a
plain copy in case the hardlink fails.

In case the destination already exists, it is forcibly removed first, to
avoid clobering any existing target file (and especially any hardlink to
it), since cp -f does not remove the destination file, but clobbers it.

In some situations, it will be necessary that the destination file is
named differently than the source, so if a third argument is specified,
it is treated as the basename of the destination file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>

---
Changes v6 -> v7:
  - more explicit variables  (Arnout)
  - drop the variable with the helper path  (Arnout)
  - use shell substitution instead of $(basename ...)  (Arnout! ;- )
  - improve commit log to explain the 'rm -f'
  - split now-too-long line

Changes v5 -> v6:
  - rename script  (Thomas, Arnout)
  - drop the macro  (Thomas, Arnout)
  - drop Luca's reviewed-by and tested-by tags, because the macro
    disapeared
  - fix redundancy in comments in the script

Changes v4 -> v5:
  - move the body of the macro to a shell script  (Luca)

Changes v3 -> v4:
  - forcibly remove destination file first  (Arnout, Luca)
  - typoes  (Luca)
  - drop trailing slash in destination directory name

Changes v2 -> v3;
  - use "ln" instead of "cp -l"
  - accept third argument, as the basename of the destination file
  - drop reviewed-by and tested-by tags given in v2, due to the above
    two changes

Changes RFC -> v1:
  - move to pkg-utils  (Luca)
---
 support/scripts/hardlink-or-copy | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100755 support/scripts/hardlink-or-copy

diff --git a/support/scripts/hardlink-or-copy b/support/scripts/hardlink-or-copy
new file mode 100755
index 0000000..b046bdf
--- /dev/null
+++ b/support/scripts/hardlink-or-copy
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# Try to hardlink a file into a directory, fallback to copy on failure.
+#
+# Hardlink-or-copy the source file in the first argument into the
+# destination directory in the second argument, using the basename in
+# the third argument as basename for the destination file. If the third
+# argument is missing, use the basename of the source file as basename
+# for the destination file.
+#
+# In either case, remove the destination prior to doing the
+# hardlink-or-copy.
+#
+# Note that this is NOT an atomic operation.
+
+set -e
+
+main() {
+    local src_file="${1}"
+    local dst_dir="${2}"
+    local dst_file="${3}"
+
+    if [ -n "${dst_file}" ]; then
+        dst_file="${dst_dir}/${dst_file}"
+    else
+        dst_file="${dst_dir}/${src_file##*/}"
+    fi
+
+    mkdir -p "${dst_dir}"
+    rm -f "${dst_file}"
+    ln -f "${src_file}" "${dst_file}" 2>/dev/null \
+    || cp -f "${src_file}" "${dst_file}"
+}
+
+main "${@}"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
  2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 19:54   ` Arnout Vandecappelle
  2016-05-11 21:24   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version Yann E. MORIN
                   ` (12 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

.. and use $(Q) instead of a hard-coded @.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>

---
Changes v6 -> v7:
  - directly call the wrapper without the variable pointing to it
    (Arnout)
  - fix left-over comma  (Arnout)

Changes v5 -> v6:
  - directly call the helper script  (Thomas, Arnout)
  - drop Luca's and Arnout's tags, as the code did change a bit

Changes v4 -> v5:
  - s/Copy/Save/ because we're not really copying

Changes v2 -> v3:
  - comment the @ -> $(Q) change  (Arnout)
---
 package/pkg-generic.mk | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 3904c09..f9c7cf8 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -803,9 +803,10 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
 ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
 	$$(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE)/$$($(2)_ACTUAL_SOURCE_TARBALL))
 endif
-# Copy the source tarball (just hardlink if possible)
-	@cp -l $$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) 2>/dev/null || \
-	    cp $$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))
+# Save the source tarball
+	$$(Q)support/scripts/hardlink-or-copy \
+		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
+		$$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))
 endif # redistribute
 
 endif # other packages
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
  2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
  2016-05-07 16:14 ` [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-11 21:29   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir Yann E. MORIN
                   ` (11 subsequent siblings)
  14 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Introduce a new per-package variable to store the 'rawname-version'
tuple, instead of computing it every time we need it.

Currently, it's only a single location, but follow-up patches will
introduce more use of it.

Reported-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
Changes v5 -> v6:
  - rename variable  (Thomas)
---
 package/pkg-generic.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index f9c7cf8..688123c 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -393,6 +393,7 @@ ifdef $(3)_OVERRIDE_SRCDIR
 endif
 
 $(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
+$(2)_RAW_BASE_NAME = $$($(2)_RAWNAME)-$$($(2)_VERSION)
 $(2)_DL_DIR	=  $$(DL_DIR)/$$($(2)_BASE_NAME)
 $(2)_DIR	=  $$(BUILD_DIR)/$$($(2)_BASE_NAME)
 
@@ -423,7 +424,7 @@ ifndef $(2)_SOURCE
  ifdef $(3)_SOURCE
   $(2)_SOURCE = $$($(3)_SOURCE)
  else
-  $(2)_SOURCE			?= $$($(2)_RAWNAME)-$$($(2)_VERSION).tar.gz
+  $(2)_SOURCE			?= $$($(2)_RAW_BASE_NAME).tar.gz
  endif
 endif
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (2 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-11 21:40   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory Yann E. MORIN
                   ` (10 subsequent siblings)
  14 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Currently, we put all source archives side-by-side in the same
directory.

Since we're about to also save individual patches that were applied
on those sources, we don't want to make that directory a complete
mess of unassorted files.

So, we install each source archive in its own sub-directory, where
we'll later store the patches too. Store that location in a variable,
so it can be re-used later on (to install patches in a future commit).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
Changes v6 -> v7:
  - directly call the helper

Changes v5 -> v6:
  - variable with raw name was renamed  (Thomas)

Changes v1 -> v2:
  - perl no longer has a post-legal-info hook  (Thomas, Luca)
---
 package/pkg-generic.mk | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 688123c..b031879 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -482,6 +482,8 @@ endif
 
 $(2)_REDISTRIBUTE		?= YES
 
+$(2)_REDIST_SOURCES_DIR = $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))/$$($(2)_RAW_BASE_NAME)
+
 # When a target package is a toolchain dependency set this variable to
 # 'NO' so the 'toolchain' dependency is not added to prevent a circular
 # dependency
@@ -807,7 +809,7 @@ endif
 # Save the source tarball
 	$$(Q)support/scripts/hardlink-or-copy \
 		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
-		$$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))
+		$$($(2)_REDIST_SOURCES_DIR)
 endif # redistribute
 
 endif # other packages
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (3 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 20:01   ` Arnout Vandecappelle
  2016-06-24 13:50   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches Yann E. MORIN
                   ` (9 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Now that we save the source archives in a directory named after the
package and its version, do the same for the license files, for
consistency.

It has a not-so-bad side-effect of also saving the version string in
the all-licenses list.

The only (small) side-effect, is that the warnings about undefined
_LICENSE_FILES now contains the version string, too. That's unavoidable,
since that's what is stored in the legal report.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

---
Chages v5 -> v6:
  - raw name variable was renamed  (Thomas)

Changes v1 -> v2:
  - s/drawback/side-effect/  (Luca)
---
 package/pkg-generic.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index b031879..7a86355 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -786,10 +786,10 @@ ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
 # is that the license still applies to the files distributed as part
 # of the rootfs, even if the sources are not themselves redistributed.
 ifeq ($$(call qstrip,$$($(2)_LICENSE_FILES)),)
-	@$$(call legal-license-nofiles,$$($(2)_RAWNAME),$$(call UPPERCASE,$(4)))
-	@$$(call legal-warning-pkg,$$($(2)_RAWNAME),cannot save license ($(2)_LICENSE_FILES not defined))
+	@$$(call legal-license-nofiles,$$($(2)_RAW_BASE_NAME),$$(call UPPERCASE,$(4)))
+	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))
 else
-	@$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
+	@$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAW_BASE_NAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
 endif # license files
 
 ifeq ($$($(2)_SITE_METHOD),local)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (4 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 20:09   ` Arnout Vandecappelle
  2016-06-24 14:02   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames Yann E. MORIN
                   ` (8 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Currently, we only store the filename of the applied patches.

However, we are soon to want to install those patches in the legal-info
directory, so we'll have to know where those patches come from.

Instead of duplicating the logic to find the patches (bundled,
downloaded, from a global patch dir...), just store the full path to
each of those patches so we can retrieve them more easily later on.

Also always create the list-file, even if empty, so that we need not
test for its existence before reading it.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
[Tested only with patches in the Buildroot sources]
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

---
Changes v1 -> v2:
  - do not duplicate '/' in paths  (Luca)
---
 support/scripts/apply-patches.sh | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 201278d..20a1552 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -63,8 +63,12 @@ find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \
     xargs -0 -r rm -f
 
 function apply_patch {
-    path=$1
-    patch=$2
+    path="${1%%/}"
+    patch="${2}"
+    case "${path}" in
+        /*) ;;
+        *)  path="$(pwd)/${path}";;
+    esac
     if [ "$3" ]; then
         type="series"; uncomp="cat"
     else
@@ -99,7 +103,7 @@ function apply_patch {
         echo "Error: missing patch file ${path}/$patch"
         exit 1
     fi
-    echo $patch >> ${builddir}/.applied_patches_list
+    echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
     ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
     if [ $? != 0 ] ; then
         echo "Patch failed!  Please fix ${patch}!"
@@ -141,6 +145,7 @@ function scan_patchdir {
     fi
 }
 
+touch ${builddir}/.applied_patches_list
 scan_patchdir "$patchdir" "$patchpattern"
 
 # Check for rejects...
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (5 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 20:16   ` Arnout Vandecappelle
  2016-06-24 14:09   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches Yann E. MORIN
                   ` (7 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Patches we save can come from various locations;
  - bundled with Buildroot
  - downloaded
  - from one or more global-patch-dir

It is possible that two patches lying into different locations have the
same basename, like so (first is bundled, second is from an hypothetical
global-patch-dir):
    package/foo/0001-fix-Makefile.patch
    /path/to/my/patches/foo/0001-fix-Makefile.patch

In that case, when running legal-info, we'd save only the second patch,
overwriting the first. That would be oproblematic, because:

  - either the second patch depends on the first, and thus would no longer
    apply (this is easy to detect, though),

  - or the second patch does not dpend on the first, and the compliance
    delivery will not be complete (this is much arder to detect).

We fix that by checking that no two patches have the same same basename.
If we find that the basename of the patch to be applied collides with
that of a previously applied patch, we error out and report the duplicate.

The unfortunate side-effect is that existing setups will now break in
that situation, but that's a minor, corner-case issue that is easily
fixed.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
Changes v6 -> v7:
  - reword error message

Changes v5 -> v6:
  - don't renumber, detect collision and error out  (Luca, Arnout,
    Thomas)
---
 support/scripts/apply-patches.sh | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
index 20a1552..f8b6ca3 100755
--- a/support/scripts/apply-patches.sh
+++ b/support/scripts/apply-patches.sh
@@ -103,6 +103,14 @@ function apply_patch {
         echo "Error: missing patch file ${path}/$patch"
         exit 1
     fi
+    existing="$( grep -E "/${patch}\$" ${builddir}/.applied_patches_list )"
+    if [ -n "${existing}" ]; then
+        echo "Error: duplicate filename '${patch}'"
+        echo "Conflicting files are:"
+        echo "  already applied: ${existing}"
+        echo "  to be applied  : ${path}/${patch}"
+        exit 1
+    fi
     echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
     ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
     if [ $? != 0 ] ; then
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4)
@ 2016-05-07 16:14 Yann E. MORIN
  2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
                   ` (14 more replies)
  0 siblings, 15 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Hello All!

This series brings improvements to the legal-info infrastructure, so
that we provide the most complete and correct content in the output of
legal-info.

TL;DR:

Currently, our legal-info ouput is missing two types of files that might
be important to have included in the legal-info output:
  - patches
  - extra downloads


This series is split in 5 consecutive parts, each depending on the
previous ones:

  - patches 1-2 introduce a helper to hardlink-or-copy, i.e. first try
    to hardlink and fallback to plain copy. This is usefull to save copy
    time when source and destination are on the same filesystem, while
    still working when they are not.

  - patches 3-5 reorganise the legal-info output directory:
    - move sources into their own subdirectory, named after the package
      and its version
    - rename the license directory, by adding the package version after
      its name
    This is in preparation of also saving patches and extra downloads
    along the source archives of packages.

  - patches 6-9 add patches and extra downloads to the legal-info.

  - patch 10 (from Luca) explicitly states, in the legal-info header,
    the licensing of patches.

  - patch 11 simply generates a sha256 hash of all files in the
    legal-info output.

  - patches 12-13 make legal-info work for off-line builds. See the
    commit log of patch 13 for an example of why this is needed.


------------------------------------------------------------------------

Why save patches?
-----------------

So far, we've shuffled the patches under the rag, assuming the user
would provide the Buildroot source tree with the compliance delivery, so
that our bundled patches would automatically be included.

However, that's not enough, as not all patches may be in the Buildroot
source tree. That's the case for at least two types of patches:
  - patches that are downloaded,
  - patches from a global patch directory.

In either case, those patches must be provided in the output of
legal-info, because they are not part of Buildroot, so distributing
Buidlroot would not be enough.

Patches that are referenced from Buidlroot (like patches retrieved at
download time from a http://-or-such scheme to a publicly-reachable
location) would probably be OK-ish, even if not to the letter of the
compliance requirements.

That's not so much the case for patches from a global patch dir, since
those would be completely ignored and usually unreachable from a
recipient of the compliance delivery.

So we must save those two types of patches in the output of legal-info.
Because it would be a bit silly to only save the non-bundled patches, we
just save all of them, whether bundled in Buildroot, downloaded or from
a global patch dir alike.


Note about saving patches
-------------------------

Buildroot can apply patches from at least three different locations:
  - patches bundled in Buildroot itself,
  - patches download either with FOO_PATCH or FOO_EXTRA_DOWNLOADS
  - patches from one or more BR2_GLOBAL_PATCH_DIR

Since those patches are stored in three different locations, it is
perfectly legit that two patches in two different locations have the
same basename.

However, when saving the patches, the second to be saved would overwrite
the previous one, and would thus cause troubles down the road:

  - the second patch would be applied earlier due to it being referenced
    by the series file, and thus may not apply; even if it applies
    cleanly, it would still be listed a second time in the series, and
    thus would fail to apply that second time,

  - the compliance distribution would not be compliant.

Hence we have two options at our disposal:

  - when saving the legal-info, rename the patch files so no two patches
    have the same name; this is easily achieved by prefixing them with a
    monotonically-incrementing counter, or

  - detect that no two patches have the same basename and fail at
    apply-patch time if that is the case.

This series implements the second solution. The immediate drawback is
that in rare circumstances, existing setups (e.g. with patches in a
global patch directory) which has duplicatre basenames will cease to
work at the time patches are applied.

The alternative first solution, although tested and implemented (and
previously submitted) has the drawback that most patches will have two
indexes, whiit the the immediate advantage that it accepts input patches
with the same basename (and thus would not break existing setups).

After the previous reviews, it was deemed preferrable to have less ugly
patch filenames and break the build, rather than have uglier patch
filenames and not break the build, given how unlikely the situation with
duplicate basenames is.


Why save extra downloads?
-------------------------

Some packages are using extra-downloads to complement the content of the
main archive. That's the case for Perl, for which the cross-compilation
"enabler" is downloaded as a secondary archive via extra downloads. The
Blackfin external toolchains also use extra downloads to download a
secondary archive with the sysroot.

Even though the Blackfin sysroot archive is not really a source, we
still need to provide it along with the main archive, otherwise it's
completely impossible to compile with just the "main" toolchain.

As for the Perl case, however, we're "only" downloading a buildsystem
infrastructure (AFAIU), but without it, it is completely impossible to
cross-compile Perl at all.

So, in both cases, we also need to save the extra downloads.


Changlog of the series
----------------------

Changes v6 -> v7:
  - don't add a make variable that points to the hardlink-or-copy helper
    (Arnout)
  - misc eye-candy improvements in said helper  (Arnout)
  - fix calls to the helper (only the full series was working; an
    intermediate patch was incorrect)  (Arnout)
  - re-order patches so that off-line legal-info comes last  (Arnout)

Changes v5 -> v6:
  - drop the hardlink-or-copy macro, only keep the script  (Thomas,
    Arnout)
  - don;t renumber patches; instead, detect duplicate files basenames
    and abort  (Thomas, Arnout, Luca)
  - rename the raw basename variable  (Thomas)
  - tweak the phrasing about patches licenses  (Arnout)
  - completely ignoring packages from legal-info was deemd too
    controversial; drop it (at least for now! ;-) )
  - fix misc comments and typoes

Changes v4 -> v5:
  - fix the macro by making it  ashell script  (Luca)
  - typoes

Changes v3 -> v4:
  - add hashes for sources to more CodeSourcery pre-built toolchains
    (Arnout)
  - fix hardlink-or-copy when the destination may already exist
    (Arnout, Luca)
  - handle downloading actual sources with a stamp file  (Luca)
  - rephrase manual about ignoring packages  (Luca)
  - typoes  (Luca)
  - add first patch, to fix fetching sources for Linaro pre-built
    toolchains

Changes v2 -> v3:
  - re-order variables in their own patch  (Arnout)
  - update legal-info header about the patches  (Luca)
  - add hashes for external toolchains sources  (Luca, Arnout)
  - misc and typoes  (Arnout, Luca)
  - enhance the hardlink-or-copy macro

Changes v1 -> v2:
  - keep only the core legal-info patches, drop the gcc/binutils/gdb
    changes (they'll be reworked later, let's focus on the important and
    easier parts first)
  - drop the tristate REDISTRIBUTE, introduce another boolean
    _LEGAL_IGNORE  (Thomas, Peter, Luca)
  - drop the post-legal-info Perl hook, it's no longer needed thanks to
    saving extra downloads  (Thomas, Luca)
  - compute the rawname-version tuple only once, instead of five times
    (Luca)
  - reorder patches  (Luca)
  - slight commit log rephrasing and corrections  (Luca)


Regards,
Yann E. MORIN.



-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (6 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 20:36   ` Arnout Vandecappelle
  2016-06-24 14:22   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads Yann E. MORIN
                   ` (6 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Currently, the legal-info infra only saves the source archive of a
package. However, that's not enough as we may apply some patches on
packages sources.

We do suggest users to also redistribute the Buildroot sources as part
of their compliance distribution, so the patches bundled in Buildroot
would indeed be included in the compliance distribution.

However, that's still not enough, since we may download some patches, or
the user may use a global patch directory. Patches in there might not
end up in the compliance distribution, and there are risks of
non-conformity.

So, always include patches alongside the source archive.

To ensure reproducibility, we also generate a series file, so patches
can be re-applied in the correct order.

We get the list of patches to include from the list of patches that were
applied by the package infrastructure (via the apply-patches support
script). So, we need to get packages properly extracted and patched
before we can save their legal-info, not just in the case they define
_LICENSE_FILES.

Update the legal-info header accordingly.

Note: this means that, when a package is not patched and defines no
LICENSE_FILES, we will extract and patch it for nothing. There is no
easy way to know whether we have to patch a package or not. We can only
either duplicate the logic to detect patches (bad) or rely on the infra
actually patching the package. Also, a vast majority of packages are
either patched, or define _LICENSE_FILES, so it is best and easiest to
always extract and patch them prior to legal-info.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>

---
Changes v6 -> v7:
  - directly call the helper

Changes v3 -> v4:
  - typo  (Luca)

Changes v2 -> v3:
  - also mention that patches have been saved  (Luca)

Changes v1 -> v2:
  - don't recompute rawname-version needlessly  (Luca)
---
 package/pkg-generic.mk           | 15 ++++++++++-----
 support/legal-info/README.header |  9 +++++----
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 7a86355..13455d1 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -749,12 +749,10 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
 endif
 $(2)_MANIFEST_LICENSE_FILES ?= not saved
 
-# If the package declares _LICENSE_FILES, we need to extract it,
-# for overriden, local or normal remote packages alike, whether
-# we want to redistribute it or not.
-ifneq ($$($(2)_LICENSE_FILES),)
+# We need to extract and patch a package to be able to retrieve its
+# license files (if any) and the list of patches applied to it (if
+# any).
 $(1)-legal-info: $(1)-patch
-endif
 
 # We only save the sources of packages we want to redistribute, that are
 # non-overriden (local or true override).
@@ -810,6 +808,13 @@ endif
 	$$(Q)support/scripts/hardlink-or-copy \
 		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
 		$$($(2)_REDIST_SOURCES_DIR)
+# Save patches and generate the series file
+	$$(Q)while read f; do \
+		support/scripts/hardlink-or-copy \
+			$$$${f} \
+			$$($(2)_REDIST_SOURCES_DIR) || exit 1; \
+		printf "%s\n" "$$$${f##*/}" >>$$($(2)_REDIST_SOURCES_DIR)/series || exit 1; \
+	done <$$($(2)_DIR)/.applied_patches_list
 endif # redistribute
 
 endif # other packages
diff --git a/support/legal-info/README.header b/support/legal-info/README.header
index d07c45d..418de14 100644
--- a/support/legal-info/README.header
+++ b/support/legal-info/README.header
@@ -14,10 +14,11 @@ This material is composed of the following items.
    compiled programs.
    Note: this may have not been saved due to technical limitations, you may
    need to collect it manually.
- * The source code for all packages; this has been saved in the sources/
-   subdirectory (except for the non-redistributable packages, which have not
-   been saved); patches applied to some packages by Buildroot are included in
-   the Buildroot sources and were not duplicated in the sources/ subdirectory.
+ * The original source code for all packages; this has been saved in the
+   sources/ subdirectory (except for the non-redistributable packages, which
+   have not been saved). Patches that were applied are also saved, along
+   with a file named 'series' that lists the patches in the order they were
+   applied.
  * A manifest file listing the configured packages and related information.
  * The license text of the packages; they have been saved in the licenses/
    subdirectory.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (7 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-05-07 20:42   ` Arnout Vandecappelle
  2016-06-24 14:22   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed Yann E. MORIN
                   ` (5 subsequent siblings)
  14 siblings, 2 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Some packages, like perl, download extra files that end up as part of
the source that Buildroot builds. Up until now, those files were not
saved in the legal-info output.

Add those files to the legal-info output.

The unfortunate side-effect is that we will also save the secondary
archive for the external blackfin toolchains; however, we already do
save the binary release of some external toolchains when they do not
provide actual source archives.

This is inherently bad, as those are not source archives, but solving
this is a bigger concern, for another series...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

---
Changes v6 -> v7:
  - directly call the wrapper
  - fix after re-ordering patches

Changes v2 -> v3:
  - typo  (Luca)
  - incorporate the post-commit log message (the part about the
    side-effect) into the commit log itself, it makes sense to not
    forget about that
---
 package/pkg-generic.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 13455d1..a720930 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -804,10 +804,12 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
 ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
 	$$(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE)/$$($(2)_ACTUAL_SOURCE_TARBALL))
 endif
-# Save the source tarball
-	$$(Q)support/scripts/hardlink-or-copy \
-		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
-		$$($(2)_REDIST_SOURCES_DIR)
+# Save the source tarball and any extra downloads, but not
+# patches, as they are handled specially afterwards.
+	$$(foreach e,$$($(2)_ACTUAL_SOURCE_TARBALL) $$(notdir $$($(2)_EXTRA_DOWNLOADS)),\
+		$$(Q)support/scripts/hardlink-or-copy \
+			$$(DL_DIR)/$$(e) \
+			$$($(2)_REDIST_SOURCES_DIR)$$(sep))
 # Save patches and generate the series file
 	$$(Q)while read f; do \
 		support/scripts/hardlink-or-copy \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (8 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-06-24 14:25   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files Yann E. MORIN
                   ` (4 subsequent siblings)
  14 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

From: Luca Ceresoli <luca@lucaceresoli.net>

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[yann.morin.1998 at free.fr: slightly tweak after Arnout's review]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

---
Changes v5 -> v6:
  - slightly tweak the phrasing  (Arnout)
---
 support/legal-info/README.header | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/support/legal-info/README.header b/support/legal-info/README.header
index 418de14..1f3524f 100644
--- a/support/legal-info/README.header
+++ b/support/legal-info/README.header
@@ -18,7 +18,8 @@ This material is composed of the following items.
    sources/ subdirectory (except for the non-redistributable packages, which
    have not been saved). Patches that were applied are also saved, along
    with a file named 'series' that lists the patches in the order they were
-   applied.
+   applied. Patches are under the same license as the files that they modify
+   in the original package.
  * A manifest file listing the configured packages and related information.
  * The license text of the packages; they have been saved in the licenses/
    subdirectory.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (9 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-06-24 15:08   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info Yann E. MORIN
                   ` (3 subsequent siblings)
  14 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Having a hash of the saved files can be interesting for the recipient to
verify the integrity of the files.

We remove the warning file earlier, to exclude it from the hash list.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

---
Changes v1 -> v2:
  - simplify getting rid of the ..../legal-info/ prefix  (Luca)
  - always sort with the C locale
---
 Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index daa32a4..688bf26 100644
--- a/Makefile
+++ b/Makefile
@@ -701,8 +701,14 @@ legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p
 		cat support/legal-info/README.warnings-header \
 			$(LEGAL_WARNINGS) >>$(LEGAL_REPORT); \
 		cat $(LEGAL_WARNINGS); fi
-	@echo "Legal info produced in $(LEGAL_INFO_DIR)"
 	@rm -f $(LEGAL_WARNINGS)
+	@(cd $(LEGAL_INFO_DIR); \
+	  find * -type f -exec sha256sum {} + \
+	  |LC_ALL=C sort -k2 \
+	  >.legal-info.sha256; \
+	  mv .legal-info.sha256 legal-info.sha256 \
+	)
+	@echo "Legal info produced in $(LEGAL_INFO_DIR)"
 
 show-targets:
 	@echo $(PACKAGES) $(TARGETS_ROOTFS)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (10 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-06-24 15:10   ` Thomas Petazzoni
  2016-05-07 16:14 ` [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode Yann E. MORIN
                   ` (2 subsequent siblings)
  14 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Move the declarations of _ACTUAL_SOURCE and _ACTUAL_SITE earlier, so
that they are close to where _SOURCE and _SITE are handled.

This looks so far like a purely cosmetic change, but makes more sense
with the follow-up patch, where we'll need them earlier in the file.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

---
Changes v2 -> v3:
  - move that to its own patch  (Arnout)
---
 package/pkg-generic.mk | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index a720930..6e834dd 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -428,6 +428,14 @@ ifndef $(2)_SOURCE
  endif
 endif
 
+# If FOO_ACTUAL_SOURCE_TARBALL is explicitly defined, it means FOO_SOURCE is
+# indeed a binary (e.g. external toolchain) and FOO_ACTUAL_SOURCE_TARBALL/_SITE
+# point to the actual sources tarball. Use the actual sources for legal-info.
+# For most packages the FOO_SITE/FOO_SOURCE pair points to real source code,
+# so these are the defaults for FOO_ACTUAL_*.
+$(2)_ACTUAL_SOURCE_TARBALL ?= $$($(2)_SOURCE)
+$(2)_ACTUAL_SOURCE_SITE    ?= $$(call qstrip,$$($(2)_SITE))
+
 ifndef $(2)_PATCH
  ifdef $(3)_PATCH
   $(2)_PATCH = $$($(3)_PATCH)
@@ -763,14 +771,6 @@ $(1)-legal-info: $(1)-source $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))
 endif
 endif
 
-# If FOO_ACTUAL_SOURCE_TARBALL is explicitly defined, it means FOO_SOURCE is
-# indeed a binary (e.g. external toolchain) and FOO_ACTUAL_SOURCE_TARBALL/_SITE
-# point to the actual sources tarball. Use the actual sources for legal-info.
-# For most packages the FOO_SITE/FOO_SOURCE pair points to real source code,
-# so these are the defaults for FOO_ACTUAL_*.
-$(2)_ACTUAL_SOURCE_TARBALL ?= $$($(2)_SOURCE)
-$(2)_ACTUAL_SOURCE_SITE    ?= $$(call qstrip,$$($(2)_SITE))
-
 # legal-info: produce legally relevant info.
 $(1)-legal-info:
 # Packages without a source are assumed to be part of Buildroot, skip them.
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (11 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info Yann E. MORIN
@ 2016-05-07 16:14 ` Yann E. MORIN
  2016-06-24 15:11   ` Thomas Petazzoni
  2016-06-22 21:12 ` [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
  2016-06-24 15:11 ` Thomas Petazzoni
  14 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-07 16:14 UTC (permalink / raw)
  To: buildroot

Almost all packages which are saved for legal-info have their source
archives downloaded as part of 'make source', which makes an off-line
build completely possible [0].

However, for the pre-configured external toolchains, the source tarball
is different, as the main tarball is a binary package. And that source
tarball is only downloaded during the legal-info phase, which makes it
inconvenient for full off-line builds.

We fix that by adding a new rule, $(1)-legal-source which only
$(1)-all-source depends on, so that we only download it for a top-level
'make source', not as part of the standard download mechanism (i.e. only
what is really needed to build).

This new rule depends, like the normal download mechanism, on a stamp
file, so that we do not emit a spurious hash-check message on successive
runs of 'make source'.

This way, we can do a complete [0] off-line build and are still able to
generate legal-info, while at the same time we do not incur any download
overhead during a simple build.

Also, we previously downloaded the _ACTUAL_SOURCE_TARBALL when it was
not empty. However, since _ACTUAL_SOURCE_TARBALL defaults to the value
of _SOURCE, it can not be empty when _SOURCE is not. Thus, we'd get a
spurious report of a missing hash for the tarball, since it was not in
a standard package rule (configure, build, install..) and thus would
miss the PKG and PKGDIR variables to find the .hash file.

We fix that in this commit as well, by:

  - setting PKG and PKGDIR just for the -legal-source rule;

  - only downloading _ACTUAL_SOURCE_TARBALL if it is not empty *and* not
    the same as _SOURCE (to avoid a second report about the hash).

[0] Save for nodejs which invarriably wants to download stuff at build
time. Sigh... :-( Fixing that is work for another time...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Luca Ceresoli <luca@lucaceresoli.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

---
Notes: here is a case where one would need to be able to do an off-line
legal-info:
  - a build farm (e.g. Jenkins slaves) without access to the internet;
  - a single machine (not part of the farm) has access to the internet;
  - that machine runs "make source" to populate a mirror (a "primary
    mirror" or an NFS-mounted directory or anything else) that is
    accessible to the build farm;
  - machines in the build farm need the actual sources to run
    legal-info, doing so off-line.

So, "make source" has to be complete, i.e. it must also download the
acutal source archives.

---
Changes v6 -> v7:
  - fix after re-ordering patches

Changes v3 -> v4:
  - handle it with a stamp file  (Luca)

Changes v2 -> v3:
  - re-order the PHONY targets  (Arnout)
  - don't reorder setting _ACTUAL_SOURCE/_SITE, it's done in its own
    patch now  (Arnout)
  - adapt the commit log accordingly  (Arnout)
  - typo

Changes v1 -> v2:
  - drop the 'redistribute == ignore', it does not exist yet
---
 package/pkg-generic.mk | 25 ++++++++++++++++++++++---
 1 file changed, 22 insertions(+), 3 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 6e834dd..5f413a2 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -123,6 +123,12 @@ $(BUILD_DIR)/%/.stamp_downloaded:
 	$(Q)mkdir -p $(@D)
 	$(Q)touch $@
 
+# Retrieve actual source archive, e.g. for prebuilt external toolchains
+$(BUILD_DIR)/%/.stamp_actual_downloaded:
+	$(call DOWNLOAD,$($(PKG)_ACTUAL_SOURCE_SITE)/$($(PKG)_ACTUAL_SOURCE_TARBALL)); \
+	$(Q)mkdir -p $(@D)
+	$(Q)touch $@
+
 # Unpack the archive
 $(BUILD_DIR)/%/.stamp_extracted:
 	@$(call step_start,extract)
@@ -530,6 +536,7 @@ $(2)_TARGET_RSYNC =	        $$($(2)_DIR)/.stamp_rsynced
 $(2)_TARGET_PATCH =		$$($(2)_DIR)/.stamp_patched
 $(2)_TARGET_EXTRACT =		$$($(2)_DIR)/.stamp_extracted
 $(2)_TARGET_SOURCE =		$$($(2)_DIR)/.stamp_downloaded
+$(2)_TARGET_ACTUAL_SOURCE =	$$($(2)_DIR)/.stamp_actual_downloaded
 $(2)_TARGET_DIRCLEAN =		$$($(2)_DIR)/.stamp_dircleaned
 
 # default extract command
@@ -637,6 +644,17 @@ $(1)-depends:		$$($(2)_FINAL_DEPENDENCIES)
 
 $(1)-source:		$$($(2)_TARGET_SOURCE)
 
+$(1)-all-source:	$(1)-legal-source
+$(1)-legal-info:	$(1)-legal-source
+$(1)-legal-source:	$(1)-source
+
+# Only download the actual source if it differs from the 'main' archive
+ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),)
+ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
+$(1)-legal-source:	$$($(2)_TARGET_ACTUAL_SOURCE)
+endif # actual sources != sources
+endif # actual sources != ""
+
 $(1)-source-check:
 	$$(foreach p,$$($(2)_ALL_DOWNLOADS),$$(call SOURCE_CHECK,$$(p))$$(sep))
 
@@ -662,6 +680,7 @@ $(1)-extract:		$(1)-rsync
 $(1)-rsync:		$$($(2)_TARGET_RSYNC)
 
 $(1)-source:
+$(1)-legal-source:
 
 $(1)-source-check:
 	test -d $$($(2)_OVERRIDE_SRCDIR)
@@ -736,6 +755,8 @@ $$($(2)_TARGET_PATCH):			PKGDIR=$(pkgdir)
 $$($(2)_TARGET_EXTRACT):		PKG=$(2)
 $$($(2)_TARGET_SOURCE):			PKG=$(2)
 $$($(2)_TARGET_SOURCE):			PKGDIR=$(pkgdir)
+$$($(2)_TARGET_ACTUAL_SOURCE):		PKG=$(2)
+$$($(2)_TARGET_ACTUAL_SOURCE):		PKGDIR=$(pkgdir)
 $$($(2)_TARGET_DIRCLEAN):		PKG=$(2)
 
 # Compute the name of the Kconfig option that correspond to the
@@ -801,9 +822,6 @@ else
 # Other packages
 
 ifeq ($$($(2)_REDISTRIBUTE),YES)
-ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
-	$$(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE)/$$($(2)_ACTUAL_SOURCE_TARBALL))
-endif
 # Save the source tarball and any extra downloads, but not
 # patches, as they are handled specially afterwards.
 	$$(foreach e,$$($(2)_ACTUAL_SOURCE_TARBALL) $$(notdir $$($(2)_EXTRA_DOWNLOADS)),\
@@ -907,6 +925,7 @@ endif
 	$(1)-install-staging \
 	$(1)-install-target \
 	$(1)-legal-info \
+	$(1)-legal-source \
 	$(1)-patch \
 	$(1)-rebuild \
 	$(1)-reconfigure \
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy
  2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
@ 2016-05-07 18:48   ` Arnout Vandecappelle
  2016-05-11 21:23   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 18:48 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> When preparing the legal-info, the source archives are copied in the
> legal-info/ output directory. When the archives are big, it can take
> quite a bit of time and unnecessarily uses disk space. When the
> legal-info output directory is on the same filesystem as the BR2_DL_DIR,
> we can easily reduce copy time and disk usage by just using hardlins
> instead of copying. However, the BR2_DL_DIR may be on a different
> filesystem, so we must fallback to copying in this case
>
> Introduce a helper script that copies a source file into a destination
> directory, by first attempting to hard-link, and falling back to a
> plain copy in case the hardlink fails.
>
> In case the destination already exists, it is forcibly removed first, to
> avoid clobering any existing target file (and especially any hardlink to
> it), since cp -f does not remove the destination file, but clobbers it.
>
> In some situations, it will be necessary that the destination file is
> named differently than the source, so if a third argument is specified,
> it is treated as the basename of the destination file.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


  Regards,
  Arnout

[snip]
-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives
  2016-05-07 16:14 ` [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives Yann E. MORIN
@ 2016-05-07 19:54   ` Arnout Vandecappelle
  2016-05-11 21:24   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 19:54 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> .. and use $(Q) instead of a hard-coded @.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Regards,
  Arnout

>
> ---
> Changes v6 -> v7:
>   - directly call the wrapper without the variable pointing to it
>     (Arnout)
>   - fix left-over comma  (Arnout)
>
> Changes v5 -> v6:
>   - directly call the helper script  (Thomas, Arnout)
>   - drop Luca's and Arnout's tags, as the code did change a bit
>
> Changes v4 -> v5:
>   - s/Copy/Save/ because we're not really copying
>
> Changes v2 -> v3:
>   - comment the @ -> $(Q) change  (Arnout)
> ---
>  package/pkg-generic.mk | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 3904c09..f9c7cf8 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -803,9 +803,10 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
>  ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
>  	$$(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE)/$$($(2)_ACTUAL_SOURCE_TARBALL))
>  endif
> -# Copy the source tarball (just hardlink if possible)
> -	@cp -l $$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4))) 2>/dev/null || \
> -	    cp $$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) $$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))
> +# Save the source tarball
> +	$$(Q)support/scripts/hardlink-or-copy \
> +		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
> +		$$(REDIST_SOURCES_DIR_$$(call UPPERCASE,$(4)))
>  endif # redistribute
>
>  endif # other packages
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-07 16:14 ` [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory Yann E. MORIN
@ 2016-05-07 20:01   ` Arnout Vandecappelle
  2016-05-11 21:43     ` Thomas Petazzoni
  2016-06-24 13:50   ` Thomas Petazzoni
  1 sibling, 1 reply; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 20:01 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> Now that we save the source archives in a directory named after the
> package and its version, do the same for the license files, for
> consistency.
>
> It has a not-so-bad side-effect of also saving the version string in
> the all-licenses list.
>
> The only (small) side-effect, is that the warnings about undefined
> _LICENSE_FILES now contains the version string, too. That's unavoidable,
> since that's what is stored in the legal report.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
>
> ---
> Chages v5 -> v6:
>   - raw name variable was renamed  (Thomas)
>
> Changes v1 -> v2:
>   - s/drawback/side-effect/  (Luca)
> ---
>  package/pkg-generic.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index b031879..7a86355 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -786,10 +786,10 @@ ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
>  # is that the license still applies to the files distributed as part
>  # of the rootfs, even if the sources are not themselves redistributed.
>  ifeq ($$(call qstrip,$$($(2)_LICENSE_FILES)),)
> -	@$$(call legal-license-nofiles,$$($(2)_RAWNAME),$$(call UPPERCASE,$(4)))
> -	@$$(call legal-warning-pkg,$$($(2)_RAWNAME),cannot save license ($(2)_LICENSE_FILES not defined))
> +	@$$(call legal-license-nofiles,$$($(2)_RAW_BASE_NAME),$$(call UPPERCASE,$(4)))
> +	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))

  I think this should stay $(2)_RAWNAME, or either it should change as well for 
the legal-warning-source below.

  Other than that:
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Regards,
  Arnout

>  else
> -	@$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
> +	@$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAW_BASE_NAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
>  endif # license files
>
>  ifeq ($$($(2)_SITE_METHOD),local)
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches
  2016-05-07 16:14 ` [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches Yann E. MORIN
@ 2016-05-07 20:09   ` Arnout Vandecappelle
  2016-06-22 20:59     ` Yann E. MORIN
  2016-06-24 14:02   ` Thomas Petazzoni
  1 sibling, 1 reply; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 20:09 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> Currently, we only store the filename of the applied patches.
>
> However, we are soon to want to install those patches in the legal-info
> directory, so we'll have to know where those patches come from.
>
> Instead of duplicating the logic to find the patches (bundled,
> downloaded, from a global patch dir...), just store the full path to
> each of those patches so we can retrieve them more easily later on.
>
> Also always create the list-file, even if empty, so that we need not
> test for its existence before reading it.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> [Tested only with patches in the Buildroot sources]
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Small question...

>
> ---
> Changes v1 -> v2:
>   - do not duplicate '/' in paths  (Luca)
> ---
>  support/scripts/apply-patches.sh | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
> index 201278d..20a1552 100755
> --- a/support/scripts/apply-patches.sh
> +++ b/support/scripts/apply-patches.sh
> @@ -63,8 +63,12 @@ find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \
>      xargs -0 -r rm -f
>
>  function apply_patch {
> -    path=$1
> -    patch=$2
> +    path="${1%%/}"
> +    patch="${2}"
> +    case "${path}" in
> +        /*) ;;
> +        *)  path="$(pwd)/${path}";;

  Is there a particular reason to prefer $(pwd) over $PWD?

  Regards,
  Arnout

> +    esac
>      if [ "$3" ]; then
>          type="series"; uncomp="cat"
>      else
> @@ -99,7 +103,7 @@ function apply_patch {
>          echo "Error: missing patch file ${path}/$patch"
>          exit 1
>      fi
> -    echo $patch >> ${builddir}/.applied_patches_list
> +    echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
>      ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
>      if [ $? != 0 ] ; then
>          echo "Patch failed!  Please fix ${patch}!"
> @@ -141,6 +145,7 @@ function scan_patchdir {
>      fi
>  }
>
> +touch ${builddir}/.applied_patches_list
>  scan_patchdir "$patchdir" "$patchpattern"
>
>  # Check for rejects...
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames
  2016-05-07 16:14 ` [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames Yann E. MORIN
@ 2016-05-07 20:16   ` Arnout Vandecappelle
  2016-06-22 21:01     ` Yann E. MORIN
  2016-06-24 14:09   ` Thomas Petazzoni
  1 sibling, 1 reply; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 20:16 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> Patches we save can come from various locations;
>   - bundled with Buildroot
>   - downloaded
>   - from one or more global-patch-dir
>
> It is possible that two patches lying into different locations have the
> same basename, like so (first is bundled, second is from an hypothetical
> global-patch-dir):
>     package/foo/0001-fix-Makefile.patch
>     /path/to/my/patches/foo/0001-fix-Makefile.patch
>
> In that case, when running legal-info, we'd save only the second patch,
> overwriting the first. That would be oproblematic, because:
>
>   - either the second patch depends on the first, and thus would no longer
>     apply (this is easy to detect, though),
>
>   - or the second patch does not dpend on the first, and the compliance
>     delivery will not be complete (this is much arder to detect).
>
> We fix that by checking that no two patches have the same same basename.
> If we find that the basename of the patch to be applied collides with
> that of a previously applied patch, we error out and report the duplicate.
>
> The unfortunate side-effect is that existing setups will now break in
> that situation, but that's a minor, corner-case issue that is easily
> fixed.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>


  Regards,
  Arnout

  PS When I wrote earlier that this patch was "controversial", I actually meant 
"a patch that is not strictly needed to fix the stuff-missing-from-legal-info 
issue, and which could be skipped".

>
> ---
> Changes v6 -> v7:
>   - reword error message
>
> Changes v5 -> v6:
>   - don't renumber, detect collision and error out  (Luca, Arnout,
>     Thomas)
> ---
>  support/scripts/apply-patches.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
> index 20a1552..f8b6ca3 100755
> --- a/support/scripts/apply-patches.sh
> +++ b/support/scripts/apply-patches.sh
> @@ -103,6 +103,14 @@ function apply_patch {
>          echo "Error: missing patch file ${path}/$patch"
>          exit 1
>      fi
> +    existing="$( grep -E "/${patch}\$" ${builddir}/.applied_patches_list )"
> +    if [ -n "${existing}" ]; then
> +        echo "Error: duplicate filename '${patch}'"
> +        echo "Conflicting files are:"
> +        echo "  already applied: ${existing}"
> +        echo "  to be applied  : ${path}/${patch}"
> +        exit 1
> +    fi
>      echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
>      ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
>      if [ $? != 0 ] ; then
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches
  2016-05-07 16:14 ` [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches Yann E. MORIN
@ 2016-05-07 20:36   ` Arnout Vandecappelle
  2016-06-22 21:03     ` Yann E. MORIN
  2016-06-24 14:22   ` Thomas Petazzoni
  1 sibling, 1 reply; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 20:36 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> Currently, the legal-info infra only saves the source archive of a
> package. However, that's not enough as we may apply some patches on
> packages sources.
>
> We do suggest users to also redistribute the Buildroot sources as part
> of their compliance distribution, so the patches bundled in Buildroot
> would indeed be included in the compliance distribution.
>
> However, that's still not enough, since we may download some patches, or
> the user may use a global patch directory. Patches in there might not
> end up in the compliance distribution, and there are risks of
> non-conformity.
>
> So, always include patches alongside the source archive.
>
> To ensure reproducibility, we also generate a series file, so patches
> can be re-applied in the correct order.
>
> We get the list of patches to include from the list of patches that were
> applied by the package infrastructure (via the apply-patches support
> script). So, we need to get packages properly extracted and patched
> before we can save their legal-info, not just in the case they define
> _LICENSE_FILES.
>
> Update the legal-info header accordingly.
>
> Note: this means that, when a package is not patched and defines no
> LICENSE_FILES, we will extract and patch it for nothing. There is no
> easy way to know whether we have to patch a package or not. We can only
> either duplicate the logic to detect patches (bad) or rely on the infra
> actually patching the package. Also, a vast majority of packages are
> either patched, or define _LICENSE_FILES, so it is best and easiest to
> always extract and patch them prior to legal-info.
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  But...

>
> ---
> Changes v6 -> v7:
>   - directly call the helper
>
> Changes v3 -> v4:
>   - typo  (Luca)
>
> Changes v2 -> v3:
>   - also mention that patches have been saved  (Luca)
>
> Changes v1 -> v2:
>   - don't recompute rawname-version needlessly  (Luca)
> ---
>  package/pkg-generic.mk           | 15 ++++++++++-----
>  support/legal-info/README.header |  9 +++++----
>  2 files changed, 15 insertions(+), 9 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 7a86355..13455d1 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -749,12 +749,10 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
>  endif
>  $(2)_MANIFEST_LICENSE_FILES ?= not saved
>
> -# If the package declares _LICENSE_FILES, we need to extract it,
> -# for overriden, local or normal remote packages alike, whether
> -# we want to redistribute it or not.
> -ifneq ($$($(2)_LICENSE_FILES),)
> +# We need to extract and patch a package to be able to retrieve its
> +# license files (if any) and the list of patches applied to it (if
> +# any).
>  $(1)-legal-info: $(1)-patch
> -endif
>
>  # We only save the sources of packages we want to redistribute, that are
>  # non-overriden (local or true override).
> @@ -810,6 +808,13 @@ endif
>  	$$(Q)support/scripts/hardlink-or-copy \
>  		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
>  		$$($(2)_REDIST_SOURCES_DIR)
> +# Save patches and generate the series file
> +	$$(Q)while read f; do \
> +		support/scripts/hardlink-or-copy \
> +			$$$${f} \
> +			$$($(2)_REDIST_SOURCES_DIR) || exit 1; \

  Instead of explicit exits, a set -e in the beginning would have been more compact.

  I hate the $$$$, but not much can be done about it. Move the whole legal info 
thing to a script, but that would require exporting a sh*tload of variables to 
that script...

  Regards,
  Arnout

> +		printf "%s\n" "$$$${f##*/}" >>$$($(2)_REDIST_SOURCES_DIR)/series || exit 1; \
> +	done <$$($(2)_DIR)/.applied_patches_list
>  endif # redistribute
>
>  endif # other packages
> diff --git a/support/legal-info/README.header b/support/legal-info/README.header
> index d07c45d..418de14 100644
> --- a/support/legal-info/README.header
> +++ b/support/legal-info/README.header
> @@ -14,10 +14,11 @@ This material is composed of the following items.
>     compiled programs.
>     Note: this may have not been saved due to technical limitations, you may
>     need to collect it manually.
> - * The source code for all packages; this has been saved in the sources/
> -   subdirectory (except for the non-redistributable packages, which have not
> -   been saved); patches applied to some packages by Buildroot are included in
> -   the Buildroot sources and were not duplicated in the sources/ subdirectory.
> + * The original source code for all packages; this has been saved in the
> +   sources/ subdirectory (except for the non-redistributable packages, which
> +   have not been saved). Patches that were applied are also saved, along
> +   with a file named 'series' that lists the patches in the order they were
> +   applied.
>   * A manifest file listing the configured packages and related information.
>   * The license text of the packages; they have been saved in the licenses/
>     subdirectory.
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads
  2016-05-07 16:14 ` [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads Yann E. MORIN
@ 2016-05-07 20:42   ` Arnout Vandecappelle
  2016-06-24 14:22   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-07 20:42 UTC (permalink / raw)
  To: buildroot

On 05/07/16 18:14, Yann E. MORIN wrote:
> Some packages, like perl, download extra files that end up as part of
> the source that Buildroot builds. Up until now, those files were not
> saved in the legal-info output.
>
> Add those files to the legal-info output.
>
> The unfortunate side-effect is that we will also save the secondary
> archive for the external blackfin toolchains; however, we already do
> save the binary release of some external toolchains when they do not
> provide actual source archives.
>
> This is inherently bad, as those are not source archives, but solving
> this is a bigger concern, for another series...
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>

Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

  Regards,
  Arnout

>
> ---
> Changes v6 -> v7:
>   - directly call the wrapper
>   - fix after re-ordering patches
>
> Changes v2 -> v3:
>   - typo  (Luca)
>   - incorporate the post-commit log message (the part about the
>     side-effect) into the commit log itself, it makes sense to not
>     forget about that
> ---
>  package/pkg-generic.mk | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index 13455d1..a720930 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -804,10 +804,12 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
>  ifneq ($$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_SOURCE))
>  	$$(call DOWNLOAD,$$($(2)_ACTUAL_SOURCE_SITE)/$$($(2)_ACTUAL_SOURCE_TARBALL))
>  endif
> -# Save the source tarball
> -	$$(Q)support/scripts/hardlink-or-copy \
> -		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
> -		$$($(2)_REDIST_SOURCES_DIR)
> +# Save the source tarball and any extra downloads, but not
> +# patches, as they are handled specially afterwards.
> +	$$(foreach e,$$($(2)_ACTUAL_SOURCE_TARBALL) $$(notdir $$($(2)_EXTRA_DOWNLOADS)),\
> +		$$(Q)support/scripts/hardlink-or-copy \
> +			$$(DL_DIR)/$$(e) \
> +			$$($(2)_REDIST_SOURCES_DIR)$$(sep))
>  # Save patches and generate the series file
>  	$$(Q)while read f; do \
>  		support/scripts/hardlink-or-copy \
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy
  2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
  2016-05-07 18:48   ` Arnout Vandecappelle
@ 2016-05-11 21:23   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-05-11 21:23 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:26 +0200, Yann E. MORIN wrote:
> When preparing the legal-info, the source archives are copied in the
> legal-info/ output directory. When the archives are big, it can take
> quite a bit of time and unnecessarily uses disk space. When the
> legal-info output directory is on the same filesystem as the BR2_DL_DIR,
> we can easily reduce copy time and disk usage by just using hardlins
> instead of copying. However, the BR2_DL_DIR may be on a different
> filesystem, so we must fallback to copying in this case
> 
> Introduce a helper script that copies a source file into a destination
> directory, by first attempting to hard-link, and falling back to a
> plain copy in case the hardlink fails.
> 
> In case the destination already exists, it is forcibly removed first, to
> avoid clobering any existing target file (and especially any hardlink to
> it), since cp -f does not remove the destination file, but clobbers it.
> 
> In some situations, it will be necessary that the destination file is
> named differently than the source, so if a third argument is specified,
> it is treated as the basename of the destination file.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Changes v6 -> v7:
>   - more explicit variables  (Arnout)
>   - drop the variable with the helper path  (Arnout)
>   - use shell substitution instead of $(basename ...)  (Arnout! ;- )
>   - improve commit log to explain the 'rm -f'
>   - split now-too-long line

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives
  2016-05-07 16:14 ` [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives Yann E. MORIN
  2016-05-07 19:54   ` Arnout Vandecappelle
@ 2016-05-11 21:24   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-05-11 21:24 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:27 +0200, Yann E. MORIN wrote:
> .. and use $(Q) instead of a hard-coded @.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Changes v6 -> v7:
>   - directly call the wrapper without the variable pointing to it
>     (Arnout)
>   - fix left-over comma  (Arnout)

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version
  2016-05-07 16:14 ` [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version Yann E. MORIN
@ 2016-05-11 21:29   ` Thomas Petazzoni
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-05-11 21:29 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:28 +0200, Yann E. MORIN wrote:
> Introduce a new per-package variable to store the 'rawname-version'
> tuple, instead of computing it every time we need it.
> 
> Currently, it's only a single location, but follow-up patches will
> introduce more use of it.
> 
> Reported-by: Luca Ceresoli <luca@lucaceresoli.net>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> ---
> Changes v5 -> v6:
>   - rename variable  (Thomas)
> ---
>  package/pkg-generic.mk | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir
  2016-05-07 16:14 ` [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir Yann E. MORIN
@ 2016-05-11 21:40   ` Thomas Petazzoni
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-05-11 21:40 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:29 +0200, Yann E. MORIN wrote:
> Currently, we put all source archives side-by-side in the same
> directory.
> 
> Since we're about to also save individual patches that were applied
> on those sources, we don't want to make that directory a complete
> mess of unassorted files.
> 
> So, we install each source archive in its own sub-directory, where
> we'll later store the patches too. Store that location in a variable,
> so it can be re-used later on (to install patches in a future commit).
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> ---
> Changes v6 -> v7:
>   - directly call the helper

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-07 20:01   ` Arnout Vandecappelle
@ 2016-05-11 21:43     ` Thomas Petazzoni
  2016-05-13 20:11       ` Yann E. MORIN
  0 siblings, 1 reply; 46+ messages in thread
From: Thomas Petazzoni @ 2016-05-11 21:43 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat, 7 May 2016 22:01:28 +0200, Arnout Vandecappelle wrote:

> > +	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))  
> 
>   I think this should stay $(2)_RAWNAME, or either it should change as well for 
> the legal-warning-source below.
> 
>   Other than that:
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>

I agree with Arnout here (we should keep using $(2)_RAWNAME for the
warning). Yann, what do you think?

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-11 21:43     ` Thomas Petazzoni
@ 2016-05-13 20:11       ` Yann E. MORIN
  2016-05-14 21:22         ` Arnout Vandecappelle
  0 siblings, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-13 20:11 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
> On Sat, 7 May 2016 22:01:28 +0200, Arnout Vandecappelle wrote:
> 
> > > +	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))  
> > 
> >   I think this should stay $(2)_RAWNAME, or either it should change as well for 
> > the legal-warning-source below.
> > 
> >   Other than that:
> > Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> I agree with Arnout here (we should keep using $(2)_RAWNAME for the
> warning). Yann, what do you think?

1. With this patch (and the following one), legal-info now gets saved in
   sub-directories named after the paclage name and version, i.e.:

    legal-info/licenses/pkg-version/
    legal-info/sources/pkg-version/

2. With this patch, we also store the package name and version in the
   manifest.

3. The warnings are stored in the legal-info report.

So, I think it is better that the info about packages is the same
everywhere: sources/ and licenses/ sub-dirs, entries in the manifest and
warnings alike.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-13 20:11       ` Yann E. MORIN
@ 2016-05-14 21:22         ` Arnout Vandecappelle
  2016-05-15  9:49           ` Yann E. MORIN
  2016-05-15 17:50           ` Yann E. MORIN
  0 siblings, 2 replies; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-14 21:22 UTC (permalink / raw)
  To: buildroot

On 05/13/16 22:11, Yann E. MORIN wrote:
> Thomas, All,
>
> On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
>> On Sat, 7 May 2016 22:01:28 +0200, Arnout Vandecappelle wrote:
>>
>>>> +	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))
>>>
>>>   I think this should stay $(2)_RAWNAME, or either it should change as well for
>>> the legal-warning-source below.
>>>
>>>   Other than that:
>>> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>>
>> I agree with Arnout here (we should keep using $(2)_RAWNAME for the
>> warning). Yann, what do you think?
>
> 1. With this patch (and the following one), legal-info now gets saved in
>    sub-directories named after the paclage name and version, i.e.:
>
>     legal-info/licenses/pkg-version/
>     legal-info/sources/pkg-version/
>
> 2. With this patch, we also store the package name and version in the
>    manifest.
>
> 3. The warnings are stored in the legal-info report.
>
> So, I think it is better that the info about packages is the same
> everywhere: sources/ and licenses/ sub-dirs, entries in the manifest and
> warnings alike.

  I completely agree with this reasoning. Note that I wrote:

 >>>   [...] or either it should change as well for
 >>> the legal-warning-source below.


  Regards,
  Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-14 21:22         ` Arnout Vandecappelle
@ 2016-05-15  9:49           ` Yann E. MORIN
  2016-05-15 17:50           ` Yann E. MORIN
  1 sibling, 0 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-15  9:49 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2016-05-14 23:22 +0200, Arnout Vandecappelle spake thusly:
> On 05/13/16 22:11, Yann E. MORIN wrote:
> >Thomas, All,
> >
> >On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
> >>On Sat, 7 May 2016 22:01:28 +0200, Arnout Vandecappelle wrote:
> >>
> >>>>+	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))
> >>>
> >>>  I think this should stay $(2)_RAWNAME, or either it should change as well for
> >>>the legal-warning-source below.
> >>>
> >>>  Other than that:
> >>>Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> >>
> >>I agree with Arnout here (we should keep using $(2)_RAWNAME for the
> >>warning). Yann, what do you think?
> >
> >1. With this patch (and the following one), legal-info now gets saved in
> >   sub-directories named after the paclage name and version, i.e.:
> >
> >    legal-info/licenses/pkg-version/
> >    legal-info/sources/pkg-version/
> >
> >2. With this patch, we also store the package name and version in the
> >   manifest.
> >
> >3. The warnings are stored in the legal-info report.
> >
> >So, I think it is better that the info about packages is the same
> >everywhere: sources/ and licenses/ sub-dirs, entries in the manifest and
> >warnings alike.
> 
>  I completely agree with this reasoning. Note that I wrote:
> 
> >>>   [...] or either it should change as well for
> >>> the legal-warning-source below.

OK, I'll do so. Thanks!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-14 21:22         ` Arnout Vandecappelle
  2016-05-15  9:49           ` Yann E. MORIN
@ 2016-05-15 17:50           ` Yann E. MORIN
  2016-05-16 21:31             ` Arnout Vandecappelle
  1 sibling, 1 reply; 46+ messages in thread
From: Yann E. MORIN @ 2016-05-15 17:50 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2016-05-14 23:22 +0200, Arnout Vandecappelle spake thusly:
> On 05/13/16 22:11, Yann E. MORIN wrote:
> >Thomas, All,
> >
> >On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
> >>On Sat, 7 May 2016 22:01:28 +0200, Arnout Vandecappelle wrote:
> >>
> >>>>+	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))
> >>>
> >>>  I think this should stay $(2)_RAWNAME, or either it should change as well for
> >>>the legal-warning-source below.
> >>>
> >>>  Other than that:
> >>>Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> >>
> >>I agree with Arnout here (we should keep using $(2)_RAWNAME for the
> >>warning). Yann, what do you think?
> >
> >1. With this patch (and the following one), legal-info now gets saved in
> >   sub-directories named after the paclage name and version, i.e.:
> >
> >    legal-info/licenses/pkg-version/
> >    legal-info/sources/pkg-version/
> >
> >2. With this patch, we also store the package name and version in the
> >   manifest.
> >
> >3. The warnings are stored in the legal-info report.
> >
> >So, I think it is better that the info about packages is the same
> >everywhere: sources/ and licenses/ sub-dirs, entries in the manifest and
> >warnings alike.
> 
>  I completely agree with this reasoning. Note that I wrote:
> 
> >>>   [...] or either it should change as well for
> >>> the legal-warning-source below.

OK, but now that I look at it, and after Thomas pointed it on IRC, we can't
really add the version for legal-warning-nosource (legal-warning-source
does not exist, so I gues you meant legal-warning-nosource), because for
the two occurences of those two, we don't have a version to beging with:

  - one if about 'local' pacakges for which we do not have a version
    string at all;

  - the second if for overriden packages, for which we do not have a
    version string either (well, the one in our .mk is probably wrong,
    so we should not use it).

So, do you still want to use the _RAW_BASE_NAME for those, even though
it does not make sense (both would be rendered into 'foo-custom')?

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-15 17:50           ` Yann E. MORIN
@ 2016-05-16 21:31             ` Arnout Vandecappelle
  0 siblings, 0 replies; 46+ messages in thread
From: Arnout Vandecappelle @ 2016-05-16 21:31 UTC (permalink / raw)
  To: buildroot

On 05/15/16 19:50, Yann E. MORIN wrote:
> Arnout, All,
>
> On 2016-05-14 23:22 +0200, Arnout Vandecappelle spake thusly:
>> On 05/13/16 22:11, Yann E. MORIN wrote:
>>> Thomas, All,
>>>
>>> On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
>>>> On Sat, 7 May 2016 22:01:28 +0200, Arnout Vandecappelle wrote:
>>>>
>>>>>> +	@$$(call legal-warning-pkg,$$($(2)_RAW_BASE_NAME),cannot save license ($(2)_LICENSE_FILES not defined))
>>>>>
>>>>>  I think this should stay $(2)_RAWNAME, or either it should change as well for
>>>>> the legal-warning-source below.
>>>>>
>>>>>  Other than that:
>>>>> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
>>>>
>>>> I agree with Arnout here (we should keep using $(2)_RAWNAME for the
>>>> warning). Yann, what do you think?
>>>
>>> 1. With this patch (and the following one), legal-info now gets saved in
>>>   sub-directories named after the paclage name and version, i.e.:
>>>
>>>    legal-info/licenses/pkg-version/
>>>    legal-info/sources/pkg-version/
>>>
>>> 2. With this patch, we also store the package name and version in the
>>>   manifest.
>>>
>>> 3. The warnings are stored in the legal-info report.
>>>
>>> So, I think it is better that the info about packages is the same
>>> everywhere: sources/ and licenses/ sub-dirs, entries in the manifest and
>>> warnings alike.
>>
>>  I completely agree with this reasoning. Note that I wrote:
>>
>>>>>   [...] or either it should change as well for
>>>>> the legal-warning-source below.
>
> OK, but now that I look at it, and after Thomas pointed it on IRC, we can't
> really add the version for legal-warning-nosource (legal-warning-source
> does not exist, so I gues you meant legal-warning-nosource), because for
> the two occurences of those two, we don't have a version to beging with:
>
>   - one if about 'local' pacakges for which we do not have a version
>     string at all;
>
>   - the second if for overriden packages, for which we do not have a
>     version string either (well, the one in our .mk is probably wrong,
>     so we should not use it).
>
> So, do you still want to use the _RAW_BASE_NAME for those, even though
> it does not make sense (both would be rendered into 'foo-custom')?

  Argh, right, I forgot about that. So then this patch stays as it is.

  Regards,
  Arnout



-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches
  2016-05-07 20:09   ` Arnout Vandecappelle
@ 2016-06-22 20:59     ` Yann E. MORIN
  0 siblings, 0 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-06-22 20:59 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2016-05-07 22:09 +0200, Arnout Vandecappelle spake thusly:
> On 05/07/16 18:14, Yann E. MORIN wrote:
> >Currently, we only store the filename of the applied patches.
> >
> >However, we are soon to want to install those patches in the legal-info
> >directory, so we'll have to know where those patches come from.
> >
> >Instead of duplicating the logic to find the patches (bundled,
> >downloaded, from a global patch dir...), just store the full path to
> >each of those patches so we can retrieve them more easily later on.
> >
> >Also always create the list-file, even if empty, so that we need not
> >test for its existence before reading it.
> >
> >Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >Cc: Luca Ceresoli <luca@lucaceresoli.net>
> >Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> >[Tested only with patches in the Buildroot sources]
> >Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
>  Small question...
> 
> >
> >---
> >Changes v1 -> v2:
> >  - do not duplicate '/' in paths  (Luca)
> >---
> > support/scripts/apply-patches.sh | 11 ++++++++---
> > 1 file changed, 8 insertions(+), 3 deletions(-)
> >
> >diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
> >index 201278d..20a1552 100755
> >--- a/support/scripts/apply-patches.sh
> >+++ b/support/scripts/apply-patches.sh
> >@@ -63,8 +63,12 @@ find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \
> >     xargs -0 -r rm -f
> >
> > function apply_patch {
> >-    path=$1
> >-    patch=$2
> >+    path="${1%%/}"
> >+    patch="${2}"
> >+    case "${path}" in
> >+        /*) ;;
> >+        *)  path="$(pwd)/${path}";;
> 
>  Is there a particular reason to prefer $(pwd) over $PWD?

Hmm.. Probably no reason that I can recall, no...

If that warants a repsin, I'll do, otherwise that could be fixed when
being applied, maybe?

Regards,
Yann E. MORIN.

>  Regards,
>  Arnout
> 
> >+    esac
> >     if [ "$3" ]; then
> >         type="series"; uncomp="cat"
> >     else
> >@@ -99,7 +103,7 @@ function apply_patch {
> >         echo "Error: missing patch file ${path}/$patch"
> >         exit 1
> >     fi
> >-    echo $patch >> ${builddir}/.applied_patches_list
> >+    echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
> >     ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
> >     if [ $? != 0 ] ; then
> >         echo "Patch failed!  Please fix ${patch}!"
> >@@ -141,6 +145,7 @@ function scan_patchdir {
> >     fi
> > }
> >
> >+touch ${builddir}/.applied_patches_list
> > scan_patchdir "$patchdir" "$patchpattern"
> >
> > # Check for rejects...
> >
> 
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames
  2016-05-07 20:16   ` Arnout Vandecappelle
@ 2016-06-22 21:01     ` Yann E. MORIN
  0 siblings, 0 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-06-22 21:01 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2016-05-07 22:16 +0200, Arnout Vandecappelle spake thusly:
> On 05/07/16 18:14, Yann E. MORIN wrote:
> >Patches we save can come from various locations;
> >  - bundled with Buildroot
> >  - downloaded
> >  - from one or more global-patch-dir
> >
> >It is possible that two patches lying into different locations have the
> >same basename, like so (first is bundled, second is from an hypothetical
> >global-patch-dir):
> >    package/foo/0001-fix-Makefile.patch
> >    /path/to/my/patches/foo/0001-fix-Makefile.patch
> >
> >In that case, when running legal-info, we'd save only the second patch,
> >overwriting the first. That would be oproblematic, because:
> >
> >  - either the second patch depends on the first, and thus would no longer
> >    apply (this is easy to detect, though),
> >
> >  - or the second patch does not dpend on the first, and the compliance
> >    delivery will not be complete (this is much arder to detect).
> >
> >We fix that by checking that no two patches have the same same basename.
> >If we find that the basename of the patch to be applied collides with
> >that of a previously applied patch, we error out and report the duplicate.
> >
> >The unfortunate side-effect is that existing setups will now break in
> >that situation, but that's a minor, corner-case issue that is easily
> >fixed.
> >
> >Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >Cc: Luca Ceresoli <luca@lucaceresoli.net>
> >Cc: Arnout Vandecappelle <arnout@mind.be>
> >Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> 
>  Regards,
>  Arnout
> 
>  PS When I wrote earlier that this patch was "controversial", I actually
> meant "a patch that is not strictly needed to fix the
> stuff-missing-from-legal-info issue, and which could be skipped".

That's not my position: this patch (or the alternate proposal) is
required.

Without it, we could end up saving two patches with the sqame basename,
the second (e.g. from a global patch dir) overwriting the first (e.g. a
bundled patch), thus rendering the legal-info moot.

I thought I had that properly explained in the commit log. Did I miss
something, or was it not clear enough?

Regards,
Yann E. MORIN.

> >---
> >Changes v6 -> v7:
> >  - reword error message
> >
> >Changes v5 -> v6:
> >  - don't renumber, detect collision and error out  (Luca, Arnout,
> >    Thomas)
> >---
> > support/scripts/apply-patches.sh | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> >diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
> >index 20a1552..f8b6ca3 100755
> >--- a/support/scripts/apply-patches.sh
> >+++ b/support/scripts/apply-patches.sh
> >@@ -103,6 +103,14 @@ function apply_patch {
> >         echo "Error: missing patch file ${path}/$patch"
> >         exit 1
> >     fi
> >+    existing="$( grep -E "/${patch}\$" ${builddir}/.applied_patches_list )"
> >+    if [ -n "${existing}" ]; then
> >+        echo "Error: duplicate filename '${patch}'"
> >+        echo "Conflicting files are:"
> >+        echo "  already applied: ${existing}"
> >+        echo "  to be applied  : ${path}/${patch}"
> >+        exit 1
> >+    fi
> >     echo "${path}/${patch}" >> ${builddir}/.applied_patches_list
> >     ${uncomp} "${path}/$patch" | patch -g0 -p1 -E -d "${builddir}" -t -N $silent
> >     if [ $? != 0 ] ; then
> >
> 
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches
  2016-05-07 20:36   ` Arnout Vandecappelle
@ 2016-06-22 21:03     ` Yann E. MORIN
  0 siblings, 0 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-06-22 21:03 UTC (permalink / raw)
  To: buildroot

Arnout, All,

On 2016-05-07 22:36 +0200, Arnout Vandecappelle spake thusly:
> On 05/07/16 18:14, Yann E. MORIN wrote:
> >Currently, the legal-info infra only saves the source archive of a
> >package. However, that's not enough as we may apply some patches on
> >packages sources.
> >
> >We do suggest users to also redistribute the Buildroot sources as part
> >of their compliance distribution, so the patches bundled in Buildroot
> >would indeed be included in the compliance distribution.
> >
> >However, that's still not enough, since we may download some patches, or
> >the user may use a global patch directory. Patches in there might not
> >end up in the compliance distribution, and there are risks of
> >non-conformity.
> >
> >So, always include patches alongside the source archive.
> >
> >To ensure reproducibility, we also generate a series file, so patches
> >can be re-applied in the correct order.
> >
> >We get the list of patches to include from the list of patches that were
> >applied by the package infrastructure (via the apply-patches support
> >script). So, we need to get packages properly extracted and patched
> >before we can save their legal-info, not just in the case they define
> >_LICENSE_FILES.
> >
> >Update the legal-info header accordingly.
> >
> >Note: this means that, when a package is not patched and defines no
> >LICENSE_FILES, we will extract and patch it for nothing. There is no
> >easy way to know whether we have to patch a package or not. We can only
> >either duplicate the logic to detect patches (bad) or rely on the infra
> >actually patching the package. Also, a vast majority of packages are
> >either patched, or define _LICENSE_FILES, so it is best and easiest to
> >always extract and patch them prior to legal-info.
> >
> >Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> >Cc: Luca Ceresoli <luca@lucaceresoli.net>
> >Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> >Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
>  But...
> 
> >
> >---
> >Changes v6 -> v7:
> >  - directly call the helper
> >
> >Changes v3 -> v4:
> >  - typo  (Luca)
> >
> >Changes v2 -> v3:
> >  - also mention that patches have been saved  (Luca)
> >
> >Changes v1 -> v2:
> >  - don't recompute rawname-version needlessly  (Luca)
> >---
> > package/pkg-generic.mk           | 15 ++++++++++-----
> > support/legal-info/README.header |  9 +++++----
> > 2 files changed, 15 insertions(+), 9 deletions(-)
> >
> >diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> >index 7a86355..13455d1 100644
> >--- a/package/pkg-generic.mk
> >+++ b/package/pkg-generic.mk
> >@@ -749,12 +749,10 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
> > endif
> > $(2)_MANIFEST_LICENSE_FILES ?= not saved
> >
> >-# If the package declares _LICENSE_FILES, we need to extract it,
> >-# for overriden, local or normal remote packages alike, whether
> >-# we want to redistribute it or not.
> >-ifneq ($$($(2)_LICENSE_FILES),)
> >+# We need to extract and patch a package to be able to retrieve its
> >+# license files (if any) and the list of patches applied to it (if
> >+# any).
> > $(1)-legal-info: $(1)-patch
> >-endif
> >
> > # We only save the sources of packages we want to redistribute, that are
> > # non-overriden (local or true override).
> >@@ -810,6 +808,13 @@ endif
> > 	$$(Q)support/scripts/hardlink-or-copy \
> > 		$$(DL_DIR)/$$($(2)_ACTUAL_SOURCE_TARBALL) \
> > 		$$($(2)_REDIST_SOURCES_DIR)
> >+# Save patches and generate the series file
> >+	$$(Q)while read f; do \
> >+		support/scripts/hardlink-or-copy \
> >+			$$$${f} \
> >+			$$($(2)_REDIST_SOURCES_DIR) || exit 1; \
> 
>  Instead of explicit exits, a set -e in the beginning would have been more compact.

Except that's the construct we're using everywhere else in the code. I'd
prefer not to diverge too much from our habits, bad or ogood! ;-)

Regards,
Yann E. MORIN.

>  I hate the $$$$, but not much can be done about it. Move the whole legal
> info thing to a script, but that would require exporting a sh*tload of
> variables to that script...
> 
>  Regards,
>  Arnout
> 
> >+		printf "%s\n" "$$$${f##*/}" >>$$($(2)_REDIST_SOURCES_DIR)/series || exit 1; \
> >+	done <$$($(2)_DIR)/.applied_patches_list
> > endif # redistribute
> >
> > endif # other packages
> >diff --git a/support/legal-info/README.header b/support/legal-info/README.header
> >index d07c45d..418de14 100644
> >--- a/support/legal-info/README.header
> >+++ b/support/legal-info/README.header
> >@@ -14,10 +14,11 @@ This material is composed of the following items.
> >    compiled programs.
> >    Note: this may have not been saved due to technical limitations, you may
> >    need to collect it manually.
> >- * The source code for all packages; this has been saved in the sources/
> >-   subdirectory (except for the non-redistributable packages, which have not
> >-   been saved); patches applied to some packages by Buildroot are included in
> >-   the Buildroot sources and were not duplicated in the sources/ subdirectory.
> >+ * The original source code for all packages; this has been saved in the
> >+   sources/ subdirectory (except for the non-redistributable packages, which
> >+   have not been saved). Patches that were applied are also saved, along
> >+   with a file named 'series' that lists the patches in the order they were
> >+   applied.
> >  * A manifest file listing the configured packages and related information.
> >  * The license text of the packages; they have been saved in the licenses/
> >    subdirectory.
> >
> 
> 
> -- 
> Arnout Vandecappelle                          arnout at mind be
> Senior Embedded Software Architect            +32-16-286500
> Essensium/Mind                                http://www.mind.be
> G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
> LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
> GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4)
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (12 preceding siblings ...)
  2016-05-07 16:14 ` [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode Yann E. MORIN
@ 2016-06-22 21:12 ` Yann E. MORIN
  2016-06-24 15:11 ` Thomas Petazzoni
  14 siblings, 0 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-06-22 21:12 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2016-05-07 18:14 +0200, Yann E. MORIN spake thusly:
> This series brings improvements to the legal-info infrastructure, so
> that we provide the most complete and correct content in the output of
> legal-info.

Any news on the remainder of this series?

    [05/13] core/legal-info: add package version to license directory
    [06/13] core/apply-patches: store full path of applied patches
    [07/13] support/apply-patches: bail-out on duplicate patch basenames
    [08/13] core/legal-info: also save patches
    [09/13] core/legal-info: also save extra downloads
    [10/13] legal-info: explicitly state how patches are licensed
    [11/13] core/legal-info: generate a hash of all saved files
    [12/13] core/pkg-generic: reorder variables definitions for legal-info
    [13/13] core/legal-info: ensure legal-info works in off-line mode

;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory
  2016-05-07 16:14 ` [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory Yann E. MORIN
  2016-05-07 20:01   ` Arnout Vandecappelle
@ 2016-06-24 13:50   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 13:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:30 +0200, Yann E. MORIN wrote:
> Now that we save the source archives in a directory named after the
> package and its version, do the same for the license files, for
> consistency.
> 
> It has a not-so-bad side-effect of also saving the version string in
> the all-licenses list.
> 
> The only (small) side-effect, is that the warnings about undefined
> _LICENSE_FILES now contains the version string, too. That's unavoidable,
> since that's what is stored in the legal report.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Acked-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Chages v5 -> v6:
>   - raw name variable was renamed  (Thomas)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches
  2016-05-07 16:14 ` [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches Yann E. MORIN
  2016-05-07 20:09   ` Arnout Vandecappelle
@ 2016-06-24 14:02   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 14:02 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:31 +0200, Yann E. MORIN wrote:
> Currently, we only store the filename of the applied patches.
> 
> However, we are soon to want to install those patches in the legal-info
> directory, so we'll have to know where those patches come from.
> 
> Instead of duplicating the logic to find the patches (bundled,
> downloaded, from a global patch dir...), just store the full path to
> each of those patches so we can retrieve them more easily later on.
> 
> Also always create the list-file, even if empty, so that we need not
> test for its existence before reading it.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> [Tested only with patches in the Buildroot sources]
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Changes v1 -> v2:
>   - do not duplicate '/' in paths  (Luca)
> ---
>  support/scripts/apply-patches.sh | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)

I've changed $(pwd) to $PWD, as suggested by Arnout, and applied.
Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames
  2016-05-07 16:14 ` [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames Yann E. MORIN
  2016-05-07 20:16   ` Arnout Vandecappelle
@ 2016-06-24 14:09   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 14:09 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:32 +0200, Yann E. MORIN wrote:
> Patches we save can come from various locations;

: instead of ; here

>   - bundled with Buildroot
>   - downloaded
>   - from one or more global-patch-dir
> 
> It is possible that two patches lying into different locations have the
> same basename, like so (first is bundled, second is from an hypothetical
> global-patch-dir):
>     package/foo/0001-fix-Makefile.patch
>     /path/to/my/patches/foo/0001-fix-Makefile.patch
> 
> In that case, when running legal-info, we'd save only the second patch,
> overwriting the first. That would be oproblematic, because:

oproblematic -> problematic

> 
>   - either the second patch depends on the first, and thus would no longer
>     apply (this is easy to detect, though),
> 
>   - or the second patch does not dpend on the first, and the compliance
>     delivery will not be complete (this is much arder to detect).

arder -> harder

> 
> We fix that by checking that no two patches have the same same basename.

same same -> same (but I forgot to fix this one, dammit)

> If we find that the basename of the patch to be applied collides with
> that of a previously applied patch, we error out and report the duplicate.
> 
> The unfortunate side-effect is that existing setups will now break in
> that situation, but that's a minor, corner-case issue that is easily
> fixed.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> 
> ---
> Changes v6 -> v7:
>   - reword error message
> 
> Changes v5 -> v6:
>   - don't renumber, detect collision and error out  (Luca, Arnout,
>     Thomas)
> ---
>  support/scripts/apply-patches.sh | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/support/scripts/apply-patches.sh b/support/scripts/apply-patches.sh
> index 20a1552..f8b6ca3 100755
> --- a/support/scripts/apply-patches.sh
> +++ b/support/scripts/apply-patches.sh
> @@ -103,6 +103,14 @@ function apply_patch {
>          echo "Error: missing patch file ${path}/$patch"
>          exit 1
>      fi
> +    existing="$( grep -E "/${patch}\$" ${builddir}/.applied_patches_list )"

I've dropped the space after ( and before ) since it's not the typical
Buildroot coding style (though I know it's your personal coding style).

Applied with those minor typos fixed.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches
  2016-05-07 16:14 ` [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches Yann E. MORIN
  2016-05-07 20:36   ` Arnout Vandecappelle
@ 2016-06-24 14:22   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 14:22 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:33 +0200, Yann E. MORIN wrote:
> Currently, the legal-info infra only saves the source archive of a
> package. However, that's not enough as we may apply some patches on
> packages sources.
> 
> We do suggest users to also redistribute the Buildroot sources as part
> of their compliance distribution, so the patches bundled in Buildroot
> would indeed be included in the compliance distribution.
> 
> However, that's still not enough, since we may download some patches, or
> the user may use a global patch directory. Patches in there might not
> end up in the compliance distribution, and there are risks of
> non-conformity.
> 
> So, always include patches alongside the source archive.
> 
> To ensure reproducibility, we also generate a series file, so patches
> can be re-applied in the correct order.
> 
> We get the list of patches to include from the list of patches that were
> applied by the package infrastructure (via the apply-patches support
> script). So, we need to get packages properly extracted and patched
> before we can save their legal-info, not just in the case they define
> _LICENSE_FILES.
> 
> Update the legal-info header accordingly.
> 
> Note: this means that, when a package is not patched and defines no
> LICENSE_FILES, we will extract and patch it for nothing. There is no
> easy way to know whether we have to patch a package or not. We can only
> either duplicate the logic to detect patches (bad) or rely on the infra
> actually patching the package. Also, a vast majority of packages are
> either patched, or define _LICENSE_FILES, so it is best and easiest to
> always extract and patch them prior to legal-info.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Changes v6 -> v7:
>   - directly call the helper

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads
  2016-05-07 16:14 ` [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads Yann E. MORIN
  2016-05-07 20:42   ` Arnout Vandecappelle
@ 2016-06-24 14:22   ` Thomas Petazzoni
  1 sibling, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 14:22 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:34 +0200, Yann E. MORIN wrote:
> Some packages, like perl, download extra files that end up as part of
> the source that Buildroot builds. Up until now, those files were not
> saved in the legal-info output.
> 
> Add those files to the legal-info output.
> 
> The unfortunate side-effect is that we will also save the secondary
> archive for the external blackfin toolchains; however, we already do
> save the binary release of some external toolchains when they do not
> provide actual source archives.
> 
> This is inherently bad, as those are not source archives, but solving
> this is a bigger concern, for another series...
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Changes v6 -> v7:
>   - directly call the wrapper
>   - fix after re-ordering patches

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed
  2016-05-07 16:14 ` [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed Yann E. MORIN
@ 2016-06-24 14:25   ` Thomas Petazzoni
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 14:25 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:35 +0200, Yann E. MORIN wrote:
> From: Luca Ceresoli <luca@lucaceresoli.net>
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> [yann.morin.1998 at free.fr: slightly tweak after Arnout's review]
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> 
> ---
> Changes v5 -> v6:
>   - slightly tweak the phrasing  (Arnout)
> ---
>  support/legal-info/README.header | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files
  2016-05-07 16:14 ` [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files Yann E. MORIN
@ 2016-06-24 15:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 15:08 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:36 +0200, Yann E. MORIN wrote:
> Having a hash of the saved files can be interesting for the recipient to
> verify the integrity of the files.
> 
> We remove the warning file earlier, to exclude it from the hash list.

I added an explanation here about why we generate into a temporary file.

> -	@echo "Legal info produced in $(LEGAL_INFO_DIR)"
>  	@rm -f $(LEGAL_WARNINGS)
> +	@(cd $(LEGAL_INFO_DIR); \
> +	  find * -type f -exec sha256sum {} + \
> +	  |LC_ALL=C sort -k2 \
> +	  >.legal-info.sha256; \
> +	  mv .legal-info.sha256 legal-info.sha256 \
> +	)

I've fixed a bit the indentation here to be more consistent with the
usual style in Buildroot, i.e using tabs, and splitting lines a bit
less.

Applied with those minor issues fixed. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info
  2016-05-07 16:14 ` [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info Yann E. MORIN
@ 2016-06-24 15:10   ` Thomas Petazzoni
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 15:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:37 +0200, Yann E. MORIN wrote:
> Move the declarations of _ACTUAL_SOURCE and _ACTUAL_SITE earlier, so
> that they are close to where _SOURCE and _SITE are handled.
> 
> This looks so far like a purely cosmetic change, but makes more sense
> with the follow-up patch, where we'll need them earlier in the file.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Reviewed-by: Luca Ceresoli <luca@lucaceresoli.net>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Changes v2 -> v3:
>   - move that to its own patch  (Arnout)
> ---
>  package/pkg-generic.mk | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode
  2016-05-07 16:14 ` [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode Yann E. MORIN
@ 2016-06-24 15:11   ` Thomas Petazzoni
  0 siblings, 0 replies; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 15:11 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:38 +0200, Yann E. MORIN wrote:
> Almost all packages which are saved for legal-info have their source
> archives downloaded as part of 'make source', which makes an off-line
> build completely possible [0].
> 
> However, for the pre-configured external toolchains, the source tarball
> is different, as the main tarball is a binary package. And that source
> tarball is only downloaded during the legal-info phase, which makes it
> inconvenient for full off-line builds.
> 
> We fix that by adding a new rule, $(1)-legal-source which only
> $(1)-all-source depends on, so that we only download it for a top-level
> 'make source', not as part of the standard download mechanism (i.e. only
> what is really needed to build).
> 
> This new rule depends, like the normal download mechanism, on a stamp
> file, so that we do not emit a spurious hash-check message on successive
> runs of 'make source'.
> 
> This way, we can do a complete [0] off-line build and are still able to
> generate legal-info, while at the same time we do not incur any download
> overhead during a simple build.
> 
> Also, we previously downloaded the _ACTUAL_SOURCE_TARBALL when it was
> not empty. However, since _ACTUAL_SOURCE_TARBALL defaults to the value
> of _SOURCE, it can not be empty when _SOURCE is not. Thus, we'd get a
> spurious report of a missing hash for the tarball, since it was not in
> a standard package rule (configure, build, install..) and thus would
> miss the PKG and PKGDIR variables to find the .hash file.
> 
> We fix that in this commit as well, by:
> 
>   - setting PKG and PKGDIR just for the -legal-source rule;
> 
>   - only downloading _ACTUAL_SOURCE_TARBALL if it is not empty *and* not
>     the same as _SOURCE (to avoid a second report about the hash).
> 
> [0] Save for nodejs which invarriably wants to download stuff at build
> time. Sigh... :-( Fixing that is work for another time...
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Luca Ceresoli <luca@lucaceresoli.net>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Cc: Peter Korsgaard <jacmet@uclibc.org>
> Tested-by: Luca Ceresoli <luca@lucaceresoli.net>
> 
> ---
> Notes: here is a case where one would need to be able to do an off-line
> legal-info:
>   - a build farm (e.g. Jenkins slaves) without access to the internet;
>   - a single machine (not part of the farm) has access to the internet;
>   - that machine runs "make source" to populate a mirror (a "primary
>     mirror" or an NFS-mounted directory or anything else) that is
>     accessible to the build farm;
>   - machines in the build farm need the actual sources to run
>     legal-info, doing so off-line.

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4)
  2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
                   ` (13 preceding siblings ...)
  2016-06-22 21:12 ` [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
@ 2016-06-24 15:11 ` Thomas Petazzoni
  2016-06-24 17:20   ` Yann E. MORIN
  14 siblings, 1 reply; 46+ messages in thread
From: Thomas Petazzoni @ 2016-06-24 15:11 UTC (permalink / raw)
  To: buildroot

Hello,

On Sat,  7 May 2016 18:14:33 +0200, Yann E. MORIN wrote:

> This series brings improvements to the legal-info infrastructure, so
> that we provide the most complete and correct content in the output of
> legal-info.

The series is now fully applied. Thanks a lot!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 46+ messages in thread

* [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4)
  2016-06-24 15:11 ` Thomas Petazzoni
@ 2016-06-24 17:20   ` Yann E. MORIN
  0 siblings, 0 replies; 46+ messages in thread
From: Yann E. MORIN @ 2016-06-24 17:20 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2016-06-24 17:11 +0200, Thomas Petazzoni spake thusly:
> On Sat,  7 May 2016 18:14:33 +0200, Yann E. MORIN wrote:
> > This series brings improvements to the legal-info infrastructure, so
> > that we provide the most complete and correct content in the output of
> > legal-info.
> 
> The series is now fully applied. Thanks a lot!

Thanks! :-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2016-06-24 17:20 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-07 16:14 [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
2016-05-07 16:14 ` [Buildroot] [PATCH 01/13 v7] support/scripts: add helper to hardlink-or-copy Yann E. MORIN
2016-05-07 18:48   ` Arnout Vandecappelle
2016-05-11 21:23   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 02/13 v7] core/legal-info: use the helper to install source archives Yann E. MORIN
2016-05-07 19:54   ` Arnout Vandecappelle
2016-05-11 21:24   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 03/13 v7] core/pkg-generic: add variable to store the package rawname-version Yann E. MORIN
2016-05-11 21:29   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 04/13 v7] core/legal-info: install source archives in their own sub-dir Yann E. MORIN
2016-05-11 21:40   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 05/13 v7] core/legal-info: add package version to license directory Yann E. MORIN
2016-05-07 20:01   ` Arnout Vandecappelle
2016-05-11 21:43     ` Thomas Petazzoni
2016-05-13 20:11       ` Yann E. MORIN
2016-05-14 21:22         ` Arnout Vandecappelle
2016-05-15  9:49           ` Yann E. MORIN
2016-05-15 17:50           ` Yann E. MORIN
2016-05-16 21:31             ` Arnout Vandecappelle
2016-06-24 13:50   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 06/13 v7] core/apply-patches: store full path of applied patches Yann E. MORIN
2016-05-07 20:09   ` Arnout Vandecappelle
2016-06-22 20:59     ` Yann E. MORIN
2016-06-24 14:02   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 07/13 v7] support/apply-patches: bail-out on duplicate patch basenames Yann E. MORIN
2016-05-07 20:16   ` Arnout Vandecappelle
2016-06-22 21:01     ` Yann E. MORIN
2016-06-24 14:09   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 08/13 v7] core/legal-info: also save patches Yann E. MORIN
2016-05-07 20:36   ` Arnout Vandecappelle
2016-06-22 21:03     ` Yann E. MORIN
2016-06-24 14:22   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 09/13 v7] core/legal-info: also save extra downloads Yann E. MORIN
2016-05-07 20:42   ` Arnout Vandecappelle
2016-06-24 14:22   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 10/13 v7] legal-info: explicitly state how patches are licensed Yann E. MORIN
2016-06-24 14:25   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 11/13 v7] core/legal-info: generate a hash of all saved files Yann E. MORIN
2016-06-24 15:08   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 12/13 v7] core/pkg-generic: reorder variables definitions for legal-info Yann E. MORIN
2016-06-24 15:10   ` Thomas Petazzoni
2016-05-07 16:14 ` [Buildroot] [PATCH 13/13 v7] core/legal-info: ensure legal-info works in off-line mode Yann E. MORIN
2016-06-24 15:11   ` Thomas Petazzoni
2016-06-22 21:12 ` [Buildroot] [PATCH 00/13 v7] legal-info improvements and completeness (branch yem/legal-4) Yann E. MORIN
2016-06-24 15:11 ` Thomas Petazzoni
2016-06-24 17:20   ` Yann E. MORIN

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.