Skip to contentSkip to conversation

legal-info: split _LICENSE and _REDISTRIBUTE constants

RFC New Luca Ceresoli 3 participants 6 messages Nov 2, 2012 – Nov 4, 2012

lore
Share & tools
lore
#0 lore raw

cover legal-info: split _LICENSE and _REDISTRIBUTE constants

Hi,

this small patchset implements the recent proposal to split the license description (<PKG>_LICENSE) from the fact that a package can be redistributed or not (<PKG>_REDISTRIBUTE).

The idea is to let the _LICENSE do its work, i.e. simply describe the license, and add a new _REDISTRUBUTE parameter (defaulting to YES), to specify if the tarball must be copied or not.
Defining the license and choosing whether or not to redistribute would become technically independent, which is more correct.

Examples:

MYAPP_LICENSE = PROPRIETARY
would become
MYAPP_LICENSE = PROPRIETARY
MYAPP_REDISTRIBUTE = NO
or
MYAPP_LICENSE = Copyright (C) 2012 My Company # just an idea MYAPP_REDISTRIBUTE = NO

FOOBAR_LICENSE = PROPRIETARY
would become
FOOBAR_LICENSE = Foobar license
FOOBAR_REDISTRIBUTE = NO

Of course this would make package files more verbose for non-redistributed packages, but they are a minor part so it is probably not a problem.

See the mailing list thread for further details:
http://thread.gmane.org/gmane.comp.lib.uclibc.buildroot/46346/focus=46949

You can pull the two commits as well:

The following changes since commit 3ff05f80ffb82e077a332b0c0625f4696a138528:

rtorrent: bump to version 0.9.3 (2012-10-31 23:15:07 +0100)

are available in the git repository at:

git at github.com:lucaceresoli/buildroot.git redistribute

for you to fetch changes up to ea0bf84cc08a7eaa91ed2bfb0b563f3e8686d208:

legal-info: split _LICENSE and _REDISTRIBUTE constants (2012-11-01 23:15:45 +0100)

Luca

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

Luca Ceresoli (2):
legal-info: move $(2)_LICENSE to a proper line
legal-info: split _LICENSE and _REDISTRIBUTE constants

 package/pkg-generic.mk |   29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 legal-info: move $(2)_LICENSE to a proper line

---
 package/pkg-generic.mk |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/pkg-generic.mk +2 -2
index 270da60..993c8d3 100644
@@ -268,14 +268,14 @@ ifndef $(2)_LICENSE
  endif
 endif
 
+$(2)_LICENSE			?= unknown
+
 ifndef $(2)_LICENSE_FILES
  ifdef $(3)_LICENSE_FILES
   $(2)_LICENSE_FILES = $($(3)_LICENSE_FILES)
  endif
 endif
 
-$(2)_LICENSE			?= unknown
-
 $(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
 
 $(2)_INSTALL_STAGING		?= NO
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 legal-info: split _LICENSE and _REDISTRIBUTE constants

In reply to Luca Ceresoli

Currently packages can be described in two ways: proprietary (tarball not saved, license not described in further detail), and others (tarball saved, license described).

Split the logic to allow the license to be always described whether or not the source code can be redistributed.

---
 package/pkg-generic.mk |   27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)
package/pkg-generic.mk +18 -9
index 993c8d3..2c8535c 100644
@@ -276,6 +276,15 @@ ifndef $(2)_LICENSE_FILES
  endif
 endif
 
+ifndef $(2)_REDISTRIBUTE
+ ifdef $(3)_REDISTRIBUTE
+  $(2)_REDISTRIBUTE = $($(3)_REDISTRIBUTE)
+ endif
+endif
+
+$(2)_REDISTRIBUTE		?= YES
+
+
 $(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))
 
 $(2)_INSTALL_STAGING		?= NO
@@ -444,29 +453,27 @@ $(2)_KCONFIG_VAR = BR2_PACKAGE_$(2)
 endif
 
 # legal-info: declare dependencies and set values used later for the manifest
-ifneq ($$($(2)_LICENSE),PROPRIETARY)
+ifneq ($$($(2)_LICENSE_FILES),)
+$(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)
 # Packages that have a tarball need it downloaded and extracted beforehand
 $(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR)
 $(2)_MANIFEST_TARBALL = $$($(2)_SOURCE)
-ifneq ($$($(2)_LICENSE_FILES),)
-$(2)_MANIFEST_LICENSE_FILES = $$($(2)_LICENSE_FILES)
 endif
 endif
 endif
-endif
-# defaults for packages without tarball or license files
 $(2)_MANIFEST_TARBALL ?= not saved
-$(2)_MANIFEST_LICENSE_FILES ?= not saved
 
 # legal-info: produce legally relevant info.
 $(1)-legal-info:
 # Packages without a source are assumed to be part of Buildroot, skip them.
 ifneq ($(call qstrip,$$($(2)_SOURCE)),)
-ifeq ($$($(2)_LICENSE),PROPRIETARY)
-# Proprietary packages: nothing to save
-else ifeq ($$($(2)_SITE_METHOD),local)
+ifeq ($$($(2)_SITE_METHOD),local)
 # Packages without a tarball: don't save and warn
 	@$(call legal-warning-pkg-savednothing,$$($(2)_RAWNAME),local)
 else ifeq ($$($(2)_SITE_METHOD),override)
@@ -482,10 +489,12 @@ else
 		$(call legal-license-file,$$($(2)_RAWNAME),$$$${F},$$($(2)_DIR)/$$$${F}); \
 		done
 endif
+ifeq ($$($(2)_REDISTRIBUTE),YES)
 # Copy the source tarball (just hardlink if possible)
 	@cp -l $(DL_DIR)/$$($(2)_SOURCE) $(REDIST_SOURCES_DIR) 2>/dev/null || \
 	   cp $(DL_DIR)/$$($(2)_SOURCE) $(REDIST_SOURCES_DIR)
 endif
+endif
 	@$(call legal-manifest,$$($(2)_RAWNAME),$$($(2)_VERSION),$$($(2)_LICENSE),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_MANIFEST_TARBALL))
 endif # ifneq ($(call qstrip,$$($(2)_SOURCE)),)
 
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH 2/2 legal-info: split _LICENSE and _REDISTRIBUTE constants

Quoted 8 lines · Luca Ceresoli

Currently packages can be described in two ways: proprietary (tarball not saved, license not described in further detail), and others (tarball saved, license described).

Split the logic to allow the license to be always described whether or not the source code can be redistributed.

(untested)

Pending the discussion at the BR developer days, of course; my ack is just
concerning the implementation.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#4 lore raw

cover legal-info: split _LICENSE and _REDISTRIBUTE constants

In reply to Luca Ceresoli
Quoted 5 lines · Luca Ceresoli

Hi,

this small patchset implements the recent proposal to split the license description (<PKG>_LICENSE) from the fact that a package can be redistributed or not (<PKG>_REDISTRIBUTE).

And I forgot to say this is a proposal for discussion for the upcoming Buildroot Developer Days.

And to say that the first patch is a trivial cleanup, not very much related to the content of the proposal.

And to mention that, if the proposal is accepted, a patch to update the docs will follow.

Nothing more, hopefully...

Luca

#5 lore raw

cover legal-info: split _LICENSE and _REDISTRIBUTE constants

In reply to Luca Ceresoli
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Luca" == Luca Ceresoli <[email protected]> writes:

Luca> Hi,
Luca> this small patchset implements the recent proposal to split the license Luca> description (<PKG>_LICENSE) from the fact that a package can be Luca> redistributed or not (<PKG>_REDISTRIBUTE).

Luca> The idea is to let the _LICENSE do its work, i.e. simply describe the Luca> license, and add a new _REDISTRUBUTE parameter (defaulting to YES), to Luca> specify if the tarball must be copied or not.
Luca> Defining the license and choosing whether or not to redistribute would Luca> become technically independent, which is more correct.

Committed both, thanks.

Signature · 1 line
Bye, Peter Korsgaard