Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Missing source code - GPL compliance? #107
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
mchristen
Apr 10, 2016
Bash.exe is different from the GNU bash command you are running inside of bash.exe.
Bash.exe looks to be a Win32 launcher for the real bash binary, that unfortunately shares the same name.
The source code for the bash program you are running above in the code sample is available here
mchristen
commented
Apr 10, 2016
|
Bash.exe is different from the GNU bash command you are running inside of bash.exe. Bash.exe looks to be a Win32 launcher for the real bash binary, that unfortunately shares the same name. The source code for the bash program you are running above in the code sample is available here |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
Running bash.exe --version shows as GPLv3 too.
C:\Users\VM>bash.exe --version
GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Even if it's not intentional, bash.exe claims it's under the GPL, so I expect it to be under the GPL.
|
Running
Even if it's not intentional, |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
mchristen
Apr 10, 2016
That really doesn't mean anything, bash.exe could be simply passing through command line arguments(like a sane launcher should do) to GNU bash.
The bash.exe binary is only 64K, whereas the GNU bash installed in /bin/bash is 998K. I think it is safe to say that bash.exe located in C:\Windows\system32 is not GNU bash.
mchristen
commented
Apr 10, 2016
|
That really doesn't mean anything, bash.exe could be simply passing through command line arguments(like a sane launcher should do) to GNU bash. The bash.exe binary is only 64K, whereas the GNU bash installed in /bin/bash is 998K. I think it is safe to say that bash.exe located in C:\Windows\system32 is not GNU bash. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
@mchristen Removing /bin/bash results in bash.exe outputting nothing. The only license I can see as a user with bash.exe is the GPL. Even if the launcher is 'accidentally' showing the wrong license, I'm not sure if that's a valid excuse?
|
@mchristen Removing |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
mhall119
Apr 10, 2016
bash.exe could be simply passing through command line arguments(like a sane launcher should do)
That may be sane in general, but it would be a good idea to at least catch --version and present accurate information about bash.exe itself.
mhall119
commented
Apr 10, 2016
That may be sane in general, but it would be a good idea to at least catch --version and present accurate information about bash.exe itself. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
Since removing /bin/bash results in bash.exe not functioning, I think it's fair to say that bash.exe depends is derived on /bin/bash? By the GPLv3 license, that means bash.exe must be under the GPL?
|
Since removing |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
mhall119
commented
Apr 10, 2016
|
Depends != Derived, only derived code is subject to the GPL |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
Running bash on a non-UNIX seems feels derived to me, not sure though.
|
Running bash on a non-UNIX seems feels derived to me, not sure though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
mchristen
Apr 10, 2016
That's my point though, you are running the real GNU bash, it is not derived in any shape or form.
Just because you happen to run a program called bash.exe that makes a Windows system call to execute the GNU bash binary(I'm guessing at how this actually works) does not mean that bash.exe is derived from GNU bash.
If MSFT were taking GNU bash, recompiling it for Win32 ala Cygwin, then yes, they would need to publish the source code for it, but as it stands all the source code for all the Linux binaries being executed are available directly from the upstream Ubuntu.
mchristen
commented
Apr 10, 2016
|
That's my point though, you are running the real GNU bash, it is not derived in any shape or form. Just because you happen to run a program called bash.exe that makes a Windows system call to execute the GNU bash binary(I'm guessing at how this actually works) does not mean that bash.exe is derived from GNU bash. If MSFT were taking GNU bash, recompiling it for Win32 ala Cygwin, then yes, they would need to publish the source code for it, but as it stands all the source code for all the Linux binaries being executed are available directly from the upstream Ubuntu. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
Putting the technical details aside, bash.exe --version does say it's under the GPLv3 license.
Even if that's a mistake, don't they have to comply with the license? It seems like a slippery slope for users to be expected to know that the vendor meant to use another license.
|
Putting the technical details aside, Even if that's a mistake, don't they have to comply with the license? It seems like a slippery slope for users to be expected to know that the vendor meant to use another license. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
dethoma
Apr 10, 2016
bash.exe is a simple wrapper that directly invokes the Canonical provided binaries. There is no GPL code in the bash.exe wrapper.
dethoma
commented
Apr 10, 2016
|
bash.exe is a simple wrapper that directly invokes the Canonical provided binaries. There is no GPL code in the bash.exe wrapper. |
dethoma
closed this
Apr 10, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment|
@dethoma So what is the license for |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
dethoma
commented
Apr 10, 2016
|
Standard license for Windows binaries. It is covered by the Windows EULA. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
@dethoma But when I run bash.exe --version, it doesn't give me the Windows EULA.
|
@dethoma But when I run |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
dethoma
commented
Apr 10, 2016
|
That is argument redirection in action as other users have noticed above. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
mchristen
Apr 10, 2016
Imagine this scenario, as a Linux user you create a shell script in your home directory and you name it 'bash'.
The source code is as follows,
#!/bin/sh
bash $@
If I publish my shell script am I also required to publish the source code of GNU bash?
mchristen
commented
Apr 10, 2016
|
Imagine this scenario, as a Linux user you create a shell script in your home directory and you name it 'bash'. The source code is as follows,
If I publish my shell script am I also required to publish the source code of GNU bash? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 10, 2016
Contributor
@mchristen You haven't modified GNU bash and the shell script is already in source code form. So in that example, you've already published the sources.
|
@mchristen You haven't modified GNU bash and the shell script is already in source code form. So in that example, you've already published the sources. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
bitcrazed
Apr 12, 2016
Collaborator
@Manouchehri. The Windows Subsystem for Linux (WSL) doesn't modify or derive any GPL code: It runs native, unmodified ELF binaries by loading them into a lightweight process created by the Windows Kernel, binding the ELF binary's imports to our syscall implementation and then executing as normal.
Bash.exe is a simple Windows app that binds a console (i.e. terminal) window to a process that loads and runs the native /bin/bash from the Ubuntu image you downloaded when you first enabled the WSL. Bash.exe performs no other significant actions, and, in fact, passes all command-line parameters, unmodified, to /bin/bash, which is why, when you run bash --help, you see the help text generated by /bin/bash:
C:\Users\richturn>bash --help
GNU bash, version 4.3.11(1)-release-(x86_64-pc-linux-gnu)
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--rcfile
--restricted
--verbose
--version
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
Type `/bin/bash -c "help set"' for more information about shell options.
Type `/bin/bash -c help' for more information about shell builtin commands.
Use the `bashbug' command to report bugs.
It was named Bash.exe as a convenience since, in end-user testing, most users expected bash to run when bash was entered into the command-line or start menu.
HTH.
|
@Manouchehri. The Windows Subsystem for Linux (WSL) doesn't modify or derive any GPL code: It runs native, unmodified ELF binaries by loading them into a lightweight process created by the Windows Kernel, binding the ELF binary's imports to our syscall implementation and then executing as normal.
It was named HTH. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment|
@bitcrazed Is it possible to use the WSL without |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
benhillis
Apr 14, 2016
Member
@Manouchehri currently bash.exe is the only publicly documented entrypoint. We are working on others. If you have ideas or opinions on the topic please share feedback on our user voice page: http://aka.ms/winbashuv
|
@Manouchehri currently bash.exe is the only publicly documented entrypoint. We are working on others. If you have ideas or opinions on the topic please share feedback on our user voice page: http://aka.ms/winbashuv |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
tkelman
Apr 15, 2016
Would it be feasible to have bash.exe released as open source on its own, even if the rest of WSL is still being decided upon?
tkelman
commented
Apr 15, 2016
|
Would it be feasible to have bash.exe released as open source on its own, even if the rest of WSL is still being decided upon? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment Hide comment
Manouchehri
Apr 15, 2016
Contributor
|
I've already taken a peak at the binary and it doesn't look too complex, so
I don't see why there would be a lot of objections to releasing it.
|
Manouchehri commentedApr 10, 2016
As far as I can tell,
bash.exeis under the GPLv3 license.I wasn't able to locate the source code; if the file(s) or link could be shared here that would be appreciated.