top of page
Search
pavelpestovzju

Code Snippets – Public domain source code repository with free and open access



One question was so interesting that I worked out a solution as program.While I would like to share it, I am not happy with the Creative Commons License.I have read the already existing posts and I find the legal problems as much toounspecified and problematic (When it is code, when a snippet, does other lawsapply to me etc. etc.)




Code Snippets – Public domain source code repository



As the idea of the Creative Commons is that content will be available on SO evenif the author later disagrees, I see no conflict with this goal because releasingall rights would automatically give SO the right to retain and modify the code.


So, is it possible to post this code under Public Domain ? Or use less restrictivelicenses in general ? I think (hopefully) that many people here would like to sharetheir code and snippets as Public Domain, too.


There's no problem at all with you posting your own code somewhere else and explicitly placing it into the public domain. Such dual licenses are quite common. There's no mechanism for licensing different bits as posted on the SE network, but if you distribute the code through your own channel, you may do it however you wish.


If you commercially distribute binaries not accompanied with sourcecode, the GPL says you must provide a written offer to distribute thesource code later. When users non-commercially redistribute thebinaries they received from you, they must pass along a copy of thiswritten offer. This means that people who did not get the binariesdirectly from you can still receive copies of the source code, along withthe written offer.


You can do that, if you can figure out which part is the public domainpart and separate it from the rest. If code was put in the publicdomain by its developer, it is in the public domain no matter where ithas been.


Yes, the GPL allows everyone to do this. The right to sell copies is part of thedefinition of free software. Except in one special situation, there isno limit on what price you can charge. (The one exception is therequired written offer to provide source code that must accompanybinary-only release.)


Yes. For instance, you can accept a contract to develop changes andagree not to release your changes until the client says ok.This is permitted because in this case no GPL-covered code isbeing distributed under an NDA.


You can also release your changes to the client under the GPL, butagree not to release them to anyone else unless the client says ok. Inthis case, too, no GPL-covered code is being distributed under an NDA,or under any additional restrictions.


Just putting a copy of the GNU GPL in a file in your repositorydoes not explicitly state that the code in the same repository may beused under the GNU GPL. Without such a statement, it's not entirelyclear that the permissions in the license really apply to anyparticular source file. An explicit statement saying that eliminatesall doubt.


A file containing just a license, without a statement that certainother files are covered by that license, resembles a file containingjust a subroutine which is never called from anywhere else. Theresemblance is not perfect: lawyers and courts might apply commonsense and conclude that you must have put the copy of the GNU GPLthere because you wanted to license the code that way. Or they mightnot. Why leave an uncertainty?


This statement should be in each source file. A clear statement inthe program's README file is legally sufficient as long as thataccompanies the code, but it is easy for them to get separated.Why take a risk of uncertainty aboutyour code's license?


You should put a notice at the start of each source file,stating what license it carries, in order to avoid risk of the code'sgetting disconnected from its license. If your repository's READMEsays that source file is under the GNU GPL, what happens if someonecopies that file to another program? That other context may not showwhat the file's license is. It may appear to have some other license,or no license atall (which would make the code nonfree).


GPLv3 is compatible with more licenses than GPLv2: it allows you to makecombinations with code that has specific kinds of additional requirementsthat are not in GPLv3 itself. Section 7 has more information about this,including the list of additional requirements that are permitted.


Both versions of the GPL have an exception to their copyleft, commonlycalled the system library exception. If the GPL-incompatible librariesyou want to use meet the criteria for a system library, then you don'thave to do anything special to use them; the requirement to distributesource code for the whole program does not include those libraries, evenif you distribute a linked executable containing them.


If you modify this Program, or any covered work, by linking or combiningit with [name of library] (or a modified version of thatlibrary), containing parts covered by the terms of [name of library'slicense], the licensors of this Program grant you additionalpermission to convey the resulting work. Corresponding Source for anon-source form of such a combination shall include the source code for theparts of [name of library] used as well as that of the coveredwork.


In addition, as a special exception, the copyright holders of [nameof your program] give you permission to combine [name of yourprogram] with free software programs or libraries that are releasedunder the GNU LGPL and with code included in the standard releaseof [name of library] under the [name of library'slicense] (or modified versions of such code, with unchanged license).You may copy and distribute such a system following the terms of the GNUGPL for [name of your program] and the licenses of the othercode concerned, provided that you include the source code of that othercode when and as the GNU GPL requires distribution of source code.


To release a nonfree program is always ethically tainted, butlegally there is no obstacle to your doing this. If you are the copyrightholder for the code, you can release it under various differentnon-exclusive licenses at various times.


The output of a program is not, in general, covered by the copyrighton the code of the program. So the license of the code of the programdoes not apply to the output, whether you pipe it into a file, make ascreenshot, screencast, or video.


But you can give additional permission for the use of your code. Youcan, if you wish, release your module under a license which is more laxthan the GPL but compatible with the GPL. Thelicense list page gives a partiallist of GPL-compatible licenses.


You may not distribute these libraries in compiled DLL form withthe program. To prevent unscrupulous distributors from trying to usethe System Library exception as a loophole, the GPL says thatlibraries can only qualify as System Libraries as long as they're notdistributed with the program itself. If you distribute the DLLs withthe program, they won't be eligible for this exception anymore; thenthe only way to comply with the GPL would be to provide their sourcecode, which you are unable to do.


If the main program and the plugins are a single combined program then this meansyou must license the plug-in under the GPL or a GPL-compatible freesoftware license and distribute it with source code in a GPL-compliantway. A main program that is separate from its plug-ins makes norequirements for the plug-ins.


Not exactly. It means you must release your program under a licensecompatible with the GPL (more precisely, compatible with one or more GPLversions accepted by all the rest of the code in the combination that youlink). The combination itself is then available under those GPLversions.


You can ask, but most authors will stand firm and say no.The idea of the GPL is that if you want to include our code in yourprogram, your program must also be free software. It is supposedto put pressure on you to release your program in a way that makesit part of our community.


As a special exception, the copyright holders of ABC giveyou permission to combine ABC program with free software programs orlibraries that are released under the GNU LGPL and with independentmodules that communicate with ABC solely through the ABCDEF interface.You may copy and distribute such a system following the terms of theGNU GPL for ABC and the licenses of the other code concerned, providedthat you include the source code of that other code when and as theGNU GPL requires distribution of source code and provided that you do not modify the ABCDEF interface.


Of course, if all the contributors put their code in the publicdomain, there is no copyright with which to enforce the GPL. So weencourage people to assign copyright on large code contributions, andonly put small changes in the public domain.


You are allowed to sell copies of the modified program commercially,but only under the terms of the GNU GPL. Thus, for instance, you mustmake the source code available to the users of the program asdescribed in the GPL, and they must be allowed to redistribute andmodify it as described in the GPL.


Yes. Y was required to release its version under the GNU GPL, as aconsequence of basing it on X's version V1. Nothing required Y toagree to any other license for its code. Therefore, X must get Y'spermission before releasing that code under another license.


There are two reasons for this.First, a general one. If we permitted company A to make a proprietaryfile, and company B to distribute GPL-covered software linked withthat file, the effect would be to make a hole in the GPL big enough todrive a truck through. This would be carte blanche for withholdingthe source code for all sorts of modifications and extensions toGPL-covered software.


Yes. The general rule is, if you distribute binaries, you must distributethe complete corresponding source code too. The exception for the casewhere you received a written offer for source code is quite limited.


Yes. Section 6(d) allows this. However, you must provideclear instructions people can follow to obtain the source, and youmust take care to make sure that the source remains available foras long as you distribute the object code. 2ff7e9595c


1 view0 comments

Recent Posts

See All

Comments


bottom of page