Discussion:
[Erp5-dev] TimerService ip patch and other patches
Marta Kalamar
2007-10-19 14:12:43 UTC
Permalink
Hello everyone,

I've just started using ERP5 (i installed it from scratch from the svn).
Wonderful software, congratulations!

Of course the trunk version didn't work until i had made some patches.
The most important one I describe below.

Please, tell me:
1. If that will be useful when I post the patches
2. How I am supposed to do that

I'm a newby to ERP5, please somebody introduce me to the rules.


Best Regards,
Marta Kalamar

--------------------------------------------------------------------

The most important patch i had to apply was needed in TimeService since
it lisens by default at

ip = socket.gethostbyname(socket.gethostname())

witch is not correct in my case. I think many servers can have more than
one interface and it should be possible to choose where the TimerServer
is supposed to listen.
So i added new parameter in timerserver/component.xml

<key name="ip" datatype="string" default="127.0.0.1">
<description>
Interface to listen on.
</description>
</key>'

and some lines in TimerServer.py:

def __init__(self, module, interval=600, ip=None):
(...)
ip = self.ip
if ip is None:
ip = socket.gethostbyname(socket.gethostname())

and in __init__.py:

self.ip = section.ip
(...)
return TimerServer(self.module, self.interval, self.ip)

And now I can specify the IP i want in zope.conf.
Rafael Monnerat
2007-10-19 14:59:48 UTC
Permalink
are you using Timeservice from nexedi svn? if yes, you can submit one
patch using svn diff ...

Like this:

svn up TimerService
svn diff TimerService >> MyPatchToTimeService.patch

and send it to this mailling list.


Rafael Monnerat

PS.: I think that should be added GuidelinesForCommunityContributions or
something similar at wiki.
Post by Marta Kalamar
Hello everyone,
I've just started using ERP5 (i installed it from scratch from the svn).
Wonderful software, congratulations!
Of course the trunk version didn't work until i had made some patches.
The most important one I describe below.
1. If that will be useful when I post the patches
2. How I am supposed to do that
I'm a newby to ERP5, please somebody introduce me to the rules.
Best Regards,
Marta Kalamar
--------------------------------------------------------------------
The most important patch i had to apply was needed in TimeService since
it lisens by default at
ip = socket.gethostbyname(socket.gethostname())
witch is not correct in my case. I think many servers can have more than
one interface and it should be possible to choose where the TimerServer
is supposed to listen.
So i added new parameter in timerserver/component.xml
<key name="ip" datatype="string" default="127.0.0.1">
<description>
Interface to listen on.
</description>
</key>'
(...)
ip = self.ip
ip = socket.gethostbyname(socket.gethostname())
self.ip = section.ip
(...)
return TimerServer(self.module, self.interval, self.ip)
And now I can specify the IP i want in zope.conf.
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
Łukasz Nowak
2007-10-19 15:07:30 UTC
Permalink
Hello,

On 2007-10-19, 11:59:48
Post by Rafael Monnerat
are you using Timeservice from nexedi svn? if yes, you can submit one
patch using svn diff ...
svn up TimerService
svn diff TimerService >> MyPatchToTimeService.patch
(...)

I think that is good to set to C locale - as svn uses localisation,
like:

LANG=C svn diff

If not, some output might be cryptic (eg. in Poland we use pl_PL.UTF-8
on Linux as default).

Regards,
Luke
--
?ukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...''
I am only craftsman. Maybe good one, but only craftsman.
Jean-Paul Smets
2007-10-20 07:18:13 UTC
Permalink
Post by Rafael Monnerat
are you using Timeservice from nexedi svn? if yes, you can submit one
patch using svn diff ...
svn up TimerService
svn diff TimerService >> MyPatchToTimeService.patch
and send it to this mailling list.
Rafael Monnerat
PS.: I think that should be added GuidelinesForCommunityContributions or
something similar at wiki.
This:
http://www.erp5.org/GuidelinesForBestCommitPractices
is partly simular.

And this is even more similar. I think it should become *the* start
point for contributors:
http://www.erp5.org/HowToHelp

but it still needs to be written. Kristian is back soon and will extend it.

JPS.
Post by Rafael Monnerat
Post by Marta Kalamar
Hello everyone,
I've just started using ERP5 (i installed it from scratch from the svn).
Wonderful software, congratulations!
Of course the trunk version didn't work until i had made some patches.
The most important one I describe below.
1. If that will be useful when I post the patches
2. How I am supposed to do that
I'm a newby to ERP5, please somebody introduce me to the rules.
Best Regards,
Marta Kalamar
--------------------------------------------------------------------
The most important patch i had to apply was needed in TimeService since
it lisens by default at
ip = socket.gethostbyname(socket.gethostname())
witch is not correct in my case. I think many servers can have more than
one interface and it should be possible to choose where the TimerServer
is supposed to listen.
So i added new parameter in timerserver/component.xml
<key name="ip" datatype="string" default="127.0.0.1">
<description>
Interface to listen on.
</description>
</key>'
(...)
ip = self.ip
ip = socket.gethostbyname(socket.gethostname())
self.ip = section.ip
(...)
return TimerServer(self.module, self.interval, self.ip)
And now I can specify the IP i want in zope.conf.
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
_______________________________________________
Erp5-dev mailing list
Erp5-dev at erp5.org
http://mail.nexedi.com/mailman/listinfo/erp5-dev
--
Jean-Paul Smets-Solanes, Nexedi CEO - Tel. +33(0)6 62 05 76 14
Nexedi: Consulting and Development of Libre / Open Source Software
http://www.nexedi.com
ERP5: Libre/ Open Source ERP Software for small and medium companies
http://www.erp5.org
Loading...