legal-info improvements and completeness (branch yem/legal-4)
v7 cover legal-info improvements and completeness (branch yem/legal-4)
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v7 1/13 support/scripts: add helper to hardlink-or-copy
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.
---
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
support/scripts/hardlink-or-copy new file +35 -0
@@ -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 "${@}"
Signature · 1 line
2.7.4
PATCH v7 1/13 support/scripts: add helper to hardlink-or-copy
Quoted 16 lines · Yann E. MORIN
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, theBR2_DL_DIRmay be on a different filesystem, so we must fallback to copying in this caseIntroduce 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.
Quoted 6 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>
Regards,
Arnout
[snip]
Signature · 6 lines
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
Thomas Petazzoni
AppliedPATCH v7 1/13 support/scripts: add helper to hardlink-or-copy
In reply to Yann E. MORINHello,
Quoted 23 lines · Yann E. MORIN
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, theBR2_DL_DIRmay be on a different filesystem, so we must fallback to copying in this caseIntroduce 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" <[email protected]>Cc Luca Ceresoli <[email protected]>
Quoted 7 lines
---
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 2/13 core/legal-info: use the helper to install source archives
In reply to Yann E. MORIN.. and use $(Q) instead of a hard-coded @.
---
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(-)
package/pkg-generic.mk +4 -3
@@ -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
Signature · 1 line
2.7.4
PATCH v7 2/13 core/legal-info: use the helper to install source archives
Quoted 4 lines · Yann E. MORIN
.. and use $(Q) instead of a hard-coded @.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>
Regards,
Arnout
Quoted 39 lines
---
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 bitChanges v4 -> v5:
- s/Copy/Save/ because we're not really copyingChanges v2 -> v3:
- comment the @ -> $(Q) change (Arnout)--- package/pkg-generic.mk | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)package/pkg-generic.mk +4
-3@@ -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
Signature · 6 lines
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
Thomas Petazzoni
AppliedPATCH v7 2/13 core/legal-info: use the helper to install source archives
In reply to Yann E. MORINHello,
Quoted 10 lines · Yann E. MORIN
.. and use $(Q) instead of a hard-coded @.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>---
Changes v6 -> v7:
- directly call the wrapper without the variable pointing to it (Arnout)
- fix left-over comma (Arnout)
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 3/13 core/pkg-generic: add variable to store the package rawname-version
In reply to Yann E. MORINIntroduce 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.
---
Changes v5 -> v6:
- rename variable (Thomas)
--- package/pkg-generic.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
package/pkg-generic.mk +2 -1
@@ -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
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v7 3/13 core/pkg-generic: add variable to store the package rawname-version
Hello,
Quoted 13 lines · Yann E. MORIN
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 <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>Cc Thomas Petazzoni <[email protected]>
Quoted 6 lines
---
Changes v5 -> v6:
- rename variable (Thomas)--- package/pkg-generic.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 4/13 core/legal-info: install source archives in their own sub-dir
In reply to Yann E. MORINCurrently, 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).
---
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(-)
package/pkg-generic.mk +3 -1
@@ -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
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v7 4/13 core/legal-info: install source archives in their own sub-dir
Hello,
Quoted 18 lines · Yann E. MORIN
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Acked-by Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>Reviewed-by Thomas Petazzoni <[email protected]>
Quoted 3 lines
---
Changes v6 -> v7:
- directly call the helper
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 5/13 core/legal-info: add package version to license directory
In reply to Yann E. MORINNow 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.
---
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(-)
package/pkg-generic.mk +3 -3
@@ -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)
Signature · 1 line
2.7.4
PATCH v7 5/13 core/legal-info: add package version to license directory
Quoted 31 lines · Yann E. MORIN
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_FILESnow contains the version string, too. That's unavoidable, since that's what is stored in the legal report.Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Acked-by Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>---
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(-)package/pkg-generic.mk +0
-0
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 7 lines
package/pkg-generic.mk +2
-2@@ -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:
Regards,
Arnout
Quoted 7 lines
package/pkg-generic.mk +1
-1else - @$$(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)
Signature · 6 lines
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
PATCH v7 5/13 core/legal-info: add package version to license directory
Hello,
Quoted 7 lines · Arnout Vandecappelle
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 1 line
package/pkg-generic.mk +1
-0+ @$$(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:
I agree with Arnout here (we should keep using $(2)_RAWNAME for the warning). Yann, what do you think?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 5/13 core/legal-info: add package version to license directory
Thomas, All,
On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 2 lines
package/pkg-generic.mk +1
-0+ @$$(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.
Quoted 5 lines
Quoted 2 lines
Other than that:
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v7 5/13 core/legal-info: add package version to license directory
Quoted 30 lines · Yann E. MORIN
Thomas, All,
On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 2 lines
package/pkg-generic.mk +1
-0+ @$$(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.Quoted 5 lines
Quoted 2 lines
Other than that:
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.
Quoted 2 lines · I completely agree with this reasoning. Note that I
Quoted 2 lines
Quoted 2 lines
[...] or either it should change as well for
the legal-warning-source below.
Regards,
Arnout
Signature · 6 lines
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
PATCH v7 5/13 core/legal-info: add package version to license directory
Arnout, All,
On 2016-05-14 23:22 +0200, Arnout Vandecappelle spake thusly:
Quoted 28 lines · Yann E. MORIN
Quoted 27 lines
Thomas, All,
On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 2 lines
package/pkg-generic.mk +1
-0+ @$$(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.Quoted 5 lines
Quoted 2 lines
Other than that:
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.
Quoted 8 lines
Quoted 3 lines
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.Quoted 2 lines · I completely agree with this reasoning. Note that I
Quoted 2 lines
Quoted 2 lines
[...] or either it should change as well for
the legal-warning-source below.
OK, I'll do so. Thanks!
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v7 5/13 core/legal-info: add package version to license directory
In reply to Arnout VandecappelleArnout, All,
On 2016-05-14 23:22 +0200, Arnout Vandecappelle spake thusly:
Quoted 28 lines · Yann E. MORIN
Quoted 27 lines
Thomas, All,
On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 2 lines
package/pkg-generic.mk +1
-0+ @$$(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.Quoted 5 lines
Quoted 2 lines
Other than that:
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.
Quoted 8 lines
Quoted 3 lines
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.Quoted 2 lines · I completely agree with this reasoning. Note that I
Quoted 2 lines
Quoted 2 lines
[...] 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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v7 5/13 core/legal-info: add package version to license directory
Quoted 46 lines · Yann E. MORIN
Arnout, All,
On 2016-05-14 23:22 +0200, Arnout Vandecappelle spake thusly:
Quoted 28 lines · Yann E. MORIN
Quoted 27 lines
Thomas, All,
On 2016-05-11 23:43 +0200, Thomas Petazzoni spake thusly:
Quoted 7 lines · Arnout Vandecappelle
Quoted 6 lines
package/pkg-generic.mk ifneq ($$(call qstrip,$$($(2)_SOURCE)),) · line 790
Quoted 2 lines
package/pkg-generic.mk +1
-0+ @$$(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.Quoted 5 lines
Quoted 2 lines
Other than that:
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.
Quoted 8 lines
Quoted 3 lines
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.Quoted 2 lines · I completely agree with this reasoning. Note that I
Quoted 2 lines
Quoted 2 lines
[...] 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
Quoted 8 lines
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_NAMEfor 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
Signature · 6 lines
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
Thomas Petazzoni
AppliedPATCH v7 5/13 core/legal-info: add package version to license directory
In reply to Yann E. MORINHello,
Quoted 11 lines · Yann E. MORIN
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_FILESnow contains the version string, too. That's unavoidable, since that's what is stored in the legal report.
Quoted 8 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Acked-by Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>---
Chages v5 -> v6:
- raw name variable was renamed (Thomas)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 6/13 core/apply-patches: store full path of applied patches
In reply to Yann E. MORINCurrently, 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.
---
Changes v1 -> v2:
- do not duplicate '/' in paths (Luca)
--- support/scripts/apply-patches.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)
support/scripts/apply-patches.sh +8 -3
@@ -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...
Signature · 1 line
2.7.4
PATCH v7 6/13 core/apply-patches: store full path of applied patches
Quoted 9 lines · Yann E. MORIN
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.
Quoted 8 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>[Tested only with patches in the Buildroot sources]Tested-by Luca Ceresoli <[email protected]>
Small question...
Quoted 13 lines
---
Changes v1 -> v2:
- do not duplicate '/' in paths (Luca)--- support/scripts/apply-patches.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-)support/scripts/apply-patches.sh +0
-0
support/scripts/apply-patches.sh find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ · line 70
Quoted 10 lines
support/scripts/apply-patches.sh +5
-2@@ -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
Quoted 22 lines
support/scripts/apply-patches.sh +3
-1+ 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...
Signature · 6 lines
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
PATCH v7 6/13 core/apply-patches: store full path of applied patches
Arnout, All,
On 2016-05-07 22:09 +0200, Arnout Vandecappelle spake thusly:
Quoted 38 lines · Yann E. MORIN
Quoted 9 lines
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.
Quoted 8 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>[Tested only with patches in the Buildroot sources]Tested-by Luca Ceresoli <[email protected]>Small question...
Quoted 15 lines
---
Changes v1 -> v2:
- do not duplicate '/' in paths (Luca)
---support/scripts/apply-patches.sh| 11 ++++++++---1 file changed, 8 insertions(+), 3 deletions(-)support/scripts/apply-patches.sh +0
-0@@ -63,8 +63,12 @@ find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ xargs -0 -r rm -f
Quoted 10 lines
support/scripts/apply-patches.sh find ${builddir}/ '(' -name '*.rej' -o -name '.*.rej' ')' -print0 | \ · line 70
Quoted 8 lines
support/scripts/apply-patches.sh +5
-2function 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.
Quoted 34 lines
Regards,
ArnoutQuoted 22 lines
support/scripts/apply-patches.sh +3
-1+ 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...
Signature · 6 lines
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
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v7 6/13 core/apply-patches: store full path of applied patches
In reply to Yann E. MORINHello,
Quoted 18 lines · Yann E. MORIN
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>[Tested only with patches in the Buildroot sources]Tested-by Luca Ceresoli <[email protected]>
Quoted 6 lines
---
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 7/13 support/apply-patches: bail-out on duplicate patch basenames
In reply to Yann E. MORINPatches 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.patchIn 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.
---
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(+)
support/scripts/apply-patches.sh +8 -0
@@ -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
Signature · 1 line
2.7.4
PATCH v7 7/13 support/apply-patches: bail-out on duplicate patch basenames
Quoted 24 lines · Yann E. MORIN
Patches we save can come from various locations;
- bundled with Buildroot
- downloaded
- from one or more global-patch-dirIt 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.patchIn 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.
Quoted 8 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Arnout Vandecappelle <[email protected]>Cc Thomas Petazzoni <[email protected]>
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".
Quoted 32 lines
---
Changes v6 -> v7:
- reword error messageChanges v5 -> v6:
- don't renumber, detect collision and error out (Luca, Arnout, Thomas)--- support/scripts/apply-patches.sh | 8 ++++++++ 1 file changed, 8 insertions(+)support/scripts/apply-patches.sh +8
-0@@ -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
Signature · 6 lines
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
PATCH v7 7/13 support/apply-patches: bail-out on duplicate patch basenames
Arnout, All,
On 2016-05-07 22:16 +0200, Arnout Vandecappelle spake thusly:
Quoted 37 lines · Yann E. MORIN
Quoted 24 lines
Patches we save can come from various locations;
- bundled with Buildroot
- downloaded
- from one or more global-patch-dirIt 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.patchIn 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.
Quoted 8 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Arnout Vandecappelle <[email protected]>Cc Thomas Petazzoni <[email protected]>
Quoted 6 lines
Regards,
ArnoutPS 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.
Quoted 40 lines
Quoted 31 lines
---
Changes v6 -> v7:
- reword error messageChanges v5 -> v6:
- don't renumber, detect collision and error out (Luca, Arnout, Thomas)
---support/scripts/apply-patches.sh| 8 ++++++++1 file changed, 8 insertions(+)support/scripts/apply-patches.sh +8
-0@@ -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 ] ; thenSignature · 6 lines
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
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH v7 7/13 support/apply-patches: bail-out on duplicate patch basenames
In reply to Yann E. MORINHello,
Quoted 1 line · Yann E. MORIN
Patches we save can come from various locations;
: instead of ; here
Quoted 4 lines
- bundled with Buildroot
- downloaded
- from one or more global-patch-dir
Quoted 8 lines
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.patchIn that case, when running legal-info, we'd save only the second patch, overwriting the first. That would be oproblematic, because:
oproblematic -> problematic
Quoted 6 lines
- 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
Quoted 2 lines
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)
Quoted 28 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Arnout Vandecappelle <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Changes v6 -> v7:
- reword error messageChanges v5 -> v6:
- don't renumber, detect collision and error out (Luca, Arnout, Thomas)--- support/scripts/apply-patches.sh | 8 ++++++++ 1 file changed, 8 insertions(+)support/scripts/apply-patches.sh +0
-0
support/scripts/apply-patches.sh function apply_patch { · line 106
Quoted 4 lines
support/scripts/apply-patches.sh +1
-0@@ -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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 8/13 core/legal-info: also save patches
In reply to Yann E. MORINCurrently, 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.
---
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(-)
package/pkg-generic.mk +10 -5
@@ -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
support/legal-info/README.header +5 -4
@@ -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.
Signature · 1 line
2.7.4
PATCH v7 8/13 core/legal-info: also save patches
Quoted 34 lines · Yann E. MORIN
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.
Quoted 4 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>
But...
Quoted 39 lines
---
Changes v6 -> v7:
- directly call the helperChanges 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(-)package/pkg-generic.mk +3
-5@@ -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).
package/pkg-generic.mk endif · line 815
Quoted 8 lines
package/pkg-generic.mk +5
-0@@ -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
Quoted 26 lines
package/pkg-generic.mk +2
-0+ printf "%s\n" "$$$${f##*/}" >>$$($(2)_REDIST_SOURCES_DIR)/series || exit 1; \ + done <$$($(2)_DIR)/.applied_patches_list endif # redistribute endif # other packagessupport/legal-info/README.header +5
-4@@ -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.
Signature · 6 lines
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
PATCH v7 8/13 core/legal-info: also save patches
Arnout, All,
On 2016-05-07 22:36 +0200, Arnout Vandecappelle spake thusly:
Quoted 80 lines · Yann E. MORIN
Quoted 34 lines
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.Quoted 4 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>But...
Quoted 36 lines
---
Changes v6 -> v7:
- directly call the helperChanges 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(-)package/pkg-generic.mk +0
-0@@ -749,12 +749,10 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)endif
$(2)_MANIFEST_LICENSE_FILES ?= not savedpackage/pkg-generic.mk +3
-4-# 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
Quoted 13 lines
package/pkg-generic.mk endif · line 815
Quoted 11 lines
# We only save the sources of packages we want to redistribute, that are
# non-overriden (local or true override).package/pkg-generic.mk +5
-0@@ -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.
Quoted 42 lines
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,
ArnoutQuoted 26 lines
package/pkg-generic.mk +2
-0+ printf "%s\n" "$$$${f##*/}" >>$$($(2)_REDIST_SOURCES_DIR)/series || exit 1; \ + done <$$($(2)_DIR)/.applied_patches_listendif # redistribute
endif # other packages
support/legal-info/README.header +5
-4@@ -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.Signature · 6 lines
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
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH v7 8/13 core/legal-info: also save patches
In reply to Yann E. MORINHello,
Quoted 34 lines · Yann E. MORIN
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.
Quoted 8 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>---
Changes v6 -> v7:
- directly call the helper
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 9/13 core/legal-info: also save extra downloads
In reply to Yann E. MORINSome 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...
---
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(-)
package/pkg-generic.mk +6 -4
@@ -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 \
Signature · 1 line
2.7.4
PATCH v7 9/13 core/legal-info: also save extra downloads
Quoted 11 lines · Yann E. MORIN
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.
Quoted 8 lines
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Thomas Petazzoni <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>
Regards,
Arnout
Quoted 37 lines
---
Changes v6 -> v7:
- directly call the wrapper
- fix after re-ordering patchesChanges 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(-)package/pkg-generic.mk +6
-4@@ -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 \
Signature · 6 lines
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
Thomas Petazzoni
AppliedPATCH v7 9/13 core/legal-info: also save extra downloads
In reply to Yann E. MORINHello,
Quoted 20 lines · Yann E. MORIN
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" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Thomas Petazzoni <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>
Quoted 4 lines
---
Changes v6 -> v7:
- directly call the wrapper
- fix after re-ordering patches
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 10/13 legal-info: explicitly state how patches are licensed
In reply to Yann E. MORINFrom: Luca Ceresoli <[email protected]>
---
Changes v5 -> v6:
- slightly tweak the phrasing (Arnout)
--- support/legal-info/README.header | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
support/legal-info/README.header +2 -1
@@ -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.
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v7 10/13 legal-info: explicitly state how patches are licensed
Hello,
Quoted 9 lines · Yann E. MORIN
From: Luca Ceresoli <[email protected]>
Signed-off-by Luca Ceresoli <[email protected]>Acked-by Thomas Petazzoni <[email protected]>[yann.morin.1998 at free.fr: slightly tweak after Arnout's review]Signed-off-by Yann E. MORIN <[email protected]>Cc Arnout Vandecappelle <[email protected]>
Quoted 6 lines
---
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 11/13 core/legal-info: generate a hash of all saved files
In reply to Yann E. MORINHaving 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.
---
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(-)
Makefile +7 -1
@@ -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)
Signature · 1 line
2.7.4
PATCH v7 11/13 core/legal-info: generate a hash of all saved files
Hello,
Quoted 4 lines · Yann E. MORIN
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.
Makefile legal-info: dirs legal-info-clean legal-info-prepare $(foreach p,$(PACKAGES),$(p · line 710
Quoted 8 lines
Makefile +6
-1- @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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 12/13 core/pkg-generic: reorder variables definitions for legal-info
In reply to Yann E. MORINMove 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.
---
Changes v2 -> v3:
- move that to its own patch (Arnout)
--- package/pkg-generic.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
package/pkg-generic.mk +8 -8
@@ -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.
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v7 12/13 core/pkg-generic: reorder variables definitions for legal-info
Hello,
Quoted 12 lines · Yann E. MORIN
Move the declarations of
_ACTUAL_SOURCEand_ACTUAL_SITEearlier, so that they are close to where_SOURCEand_SITEare 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" <[email protected]>Cc Arnout Vandecappelle <[email protected]>Reviewed-by Luca Ceresoli <[email protected]>Tested-by Luca Ceresoli <[email protected]>
Quoted 6 lines
---
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v7 13/13 core/legal-info: ensure legal-info works in off-line mode
In reply to Yann E. MORINAlmost 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...
---
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(-)
package/pkg-generic.mk +22 -3
@@ -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 \
Signature · 1 line
2.7.4
Thomas Petazzoni
AppliedPATCH v7 13/13 core/legal-info: ensure legal-info works in off-line mode
Hello,
Quoted 45 lines · Yann E. MORIN
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_TARBALLwhen it was not empty. However, since_ACTUAL_SOURCE_TARBALLdefaults to the value of_SOURCE, it can not be empty when_SOURCEis 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_TARBALLif 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" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Peter Korsgaard <[email protected]>Tested-by Luca Ceresoli <[email protected]>
Quoted 10 lines
---
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
v7 cover legal-info improvements and completeness (branch yem/legal-4)
In reply to Yann E. MORINThomas, All,
On 2016-05-07 18:14 +0200, Yann E. MORIN spake thusly:
Quoted 3 lines
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
v7 cover legal-info improvements and completeness (branch yem/legal-4)
In reply to Yann E. MORINHello,
Quoted 3 lines · Yann E. MORIN
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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
v7 cover legal-info improvements and completeness (branch yem/legal-4)
Thomas, All,
On 2016-06-24 17:11 +0200, Thomas Petazzoni spake thusly:
Quoted 6 lines · Yann E. MORIN
Quoted 3 lines
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.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'