[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A bunch of questions about commitinfo

From: Greg A. Woods
Subject: Re: A bunch of questions about commitinfo
Date: Thu, 8 Nov 2001 13:18:14 -0500 (EST)

[ On Thursday, November 8, 2001 at 11:53:07 (+0100), Marc Haber wrote: ]
> Subject: A bunch of questions about commitinfo
> I feel that commitinfo is the correct place to do this. However, I
> would like to ask if somebody has already done this and might care to
> share experiences.

It should work -- if the program called by commitinfo exits non-zero the
commit operation is failed....

It might be a lot easier though to simply institute a checking process
that people are drilled to run prior to doing any commits.  Eg.:

        make check

Either way the biggest problem I see is with how you will detect any
errors.  IIRC 'named' won't even begin to load the zone files until it's
opened the socket it'll listen for queries on.  You can of course create
a special config that listens on some unused high-numbered random port,
and which writes the log messages related to zone file loading
explicitly to a specified file, and you can start it so it runs only in
the foreground.  I don't quite know how you get it to exit after it's
done loading the files though.  Named doesn't have a '-t' flag like
dhcpd does.

> Am I allowed to make changes to the repository in my commitinfo
> script?

Nope.  Why would you want to?  All you're supposed to be doing here is
validating the source files and either approving them or rejecting them.

> Does the user committing see the output of my commitinfo script?

Hmmmm... yes, stderr at least, if the commit is done on the server.  I
don't know what happens if the commit is done from a remote client.....

> Any hints will be appreciated. Thanks in advance.

If you're comfortable with using perl for this task then have a look at
the contrib/ script.  It validates the $Id in the source
file.  You could simply extend it to also do a test of the file syntax.

                                                        Greg A. Woods

+1 416 218-0098      VE3TCP      <address@hidden>     <address@hidden>
Planix, Inc. <address@hidden>;   Secrets of the Weird <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]