Re: How to automatically update files on alioth from svn

2005-11-30 Thread Frank Küster
Yann Dirson [EMAIL PROTECTED] wrote:

 Frank wrote:

 - how to authenticate the transfer, since the svn repository and the
   webspace is on different machines.

 https or svn+ssh to access the repo should provide the level of
 authentication you need, or do I miss something ?

With svn+ssh, I'd need a key without a password that allows logging into
the SVN server machine;  I'd prefer not to have that.  What do you mean
with https?  I don't want to only check out individual files from a
websvn site, but complete directories, including new files.

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Re: How to automatically update files on alioth from svn

2005-11-30 Thread Marc Haber
On Wed, 30 Nov 2005 15:31:34 +0100, Frank Küster [EMAIL PROTECTED]
wrote:
Yann Dirson [EMAIL PROTECTED] wrote:
 Frank wrote:
 - how to authenticate the transfer, since the svn repository and the
   webspace is on different machines.

 https or svn+ssh to access the repo should provide the level of
 authentication you need, or do I miss something ?

With svn+ssh, I'd need a key without a password that allows logging into
the SVN server machine;  I'd prefer not to have that.

You could restrict that key to be valid only from the IP address
belonging to the client box, and it should be possible to restrict the
key only to invoke a read-only svn server. I didn't try that with svn,
though.

For example,
|from=127.0.0.1,command=svnserve -t ssh-rsa 
B3NzaC1yc2EBIwAAAQEAu0DKRi2tHpQcpFLuBqLvS/LbOnBTMlkprHuJSQeglX/LW1
in an authorized_keys file allows the key to only be used if the
connection comes from localhost, and it _always_ invokes svnserve -t
instead of whatever command was requested on the command line. This
gives, however, read/write access to the repository.

Greetings
Marc

-- 
-- !! No courtesy copies, please !! -
Marc Haber |Questions are the | Mailadresse im Header
Mannheim, Germany  | Beginning of Wisdom  | http://www.zugschlus.de/
Nordisch by Nature | Lt. Worf, TNG Rightful Heir | Fon: *49 621 72739834



Re: How to automatically update files on alioth from svn

2005-11-30 Thread Anthony DeRobertis
Frank Küster wrote:

 What do you mean
 with https?  I don't want to only check out individual files from a
 websvn site, but complete directories, including new files.

http://svnbook.red-bean.com/en/1.1/ch06s04.html


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to automatically update files on alioth from svn

2005-11-29 Thread Yann Dirson
Frank wrote:
 I'd like to keep the files in the Project Home Page area of alioth in
 our SVN repository, and I'm looking for a way to automate the updating
 of these pages.

I have written a small post-commit hook for a somewhat different usage
(the original problem was versionning the hooks themselves).  It can
surely be improved (eg. by only running svn update when the commit
impacts the relevant part of the svn tree, like the gcc guys did in
their own script).

It only checks out (update, indeed) in a local directory, but it could
probably be modified to have the svn update command run through ssh
on the other machine.

You will find it at http://ydirson.free.fr/soft/svn/svn-auto-checkout
Documentation included in leading comments.

 Ideally, we would use some post-commit hook that causes the changed html
 file to be uploaded from svn.debian.org to alioth.debian.org, but I see
 two problems:
 
 - how to write the hook so that only specific files are uploaded, and
   put into the right location

Those are the 2 parameters to the script.

 - how to authenticate the transfer, since the svn repository and the
   webspace is on different machines.

https or svn+ssh to access the repo should provide the level of
authentication you need, or do I miss something ?

HTH
-- 
Yann Dirson[EMAIL PROTECTED] |
Debian-related: [EMAIL PROTECTED] |   Support Debian GNU/Linux:
|  Freedom, Power, Stability, Gratis
 http://ydirson.free.fr/| Check http://www.debian.org/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to automatically update files on alioth from svn

2005-11-29 Thread Richard Atterer
On Tue, Nov 29, 2005 at 10:30:04PM +0100, Yann Dirson wrote:
 I have written a small post-commit hook for a somewhat different usage 
 (the original problem was versionning the hooks themselves).

I've been doing this for quite a while with a variety of SVN repos, with 
very different users and content. Here are a few things I've run into:

- Ensure the correct locale setting is used, otherwise you'll run into 
trouble with non-ASCII filenames. For example, do export LANG=en_US if 
en_US defines the correct character set to use (UTF-8, ISO-8859-1, 
whatever...) For optimal results, svnserve should run with the same setting 
as the checkout script. ;-)

- Use the --non-interactive switch for svn up.

- Use svn cleanup if there is trouble during the svn up. A situation 
where this is necessary Should Not Happen (tm), but it surely has for me. 
:-/

- Do a fresh checkout if the destination dir does not contain a .svn 
subdirectory. (Of course you could do this manually, but with lots of repos 
it's very nice...)

- Consider putting a line use-commit-times = yes into the 
~/.subversion/config of the user that does the svn up. That way, 
checked-out files' timestamps will be those of their last change, not the 
time of the checkout. I like to use this for websites maintained in SVN - 
it allows you e.g. to create appropriate page last changed on .. 
messages.

BTW, it's not necessary to add locking to the script, AFAIK runs of the 
postcommit script will be serialized by SVN (at least for my libdb repos, 
dunno about FSFS!).

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer |  GnuPG key:
  | \/¯|  http://atterer.net  |  0x888354F7
  ¯ '` ¯


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



How to automatically update files on alioth from svn

2005-10-26 Thread Frank Küster
Hi,

I'd like to keep the files in the Project Home Page area of alioth in
our SVN repository, and I'm looking for a way to automate the updating
of these pages.

Ideally, we would use some post-commit hook that causes the changed html
file to be uploaded from svn.debian.org to alioth.debian.org, but I see
two problems:

- how to write the hook so that only specific files are uploaded, and
  put into the right location

- how to authenticate the transfer, since the svn repository and the
  webspace is on different machines.

Has anybody already set up something like this?  Or should I simply put
some syncing commands into my crontab on alioth and use anonymous SVN
access?

Regards, Frank
-- 
Frank Küster
Inst. f. Biochemie der Univ. Zürich
Debian Developer



Re: How to automatically update files on alioth from svn

2005-10-26 Thread Helmut Wollmersdorfer

Frank Küster wrote:


- how to write the hook so that only specific files are uploaded, and
  put into the right location



- how to authenticate the transfer, since the svn repository and the
  webspace is on different machines.


Has anybody already set up something like this?  


Only on the same machine.


Or should I simply put
some syncing commands into my crontab on alioth and use anonymous SVN
access?


Sounds easier for both (the specific files and the authentication).
Disadvantages: some time-lag, and maintainance of the cron scripts.

Helmut Wollmersdorfer


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: How to automatically update files on alioth from svn

2005-10-26 Thread Enrico Zini
On Wed, Oct 26, 2005 at 03:38:08PM +0200, Frank Küster wrote:

 I'd like to keep the files in the Project Home Page area of alioth in
 our SVN repository, and I'm looking for a way to automate the updating
 of these pages.

I've done if for a number of projects (like buffy).  You can have a look
at the hooks in buffy to see what they do, and I'll summarize it here.

To begin with, the webspace is an *anonymous* svn checkout of the files.
Then:

 - how to write the hook so that only specific files are uploaded, and
   put into the right location

In post-commit, I have:

  # Update the contents of the website
  if svnlook dirs-changed $REPOS | grep -q '^web/trunk/'
  then
echo Thanks | mail -s Update buffy web pages, please [EMAIL 
PROTECTED]
  fi

svnlook checks that the commit involve the web area.  The mail asks
haydn to call svn up; this is needed because the svn repo and the web
pages are not in the same machine.

 - how to authenticate the transfer, since the svn repository and the
   webspace is on different machines.

Then on haydn I have a procmail rule that sees the e-mail and calls svn
up appropriately.  Ask me again later if you need the procmail rule, as
I can't get to alioth right now).  If someone sends extra mails it's
just idempotent svn up commands so it wouldn't matter.  If you're
concerned about DOS attacks, touch a file after doing svn up and don't
do it again before one minute.

Better ideas would of course be welcome.


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini [EMAIL PROTECTED]


signature.asc
Description: Digital signature