Skip to contentSkip to conversation

snmppp: extract license text from source files

PATCH New Luca Ceresoli 3 participants 8 messages Jul 21, 2015 – Jul 22, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 snmppp: extract license text from source files

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

---
 package/snmppp/snmppp.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
package/snmppp/snmppp.mk +7 -1
index 026fe6e..1b73eba 100644
@@ -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))
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 snmppp: extract license text from source files

Dear Luca Ceresoli,

Quoted 7 lines · Luca Ceresoli

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

---
 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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 snmppp: extract license text from source files

Thomas, Luca, All,

On 2015-07-21 21:54 +0200, Thomas Petazzoni spake thusly:

Quoted 13 lines · Luca Ceresoli
Quoted 7 lines

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

---
 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:

Quoted 7 lines

<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.

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.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 1/1 snmppp: extract license text from source files

Yann, Luca,

Quoted 8 lines · Yann E. MORIN

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;

Quoted 5 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 snmppp: extract license text from source files

Thomas, All,

On 2015-07-22 23:26 +0200, Thomas Petazzoni spake thusly:

Quoted 16 lines · Yann E. MORIN
Quoted 9 lines

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;

Quoted 5 lines

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.

Quoted 8 lines

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.

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.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/1 snmppp: extract license text from source files

Dear Yann E. MORIN,

Quoted 11 lines · Yann E. MORIN
Quoted 8 lines

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

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/1 snmppp: extract license text from source files

Thomas, All,

On 2015-07-22 23:37 +0200, Thomas Petazzoni spake thusly:

Quoted 10 lines · Yann E. MORIN
Quoted 9 lines
Quoted 8 lines

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.

Quoted 5 lines
Quoted 2 lines

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.

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.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/1 snmppp: extract license text from source files

Hello,

Quoted 7 lines · Yann E. MORIN

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,

Quoted 7 lines

- 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

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