Missing source code - GPL compliance? #107

Closed
Manouchehri opened this Issue Apr 10, 2016 · 22 comments

Comments

Projects
None yet
7 participants
Contributor

Manouchehri commented Apr 10, 2016

As far as I can tell, bash.exe is under the GPLv3 license.

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.
root@localhost:~# bash --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.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

I wasn't able to locate the source code; if the file(s) or link could be shared here that would be appreciated.

This comment has been minimized.

Show comment Hide comment
@mchristen

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

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

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.

Contributor

Manouchehri commented Apr 10, 2016

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.

This comment has been minimized.

Show comment Hide comment
@mchristen

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.

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

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?

Contributor

Manouchehri commented Apr 10, 2016

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

This comment has been minimized.

Show comment Hide comment
@mhall119

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.

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.

This comment has been minimized.

Show comment Hide comment
@Manouchehri

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?

Contributor

Manouchehri commented Apr 10, 2016

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?

This comment has been minimized.

Show comment Hide comment
@mhall119

mhall119 Apr 10, 2016

Depends != Derived, only derived code is subject to the GPL

Depends != Derived, only derived code is subject to the GPL

This comment has been minimized.

Show comment Hide comment
@Manouchehri

Manouchehri Apr 10, 2016

Contributor

Running bash on a non-UNIX seems feels derived to me, not sure though.

Contributor

Manouchehri commented Apr 10, 2016

Running bash on a non-UNIX seems feels derived to me, not sure though.

This comment has been minimized.

Show comment Hide comment
@mchristen

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.

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

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.

Contributor

Manouchehri commented Apr 10, 2016

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.

This comment has been minimized.

Show comment Hide comment
@dethoma

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 dethoma closed this Apr 10, 2016

This comment has been minimized.

Show comment Hide comment
@Manouchehri

Manouchehri Apr 10, 2016

Contributor

@dethoma So what is the license for bash.exe?

Contributor

Manouchehri commented Apr 10, 2016

@dethoma So what is the license for bash.exe?

This comment has been minimized.

Show comment Hide comment
@dethoma

dethoma Apr 10, 2016

Standard license for Windows binaries. It is covered by the Windows EULA.

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

Manouchehri Apr 10, 2016

Contributor

@dethoma But when I run bash.exe --version, it doesn't give me the Windows EULA.

Contributor

Manouchehri commented Apr 10, 2016

@dethoma But when I run bash.exe --version, it doesn't give me the Windows EULA.

This comment has been minimized.

Show comment Hide comment
@dethoma

dethoma Apr 10, 2016

That is argument redirection in action as other users have noticed above.

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

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?

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?

This comment has been minimized.

Show comment Hide comment
@Manouchehri

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.

Contributor

Manouchehri commented Apr 10, 2016

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

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.

Collaborator

bitcrazed commented Apr 12, 2016

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

This comment has been minimized.

Show comment Hide comment
@Manouchehri

Manouchehri Apr 14, 2016

Contributor

@bitcrazed Is it possible to use the WSL without bash.exe?

Contributor

Manouchehri commented Apr 14, 2016

@bitcrazed Is it possible to use the WSL without bash.exe?

This comment has been minimized.

Show comment Hide comment
@benhillis

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

Member

benhillis commented Apr 14, 2016

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

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

Manouchehri Apr 15, 2016

Contributor
Contributor

Manouchehri commented Apr 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment