aboutsummaryrefslogblamecommitdiff
path: root/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml
blob: 913b996bd8cce56f60f111d0e76ee78def072f23 (plain) (tree)
1
2
3
4
5
6
7
8
9
                                           


                                      
              
   
                                                                                                                          
                               
 
                                

                                         
 


















                                                                                            

                                                     
                                                       








                                                                                   









                                                                                                                    
 

                                               

                   
                           



                                               

                                                                                              


                    
                                                                     
                  
                                     


                                                        
                                             
                                                     
                                           

                                                                                                                                

                    
   













                                                                                                          
          
 
                              
                                               
 
                                                                   





















                                                                                                
 



                                

                          
 
                      
                            

               
                            

                
                                                                  


                                                                    
                                                            

                                                                     
                                                                  















                                                                      

                                            
 




                                                                     




                                                                  

                                                                      
                                               
 


                                                            
 


                          

                                                                                                                                                 

                         

                                                                                                                         



                           
 

                                                                 
 


                          

                                                                                                                               



                           
 





                                    

                                                                                                                                                       


                         

                                                                                                                                                         
                         
 
                        

                                                                                                                                                         




                           
 



                                                                                                                 
                                                           







                                                                     
 
            

                                                                   
                                                                  

                                                                

             
 
           
                                                         
 










                                                                      
                                                                     

                                                                      
 


                                                                      
 

                                                                     
 

                                                                                                    
 





                                                                    

                                                          





                                                                     


                                                                  

                                                     
 
                                                                    


                                                                    
            
 
           
                                          
 
                                                
                                                
                                                                      


                                                                  

                                                                    

                                                                 




                                                                     
            
 
           
                                                                 
 
                    


                                                               
 








                                                                      
 

                                                     
 


                                                                     





                                                                      

                       
 

                                                                 
 







                                                                    
 


                                                                      
 
                                                                                     
                                                                                                                      
 









                                                                     
            

                                                

                                                                    
 
                                
 
                    
                  



                                                                 
                   
 
                  


                                                                     
                   
                     
 



                                                                     
       
          
 
                      
                                                              
 


                                   
 
                              
                                 
 
                                      


                                                                    
 
            


                                                                  
                                                                   
                                                                      

                                                             
             
 
                                                    

                                                                    



                                                                      
            
 
                                
                                 
 




                                                                      
 

                                                                                 
 


                                                                   
 
                                                                                 
 


                                                                     
 
                                                                                        
            
 
                              
                                                                  
 
                                                                 

                                                                    
                                 
 







                                                                  
 
                                                      








                                                                     





                                                                     

                                                                  
 
                                                                                                                                                                                                                        
 
                         
 

                    

                                                                      
                                  
                   
 
                  
                                                                   
                                                                

                                          
                   
 
                  







                                                                     
                                            
                                       


                                                     
                   
 
                  


                                                                
                                               
                                     
                                             
                                        
                                             
                                          
                   
                     
 
                                                                 

                                                                

                                                  

                                                                   
 
                                                                                                                                                          
 


                                                                     
 

                                                                     
 
                                                                                                        
 
                     
                                                  
                                      
 
                                                                                 
 

                                                            
 

                                                                     





                                                                  
 
                                                              

                                                                        
 


                                                         
 















                                                                                           
 

















































                                                                                                        
                                                














                                                                                                      
                                                





                                                                                                      










                                                                                            
                                           



                                                                                                      














                                                                                             

                                                                
                                           

                                   


                                                                           

                                                                















                                                                      










                                                                    
            

          
                                
                                                         
 
                                                                   
                                                                      





                                                                     
                                                                  
                                                                      






                                     
                                                  


                                             
                      

                                                     


                       

                                                     
                       




                         






                                                  
                      

                                                     
                       


                         

                    


                           
                                          

                                             
 
                        
                      

                                                     








                                                            
                                                     
                       




                         






                                                   
                      

                                                     
                       




                         



                                                  
 
                                                   
 
                                                   


                                             
                      

                                                     
                       




                         


                                   
                                                       


                                             
                      
                                                              
                                                     
                       


                         

                    


                                             
                                                      
 
                                                                   
                         
 
                                             
 
                        
                      

                                                        




                                                         
                         



                                                 
 
                        
                      

                                                     
                       
                         


                     
          
           
<?xml version="1.0" encoding="iso-8859-1"?>
<!--
     The FreeBSD Documentation Project

     $FreeBSD$
-->
<appendix xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0" xml:id="mirrors">
  <title>Obtaining &os;</title>

  <sect1 xml:id="mirrors-cdrom">
    <title><acronym>CD</acronym> and
      <acronym>DVD</acronym> Sets</title>

    <para>&os; <acronym>CD</acronym> and <acronym>DVD</acronym> sets
      are available from several online retailers:</para>

    <itemizedlist>
      <listitem>
	<address>&os; Mall, Inc.
	  <street>2420 Sand Creek Rd C-1 #347</street>
	  <city>Brentwood</city>, <state>CA</state>
	  <postcode>94513</postcode>
	  <country>USA</country>
	  Phone: <phone>+1 925 240-6652</phone>
	  Fax: <fax>+1 925 674-0821</fax>
	  Email: <email>info@freebsdmall.com</email>
	  WWW: <otheraddr
	    xlink:href="http://www.freebsdmall.com/">http://www.freebsdmall.com/</otheraddr>
	</address>
      </listitem>

      <listitem>
	<address>Getlinux
	  <street>78 Rue de la Croix Rochopt</street>
	  <city>&Eacute;pinay-sous-S&eacute;nart</city>
	  <postcode>91860</postcode>
	  <country>France</country>
	  Email: <email>contact@getlinux.fr</email>
	  WWW: <otheraddr
	    xlink:href="http://www.getlinux.fr">http://www.getlinux.fr/</otheraddr>
	</address>
      </listitem>

      <listitem>
	<address>Dr. Hinner EDV
	  <street>Kochelseestr. 11</street>
	  <postcode>D-81371</postcode> <city>M&uuml;nchen</city>
	  <country>Germany</country>
	  Phone: <phone>(0177) 428 419 0</phone>
	  Email: <email>infow@hinner.de</email>
	  WWW: <otheraddr
	    xlink:href="http://www.hinner.de/linux/freebsd.html">http://www.hinner.de/linux/freebsd.html</otheraddr>
	</address>
      </listitem>

<!--
This site is just showing the Apache test page.
	<listitem>
	  <address>
	    Linux Distro UK
	    <street>42 Wharfedale Road</street>
	    <city>Margate</city>
	    <postcode>CT9 2TB</postcode>
	    <country>United Kingdom</country>
	    WWW: <otheraddr
	      xlink:href="https://linux-distro.co.uk/">https://linux-distro.co.uk/</otheraddr>
	  </address>
	</listitem>

This site doesn't have any products newer than 8.1 which is now EOL'd
	<listitem>
	  <address>The Linux Emporium
	    <street>The Techno Centre, Puma Way</street>
	    <city>Parkside</city>
	    <postcode>CV1 2TT</postcode>
	    <country>United Kingdom</country>
	    Phone: <phone>+44 (0)247 615 8121</phone>
	    Fax: <fax>+44 1491 837016</fax>
	    WWW: <otheraddr
	      xlink:href="http://www.linuxemporium.co.uk/products/bsd/">http://www.linuxemporium.co.uk/products/bsd/</otheraddr>
	  </address>
	</listitem>
-->

      <listitem>
	<address>Linux Center
	  <street>Galernaya Street, 55</street>
	  <city>Saint-Petersburg</city>
	  <postcode>190000</postcode>
	  <country>Russia</country>
	  Phone: <phone>+7-812-309-06-86</phone>
	  Email: <email>info@linuxcenter.ru</email>
	  WWW: <otheraddr
	    xlink:href="http://linuxcenter.ru/shop/freebsd">http://linuxcenter.ru/shop/freebsd</otheraddr>
	</address>
      </listitem>
    </itemizedlist>
  </sect1>

  <sect1 xml:id="mirrors-ftp">
    <title><acronym>FTP</acronym> Sites</title>

    <para>The official sources for &os; are available via anonymous
      <acronym>FTP</acronym> from a worldwide set of mirror sites.
      The site <uri
	xlink:href="ftp://ftp.FreeBSD.org/pub/FreeBSD/">ftp://ftp.FreeBSD.org/pub/FreeBSD/</uri>
      is well connected and allows a large number of connections to
      it, but you are probably better off finding a
      <quote>closer</quote> mirror site (especially if you decide to
      set up some sort of mirror site).</para>

    <para>Additionally, &os; is available via anonymous
      <acronym>FTP</acronym> from the following mirror sites.  If you
      choose to obtain &os; via anonymous <acronym>FTP</acronym>,
      please try to use a site near you.  The mirror sites listed as
      <quote>Primary Mirror Sites</quote> typically have the entire
      &os; archive (all the currently available versions for each of
      the architectures) but you will probably have faster download
      times from a site that is in your country or region.  The
      regional sites carry the most recent versions for the most
      popular architecture(s) but might not carry the entire &os;
      archive.  All sites provide access via anonymous
      <acronym>FTP</acronym> but some sites also provide access via
      other methods.  The access methods available for each site are
      provided in parentheses after the hostname.</para>

    &chap.mirrors.ftp.index.inc;

    &chap.mirrors.lastmod.inc;

    &chap.mirrors.ftp.inc;
  </sect1>

  <sect1 xml:id="ctm">
    <title>Using CTM</title>

    <indexterm>
      <primary>CTM</primary>
    </indexterm>

    <para><application>CTM</application> is a method for keeping a
      remote directory tree in sync with a central one.  It is built
      into &os; and can be used to synchronize a system with &os;'s
      source repositories.  It supports synchronization of an entire
      repository or just a specified set of branches.</para>

    <para><application>CTM</application> is specifically designed for
      use on lousy or non-existent TCP/IP connections and provides
      the ability for changes to be automatically sent by email.  It
      requires the user to obtain up to three deltas per day for the
      most active branches.  Update sizes are always kept as small as
      possible and are typically less than 5K.  About one in very ten
      updates is 10-50K in size, and there will occasionally be an
      update larger than 100K+.</para>

    <para>When using <application>CTM</application> to track &os;
      development, refer to the caveats related to working directly
      from the development sources rather than a pre-packaged release.
      These are discussed in <link linkend="current-stable">Tracking
	a Development Branch</link>.</para>

    <para>Little documentation exists on the process of creating
      deltas or using <application>CTM</application> for other
      purposes.  Contact the &a.ctm-users.name; mailing list for
      answers to questions on using
      <application>CTM</application>.</para>

    <sect2 xml:id="mirrors-ctm">
      <title>Getting Deltas</title>

      <para>The <quote>deltas</quote> used by
	<application>CTM</application> can be obtained either through
	anonymous <acronym>FTP</acronym> or email.</para>

      <para><acronym>FTP</acronym> deltas can be obtained from the
	following mirror sites.  When using anonymous
	<acronym>FTP</acronym> to obtain
	<application>CTM</application> deltas, select a mirror that is
	geographically nearby.  In case of problems, contact the
	&a.ctm-users.name; mailing list.</para>

      <variablelist>
	<varlistentry>
	  <term>California, Bay Area, official source</term>

	  <listitem>
	    <itemizedlist>
	      <listitem>
		<para><uri
		  xlink:href="ftp://ftp.FreeBSD.org/pub/FreeBSD/development/CTM/">ftp://ftp.FreeBSD.org/pub/FreeBSD/development/CTM/</uri></para>
	      </listitem>
	      <listitem>
		<para><uri
		  xlink:href="ftp://ftp.FreeBSD.org/pub/FreeBSD/CTM/">ftp://ftp.FreeBSD.org/pub/FreeBSD/CTM/</uri></para>
	      </listitem>
	    </itemizedlist>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>South Africa, backup server for old deltas</term>

	  <listitem>
	    <itemizedlist>
	      <listitem>
		<para><uri
		  xlink:href="ftp://ftp.za.FreeBSD.org/pub/FreeBSD/CTM/">ftp://ftp.za.FreeBSD.org/pub/FreeBSD/CTM/</uri></para>
	      </listitem>
	    </itemizedlist>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Taiwan/R.O.C.</term>

	  <listitem>
	    <itemizedlist>
	      <listitem>
		<para><uri
		  xlink:href="ftp://ctm.tw.FreeBSD.org/pub/FreeBSD/development/CTM/">ftp://ctm.tw.FreeBSD.org/pub/FreeBSD/development/CTM/</uri></para>
	      </listitem>

	      <listitem>
		<para><uri
		  xlink:href="ftp://ctm2.tw.FreeBSD.org/pub/FreeBSD/development/CTM/">ftp://ctm2.tw.FreeBSD.org/pub/FreeBSD/development/CTM/</uri></para>
	      </listitem>

	      <listitem>
		<para><uri
		  xlink:href="ftp://ctm3.tw.FreeBSD.org/pub/FreeBSD/development/CTM/">ftp://ctm3.tw.FreeBSD.org/pub/FreeBSD/development/CTM/</uri></para>
	      </listitem>
	    </itemizedlist>
	  </listitem>
	</varlistentry>
      </variablelist>

      <para>To instead receive deltas through email, subscribe to one
	of the <literal>ctm-src</literal> distribution lists available
	from <uri
	  xlink:href="http://lists.freebsd.org/mailman/listinfo">http://lists.freebsd.org/mailman/listinfo</uri>.
	For example, &a.ctm-src-cur.name; supports the head
	development branch and  &a.ctm-src-9.name; supports the 9.X
	release branch.</para>

      <para>As <application>CTM</application> updates arrive through
	email, use <command>ctm_rmail</command> to unpack and apply
	them.  This command can be run directly from an entry in
	<filename>/etc/aliases</filename> in order to automate this
	process.  Refer to &man.ctm.rmail.1; for more details.</para>

      <note>
	<para>Regardless of the method which is used to get deltas,
	  <application>CTM</application> users should subscribe
	  to the &a.ctm-announce.name; mailing list as this is the
	  only mechanism by which <application>CTM</application>
	  announcements are posted.</para>
      </note>
    </sect2>

    <sect2>
      <title><application>CTM</application> Usage</title>

      <para>Before <application>CTM</application> deltas can be used
	for the first time, a starting point must be produced.</para>

      <para>One method is to apply a <quote>starter</quote> delta to
	an empty directory.  A  starter delta can be recognized by the
	<filename>XEmpty</filename> in its name, such as
	<filename>src-cur.3210XEmpty.gz</filename>.  The designation
	following the <literal>X</literal> corresponds to the origin
	of the initial <quote>seed</quote>, where
	<filename>Empty</filename> is an empty directory.  As a rule,
	a base transition from <literal>Empty</literal> is produced
	every 100 deltas.  Be aware that starter deltas are large and
	70 to 80 Megabytes of <command>gzip</command>'d data is common
	for the <filename>XEmpty</filename> deltas.</para>

      <para>Another method is to copy or extract an initial source
	from  a RELEASE media as this can  save a significant transfer
	of data from the Internet.</para>

      <para>Once a base delta has been created, apply all deltas with
	higher numbers.  To apply the deltas:</para>

      <screen>&prompt.root; <userinput>cd /directory/to/store/the/stuff</userinput>
&prompt.root; <userinput>ctm -v -v /directory/which/stores/the/deltas/src-xxx.*</userinput></screen>

      <para>Multiple deltas can be applied with a single command as
	they will be processed one at a time and any deltas that are
	already applied will be ignored.
	<application>CTM</application> understands
	<command>gzip</command> compressed deltas, which saves disk
	space.</para>

      <para>To verify a delta without applying it, include
	<option>-c</option> in the command line.
	<application>CTM</application> will not actually modify the
	local tree but will instead verify the integrity of the delta
	to see if it would apply cleanly.  Refer to &man.ctm.1; for
	more information about available options and an overview of
	the process <application>CTM</application> uses when applying
	deltas.</para>

      <para>To keep the local source tree up-to-date, every time a
	new delta becomes available, apply it through
	<application>CTM</application>.</para>

      <para>Once applied, it is recommended to not delete the deltas
	if it is a burden to download them again.  This way, a local
	copy is available in case it is needed for future disaster
	recovery.</para>
    </sect2>

    <sect2>
      <title>Keeping Local Changes</title>

      <para>Developers often experiment with and
	change files in their local source tree.
	<application>CTM</application> supports local modifications in
	a limited way: before checking for the presence of a file,
	it first looks for a file with the same name and a
	<filename>.ctm</filename> extension.  If this file exists,
	<application>CTM</application> will operate on it instead of
	the original filename.</para>

      <para>This behavior provides a simple way to maintain local
	changes.  Before modifying a file, make a copy with a
	<filename>.ctm</filename> suffix.  Make any changes to the
	original filename, knowing that
	<application>CTM</application> will only apply updates to the
	file with the <filename>.ctm</filename> suffix.</para>
    </sect2>

    <sect2>
      <title>Other <application>CTM</application> Options</title>

      <variablelist>
	<varlistentry>
	  <term>Finding Out Exactly What Would Be Touched by an
	    Update</term>

	  <listitem>
	    <para>To determine the list of changes that
	      <application>CTM</application> will make to the local
	      source repository, use <option>-l</option>.  This option
	      is useful for creating logs of the changes or when
	      performing pre- or post-processing on any of the
	      modified files.</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Making Backups Before Updating</term>

	  <listitem>
	    <para>To backup all of the files that would be changed by
	      a <application>CTM</application> update, specify
	      <option>-B
		<replaceable>backup-file</replaceable></option>.  This
	      option tells <application>CTM</application> to backup
	      all files touched by the applied
	      <application>CTM</application> delta to
	      <filename>backup-file</filename>.</para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>Restricting the Files Touched by an Update</term>

	  <listitem>
	    <para>To restrict the scope of a given
	      <application>CTM</application> update, or to extract
	      just a few files from a sequence of deltas, filtering
	      regular expressions can be specified using
	      <option>-e</option>, which specifies which files to
	      process, or <option>-x</option>, which specifies which
	      files to ignore.</para>

	    <para>For example, to extract an up-to-date copy of
	      <filename>lib/libc/Makefile</filename> from a collection
	      of saved <application>CTM</application> deltas:</para>

	    <screen>&prompt.root; <userinput>cd /directory/to/extract/to/</userinput>
&prompt.root; <userinput>ctm -e '^lib/libc/Makefile' /directory/which/stores/the/deltas/src-xxx.*</userinput></screen>

	    <para>For every file specified in a
	      <application>CTM</application> delta,
	      <option>-e</option> and <option>-x</option> are
	      applied in the order given on the command line.  A file
	      is processed by <application>CTM</application> only if
	      it is marked as eligible after all <option>-e</option>
	      and <option>-x</option> options are applied.</para>
	  </listitem>
	</varlistentry>
      </variablelist>
    </sect2>
<!--
Comment out for now until these can be verified.
    <sect2>
      <title>Future Plans for <application>CTM</application></title>

      <para>Tons of them:</para>

      <itemizedlist>
	<listitem>
	  <para>Use some kind of authentication into the
	    <application>CTM</application> system, so as to allow
	    detection of spoofed <application>CTM</application>
	    updates.</para>
	</listitem>

	<listitem>
	  <para>Clean up the options to
	    <application>CTM</application>, they became confusing and
	    counter intuitive.</para>
	</listitem>
      </itemizedlist>

      <para>There is a sequence of deltas for the
	<literal>ports</literal> collection too, but interest has not
	been all that high yet.</para>
    </sect2>
    -->
  </sect1>

  <sect1 xml:id="svn">
    <title>Using <application>Subversion</application></title>

    <indexterm>
      <primary>Subversion</primary>
    </indexterm>

    <sect2 xml:id="svn-intro">
      <title>Introduction</title>

      <para>As of July 2012, &os; uses
	<application>Subversion</application> as the primary version
	control system for storing all of &os;'s source code,
	documentation, and the Ports Collection.</para>

      <note>
	<para><application>Subversion</application> is generally a
	  developer tool.  Most users should use
	  <command>freebsd-update</command> (<xref
	    linkend="updating-upgrading-freebsdupdate"/>) to update
	  the &os; base system, and <command>portsnap</command> (<xref
	    linkend="ports-using"/>) to update the &os; Ports
	  Collection.</para>
      </note>

      <para>This chapter demonstrates how to install
	<application>Subversion</application> on a &os; system and
	then use it to create a local copy of a &os; repository.  It
	includes a list of the available &os;
	<application>Subversion</application> mirrors and resources to
	additional information on how to use
	<application>Subversion</application>.</para>
    </sect2>

    <sect2 xml:id="svn-install">
      <title>Installation</title>

      <para><application>Subversion</application> must be installed
	before it can be used to check out the contents of any of the
	repositories.  If a copy of the ports tree is already present,
	one can install <application>Subversion</application> like
	this:</para>

      <screen>&prompt.root; <userinput>cd /usr/ports/devel/subversion</userinput>
&prompt.root; <userinput>make install clean</userinput></screen>

      <para>If the ports tree is not available,
	<application>Subversion</application> can be installed as a
	package:</para>

      <screen>&prompt.root; <userinput>pkg_add -r subversion</userinput></screen>

      <para>If <application>pkgng</application> is being used to
	manage packages, <application>Subversion</application> can be
	installed with it instead:</para>

      <screen>&prompt.root; <userinput>pkg install devel/subversion</userinput></screen>
    </sect2>

    <sect2 xml:id="svn-usage">
      <title>Running <application>Subversion</application></title>

      <para>The <command>svn</command> command is used to fetch a
	clean copy of the sources into a local directory.  The files
	in this directory are called a <emphasis>local working
	  copy</emphasis>.</para>

      <warning>
	<para>If the local directory already exists but was not
	  created by <command>svn</command>, rename or delete it
	  before the checkout.  Checkout over an existing
	  non-<command>svn</command> directory can cause conflicts
	  between the existing files and those brought in from the
	  repository.</para>
      </warning>

      <para><application>Subversion</application> uses
	<acronym>URL</acronym>s to designate a repository, taking the
	form of <replaceable>protocol://hostname/path</replaceable>.
	Mirrors may support different protocols as specified below.
	The first component of the path is the &os; repository to
	access.  There are three different repositories,
	<literal>base</literal> for the &os; base system source code,
	<literal>ports</literal> for the Ports Collection, and
	<literal>doc</literal> for documentation.  For example, the
	URL
	<literal>svn://svn0.us-east.FreeBSD.org/ports/head/</literal>
	specifies the main branch of the ports repository on the
	<systemitem
	  class="fqdomainname">svn0.us-east.FreeBSD.org</systemitem>
	mirror, using the <literal>svn</literal> protocol.</para>

      <para>A checkout from a given repository is performed with a
	command like this:</para>

      <screen>&prompt.root; <userinput>svn checkout <replaceable>svn-mirror</replaceable>/<replaceable>repository</replaceable>/<replaceable>branch</replaceable> <replaceable>lwcdir</replaceable></userinput></screen>

      <para>where:</para>

      <itemizedlist>
	<listitem>
	  <para><replaceable>svn-mirror</replaceable> is a URL for one
	    of the <link linkend="svn-mirrors">Subversion mirror
	      sites</link>.</para>
	</listitem>

	<listitem>
	  <para><replaceable>repository</replaceable> is one of the
	    Project repositories, i.e., <literal>base</literal>,
	    <literal>ports</literal>, or
	    <literal>doc</literal>.</para>
	</listitem>

	<listitem>
	  <para><replaceable>branch</replaceable> depends on the
	    repository used.  <literal>ports</literal> and
	    <literal>doc</literal> are mostly updated in the
	    <literal>head</literal> branch, while
	    <literal>base</literal> maintains the latest version of
	    -CURRENT under <literal>head</literal> and the respective
	    latest versions of the -STABLE branches under
	    <literal>stable/8</literal> (for
	    8.<replaceable>x</replaceable>),
	    <literal>stable/9</literal>
	    (9.<replaceable>x</replaceable>) and
	    <literal>stable/10</literal>
	    (10.<replaceable>x</replaceable>).</para>
	</listitem>

	<listitem>
	  <para><replaceable>lwcdir</replaceable> is the target
	    directory where the contents of the specified branch
	    should be placed.  This is usually
	    <filename>/usr/ports</filename> for
	    <literal>ports</literal>,
	    <filename>/usr/src</filename> for
	    <literal>base</literal>, and
	    <filename>/usr/doc</filename> for
	    <literal>doc</literal>.</para>
	</listitem>
      </itemizedlist>

      <para>This example checks out the Ports Collection from the
	western US repository using the <acronym>HTTPS</acronym>
	protocol, placing the local working copy in
	<filename>/usr/ports</filename>.  If
	<filename>/usr/ports</filename> is already
	present but was not created by <command>svn</command>,
	remember to rename or delete it before the checkout.</para>

      <screen>&prompt.root; <userinput>svn checkout <replaceable>https://svn0.us-west.FreeBSD.org</replaceable>/ports/head /usr/ports</userinput></screen>

      <para>Because the initial checkout has to download the full
	branch of the remote repository, it can take a while.  Please
	be patient.</para>

      <para>After the initial checkout, the local working copy can be
	updated by running:</para>

      <screen>&prompt.root; <userinput>svn update <replaceable>lwcdir</replaceable></userinput></screen>

      <para>To update
	<filename>/usr/ports</filename> created in
	the example above, use:</para>

      <screen>&prompt.root; <userinput>svn update /usr/ports</userinput></screen>

      <para>The update is much quicker than a checkout, only
	transferring files that have changed.</para>

      <para>An alternate way of updating the local working copy after
	checkout is provided by the <filename>Makefile</filename> in
	the <filename>/usr/ports</filename>,
	<filename>/usr/src</filename>, and
	<filename>/usr/doc</filename> directories.
	Set <varname>SVN_UPDATE</varname> and use the
	<buildtarget>update</buildtarget> target.  For example, to
	update <filename>/usr/src</filename>:</para>

      <screen>&prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make update SVN_UPDATE=yes</userinput></screen>
    </sect2>

    <sect2 xml:id="svn-mirrors">
      <title><application>Subversion</application> Mirror
	Sites</title>

      <indexterm>
	<primary>Subversion Repository</primary>
	<secondary>Mirror Sites</secondary>
      </indexterm>

      <para>All mirrors carry all repositories.</para>

      <para>The master &os; <application>Subversion</application>
	server, <systemitem
	  class="fqdomainname">svn.FreeBSD.org</systemitem>, is
	publicly accessible, read-only.  That may change in the
	future, so users are encouraged to use one of the official
	mirrors.  To view the &os;
	<application>Subversion</application> repositories through a
	browser, use <link
	  xlink:href="http://svnweb.FreeBSD.org/">http://svnweb.FreeBSD.org/</link>.</para>

      <note>
	<para>The &os; <application>Subversion</application> mirror
	  network is still in its early days, and will likely change.
	  Do not count on this list of mirrors being static.  In
	  particular, the <acronym>SSL</acronym> certificates of the
	  servers will likely change at some point.</para>
      </note>

      <informaltable>
	<tgroup cols="4">
	  <colspec colwidth="3*"/>
	  <colspec colwidth="1*"/>
	  <colspec colwidth="2*"/>
	  <colspec colwidth="10*"/>
	  <thead>
	    <row>
	      <entry>Name</entry>

	      <entry>Protocols</entry>

	      <entry>Location</entry>

	      <entry><acronym>SSL</acronym> Fingerprint</entry>
	    </row>
	  </thead>

	  <tbody>
	    <row>
	      <entry><systemitem
		class="fqdomainname">svn0.us-west.FreeBSD.org</systemitem></entry>

	      <entry><literal>svn</literal>, <link
		  xlink:href="http://svn0.us-west.FreeBSD.org/"><literal>http</literal></link>,
		<link
		  xlink:href="https://svn0.us-west.FreeBSD.org/"><literal>https</literal></link></entry>

	      <entry>USA, California</entry>

	      <entry>SHA1
		<literal>1C:BD:85:95:11:9F:EB:75:A5:4B:C8:A3:FE:08:E4:02:73:06:1E:61</literal></entry>
	    </row>

	    <row>
	      <entry><systemitem
		  class="fqdomainname">svn0.us-east.FreeBSD.org</systemitem></entry>

	      <entry><literal>svn</literal>, <link
		  xlink:href="http://svn0.us-east.FreeBSD.org/"><literal>http</literal></link>,
		<link
		  xlink:href="https://svn0.us-east.FreeBSD.org/"><literal>https</literal></link>,
		<literal>rsync</literal></entry>

	      <entry>USA, New Jersey</entry>

	      <entry>SHA1
		<literal>1C:BD:85:95:11:9F:EB:75:A5:4B:C8:A3:FE:08:E4:02:73:06:1E:61</literal></entry>
	    </row>

	    <row>
	      <entry><systemitem
		  class="fqdomainname">svn0.eu.FreeBSD.org</systemitem></entry>

	      <entry><literal>svn</literal>, <link
		  xlink:href="http://svn0.eu.FreeBSD.org/"><literal>http</literal></link>,
		<link
		  xlink:href="https://svn0.eu.FreeBSD.org/"><literal>https</literal></link>,
		<literal>rsync</literal></entry>

	      <entry>Europe, UK</entry>

	      <entry>SHA1
		<literal>39:B0:53:35:CE:60:C7:BB:00:54:96:96:71:10:94:BB:CE:1C:07:A7</literal></entry>
	    </row>

	    <row>
	      <entry><systemitem
		  class="fqdomainname">svn0.ru.FreeBSD.org</systemitem></entry>

	      <entry><literal>svn</literal>, <link
		  xlink:href="http://svn0.ru.FreeBSD.org/"><literal>http</literal></link>,
		<link
		  xlink:href="https://svn0.ru.FreeBSD.org/"><literal>https</literal></link>,
		<literal>rsync</literal></entry>

	      <entry>Russia, Moscow</entry>

	      <entry>SHA1
		<literal>F6:44:AA:B9:03:89:0E:3E:8C:4D:4D:14:F0:27:E6:C7:C1:8B:17:C5</literal></entry>
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>

      <para><acronym>HTTPS</acronym> is the preferred protocol,
	providing protection against another computer pretending to be
	the &os; mirror (commonly known as a <quote>man in the
	  middle</quote> attack) or otherwise trying to send bad
	content to the end user.</para>

      <para>On the first connection to an <acronym>HTTPS</acronym>
	mirror, the user will be asked to verify the server
	<emphasis>fingerprint</emphasis>:</para>

      <screen>Error validating server certificate for 'https://svn0.us-west.freebsd.org:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
 - The certificate hostname does not match.
Certificate information:
 - Hostname: svnmir.ysv.FreeBSD.org
 - Valid: from Jul 29 22:01:21 2013 GMT until Dec 13 22:01:21 2040 GMT
 - Issuer: clusteradm, FreeBSD.org, (null), CA, US (clusteradm@FreeBSD.org)
 - Fingerprint: 1C:BD:85:95:11:9F:EB:75:A5:4B:C8:A3:FE:08:E4:02:73:06:1E:61
(R)eject, accept (t)emporarily or accept (p)ermanently?</screen>

      <para>Compare the fingerprint shown to those listed in the table
	above.  If the fingerprint matches, the server security
	certificate can be accepted temporarily or permanently.  A
	temporary certificate will expire after a single session with
	the server, and the verification step will be repeated on the
	next connection.  Accepting the certificate permanently will
	store the authentication credentials in
	<filename>~/.subversion/auth/</filename> and the user will not
	be asked to verify the fingerprint again until the certificate
	expires.</para>

      <para>If <literal>https</literal> cannot be used due to firewall
	or other problems, <literal>svn</literal> is the next choice,
	with slightly faster transfers.  When neither can be used, use
	<literal>http</literal>.</para>
    </sect2>

    <sect2>
      <title>For More Information</title>

      <para>For other information about using
	<application>Subversion</application>, please see the
	<quote>Subversion Book</quote>, titled
	<link xlink:href="http://svnbook.red-bean.com/">Version
	  Control with Subversion</link>, or the <link
	  xlink:href="http://subversion.apache.org/docs/">Subversion
	  Documentation</link>.</para>
    </sect2>
  </sect1>

  <sect1 xml:id="mirrors-rsync">
    <title>Using <application>rsync</application></title>

    <para>The following sites make &os; available through the rsync
      protocol.  The <application>rsync</application> utility works in
      much the same way as the &man.rcp.1; command, but has more
      options and uses the rsync remote-update protocol which
      transfers only the differences between two sets of files, thus
      greatly speeding up the synchronization over the network.  This
      is most useful if you are a mirror site for the &os;
      <acronym>FTP</acronym> server, or the CVS repository.  The
      <application>rsync</application> suite is available for many
      operating systems, on &os;, see the <package>net/rsync</package>
      port or use the package.</para>

    <variablelist>
      <varlistentry>
	<term>Czech Republic</term>

	<listitem>
	  <para>rsync://ftp.cz.FreeBSD.org/</para>

	  <para>Available collections:</para>
	  <itemizedlist>
	    <listitem>
	      <para>ftp: A partial mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>

	    <listitem>
	      <para>&os;: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Netherlands</term>

	<listitem>
	  <para>rsync://ftp.nl.FreeBSD.org/</para>

	  <para>Available collections:</para>
	  <itemizedlist>
	    <listitem>
	      <para>&os;: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Russia</term>

	<listitem>
	  <para>rsync://ftp.mtu.ru/</para>

	  <para>Available collections:</para>

	  <itemizedlist>
	    <listitem>
	      <para>&os;: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>

	    <listitem>
	      <para>&os;-gnats: The GNATS bug-tracking
		database.</para>
	    </listitem>

	    <listitem>
	      <para>&os;-Archive: The mirror of &os; Archive
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Sweden</term>

	<listitem>
	  <para>rsync://ftp4.se.freebsd.org/</para>

	  <para>Available collections:</para>
	  <itemizedlist>
	    <listitem>
	      <para>&os;: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>Taiwan</term>

	<listitem>
	  <para>rsync://ftp.tw.FreeBSD.org/</para>

	  <para>rsync://ftp2.tw.FreeBSD.org/</para>

	  <para>rsync://ftp6.tw.FreeBSD.org/</para>

	  <para>Available collections:</para>
	  <itemizedlist>
	    <listitem>
	      <para>&os;: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>United Kingdom</term>

	<listitem>
	  <para>rsync://rsync.mirrorservice.org/</para>

	  <para>Available collections:</para>
	  <itemizedlist>
	    <listitem>
	      <para>ftp.freebsd.org: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>United States of America</term>

	<listitem>
	  <para>rsync://ftp-master.FreeBSD.org/</para>

	  <para>This server may only be used by &os; primary mirror
	    sites.</para>

	  <para>Available collections:</para>

	  <itemizedlist>
	    <listitem>
	      <para>&os;: The master archive of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>

	    <listitem>
	      <para>acl: The &os; master ACL list.</para>
	    </listitem>
	  </itemizedlist>

	  <para>rsync://ftp13.FreeBSD.org/</para>

	  <para>Available collections:</para>

	  <itemizedlist>
	    <listitem>
	      <para>&os;: A full mirror of the &os;
		<acronym>FTP</acronym> server.</para>
	    </listitem>
	  </itemizedlist>
	</listitem>
      </varlistentry>
    </variablelist>
  </sect1>
</appendix>