aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/books/handbook/mirrors/chapter.xml
blob: 16ad038ebafff35a5e2ba0882604d343fa619896 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
<?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 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><emphasis>Move or delete the local directory before
	    using <command>checkout</command>.</emphasis></para>

	<para>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 xml:id="svn-mirrors-fingerprint">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;-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>