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

RE: System Files

From: James FitzGibbon <jfitzgibbon_at_primustel.ca>
Date: 2005-08-12 16:38:36 CEST

One thing to watch out for: if you literally do this:

svn co https://myrepo/configs
cd configs
ln -s /etc/dhcpd.conf
svn add dhcpd.conf

You'll end up adding the symbolic link to svn, not the contents of the
linked file. The link will never change, even when the contents of the file
do, so that's probably not what you want to do.

My experience with this type of thing has led me to store the config files
in a repository structure that more or less matches the layout of the
server:

[vrfy:james] ~/freebsd (13) > find . -type d -a ! -path "*.svn*"
.
./etc
./etc/periodic
./etc/periodic/weekly
./etc/periodic/daily
./etc/periodic/security
./httpd
./sites
./sites/phpldapadmin
./sites/phpldapadmin/templates
./sites/phpldapadmin/templates/creation
./sites/phpldapadmin/templates/modification
./sites/svnweb
./sites/svnweb/template
./sites/svnweb/po
./sites/phpmyadmin
./sites/schedule
./nagios
./nagios/etc
./usrlocaletc
./usrlocaletc/subversion
./usrlocaletc/exim
./usrlocaletc/openldap
./usrlocaletc/openldap/schema
./usrlocaletc/jabberd
./usrlocaletc/jabberd/templates
[vrfy:james] ~/freebsd (14) >

In each directory that has files to install, I put a rudimentary shell
script to do that:

[vrfy:james] ~/freebsd (14) > cat etc/install.sh
#!/bin/sh
#

umask 022
for file in aliases *.conf
do
    install -o root -g wheel -m 644 -p -v $file /etc
done

for dir in periodic
do
    cd $dir && sh install.sh
    cd ..
done

#
# EOF
[vrfy:james] ~/freebsd (15) >

Also notice that the script iterates through lower directories if there are
any.

There are much more elegant solutions to get the files from the working copy
to their final resting place, but this works for my personal server.

The main reason I like having a script (or Makefile, or whatever) do the
install is that it gives me a specific place to do post-checkout-pre-install
manipulation of the files if I so require.

Hope that helps

-----Original Message-----
From: Jaime Magiera [mailto:jaime@sensoryresearch.net]
Sent: Thursday, August 11, 2005 8:25 PM
To: users@subversion.tigris.org
Subject: System Files

Hello,

I've checked files out of a CVS repository before, but have very
little experience in setting up a Subversion repository and managing
files. What I'd like to do is use Subversion to manage a server
configuration file (/etc/dhcpd.conf). My initial thought would be to
create a symbolic link to that file, and add it to the repository.
However, I'd like to be sure of what I'm doing before blowing things up.

Could someone kindly point me to resources for what I'm trying to do,
or walk me through the process? I've searched the archives and book,
but can't seem to find examples of this type of situation.

thank you,

Jaime

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.7/70 - Release Date: 8/11/2005
 
-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.338 / Virus Database: 267.10.7/70 - Release Date: 8/11/2005
 
-- 
----------------------------------------------------------------------------
This electronic message contains information from Primus Telecommunications
Canada Inc. ("PRIMUS") , which may be legally privileged and confidential.
The information is intended to be for the use of the individual(s) or entity
named above. If you are not the intended recipient, be aware that any
disclosure, copying, distribution or use of the contents of this information
is prohibited. If you have received this electronic message in error, please
notify us by telephone or e-mail (to the number or address above)
immediately. Any views, opinions or advice expressed in this electronic
message are not necessarily the views, opinions or advice of PRIMUS.
It is the responsibility of the recipient to ensure that
any attachments are virus free and PRIMUS bears no responsibility
for any loss or damage arising in any way from the use
thereof.The term "PRIMUS" includes its affiliates.
----------------------------------------------------------------------------
Pour la version en français de ce message, veuillez voir
 http://www.primustel.ca/fr/legal/cs.htm
----------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 12 16:40:27 2005

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.