EionRobb / pidgin-opensteamworks

Steam plugin for Pidgin/libpurple
153 stars 5 forks source link

Improve Makefile, fix OS detection in steam_rsa.c, minor compiler fix #139

Closed hasufell closed 8 years ago

hasufell commented 8 years ago

wrt steam_rsa.c, also see http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system

so this should reliably work for BSDs and linuxes

EionRobb commented 8 years ago

Looks great, just needs the __unix__ detection changed back to be BSD detection. I probably should have put a comment on there, but the reason for the BSD check is to make sure that using OpenSSL will be GPL compliant (only BSD platforms have OpenSSL as part of the OS as per GPL requirements)

hasufell commented 8 years ago

only BSD platforms have OpenSSL as part of the OS as per GPL requirements

I don't think that is correct. Can you elaborate?

EionRobb commented 8 years ago

The OpenSSL licence is incompatible with GPL http://www.gnu.org/licenses/license-list.en.html#OpenSSL but the GPL allows linking to libraries that are part of the operating system http://www.gnu.org/licenses/gpl-faq.html#SystemLibraryException on BSD systems OpenSSL is part of the OS but on most Linux systems OpenSSL is not

hasufell commented 8 years ago

on BSD systems OpenSSL is part of the OS but on most Linux systems OpenSSL is not

I don't think that is accurate, no. On pretty much every Linux system you have OpenSSL as part of the OS. That includes bootstrapping stage tarballs and minimal install CDs. BSD is in no way special there. They ship the same OpenSSL and it is a regular package there too.

EionRobb commented 8 years ago

https://people.gnome.org/~markmc/openssl-and-the-gpl.html probably explains it better than I can. Short answer is that some distros, but not all, say that OpenSSL is part of the system while others say that if it is and any GPL code is also part of the system then they can't be linked together without an OpenSSL exclusion in the license. I can't provide that exclusion because the plugin must follow the licence of libpurple (GPLv2+)

If you can just put things back to being BSD-only for now that will simplify the whole legal argument.

hasufell commented 8 years ago

Short answer is that some distros, but not all, say that OpenSSL is part of the system while others say that if it is and any GPL code is also part of the system then they can't be linked together without an OpenSSL exclusion in the license.

I've been a distro developer for ~4 years and I can only repeat what I just said: for most linux distributions, OpenSSL is an inherent part of the operating system. There is no difference to BSD systems whatsoever and there is no such explanation in that link that BSD does things differently. They don't.

EionRobb commented 8 years ago

Have another read of the article, particularly of note "There is some disagreement about what this exception means when the both the GPL program and the GPL incompatible library are shipped as part of the operating system. The "unless that component itself accompanies the executable" clause suggests that the special exception does not cover this case and that it is a violation of the GPL" so if Pidgin and OpenSSL are shipped as part of the OS then Pidgin probably can't link against it without being a violation.

It really is a big legal grey area and is probably safest to not use OpenSSL at all. I'm only using it on the platforms that have already applied OpenSSL ssl patches to their Pidgin where it has (I would assume) been legally checked for compliance, which at this stage is only OSX (Adium) and *BSD.

Unfortunately at this stage, I won't be merging in any change that allows the use of OpenSSL on non-BSD systems.

hasufell commented 8 years ago

It really is a big legal grey area and is probably safest to not use OpenSSL at all. I'm only using it on the platforms that have already applied OpenSSL ssl patches to their Pidgin where it has (I would assume) been legally checked for compliance, which at this stage is only OSX (Adium) and *BSD.

I don't think FreeBSD has any patches for pidgin: https://svnweb.freebsd.org/ports/branches/2016Q1/net-im/pidgin/

What are you referring to?

EionRobb commented 8 years ago

Sure, I'll just fix it for you.

Thanks for the PR!

hasufell commented 8 years ago

Sure, I'll just fix it for you.

That wasn't an answer to my question.

Let's make a few things straight:

  1. *BSDs don't contain any special patches to pidgin or openssl itself that changes the licensing situation
  2. *BSDs ship OpenSSL in exactly the same way as probably 99% of all linux distributions
  3. I don't know of any linux distribution where OpenSSL is not part of the core system
  4. IANAL... if you think this is a problem (frankly, I think this is silly), you are not safe to assume the situation on *BSD is different, because it is not
  5. You are not linking against OpenSSL. It's the distro/user, if he actually chooses to do so. So you are not redistributing such a binary and the licensing term doesn't even apply.