Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

License #22

Closed
endian-albin opened this issue Mar 24, 2020 · 66 comments
Closed

License #22

endian-albin opened this issue Mar 24, 2020 · 66 comments

Comments

@endian-albin
Copy link

Could you please add a license to this project?

@JF002
Copy link
Collaborator

JF002 commented Apr 4, 2020

Do you have any to recommand?

@poVoq
Copy link

poVoq commented Apr 6, 2020

You could keep it MIT licensed like LittleVGL?

But personally I would just GPL it. Version 3 or later.

@schilpr
Copy link

schilpr commented Apr 6, 2020

MIT or Apache are the most flexible,

@bergzand
Copy link

bergzand commented Apr 6, 2020

See also https://choosealicense.com/, the appendix has a comparison: https://choosealicense.com/appendix/

@endian-albin
Copy link
Author

endian-albin commented Apr 7, 2020

How about Mozilla Public License 2.0? It's a weak copyleft license compatible with both Apache 2.0 and the GPL. It requires the recipient to provide source code to the files under this license but allows linking with code under other licenses so it's really flexible. Our new project PineTime Hypnos will switch to Mozilla Public License 2.0.

@Avamander
Copy link
Collaborator

MIT or Apache are the most flexible

@schilpr only for other developers wanting to incorporate this code into their own projects. It also doesn't obligate them to helping this project out.

@endian-albin
Copy link
Author

endian-albin commented Apr 8, 2020

@Avamander: the GPL doesn't force you to help out an upstream project, just look at all the various Android kernel forks. It does, however, require the offer of the complete source code to the recipient of the software.

Fruitful co-operation between developers doesn't follow automatically from the choice of license, although it's not unimportant.

@Avamander
Copy link
Collaborator

the GPL doesn't force you to help out an upstream project, just look at all the various Android kernel forks. It does, however, require the offer of the complete source code to the recipient of the software.

@endian-albin I consider just having the code out in the open helping, and it allows things like custom ROMs to be made.

@JF002
Copy link
Collaborator

JF002 commented Apr 12, 2020

I had an interesting discussion on the chat about licenses the other day. I'm still wondering if I should choose GPLv3 or LGPLv3...

@endian-albin
Copy link
Author

endian-albin commented Apr 13, 2020

If you want to let other projects to use some component without re-licensing their applications to the GPL, then choose LGPL. If you want to ensure that your work can never be linked with proprietary or GPL-incompatible code then choose the GPL. You could also license certain components as LGPL, e.g. the drivers, and put the firmware as a whole as GPLv3 (or any later version).

@JF002 JF002 mentioned this issue May 5, 2020
@incyi
Copy link
Contributor

incyi commented Jun 17, 2020

Still not decided ?

@JF002
Copy link
Collaborator

JF002 commented Jun 17, 2020

Mhm I put this on the side to think about it and kind of forgot about it.
But no, I'm still not decided. I don't want to make a bad choice. There're so many licenses, and so many terms and conditions...
Also, I have to choose a license that is compatible with NimBLE, FreeRTOS and LittleVGL as I use them in the project.

Ok, here is a summary of what I understand:

  • GPL guarantees that the code will only be used in open-source project, and that anyone who buys a device with the code will be able to access to the source code of its device
  • LPGL is like GPL but allows someone to use the code into a non-opensource project (still has to publish the modification to the LGPL code).
  • MIT and Apache allows to use the code anywhere and do not force to publish modification to the code.

These are the 3 main groups of licenses I found.

Personnaly, I think LPGL would be a good compromise, but what is your opinion? Which license do you think would be most benefical to the project?

@endian-albin
Copy link
Author

@JF002, are all the components in your project Free Software now, or do you have any non-free dependencies? How about the heart-rate sensor and accelerometer?

It's high time to decide on a license, don't you think? Both the LGPLv3+ and GPLv3+ ("or any later version") would be good choices in my opinion, but if you have zero non-free dependencies, then the conditions of the regular GPL would be more clear, especially for the end user.

@endian-albin
Copy link
Author

endian-albin commented Jul 13, 2020

I see that the project depends on the nRF5 SDK which is non-free. Most of the SDK is under the nRF5 Nordic license, which contains the following restrictions:

  1. This software, with or without modification, must only be used with a
    Nordic Semiconductor ASA integrated circuit.
  2. Any software provided in binary form under this license must not be reverse
    engineered, decompiled, modified and/or disassembled.

Both the LGPL and GPL require reverse engineering to be allowed so this is a problem. From the LGPL license text:

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications

The best would be to not depend on such non-free libraries at all I think. In the meantime, to release this as partly free under a license similar to the LGPL, you could use the Mozilla Public License 2.0 for your own source files however. This license requires that source code be provided to both modified and unmodified files, but allows redistribution alongside files that are proprietary or licensed differently. Another good thing about the MPL 2.0 is it that it can be upgraded to the LGPL, GPL or AGPL.

@Avamander
Copy link
Collaborator

@endian-albin

Both the LGPL and GPL require reverse engineering to be allowed so this is a problem.

It really isn't a problem. There's an exception for this in GPL: https://www.gnu.org/licenses/gpl-faq.html#SystemLibraryException

They can license it as totally regular GPL if they wish.

@endian-albin
Copy link
Author

endian-albin commented Jul 13, 2020

@Avamander, I'm not so sure about this. If it were only a question of providing the full corresponding source code, then maybe so, but the firmware image is distributed as a single binary, and if the Nordic license prohibits reverse-engineering, then I suppose all reverse-engineering of the binary is prohibited, and that makes it incompatible with (L)GPLv3. If there had been no Apache 2.0 components in JF's firmware, then the GPLv2+ license could have been used, but that's not the case. Therefore I still think the MPL 2.0 is the safest option in this situation. It's still a copyleft license.

From the GPLv3 license text:

The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work.

@endian-albin
Copy link
Author

endian-albin commented Jul 13, 2020

Well, another option would be to take the regular GNU GPLv3+ but make use of §7, "Additional Terms", where you add an exception and state that §3 "Protecting Users' Legal Rights From Anti-Circumvention Law." does not apply or something along those lines.

@Avamander
Copy link
Collaborator

Avamander commented Jul 13, 2020

@endian-albin

but the firmware image is distributed as a single binary, and if the Nordic license prohibits reverse-engineering, then I suppose all reverse-engineering of the binary is prohibited,
Well, another option would be to take the regular GNU GPLv3+ but make use of §7, "Additional Terms", where you state that §3 "Protecting Users' Legal Rights From Anti-Circumvention Law." does not apply.

Assuming that RE clause is incompatible won't make the rest of the license void, there's really no need for any exceptions. But if we assume the RE clause is compatible, it would apply only to reverse engineering the SDK. Both of those cases only apply if we assume the RE clause even applies to System Libraries, but as System Libraries aren't a part of Corresponding Application Code they don't fall under the application's GPL at all (I think). Plus Nordic has no history of being mean to FOSS.

And we can't forget that this all also depends on the jurisdiction of the person distributing the binary, just as an example, that no RE clause in the Nordic license is already mostly void in my country :S

In all the possible cases, I don't think that's a problem to be concerned about, IANAL though.

@endian-albin
Copy link
Author

Ok, you may be right about system libraries. If one wants to be even more certain, here is exception language by the FSF for combining with non-free libraries:

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. {Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work.}

@JF002
Copy link
Collaborator

JF002 commented Jul 13, 2020

@endian-albin @Avamander Thanks for waking this thread up! You're right, now is the time to choose the licence ! I'm still completely lost in all these tems, exceptions and compatibility across licenses!

The code uses

  • FreeRTOS (MIT)
  • Apache NIMBLE (Apache 2.0)
  • LVGL (MIT)
  • NRF SDK (non-free?)
  • Code, info and help from the whole pinetime community

I use the NRF SDK for low-level stuff (logging, startup code, clock driver, register definitions,...). I've already reimplemented the SPI and I2C driver as they were buggy/too slow.

About the accelerometer and the heart-rate sensor : they are not integrated for now in the firmware, BUT... they only way people managed to get them working is using binary libs and BLOBS (I don,t know how they got these libs and files).
It would be a shame if we couldn't add support for these devices because of license issues...

So, for now, we are talking about GPL, LGPL and MPL. What do you think?

@Avamander
Copy link
Collaborator

@JF002

I said this on TG as well. but I think you should focus on protecting your own code and the values you deem fit. Leaving the fundamentally incompatible binaries out of the equation. Basically the Android ROM and GApps (or Linux and proprietary drivers) model.

I personally would pick GPL, I don't think LGPL or MPL will make distribution any easier but will lose certain protections, but the choice is really yours.

@lupyuen
Copy link
Collaborator

lupyuen commented Jul 13, 2020

Shall we leave out the accelerometer and the heart-rate sensor for now? Maybe it could come from a future OTA download (assuming that we solve the licensing issue). Or it could be distributed via another repo that will have different licensing.

@endian-albin
Copy link
Author

endian-albin commented Jul 13, 2020

About the accelerometer and the heart-rate sensor : they are not integrated for now in the firmware, BUT... they only way people managed to get them working is using binary libs and BLOBS (I don,t know how they got these libs and files).

There is a discussion about getting the accelerometer to work using only Free Software so in this case I think blobs can be avoided.

It would be a shame if we couldn't add support for these devices because of license issues...

Personally, I don't like blobs and think that they don't belong in a project like this. I've removed the heart rate sensor completely from my own device for example.

Although the MPL would be more flexible and easier to apply perhaps, maybe it's still worth it to go for the GPL so as to encourage work on finding replacements to these blobs and non-free libraries that you mentioned? Maybe it would also encourage Pine64 to choose better components in the future...

Instead of leaving out incompatible licenses of the equation, I think it's more appropriate to add an additional permission on top of the GPL which says explicitly that the software may be combined with the Nordic SDK. It would deal with the reverse-engineering issue for the moment, and make it clear that you've made one exception but otherwise intend to keep everything fully free. To do this concretely, you could add the following notice at the top of each of your own source files as well as include the GPLv3 license in the source tree.

Copyright (C) [years] [name of copyright holder]

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, see https://www.gnu.org/licenses.

Additional permission under GNU GPL version 3 section 7

If you modify this Program, or any covered work, by linking or combining it with the nRF5 SDK (or a modified version of that library), containing parts covered by the terms of the nRF5 Nordic license or the nRF5 Garmin Canada license, the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of the nRF5 SDK used as well as that of the covered work.

If you are not using anything under the nRF5 Garmin Canada license, then remove it from the text. If you're using anything under the SoftDevice license, you should include it. Then add a notice somewhere in your README saying that contributors to the project must agree to license their contributions under these conditions. (The additional permissions may be removed by anyone who uses the GPL'd code for their own projects.)

This is my suggestion, but it's up to you of course, @JF002.

@Avamander
Copy link
Collaborator

@endian-albin

I think it's more appropriate to add an additional permission on top of the GPL which says explicitly that the software may be combined with the Nordic SDK

IMHO the SDK is fine anyways as a System Library and doesn't need special permission. It's how GPLv3 software can use Windows APIs/headers freely, there's no known issues. It's the sensor blobs of unknown origin ("(I don't know how they got these libs and files).") that are an another can of worms. No license or additional permission can help you against blobs that don't allow you (that you don't have the permission to use).

Corresponding Source for a non-source form of such a combination shall include the source code for the parts of the nRF5 SDK used as well as that of the covered work.

If parts of the SDK are binary, you can't ask for the source code. :S

, or (at your option) any later version.

There's no way to predict what the next possible version could bring, I would be wary of adding that part.

@endian-albin
Copy link
Author

@endian-albin

I think it's more appropriate to add an additional permission on top of the GPL which says explicitly that the software may be combined with the Nordic SDK

IMHO the SDK is fine anyways as a System Library and doesn't need special permission. It's how GPLv3 software can use Windows APIs/headers freely, there's no known issues. It's the sensor blobs of unknown origin ("(I don't know how they got these libs and files).") that are an another can of worms. No license or additional permission can help you against blobs that don't allow you (that you don't have the permission to use).

You may be right. It's not defined exactly what counts as a system library but I suppose that this does. If so, the added permission isn't necessary, I agree.

Corresponding Source for a non-source form of such a combination shall include the source code for the parts of the nRF5 SDK used as well as that of the covered work.

If parts of the SDK are binary, you can't ask for the source code. :S

But none of the SDK parts used by JF are binary, right?

, or (at your option) any later version.

There's no way to predict what the next possible version could bring, I would be wary of adding that part.

That's true, but it's considered good practice to add it. If you don't, then the license will stay as it is for all eternity. Legal problems in the future may require adjustments. Just look at the many improvements in GPLv3 over GPLv2.

@Avamander
Copy link
Collaborator

@endian-albin

But none of the SDK parts used by JF are binary, right?

Maybe not at the moment, but it would be a pain to monitor.

That's true, but it's considered good practice to add it. If you don't, then the license will stay as it is for all eternity. Legal problems in the future may require adjustments.

Absolutely correct, but it's hard to know if GPLv4 will be made taken account the same principles and values. It might be totally fine, but it might not be and the license staying the same is a feature.

Just look at the many improvements in GPLv3 over GPLv2.

Yeah.

@JF002
Copy link
Collaborator

JF002 commented Jul 14, 2020

Wow, that's a lot of info to process!

But none of the SDK parts used by JF are binary, right?

I've moved from the SoftDevice to NimBLE precisely for this reason. The softdevice and its bootloader are closed-source and provided as a binary file. I can't think of any other binary parts in the code right now.

About the heart rate sensor and accelerometer:

Although the MPL would be more flexible and easier to apply perhaps, maybe it's still worth it to go for the GPL so as to encourage work on finding replacements to these blobs and non-free libraries that you mentioned? Maybe it would also encourage Pine64 to choose better components in the future...

That's an interesting point of view! Maybe we can try to contact the manufacturer of the chip and ask them to open-source these blob? I don't know, who knows...
From what I understand, the lib for the HR sensor does the signal processing to convert raw values to heart rate values. I might be possible to design such algorithm by ourselves.
The BLOB for the accelerometer seems to be needed to enable advanced function like step counting and activity detection. I think they are done in HW. Without this blob, we'll need to implement them is SW...

I said this on TG as well. but I think you should focus on protecting your own code and the values you deem fit.

Mhm what are my values? I use a lot of open-source SW, and I want to give my contribution to the community. I want the open-source community to be able to read the code, use it, modify it and contribute to it.
Do I want proprietary software to use be able to use my code and make money out of it? I don't know. Is it a good thing? In all cases, I want them to contribute to the project if they modify the code.
And I would like to do my best and comply to the license of the components I integrate in the project.
Also, as some people have already contributed to the project, I want them to be able to give their opinion in this discussion :)
Are there any other questions I should ask myself in order to choose the best license?

@endian-albin
Copy link
Author

Although the MPL would be more flexible and easier to apply perhaps, maybe it's still worth it to go for the GPL so as to encourage work on finding replacements to these blobs and non-free libraries that you mentioned? Maybe it would also encourage Pine64 to choose better components in the future...

That's an interesting point of view! Maybe we can try to contact the manufacturer of the chip and ask them to open-source these blob? I don't know, who knows...

I already contacted Bosch in April about releasing the accelerometer. I'm still waiting for a response (ticket number 2020041593010742231).

From what I understand, the lib for the HR sensor does the signal processing to convert raw values to heart rate values. I might be possible to design such algorithm by ourselves.

Yep.

The BLOB for the accelerometer seems to be needed to enable advanced function like step counting and activity detection. I think they are done in HW. Without this blob, we'll need to implement them is SW...

I didn't know a blob was involved here. Do you have a reference?

I said this on TG as well. but I think you should focus on protecting your own code and the values you deem fit.

Mhm what are my values? I use a lot of open-source SW, and I want to give my contribution to the community. I want the open-source community to be able to read the code, use it, modify it and contribute to it.
Do I want proprietary software to use be able to use my code and make money out of it? I don't know. Is it a good thing? In all cases, I want them to contribute to the project if they modify the code.
And I would like to do my best and comply to the license of the components I integrate in the project.
Also, as some people have already contributed to the project, I want them to be able to give their opinion in this discussion :)
Are there any other questions I should ask myself in order to choose the best license?

I'm glad to hear that the community is the most important factor for you with this project. What's crucial from this point of view, is that you choose any free license (according to the FSF or Open source definition) so that code can be freely used and copied. It's very unfortunate to have source available but without any explicit rights to copy anything from it / using it in any other application, as it is right now, especially when you also encourage forks and accept contributions. Under what conditions can these contributions and forks be used? You'll need to ask every single contributor for releasing their code under a license or you might end up with creating a community around a non-free, "open source" project and that is certainly a dead-end.

@JF002
Copy link
Collaborator

JF002 commented Jul 21, 2020

I already contacted Bosch in April about releasing the accelerometer. I'm still waiting for a response (ticket number 2020041593010742231).

I was thinking about contacting them too, maybe with the help of Pine64 to give more weight to the request.

From what I understand, the lib for the HR sensor does the signal processing to convert raw values to heart rate values. I might be possible to design such algorithm by ourselves.

Yep.

We just need someone with HR signal processing knowledge to design this algo :)

I didn't know a blob was involved here. Do you have a reference?

A byte array must be send to the chip during the init sequence to enable advanced features like step counting. I have no idea what this byte array contains. The SDK calls it a "configuration file". Here is an example : https://github.com/sethitow/mbed-pinetime/blob/master/drivers/BMA42x_Accelerometer/bma421.c. Search for the variable 'bma421_config_file'.

I'm glad to hear that the community is the most important factor for you with this project. What's crucial from this point of view, is that you choose any free license (according to the FSF or Open source definition) so that code can be freely used and copied. It's very unfortunate to have source available but without any explicit rights to copy anything from it / using it in any other application, as it is right now, especially when you also encourage forks and accept contributions. Under what conditions can these contributions and forks be used? You'll need to ask every single contributor for releasing their code under a license or you might end up with creating a community around a non-free, "open source" project and that is certainly a dead-end.

Yes, it has always been my goal to release the code under an open source license. I haven't specified the license yet because I just don't know which one is the most appropriate.

The last propositions were:

  • GPL : is the best for the open-source community. Any modification to the code must be released in GPL too. And if another manufacturer of smartwatch uses the code, he/she must release the firmware and allow the user to replace the firmware with another one.
  • LGPL is a bit less restrictive and allows the use of the code in another project without needed to release this another project as GPL/LGPL.
  • MPL seems quite similar to LGPL.

As the community is one of the most important value of the project, what do you think if we choose the GPL license? Any downside to this choice?

@JF002
Copy link
Collaborator

JF002 commented Jul 26, 2020

Over the last few days, I read as much as possible about different open source licenses.

I don't think LGPL would be useful in this case, as it is primarily made for libraries that are dynamically linkable. This project is, for now, a monolithic executable, where everything must be compiled/linked into a single executable.

As I've said before, I want this project to be an open-source project available to the community, and I hope the community will contribute to the code. With this idea in mind, I find MIT/Apache a too permissive, allowing anyone to use, modify and improve the code without having to contribute to the project.

MPL is very flexible, and maybe a bit too much? How to handle license if some files are licenses as MPL, other ones as proprietary,...

In the end, I have the feeling that GPL is much closer to the what I' trying to achieve: the project is open source, and anyone is free to use it, improve it, modify it, as long as she/he contribute back to the community. This is a strong guarantee that the project is and will always be open source.

What do you think about this? Do you agree with this? Do you think of anything that could prove the GPL to be a bad idea?

NOTE : I'm sorry this choice takes so much time. I take it very seriously, and I want to make the best choice possible!

@endian-albin
Copy link
Author

Don’t forget to ask permission from all your contributors.

@JF002
Copy link
Collaborator

JF002 commented Jul 27, 2020

Thanks for the thumbs up! I'll keep this issue pending for a couple of days to let everyone interested give her/his opinion :)

@vilhelmgray
Copy link

I'm not sure how much this has been discussed already but I think it's worth mentioning since I don't see it in this thread already: https://en.wikipedia.org/wiki/License_proliferation

GPLv3 is incompatible with several popular open source licenses -- most notably the Apache License. I would highly recommend going with GPLv2 (without the "or later" wording) if you do settle on GPL because it's relatively more compatible than v3.

I also know it's controversial, but the tivozation clause in GPLv3 results in some deadly restrictions on what hardware this firmware can run on; this is one of the reasons Linus Torvalds is opposed to GPLv3: https://opensource.stackexchange.com/questions/7020/what-exactly-is-tivoization-and-why-did-linus-torvalds-not-like-it-in-gplv3

I can envision users in the future wanting to distribute Pinetime firmware loaded in a device with hardware security features; GPLv3 might cause a legal problem for those users, whereas if the code was licensed GPLv2 it would be fine. Since it looks like your concerns are more oriented towards ensuring that the source code remains free, I'd encourage the adoption of the GPLv2 license to avoid the hardware restrictions implied by the the GPLv3 license.

@Avamander
Copy link
Collaborator

I can envision users in the future wanting to distribute Pinetime firmware loaded in a device with hardware security features;

I see no good reasons not to let the user lock the device themselves. The anti-tivoization clause is exactly there to stop free code being made non-free via hardware locks.

@JF002
Copy link
Collaborator

JF002 commented Jul 29, 2020

@vilhelmgray That's an interesting comment! This project uses NimBLE BLE stack which is licensed under the Apache 2.0 license.

Do you mean that we cannot use NimBLE if we license the project under GPLv3?

After a quick search, I found this link : https://www.apache.org/licenses/GPL-compatibility.html.
It says that GPLv2/v3 can include Apache code, but not the other way around : you cannot integrate GPLv2/v3 into an Apache derivative work.

@Avamander
Copy link
Collaborator

Do you mean that we cannot use NimBLE if we license the project under GPLv3?

We can use Apache, but they can't use GPL.

@vilhelmgray
Copy link

I can envision users in the future wanting to distribute Pinetime firmware loaded in a device with hardware security features;

I see no good reasons not to let the user lock the device themselves. The anti-tivoization clause is exactly there to stop free code being made non-free via hardware locks.

If I understand the anti-tivoization clause correctly, it would mean that I couldn't distribute the firmware in a ROM component because it's physically incapable of being changed. This means any device I build would need functionality to allow a user to load their own version; this dictates the kind of hardware I must use which restricts my freedom to install and distribute the firmware on any hardware I want.

Although we only have one Pinetime hardware right now, the open-hardware movement means some one can design their own Pinetime-compatible device. I think they should have the freedom to build it with chips and components that they want to use. Fundamentally, it doesn't make sense for a software license to dictate what hardware a user must have.

@JF002
Copy link
Collaborator

JF002 commented Jul 29, 2020

this dictates the kind of hardware I must use which restricts my freedom to install and distribute the firmware on any hardware I want.

The code restricts the hardware it needs to work correctly. It contains code specific to the nrf52, initializes devices on spi and i²c bus,..
You can modify the code so that it works on another hardware, of course.

I'm not sure if the anti-tiviozation clause specifies how the firmware should be replaced/updated. If your hardware does not support ble and/or provide an external spi flash memory, maybe you can design the hardware so that it's possible to update the firmware using a serial port or an external debugger. Do you think that would be compatible with the anti-tiovization clause?

@Avamander
Copy link
Collaborator

If I understand the anti-tivoization clause correctly, it would mean that I couldn't distribute the firmware in a ROM component because it's physically incapable of being changed.

Pretty much, yes.

This means any device I build would need functionality to allow a user to load their own version;

A programming header or OTA functionality would suffice.

this dictates the kind of hardware I must use which restricts my freedom to install and distribute the firmware on any hardware I want.

In some ways, yes, but at the same time the clause would forbid devices that restrict user freedoms.

Fundamentally, it doesn't make sense for a software license to dictate what hardware a user must have.

Firmware rather often does however. I am also very sceptical that it actually limits your choices, what MCU would this code run on that only has ROM?

@vilhelmgray
Copy link

vilhelmgray commented Jul 29, 2020

This is just a hypothetical of course, but there are snippets of code that are useful for hardware that wouldn't necessarily need the entire source code of the original project. For example:

https://github.com/JF002/Pinetime/blob/b33ad9260026fce5d8d03080013eb96c3f7c3a3b/src/graphics.cpp#L103-L112

This is a pretty generic pixel draw routine that could work in a number of different applications that aren't related to Pinetime specifically. It would be useful for a hardware designer making some sort of cheap device to use non-expensive ROM components to embed a pixel draw routine that uses this code (with of course different implementations of the called functions).

With GPLv3, such a hardware design would not be allowed because those ROM components could not be changed. But using writable memory might drastically increase the cost of the device, or have other hardware implications. With GPLv2, the source code is still required to be offered, so users can still benefit from see and modify the code. With GPLv3, such a device and such modified code would not even exist.

My argument isn't that tivoization is a good thing (I don't necessarily agree that it is), but GPLv3 severely limits hardware designs that would otherwise not be a problem; with GPLv2 those users would still have access to the source code and could build their own hardware and come up with new code that could even be contributed back to Pinetime.

@endian-albin
Copy link
Author

@vilhelmgray That's an interesting comment! This project uses NimBLE BLE stack which is licensed under the Apache 2.0 license.

Do you mean that we cannot use NimBLE if we license the project under GPLv3?

After a quick search, I found this link : https://www.apache.org/licenses/GPL-compatibility.html.
It says that GPLv2/v3 can include Apache code, but not the other way around : you cannot integrate GPLv2/v3 into an Apache derivative work.

The FSF has this to say about the Apache 2.0 license:

This is a free software license, compatible with version 3 of the GNU GPL.
Please note that this license is not compatible with GPL version 2, because it has some requirements that are not in that GPL version. These include certain patent termination and indemnification provisions. (https://www.gnu.org/licenses/license-list.en.html#SoftwareLicenses).

In other words, since this project integrates Apache 2.0-licensed works, only GPLv3 (or later) is compatible; GPLv2 is incompatible.

@vilhelmgray
Copy link

The FSF has this to say about the Apache 2.0 license:

This is a free software license, compatible with version 3 of the GNU GPL.
Please note that this license is not compatible with GPL version 2, because it has some requirements that are not in that GPL version. These include certain patent termination and indemnification provisions. (https://www.gnu.org/licenses/license-list.en.html#SoftwareLicenses).

In other words, since this project integrates Apache 2.0-licensed works, only GPLv3 (or later) is compatible; GPLv2 is incompatible.

Ah, that's a fair point. GPLv2 wouldn't be allowed in this case is seems then.

@Avamander
Copy link
Collaborator

@vilhelmgray

but GPLv3 severely limits hardware designs that would otherwise not be a problem;

I kind-of get what you mean. There are theoretical scenarios where anti-tivoization hinders but right now those are kind-of very niche e.g. those projects using ROM MCUs and I frankly really doubt it's worth losing the tivoization and patent protection for.

@endian-albin
Copy link
Author

endian-albin commented Jul 29, 2020

I can envision users in the future wanting to distribute Pinetime firmware loaded in a device with hardware security features; GPLv3 might cause a legal problem for those users

Not at all. It would simply guarantee that the owner/user receives the keys to the lock, or instructions on how to set it up, along with the full corresponding source code. Let's say for example that the owner is not an individual but a company, and the company owns a bunch of hardware devices running GPLv3-licensed code intended for use by its employees. Then the user (i.e. the company) has every right to restrict what software can be installed. The anti-tivoization clause simply prevents the legitimate user from being exploited by en entity that gives it source code which can only be modified by the developer, not the user.

@endian-albin
Copy link
Author

endian-albin commented Jul 29, 2020

It would be useful for a hardware designer making some sort of cheap device to use non-expensive ROM components to embed a pixel draw routine that uses this code (with of course different implementations of the called functions). [...]

With GPLv3, such a hardware design would not be allowed because those ROM components could not be changed. But using writable memory might drastically increase the cost of the device, or have other hardware implications.

@vilhelmgray, you should actually read the license instead of spreading FUD. I quote directly from the GPLv3 license, section 6:

Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

Once again, the GPL protects the user from being exploited in a situation where the developer can push updates to a device but the user cannot. Where none of them can perform updates, anti-tivoization does not apply.

@vilhelmgray
Copy link

I was mistaken, it looks like ROM is not affected by this clause then.

@endian-albin
Copy link
Author

By the way, ATCWatch has now finally been released as Free Software, under the GNU GPLv3 or any later version. Another good reason to choose this license.

@Avamander
Copy link
Collaborator

But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM).

Huh, don't know how I've missed that. Thanks for informing me/us.

@JF002
Copy link
Collaborator

JF002 commented Jul 30, 2020

Thanks for all these details! So, we are still good to go with the GPLv3?

@vilhelmgray
Copy link

Yes, as endian-albin pointed out: GPLv3 is the only GPL that enables us to incorporate Apache 2.0-licensed works; that means GPLv2 is not an option.

@endian-albin
Copy link
Author

endian-albin commented Jul 30, 2020

Yes, but I see two related issues that should also be resolved:

  1. GPLv3-or-later or GPLv3-only? This should be specified in each source file.
  2. A policy regarding binary blobs?

My own answers to these questions:

  1. GPLv3 or any later version, because it's the variant recommended by the FSF and chosen by ATCWatch. Wasp-os also has the or-later suffix (although it's LGPL).
  2. I believe including a blob such as the accelerometer "config" directly would be possible only with exception language added to the GPL. Exceptions are not very nice I think, and they can be removed by a subsequent redistributor. It would also be a great stance to keep blobs out from a philosophical point of view. It might encourage reverse-engineering work and other innovative efforts working around them. Finally, if you really want to ship blobs you can always put them in ROM ;)

@vilhelmgray
Copy link

Keep in mind that there are developers that avoid projects with the "or later" language -- in some cases specifically because of how spiritually different GPLv3 was from GPLv2. The "or later" language is there to ensure compatibility with future GPL releases, which has been a problem in the past when trying to incorporate older code with newly licensed code.

Compatibility with a future GPL is a concern, so I recommend an alternative that should appease both developers opposed to the "or later" wording as well as developers that want to ensure compatibility with future GPL releases: create a Contributor License Agreement.

A contributor license agreement would be prudent regardless to resolve any future licensing issues. It's difficult to track down every single contributor -- and then on top of that have every single one of them agree to a change -- so a contributor license agreement would ensure that at least a change can be made with a reasonable majority of contributors agreeing to it. This should ensure that the code can be compatible with not only future GPL releases, but also any other license that might be desired.

@Avamander
Copy link
Collaborator

@vilhelmgray

Keep in mind that there are developers that avoid projects with the "or later" language -- in some cases specifically because of how spiritually different GPLv3 was from GPLv2. The "or later" language is there to ensure compatibility with future GPL releases, which has been a problem in the past when trying to incorporate older code with newly licensed code.

I concur. It's very hard to predict what GPLv4 might end up like. I however don't think CLAs are worth the burden, GPLv3 will probably be good for a good few decades, very likely far beyond what the project actually sees.

@endian-albin

A policy regarding binary blobs?

If the blob doesn't allow the project there's nothing that would allow the project to use the blob. Providing a way to OTA-push such blobs is very likely the only safe method of having compatibility. Same goes with alternative BT stacks, proprietary watchapps and so on.

@endian-albin
Copy link
Author

endian-albin commented Jul 30, 2020

@vilhelmgray, @Avamander

@vilhelmgray

Keep in mind that there are developers that avoid projects with the "or later" language -- in some cases specifically because of how spiritually different GPLv3 was from GPLv2. The "or later" language is there to ensure compatibility with future GPL releases, which has been a problem in the past when trying to incorporate older code with newly licensed code.

I concur. It's very hard to predict what GPLv4 might end up like. I however don't think CLAs are worth the burden, GPLv3 will probably be good for a good few decades, very likely far beyond what the project actually sees.

It's not certain that GPLv4 will be the next version, but GPLv3.1 that patches a loophole within some jurisdiction. Even constitutions for countries intended to stay invariant do receive changes over time. Choosing "GPLv3-only" means that you are betting that a license published in 2007 will be 100 % water proof in 200+ countries forever. I sure hope it will, and I personally don't want to see another version of the GPL if it's not necessary. If, however, the license is somehow, somewhere, deemed invalid or incompatible in some important way by a court, then it's pretty bad for every project that contains "-only" code, e.g. a successor project to this one.

Another thing to keep in mind: if a new version of the GPL is being drafted and some of the core contributors disagree with the proposed changes, then they can begin releasing their contributions under "GPLv3-only" and thus close the door to a potential license update. Doing it the other way around is far more difficult, i.e. to ask every single contributor to relicense their changes (adding -or-later).

The GPLv2-only and GPLv3-only are, as far as I know, unique in containing the risk of being frozen in time. Most other licenses are more permissive and can thus be incorporated in many different projects anyway (e.g. Apache 2.0 or BSD 3-Clause). The other major non-GNU copyleft licenses have "-or-later" built-in, namely: CC BY-SA, Eclipse Public License and the Mozilla Public License.

@endian-albin

A policy regarding binary blobs?

If the blob doesn't allow the project there's nothing that would allow the project to use the blob. Providing a way to OTA-push such blobs is very likely the only safe method of having compatibility. Same goes with alternative BT stacks, proprietary watchapps and so on.

Okay, that could be a way to do it. So it would be up to the user to fetch such blobs after receiving the device, like it's done in the Debian project. The blobs would then need to be placed in some other location and also not be derivative products of the GPL'd firmware (which is true for the HR sensor and the accelerometer blob). I believe this would be a sensible compromise. The inconvenience of having to fetch blobs yourself would encourage finding ways not to be dependent on them, but those who really want to can still get them.

@Avamander
Copy link
Collaborator

Avamander commented Jul 30, 2020

Choosing "GPLv3-only" means that you are betting that a license published in 2007 will be 100 % water proof in 200+ countries forever

Nah, not really forever and that's really not needed either.

but GPLv3.1 that patches a loophole within some jurisdiction.

One literally can't know. Plus, that loophole can also be fixed by licensing all new files under the improved version (if the patch isn't too massive), and also relicense as many other files as possible. I really really doubt it will become a problem during the lifetime of the project or even twice that.

The GPLv2-only and GPLv3-only are, as far as I know, unique in containing the risk of being frozen in time.

Nothing has really happened to GPLv2 either during all this time. Copyright law is rather "frozen" in time as well. I can't really see it as a bigger risk than an unknown future license could be.

@endian-albin
Copy link
Author

endian-albin commented Jul 30, 2020

One literally can't know. Plus, that loophole can also be fixed by licensing all new files under the improved version (if the patch isn't too massive), and also relicense as many other files as possible. I really really doubt it will become a problem during the lifetime of the project or even twice that.

Nobody knows -- there are some risks both ways. Personally, I think there are greater risks in making it hard to bump the license version than not, maybe especially for other projects that copy code from this.

I really really doubt it will become a problem during the lifetime of the project or even twice that.

But do you really fear then, within the lifetime of the project, the risk of a horrible new version of the GPL being published by the FSF rather than no new version or an improved one?

Nothing has really happened to GPLv2 either during all this time.

Yes, it has though, although nothing absolutely critical. If you've ever torrented a GNU/Linux image containing just the binaries (say DVD1 of Debian), then you've most likely violated the GNU GPLv2 (only), since you haven't also provided corresponding sources or a promise to give them, and thus lost the right to use all the software under GPLv2-only. You would now need to ask every single contributor of Linux to get back your rights to use, modify and copy Linux ever again. The GPLv3 has language to fix this issue, to explicitly allow for this type of redistribution and a more forgiving language with regard to violating the license, but for example the Linux kernel will never be able to integrate these improvements. Another related issue: the recipient of GPLv2 binaries can always request to receive the complete corresponding source code on a physical medium and you will be forced to give them like this. GPLv3 allows you to provide the sources over the Internet only. Other similar issues may show up for GPL version 3.0.

Instead of a CLA, there is the possibility of making use of a certain "proxy" feature of the license:

If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program.

Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version.

I still think the standard "or, at your option, any later version" is the way to go though.

@JF002
Copy link
Collaborator

JF002 commented Aug 1, 2020

GPLv3-or-later or GPLv3-only? This should be specified in each source file.

I prefer the GPLv3-or-later, as it is the variant recommended by the FSF, and because I think there are greater chances that no new version or an improved version of the license will be released than a bad one.

A policy regarding binary blobs?

As far as I know, we don't know the license of these blob and should not use them. I think many people will want the step counting, motion activation, HR measurements,... and we'll have to find a workaround (re-implement/retro-engineer the algo in soft, ask politely to the manufacturer to open their blobs,...).

So, are we OK with GPLv3+?

@JF002
Copy link
Collaborator

JF002 commented Aug 2, 2020

Thanks a lot to every one who helped me in this very difficult choice! This discussion was very interesting and I learnt a lot about open-source licences.

I can now finally close this issue after more than 4 months of debate :)

@JF002 JF002 closed this as completed Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants