Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Bertrand Delacretaz
Hi,

On Thu, Sep 21, 2017 at 12:34 PM, Neil C Smith
 wrote:
> ...Take
>
> https://github.com/apache/incubator-netbeans/blob/master/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/instantiatingIterator.javx

Ok - IIUC that's a template that NetBeans uses at runtime to generate Java code?

> ...This didn't used to have a license header at all prior to the donation I
> believe?...

If that file is going to be included in the NetBeans release, it needs
a license header indeed.

> ...I assume from the way that
> the license has been added to the template it's effectively a comment, and
> so the output of the template process is still a file with no license,
> which is as it should be in my opinion...

If the template process is run by a NetBeans user then I agree, the
generated file doesn't need a license header. I suppose such generated
files are mostly boilerplate anyway and do not contain rocket science
algorithms that might need to be appropriately licensed.

> ...I'm wondering at what point, if at
> all, the code generated by a template in this way becomes determined as
> needing to carry the Apache license?...

It's only files which are included in the NetBeans release which need
an Apache license header.

Does this clarify things?

-Bertrand


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Neil C Smith
On Thu, Sep 21, 2017 at 10:26 AM Bertrand Delacretaz 
wrote:

> On Thu, Sep 21, 2017 at 11:16 AM, Neil C Smith
>  wrote:
> > ...I assume we wouldn't want the output of
> > them to be under any kind of license?...
>
> As a podling, NetBeans releases are approved by the Incubator PMC, and
> I doubt they would approve a release containing files with no license.
>
>
Not quite what I had in mind, though.  Take

https://github.com/apache/incubator-netbeans/blob/master/apisupport.wizards/src/org/netbeans/modules/apisupport/project/ui/wizard/wizard/instantiatingIterator.javx

This didn't used to have a license header at all prior to the donation I
believe?  So, the file itself has a license, but I assume from the way that
the license has been added to the template it's effectively a comment, and
so the output of the template process is still a file with no license,
which is as it should be in my opinion.  I'm wondering at what point, if at
all, the code generated by a template in this way becomes determined as
needing to carry the Apache license?

Best wishes,

Neil
-- 
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Jan Lahoda
If in NetBeans IDE the user does New/Java Class, then (I think) this
template will be instantiated:
https://git-wip-us.apache.org/repos/asf?p=incubator-netbeans.git;a=blob;f=java.project.ui/src/org/netbeans/modules/java/project/ui/resources/Class.java.template;h=e9890cf1ebbfa872259a65b4259e10fd05053a79;hb=HEAD

So, there may be two separate questions:
a) what is the license of the template (for which I don't personally see a
problem be the Apache License)
b) what is the license of the file created from the template (where I
suspect it would be a problem if the license would had to be the Apache
license, regardless of the target project)

Of course, this is not the only template NB has, and not the only way to
generate code for the user in the IDE. But the main question to me is what
is the license of the code the IDE generates for the user.

Jan


On Thu, Sep 21, 2017 at 11:26 AM, Bertrand Delacretaz <
bdelacre...@apache.org> wrote:

> On Thu, Sep 21, 2017 at 11:16 AM, Neil C Smith
>  wrote:
> > ...I assume we wouldn't want the output of
> > them to be under any kind of license?...
>
> As a podling, NetBeans releases are approved by the Incubator PMC, and
> I doubt they would approve a release containing files with no license.
>
> See "Source File Headers for Code Developed at the ASF" at
> https://www.apache.org/legal/src-headers.html for details.
>
> If someone want to discuss other options best is to do so on the
> general@incubator.a.o list, as they're the ones who would approve or
> reject such variants. We can discuss as much as we want here but
> things which are outside ASF policy (which as explained is meant to
> simplify things at the Foundation level as well as for our users)
> won't fly.
>
> -Bertrand
>


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Neil C Smith
Hi,

On Thu, Sep 21, 2017 at 9:58 AM Bertrand Delacretaz 
wrote:

> On Thu, Sep 21, 2017 at 9:38 AM, Emilian Bold 
> wrote:
> > ...But it's a bit silly no? Any new project based on an Apache sample
> would have to post a notice about the Apache
> > license and include a copy of the license
>
> So we do require some consistency to make things easier. The Apache
> License is one of those invariants.
>
> Also, if our sample code turns into the next Google, we want to be
> credited for that - it's the only thing we'd get ;-)
>
>
Kind of understand both points of view there, but veering more to Emi's on
this particular point.  My concern would be more about how we handle code
generated by wizards, templates, etc.  The example projects are one end of
the scale there, but there are other project and file templates that
generate quite a lot of code, and I assume we wouldn't want the output of
them to be under any kind of license?!  Just wondering where the line gets
drawn here?

Best wishes,

Neil
-- 
Neil C Smith
Artist & Technologist
www.neilcsmith.net

Praxis LIVE - hybrid visual IDE for creative coding - www.praxislive.org


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Bertrand Delacretaz
On Thu, Sep 21, 2017 at 9:38 AM, Emilian Bold  wrote:

> Pe 21 sept. 2017, la 09:51, Bertrand Delacretaz  a 
> scris:
>> ...Code produced by the ASF must use the Apache License, so that's not an
>> option here...
> ...But it's a bit silly no? Any new project based on an Apache sample would 
> have to post a notice about the Apache
> license and include a copy of the license

To keep things simple, the ASF is often reluctant to handle special
cases - you probably know that foundation has to oversee about 300
projects on a relatively small budget [1] - currently less than $5K
per project per year.

So we do require some consistency to make things easier. The Apache
License is one of those invariants.

Also, if our sample code turns into the next Google, we want to be
credited for that - it's the only thing we'd get ;-)

-Bertrand

[1] 
https://www.apache.org/foundation/records/minutes/2017/board_minutes_2017_04_19.txt
- "Approve the 2018 FY ASF Budget"


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Emilian Bold
But it's a bit silly no? Any new project based on an Apache sample would have 
to post a notice about the Apache license and include a copy of the license.

--emi

Pe 21 sept. 2017, la 09:51, Bertrand Delacretaz  a 
scris:

> Hi,
> 
>> On Wed, Sep 20, 2017 at 10:07 PM, Emilian Bold  
>> wrote:
>> ...My concern was that sample code should not trigger any licensing
>> thoughts. In that light Apache or BSD doesn't matter.
>> Since it's designed to be used as a starting point it should be Public 
>> Domain...
> 
> Code produced by the ASF must use the Apache License, so that's not an
> option here.
> 
> -Bertrand


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-21 Thread Bertrand Delacretaz
Hi,

On Wed, Sep 20, 2017 at 10:07 PM, Emilian Bold  wrote:
> ...My concern was that sample code should not trigger any licensing
> thoughts. In that light Apache or BSD doesn't matter.
> Since it's designed to be used as a starting point it should be Public 
> Domain...

Code produced by the ASF must use the Apache License, so that's not an
option here.

-Bertrand


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-20 Thread Geertjan Wielenga
Thanks, it was a small fun clean up task.

Gj

On Wed, Sep 20, 2017 at 4:07 PM, Emilian Bold 
wrote:

> Well, that was very effective!
>
> My concern was that sample code should not trigger any licensing
> thoughts. In that light Apache or BSD doesn't matter.
>
> Since it's designed to be used as a starting point it should be Public
> Domain.
>
> Of course, everybody treats sample code as Public Domain, but that's
> another matter.
>
>
> --emi
>
>
> On Wed, Sep 20, 2017 at 10:58 PM, Geertjan Wielenga
>  wrote:
> > OK, done, including references in various supporting files, and did a
> build
> > and run to check everything still works and resolved the issue:
> >
> > https://issues.apache.org/jira/browse/NETBEANS-62
> >
> > Gj
> >
> > On Wed, Sep 20, 2017 at 2:02 PM, Geertjan Wielenga <
> > geertjan.wiele...@googlemail.com> wrote:
> >
> >> Those specific files, i.e., the samples relating to the NetBeans
> Platform
> >> (FeedReader, PaintApp, OSGIDemo and maybe another one or two) should
> simply
> >> be deleted, they're old and out of date and it would simplify things
> simply
> >> not having them.
> >>
> >> https://issues.apache.org/jira/browse/NETBEANS-62
> >>
> >> I'm planning to delete them today.
> >>
> >> Gj
> >>
> >> On Tue, Sep 19, 2017 at 9:27 AM, Bertrand Delacretaz <
> >> bdelacre...@apache.org> wrote:
> >>
> >>> Hi,
> >>>
> >>> On Tue, Sep 19, 2017 at 9:58 AM, Emilian Bold 
> >>> wrote:
> >>> >> ...some files in the repository (typically samples) are using
> 3-clause
> >>> (if I get that correctly) BSD license...
> >>>
> >>> If those files have been donated to Apache they can be relicensed, and
> >>> IMO they should, in order to simplify things.
> >>>
> >>> -Bertrand
> >>>
> >>
> >>
>


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-20 Thread Emilian Bold
Well, that was very effective!

My concern was that sample code should not trigger any licensing
thoughts. In that light Apache or BSD doesn't matter.

Since it's designed to be used as a starting point it should be Public Domain.

Of course, everybody treats sample code as Public Domain, but that's
another matter.


--emi


On Wed, Sep 20, 2017 at 10:58 PM, Geertjan Wielenga
 wrote:
> OK, done, including references in various supporting files, and did a build
> and run to check everything still works and resolved the issue:
>
> https://issues.apache.org/jira/browse/NETBEANS-62
>
> Gj
>
> On Wed, Sep 20, 2017 at 2:02 PM, Geertjan Wielenga <
> geertjan.wiele...@googlemail.com> wrote:
>
>> Those specific files, i.e., the samples relating to the NetBeans Platform
>> (FeedReader, PaintApp, OSGIDemo and maybe another one or two) should simply
>> be deleted, they're old and out of date and it would simplify things simply
>> not having them.
>>
>> https://issues.apache.org/jira/browse/NETBEANS-62
>>
>> I'm planning to delete them today.
>>
>> Gj
>>
>> On Tue, Sep 19, 2017 at 9:27 AM, Bertrand Delacretaz <
>> bdelacre...@apache.org> wrote:
>>
>>> Hi,
>>>
>>> On Tue, Sep 19, 2017 at 9:58 AM, Emilian Bold 
>>> wrote:
>>> >> ...some files in the repository (typically samples) are using 3-clause
>>> (if I get that correctly) BSD license...
>>>
>>> If those files have been donated to Apache they can be relicensed, and
>>> IMO they should, in order to simplify things.
>>>
>>> -Bertrand
>>>
>>
>>


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-20 Thread Geertjan Wielenga
OK, done, including references in various supporting files, and did a build
and run to check everything still works and resolved the issue:

https://issues.apache.org/jira/browse/NETBEANS-62

Gj

On Wed, Sep 20, 2017 at 2:02 PM, Geertjan Wielenga <
geertjan.wiele...@googlemail.com> wrote:

> Those specific files, i.e., the samples relating to the NetBeans Platform
> (FeedReader, PaintApp, OSGIDemo and maybe another one or two) should simply
> be deleted, they're old and out of date and it would simplify things simply
> not having them.
>
> https://issues.apache.org/jira/browse/NETBEANS-62
>
> I'm planning to delete them today.
>
> Gj
>
> On Tue, Sep 19, 2017 at 9:27 AM, Bertrand Delacretaz <
> bdelacre...@apache.org> wrote:
>
>> Hi,
>>
>> On Tue, Sep 19, 2017 at 9:58 AM, Emilian Bold 
>> wrote:
>> >> ...some files in the repository (typically samples) are using 3-clause
>> (if I get that correctly) BSD license...
>>
>> If those files have been donated to Apache they can be relicensed, and
>> IMO they should, in order to simplify things.
>>
>> -Bertrand
>>
>
>


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-20 Thread Geertjan Wielenga
Those specific files, i.e., the samples relating to the NetBeans Platform
(FeedReader, PaintApp, OSGIDemo and maybe another one or two) should simply
be deleted, they're old and out of date and it would simplify things simply
not having them.

https://issues.apache.org/jira/browse/NETBEANS-62

I'm planning to delete them today.

Gj

On Tue, Sep 19, 2017 at 9:27 AM, Bertrand Delacretaz  wrote:

> Hi,
>
> On Tue, Sep 19, 2017 at 9:58 AM, Emilian Bold 
> wrote:
> >> ...some files in the repository (typically samples) are using 3-clause
> (if I get that correctly) BSD license...
>
> If those files have been donated to Apache they can be relicensed, and
> IMO they should, in order to simplify things.
>
> -Bertrand
>


Re: Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-19 Thread Bertrand Delacretaz
Hi,

On Tue, Sep 19, 2017 at 9:58 AM, Emilian Bold  wrote:
>> ...some files in the repository (typically samples) are using 3-clause (if I 
>> get that correctly) BSD license...

If those files have been donated to Apache they can be relicensed, and
IMO they should, in order to simplify things.

-Bertrand


Sample code license [WAS: Re: NetBeans has landed in Apache Git]

2017-09-19 Thread Emilian Bold
> As a side note, some files in the repository (typically samples) are using 
> 3-clause (if I get that correctly) BSD license

Last time this was a talking point you couldn't tweak the installer
without changing the source code that was under the standard CDDL +
GPL w/ CPE license. So each custom installer was a derivative work.

Using BSD for samples and such was a very good change.

I'm not really sure if Apache is OK with BSD samples.

Then again, not sure if the Apache license would be a blocking point
anymore as it's much more commercial friendly.

--emi


On Tue, Sep 19, 2017 at 10:50 AM, Jan Lahoda  wrote:
> I can try to categorize the files a little, but I was hoping we could
> switch to using Rat to do the checks (after the bulk of the changes are
> done). So if e.g. the META-INF files would be OK to not have a header, we
> could simply exclude them in the Rat configuration, and they would be
> ignored (but the configuration is/will be in git, so easy to review).
>
> As a side note, some files in the repository (typically samples) are using
> 3-clause (if I get that correctly) BSD license currently, e.g.:
> https://git-wip-us.apache.org/repos/asf?p=incubator-netbeans.git;a=blob;f=apisupport.feedreader/feedreader-suite/FeedReader/src/org/netbeans/feedreader/BrowserTopComponent.java;h=6d0a0c533a9dfa9ed81d3f4349e352d1fb49b128;hb=HEAD
>
> My question is what (if anything) we need to do about these.
>
> Thanks,
> Jan
>
>
> On Tue, Sep 19, 2017 at 6:21 AM, Geertjan Wielenga <
> geertjan.wiele...@googlemail.com> wrote:
>
>> Does the above make sense, i.e., I'm suggesting a few ways to finetune the
>> results a bit further -- and are there other ideas for finetuning, i.e.,
>> trying to somehow incorporate those 14,651 files, so we can minimize the
>> manual checking we'll need to do?
>>
>> Thanks,
>>
>> Gj
>>
>> On Mon, Sep 18, 2017 at 10:53 AM, Geertjan Wielenga <
>> geertjan.wiele...@googlemail.com> wrote:
>>
>> > Great, I've tried it, works well.
>> >
>> > In the report, there's a list of 14,651 files under the heading "Files
>> > without CDDL (14651)".
>> >
>> > Could a distinction be made between those that have a license (i.e., some
>> > license other than CDDL) and those that do not have a license at all?
>> >
>> > I also think that it would be nice that after that split, i.e., between
>> > those with/without a license, that everything is sorted based on file
>> type,
>> > so we can easily distinguish those in the lists that are 'form' files,
>> > 'png' files, etc, for each of these two categories.
>> >
>> > I think also that anything within META-INF does not have any "degree of
>> > creativity", i.e, these are simply registration files for implementations
>> > of APIs. Could you provide the number of these, for this page, where I'm
>> > trying to keep a record of all the file types that are a special case of
>> > some kind: https://cwiki.apache.org/confluence/display/
>> > NETBEANS/NetBeans+Transition+Process
>> >
>> > Thanks a lot, and any feedback from anyone is welcome,
>> >
>> > Gj
>> >
>> >
>> >
>> > On Sun, Sep 17, 2017 at 5:06 PM, Jan Lahoda  wrote:
>> >
>> >> Hi,
>> >>
>> >> I've uploaded an updated version of the tool - fixing a bug in rewriting
>> >> headers of bundle files (where it was deleting one line after the
>> header,
>> >> reported by Geertjan offline), making it a little bit more strict
>> >> (currently rewrites 29474 files), adding support for bat files, and
>> adding
>> >> ability to dump a file with statistics and changed/not changed files.
>> >>
>> >> I guess after the bulk update of these headers is done, and
>> LICENSE
>> >> is added, we could start a usual development? (Continuing with reviewing
>> >> the Rat report concurrently?)
>> >>
>> >> Could please someone overview the regexp here:
>> >> https://cwiki.apache.org/confluence/display/NETBEANS/NetBean
>> >> s+Transition+Process#NetBeansTransitionProcess-Toolforanalyz
>> >> ingandchangingGPL+CDDLlicenseheaders
>> >>
>> >> to see if it is OK to write such headers? Seems OK to me personally,
>> but I
>> >> think having feedback from someone more experienced would be helpful.
>> >>
>> >> Thanks,
>> >> Jan
>> >>
>> >> On Fri, Sep 15, 2017 at 11:43 PM, Geertjan Wielenga <
>> >> geertjan.wiele...@googlemail.com> wrote:
>> >>
>> >> > I've used the tool, it's really great, not only analyzes but also
>> >> actually
>> >> > changes the licenses, 29,496 of 44,324:
>> >> >
>> >> > https://cwiki.apache.org/confluence/display/NETBEANS/
>> >> > NetBeans+Transition+Process
>> >> >
>> >> > Could the tool be tuned to list all the files that are not in the
>> >> 29,496?
>> >> >
>> >> > I have updated the table in the link above to list all the problematic
>> >> file
>> >> > types, i.e., those that are not licensed.
>> >> >
>> >> > Would be great to identify anything else that is not part of the
>> 29,496
>> >> > that can automatically be relicensed.
>> >> >
>> >> > Gj
>> >> >
>> >> > On Thu,