Koozali.org: home of the SME Server

[ANNOUNCE] smeserver-trac contrib

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
[ANNOUNCE] smeserver-trac contrib
« on: March 25, 2007, 06:20:55 PM »
Hi All,

For those of you who would like to use Trac on your SME server, I like to announce the availability of the an updated smeserver-trac contrib.

The contrib has the following features:
  • Simple setup of Trac environments through SME server-manager panel
  • Can be selectively enabled per domain
  • Access configurable for ''Local Network Only'' or ''Entire Internet''
  • Configurable list of users and/or user groups that are allowed to login.
  • User authentication uses SME user names and passwords
  • Complements the smeserver-subversion contrib with a powerfull repository browser giving a very nice view of change sets in your repository and syntax colouring and line number views of your repository files.
  • Many Trac configuration items automatically configured and updated by the SME server configuration.
  • Preset Trac permissions with ''anonymous'' users mostly having read only access and wiki create and write access only granted to ''authenticated''  users.
  • SME ''admin'' is also the Trac Administrator.
  • Trac WebAdmin interface accessible  to the ''admin'' user for further

    configuration of ''components'', ''versions'',  ''milestones'' and
    ''permissions''.[/list]

For the moment the smeserver-trac contrib and a set of associated rpms are available from my own server. It may be easiest to set it up as a repository in yum as follows:

Code: [Select]
db yum_repositories set through-ip repository \
   BaseURL http://through-ip.com/packages/smeserver/i386/ \
   Name 'Through IP Pty. Ltd. Packages Repository' \
   EnableGroups yes \
   Visible yes \
   GPGCheck no \
   status disabled

expand-template /etc/yum.conf

yum --enablerepo=smedev --enablerepo=through-ip install smeserver-trac


Please note that this is a preliminary release and may not be completely stable (although it works for me), so use at your own peril.

This is my first project at building a contrib for SME and I welcome your (constructive) comments and feedback.

Enjoy!

Marco Hess
Adelaide - Australia

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] smeserver-trac contrib
« Reply #1 on: March 27, 2007, 04:39:56 AM »
Great stuff!
Thanks,

Missing mod_python:
Error: Missing Dependency: mod_python is needed by package smeserver-mod_python
Error: Missing Dependency: mod_python >= 3.1 is needed by package smeserver-trac

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] smeserver-trac contrib
« Reply #2 on: March 27, 2007, 05:52:18 AM »
Ouch!
Code: [Select]

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
6953 root      25   0 1275m 839m  800 R  100 83.8   1:47.26 trac-admin

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
[ANNOUNCE] smeserver-trac contrib
« Reply #3 on: March 27, 2007, 06:28:43 AM »
Quote from: "stuntshell"
Missing mod_python:
Error: Missing Dependency: mod_python is needed by package smeserver-mod_python
Error: Missing Dependency: mod_python >= 3.1 is needed by package smeserver-trac


mod_python is actually available from the base repository which I think is enabled as standard on new SME installs.

However, I have copied the mod_python rpm into my own repository for convenience

Cheers,
Marco
Adelaide - Australia

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
[ANNOUNCE] smeserver-trac contrib
« Reply #4 on: March 27, 2007, 06:35:02 AM »
Quote from: "stuntshell"
Ouch!
Code: [Select]

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
6953 root      25   0 1275m 839m  800 R  100 83.8   1:47.26 trac-admin


What where you doing when that happened? Is there anything in your logs that indicate what is going on?

trac-admin is only used during the creation of a new trac project environment.

Marco
Adelaide - Australia

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] smeserver-trac contrib
« Reply #5 on: March 27, 2007, 06:38:34 AM »
exactly what I was doing, creating a new trac project.
I had to kill it as it hung there for over 10 minutes and my other processes started to die  :(

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
[ANNOUNCE] smeserver-trac contrib
« Reply #6 on: March 27, 2007, 06:45:45 AM »
Quote from: "stuntshell"
exactly what I was doing, creating a new trac project.
I had to kill it as it hung there for over 10 minutes and my other processes started to die  :(


Can you quote me the exact parameters that you used in the SME panel or send me a screenshot of the panel just before you press the ADD button so I can try to reproduce it?

Marco
Adelaide - Australia

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] smeserver-trac contrib
« Reply #7 on: March 27, 2007, 07:01:23 AM »
The only thing I can think of is that I used a '.' in both names:
subversion sub.one and test.trac

Adding more info:
I cannot delete the Trac Project that never got created:
Code: [Select]


Operation status report
Can't find account for Trac project environment "test.trac" (does it exist?)

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
[ANNOUNCE] smeserver-trac contrib
« Reply #8 on: March 27, 2007, 07:25:48 AM »
Quote from: "stuntshell"
The only thing I can think of is that I used a '.' in both names:
subversion sub.one and test.trac

Adding more info:
I cannot delete the Trac Project that never got created:
Code: [Select]


Operation status report
Can't find account for Trac project environment "test.trac" (does it exist?)


I just tried that and the Trac environment creates without a hitch so I think it must be something else. I tried various strange names and they either work or an validation error is raised. I even tried to remove the trac parent directory and all this produces are error notifications in the SME panel, but never a trac-admin process that hangs with 100% CPU.

Are you able to reproduce the problem consistently?

Also I am assuming that you did NOT have Trac installed prior to installing smeserver-trac and that the yum install pulled all the packages from my repository?

Cheers,

Marco
Adelaide - Australia

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
[ANNOUNCE] smeserver-trac contrib
« Reply #9 on: March 27, 2007, 07:39:35 AM »
Quote from: "stuntshell"

I cannot delete the Trac Project that never got created:
Code: [Select]
Operation status report
Can't find account for Trac project environment "test.trac" (does it exist?)


That error only comes up when the trac environment name cannot be found in the accounts database and when it does not exist, it should not have show up in the "Current list of Trac project environments:" table on the first page of the panel.

On my test system it shows as follows:
Code: [Select]

# db accounts show trac.test
trac.test=trac
    Access=local
    Description=Trac Test
    Groups=
    Modifiable=yes
    Removable=yes
    Repository=sub.test
    RepositoryPath=
    Users=


See if you can find your trac environment in the accounts database like above and post the result of that.

Cheers,

Marco
Adelaide - Australia

FlameDuck

Cheers.
« Reply #10 on: March 27, 2007, 10:35:56 AM »
Works like a charm here, thanks a lot man!

Offline Franco

  • *
  • 1,171
  • +0/-0
    • http://contribs.org
[ANNOUNCE] smeserver-trac contrib
« Reply #11 on: March 27, 2007, 03:14:58 PM »
OK, so maybe it's time for a reinstall...
just so you know:
db accounts does show exactly as yours, and I installed using yum.
I'll reply back after install on a fresh system
 :wink:

Offline dlj

  • 5
  • +0/-0
Thankyou thf - just what I needed.
« Reply #12 on: March 27, 2007, 10:21:16 PM »
Installation was easy - after I found mod_python :)

However I am in the UK and would prefer the dates in a UK format.
Currently milestone dates are displayed as "Due in 3 days (03/30/07)"
And I would like it to be "Due in 3 days (30/03/07)"

I have checked my env and LANG=en_GB
This is setup in /etc/sysconfig/iL8n

Is there anywhere else that I need to set up the locale?

This is looking very good for me - just what I needed to look after my remote customers

Offline dlj

  • 5
  • +0/-0
Re: Thankyou thf - just what I needed.
« Reply #13 on: March 27, 2007, 11:53:16 PM »
Quote from: "dlj"
I
However I am in the UK and would prefer the dates in a UK format.
Currently milestone dates are displayed as "Due in 3 days (03/30/07)"
And I would like it to be "Due in 3 days (30/03/07)"

I have checked my env and LANG=en_GB
This is setup in /etc/sysconfig/iL8n


Fixed it -
In etc/httpd/conf/httpd.conf
after each line that is = "SetHandler mod_python"
added a line = "    PythonOption TracLocale "en_GB"

I had to do it twice, but only have one trac project - maybe I have done something wrong - but it now displays the date in the required format :)

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: Thankyou thf - just what I needed.
« Reply #14 on: March 28, 2007, 12:44:52 AM »
Quote from: "dlj"

In etc/httpd/conf/httpd.conf
after each line that is = "SetHandler mod_python"
added a line = "    PythonOption TracLocale "en_GB"


That is indeed the sort of thing that needs to bin in httpd.conf to get Trac in the right locale. I did the same thing for en_AU to get the dates right.

However you need to be carefull if you edited /etc/httpd/conf/httpd.conf
directly as it will be overwritten on the next reconfiguration of SME.

I need to figure out what the configured locale of the SME installation is so I can put that in the httpd template. At the moment SME for english language appears to be mainly en_US :-)

Marco
Adelaide - Australia