Koozali.org: home of the SME Server

[ANNOUNCE] smeserver-trac contrib

Offline timb

  • **
  • 41
  • +0/-0
    • http://www.tbitc.com
progress report - good news
« Reply #60 on: December 05, 2007, 09:36:37 PM »
Hi
Just to report that my new install on my virtual server came alive no problems last night.

Now it's a matter of trying to restore the trac data. The subversion data was easy - I had dumps only an hour old.

I havent looked yet - I guess trac establishes an account? for each trac. Where are they stored? I will bring them over from my old server.

BTW the old server - the installation there is now a burning wreck. Perhaps today I will find some moments to put the fire out and rebuild it.

thanks

timb

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: progress report - good news
« Reply #61 on: December 06, 2007, 12:05:34 AM »
I havent looked yet - I guess trac establishes an account? for each trac. Where are they stored? I will bring them over from my old server.

Hi timb,
My suggestion would be to create new trac environments through the server manager panel the same as you had them on your old server. This puts all the templates in place. Then copy the trac environment directory from the old server and copy them over the newly created environment on the new server. You may need to do a 'trac-admin resync' to make sure that trac and subversion are synced to each other.

Trac environments are stored under /home/e-smith/files/trac/...

The accounts db hold the trac info for SME like the following example:

Code: [Select]
# db accounts show smecontribs
smecontribs=trac
    Access=local
    Description=SME Server Contribs
    Domains=through-ip.com
    Groups=staff
    Modifiable=yes
    Removable=yes
    Repository=smecontribs-repository
    RepositoryPath=
    Users=

Success!

Marco
Adelaide - Australia

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #62 on: January 13, 2008, 09:04:29 PM »
Installing Trac

Error: Missing Dependency: python(abi) = 2.4 is needed by package python-imaging
Error: Missing Dependency: python >= 2.4 is needed by package python-imaging
Error: Missing Dependency: rtld(GNU_HASH) is needed by package python-imaging
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package python-imaging

yum clean all > no change

ServMgr default repos set

[root@server72 ~]# yum whatprovides python-imaging
==============================================================
WARNING: Additional commands may be required after running yum
==============================================================
Loading "fastestmirror" plugin
Loading "smeserver" plugin
Searching Packages:
Setting up repositories
Loading mirror speeds from cached hostfile
Reading repository metadata in from local files
Excluding Packages from CentOS - os
Finished
Excluding Packages from CentOS - updates
Finished
Importing Additional filelist information for packages
No Matches found
================================================================
No new rpms were installed. No additional commands are required.
================================================================
[root@server72 ~]#

I have a local rsync of SME repos and

# locate python-imaging

/var/cache/yum/through-ip/headers/python-imaging-1.1.6-2.el5.rf.i386.hdr

/repo/smeserver/releases/7.3/smecontribs/i386/RPMS/python-imaging-1.1.4-1.i386.rpm
/repo/smeserver/releases/7.3/smecontribs/i386/repodata/repoview/python-imaging-0-1.1.4-1.html
/repo/smeserver/releases/7.3/smecontribs/SRPMS/python-imaging-1.1.4-1.src.rpm

Seems to be a conflict between repos.

copy/paste from putty

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

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #63 on: January 13, 2008, 09:40:12 PM »
Also


yum  --enablerepo=through-ip install python-imaging

Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package python-imaging.i386 0:1.1.6-2.el5.rf set to be updated
--> Running transaction check
--> Processing Dependency: libtcl8.4.so for package: python-imaging
--> Processing Dependency: python(abi) = 2.4 for package: python-imaging
--> Processing Dependency: libtk8.4.so for package: python-imaging
--> Processing Dependency: python >= 2.4 for package: python-imaging
--> Processing Dependency: rtld(GNU_HASH) for package: python-imaging
--> Processing Dependency: libc.so.6(GLIBC_2.4) for package: python-imaging
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package tk.i386 0:8.4.7-2 set to be updated
---> Package tcl.i386 0:8.4.7-2 set to be updated
--> Running transaction check
--> Processing Dependency: python(abi) = 2.4 for package: python-imaging
--> Processing Dependency: rtld(GNU_HASH) for package: python-imaging
--> Processing Dependency: libc.so.6(GLIBC_2.4) for package: python-imaging
--> Processing Dependency: python >= 2.4 for package: python-imaging
--> Finished Dependency Resolution
Error: Missing Dependency: python(abi) = 2.4 is needed by package python-imaging
Error: Missing Dependency: python >= 2.4 is needed by package python-imaging
Error: Missing Dependency: rtld(GNU_HASH) is needed by package python-imaging
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package python-imaging

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #64 on: January 14, 2008, 12:50:22 AM »
See the wiki for latest info http://wiki.contribs.org/Trac

Would have been nice if the above link was edited into the thread somewhere....oh well....

This thread is old

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

Kinda found solution to it before I found the wkik trac...haha

With that said not sure if there's a bug when opening a project

Code: [Select]
Internal Error

The user www requires read _and_ write permission to the database file /home/e-smith/files/trac/installer/db/trac.db and the directory it is located in.




« Last Edit: January 14, 2008, 05:22:25 AM by electroman00 »

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #65 on: January 14, 2008, 02:46:08 AM »
Installing Trac

Error: Missing Dependency: python(abi) = 2.4 is needed by package python-imaging
Error: Missing Dependency: python >= 2.4 is needed by package python-imaging
Error: Missing Dependency: rtld(GNU_HASH) is needed by package python-imaging
Error: Missing Dependency: libc.so.6(GLIBC_2.4) is needed by package python-imaging

yum clean all > no change

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

Sorry. I caused the python-imaging problem when I was collecting some updated rpm's
to test the contrib for sme8. I have removed them from my repository and smeserver-trac
installes correctly again as per the contribs wiki for Trac http://wiki.contribs.org/Trac.

Regards,

Marco
Adelaide - Australia

Offline electroman00

  • ****
  • 491
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #66 on: January 14, 2008, 04:59:22 AM »
No problem Marco

I resolved issue with the following shell commands.

signal-event trac dev caused problem
signal-event trac dev needs horse whipping
signal-event trac dev terminate if happens again
signal-event trac dev Thank You

Offline cristihcd

  • 4
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #67 on: February 27, 2008, 01:31:58 PM »
Hello,

First congratulations for a great contrib. It works perfectly for me with subversion.

I have the following question:

How can I modify the default permissions for a new TRAC project? I want to move anonymous permissions to authenticated permissions.

Thank you

Offline cristihcd

  • 4
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #68 on: February 27, 2008, 04:05:40 PM »
I have solved it in a very elegant way :p


trac-admin proiect/ permission add authenticated LOG_VIEW FILE_VIEW SEARCH_VIEW REPORT_VIEW TICKET_VIEW BROWSER_VIEW TIMELINE_VIEW CHANGESET_VIEW ROADMAP_VIEW MILESTONE_VIEW WIKI_CREATE WIKI_MODIFY WIKI_DELETE TICKET_CREATE TICKET_MODIFY REPORT_SQL_VIEW


trac-admin proiect/ permission remove anonymous LOG_VIEW FILE_VIEW SEARCH_VIEW REPORT_VIEW TICKET_VIEW BROWSER_VIEW TIMELINE_VIEW CHANGESET_VIEW ROADMAP_VIEW MILESTONE_VIEW

How do I customize the "starting point" for example? Do I create a trac.ini in /usr/share/trac?

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #69 on: February 27, 2008, 11:07:06 PM »
I have the following question:

How can I modify the default permissions for a new TRAC project? I want to move anonymous permissions to authenticated permissions.

The contrib has the TracWebAdmin plugin integrated, so the easiest way is to just login on your trac project using 'admin' and your SME 'admin' password.

You'll then find an 'Admin' menu item all on the right hand side. Within there you can manage the settings of your Trac project including permissions.

Not sure what you mean with the 'starting point'.
Can't you edit the wiki home page and make it your 'starting point'?

Regards,

Marco
Adelaide - Australia

Offline cristihcd

  • 4
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #70 on: February 29, 2008, 01:13:08 AM »
Hi Marco,

By starting point I meant default settings for new TRAC projects, like default wiki startpage content, settings, etc.

I have already modified the startpage (usr/share/trac...), I wanted to add a menu link for a custom ticket query. I believe I can do it from trac.ini in every project, I just don't like to do it for every project the engineers add (and they add like 2 per week now). Maybe I'm just lazy :)

Thanks,
Cristi

Offline varunv

  • 6
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #71 on: March 13, 2008, 01:53:54 PM »
Hi thf!

First of all thanks for this great contrib - makes life very simple with Trac and SME Server.

Would be very grateful if you could help me out with a couple of issues:

1. I want to make sure that when users try and access any section on Trac within a particular project, they should be prompted for for authentication.

If I do something like: trac-admin /projectenv permission remove anonymous WIKI_VIEW, all that happens when an un-authenticated user tries to open the Wiki is that Trac displays the following error:

"WIKI_VIEW privileges are required to perform this operation"

and Trac does not prompt for authentication. Trac works as expected if the user logs in through the "Login" link.

So, how do I coax Trac/SME Server in asking for authentication when needed - alternatively asking for authentication when accessing any part of a Trac project - be it Wiki, Tickets or Timeline.

2. My TracWebAdmin plugin does not seem to be working - the "Admin" link does not show up if I login using SME Server's admin username and password (or the username/password of a user with TRAC_ADMIN permissions)

3. Please correct me if I'm wrong here - but I can install Trac Plugins for this contrib the way I would normally for a clean install of Trac, right? I mean - I should be able to use easy_install to install plugins globally?

Thanks again for the great work put in by you and here's hoping that you (or someone else!) would be able to help me out.

Regards,
-Varun

Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #72 on: March 13, 2008, 03:42:11 PM »
1. I want to make sure that when users try and access any section on Trac within a particular project, they should be prompted for for authentication.

If I do something like: trac-admin /projectenv permission remove anonymous WIKI_VIEW, all that happens when an un-authenticated user tries to open the Wiki is that Trac displays the following error:

"WIKI_VIEW privileges are required to perform this operation"

and Trac does not prompt for authentication. Trac works as expected if the user logs in through the "Login" link.

So, how do I coax Trac/SME Server in asking for authentication when needed - alternatively asking for authentication when accessing any part of a Trac project - be it Wiki, Tickets or Timeline.

I understand what you are saying but I am not sure thats how it supposed to work. What my contrib essentially does is hooking the trac environment into the webserver templates and ensuring that the login uses the names/passwords of the SME users and that the 'admin' user has TRAC_ADMIN rights. Beyond that it is really only the Trac access control system and I don't think it was designed to be really secure. The way I use it, is on internal company LAN's where generally most users (anonymous) are allowed to view most of the Trac environment and the project users are the ones that have write access to the rest. And even then, my biggest use for Trac is mainly the Subversion source code browsing and changesets viewing and a little bit of the ticket system.

I suggest you have a look at the Trac website forums is there are any suggestions there.

2. My TracWebAdmin plugin does not seem to be working - the "Admin" link does not show up if I login using SME Server's admin username and password (or the username/password of a user with TRAC_ADMIN permissions)

Have a look at the /var/log/messages log file and see if there are any messages from Trac in there. Particularly look at the moment when the Trac environment starts up (system start up) and/or when the 'admin' user logs in.

Also, are you sure that the trac rpm that was installed, was the one from the smecontribs area and not the one from the 'dag' or 'atrpms' repositiries as those ones don't have the WebAdmin installed by default.

3. Please correct me if I'm wrong here - but I can install Trac Plugins for this contrib the way I would normally for a clean install of Trac, right? I mean - I should be able to use easy_install to install plugins globally?

Again, these is more a Trac question and goes beyond what the smeserver-trac contrib does. Other than the webadmin plugin as a default install and a special patch to allow the sme user authentication, it is the normal Trac environment and additional Trac Plugins should work (assuming they are compativle with the Trac version). De current stable trac version from the smecontribs area is 0.10.4

Regards,

Marco

« Last Edit: March 13, 2008, 03:43:45 PM by thf »
Adelaide - Australia

Offline varunv

  • 6
  • +0/-0
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #73 on: March 14, 2008, 03:31:40 PM »
Marco!

First of all, thank you for such a quick reply.

I understand what you are saying but I am not sure thats how it supposed to work. What my contrib essentially does is hooking the trac environment into the webserver templates and ensuring that the login uses the names/passwords of the SME users and that the 'admin' user has TRAC_ADMIN rights. Beyond that it is really only the Trac access control system and I don't think it was designed to be really secure. The way I use it, is on internal company LAN's where generally most users (anonymous) are allowed to view most of the Trac environment and the project users are the ones that have write access to the rest. And even then, my biggest use for Trac is mainly the Subversion source code browsing and changesets viewing and a little bit of the ticket system.

Thanks for clearing this up. What we did after finding this out was to add a field to the "Trac Project Environment" form called "Allow Anonymous Access?" which is set to 'Yes' by default so that anonymous users can view the Wiki, Tickets etc. If a user sets this to 'No', then Trac will prompt for authentication even for viewing the Wiki etc. This has been achieved by modifying the httpd.conf template to include the authentication related directives under the <Location /projectenv> directive instead of the <Location /projectenv/login> directive when the user choses to disable anonymous access.

The following files have been modified for this:

/etc/e-smith/web/panels/manager/cgi-bin/trac
/etc/e-smith/locale/en-us/etc/e-smith/web/functions/trac
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/trac.pm
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29TracProjects

Please let me know if you wish to review our changes for possible inclusion in your contrib.

Have a look at the /var/log/messages log file and see if there are any messages from Trac in there. Particularly look at the moment when the Trac environment starts up (system start up) and/or when the 'admin' user logs in.

Also, are you sure that the trac rpm that was installed, was the one from the smecontribs area and not the one from the 'dag' or 'atrpms' repositiries as those ones don't have the WebAdmin installed by default.


Thanks for this pointer. We had accidentally installed a copy of the WebAdmin plugin before realizing that it is  already built into your contrib. And now we have a version conflict as per our logs - would look into it.

Again, these is more a Trac question and goes beyond what the smeserver-trac contrib does. Other than the webadmin plugin as a default install and a special patch to allow the sme user authentication, it is the normal Trac environment and additional Trac Plugins should work (assuming they are compativle with the Trac version). De current stable trac version from the smecontribs area is 0.10.4

Just wanted to check that there is no heavy black magic that you were using - will try out some plugins that we have installed on our existing Trac installation and see how they play with this contrib - will keep you posted.

We live by Trac and use all it's features extensively - we are migrating Trac from an existing installation to our SME server and your contrib is a big timesaver - so thanks again!



Offline Marco Hess

  • *
  • 149
  • +0/-0
    • http://www.through-ip.com
Re: [ANNOUNCE] smeserver-trac contrib
« Reply #74 on: March 16, 2008, 05:53:18 AM »
The following files have been modified for this:

/etc/e-smith/web/panels/manager/cgi-bin/trac
/etc/e-smith/locale/en-us/etc/e-smith/web/functions/trac
/usr/lib/perl5/site_perl/esmith/FormMagick/Panel/trac.pm
/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/29TracProjects

Please let me know if you wish to review our changes for possible inclusion in your contrib.

Sure, if you can send me a diff or patch of the changes made, I'll have a look at them. Better yet, open an enhancement request on Bugzilla and upload your patch there. Here is the link to get there: http://bugs.contribs.org/enter_bug.cgi?product=SME%20Contribs&component=smeserver-trac&short_desc=&comment=

Just wanted to check that there is no heavy black magic that you were using

Still no black magic, but at creation & modification time, there are a couple of trac.ini settings that are manipulated from the scripts.
Look in /etc/e-smith/events/actions/trac-project-create and /etc/e-smith/events/actions/trac-project-modify for the details.

We live by Trac and use all it's features extensively - we are migrating Trac from an existing installation to our SME server and your contrib is a big timesaver - so thanks again!

Your welcome. Just glad others find it useful too.

Cheers,

Marco
Adelaide - Australia