Tryton - Issues

 

Issue2367

Title trytond.conf doesn't get installed in /etc
Priority feature Status closed
Superseder Nosy List alisonken1, casaxa, ced, daniel, sharoon, smarro, udono, yangoon
Type behavior Components trytond
Assigned To Keywords
Reviews

Created on 2011-12-28.14:24:00 by casaxa, last changed by ced.

Files
File name Uploaded Type Edit Remove
trytond_conf_install_fix.patch casaxa, 2011-12-28.14:23:58 text/plain
Messages
msg17894 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-09-04.08:47:22
Closed because issue3627 makes it no more needed as there are no more default configuration file.
msg16701 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2014-05-05.09:29:40
Re-opened, it is not a valid reason.
msg16700 (view) Author: [hidden] (casaxa) Date: 2014-05-04.15:44:38
I will close this bug since nobody seems that wants to make this go into the tryton source. The solution is that packagers will copy the trytond.conf file in their build scripts.
msg16380 (view) Author: [hidden] (alisonken1) Date: 2014-04-02.03:16:06
Don't know if it's too late to add my $0.02 in - but for trytond-3.0.3 I've 
created slackware package that is pending in http://slackbuilds.org 14.1 repo 
that includes the trytond.conf file from the d/l tarball. There is also a 
tryton-3.0.2 client slackbuild in pending as well.

As far as running without a trytond.conf file, when I installed trytond, it 
would run but only on localhost - unfortunately, we have a separate server for 
trytond and multiple client machines, so a config file is necessary in order to 
get connectivity from outside the box where trytond is installed.
msg12498 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-02-14.12:36:32
On 14/02/13 07:09 +0100, Sharoon Thomas wrote:
> 
> Sharoon Thomas <sharoon.thomas@openlabs.co.in> added the comment:
> 
> I like the way supervisor [1] does it. It's a python package too and it creates a new 
> executable script called 'echo_supervisord_conf' which spits a default configuration 
> to STDOUT which can be piped to a file of the user's choice. The creation of 
> configuration s explained in their documentation [2].
> 
> Perhaps, we could have a 'echo_trytond_conf' which writes the default configuration 
> to STDOUT. So the usage would look like: `echo_trytond_conf etc/trytond.conf`

Why not. It could be an option of trytond to output the configuration
used.
msg12497 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2013-02-14.12:35:42
On 14/02/13 09:14 +0100, Sasa Ostrouska wrote:
> Ok, after a long time re-reading the bug, I think that the correct solution to
> this would be to install the trytond.conf file into the
> /usr/share/trytond/sample_configs/trytond.conf.sample or something under
> /usr/share/trytond dir.

I don't think there is such option in setuptools.
msg12492 (view) Author: [hidden] (casaxa) Date: 2013-02-14.09:14:25
Ok, after a long time re-reading the bug, I think that the correct solution to
this would be to install the trytond.conf file into the
/usr/share/trytond/sample_configs/trytond.conf.sample or something under
/usr/share/trytond dir.

This simply because this file is not needed by default to run tryton and if a
usera wants it for a specific configuration he can then copy it out of the
usr/share/trytond dir to the /etc/ dir.
msg12491 (view) Author: [hidden] (sharoon) Date: 2013-02-14.07:11:02
Please read the usage in the previous message as:

`echo_trytond_conf > etc/trytond.conf`
msg12490 (view) Author: [hidden] (sharoon) Date: 2013-02-14.07:09:34
I like the way supervisor [1] does it. It's a python package too and it creates a new 
executable script called 'echo_supervisord_conf' which spits a default configuration 
to STDOUT which can be piped to a file of the user's choice. The creation of 
configuration s explained in their documentation [2].

Perhaps, we could have a 'echo_trytond_conf' which writes the default configuration 
to STDOUT. So the usage would look like: `echo_trytond_conf etc/trytond.conf`

[1] http://supervisord.org
[2] http://supervisord.org/installing.html?highlight=echo#creating-a-configuration-
file
msg9991 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-02-06.00:00:36
As there is no clean fix, we are just wanting someone with an idea.
msg9989 (view) Author: [hidden] (casaxa) Date: 2012-02-05.14:06:29
So what to do with this bug ? 
trytond.conf still does not get installed at all with python setup.py install.
msg9747 (view) Author: [hidden] (casaxa) Date: 2012-01-10.15:02:44
I can not reproduce it anymore, it was that first day I installed
tryton, and tried to run it.
After that I understood it was missing the .conf file. I have no logs,
since i tried to run it
from a terminal.

Now it seems it starts and runs also without the trytond.conf.
msg9744 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-01-10.10:43:01
On 10/01/12 02:07 +0100, Sasa Ostrouska wrote:
> 
> This changes completely the thing. I think I got an error runnig
> trytond whithout the trytond.conf file in place.

Which error?
msg9743 (view) Author: [hidden] (casaxa) Date: 2012-01-10.02:11:43
On Sat, Jan 7, 2012 at 4:21 PM, Mathias Behrle <issue_tracker@tryton.org> wrote:
>
> Mathias Behrle <mathias.behrle@gmx.de> added the comment:
>
>> Udo Spallek <udono@gmx.net> added the comment:
>>
>> > But I don't see a reason why
>> > you should not include this ?
>> I am not using Slackware, but using Debian, I am sure users will get more
>> problems with your idea, when they mix a pip/easy_install/setuptools with apt.
>
> If you are using a third party package manager besides that from the
> distribution, you are always on your own to prevent or handle conflicts
> yourself.
>
> Besides that we prefer in Debian to package from release tarballs, and the conf
> file has to be installed anyway.
>

The conf files does not get installed if you install by "python
setup.py install --root=$pgk_dir"

That was why I was complaining.

>> > In fact this now creates a broken install. If you install it on a clean
>> > system
>> without installing the trytond package supplied by your distro packages, you
>> get a broken install. This is a BUG and not a feature in my opinion.
>> I do not exactly understand the circumstances of the broken install.
>
> I tested this some time ago and can confirm, that there *were* issues when
> installing with easy_install on Debian. I didn't followup at the time, because
> for me it is not the way to go on a Debian system. Currently it doesn't seem
> to make problems with installation via pip, otherwise we should hear more from
> the side of the gnu health guys.
>
> _______________________________________________
> Tryton issue tracker <issue_tracker@tryton.org>
> <https://bugs.tryton.org/issue2367>
> _______________________________________________
msg9742 (view) Author: [hidden] (casaxa) Date: 2012-01-10.02:07:21
This changes completely the thing. I think I got an error runnig
trytond whithout the trytond.conf file in place.

If its not needed, then of course my complan does not make any sense.

Rgds
Saxa
msg9741 (view) Author: [hidden] (casaxa) Date: 2012-01-10.02:00:21
On Sat, Jan 7, 2012 at 11:44 AM, Udo Spallek <issue_tracker@tryton.org> wrote:
>
> Udo Spallek <udono@gmx.net> added the comment:
>
>> But I don't see a reason why
>> you should not include this ?
> I am not using Slackware, but using Debian, I am sure users will get more
> problems with your idea, when they mix a pip/easy_install/setuptools with apt.
>
>> I have proposed you few solutions, based on how other software solves this, and
>> believe me, if trytond needs a conf file to run, the correct way of doing it
>> would be to solve this in the sources and not in the script.
> But isn't it already solved in the source? When no /etc/trytond.conf is found,
> trytond uses the trytond/etc/trytond.conf file, which should be in place. Does
> this no longer work?
>
>> In fact this now creates a broken install. If you install it on a clean system
> without installing the trytond package supplied by your distro packages, you get
> a broken install. This is a BUG and not a feature in my opinion.
> I do not exactly understand the circumstances of the broken install.

By broken install I mean, an installation which does not works out of the box.

Rgds
Saxa

>
> * Added matb and daniel the Debian maintainers to nosy list.
>
> ----------
> nosy: +daniel, matb, udono
>
> _______________________________________________
> Tryton issue tracker <issue_tracker@tryton.org>
> <https://bugs.tryton.org/issue2367>
> _______________________________________________
msg9740 (view) Author: [hidden] (casaxa) Date: 2012-01-10.01:59:24
On Sat, Jan 7, 2012 at 11:44 AM, Udo Spallek <issue_tracker@tryton.org> wrote:
>
> Udo Spallek <udono@gmx.net> added the comment:
>
>> But I don't see a reason why
>> you should not include this ?
> I am not using Slackware, but using Debian, I am sure users will get more
> problems with your idea, when they mix a pip/easy_install/setuptools with apt.

Udo, this is from what I can see a quite standard in source
distribution. It is mainly to easy a packagers life.
This doesn't make you a need to install the conf file manually ,
before you package and create a package distribution.

>
>> I have proposed you few solutions, based on how other software solves this, and
>> believe me, if trytond needs a conf file to run, the correct way of doing it
>> would be to solve this in the sources and not in the script.
> But isn't it already solved in the source? When no /etc/trytond.conf is found,
> trytond uses the trytond/etc/trytond.conf file, which should be in place. Does
> this no longer work?

No, it is not solved, if you install trytond by "python setup.py
install" you will end up with
all the files in the right place but not the trytond.conf file. It
will simply leave it out.

Rgds
Saxa
msg9730 (view) Author: [hidden] (yangoon) (Tryton translator) Date: 2012-01-07.20:21:11
> Udo Spallek <udono@gmx.net> added the comment:
>   
> > But I don't see a reason why
> > you should not include this ?   
> I am not using Slackware, but using Debian, I am sure users will get more
> problems with your idea, when they mix a pip/easy_install/setuptools with apt.  

If you are using a third party package manager besides that from the
distribution, you are always on your own to prevent or handle conflicts
yourself. 

Besides that we prefer in Debian to package from release tarballs, and the conf
file has to be installed anyway.
 
> > In fact this now creates a broken install. If you install it on a clean
> > system  
> without installing the trytond package supplied by your distro packages, you
> get a broken install. This is a BUG and not a feature in my opinion.
> I do not exactly understand the circumstances of the broken install.  

I tested this some time ago and can confirm, that there *were* issues when
installing with easy_install on Debian. I didn't followup at the time, because
for me it is not the way to go on a Debian system. Currently it doesn't seem
to make problems with installation via pip, otherwise we should hear more from
the side of the gnu health guys.
msg9729 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-01-07.16:17:50
On 07/01/12 15:44 +0100, Udo Spallek wrote:
> > I have proposed you few solutions, based on how other software solves this, and
> > believe me, if trytond needs a conf file to run, the correct way of doing it
> > would be to solve this in the sources and not in the script. 
> But isn't it already solved in the source? When no /etc/trytond.conf is found,
> trytond uses the trytond/etc/trytond.conf file, which should be in place. Does
> this no longer work?

trytond can run without a configuration file.
msg9728 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-01-07.16:16:49
On 07/01/12 15:31 +0100, Sasa Ostrouska wrote:
> Ced wrote:
> I think it will be better to improve the format and the documentation of the
> configuration file.
> 
> I dont understand what this has to do with the install location of the .conf
> file. Can you explain please ?

As configuration file is not required, it is just a matter of the user
to create the one he wants.
msg9727 (view) Author: [hidden] (udono) Date: 2012-01-07.15:44:40
> But I don't see a reason why
> you should not include this ? 
I am not using Slackware, but using Debian, I am sure users will get more
problems with your idea, when they mix a pip/easy_install/setuptools with apt.

> I have proposed you few solutions, based on how other software solves this, and
> believe me, if trytond needs a conf file to run, the correct way of doing it
> would be to solve this in the sources and not in the script. 
But isn't it already solved in the source? When no /etc/trytond.conf is found,
trytond uses the trytond/etc/trytond.conf file, which should be in place. Does
this no longer work?

> In fact this now creates a broken install. If you install it on a clean system
without installing the trytond package supplied by your distro packages, you get
a broken install. This is a BUG and not a feature in my opinion.
I do not exactly understand the circumstances of the broken install.

* Added matb and daniel the Debian maintainers to nosy list.
msg9726 (view) Author: [hidden] (casaxa) Date: 2012-01-07.15:31:38
Ced wrote:
I think it will be better to improve the format and the documentation of the
configuration file.

I dont understand what this has to do with the install location of the .conf
file. Can you explain please ?
msg9725 (view) Author: [hidden] (casaxa) Date: 2012-01-07.15:30:03
Ok I'm one of the persons who wanted to pack tryton for Slackware. As said this
is not a big problem to solve with a build script. But I don't see a reason why
you should not include this ? 

I have proposed you few solutions, based on how other software solves this, and
believe me, if trytond needs a conf file to run, the correct way of doing it
would be to solve this in the sources and not in the script. Why ? Because you
would allow to other new comers to have the correct install of all the tryton
parts by simply issue "python setup.py install" .

In fact this now creates a broken install. If you install it on a clean system
without installing the trytond package supplied by your distro packages, you get
a broken install. This is a BUG and not a feature in my opinion.

Second thing is, that by allowing to install tryton only by prebuilt packages,
you are limiting the use of the project.
msg9722 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-01-07.01:53:56
On 07/01/12 01:09 +0100, Sasa Ostrouska wrote:
> but why not simplify the packagers life by first time installing the file in the
> correct location , rather than leave it out ?

For now, any packagers did not complain so it seems it is not a problem
for them.
msg9721 (view) Author: [hidden] (casaxa) Date: 2012-01-07.01:09:34
Ok, I got it. but usually an update to the configuration file is managed by the
package managing system. In Slackware for example, when you create a packages,
all config files are moved into $config_file_name.new so when you install the
package it doesn't override the existing file. I see this install as a source
install, where basically you have 2 options. At first install you need to advise
in some way that the server is looking for a config file in /etc. So you can do
that by automatically install a default .conf file or alternatively leave it to
the user to figure it out.

My opinion and experience show me that all source distributions at first install
their conf files. This can be managed by a package build script or .spec file ,
but why not simplify the packagers life by first time installing the file in the
correct location , rather than leave it out ?
msg9720 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2012-01-06.23:43:16
I don't think it is good to manage configuration as data.
People don't want to loose their configuration after an update.
I think it will be better to improve the format and the documentation of the
configuration file.
msg9719 (view) Author: [hidden] (casaxa) Date: 2012-01-06.23:02:10
No comments ?
msg9664 (view) Author: [hidden] (casaxa) Date: 2011-12-30.01:19:57
the first if should look something like:

if system == win:
    Mydata_files =
[('c:\path\to\installdir\etc',['c:\path\to\sourcesdir\etc\trytond.conf'])]
msg9663 (view) Author: [hidden] (casaxa) Date: 2011-12-30.01:13:27
Ok, one way could be to determine the system where you are installing by adding
one if statement to the setup.py file.

if system == win:
    Mydata_files = [('etc',['c:\path\to\installdir\etc\trytond.conf'])]
if system == unix:
    Mydata_files = [('etc',['etc/trytond.conf'])]

And then in the setup part correct the data_files line to as follows:

data_files = Mydata_files

What you think about this ?

This is something like you can see here:
http://www.py2exe.org/index.cgi/data_files
msg9641 (view) Author: [hidden] (casaxa) Date: 2011-12-28.15:21:03
I have no idea how trytond gets installed on a non UNIX environment. But if
trytond on a Win system creates a c:\trytond dir, this should install it in 
c:\trytond\etc in my opinion. This patch for sure does not cover this. If
somebody with experience in Win/Macoxs can check this would be great.
msg9639 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2011-12-28.14:35:14
How does it work on non-UNIX system?
"/etc" is not always the right directory.
msg9638 (view) Author: [hidden] (casaxa) Date: 2011-12-28.14:23:58
The trytond.conf file does not get installed in /etc dir during the install phase.

Right now if you issue the command:

python setup.py install --root=$packdir

you do end up without trytond.conf installed in $packdir/etc .

With the attached patch you should be able to get it installed in the
right location.

Please comment.

Rgds
Saxa
History
Date User Action Args
2014-09-04 08:47:22cedsetstatus: chatting -> closed
messages: + msg17894
2014-05-05 09:29:42cedsetstatus: closed -> chatting
assignedto: casaxa ->
messages: + msg16701
2014-05-04 15:44:39casaxasetstatus: chatting -> closed
messages: + msg16700
2014-04-02 03:16:08alisonken1setnosy: + alisonken1
messages: + msg16380
2013-02-14 12:36:33cedsetmessages: + msg12498
2013-02-14 12:35:43cedsetmessages: + msg12497
2013-02-14 09:14:26casaxasetmessages: + msg12492
2013-02-14 07:11:02sharoonsetmessages: + msg12491
2013-02-14 07:09:35sharoonsetnosy: + sharoon
messages: + msg12490
2012-12-06 00:26:17smarrosetnosy: + smarro

Showing 10 items. Show all history (warning: this could be VERY long)