[Opensim-dev] Needing Mono.Security.dll on Windows at PostgreSQL module

Teravus Ovares teravus at gmail.com
Wed Oct 16 23:38:00 UTC 2013


 Thanks everyone for your valuable feedback,   It seems that everyone
is generally in favor of this solution at the moment, so unless I see
anything serious here, I'll apply Fernando's changes with justincc's
comments at around 10 PM Eastern time.

Feel free to continue to comment if you have anything else to add.

Best Regards

Teravus

On Wed, Oct 16, 2013 at 12:56 PM, Fernando Francisco de Oliveira
<fernando at oliveira.eti.br> wrote:
> So, I already have the fix coded on my computer at home, with that mono
> verification. I may change it to use the
> OpenSim.Framework.Util.IsPlatformMono() function and put the
> Mono.Security.dll at bin/lib/.NET.
> I will do a patch and post it to mantis to be tested. Is it ok ?
>
> Fernando Oliveira
> http://oliveira.eti.br
>
> http://twitter.com/oliveira_lands
>
>
>
>
> 2013/10/16 Justin Clark-Casey <jjustincc at googlemail.com>
>>
>> Yes, this is also available as OpenSim.Framework.Util.IsPlatformMono().
>>
>> On 16/10/13 18:28, Fernando Francisco de Oliveira wrote:
>>>
>>> the test I put at code was testing Type.GetType("Mono.Runtime") if it
>>> return null that's not running on mono.
>>>
>>>
>>>
>>> Fernando Oliveira
>>> http://oliveira.eti.br
>>>
>>> http://twitter.com/oliveira_lands
>>>
>>>
>>>
>>>
>>> 2013/10/16 Sean McNamara <smcnam at gmail.com <mailto:smcnam at gmail.com>>
>>>
>>>
>>>     On Wed, Oct 16, 2013 at 12:35 PM, Justin Clark-Casey
>>>     <jjustincc at googlemail.com <mailto:jjustincc at googlemail.com>> wrote:
>>>      > A small point - can this be in the directory bin/lib/.NET/ rather
>>> than
>>>      > Windows/?  This makes it clear that it's a library directory and
>>> only
>>>      > required under .NET (since you can theoretically run Mono in
>>> Windows, though
>>>      > admittedly probably pretty much nobody does this).
>>>
>>>     And now that you brought that up, the obvious follow-up question is,
>>>     can we reliably detect whether OpenSim is being run under Mono or the
>>>     .NET Framework? As you pointed out, Mono runs on Windows, and it is
>>>     possible that someone running OpenSim under Mono on Windows would
>>>     *pass* the Win32 platform check and get our shipped Mono.Security.dll
>>>     loaded, which would conflict with the Mono.Security.dll shipped with
>>>     the user's Mono version and perhaps cause exceptions.
>>>
>>>     So the condition for loading the bin/lib/.NET/*.dll would be: on
>>> Win32
>>>     AND running the Microsoft .NET Framework (or, by implication, NOT
>>>     Mono)
>>>
>>>      >
>>>      >
>>>      > On 16/10/13 12:49, Fernando Francisco de Oliveira wrote:
>>>      >>
>>>      >> Yesterday I tested my code, and already patched it to load the
>>>      >> Mono.Security.dll from bin/windows folder only when the
>>>      >> program was running on windows.
>>>      >>
>>>      >> It was put at first attempt to load it from PGSQL module. and it
>>> worked
>>>      >> fine at windows. I didn't tested on linux yet.
>>>      >> and still need to test also on Robust.
>>>      >>
>>>      >> The implementation was exacly what Sean described, an event that
>>> is fired
>>>      >> when any assembly isnt found at default
>>>      >> directories, then I verify if it is running Mono environment and
>>> only use
>>>      >> Assembly.Load when it's not. The librarie is
>>>      >> stored at bin/windows folder, so the program don't load it unless
>>> for this
>>>      >> code.
>>>      >>
>>>      >>
>>>      >>
>>>      >>
>>>      >> Fernando Oliveira
>>>      >> http://oliveira.eti.br
>>>      >>
>>>      >> http://twitter.com/oliveira_lands
>>>      >>
>>>      >>
>>>      >>
>>>      >>
>>>      >> 2013/10/16 Latif Khalifa <latifer at streamgrid.net
>>> <mailto:latifer at streamgrid.net>
>>>      >> <mailto:latifer at streamgrid.net <mailto:latifer at streamgrid.net>>>
>>>
>>>      >>
>>>      >>
>>>      >>     We used to ship  Mono.Security.dll with libopenmetaverse. It
>>> caused
>>>      >>     all sorts of trouble for Linux users, because mono on startup
>>> will
>>>      >>     load the one from cwd preferably. So shipping it in
>>> bin/windows that
>>>      >>     mono will not know about is the only way to go.
>>>      >>
>>>      >>     I wish we thought of this approach back then ;)
>>>      >>
>>>      >>     On Wed, Oct 16, 2013 at 5:08 AM, Fernando Francisco de
>>> Oliveira
>>>      >>     <fernando at oliveira.eti.br <mailto:fernando at oliveira.eti.br>
>>> <mailto:fernando at oliveira.eti.br
>>>
>>>     <mailto:fernando at oliveira.eti.br>>> wrote:
>>>      >>      > Hello
>>>      >>      >
>>>      >>      > I was investigating the bug
>>>      >>      > (http://opensimulator.org/mantis/view.php?id=6803) found
>>> that
>>>      >>      > Mono.Security.dll which is packaged with Npgsql.dll
>>> library is
>>>      >> needed on
>>>      >>      > Windows, but can't be distributed on Linux, because mono
>>> already
>>>      >> have it and
>>>      >>      > gives conflicts error.
>>>      >>      >
>>>      >>      > I would like to discuss about distributing the
>>> Mono.Security.dll on
>>>      >> a folder
>>>      >>      > above bin like "bin/windows" folder, which could contains
>>> the
>>>      >> libraries that
>>>      >>      > only is needed on windows.
>>>      >>      >
>>>      >>      > I did a change on PGSQL project to load dynamicaly
>>> Mono.Security
>>>      >> only if
>>>      >>      > it's running on Windows, and from that folder.
>>>      >>      > If it running on Mono, it load it from GAC (if available)
>>> and don't
>>>      >> load the
>>>      >>      > windows dll.
>>>      >>      >
>>>      >>      > http://pastebin.com/WdzfmbSr
>>>      >>      >
>>>      >>      > Let's talk about it ?
>>>      >>      >
>>>      >>      > Fernando Oliveira
>>>      >>      > http://oliveira.eti.br
>>>      >>      >
>>>      >>      >
>>>      >>      >
>>>      >>      > _______________________________________________
>>>      >>      > Opensim-dev mailing list
>>>      >>      > Opensim-dev at lists.berlios.de
>>> <mailto:Opensim-dev at lists.berlios.de> <mailto:Opensim-dev at lists.berlios.de
>>>
>>>     <mailto:Opensim-dev at lists.berlios.de>>
>>>      >>
>>>      >>      > https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>      >>     _______________________________________________
>>>      >>     Opensim-dev mailing list
>>>      >> Opensim-dev at lists.berlios.de
>>> <mailto:Opensim-dev at lists.berlios.de> <mailto:Opensim-dev at lists.berlios.de
>>>
>>>     <mailto:Opensim-dev at lists.berlios.de>>
>>>      >>
>>>      >> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>      >>
>>>      >>
>>>      >>
>>>      >>
>>>      >> _______________________________________________
>>>      >> Opensim-dev mailing list
>>>      >> Opensim-dev at lists.berlios.de
>>> <mailto:Opensim-dev at lists.berlios.de>
>>>      >> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>      >>
>>>      >
>>>      >
>>>      > --
>>>      > Justin Clark-Casey (justincc)
>>>      > OSVW Consulting
>>>      > http://justincc.org
>>>      > http://twitter.com/justincc
>>>      >
>>>      > _______________________________________________
>>>      > Opensim-dev mailing list
>>>      > Opensim-dev at lists.berlios.de <mailto:Opensim-dev at lists.berlios.de>
>>>      > https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>     _______________________________________________
>>>     Opensim-dev mailing list
>>>     Opensim-dev at lists.berlios.de <mailto:Opensim-dev at lists.berlios.de>
>>>     https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Opensim-dev mailing list
>>> Opensim-dev at lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>>
>>
>>
>> --
>> Justin Clark-Casey (justincc)
>> OSVW Consulting
>> http://justincc.org
>> http://twitter.com/justincc
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev



More information about the Opensim-dev mailing list