Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] snmppp: extract license text from source files
@ 2015-07-21 16:29 Luca Ceresoli
  2015-07-21 19:54 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Luca Ceresoli @ 2015-07-21 16:29 UTC (permalink / raw)
  To: buildroot

There is no proper license file in the SNMP++ tarballs, so let's
extract it from a source file instead of copying it entirely.

Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
---
 package/snmppp/snmppp.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/snmppp/snmppp.mk b/package/snmppp/snmppp.mk
index 026fe6e..1b73eba 100644
--- a/package/snmppp/snmppp.mk
+++ b/package/snmppp/snmppp.mk
@@ -11,7 +11,7 @@ SNMPPP_DEPENDENCIES = host-pkgconf
 SNMPPP_INSTALL_STAGING = YES
 SNMPPP_CONF_OPTS = $(if $(BR2_PACKAGE_SNMPPP_LOGGING),--enable-logging,--disable-logging)
 SNMPPP_LICENSE = SNMP++
-SNMPPP_LICENSE_FILES = src/v3.cpp
+SNMPPP_LICENSE_FILES = license.txt
 
 ifeq ($(BR2_PACKAGE_SNMPPP_SNMPV3),y)
 SNMPPP_CONF_OPTS += --enable-snmpv3
@@ -20,4 +20,10 @@ else
 SNMPPP_CONF_OPTS += --disable-snmpv3
 endif
 
+define SNMPPP_EXTRACT_LICENSE
+	grep '_##' $(@D)/src/v3.cpp >$(@D)/license.txt
+endef
+
+SNMPPP_POST_EXTRACT_HOOKS += SNMPPP_EXTRACT_LICENSE
+
 $(eval $(autotools-package))
-- 
1.9.1

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

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-21 16:29 [Buildroot] [PATCH] snmppp: extract license text from source files Luca Ceresoli
@ 2015-07-21 19:54 ` Thomas Petazzoni
  2015-07-22 21:01   ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-21 19:54 UTC (permalink / raw)
  To: buildroot

Dear Luca Ceresoli,

On Tue, 21 Jul 2015 18:29:44 +0200, Luca Ceresoli wrote:
> There is no proper license file in the SNMP++ tarballs, so let's
> extract it from a source file instead of copying it entirely.
> 
> Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> ---
>  package/snmppp/snmppp.mk | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

In many other packages we are using a complete source file as the
license text. Should we switch to the solution you're proposing instead?
Another possibility is to do:

<pkg>_LICENSE_FILES = src/v3.cpp:1:50

To tell the package infra to extract the text from lines 1 to 50. But
we would never notice when the lines no longer match.

I'd like to have a general agreement on this before going further with
your patch.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-21 19:54 ` Thomas Petazzoni
@ 2015-07-22 21:01   ` Yann E. MORIN
  2015-07-22 21:26     ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-22 21:01 UTC (permalink / raw)
  To: buildroot

Thomas, Luca, All,

On 2015-07-21 21:54 +0200, Thomas Petazzoni spake thusly:
> On Tue, 21 Jul 2015 18:29:44 +0200, Luca Ceresoli wrote:
> > There is no proper license file in the SNMP++ tarballs, so let's
> > extract it from a source file instead of copying it entirely.
> > 
> > Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
> > ---
> >  package/snmppp/snmppp.mk | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> In many other packages we are using a complete source file as the
> license text. Should we switch to the solution you're proposing instead?
> Another possibility is to do:
> 
> <pkg>_LICENSE_FILES = src/v3.cpp:1:50
> 
> To tell the package infra to extract the text from lines 1 to 50. But
> we would never notice when the lines no longer match.
> 
> I'd like to have a general agreement on this before going further with
> your patch.

My point of view in the case there is no license file in the package:

 1) we should not regenerate a file, neither manually nor automatically:
    - the automatic part (i.e. in the infra) can be easily foiled when a
      package is updated,
    - the manual part (like suggested by Luca) can also, but to a lower
      extent, be broken on updates;

 2) if we refer to a file, it should be an existing file like a source
    file.

But all-in-all, I believe we should not refer to a license file if
there's none in the package.

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] 8+ messages in thread

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-22 21:01   ` Yann E. MORIN
@ 2015-07-22 21:26     ` Thomas Petazzoni
  2015-07-22 21:33       ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-22 21:26 UTC (permalink / raw)
  To: buildroot

Yann, Luca,

On Wed, 22 Jul 2015 23:01:08 +0200, Yann E. MORIN wrote:

> My point of view in the case there is no license file in the package:
> 
>  1) we should not regenerate a file, neither manually nor automatically:
>     - the automatic part (i.e. in the infra) can be easily foiled when a
>       package is updated,
>     - the manual part (like suggested by Luca) can also, but to a lower
>       extent, be broken on updates;
> 
>  2) if we refer to a file, it should be an existing file like a source
>     file.
> 
> But all-in-all, I believe we should not refer to a license file if
> there's none in the package.

The v3.cpp file is only 428 lines long, and weights 10260 bytes.
Comparatively, the GPLv2 text is 339 lines long for 18092 bytes, and
the GPLv3 text is 647 lines lon for 35147 bytes.

If you're really concerned about the file size used for the license of
snmppp, we could switch to use src/gauge.cpp instead of src/v3.cpp.
gauge.cpp is only 75 lines long, for 2804 bytes, and I'd say two thirds
of the file contents are license stuff.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-22 21:26     ` Thomas Petazzoni
@ 2015-07-22 21:33       ` Yann E. MORIN
  2015-07-22 21:37         ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-22 21:33 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-07-22 23:26 +0200, Thomas Petazzoni spake thusly:
> On Wed, 22 Jul 2015 23:01:08 +0200, Yann E. MORIN wrote:
> 
> > My point of view in the case there is no license file in the package:
> > 
> >  1) we should not regenerate a file, neither manually nor automatically:
> >     - the automatic part (i.e. in the infra) can be easily foiled when a
> >       package is updated,
> >     - the manual part (like suggested by Luca) can also, but to a lower
> >       extent, be broken on updates;
> > 
> >  2) if we refer to a file, it should be an existing file like a source
> >     file.
> > 
> > But all-in-all, I believe we should not refer to a license file if
> > there's none in the package.
> 
> The v3.cpp file is only 428 lines long, and weights 10260 bytes.
> Comparatively, the GPLv2 text is 339 lines long for 18092 bytes, and
> the GPLv3 text is 647 lines lon for 35147 bytes.
> 
> If you're really concerned about the file size used for the license of
> snmppp, we could switch to use src/gauge.cpp instead of src/v3.cpp.
> gauge.cpp is only 75 lines long, for 2804 bytes, and I'd say two thirds
> of the file contents are license stuff.

It's not about the size of the file. It's just that I find it odd to use
a source file as a license file.

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] 8+ messages in thread

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-22 21:33       ` Yann E. MORIN
@ 2015-07-22 21:37         ` Thomas Petazzoni
  2015-07-22 21:47           ` Yann E. MORIN
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-22 21:37 UTC (permalink / raw)
  To: buildroot

Dear Yann E. MORIN,

On Wed, 22 Jul 2015 23:33:15 +0200, Yann E. MORIN wrote:

> > The v3.cpp file is only 428 lines long, and weights 10260 bytes.
> > Comparatively, the GPLv2 text is 339 lines long for 18092 bytes, and
> > the GPLv3 text is 647 lines lon for 35147 bytes.
> > 
> > If you're really concerned about the file size used for the license of
> > snmppp, we could switch to use src/gauge.cpp instead of src/v3.cpp.
> > gauge.cpp is only 75 lines long, for 2804 bytes, and I'd say two thirds
> > of the file contents are license stuff.
> 
> It's not about the size of the file. It's just that I find it odd to use
> a source file as a license file.

If there's nothing better, then using a source file that carries a text
of the license is good enough to act as a license file, IMO.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-22 21:37         ` Thomas Petazzoni
@ 2015-07-22 21:47           ` Yann E. MORIN
  2015-07-22 21:50             ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Yann E. MORIN @ 2015-07-22 21:47 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2015-07-22 23:37 +0200, Thomas Petazzoni spake thusly:
> On Wed, 22 Jul 2015 23:33:15 +0200, Yann E. MORIN wrote:
> > > The v3.cpp file is only 428 lines long, and weights 10260 bytes.
> > > Comparatively, the GPLv2 text is 339 lines long for 18092 bytes, and
> > > the GPLv3 text is 647 lines lon for 35147 bytes.
> > > 
> > > If you're really concerned about the file size used for the license of
> > > snmppp, we could switch to use src/gauge.cpp instead of src/v3.cpp.
> > > gauge.cpp is only 75 lines long, for 2804 bytes, and I'd say two thirds
> > > of the file contents are license stuff.
> > 
> > It's not about the size of the file. It's just that I find it odd to use
> > a source file as a license file.
> 
> If there's nothing better, then using a source file that carries a text
> of the license is good enough to act as a license file, IMO.

In principle, yes. However, consider this case:

  - package is BSD-3c licensed, so redistributing the source is not
    mandatory,

  - the user has a local patch for that package,

  - the user does not want to share those modifications, which he is
    allowed to do as per the BSD-3c,

  - using a source file as license file would "leak" those modifications
    (or part of those) in the legal-info.

So, using a source file is not perfect either.

(Note: I would prefer to live in an ideal world where "Open Source" did
not exist and only "Free-as-in-free-speach Software" did, but that's not
the world I'm living in, so... ;-) )

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] 8+ messages in thread

* [Buildroot] [PATCH] snmppp: extract license text from source files
  2015-07-22 21:47           ` Yann E. MORIN
@ 2015-07-22 21:50             ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2015-07-22 21:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 22 Jul 2015 23:47:56 +0200, Yann E. MORIN wrote:

> In principle, yes. However, consider this case:
> 
>   - package is BSD-3c licensed, so redistributing the source is not
>     mandatory,
> 
>   - the user has a local patch for that package,
> 
>   - the user does not want to share those modifications, which he is
>     allowed to do as per the BSD-3c,
> 
>   - using a source file as license file would "leak" those modifications
>     (or part of those) in the legal-info.
> 
> So, using a source file is not perfect either.

No, it's certainly not perfect, but good enough. I would expect people
to review the legal-info generated by Buildroot before publishing them,
so they should notice such issues especially if they are really
concerned about no publishing the source code for a BSD-3c component:
by default we copy the source code for that package to legal-info
(though not the local patch).

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2015-07-22 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-21 16:29 [Buildroot] [PATCH] snmppp: extract license text from source files Luca Ceresoli
2015-07-21 19:54 ` Thomas Petazzoni
2015-07-22 21:01   ` Yann E. MORIN
2015-07-22 21:26     ` Thomas Petazzoni
2015-07-22 21:33       ` Yann E. MORIN
2015-07-22 21:37         ` Thomas Petazzoni
2015-07-22 21:47           ` Yann E. MORIN
2015-07-22 21:50             ` Thomas Petazzoni

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