All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO
@ 2023-01-13 13:20 Nicolas Carrier
  2023-01-14 20:38 ` Yann E. MORIN
  2023-01-16 14:46 ` Peter Korsgaard
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Carrier @ 2023-01-13 13:20 UTC (permalink / raw)
  To: buildroot@buildroot.org; +Cc: thomas.petazzoni@bootlin.com

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

Hello,
Here is a patch to remove some legal-info warnings when REDISTRIBUTE is set to NO, for local and
override packages.

I can't use git send-email as our IT department has forbidden the standard pop/imap/smtp methods...
I hope that won't be too much of an issue :/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-package-pkg-generic.mk-no-legal-info-WARNING-if-REDI.patch --]
[-- Type: text/x-patch; name="0001-package-pkg-generic.mk-no-legal-info-WARNING-if-REDI.patch", Size: 2500 bytes --]

From 60a77caebc6d3b0900e1bbe56a61d821f7c586f9 Mon Sep 17 00:00:00 2001
From: Nicolas Carrier <nicolas.carrier@orolia.com>
Date: Fri, 13 Jan 2023 12:46:22 +0100
Subject: [PATCH 1/1] package/pkg-generic.mk: no legal info WARNING if
 REDISTRIBUTE = NO

Packages making use of OVERRIDE_SRC_DIR or of the local SITE_METHOD,
will trigger a warning when the legal-info target is built, for example:

WARNING: foo: sources not saved (local packages not handled)

But in the situation where the packages has explicitly defined
FOO_REDISTRIBUTE = NO
in its .mk file, it makes no sense since the sources wouldn't be saved
anyway.

This patch swap the conditions on the type of package and on the
REDISTRIBUTE value, so that the warnings get issued only if
REDISTRIBUTE equals YES.


Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com>
---
 package/pkg-generic.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index f2bea01d7d..2f8ba39edf 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -1145,6 +1145,7 @@ else
 	$(Q)$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$($(2)_BASENAME_RAW),$$($(2)_HASH_FILE),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
 endif # license files
 
+ifeq ($$($(2)_REDISTRIBUTE),YES)
 ifeq ($$($(2)_SITE_METHOD),local)
 # Packages without a tarball: don't save and warn
 	@$$(call legal-warning-nosource,$$($(2)_RAWNAME),local)
@@ -1155,7 +1156,6 @@ else ifneq ($$($(2)_OVERRIDE_SRCDIR),)
 else
 # Other packages
 
-ifeq ($$($(2)_REDISTRIBUTE),YES)
 # 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)),\
@@ -1169,9 +1169,9 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
 			$$($(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
+
+endif # redistribute
 	@$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$(subst $$(space)$$(comma),$$(comma),$$($(2)_LICENSE)),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1)))
 endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
 	$$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep))
-- 
2.30.2


[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO
  2023-01-13 13:20 [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO Nicolas Carrier
@ 2023-01-14 20:38 ` Yann E. MORIN
  2023-01-14 20:49   ` Yann E. MORIN
  2023-01-16 14:46 ` Peter Korsgaard
  1 sibling, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2023-01-14 20:38 UTC (permalink / raw)
  To: Nicolas Carrier; +Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org

Nicolas, All,

On 2023-01-13 13:20 +0000, Nicolas Carrier spake thusly:
> Hello,
> Here is a patch to remove some legal-info warnings when REDISTRIBUTE is set to NO, for local and
> override packages.
> 
> I can't use git send-email as our IT department has forbidden the standard pop/imap/smtp methods...
> I hope that won't be too much of an issue :/

Yup, it did not go smoothly, but I'm afraid that you'll not be the only
one who can't send patches via proper mail... So, I took some time to
tweak my scripting to adapt to that situation.

> From 60a77caebc6d3b0900e1bbe56a61d821f7c586f9 Mon Sep 17 00:00:00 2001
> From: Nicolas Carrier <nicolas.carrier@orolia.com>
> Date: Fri, 13 Jan 2023 12:46:22 +0100
> Subject: [PATCH 1/1] package/pkg-generic.mk: no legal info WARNING if
>  REDISTRIBUTE = NO
> 
> Packages making use of OVERRIDE_SRC_DIR or of the local SITE_METHOD,
> will trigger a warning when the legal-info target is built, for example:
> 
> WARNING: foo: sources not saved (local packages not handled)
> 
> But in the situation where the packages has explicitly defined
> FOO_REDISTRIBUTE = NO
> in its .mk file, it makes no sense since the sources wouldn't be saved
> anyway.

Yes, it makes sense.

> This patch swap the conditions on the type of package and on the
> REDISTRIBUTE value, so that the warnings get issued only if
> REDISTRIBUTE equals YES.
> 
> Signed-off-by: Nicolas Carrier <nicolas.carrier@orolia.com>

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  package/pkg-generic.mk | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
> index f2bea01d7d..2f8ba39edf 100644
> --- a/package/pkg-generic.mk
> +++ b/package/pkg-generic.mk
> @@ -1145,6 +1145,7 @@ else
>  	$(Q)$$(foreach F,$$($(2)_LICENSE_FILES),$$(call legal-license-file,$$($(2)_RAWNAME),$$($(2)_BASENAME_RAW),$$($(2)_HASH_FILE),$$(F),$$($(2)_DIR)/$$(F),$$(call UPPERCASE,$(4)))$$(sep))
>  endif # license files
>  
> +ifeq ($$($(2)_REDISTRIBUTE),YES)
>  ifeq ($$($(2)_SITE_METHOD),local)
>  # Packages without a tarball: don't save and warn
>  	@$$(call legal-warning-nosource,$$($(2)_RAWNAME),local)
> @@ -1155,7 +1156,6 @@ else ifneq ($$($(2)_OVERRIDE_SRCDIR),)
>  else
>  # Other packages
>  
> -ifeq ($$($(2)_REDISTRIBUTE),YES)
>  # 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)),\
> @@ -1169,9 +1169,9 @@ ifeq ($$($(2)_REDISTRIBUTE),YES)
>  			$$($(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
> +
> +endif # redistribute
>  	@$$(call legal-manifest,$$(call UPPERCASE,$(4)),$$($(2)_RAWNAME),$$($(2)_VERSION),$$(subst $$(space)$$(comma),$$(comma),$$($(2)_LICENSE)),$$($(2)_MANIFEST_LICENSE_FILES),$$($(2)_ACTUAL_SOURCE_TARBALL),$$($(2)_ACTUAL_SOURCE_SITE),$$(call legal-deps,$(1)))
>  endif # ifneq ($$(call qstrip,$$($(2)_SOURCE)),)
>  	$$(foreach hook,$$($(2)_POST_LEGAL_INFO_HOOKS),$$(call $$(hook))$$(sep))
> -- 
> 2.30.2
> 

> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot


-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO
  2023-01-14 20:38 ` Yann E. MORIN
@ 2023-01-14 20:49   ` Yann E. MORIN
  2023-01-16  7:43     ` Nicolas Carrier
  0 siblings, 1 reply; 5+ messages in thread
From: Yann E. MORIN @ 2023-01-14 20:49 UTC (permalink / raw)
  To: Nicolas Carrier; +Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org

Nicolas, All,

On 2023-01-14 21:38 +0100, Yann E. MORIN spake thusly:
> On 2023-01-13 13:20 +0000, Nicolas Carrier spake thusly:
[--SNIP--]
> > But in the situation where the packages has explicitly defined
> > FOO_REDISTRIBUTE = NO
> > in its .mk file, it makes no sense since the sources wouldn't be saved
> > anyway.
> Yes, it makes sense.

I now realise that my comment was ambiguoug, given what I was commenting
on. So, let me rephrase:

Indeed, emitting the warning does not make sense. Indeed, what you
explained does make sense.

There, ambiguity resolved. ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO
  2023-01-14 20:49   ` Yann E. MORIN
@ 2023-01-16  7:43     ` Nicolas Carrier
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Carrier @ 2023-01-16  7:43 UTC (permalink / raw)
  To: yann.morin.1998@free.fr
  Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org

Ha yes, I have to admit that I had understood the contrary, thank you for lifting the ambiguity and
above all, thank you for having accepted my broken patches.

I'll try to bug my IT department as hard as I can so that they re-enable SMTP.

On Sat, 2023-01-14 at 21:49 +0100, Yann E. MORIN wrote:
> CAUTION: This email originated from outside of the organization.
> Do not click links or open attachments unless you recognize the sender and know the content is
> safe.
> 
> Nicolas, All,
> 
> On 2023-01-14 21:38 +0100, Yann E. MORIN spake thusly:
> > On 2023-01-13 13:20 +0000, Nicolas Carrier spake thusly:
> [--SNIP--]
> > > But in the situation where the packages has explicitly defined
> > > FOO_REDISTRIBUTE = NO
> > > in its .mk file, it makes no sense since the sources wouldn't be saved
> > > anyway.
> > Yes, it makes sense.
> 
> I now realise that my comment was ambiguoug, given what I was commenting
> on. So, let me rephrase:
> 
> Indeed, emitting the warning does not make sense. Indeed, what you
> explained does make sense.
> 
> There, ambiguity resolved. ;-)
> 
> Regards,
> Yann E. MORIN.
> 
> --
> .-----------------.--------------------.------------------.--------------------.
> >  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> > +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
> > +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
> > http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
> '------------------------------^-------^------------------^--------------------'

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO
  2023-01-13 13:20 [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO Nicolas Carrier
  2023-01-14 20:38 ` Yann E. MORIN
@ 2023-01-16 14:46 ` Peter Korsgaard
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2023-01-16 14:46 UTC (permalink / raw)
  To: Nicolas Carrier; +Cc: thomas.petazzoni@bootlin.com, buildroot@buildroot.org

>>>>> "Nicolas" == Nicolas Carrier <Nicolas.Carrier@orolia.com> writes:

 > Hello,
 > Here is a patch to remove some legal-info warnings when REDISTRIBUTE is set to NO, for local and
 > override packages.

 > I can't use git send-email as our IT department has forbidden the standard pop/imap/smtp methods...
 > I hope that won't be too much of an issue :/

:/

Committed to 2022.11.x and 2022.02.x, thanks.

-- 
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-01-16 14:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-13 13:20 [Buildroot] package/pkg-generic.mk: no legal info WARNING if REDISTRIBUTE = NO Nicolas Carrier
2023-01-14 20:38 ` Yann E. MORIN
2023-01-14 20:49   ` Yann E. MORIN
2023-01-16  7:43     ` Nicolas Carrier
2023-01-16 14:46 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.