* [Buildroot] [PATCH 0/2 v3] legal-info: extract packages to get license files (branch yem/legal)
@ 2014-03-14 22:10 Yann E. MORIN
2014-03-14 22:10 ` [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages Yann E. MORIN
2014-03-14 22:10 ` [Buildroot] [PATCH 2/2] legal-info: add a comment about what pacakges we save the tarballs of Yann E. MORIN
0 siblings, 2 replies; 5+ messages in thread
From: Yann E. MORIN @ 2014-03-14 22:10 UTC (permalink / raw)
To: buildroot
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Hello All!
Here a quick and short series fixing the legal-info infra to extract
packages before trying to save the license files.
Changes v2 -> v3:
- fix manifest for no-redistribute, or overriden, or local packages
Regards,
Yann E. MORIN.
The following changes since commit 5dc0e606b554c494a76ffcc216eb8911d2d71dfa:
libesmtp: not available for static builds (2014-03-13 22:59:07 +0100)
are available in the git repository at:
git://gitorious.org/buildroot/buildroot.git yem/legal
for you to fetch changes up to 14c2e0397e1ce59801eb4e33561429c831dbadc8:
legal-info: add a comment about what pacakges we save the tarballs of (2014-03-14 23:05:28 +0100)
----------------------------------------------------------------
Yann E. MORIN (2):
legal-info: extract even no-redistribute packages
legal-info: add a comment about what pacakges we save the tarballs of
package/pkg-generic.mk | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 5+ messages in thread* [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages 2014-03-14 22:10 [Buildroot] [PATCH 0/2 v3] legal-info: extract packages to get license files (branch yem/legal) Yann E. MORIN @ 2014-03-14 22:10 ` Yann E. MORIN 2014-03-17 18:03 ` Luca Ceresoli 2014-03-14 22:10 ` [Buildroot] [PATCH 2/2] legal-info: add a comment about what pacakges we save the tarballs of Yann E. MORIN 1 sibling, 1 reply; 5+ messages in thread From: Yann E. MORIN @ 2014-03-14 22:10 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> Cc: Luca Ceresoli <luca@lucaceresoli.net> --- Changes v2 -> v3: - don't include source URL of no-redistribute, or overriden, or local packages in the manifest Changes 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 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 339c3eb..6512495 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -555,11 +555,16 @@ $(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),) +$(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR_$(call UPPERCASE,$(4))) +endif + 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_$(call UPPERCASE,$(4))) $(2)_MANIFEST_TARBALL = $$($(2)_SOURCE) endif endif -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages 2014-03-14 22:10 ` [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages Yann E. MORIN @ 2014-03-17 18:03 ` Luca Ceresoli 2014-03-17 18:39 ` Yann E. MORIN 0 siblings, 1 reply; 5+ messages in thread From: Luca Ceresoli @ 2014-03-17 18:03 UTC (permalink / raw) To: buildroot Hi Yann, Yann E. MORIN wrote: > 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> > Cc: Luca Ceresoli <luca@lucaceresoli.net> > > --- > Changes v2 -> v3: > - don't include source URL of no-redistribute, or overriden, or local > packages in the manifest > > Changes 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 | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk > index 339c3eb..6512495 100644 > --- a/package/pkg-generic.mk > +++ b/package/pkg-generic.mk > @@ -555,11 +555,16 @@ $(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),) > +$(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR_$(call UPPERCASE,$(4))) > +endif > + > 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_$(call UPPERCASE,$(4))) > $(2)_MANIFEST_TARBALL = $$($(2)_SOURCE) > endif > endif > I agree with this change, but still it still leave a corner case broken. For packages with _LICENSE_FILES defined and _REDISTRIBUTE = NO, if local or override is used, the tarball is extracted but no license files are copied. This is because code that copies the files (a little below) is inside an if chain that prevents any actions for local and overridden packages. Probably the ifs should be reworked to be coherent in the two parts. -- Luca ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages 2014-03-17 18:03 ` Luca Ceresoli @ 2014-03-17 18:39 ` Yann E. MORIN 0 siblings, 0 replies; 5+ messages in thread From: Yann E. MORIN @ 2014-03-17 18:39 UTC (permalink / raw) To: buildroot Luca, All, On 2014-03-17 19:03 +0100, Luca Ceresoli spake thusly: > Yann E. MORIN wrote: > >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. [--SNIP--] > I agree with this change, but still it still leave a corner case broken. > > For packages with _LICENSE_FILES defined and _REDISTRIBUTE = NO, if > local or override is used, the tarball is extracted but no license > files are copied. > > This is because code that copies the files (a little below) is inside > an if chain that prevents any actions for local and overridden packages. Ah yes, I mised that case. Thanks for spotting this. I'll rework the patch. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH 2/2] legal-info: add a comment about what pacakges we save the tarballs of 2014-03-14 22:10 [Buildroot] [PATCH 0/2 v3] legal-info: extract packages to get license files (branch yem/legal) Yann E. MORIN 2014-03-14 22:10 ` [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages Yann E. MORIN @ 2014-03-14 22:10 ` Yann E. MORIN 1 sibling, 0 replies; 5+ messages in thread From: Yann E. MORIN @ 2014-03-14 22:10 UTC (permalink / raw) To: buildroot From: "Yann E. MORIN" <yann.morin.1998@free.fr> As the legal-info infra only (rightfully) saves the tarballs of packages that: - we want to redistribute, - and are not local, - and are not overriden, add a comment stating so. This should clarify the code-block, which although trivial to read, was not easy to interpret without thinking thouroughly about it. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Cc: Luca Ceresoli <luca@lucaceresoli.net> Cc: Thomas De Schampheleire <patrickdepinguin@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: Fabio Porcedda <fabio.porcedda@gmail.com> --- package/pkg-generic.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 6512495..d4aae1a 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -562,6 +562,9 @@ ifneq ($$($(2)_LICENSE_FILES),) $(1)-legal-info: $(1)-extract $(REDIST_SOURCES_DIR_$(call UPPERCASE,$(4))) endif +# We only save the sources of packages we want to redistribute, that are +# non-local, and non-overriden. So only store, in the manifest, the tarball +# name of those packages. ifeq ($$($(2)_REDISTRIBUTE),YES) ifneq ($$($(2)_SITE_METHOD),local) ifneq ($$($(2)_SITE_METHOD),override) -- 1.8.3.2 ^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-17 18:39 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-14 22:10 [Buildroot] [PATCH 0/2 v3] legal-info: extract packages to get license files (branch yem/legal) Yann E. MORIN 2014-03-14 22:10 ` [Buildroot] [PATCH 1/2] legal-info: extract even no-redistribute packages Yann E. MORIN 2014-03-17 18:03 ` Luca Ceresoli 2014-03-17 18:39 ` Yann E. MORIN 2014-03-14 22:10 ` [Buildroot] [PATCH 2/2] legal-info: add a comment about what pacakges we save the tarballs of Yann E. MORIN
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox