Re: RCS control for config files

2002-07-06 Thread Martin Schulze
Alex Borges wrote:
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 

I passed that point already...

> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..

For two remote servers, one of them is maintained by a group of three
people currently, we decided to use CVS and some scripts for
configuring the systems.

The configuration for one of these systems is online at

(you can check it out using anonymous CVS as well.)

Let me give a brief description how it works:

 1. It only contains those configuration files that were changed and
differ from the basic Debian installation and its configuration
files.

 2. The configuration file is owned and thus writable by $user.

 3. Via cron and run-parts the cron.daily directory is executed.

 . The first script manages the »cvs update« step

 . Scripts will copy configuration files to their respective
   locations and call other programs (like some make for wml and
   some web pages).

 . Scripts redirect their output to a log file for later error
   detection.

 . The last script checks for errors in log files

 . At some other time, a process runs as root, forcing some
   daemons to reload their configuration file.

 4. This system has the advantage of configuring the system remotely
and with an infinite number of people involved, which is quite
nice.

 5. It has two (three) major drawbacks, though:

 a) Since run-parts runs as $user, the configuration files need to
exist and be owned by $user, otherwise »cp« will blatantly
fail.  (this will be detected by the error detection, though).

 b) Changing the configuration doesn't take place immediately.
This is no problem for me, but may be one for others.
However, you can still manually trigger the update process,
and you could insert hooks into CVS to auto-trigger an update.

 c) Whenever the Debian system is updated and some files'
ownerships are changed.  Postfix is a good candidate to feel
the pain...

Sorry, I guess the description wasn't as brief as expected...

Regards,

Joey

-- 
Life is a lot easier when you have someone to share it with.  -- Sean Perry

Please always Cc to me when replying to me on the lists.


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




Re: RCS control for config files

2002-07-06 Thread Martin Schulze

Alex Borges wrote:
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 

I passed that point already...

> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..

For two remote servers, one of them is maintained by a group of three
people currently, we decided to use CVS and some scripts for
configuring the systems.

The configuration for one of these systems is online at

(you can check it out using anonymous CVS as well.)

Let me give a brief description how it works:

 1. It only contains those configuration files that were changed and
differ from the basic Debian installation and its configuration
files.

 2. The configuration file is owned and thus writable by $user.

 3. Via cron and run-parts the cron.daily directory is executed.

 . The first script manages the »cvs update« step

 . Scripts will copy configuration files to their respective
   locations and call other programs (like some make for wml and
   some web pages).

 . Scripts redirect their output to a log file for later error
   detection.

 . The last script checks for errors in log files

 . At some other time, a process runs as root, forcing some
   daemons to reload their configuration file.

 4. This system has the advantage of configuring the system remotely
and with an infinite number of people involved, which is quite
nice.

 5. It has two (three) major drawbacks, though:

 a) Since run-parts runs as $user, the configuration files need to
exist and be owned by $user, otherwise »cp« will blatantly
fail.  (this will be detected by the error detection, though).

 b) Changing the configuration doesn't take place immediately.
This is no problem for me, but may be one for others.
However, you can still manually trigger the update process,
and you could insert hooks into CVS to auto-trigger an update.

 c) Whenever the Debian system is updated and some files'
ownerships are changed.  Postfix is a good candidate to feel
the pain...

Sorry, I guess the description wasn't as brief as expected...

Regards,

Joey

-- 
Life is a lot easier when you have someone to share it with.  -- Sean Perry

Please always Cc to me when replying to me on the lists.


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




Re: RCS control for config files

2002-07-02 Thread Alex Borges
Wow.tx a lot guys, thats a lot of very rich options i shouldve
posted it to slashdot  too...:)


Alex


El lun, 01-07-2002 a las 16:41, Alex Borges escribió:
> Heyas debian zealots,
> 
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 
> 
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
> 
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")
> 
> 
> 
> Alex Borges
> 
> Step One Group
> 
> 
> 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 




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




Re: RCS control for config files

2002-07-02 Thread Alex Borges

Wow.tx a lot guys, thats a lot of very rich options i shouldve
posted it to slashdot  too...:)


Alex


El lun, 01-07-2002 a las 16:41, Alex Borges escribió:
> Heyas debian zealots,
> 
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 
> 
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
> 
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")
> 
> 
> 
> Alex Borges
> 
> Step One Group
> 
> 
> 
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
> 




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




Re: RCS control for config files

2002-07-02 Thread Joe Block
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Monday, July 1, 2002, at 05:41 , Alex Borges wrote:
Ive finnaly come to a point where i think im needing revision control
for my configuration files on some servers
So i thought id come in and ask you guys if there is some vertical stuff
explicitly for this purpose or if you yourselves simply cvs ci your /etc
directory et all..
Or any tips would be appreciated (like "i use emacs and rcs...works for
me")
I use CVS and make.  I like using make because it prevents me from doing 
stupid things like (for example) editing the aliases file and forgetting 
to newaliases.  I set up make targets for the various typical tasks, and 
that way I know that "make mail" will copy aliases to /etc/aliases, 
virtual and main.cf to /etc/postfix, cd into /etc/postfix and do a 
postmap on virtual, and then do a postfix reload, so I don't have to 
remember to follow a checklist.   Basically, anything that has more than 
1 step involved to update the configuration, I try to add a target to 
the Makefile for.

I also prefer CVS because I can do all the configuration editing on my 
laptop and then just do a checkin when I get back to network access and 
then cvs update on the various machines I've been reconfiguring.

My personal organization preference is to have modules for 
mail/apache/etc with subdirectories for the various servers.

jpb
- --
Joe Block <[EMAIL PROTECTED]>
"It's clearly a budget. It's got a lot of numbers in it."
 - George W. Bush, Reuters, May 5, 2000
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (Darwin)
iD8DBQE9Ifa4yEXo8W2M9hsRAseRAJ41h4+A7gHaCCFK89U3pAz28QKHpgCcCnco
4x3NcmVuRuc5BNCgsnm9FNw=
=ROve
-END PGP SIGNATURE-
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]



Re: RCS control for config files

2002-07-02 Thread Joe Block

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On Monday, July 1, 2002, at 05:41 , Alex Borges wrote:
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers
>
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
>
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")

I use CVS and make.  I like using make because it prevents me from doing 
stupid things like (for example) editing the aliases file and forgetting 
to newaliases.  I set up make targets for the various typical tasks, and 
that way I know that "make mail" will copy aliases to /etc/aliases, 
virtual and main.cf to /etc/postfix, cd into /etc/postfix and do a 
postmap on virtual, and then do a postfix reload, so I don't have to 
remember to follow a checklist.   Basically, anything that has more than 
1 step involved to update the configuration, I try to add a target to 
the Makefile for.

I also prefer CVS because I can do all the configuration editing on my 
laptop and then just do a checkin when I get back to network access and 
then cvs update on the various machines I've been reconfiguring.

My personal organization preference is to have modules for 
mail/apache/etc with subdirectories for the various servers.

jpb
- --
Joe Block <[EMAIL PROTECTED]>

"It's clearly a budget. It's got a lot of numbers in it."
  - George W. Bush, Reuters, May 5, 2000
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (Darwin)

iD8DBQE9Ifa4yEXo8W2M9hsRAseRAJ41h4+A7gHaCCFK89U3pAz28QKHpgCcCnco
4x3NcmVuRuc5BNCgsnm9FNw=
=ROve
-END PGP SIGNATURE-


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




Re: RCS control for config files

2002-07-02 Thread Michael Furr
On Mon, 2002-07-01 at 17:41, Alex Borges wrote:
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")
I often use a separate holding place for all config files somewhere in
/var or /opt depending the OS.  Everything is kept there in RCS(good for
locking).  I check it out in that holding area and make the necessary
changes, then use makefiles to test and install the files into /etc or
wherever.  This is enoumously helpful for catching simple typos in files
like sudoers that break easily.  So, for example, the sudoers target
would copy the new version into a chroot and then sudo -l would be run
inside.  If this is successful, then it is copied into place and rsynced
out.  It is amazingly helpful in preventing stupid mistakes that would
make users unhappy.

-m


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




Re: RCS control for config files

2002-07-02 Thread Michael Furr

On Mon, 2002-07-01 at 17:41, Alex Borges wrote:
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")
I often use a separate holding place for all config files somewhere in
/var or /opt depending the OS.  Everything is kept there in RCS(good for
locking).  I check it out in that holding area and make the necessary
changes, then use makefiles to test and install the files into /etc or
wherever.  This is enoumously helpful for catching simple typos in files
like sudoers that break easily.  So, for example, the sudoers target
would copy the new version into a chroot and then sudo -l would be run
inside.  If this is successful, then it is copied into place and rsynced
out.  It is amazingly helpful in preventing stupid mistakes that would
make users unhappy.

-m


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




Re: RCS control for config files

2002-07-02 Thread Torbjorn Pettersson
Alex Borges <[EMAIL PROTECTED]> writes:

> Heyas debian zealots,
> 
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 
> 
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
> 
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")
> 
> 
> 
> Alex Borges
> 
> Step One Group

Short description:

I use emacs and rcs... works for me :-)

Long description:
emacs + vc mode in emacs really. Lot of nifty commands for
checking in/out, and comparing with older versions.

It also works with files in CVS, which I use inderectly since a
lot of my major files are handled by cfengine.

//Tobbe
-- 
##
Torbjörn Pettersson   #  Email   [EMAIL PROTECTED]
Vattugatan 5  #  Web www.strul.nu/~tobbe
S-111 52  Stockholm, Sweden   #
##


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




Re: RCS control for config files

2002-07-02 Thread Peter Palfrader
On Tue, 02 Jul 2002, Robert Waldner wrote:

> On 01 Jul 2002 16:41:25 CDT, Alex Borges writes:
> >Ive finnaly come to a point where i think im needing revision control
> >for my configuration files on some servers 
> >
> >So i thought id come in and ask you guys if there is some vertical stuff
> >explicitly for this purpose or if you yourselves simply cvs ci your /etc
> >directory et all..
> >
> >Or any tips would be appreciated (like "i use emacs and rcs...works for
> >me")
> 
> :) [EMAIL PROTECTED]>~ $ cat `which rcsvi`
> #!/bin/sh
> 
> /usr/bin/co -l $1 && /usr/bin/vi $1 ; /usr/bin/ci -u $1
> 
> exit

Here the luxus version:

[EMAIL PROTECTED]:~$ cat `which rvi`
#!/bin/sh
 
co -l $1
if [ $? -ne 0 ] ; then
echo "Check out failed."
echo "Maybe someone else is currently editing this file."
echo "Aborting rvi."
exit 1
fi
/usr/bin/rvim $1
ci -u $1

yours,
peter

-- 
 PGP signed and encrypted  |  .''`.  ** Debian GNU/Linux **
messages preferred.| : :' :  The  universal
   | `. `'  Operating System
 http://www.palfrader.org/ |   `-http://www.debian.org/


pgpGYFH87erJg.pgp
Description: PGP signature


Re: RCS control for config files

2002-07-02 Thread Robert Waldner

On 01 Jul 2002 16:41:25 CDT, Alex Borges writes:
>Ive finnaly come to a point where i think im needing revision control
>for my configuration files on some servers 
>
>So i thought id come in and ask you guys if there is some vertical stuff
>explicitly for this purpose or if you yourselves simply cvs ci your /etc
>directory et all..
>
>Or any tips would be appreciated (like "i use emacs and rcs...works for
>me")

:) [EMAIL PROTECTED]>~ $ cat `which rcsvi`
#!/bin/sh

/usr/bin/co -l $1 && /usr/bin/vi $1 ; /usr/bin/ci -u $1

exit

cheers,
&rw
-- 
/ Ing. Robert Waldner | Security Engineer |  CoreTec IT-Security  \
\   <[EMAIL PROTECTED]>   | T +43 1 503 72 73 | F +43 1 503 72 73 x99 /



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




Re: RCS control for config files

2002-07-02 Thread Torbjorn Pettersson

Alex Borges <[EMAIL PROTECTED]> writes:

> Heyas debian zealots,
> 
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 
> 
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
> 
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")
> 
> 
> 
> Alex Borges
> 
> Step One Group

Short description:

I use emacs and rcs... works for me :-)

Long description:
emacs + vc mode in emacs really. Lot of nifty commands for
checking in/out, and comparing with older versions.

It also works with files in CVS, which I use inderectly since a
lot of my major files are handled by cfengine.

//Tobbe
-- 
##
Torbjörn Pettersson   #  Email   [EMAIL PROTECTED]
Vattugatan 5  #  Web www.strul.nu/~tobbe
S-111 52  Stockholm, Sweden   #
##


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




Re: RCS control for config files

2002-07-02 Thread Peter Palfrader

On Tue, 02 Jul 2002, Robert Waldner wrote:

> On 01 Jul 2002 16:41:25 CDT, Alex Borges writes:
> >Ive finnaly come to a point where i think im needing revision control
> >for my configuration files on some servers 
> >
> >So i thought id come in and ask you guys if there is some vertical stuff
> >explicitly for this purpose or if you yourselves simply cvs ci your /etc
> >directory et all..
> >
> >Or any tips would be appreciated (like "i use emacs and rcs...works for
> >me")
> 
> :) waldner@beren->~ $ cat `which rcsvi`
> #!/bin/sh
> 
> /usr/bin/co -l $1 && /usr/bin/vi $1 ; /usr/bin/ci -u $1
> 
> exit

Here the luxus version:

weasel@marvin:~$ cat `which rvi`
#!/bin/sh
 
co -l $1
if [ $? -ne 0 ] ; then
echo "Check out failed."
echo "Maybe someone else is currently editing this file."
echo "Aborting rvi."
exit 1
fi
/usr/bin/rvim $1
ci -u $1

yours,
peter

-- 
 PGP signed and encrypted  |  .''`.  ** Debian GNU/Linux **
messages preferred.| : :' :  The  universal
   | `. `'  Operating System
 http://www.palfrader.org/ |   `-http://www.debian.org/



msg06656/pgp0.pgp
Description: PGP signature


Re: RCS control for config files

2002-07-02 Thread Robert Waldner


On 01 Jul 2002 16:41:25 CDT, Alex Borges writes:
>Ive finnaly come to a point where i think im needing revision control
>for my configuration files on some servers 
>
>So i thought id come in and ask you guys if there is some vertical stuff
>explicitly for this purpose or if you yourselves simply cvs ci your /etc
>directory et all..
>
>Or any tips would be appreciated (like "i use emacs and rcs...works for
>me")

:) waldner@beren->~ $ cat `which rcsvi`
#!/bin/sh

/usr/bin/co -l $1 && /usr/bin/vi $1 ; /usr/bin/ci -u $1

exit

cheers,
&rw
-- 
/ Ing. Robert Waldner | Security Engineer |  CoreTec IT-Security  \
\   <[EMAIL PROTECTED]>   | T +43 1 503 72 73 | F +43 1 503 72 73 x99 /



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




Re: RCS control for config files

2002-07-01 Thread Donovan Baarda
On Mon, Jul 01, 2002 at 04:41:25PM -0500, Alex Borges wrote:
> Heyas debian zealots,
> 
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 
> 
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
> 
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")

One one set of machines I help administer, along with a collective of
others, we were using a bunch of "lock/unlock" scripts around RCS. These
were good because the locking of RCS ensured two people didn't try to edit
the same file at the same time. These sucked because we ended up with RCS
directories everywhere and things like "run-parts" were trying to execute
them.

On my personal machines, just administered by me, I'm using PRCS because
it's nicer than CVS and I can do groovy things like treat each different
machine as a branch merge changes between different machines. It leaves on
artifact dirs or files in the /etc/ directory except a single .prj file.

On the machines previously mantained with RCS, I'm slowly migrating to PRCS.
The problem is PRCS doesn't do locking, so I'm having to write wrapper
scripts to do the locking for me.

-- 
--
ABO: finger [EMAIL PROTECTED] for more info, including pgp key
--


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




Re: RCS control for config files

2002-07-01 Thread Donovan Baarda

On Mon, Jul 01, 2002 at 04:41:25PM -0500, Alex Borges wrote:
> Heyas debian zealots,
> 
> Ive finnaly come to a point where i think im needing revision control
> for my configuration files on some servers 
> 
> So i thought id come in and ask you guys if there is some vertical stuff
> explicitly for this purpose or if you yourselves simply cvs ci your /etc
> directory et all..
> 
> Or any tips would be appreciated (like "i use emacs and rcs...works for
> me")

One one set of machines I help administer, along with a collective of
others, we were using a bunch of "lock/unlock" scripts around RCS. These
were good because the locking of RCS ensured two people didn't try to edit
the same file at the same time. These sucked because we ended up with RCS
directories everywhere and things like "run-parts" were trying to execute
them.

On my personal machines, just administered by me, I'm using PRCS because
it's nicer than CVS and I can do groovy things like treat each different
machine as a branch merge changes between different machines. It leaves on
artifact dirs or files in the /etc/ directory except a single .prj file.

On the machines previously mantained with RCS, I'm slowly migrating to PRCS.
The problem is PRCS doesn't do locking, so I'm having to write wrapper
scripts to do the locking for me.

-- 
--
ABO: finger [EMAIL PROTECTED] for more info, including pgp key
--


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