core/legal-info: don't generate big file with all license texts
cover core/legal-info: don't generate big file with all license texts
Hello All!
This little series removes the generation of the big file that contains all license texts.
So far, we expected that all license files were plain text, so we could concatenate all of them into a big file.
However, not all packages provide plain text license files; some provide a PDF or an RTF file. Those can not be easily added to that big file.
Furthermore, the license files are already aved individually, in a per-package directory.
Removing that big file will allow us to list binary files as license files. A user interesting with still having all licenses in a single file can still reconstruct it by his own means.
Regards,
Yann E. MORIN.
The following changes since commit 8e1625b8d35623559e7dbffae8982c6e737d5304
package/x11r7/xlib_libXxf86dga: needs MMU (2016-10-15 00:44:54 +0200)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 52e41b4a3aab9e9d50ace8aee2501becc5080bb8
core/legal-info: don't generate big file with all license texts (2016-10-15 10:00:08 +0200)
----------------------------------------------------------------
Yann E. MORIN (2):
core/legal-info: save empty string when no license file core/legal-info: don't generate big file with all license texts
Makefile | 2 -- package/pkg-generic.mk | 2 -- package/pkg-utils.mk | 12 ------------ 3 files changed, 16 deletions(-)
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 1/2 core/legal-info: save empty string when no license file
This is stored in the manifest file; it is perfectly possible to have empty fields in there.
--- package/pkg-generic.mk | 1 - 1 file changed, 1 deletion(-)
package/pkg-generic.mk +0 -1
@@ -779,7 +779,6 @@ endif ifneq ($$($(2)_LICENSE_FILES),) $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES) endif -$(2)_MANIFEST_LICENSE_FILES ?= not saved # 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
Signature · 1 line
2.7.4
PATCH 1/2 core/legal-info: save empty string when no license file
Dear Yann,
Quoted 15 lines · Yann E. MORIN
This is stored in the manifest file; it is perfectly possible to have empty fields in there.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Thomas Petazzoni <[email protected]>--- package/pkg-generic.mk | 1 - 1 file changed, 1 deletion(-)package/pkg-generic.mk +0
-0
package/pkg-generic.mk endif · line 782
Quoted 4 lines
package/pkg-generic.mk +0
-1@@ -779,7 +779,6 @@ endif ifneq ($$($(2)_LICENSE_FILES),) $(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES) endif -$(2)_MANIFEST_LICENSE_FILES ?= not saved
This makes the "license files" column always a list, and never a hard-coded magic string. So the semantic of the field is always constant, and I think this is good.
Signature · 1 line
Luca
Thomas Petazzoni
AppliedPATCH 1/2 core/legal-info: save empty string when no license file
In reply to Yann E. MORINHello,
Quoted 9 lines · Yann E. MORIN
This is stored in the manifest file; it is perfectly possible to have empty fields in there.
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>Cc Thomas Petazzoni <[email protected]>--- package/pkg-generic.mk | 1 - 1 file changed, 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 2/2 core/legal-info: don't generate big file with all license texts
In reply to Yann E. MORINBy aggregating all the license files into a single big text-only file means we have no way to use license files that are binary blobs (e.g. pdf, rtf...).
Just do not generate that big file; if the user still wants it, it is very easy to create it afterwards.
--- Makefile | 2 -- package/pkg-generic.mk | 1 - package/pkg-utils.mk | 12 ------------ 3 files changed, 15 deletions(-)
Makefile +0 -2
@@ -195,8 +195,6 @@ LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv -LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt -LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings LEGAL_REPORT = $(LEGAL_INFO_DIR)/README
package/pkg-generic.mk +0 -1
@@ -807,7 +807,6 @@ 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)_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)_RAW_BASE_NAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
package/pkg-utils.mk +0 -12
@@ -75,19 +75,7 @@ define legal-manifest # pkg, version, license, license-files, source, url, {HOST echo '"$(1)","$(2)","$(3)","$(4)","$(5)","$(6)"' >>$(LEGAL_MANIFEST_CSV_$(7)) endef -define legal-license-header # pkg, license-file, {HOST|TARGET} - printf "$(LEGAL_INFO_SEPARATOR)\n\t$(1):\ - $(2)\n$(LEGAL_INFO_SEPARATOR)\n\n\n" >>$(LEGAL_LICENSES_TXT_$(3)) -endef - -define legal-license-nofiles # pkg, {HOST|TARGET} - $(call legal-license-header,$(1),unknown license file(s),$(2)) -endef - define legal-license-file # pkg, filename, file-fullpath, {HOST|TARGET} - $(call legal-license-header,$(1),$(2) file,$(4)) && \ - cat $(3) >>$(LEGAL_LICENSES_TXT_$(4)) && \ - echo >>$(LEGAL_LICENSES_TXT_$(4)) && \ mkdir -p $(LICENSE_FILES_DIR_$(4))/$(1)/$(dir $(2)) && \ cp $(3) $(LICENSE_FILES_DIR_$(4))/$(1)/$(2) endef
Signature · 1 line
2.7.4
PATCH 2/2 core/legal-info: don't generate big file with all license texts
Quoted 10 lines · Yann E. MORIN
By aggregating all the license files into a single big text-only file means we have no way to use license files that are binary blobs (e.g. pdf, rtf...).
Just do not generate that big file; if the user still wants it, it is very easy to create it afterwards.
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>
Regards,
Arnout
Quoted 56 lines
--- Makefile | 2 -- package/pkg-generic.mk | 1 - package/pkg-utils.mk | 12 ------------ 3 files changed, 15 deletions(-)Makefile +0
-2@@ -195,8 +195,6 @@ LICENSE_FILES_DIR_TARGET = $(LEGAL_INFO_DIR)/licenses LICENSE_FILES_DIR_HOST = $(LEGAL_INFO_DIR)/host-licenses LEGAL_MANIFEST_CSV_TARGET = $(LEGAL_INFO_DIR)/manifest.csv LEGAL_MANIFEST_CSV_HOST = $(LEGAL_INFO_DIR)/host-manifest.csv -LEGAL_LICENSES_TXT_TARGET = $(LEGAL_INFO_DIR)/licenses.txt -LEGAL_LICENSES_TXT_HOST = $(LEGAL_INFO_DIR)/host-licenses.txt LEGAL_WARNINGS = $(LEGAL_INFO_DIR)/.warnings LEGAL_REPORT = $(LEGAL_INFO_DIR)/READMEpackage/pkg-generic.mk +0
-1@@ -807,7 +807,6 @@ 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)_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)_RAW_BASE_NAME),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))package/pkg-utils.mk +0
-12@@ -75,19 +75,7 @@ define legal-manifest # pkg, version, license, license-files, source, url, {HOST echo '"$(1)","$(2)","$(3)","$(4)","$(5)","$(6)"' >>$(LEGAL_MANIFEST_CSV_$(7)) endef -define legal-license-header # pkg, license-file, {HOST|TARGET} - printf "$(LEGAL_INFO_SEPARATOR)\n\t$(1):\ - $(2)\n$(LEGAL_INFO_SEPARATOR)\n\n\n" >>$(LEGAL_LICENSES_TXT_$(3)) -endef - -define legal-license-nofiles # pkg, {HOST|TARGET} - $(call legal-license-header,$(1),unknown license file(s),$(2)) -endef - define legal-license-file # pkg, filename, file-fullpath, {HOST|TARGET} - $(call legal-license-header,$(1),$(2) file,$(4)) && \ - cat $(3) >>$(LEGAL_LICENSES_TXT_$(4)) && \ - echo >>$(LEGAL_LICENSES_TXT_$(4)) && \ mkdir -p $(LICENSE_FILES_DIR_$(4))/$(1)/$(dir $(2)) && \ cp $(3) $(LICENSE_FILES_DIR_$(4))/$(1)/$(2) endef
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 2/2 core/legal-info: don't generate big file with all license texts
In reply to Yann E. MORINDear Yann,
Quoted 3 lines · Yann E. MORIN
By aggregating all the license files into a single big text-only file means we have no way to use license files that are binary blobs (e.g. pdf, rtf...).
Yeah, and we have a few PDFs already: libraw and libilbc.
Quoted 6 lines
Just do not generate that big file; if the user still wants it, it is very easy to create it afterwards.
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>
Signature · 1 line
Luca
Thomas Petazzoni
AppliedPATCH 2/2 core/legal-info: don't generate big file with all license texts
In reply to Yann E. MORINHello,
Quoted 7 lines · Yann E. MORIN
By aggregating all the license files into a single big text-only file means we have no way to use license files that are binary blobs (e.g. pdf, rtf...).
Just do not generate that big file; if the user still wants it, it is very easy to create it afterwards.
Quoted 8 lines
Reported-by Thomas Petazzoni <[email protected]>Signed-off-by "Yann E. MORIN" <[email protected]>Cc Luca Ceresoli <[email protected]>--- Makefile | 2 -- package/pkg-generic.mk | 1 - package/pkg-utils.mk | 12 ------------ 3 files changed, 15 deletions(-)
Applied to master, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com