Discussion:
Buildroot and GPL compliance
(too old to reply)
Thomas De Schampheleire
2011-12-14 07:40:54 UTC
Permalink
Hi,

I would like to bring up the topic of complying with open-source
software licenses (among which GPL/LGPL) in embedded projects using
buildroot. In part to get answers, but also to determine what needs to
be done in buildroot to automate certain aspects of this compliancy.
The topic has been touched on Buildroot Developer Day, and the report
thereof.

To set the scene, assume an embedded system running the Linux kernel,
a set of GPL applications dynamically linked against one or more LGPL
libraries, combined with a set of proprietary applications, also
dynamically linked against one or more LGPL libraries.
The whole is built with buildroot, using a toolchain built within
buildroot (either a buildroot internal one or a crosstool-ng one).
For completeness' sake, let's also assume that there are proprietary
applications (dynamically linked with LGPL libraries) built outside of
buildroot, but are copied in the output/target directory for inclusion
in the rootfs.

When the embedded system is distributed, certain obligations from the
GPL/LGPL licenses apply. In the current discussion, I think the
distribution of source code (including build scripts) and the listing
of used open-source software is most relevant.

How would one handle the GPL/LPGL compliancy?
Since the build scripts are to be included in the source distribution,
it seems most logical to provide the complete buildroot environment to
the user.

Some discussion topics:
* There has already been some discussion on BDD and the report
regarding the inclusion of the .config file or not. In my opinion, the
.config file is necessary to recreate the whole system, and as such
should be part of the distribution. Some have expressed doubts as to
whether every company would be willing to share the configuration, as
it can share too much knowledge about the system. Examples as to what
information is too sensitive is welcome.

* What about the tarballs? Should the tarballs themselves be included
in the distribution, or would they be downloaded from the web by the
user running buildroot? I think it is safer to include the tarballs,
since you never know whether the official location will continue to
exist in the future (or be temporarily out-of-order, as with
kernel.org)

* What about the toolchain? In our system, the toolchain is prebuilt
with buildroot/crosstool-ng, and used as external toolchain. If we
distribute the toolchain as such in binary form, then it will also be
subjected to GPL obligations. In that case, next to the set of sources
that make up the target embedded system, there is another set of
sources that are used to compile/link these sources. This means that
the gcc sources and the sources for various host tools that may be
used (like host-automake) should also be distributed, along with the
ways to build them.
What is the best practice? Provide the user with a unified .config
that builds the toolchain on-the-fly and then immediately uses it to
generate the embedded system? Or provide two .configs, one to generate
the toolchain, and another one to generate the actual system with the
toolchain?

* How to handle proprietary applications? Even though during
development these applications may be build from within buildroot
(when sources are available), one would typically not want to
distribute the sources to the end-user. Still, in order to be able to
regenerate the system, I think the user should have access to the
binary versions of these applications. How do we handle this, what is
the best practice?
One solution is to place them in output/target directly, before
creating the buildroot tarball. Downside is that a 'make clean' would
remove these applications. Alternatively, one could use the customize
package for this purpose. This would require a separate .config file
for use by the end-user, but this may be ok and maybe needed for the
toolchain anyhow, depending on the output of the previous point.

* What about changes to buildroot itself? Since buildroot is GPL, any
distribution of buildroot comes with obligations as well. One of these
obligations is the requirement to clearly advertise changes to the GPL
software.

[quote from the GPLv2 license:]
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
[endquote]

However, the way I see it, this is not the typical way of working.
The workflow in buildroot is that you submit patches to the list,
which can then be included. Although the patch itself contains the
name of the author and the e-mail header bears the date, the modified
files do not typically contain this information.
In my case, I make modifications to buildroot in our own repository. I
try to submit most of these changes to the list, but not all of them
are fit for mainstream, and submitted patches are not applied
immediately. So, when releasing the system, there will still be
unsubmitted changes. These changes do not comply with point 2a above,
since the files do not contain the required metadata.
Technically, the only solution I see is to add 'prominent notices' to
modified files in our own repository, but manually remove them when
submitting patches to the buildroot list. This is annoying but may be
the only legal possibility. How do others see this?


Other discussion points are welcome.

Thanks,
Thomas
Stephan Hoffmann
2011-12-18 12:31:41 UTC
Permalink
Hello Thomas and all!
Post by Thomas De Schampheleire
Hi,
I would like to bring up the topic of complying with open-source
software licenses (among which GPL/LGPL) in embedded projects using
buildroot. In part to get answers, but also to determine what needs to
be done in buildroot to automate certain aspects of this compliancy.
The topic has been touched on Buildroot Developer Day, and the report
thereof.
...
Post by Thomas De Schampheleire
* What about the tarballs? Should the tarballs themselves be included
in the distribution, or would they be downloaded from the web by the
user running buildroot? I think it is safer to include the tarballs,
since you never know whether the official location will continue to
exist in the future (or be temporarily out-of-order, as with
kernel.org)
I think referring to the original download location can not be enough
since the distributor has to provide the source to be compliant with the
GPL. So I as a distributor cannot rely on some repository that I cannot
control. The same applies to github, sourceforge or whatever. I think we
have either to provide a CD with the source or a download section on our
own website.
Post by Thomas De Schampheleire
* What about the toolchain?
I am not sure what the GPL requires concerning the build environment.
Post by Thomas De Schampheleire
In our system, the toolchain is prebuilt
with buildroot/crosstool-ng, and used as external toolchain. If we
distribute the toolchain as such in binary form, then it will also be
subjected to GPL obligations.
I do not think that the toolchain should be distributed in binary form.
At least this would introduce dependency from the build OS.

If some prebuild toolchain from the web (Code Sourcery, AVR, Xilinx or
what ever) is used an advice "Download the toolchain from..." in the
release notes should be enough. Distributing a toolchain from a foreign
source does not sound like a good idea to me unless we can provide a
working build environment for it.
Post by Thomas De Schampheleire
In that case, next to the set of sources
that make up the target embedded system, there is another set of
sources that are used to compile/link these sources. This means that
the gcc sources and the sources for various host tools that may be
used (like host-automake) should also be distributed, along with the
ways to build them.
What is the best practice? Provide the user with a unified .config
that builds the toolchain on-the-fly and then immediately uses it to
generate the embedded system?
That was the way buildroot did it before switching to crosstool-ng, right?
Post by Thomas De Schampheleire
Or provide two .configs, one to generate
the toolchain, and another one to generate the actual system with the
toolchain?
I think that should depend on how the whole system is built.

If the toolchain is built with crosstool-ng outside of buildroot with a
separate make command I would distribute it as a separate package
including all its source tarballs.

If we have a close integration from crosstool-ng in buildroot (sorry, I
did not follow that discussion because of lack of time) I would prefer
to distribute both as one package.
Post by Thomas De Schampheleire
* How to handle proprietary applications? Even though during
development these applications may be build from within buildroot
(when sources are available), one would typically not want to
distribute the sources to the end-user. Still, in order to be able to
regenerate the system, I think the user should have access to the
binary versions of these applications. How do we handle this, what is
the best practice?
This is a hot iron. My customer has to be able to build and redistribute
the GPL stuff. Of course he may not be allowed to distribute the
proprietary stuff, too. So I think we have to be able to build a
distribution package without any proprietary stuff.
Post by Thomas De Schampheleire
One solution is to place them in output/target directly, before
creating the buildroot tarball. Downside is that a 'make clean' would
remove these applications. Alternatively, one could use the customize
package for this purpose. This would require a separate .config file
for use by the end-user, but this may be ok and maybe needed for the
toolchain anyhow, depending on the output of the previous point.
I am not sure if the option to rebuild the embedded System (open and
closed spurce part) by the customer is required. I would even say, in
most cases he should not be able to. So I would prefer to have a kind of
"make distribution" that packs all the open source stuff into an ISO
image, a seperate directory or a tarball.

Consequence from this would be to be able to distinguish between open
source and proprietary parts of the system.

This also brings up the problem arising when one simply puts fines into
the target directory. I would not do this because I want to have a
system that can be rebuilt reliably after a "make clean". Following this
philosophy, all proprietary parts of the system have to reside in some
packages.
Post by Thomas De Schampheleire
* What about changes to buildroot itself? Since buildroot is GPL, any
distribution of buildroot comes with obligations as well. One of these
obligations is the requirement to clearly advertise changes to the GPL
software.
[quote from the GPLv2 license:]
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
[endquote]
I am not sure how this is usually handled. I do not think that this
information is usually distributed with the source code.

When I, as an example, distribute the tarball of a given Linux kernel,
the information which file has been modified when from whom is not
present. Some files carry some information about this, but the most do not.
Post by Thomas De Schampheleire
However, the way I see it, this is not the typical way of working.
The workflow in buildroot is that you submit patches to the list,
which can then be included. Although the patch itself contains the
name of the author and the e-mail header bears the date, the modified
files do not typically contain this information.
I do not think that this fulfils §2a, since it requires that the files
carry this information.

The fact that the git and email archives contain the information are
available online may not fulfil the cited paragraph because I cannot
guarantee that it will be available in the future.

As a consequence not one GPL program out there might be compliant to GPL
§2(a).
Post by Thomas De Schampheleire
Technically, the only solution I see is to add 'prominent notices' to
modified files in our own repository, but manually remove them when
submitting patches to the buildroot list. This is annoying but may be
the only legal possibility. How do others see this?
I think we should try to find out how other projects handle this or how
lawyers or GNU comment on this.

Of course one could distribute the whole git archive along with the GPL
software, but I think that would be too much and it does not dissolve
the above problems.
Post by Thomas De Schampheleire
Other discussion points are welcome.
I think it has been discussed before, but I'd like to come back to the
topic "license management". Since every package within biuldroot has its
license it should not be too complicated to add this information to the
metadata contained in xxx.mk. Having this, a "make license" could
produce a simple list of all included packages and their licenses. We
couls even include this information in the target system, if desired.
Packages without this information could print as "Package xxx: license
unknown". So we could include the license information when a package
gets updated or when someone needs this information for this package and
would not have to change all packages at once.

Kind regards

Stephan
Post by Thomas De Schampheleire
Thanks,
Thomas
_______________________________________________
buildroot mailing list
http://lists.busybox.net/mailman/listinfo/buildroot
--
reLinux - Stephan Hoffmann
Am Schmidtgrund 124 50765 Köln
Tel. +49.221.95595-19 Fax: -64
www.reLinux.de sho-/***@public.gmane.org
Luca Ceresoli
2011-12-19 21:08:37 UTC
Permalink
Hi Stephan,
Post by Stephan Hoffmann
Post by Thomas De Schampheleire
Technically, the only solution I see is to add 'prominent notices' to
modified files in our own repository, but manually remove them when
submitting patches to the buildroot list. This is annoying but may be
the only legal possibility. How do others see this?
I think we should try to find out how other projects handle this or how
lawyers or GNU comment on this.
Sounds like a good idea. I think the FSF provides free (as in beer)
consultancy to free (as in speech) software projects of some importance.
It might be worth trying, after we have focused on a few precise
questions.

Luca
Luca Ceresoli
2011-12-19 21:02:25 UTC
Permalink
Hi Thomas,
thank you for having started the discussion on this topic.
Post by Thomas De Schampheleire
Hi,
I would like to bring up the topic of complying with open-source
software licenses (among which GPL/LGPL) in embedded projects using
buildroot. In part to get answers, but also to determine what needs to
be done in buildroot to automate certain aspects of this compliancy.
The topic has been touched on Buildroot Developer Day, and the report
thereof.
...
Post by Thomas De Schampheleire
* There has already been some discussion on BDD and the report
regarding the inclusion of the .config file or not. In my opinion, the
.config file is necessary to recreate the whole system, and as such
should be part of the distribution. Some have expressed doubts as to
whether every company would be willing to share the configuration, as
it can share too much knowledge about the system. Examples as to what
information is too sensitive is welcome.
I don't think it is mandatory to allow the recreation of the whole
system, but I discuss this point in detail below.

Nevertheless, I think the .config (or a defconfig) should be
distributed as well, but for different reasons.
Some packages have menuconfig options to tweak the configuration flags
(e.g. BR2_PACKAGE_FFMPEG_ENCODERS), and as such I think they fall in the
category of "scripts used to control compilation".
Post by Thomas De Schampheleire
* What about the tarballs? Should the tarballs themselves be included
in the distribution, or would they be downloaded from the web by the
user running buildroot? I think it is safer to include the tarballs,
since you never know whether the official location will continue to
exist in the future (or be temporarily out-of-order, as with
kernel.org)
GPL allows the source to be distributed as "copy from a designated
place", but only when the object code is distributed in the same way.
But I cannot think of an embedded system made using Buildroot that is
shipped without any rootfs already on board...

So, unless there are counterexamples, I think distributing the tarballs
is the only option for BR.
Post by Thomas De Schampheleire
* What about the toolchain? In our system, the toolchain is prebuilt
with buildroot/crosstool-ng, and used as external toolchain. If we
distribute the toolchain as such in binary form, then it will also be
subjected to GPL obligations. In that case, next to the set of sources
that make up the target embedded system, there is another set of
sources that are used to compile/link these sources. This means that
the gcc sources and the sources for various host tools that may be
used (like host-automake) should also be distributed, along with the
ways to build them.
What is the best practice? Provide the user with a unified .config
that builds the toolchain on-the-fly and then immediately uses it to
generate the embedded system? Or provide two .configs, one to generate
the toolchain, and another one to generate the actual system with the
toolchain?
The choice of external or internal toolchain should be primarily based
on technical and practical engineering choices, among which the
simplicity of the GPL compliance procedures plays only a limited role.

The GPL simply states that these sources have to be provided, which
is feasible whichever kind on toolchain is used in Buildroot.
Post by Thomas De Schampheleire
* How to handle proprietary applications? Even though during
development these applications may be build from within buildroot
(when sources are available), one would typically not want to
distribute the sources to the end-user. Still, in order to be able to
regenerate the system, I think the user should have access to the
binary versions of these applications. How do we handle this, what is
the best practice?
One solution is to place them in output/target directly, before
creating the buildroot tarball. Downside is that a 'make clean' would
remove these applications. Alternatively, one could use the customize
package for this purpose. This would require a separate .config file
for use by the end-user, but this may be ok and maybe needed for the
toolchain anyhow, depending on the output of the previous point.
Is it really mandatory to make the end user able to build the entire
system?
Here's why I don't think so.

For programs and libraries, there is a clear relationship between the
"source code" and the "object code or executable form": the latter is
a binary form of the former, from which it is obtained through a
process that is automated by the toolchain and the build scripts.

OTOH, the product of Buildroot is a root filesystem, which is not
a binary form of BR's sources. Buildroot is what the GPLv2 defines "the
scripts used to control compilation and installation of the executable".
In fact, just like gcc or make, Buildroot itself is not present in the
final image (well, except for the skeleton files and a little more).

Each executable or library file in the rootfs is a binary form of
a package: /bin/busybox is a binary form of Busybox's sources,
/usr/bin/myapp is a binary form of my own (proprietary) application
source code.

So, Buildroot has to be distributed because it is required to build each
single executable and library whose sources are GPL-licensed, not
because one has to be able to build the entire root filesystem.

For example, if an embedded device contains a modified busybox and a
proprietary application, anybody who receives the device has the right
to obtain the modified busybox's sources and the tools+scripts
necessary to compile it (which in our case means toolchain + buildroot).
But I do not see any legal obligation to make him able to build the
entire rootfs.

But of course I am not a lawyer.

It would be good the hear the main BR developers' opinion about this
and, why not, to add a notice at the beginning of COPYING clarifying
what is the intention of Buildroot developers.
I think of something like the note on top of the COPYING file in the
Linux source tree.
Post by Thomas De Schampheleire
* What about changes to buildroot itself? Since buildroot is GPL, any
distribution of buildroot comes with obligations as well. One of these
obligations is the requirement to clearly advertise changes to the GPL
software.
[quote from the GPLv2 license:]
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
[endquote]
However, the way I see it, this is not the typical way of working.
The workflow in buildroot is that you submit patches to the list,
which can then be included. Although the patch itself contains the
name of the author and the e-mail header bears the date, the modified
files do not typically contain this information.
In my case, I make modifications to buildroot in our own repository. I
try to submit most of these changes to the list, but not all of them
are fit for mainstream, and submitted patches are not applied
immediately. So, when releasing the system, there will still be
unsubmitted changes. These changes do not comply with point 2a above,
since the files do not contain the required metadata.
Technically, the only solution I see is to add 'prominent notices' to
modified files in our own repository, but manually remove them when
submitting patches to the buildroot list. This is annoying but may be
the only legal possibility. How do others see this?
If've never really understood the rationale behind this GPL requirement,
although it might have had some use in the pre-VCS era.

For Buildroot recipe files in particular, many of which are very small,
these notices would sometimes take more space than the actual code.
This would quickly become unsustainable bloat.

I'm afraid I have no strong opinion about this point. I can only observe
that nobody seems to miss these prominent notes in the Buildroot
sources.


Luca
Mike Frysinger
2012-01-06 07:10:03 UTC
Permalink
Post by Thomas De Schampheleire
* What about the tarballs? Should the tarballs themselves be included
in the distribution, or would they be downloaded from the web by the
user running buildroot? I think it is safer to include the tarballs,
since you never know whether the official location will continue to
exist in the future (or be temporarily out-of-order, as with
kernel.org)
it would be simplest for people distributing binaries upon request, but if
they provide URLs and they're available, that should be satisfactory.
Post by Thomas De Schampheleire
* How to handle proprietary applications? Even though during
development these applications may be build from within buildroot
(when sources are available), one would typically not want to
distribute the sources to the end-user. Still, in order to be able to
regenerate the system, I think the user should have access to the
binary versions of these applications. How do we handle this, what isorg
the best practice?
there's no legal requirement that people distributing binaries make this easy.
Post by Thomas De Schampheleire
Other discussion points are welcome.
what might be cool is adding a target that produces a tarball of everything
that we expect would be required for license compliance. should be somewhat
easy to automate.
-mike
Michael S. Zick
2012-01-06 14:25:57 UTC
Permalink
Post by Mike Frysinger
Post by Thomas De Schampheleire
* What about the tarballs? Should the tarballs themselves be included
in the distribution, or would they be downloaded from the web by the
user running buildroot? I think it is safer to include the tarballs,
since you never know whether the official location will continue to
exist in the future (or be temporarily out-of-order, as with
kernel.org)
it would be simplest for people distributing binaries upon request, but if
they provide URLs and they're available, that should be satisfactory.
Post by Thomas De Schampheleire
* How to handle proprietary applications? Even though during
development these applications may be build from within buildroot
(when sources are available), one would typically not want to
distribute the sources to the end-user. Still, in order to be able to
regenerate the system, I think the user should have access to the
binary versions of these applications. How do we handle this, what isorg
the best practice?
there's no legal requirement that people distributing binaries make this easy.
I can't think of any that include the words: "practical' let alone "easy".
;-)
Post by Mike Frysinger
Post by Thomas De Schampheleire
Other discussion points are welcome.
what might be cool is adding a target that produces a tarball of everything
that we expect would be required for license compliance. should be somewhat
easy to automate.
I see this often in actual practice for the case of Media Player firmware.
These firmware packages are often a mix of open source and closed source.

The builders put a '.gnu' (or similar) tag file in each directory they want
included in their source reference tar-ball.
Some also write a manifest file listing open/closed status of each package.

Noticed only because at least some of these people doing the scripting do not
exclude the '.gnu' or '.gnulock' tag file from the tar-ball. ;-)

Mike
Post by Mike Frysinger
-mike
Continue reading on narkive:
Loading...