RE: [Trac] trac-post-commit-hook not working

2011-06-01 Thread Mark Schrijver
Hey there,

This was indeed a problem with my webserver running as a different user then
my svn. I setup a protected cgi script on my webserver and pass all the
required preoperties (just revision number) from my svn post-commit hook to
my cgi script. Thiscgi script then calls the trac-post-commit-hook and
everything works like a charm.

Mark

-Oorspronkelijk bericht-
Van: Matthew Caron [mailto:matt.ca...@sixnet.com] 
Verzonden: woensdag 1 juni 2011 17:26
Aan: trac-users@googlegroups.com
CC: rac...@ractoc.com
Onderwerp: Re: [Trac] trac-post-commit-hook not working

On 06/01/2011 11:14 AM, rac...@ractoc.com wrote:
> Ah, but my emails are being sent and received correctly. So the 
> commit-email.pl is working as it should. I mainly added this to test 
> that the REPOS and the REV were being set correctly, and the are.

Okay, so then the second script is working. Debug the first.

It also might help if we know what it was supposed to do, and what it is not
doing.

> Is it possible that there is a problem with my TRAC_ENV?

Could be,

> I set this to
> the location of my trac webpage. There is one other snag, my trac 
> website runs as a different user.

Then likely the user running the hook can't read the env.

> Could this be causing problems,

Yes.

> and if  so, how do I get around that.

A couple of ways:
  1. Change perms
  2. sudo -u 

> Seeing that I can' change the owner on either side.  Changing the 
> owner on svn breaks my svn and changing the owner of the trac webpage 
> breaks trac.

Unsurprising. You can, however, put the svn user in a group, chgrp -R the
files so that they're owned by that group, then chmod the files so that
group has the necessary permissions.

--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com


-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] trac-post-commit-hook not working

2011-06-01 Thread Matthew Caron

On 06/01/2011 11:14 AM, rac...@ractoc.com wrote:

Ah, but my emails are being sent and received correctly. So the
commit-email.pl is working as it should. I mainly added this to test
that the REPOS and the REV were being set correctly, and the are.


Okay, so then the second script is working. Debug the first.

It also might help if we know what it was supposed to do, and what it is 
not doing.



Is it possible that there is a problem with my TRAC_ENV?


Could be,


I set this to
the location of my trac webpage. There is one other snag, my trac
website runs as a different user.


Then likely the user running the hook can't read the env.


Could this be causing problems,


Yes.


and if  so, how do I get around that.


A couple of ways:
 1. Change perms
 2. sudo -u 


Seeing that I can' change the owner on
either side.  Changing the owner on svn breaks my svn and changing the
owner of the trac webpage breaks trac.


Unsurprising. You can, however, put the svn user in a group, chgrp -R 
the files so that they're owned by that group, then chmod the files so 
that group has the necessary permissions.


--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] trac-post-commit-hook not working

2011-06-01 Thread ractoc
Ah, but my emails are being sent and received correctly. So the 
commit-email.pl is working as it should. I mainly added this to test 
that the REPOS and the REV were being set correctly, and the are.


Is it possible that there is a problem with my TRAC_ENV? I set this to 
the location of my trac webpage. There is one other snag, my trac 
website runs as a different user. Could this be causing problems, and if 
so, how do I get around that. Seeing that I can' change the owner on 
either side. Changing the owner on svn breaks my svn and changing the 
owner of the trac webpage breaks trac.


On Wed, 01 Jun 2011 08:09:54 -0400, Matthew Caron wrote:

On 06/01/2011 03:19 AM, rac...@ractoc.com wrote:

Content svn post-commit hook:


#!/bin/sh
REPOS=$1
REV=$2

export PYTHON_EGG_CACHE='/home/ractoc/svn/FIT/hooks/tmp'

TRAC_ENV="/home/ractoc/fit.ractoc.com/trac"

/usr/bin/python
/home/ractoc/fit.ractoc.com/trac/contrib/trac-post-commit-hook -p
"$TRAC_ENV" -r "$REV"


Add debug output to this script. See what it is doing.


/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV"
rac...@ractoc.com


And this one too.

The debugging output will help you determine where it is falling
down. It's possible that both of them are exiting because, for
example, the REPOS variable is wrong, or something.


--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] trac-post-commit-hook not working

2011-06-01 Thread Matthew Caron

On 06/01/2011 03:19 AM, rac...@ractoc.com wrote:

Content svn post-commit hook:


#!/bin/sh
REPOS=$1
REV=$2

export PYTHON_EGG_CACHE='/home/ractoc/svn/FIT/hooks/tmp'

TRAC_ENV="/home/ractoc/fit.ractoc.com/trac"

/usr/bin/python
/home/ractoc/fit.ractoc.com/trac/contrib/trac-post-commit-hook -p
"$TRAC_ENV" -r "$REV"


Add debug output to this script. See what it is doing.


/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV"
rac...@ractoc.com


And this one too.

The debugging output will help you determine where it is falling down. 
It's possible that both of them are exiting because, for example, the 
REPOS variable is wrong, or something.

--
Matthew Caron
Build Engineer
Sixnet | www.sixnet.com
O +1 518 877 5173 Ext. 138
F +1 518 602 9209
matt.ca...@sixnet.com

--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] trac-post-commit-hook not working

2011-06-01 Thread ractoc

Hello Micha,

Here is the info requested:

Trac info:

Trac:   0.11.1
Python: 2.5.2 (r252:60911, Jan 24 2010, 17:44:40) [GCC 4.3.2]
setuptools: 0.6c8
SQLite: 3.5.9
pysqlite:   2.4.1
Genshi: 0.5.1
Subversion: 1.5.1 (r32289)
jQuery: 1.2.6

Content svn post-commit hook:


#!/bin/sh
REPOS=$1
REV=$2

export PYTHON_EGG_CACHE='/home/ractoc/svn/FIT/hooks/tmp'

TRAC_ENV="/home/ractoc/fit.ractoc.com/trac"

/usr/bin/python 
/home/ractoc/fit.ractoc.com/trac/contrib/trac-post-commit-hook -p 
"$TRAC_ENV" -r "$REV"


/usr/share/subversion/hook-scripts/commit-email.pl "$REPOS" "$REV" 
rac...@ractoc.com

===

This seems to work ok, since I get an error from the 
trac-post-commit-hook when I put a non-exsisting trac_env in there. So 
my svn post-commit hook does end up in my trac-post-commit-hook.



I hope this is the info you needed.

Mark


On Wed, 1 Jun 2011 09:01:42 +0200, 3xIlling wrote:

Hi Mark,

The interesting point would be the trac version you are using and the
content of your post commit hook. ;-)

Micha

2011/5/30 Mark Schrijver


Hello,

 

Today I’ve been working on getting my SVN commits into my track
tickets. While I’m committing with the right command, I tried both
re #5 and addresses #5, my ticket isn’t being updated.

I tried running from the command line, like the FAQ suggests, and it
doesn’t work either. I can see the trac-post-commit-hook being
called, since it produces errors when I enter a non-exsisting svn
repo. But when I enter all the right values, nothing happens.

 

Any ideas what might be causing this?

 

Mark

--
You received this message because you are subscribed to the Google
Groups "Trac Users" group.
To post to this group, send email to trac-users@googlegroups.com
[1].
To unsubscribe from this group, send email to
trac-users+unsubscr...@googlegroups.com [2].
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en [3].


 --
 You received this message because you are subscribed to the Google
Groups "Trac Users" group.
 To post to this group, send email to trac-users@googlegroups.com.
 To unsubscribe from this group, send email to
trac-users+unsubscr...@googlegroups.com.
 For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.


Links:
--
[1] mailto:trac-users@googlegroups.com
[2] mailto:trac-users%2bunsubscr...@googlegroups.com
[3] http://groups.google.com/group/trac-users?hl=en
[4] mailto:rac...@ractoc.com


--
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] trac-post-commit-hook not working

2011-06-01 Thread 3xIlling
Hi Mark,

The interesting point would be the trac version you are using and the
content of your post commit hook. ;-)

Micha


2011/5/30 Mark Schrijver 

> Hello,
>
>
>
> Today I’ve been working on getting my SVN commits into my track tickets.
> While I’m committing with the right command, I tried both re #5 and
> addresses #5, my ticket isn’t being updated.
>
> I tried running from the command line, like the FAQ suggests, and it
> doesn’t work either. I can see the trac-post-commit-hook being called, since
> it produces errors when I enter a non-exsisting svn repo. But when I enter
> all the right values, nothing happens.
>
>
>
> Any ideas what might be causing this?
>
>
>
> Mark
>
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To post to this group, send email to trac-users@googlegroups.com.
> To unsubscribe from this group, send email to
> trac-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



[Trac] trac-post-commit-hook not working

2011-05-30 Thread Mark Schrijver
Hello,

 

Today I've been working on getting my SVN commits into my track tickets.
While I'm committing with the right command, I tried both re #5 and
addresses #5, my ticket isn't being updated.

I tried running from the command line, like the FAQ suggests, and it doesn't
work either. I can see the trac-post-commit-hook being called, since it
produces errors when I enter a non-exsisting svn repo. But when I enter all
the right values, nothing happens.

 

Any ideas what might be causing this?

 

Mark

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-users@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.