Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] legal-info: extract even no-redistribute packages
@ 2014-03-12 22:29 Yann E. MORIN
  2014-03-13 11:52 ` Thomas De Schampheleire
  2014-03-13 23:24 ` Luca Ceresoli
  0 siblings, 2 replies; 9+ messages in thread
From: Yann E. MORIN @ 2014-03-12 22:29 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

Currently, if a package is marked _REDISTRIBUTE = NO, then legal-info
will not try to extract it first.

If that package also declares some _LICENSE_FILES, legal-info fails
if it is the only action we're trying to run:

    $ cat defconfig
    BR2_INIT_NONE=y
    BR2_PACKAGE_LIBFSLCODEC=y
    $ make BR2_DEFCONFIG=$(pwd)/defconfig defconfig
    $ make libfslcodec-legal-info
    /bin/sh: /home/ymorin/dev/buildroot/O/legal-info/licenses.txt: No such file or directory
    make[1]: *** [libfslcodec-legal-info] Error 1

Fix this by always having legal-info extract the archives if one or
more _LICENSE_FILES are specified.

We do this for all types of packages: overriden, local or 'normal'
remote packages. Even though we do not save the sources for the
overriden or local packages, we need to save their licensing info,
so we need to extract them.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Fabio Porcedda <fabio.porcedda@gmail.com>

Chamges v1 -> v2:
  - this is not fixing the autobuilders failure it was written to fix
    so remove the references to such build failures  (Thomas P)
  - also extract overriden and local packages  (Fabio)
---
 package/pkg-generic.mk | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 339c3eb..d201a77 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -555,15 +555,13 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
 endif
 $(2)_MANIFEST_LICENSE_FILES ?= not saved
 
-ifeq ($$($(2)_REDISTRIBUTE),YES)
-ifneq ($$($(2)_SITE_METHOD),local)
-ifneq ($$($(2)_SITE_METHOD),override)
+# If the package declares _LICENSE_FILES, we need to extract it,
+# for overriden, local or normal remote packages alike.
+ifneq ($$($(2)_LICENSE_FILES),)
 # Packages that have a tarball need it downloaded and extracted beforehand
 $(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR_$(call UPPERCASE,$(4)))
 $(2)_MANIFEST_TARBALL = $$($(2)_SOURCE)
 endif
-endif
-endif
 $(2)_MANIFEST_TARBALL ?= not saved
 
 # legal-info: produce legally relevant info.
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread
* [Buildroot] [PATCH] legal-info: extract even no-redistribute packages
@ 2014-02-28 16:45 Yann E. MORIN
  2014-02-28 19:16 ` Thomas Petazzoni
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yann E. MORIN @ 2014-02-28 16:45 UTC (permalink / raw)
  To: buildroot

From: "Yann E. MORIN" <yann.morin.1998@free.fr>

If a package is marked _REDISTRIBUTE = NO, then legal-info will not
try to extract it first.

If that package also declares some _LICENSE_FILES, legal-info fails
if it is the only action we're trying to run:

    $ cat defconfig
    BR2_INIT_NONE=y
    BR2_PACKAGE_LIBFSLCODEC=y
    $ make BR2_DEFCONFIG=$(pwd)/defconfig defconfig
    $ make libfslcodec-legal-info
    /bin/sh: /home/ymorin/dev/buildroot/O/legal-info/licenses.txt: No such file or directory
    make[1]: *** [libfslcodec-legal-info] Error 1

Fix this by always having legal-info extract the archives if one or
more _LICENSE_FILES are specified.

Fixes:
    http://autobuild.buildroot.net/results/884/884ba13bb024fd9a4818f3184495b2cccc3f595e/
    http://autobuild.buildroot.net/results/b6e/b6e152ce117764337c243a9f356b32064106f5c3/
    http://autobuild.buildroot.net/results/a58/a588b3b535a1259f7bc110a6323e5f33830bcd94/
    http://autobuild.buildroot.net/results/6d5/6d5da7fe5aee871d98fd5503875453556ccbf854/
    [...]

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com>
---
 package/pkg-generic.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index 339c3eb..7b4d04e 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -555,7 +555,8 @@ $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
 endif
 $(2)_MANIFEST_LICENSE_FILES ?= not saved
 
-ifeq ($$($(2)_REDISTRIBUTE),YES)
+# If the package declares _LICENSE_FILES, we need to extract it
+ifneq ($$($(2)_LICENSE_FILES),)
 ifneq ($$($(2)_SITE_METHOD),local)
 ifneq ($$($(2)_SITE_METHOD),override)
 # Packages that have a tarball need it downloaded and extracted beforehand
-- 
1.8.3.2

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

end of thread, other threads:[~2014-03-14 21:40 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-12 22:29 [Buildroot] [PATCH] legal-info: extract even no-redistribute packages Yann E. MORIN
2014-03-13 11:52 ` Thomas De Schampheleire
2014-03-13 23:24 ` Luca Ceresoli
2014-03-14 21:40   ` Yann E. MORIN
  -- strict thread matches above, loose matches on Subject: below --
2014-02-28 16:45 Yann E. MORIN
2014-02-28 19:16 ` Thomas Petazzoni
2014-02-28 23:39 ` Fabio Porcedda
2014-03-01 13:19   ` Yann E. MORIN
2014-03-01 13:36 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox