harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Harley <george.c.har...@googlemail.com>
Subject Re: Security module layout
Date Mon, 27 Feb 2006 12:50:54 GMT
Mikhail Loenko wrote:
> Hi George
>
> actually the native code we have in security should work on both
> IA32 and IPF
>
> So, it seems that with your suggestion we will have to have
> two copies of that code. Please correct me if I'm wrong
>
> What is about the following str:
>
> +-win/
> |  |
> |  +--IA32/
> |  |
> |  +--IPF/
> |  |
> |  +-- common1.cpp
> |  |
> |  +-- common2.cpp
> |  |
> ...
>
> Thanks,
> Mikhail
>   

Looks good to me. And it's the same story under the "linux" folder ?

Best regards,
George
IBM UK

> 2006/2/27, George Harley <george.c.harley@googlemail.com>:
>   
>> Jean-frederic Clere wrote:
>>     
>>> Mikhail Loenko wrote:
>>>
>>>       
>>>> Hi George,
>>>>
>>>> why e.g. 'win.IA32' not just 'win'?
>>>>
>>>>
>>>>         
>>> Because there will be a posix.apr that will do the portable part ;-)
>>> Correct me if I am wrong.
>>>       
>> ...er...well, I'm not sure that it was foremost in my thoughts when I
>> was working through the layout changes :-)
>>
>> I simply wanted to have a way of differentiating between code written
>> for 32-bit and 64-bit Windows on Intel architecture. I am assuming that
>> the Windows code there today is for 32 bit. I did wonder about splitting
>> those directory names up so that instead of a folder called "win.IA32"
>> we had a "win" folder with a "IA32" sub-folder (and likewise for Linux).
>> i.e.
>>
>> java
>>  |
>>  +-common
>>  |
>>  +-win
>>  |  |
>>  |  \---IA32
>>  |
>>  +-linux
>>  |  |
>>  |  \---IA32
>>  |
>>  ...
>>
>>
>> The above approach leaves the way open for other variants (e.g. 64-bit
>> code) to be added in new sub-folders beneath "win" and "linux". In the
>> end I opted for consistency with the "win.IA32" and "linux.IA32" names
>> that are currently being used under the trunk/native-src folder in SVN.
>>
>> Best regards,
>> George
>> IBM UK
>>
>>     
>>> Cheers
>>>
>>> Jean-Frederic
>>>
>>>       
>>>> Thanks,
>>>> Mikhail
>>>>
>>>> 2006/2/24, George Harley <george.c.harley@googlemail.com>:
>>>>
>>>>
>>>>         
>>>>> Hi,
>>>>>
>>>>> Redrawing the proposed layout as it didn't render quite correctly
>>>>> for me
>>>>> when I read over the sent note (sigh).
>>>>>
>>>>>
>>>>>  <SECURITY ROOT>
>>>>>        |
>>>>>        |
>>>>>        +---src
>>>>>        |   |
>>>>>        |   +---main
>>>>>        |   |   |
>>>>>        |   |   +---java
>>>>>        |   |   |   |
>>>>>        |   |   |   +---common
>>>>>        |   |   |   |
>>>>>        |   |   |   +---linux.IA32
>>>>>        |   |   |   |
>>>>>        |   |   |   \---win.IA32
>>>>>        |   |   |
>>>>>        |   |   +---native
>>>>>        |   |   |   |
>>>>>        |   |   |   +---linux.IA32
>>>>>        |   |   |   |
>>>>>        |   |   |   \---win.IA32
>>>>>        |   |   |
>>>>>        |   |   \---resources
>>>>>        |   |       |
>>>>>        |   |       \---common
>>>>>        |   |
>>>>>        |   +---test
>>>>>        |       |
>>>>>        |       +---java
>>>>>        |           |
>>>>>        |           +---common
>>>>>        |           |
>>>>>        |           +---linux.IA32
>>>>>        |           |
>>>>>        |           \---win.IA32
>>>>>        |
>>>>>        +---doc
>>>>>        |   |
>>>>>        |   \---images
>>>>>        |
>>>>>        +---make
>>>>>        |   |
>>>>>        |   \---native
>>>>>        |       |
>>>>>        |       +---linux
>>>>>        |       |
>>>>>        |       \---windows
>>>>>        |
>>>>>        +---META-INF
>>>>>
>>>>>
>>>>>
>>>>> Best regards,
>>>>> George
>>>>> IBM UK
>>>>>
>>>>>
>>>>>
>>>>> George Harley wrote:
>>>>>
>>>>>           
>>>>>> Hi,
>>>>>>
>>>>>> Earlier on today I spent some time following the instructions for
>>>>>> developing Harmony Java code inside Eclipse [1]. After experimenting
>>>>>> with archive, luni and nio I decided to check out modules/security
and
>>>>>> found that, in its current form, it can't be brought into an Eclipse
>>>>>> workspace and used like the other modules. One obvious difference
is
>>>>>> that it doesn't have any Eclipse project metadata in there (e.g.
>>>>>> .project and .classpath files). After adding these in (in my private
>>>>>> workspace), I began to look at other differences between security
and
>>>>>> its peer modules in particular the difference in source layouts.
>>>>>> Recalling some ideas for layouts that have been kicked around this
>>>>>> list,
>>>>>> I started to move things around a little to try and make things a
>>>>>> little
>>>>>> more uniform with respect to those peer modules. Things were made
more
>>>>>> interesting by virtue of the following security module distinctions
:
>>>>>>
>>>>>> * it has platform-specific Java code
>>>>>> * it contains native code for both Windows and Linux
>>>>>>
>>>>>> Eventually I arrived at a structure that is more attuned to the other
>>>>>> modules in the repository. As a bonus, Eclipse pointed out several
>>>>>> missing import entries from the META-INF/MANIFEST.MF file - including
>>>>>> one that cannot presently be satisfied with what is in the Harmony
>>>>>> repository (org.apache.harmony.security.test.SecurityTest wants to
>>>>>> import java.util.logging.LoggingPermission which doesn't exist in
the
>>>>>> repository - although an implementation has been contributed [2]).
>>>>>>
>>>>>> In addition to moving source around, I also made the necessary
>>>>>> tweaks to
>>>>>> the Ant scripts contained in the security module plus the "top level"
>>>>>> Java build file trunk/make/build-java.xml so the Ant builds still
work
>>>>>> as before.
>>>>>>
>>>>>> Keeping my fingers crossed that the next bit of this note renders
>>>>>> alright in your mail client, here is the modules/security structure
>>>>>> that
>>>>>> I ended up with (minus all of the package sub-folders for clarity)
:
>>>>>>
>>>>>> <SECURITY ROOT>
>>>>>>       |
>>>>>>       |
>>>>>>       +---src
>>>>>>       |   |
>>>>>>       |   +---main
>>>>>>       |   |   |
>>>>>>       |   |   +---java
>>>>>>       |   |   |   |
>>>>>>       |   |   |   +---common
>>>>>>       |   |   |   |
>>>>>>       |   |   |   +---linux.IA32
>>>>>>       |   |   |   |
>>>>>>       |   |   |   \---win.IA32
>>>>>>       |   |   |         |   |   +---native
>>>>>>       |   |   |   |
>>>>>>       |   |   |   +---linux.IA32
>>>>>>       |   |   |   |
>>>>>>       |   |   |   \---win.IA32
>>>>>>       |   |   |
>>>>>>       |   |   \---resources
>>>>>>       |   |       |
>>>>>>       |   |       \---common
>>>>>>       |   |        |   +---test
>>>>>>       |       |
>>>>>>       |       +---java
>>>>>>       |           |
>>>>>>       |           +---common
>>>>>>       |           |
>>>>>>       |           +---linux.IA32
>>>>>>       |           |
>>>>>>       |           \---win.IA32
>>>>>>       |
>>>>>>       +---doc
>>>>>>       |   |
>>>>>>       |   \---images
>>>>>>       |
>>>>>>       +---make
>>>>>>       |   |
>>>>>>       |   \---native
>>>>>>       |       |
>>>>>>       |       +---linux
>>>>>>       |       |
>>>>>>       |       \---windows
>>>>>>       |
>>>>>>       +---META-INF
>>>>>>
>>>>>>
>>>>>> All of the leaf folders under "src" have been declared to Eclipse
as
>>>>>> source folders (i.e. I have 9 source folders called
>>>>>> "src/main/java/common", "src/main/resources/common",
>>>>>> "src/main/native/linux.IA32", "src/test/java/common" and so on...).
>>>>>>
>>>>>>
>>>>>> I would be really keen to hear what people think of this prototype
>>>>>> re-structuring. It would be great if we could make the security module
>>>>>> as simple to work with inside Eclipse as the other modules are.
>>>>>>
>>>>>>
>>>>>> Best regards,
>>>>>> George
>>>>>> IBM UK
>>>>>>
>>>>>>
>>>>>> [1]
>>>>>> http://incubator.apache.org/harmony/subcomponents/classlibrary/dev_eclipse.html
>>>>>>
>>>>>>
>>>>>> [2] http://issues.apache.org/jira/browse/HARMONY-88
>>>>>>
>>>>>>
>>>>>>             
>>>>
>>>>         
>>>       
>>     
>
>   


Mime
View raw message