-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
sys/queue.h:remove CONFIG_ALLOW_MIT_COMPONENTS #8326
Conversation
@anjiahao1 if BSD or MIT licenses are enabled by default and some BSD or MIT code are included in the final binary we need some way alert the user and ask him to confirm (pressing Y/N question) with this decision. |
@acassis If so, for this simple code: |
@xiaoxiang781216 maybe an better option is to contact the original author of this code and ask if he agrees to re-license it under Apache. Or, you can do just like Samsung did with NuttX some years ago: add Apache license in the head and keep the BSD license and its author under it. |
What's the difference if we keep the original BSD license and author without and Apache llicense? |
Other thing I'm thinking now: to use the "tainted kernel" flag like in the Linux kernel. In their case they want all code been GPL without proprietary license. In your case we want all code Apache, so when some code that is BSD/MIT/Other is enabled this flag will change. Then in the final binary we can identify if this flag is enabled and alert the user. |
I'm not a lawyer, but when I contacted Samsung many years ago they told me their legal department explained to them this was the right way to do. i.e.: https://github.com/Samsung/TizenRT/blob/master/os/fs/smartfs/smartfs_smart.c |
If so, how about remove CONFIG_ALLOW_BSD_COMPONENTS from the well documented algo(e.g. list, hash...) and pretend Apache copyright before BSD copyright? All these algo exist in the public domain for many years and implement in all OS, I don't believe anyone will raise IP issue for them. |
Ok, if you are sure it is Public Domain then you can go ahead and remove this #ifdef. BTW, seems like it was @anjiahao himself that included this code (at least according to git blame) |
The code base comes from FreeBSD, I think it's enough to keep the original copyright/owner and record it in LISENCSE since the code just contain the well-known algorithm, no any special/unusual code.
It's added during the review(#6828 (review)), but we found that it's too annoy to condition the frequent used feature. |
Yes, I think it is better to remove the #ifdef CONFIG_ALLOW_BSD_COMPONENTS from that file than making ALLOW_BSD_COMPONENTS =y default. If you really want to make ALLOW_BSD_COMPONENTS=y default, please include some tainted kernel logic to warn the user at the end of compilation that the generated nuttx.bin is using BSD code that are not protected by Apache license. |
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@acassis done. |
Summary
Remove CONFIG_BSD_COMPONENTS from header file sys/queue.h
Impact
use sys/queue.h
Testing
Vela