You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Jaroslav Tulach <ja...@gmail.com> on 2021/05/26 08:45:09 UTC

Build nb-javac from sources was: nb-javac@16.0.0.0 is covered by "Classpath exception"

Hello Neil.

> A longer term approach to this might be to download the sources from
> Maven, validate the license headers (akin to RAT), and build from
> source as part of our build?

Yes, building from (OpenJDK) sources is an approach I'd prefer in the future 
as well. Actually I've prototyped it in my https://github.com/jaroslavTulach/
nb-javac/ repository.

The repository contains just a few wrapper files:
https://github.com/JaroslavTulach/nb-javac/tree/
7e51495f3a275a7891ee93b96d092f600990cada/make/langtools/netbeans/nb-javac/src/
nbjavac

and it clones the rest from OpenJDK in an Ant build script:

https://github.com/JaroslavTulach/nb-javac/blob/
7e51495f3a275a7891ee93b96d092f600990cada/make/langtools/netbeans/nb-javac/
build.xml#L91

Do you think these wrappers and the build script should become part of a 
NetBeans repository? Or is it better to get it working in a separate 
repository - like the one I have?

> > This also raises the question whether the build
> > is reproducible and whether it is ok, that there is no direct
> > connection between the binary artifact ant the source artifact.
> 
> Yes, and the ambiguity of the LauncherProperties file does raise a
> question about the current process there too.

Adding a RAT check to verify only "Classpath exception" files are imported from 
the OpenJDK repository would certainly be a step towards the desirable state 
and it could prevent human mistakes when releasing the bits.
-jt




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Build nb-javac from sources

Posted by Neil C Smith <ne...@apache.org>.
On Sat, 29 May 2021 at 07:19, Jaroslav Tulach <ja...@gmail.com> wrote:
> > It can't be here can it, from a licensing perspective?
>
> The GPL-CPE sources would remain hosted where they are - e.g. in the
> https://github.com/openjdk/jdk
> repository. The only thing that would need to be in here is the build script.
> I assume such build script can be Apache licensed.

Well, that was the question!  Your repository you linked to has a
GPL+CPE license and a load of files with that header.  What can be
re-licensed and donated, or removed?

> Such a verification would be in the build script.
>
> > then it's easier for PMC review of the
> > process, etc.
>
> +1 having the build script properly reviewed by PMC would simplify the
> verification of correctness

Yes, but if it proves impossible to have the source patching side
here, then it would be good to have at least the verification and
compilation from patched sources (published on Maven Central) as part
of the NB build?

> Alternative: Do it as with launchers: Regular users download pre-built binary.
> The final build runs from sources.

I'm not sure that's a useful model, and I (and others) have argued for
doing separate official ASF releases of launchers and other native
binaries so that all main source builds use downloads.  The two
different paths to build have caused us release issues before, and
will likely be more of a problem with things like the new macOS Swift
launcher, etc.  Having a common path to build the IDE (across all
users and OS) is surely better?

The wording of CPE also makes publishing of pre-built binaries of
nb-javac from here impossible anyway, so we'd still need to resolve
that issue.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Build nb-javac from sources

Posted by Jaroslav Tulach <ja...@gmail.com>.
Thanks for your comments Neil...

@ May 27 2021 @
> On Wed, 26 May 2021 at 09:45, Jaroslav Tulach <ja...@gmail.com> 
wrote:
> > Do you think these wrappers and the build script should become part of a
> > NetBeans repository? Or is it better to get it working in a separate
> > repository - like the one I have?
> 
> It can't be here can it, from a licensing perspective?  

The GPL-CPE sources would remain hosted where they are - e.g. in the
https://github.com/openjdk/jdk
repository. The only thing that would need to be in here is the build script. 
I assume such build script can be Apache licensed.

> However ...
> 
> > Adding a RAT check to verify only "Classpath exception" files are imported
> > from the OpenJDK repository would certainly be a step towards the
> > desirable state and it could prevent human mistakes when releasing the
> > bits.
> 
> Ideally the aspect that verifies headers and builds from patched
> sources would be here IMO, 

Such a verification would be in the build script.

> then it's easier for PMC review of the
> process, etc.  

+1 having the build script properly reviewed by PMC would simplify the 
verification of correctness

The next question is: Should such build be part of regular NetBeans build? 
E.g. should it be invoked everytime someone invokes
```bash
nbbuild$ ant build
```

Downside: The build requires checkout of the whole openjdk repository and even 
building takes quite some time.

Consideration: there already is a build of `langtools-9.zip` in the build 
process. We could replace it by building nb-javac from sources PMC trusts?

Alternative: Do it as with launchers: Regular users download pre-built binary. 
The final build runs from sources.

I guess I'll continue working in my current repository for now with the goal 
to produce 100% working version. I'll keep in mind we want a system easily 
reviewable by PMC. I'll continue to assume that the build script assembling 
everything together can be Apache licensed.
-jt
 

> And we potentially get the basis of something that
> could be used for other CPE dependencies here or in other ASF projects
> should that arise.
> 
> Best wishes,
> 
> Neil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: dev-help@netbeans.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Build nb-javac from sources was: nb-javac@16.0.0.0 is covered by "Classpath exception"

Posted by Neil C Smith <ne...@apache.org>.
On Wed, 26 May 2021 at 09:45, Jaroslav Tulach <ja...@gmail.com> wrote:
> Do you think these wrappers and the build script should become part of a
> NetBeans repository? Or is it better to get it working in a separate
> repository - like the one I have?

It can't be here can it, from a licensing perspective?  However ...

> Adding a RAT check to verify only "Classpath exception" files are imported from
> the OpenJDK repository would certainly be a step towards the desirable state
> and it could prevent human mistakes when releasing the bits.

Ideally the aspect that verifies headers and builds from patched
sources would be here IMO, then it's easier for PMC review of the
process, etc.  And we potentially get the basis of something that
could be used for other CPE dependencies here or in other ASF projects
should that arise.

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists