11

I tried to answer a question related to the open source Apache Portable Runtime Project.

I found the answer to the question in the sources (in this case, the test cases) of the project. The project is under a APL 2.0.

Since the OP uses the project, the license is probably OK for them but the license isn't compatible with CC-Wiki (SO's license).

An answer to this question says:

The cc license cannot, and does not, override the terms of an existing license.

So the code fragment is still under APL even though I posted it here. So I added the link to the license plus the license header.

Questions:

  1. Is it generally OK/correct/legal to post code from OSS projects on SO?
  2. Are there OSS licenses which specifically forbid sharing via SO?
  3. ... or which can cause other unintentional trouble (like posting GPL code here would make SO GPL'd or something)?
  4. Is my way of posting correct / too much (maybe the license is enough and I could omit the license header) / not enough?
7
  • 12
    This is why I hate lawyers
    – Zelda
    Commented May 8, 2012 at 15:42
  • Seems silly they would put a license on their test code...
    – user7116
    Commented May 8, 2012 at 15:57
  • The license is for all the code in the project. And why would they select a different license for tests? Commented May 8, 2012 at 16:21
  • @AaronDigulla: because there is no reason to license tests or samples.
    – user7116
    Commented May 8, 2012 at 16:27
  • 1
    @sixlettervariables: Are you sure? Did you ask a lawyer? ;-) Commented May 8, 2012 at 16:29
  • @AaronDigulla: I work for a company which would consider variable names to be proprietary information.
    – user7116
    Commented May 8, 2012 at 16:34
  • You sure you are allowed around here? Or is a security detail already on its way to "handle" you ;-) Commented May 8, 2012 at 16:35

1 Answer 1

11

If you're going to post the whole source which is under a given license, then yes you should ensure that the license is well known to any viewer of the answer. This is not incompatible with the CC-Wiki license.

If you're going to post a snippet or small section--keep in mind I am not a lawyer--then I would believe you are covered under fair use. Furthermore, you should attribute the source the snippet so as to not violate the spirit of either of the licenses.

However, you probably should not be posting the entire source in an answer (unless it is trivial). Enough of a sample to get the questioner going in the right direction is fine and preferred over copy-pasting an entire file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .