[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Hooks behaviour with svnsync

From: Radomir Zoltowski <radomir.zoltowski_at_s3group.com>
Date: Thu, 03 Sep 2009 12:21:44 +0100

David, thanks for your insight.

If I more think if it, it more occurs to me, that it indeed may be an
unfinished work in svnsync. Switches would need correctly setup SSH,
anyway, but they should not be ignored, just because I use different
carrier for SVN protocol.

I presume, that if anyone can cofirm that this is a bug, it should be
filed in. At the moment I am the only one and I have a workaround...

Regards,
Radomir

David Weintraub wrote:
> I wonder if it has anything to do with the ssh authorization method
> you're using. I've used svnsync before without any problem, but I
> never did it through ssh -- let alone having setup ssh not to require
> a password (via Subversion, that is).
>
> It could be, that the mirror Subversion repository, because you're the
> user logging into SSH, that it simply ignores the --sync-username, and
> that svnsync is simply not passing the user credentials.
>
> It could also be an unanticipated issue with the svnsync binary
> itself. Maybe it simply ignores the command line switches or not using
> the Subversion API correctly.
>
> Anyone else has had this issue with svnsync and ssh?
>
> On Wed, Sep 2, 2009 at 12:08 PM, Radomir Zoltowski
> <Radomir.Zoltowski_at_s3group.com <mailto:Radomir.Zoltowski_at_s3group.com>>
> wrote:
>
> I'll use bad, yet convenient top-posting...
>
> I run svnsync as me ('rz'), but I thought that '--sync-username
> svnsync' will impersonate svnsync to the 'svnsync' user. This is
> actually what the mentioned article says between the lines, but
> obviously it is not the case.
>
> The closest I can get is to make svnsync impersonate as 'svnsync'
> user this way:
>
> - $SVNSYNC synchronize svn+ssh://MIRROR_REPO --source-username
> svnsync --sync-username svnsync &
> + $SVNSYNC synchronize svn+ssh://svnsync@MIRROR_REPO &
>
> Otherwise pre-revprop-change exits 1 for every user bar 'svnsync',
> including me. And yes, I printed $3 out from pre-revprop-change
> and it's me ('rz'). start-commit is not even executed. All
> processes (svnsync => svnserve -t) are, too, owned by me.
>
> The question is what is the purpose of these useless switches then?
>
> Radomir
>
>
> David Weintraub wrote:
>> Are you sure that you're sending your revisions to your svnsync
>> mirror as your svnsync user? Apparently, svnsync is thinking
>> you're someone else. You did say you were using the
>> "--sync-username switch. Right?
>>
>> Have your start-commit hook fail and print out (to STDERR) the
>> user it thinks is calling the syncsvn.
>>
>> On Wed, Sep 2, 2009 at 10:26 AM, Radomir Zoltowski
>> <Radomir.Zoltowski_at_s3group.com
>> <mailto:Radomir.Zoltowski_at_s3group.com>> wrote:
>>
>>
>>
>> Johan Corveleyn wrote:
>>
>> On Tue, Sep 1, 2009 at 12:55 PM, Radomir Zoltowski
>> <radomir.zoltowski_at_s3group.com
>> <mailto:radomir.zoltowski_at_s3group.com>
>>
>>
>> <mailto:radomir.zoltowski_at_s3group.com
>> <mailto:radomir.zoltowski_at_s3group.com>>>
>>
>>
>> wrote:
>>
>> Hi all,
>>
>> I am having a little problem to make svnsync
>> work through
>> post-commit +
>> pre-revprop-change pair. My setup is logically
>> identical to
>>
>>
>> this one:
>>
>>
>>
>> http://blogs.open.collab.net/svn/2007/08/mirroring-repos.html
>>
>> However, if I perform a commit as a user other
>> than
>>
>>
>> 'svnsync', the
>>
>>
>> post-commit works to the point that is
>> executes pre-revprop-
>>
>>
>> change on
>>
>>
>> the mirror. Then the pre-revprop-change on
>> mirror fails as it
>>
>>
>> sees
>>
>>
>> $USER
>> as my username instead of 'svnsync'. It fails
>> with:
>>
>> Warning: post-commit hook failed (exit code 1)
>> with output:
>> svnsync: Revprop change blocked by
>> pre-revprop-change hook
>>
>>
>> (exit
>>
>>
>> code 1)
>> with output:
>> Only the svnsync user may change revision
>> properties as this
>>
>>
>> is a
>>
>>
>> read-only, mirror repository.
>>
>>
>>
>> What does your pre-revprop-change hook look like on the
>> mirror?
>>
>> Johan
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2390150
>> <http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2390150>
>>
>> To unsubscribe from this discussion, e-mail:
>> [users-unsubscribe_at_subversion.tigris.org
>> <mailto:users-unsubscribe_at_subversion.tigris.org>].
>>
>>
>> It's again, very much generic.
>>
>> USER="$3"
>>
>> if [ "$USER" = "svnsync" ]; then exit 0; fi
>>
>> echo "Only the svnsync user may change revision properties as
>> this is a read-only, mirror repository." >&2
>> exit 1
>>
>>
>> Radomir
>>
>> The information contained in this e-mail and in any
>> attachments is confidential and is designated solely for the
>> attention of the intended recipient(s). If you are not an
>> intended recipient, you must not use, disclose, copy,
>> distribute or retain this e-mail or any part thereof. If you
>> have received this e-mail in error, please notify the sender
>> by return e-mail and delete all copies of this e-mail from
>> your computer system(s).
>> Please direct any additional queries to:
>> communications_at_s3group.com <mailto:communications_at_s3group.com>.
>> Thank You.
>> Silicon and Software Systems Limited. Registered in Ireland
>> no. 378073.
>> Registered Office: South County Business Park, Leopardstown,
>> Dublin 18
>>
>>
>>
>>
>> --
>> David Weintraub
>> qazwart_at_gmail.com <mailto:qazwart_at_gmail.com>
>
> ------------------------------------------------------------------------
> The information contained in this e-mail and in any attachments is
> confidential and is designated solely for the attention of the
> intended recipient(s). If you are not an intended recipient, you
> must not use, disclose, copy, distribute or retain this e-mail or
> any part thereof. If you have received this e-mail in error,
> please notify the sender by return e-mail and delete all copies of
> this e-mail from your computer system(s). Please direct any
> additional queries to: communications_at_s3group.com
> <mailto:communications_at_s3group.com>. Thank You. Silicon and
> Software Systems Limited. Registered in Ireland no. 378073.
> Registered Office: South County Business Park, Leopardstown,
> Dublin 18
> ------------------------------------------------------------------------
>
>
>
>
> --
> David Weintraub
> qazwart_at_gmail.com <mailto:qazwart_at_gmail.com>

The information contained in this e-mail and in any attachments is confidential and is designated solely for the attention of the intended recipient(s). If you are not an intended recipient, you must not use, disclose, copy, distribute or retain this e-mail or any part thereof. If you have received this e-mail in error, please notify the sender by return e-mail and delete all copies of this e-mail from your computer system(s).
Please direct any additional queries to: communications_at_s3group.com.
Thank You.
Silicon and Software Systems Limited. Registered in Ireland no. 378073.
Registered Office: South County Business Park, Leopardstown, Dublin 18

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2390603

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-03 13:56:11 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.