native cmds and libs in the module library

Alan Bateman Alan.Bateman at oracle.com
Mon Jan 9 10:56:48 PST 2012


On 06/01/2012 16:14, Chris Hegarty wrote:
> Here is an updated webrev incorporating the feedback I received.
>
> http://cr.openjdk.java.net/~chegar/jigsaw/libbin_webrev.01/webrev/
>
> 1) '-natlibs' -> '--natlibs', '-natcmds' -> '--natcmds'
> 2) detect during 'jmod create' if a directory is creatable/writable
> 3) detect conflicts and rollback changes if there is a conflict
> 4) track files installed outside of the module directory
>
> It would be nice to allow an override of files in the module libraries 
> natlibs or natcmds directories if a newer version of the same module 
> is installed. Currently this will fail due to a conflict on these 
> files. This shouldn't be difficult to add later.
>
> -Chris.
>
I went through this and I think it's starting to come good.

One concern is that ModuleFile now only works with a SimpleLibrary 
whereas I think it should be able to work with any Library implementation.

Also "oomfiles" is a strange name to have in the module library. 
Something like "otherfiles" or just "files" might be better. For 
consistency and portability it would be better to have it in UTF8 rather 
than the platform encoding.

It might be worth combining getSubdirOfSection and librarySectionPath 
into one instance method that returns the location to install the 
section (be in the module library or elsewhere).

Security is a concern where an adversary may include a sequence of ../ 
in the relative path to a library. I think it would be good to include a 
couple of tests for this type of issue.

Otherwise, I think the approach is okay, just needs clean-up and 
ensuring that the coding style and naming is consistent.

-Alan.
















More information about the jigsaw-dev mailing list