261 lines
		
	
	
	
		
			12 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			261 lines
		
	
	
	
		
			12 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| <!--
 | |
| # This is the sgml version of the ctm.FAQ file.
 | |
| #
 | |
| # Converted by Ollivier Robert <roberto@FreeBSD.ORG>
 | |
| #
 | |
| # $Id: ctm.sgml,v 1.23 1998-10-27 09:38:15 markm Exp $
 | |
| #
 | |
| # ----------------------------------------------------------------------------
 | |
| # "THE BEER-WARE LICENSE" (Revision 42):
 | |
| # <phk@login.dknet.dk> wrote this file.  As long as you retain this notice you
 | |
| # can do whatever you want with this stuff. If we meet some day, and you think
 | |
| # this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
 | |
| # ----------------------------------------------------------------------------
 | |
| #
 | |
| -->
 | |
| 
 | |
| <sect1><heading>CTM<label id="ctm"></heading>
 | |
| 
 | |
| <p><em>Contributed by &a.phk;.  Updated 19-October-1997.</em>
 | |
| 
 | |
|         <tt/CTM/ is a method for keeping a remote directory tree in sync with a
 | |
|         central one.  It has been developed for usage with FreeBSD's source
 | |
|         trees, though other people may find it useful for other purposes as
 | |
|         time goes by.  Little, if any, documentation currently exists at
 | |
|         this time on the process of creating deltas, so talk to &a.phk;
 | |
|         for more information should you wish to use <tt/CTM/ for other things.
 | |
| 
 | |
|     <sect2><heading>Why should I use <tt/CTM/?</heading>
 | |
|       <p><tt/CTM/ will give you a local copy of the FreeBSD source trees.
 | |
| 	There are a number of ``flavors'' of the tree available. Whether
 | |
| 	you wish to track the entire cvs tree or just one of the branches,
 | |
| 	<tt/CTM/ can provide you the information.
 | |
|         If you are an active developer on FreeBSD, but have lousy
 | |
|         or non-existent TCP/IP connectivity,  or simply wish to have the
 | |
| 	changes automatically sent to you, <tt/CTM/ was made for you.
 | |
|         You will need to obtain up to three deltas per day for the most 
 | |
| 	active branches. However, you should consider having them sent
 | |
| 	by automatic email. The sizes of the updates are
 | |
|         always kept as small as possible.  This is typically less than 5K,
 | |
|         with an occasional (one in ten) being 10-50K and every now and
 | |
|         then a biggie of 100K+ or more coming around.
 | |
| 
 | |
|         You will also need to make yourself aware of the various caveats 
 | |
| 	related to working directly from the development sources rather
 | |
| 	than a pre-packaged release. This is particularly true if you
 | |
| 	choose the ``current'' sources. It is recommended that
 | |
|         you read <ref id="current" name="Staying current with FreeBSD">.
 | |
| 
 | |
|     <sect2><heading>What do I need to use <tt/CTM/?</heading>
 | |
| 
 | |
|       <p>You will need two things: The ``<tt/CTM/'' program and the initial
 | |
|         deltas to feed it (to get up to ``current'' levels).
 | |
| 
 | |
|         The <tt/CTM/ program has been part of FreeBSD ever since version 2.0
 | |
|         was released, and lives in <tt>/usr/src/usr.sbin/<tt/CTM/</tt> if you
 | |
|         have a copy of the source online.
 | |
| 
 | |
|         If you are running a pre-2.0 version of FreeBSD, you can fetch the
 | |
|         current <tt/CTM/ sources directly from:
 | |
| 
 | |
|         <url
 | |
|           url="ftp://ftp.FreeBSD.ORG/pub/FreeBSD/FreeBSD-current/src/usr.sbin/ctm">
 | |
| 
 | |
|         The ``deltas'' you feed <tt/CTM/ can be had two ways, FTP or e-mail.
 | |
|         If you have general FTP access to the Internet then the following
 | |
|         FTP sites support access to <tt/CTM/:
 | |
| 
 | |
|         <url url="ftp://ftp.FreeBSD.ORG/pub/FreeBSD/CTM">
 | |
| 
 | |
| 	or see section <ref id="mirrors-ctm" name="mirrors">.
 | |
| 
 | |
|         FTP the relevant directory and fetch the <tt/README/ file,
 | |
|         starting from there.
 | |
| 
 | |
|         If you may wish to get your deltas via email:
 | |
| 
 | |
|         Send email to &a.majordomo to subscribe to one of the  <tt/CTM/
 | |
| 	distribution lists. ``ctm-cvs-cur'' supports the entire cvs tree.
 | |
| 	``ctm-src-cur'' supports the head of the development branch.
 | |
| 	``ctm-src-2_2'' supports the 2.2 release branch, etc.
 | |
|         (If you do not know how to subscribe
 | |
|         yourself using majordomo, send a message first containing the
 | |
|         word ``help'' - it will send you back usage instructions.)
 | |
| 
 | |
|         When you begin receiving your <tt/CTM/ updates in the mail, you may
 | |
|         use the <tt/ctm_rmail/ program to unpack and apply them.  You
 | |
|         can actually use the <tt/ctm_rmail/ program directly from a entry
 | |
|         in <tt>/etc/aliases</tt> if you want to have the process run in a
 | |
|         fully automated fashion.  Check the <tt/ctm_rmail/ man page for more
 | |
|         details.
 | |
| 
 | |
|         <bf/NOTE/: No matter what method you use to get the <tt/CTM/
 | |
|         deltas, you should subscribe to the <tt/ctm-announce@FreeBSD.ORG/
 | |
|         mailing list.  In the future, this will be the only place where
 | |
|         announcements concerning the operations of the <tt/CTM/ system will be
 | |
|         posted.  Send an email to &a.majordomo with a single
 | |
|         line of ``<tt/subscribe ctm-announce/'' to get added to the list.
 | |
| 
 | |
|     <sect2><heading>Starting off with <tt/CTM/ for the first time</heading>
 | |
|       <p>Before you can start using <tt/CTM/ deltas, you will need to get a
 | |
|          to a starting point for the deltas produced subsequently to it.
 | |
|   
 | |
|  	First you should determine what you already have. Everyone should
 | |
|  	start from an ``Empty'' directory.  You must use an initial ``Empty''
 | |
| 	delta to start off your <tt/CTM/ supported tree. At some point
 | |
| 	it is intended that one of these ``starter'' deltas be distributed
 | |
| 	on the CD for your convenience. This does not currently happen,
 | |
| 	however.
 | |
|  
 | |
|         You can recognize these ``starter''  deltas by the ``<tt/X/'' appended
 | |
|  	to the number (<tt/src-cur.3210XEmpty.gz/ for instance).
 | |
|  	The designation following the ``<tt/X/'' corresponds to the origin
 | |
|  	of your initial ``seed''. ``Empty'' is an empty directory.
 | |
|  	As a rule a base transition from ``Empty'' is producted 
 | |
|         every 100 deltas.  By the way, they are large!  A few tens of
 | |
|         Megabytes of <tt/gzip/'ed data is common for the ``XEmpty'' deltas.
 | |
| 
 | |
|         Once you've picked a base delta to start from, you will also need
 | |
|         all deltas with higher numbers following it.
 | |
| 
 | |
|     <sect2><heading>Using <tt/CTM/ in your daily life</heading>
 | |
|       <p>
 | |
|         To apply the deltas, simply say:
 | |
|         <tscreen><verb>
 | |
| cd /where/ever/you/want/the/stuff
 | |
| ctm -v -v /where/you/store/your/deltas/src-xxx.*
 | |
|         </verb></tscreen>
 | |
|       <p>
 | |
|         <tt/CTM/ understands deltas which have been put through <tt/gzip/,
 | |
|         so you do not need to gunzip them first, this saves disk space.
 | |
| 
 | |
|         Unless it feels very secure about the entire process, <tt/CTM/ will
 | |
|         not touch your tree.  To verify a delta you can also use the
 | |
|         ``<tt/-c/'' flag and <tt/CTM/ will not actually touch your tree; it will
 | |
| 	merely verify the integrity of the delta and see if it would apply
 | |
|         cleanly to your current tree.
 | |
| 
 | |
|         There are other options to <tt/CTM/ as well, see the manual pages
 | |
|         or look in the sources for more information.
 | |
| 
 | |
|         I would also be very happy if somebody could help with the ``user
 | |
|         interface'' portions, as I have realized that I cannot make up my
 | |
|         mind on what options should do what, how and when...
 | |
| 
 | |
|         That's really all there is to it.  Every time you get a new delta,
 | |
|         just run it through <tt/CTM/ to keep your sources up to date.
 | |
| 
 | |
|         Do not remove the deltas if they are hard to download again.  You
 | |
|         just might want to keep them around in case something bad happens.
 | |
|         Even if you only have floppy disks, consider using <tt/fdwrite/ to
 | |
|         make a copy.
 | |
| 
 | |
|     <sect2><heading>Keeping your local changes</heading>
 | |
|      <p>
 | |
|       As a developer one would like to experiment with and change
 | |
|       files in the source tree.  CTM supports local modifications in a
 | |
|       limited way: before checking for the presence of a file
 | |
|       <tt>foo</tt>, it first looks for <tt>foo.ctm</tt>.  If this
 | |
|       file exists, CTM will operate on it instead of <tt>foo</tt>.
 | |
|      <p>
 | |
|       This behaviour gives us a simple way to maintain local changes:
 | |
|       simply copy the files you plan to modify to the corresponding
 | |
|       file names with a <tt>.ctm</tt> suffix.  Then you can freely hack 
 | |
|       the code, while CTM keeps the <tt>.ctm</tt> file up-to-date.
 | |
|     
 | |
|     <sect2><heading>Other interesting CTM options</heading>
 | |
|      <sect3><heading>Finding out exactly what would be touched by an update</heading>
 | |
|       <p>
 | |
|        You can determine the list of changes that CTM will make on your
 | |
|        source repository using the ``<tt>-l</tt>'' option to CTM.
 | |
|       <p>
 | |
|        This is useful if you would like to keep logs of the changes, 
 | |
|        pre- or post- process the modified files in any manner, or just 
 | |
|        are feeling a tad paranoid :-).
 | |
| 
 | |
|      <sect3><heading>Making backups before updating</heading>
 | |
|       <p>
 | |
|        Sometimes you may want to backup all the files that would be changed
 | |
|        by a CTM update.
 | |
|       <p>
 | |
|        Specifying the ``<tt>-B backup-file</tt>'' option causes
 | |
|        CTM to backup all files that would be touched by a given CTM
 | |
|        delta to <tt>backup-file</tt>.
 | |
| 
 | |
|      <sect3><heading>Restricting the files touched by an update</heading> 
 | |
|       <p>
 | |
|        Sometimes you would be interested in restricting the scope of a
 | |
|        given CTM update, or may be interested in extracting just a few
 | |
|        files from a sequence of deltas.
 | |
|       <p>
 | |
|        You can control the list of files that CTM would operate on by
 | |
|        specifying filtering regular expressions using the
 | |
|        ``<tt>-e</tt>'' and ``<tt>-x</tt>'' options.
 | |
|       <p>
 | |
|        For example, to extract an up-to-date copy of 
 | |
|        <tt>lib/libc/Makefile</tt> from your collection of saved CTM deltas,
 | |
|        run the commands:
 | |
|       <tscreen><verb>
 | |
| cd /where/ever/you/want/to/extract/it/
 | |
| ctm -e '^lib/libc/Makefile' ~ctm/src-xxx.*
 | |
|       </verb></tscreen>
 | |
|       <p>
 | |
|        For every file specified in a CTM delta, the ``<tt>-e</tt>'' and
 | |
|        ``<tt>-x</tt>'' options are applied in the order given on the
 | |
|        command line.  The file is processed by CTM only if it is
 | |
|        marked as eligible after all the ``<tt>-e</tt>'' and
 | |
|        ``<tt>-x</tt>'' options are applied to it.
 | |
| 
 | |
|        <sect2><heading>Future plans for <tt/CTM/</heading>
 | |
|       <p>
 | |
|         Tons of them:
 | |
|         <itemize>
 | |
|           <item>
 | |
|             Use some kind of authentication into the CTM system, so as to
 | |
|             allow detection of spoofed CTM updates.
 | |
|           <item>
 | |
|             Clean up the options to <tt/CTM/, they became confusing and
 | |
|             counter intuitive.
 | |
|         </itemize>
 | |
| 
 | |
|         The bad news is that I am very busy, so any help in doing this will
 | |
|         be most welcome.  And do not forget to tell me what you want also...
 | |
| 
 | |
|     <sect2><heading>Miscellaneous stuff</heading>
 | |
|       <p>
 | |
|         All the ``DES infected'' (e.g. export controlled) source is not
 | |
|         included.  You will get the ``international'' version only.  If
 | |
|         sufficient interest appears, we will set up a ``<tt/sec-cur/''
 | |
|         sequence too.
 | |
| <!--
 | |
|         If you are a frequent or valuable contributor to FreeBSD, I will be
 | |
|         willing to arrange special services, one option is delivery via
 | |
|         <tt/ftp/ or <tt/rcp/ to a machine closer to you.  You need to have
 | |
|         earned this, since it takes time to do, but I will be all the more
 | |
|         happy to do it for you then.
 | |
| -->
 | |
|         There is a sequence of deltas for the <tt/ports/ collection too,
 | |
|         but interest has not been all that high yet.  Tell me if you want
 | |
|         an email list for that too and we will consider setting it up.
 | |
| <!--
 | |
|         If you have commit privileges or are similarly authorized by the
 | |
|         FreeBSD core team, you can also get access to the CVS repository
 | |
|         tree by the same means.  Contact &a.phk;
 | |
|         for details.
 | |
| -->
 | |
| 
 | |
|     <sect2><heading>Thanks!</heading>
 | |
|       <p>
 | |
|         <descrip>
 | |
|           <tag/&a.bde;/
 | |
|             for his pointed pen and invaluable comments.
 | |
|           <tag/&a.sos;/
 | |
| 	    for patience.
 | |
|           <tag/Stephen McKay/
 | |
|             wrote <tt/ctm_[rs]mail/, much appreciated.
 | |
|           <tag/&a.jkh;/
 | |
|             for being so stubborn that I had to make it better.
 | |
|           <tag/All the users/
 | |
|             I hope you like it...
 | |
|         </descrip>
 | |
| 
 |