aboutsummaryrefslogtreecommitdiff
path: root/en_US.ISO8859-1/articles/building-products/article.xml
blob: 5cca22d6a079bccf22559ed22e10a6a603b190af (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
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook XML V4.5-Based Extension//EN"
	"../../../share/xml/freebsd45.dtd">

<article lang='en'>
  <articleinfo>
    <title>Building Products with FreeBSD</title>
    <authorgroup>
      <author>
        <firstname>Joseph</firstname>
        <surname>Koshy</surname>
        <affiliation>
          <orgname>The FreeBSD Project</orgname>
          <address><email>jkoshy@FreeBSD.org</email></address>
        </affiliation>
      </author>
    </authorgroup>

    <legalnotice id="trademarks" role="trademarks">
      &tm-attrib.freebsd;
      &tm-attrib.general;
    </legalnotice>

    <pubdate>$FreeBSD$</pubdate>

    <releaseinfo>$FreeBSD$</releaseinfo>

    <abstract>
      <title>Abstract</title>

      <para>The FreeBSD project is a worldwide, voluntary, and
        collaborative project, which develops a portable and high-quality
        operating system.  The FreeBSD project distributes the source
        code for its product under a liberal license, with the
        intention of encouraging the use of its code.  Collaborating
        with the FreeBSD project can help organizations reduce their
        time to market, reduce engineering costs and improve their
        product quality.</para>

      <para>This article examines the issues in using FreeBSD code in
        appliances and software products.  It highlights the
        characteristics of FreeBSD that make it an excellent substrate
        for product development. The article concludes by suggesting a
        few <quote>best practices</quote> for organizations
        collaborating with the FreeBSD project.</para>
    </abstract>
  </articleinfo>

  <sect1 id="introduction">
    <title>Introduction</title>

    <para>FreeBSD today is well-known as a high-performance server
      operating system.  It is deployed on millions of web servers and
      internet-facing hosts worldwide.  FreeBSD code also forms an
      integral part of many products, ranging from appliances such as
      network routers, firewalls, and storage devices, to personal
      computers.  Portions of FreeBSD have also been used in
      commercial shrink-wrapped software (see
      <xref linkend="freebsd-intro"/>).</para>

    <para>In this article we look at the <ulink
        url="&url.base;/">FreeBSD project</ulink> as a software
      engineering resource&mdash;as a collection of building blocks
      and processes which you can use to build products.</para>

    <para>While FreeBSD's source is distributed freely to the public,
      to fully enjoy the benefits of the project's work, organizations
      need to <emphasis>collaborate</emphasis> with the project.  In
      subsequent sections of this article we discuss effective means
      of collaboration with the project and the pitfalls that need to
      be avoided while doing so.</para>

    <formalpara>
      <title>Caveat Reader</title>
      <para>The author believes that the characteristics of the FreeBSD
      	Project listed in this article were substantially true at the
	time the article was conceived and written (2005).  However, the
	reader should keep in mind that the practices and processes used
	by open-source communities can change over time, and that the information
	in this article should therefore be taken as indicative rather
	than normative.</para>
    </formalpara>

    <sect2>
      <title>Target Audience</title>
      <para>This document would be of interest to the following broad
        groups of people:</para>
      <itemizedlist>
        <listitem>
          <simpara>Decision makers in product companies looking at
            ways to improve their product quality, reduce their time
            to market and lower engineering costs in the long
            term.</simpara>
        </listitem>
        <listitem>
          <simpara>Technology consultants looking for best-practices
            in leveraging <quote>open-source</quote>.</simpara>
        </listitem>
        <listitem>
          <simpara>Industry observers interested in understanding the
            dynamics of open-source projects.</simpara>
        </listitem>
        <listitem>
          <simpara>Software developers seeking to use FreeBSD and
            looking for ways to contribute back.</simpara>
        </listitem>
      </itemizedlist>
    </sect2>

    <sect2>
      <title>Article Goals</title>
      <para>After reading this article you should have:</para>
      <itemizedlist>
        <listitem>
          <simpara>An understanding of the goals of the FreeBSD
            Project and its organizational structure.</simpara>
        </listitem>
        <listitem>
          <simpara>An overview of the available technology in the
            project.</simpara>
        </listitem>
        <listitem>
          <simpara>An understanding of its development model and
            release engineering processes.</simpara>
        </listitem>
        <listitem>
          <simpara>An understanding of how conventional corporate
            software development processes differ from that used in
            the FreeBSD project.</simpara>
        </listitem>
        <listitem>
          <simpara>Awareness of the communication channels used by the
            project and the level of transparency you can
            expect.</simpara>
        </listitem>
        <listitem>
          <simpara>Awareness of optimal ways of working with the
            project&mdash;how best to reduce engineering costs,
            improve time to market, manage security vulnerabilities,
            and preserve future compatibility with your product as the
            FreeBSD project evolves.</simpara>
        </listitem>
      </itemizedlist>
    </sect2>

    <sect2>
      <title>Article Structure</title>
      <para>The rest of the article is structured as follows:</para>
      <itemizedlist>
        <listitem>
          <simpara><xref linkend="freebsd-intro"/> introduces the
            FreeBSD project, explores its organizational structure,
            key technologies and release engineering
            processes.</simpara>
        </listitem>
        <listitem>
          <simpara><xref linkend="freebsd-collaboration"/> describes
            ways to collaborate with the FreeBSD project.  It examines
            common pitfalls encountered by corporates working with
            voluntary projects like FreeBSD.</simpara>
        </listitem>
        <listitem>
          <simpara><xref linkend="conclusion"/> concludes.</simpara>
        </listitem>
      </itemizedlist>
    </sect2>
  </sect1>

  <sect1 id="freebsd-intro">
    <title>FreeBSD as a set of building blocks</title>

    <para>FreeBSD makes an excellent foundation on which to build
      products:</para>

    <itemizedlist>
      <listitem>
        <simpara>FreeBSD source code is distributed under a liberal
          BSD license facilitating its adoption in commercial products
          <citation>Mon2005</citation> with minimum hassle.</simpara>
      </listitem>
      <listitem>
        <simpara>The FreeBSD project has excellent engineering
          practices that can be leveraged.</simpara>
      </listitem>
      <listitem>
        <simpara>The project offers exceptional transparency into its
          workings, allowing organizations using its code to plan
          effectively for the future.</simpara>
      </listitem>
      <listitem>
        <simpara>The culture of the FreeBSD project, carried over from
          the Computer Science Research Group at The University of
          California, Berkeley <citation>McKu1999-1</citation>,
          fosters high-quality work. Some features in FreeBSD define
          the state of the art.</simpara>
      </listitem>
    </itemizedlist>

    <simpara><citation>GoldGab2005</citation> examines the business
      reasons for using open-source in greater detail.  For
      organizations, the benefits of using FreeBSD components in their
      products include a shorter time to market, lower development
      costs and lower development risks. </simpara>

    <sect2>
      <title>Building with FreeBSD</title>

      <simpara>Here are a few ways organizations have used
        FreeBSD:</simpara>

      <itemizedlist>
        <listitem>
          <simpara>As an upstream source for tested code for libraries
            and utilities.</simpara>
          <simpara>By being <quote>downstream</quote> of the project,
            organizations leverage the new features, bug fixes and
            testing that the upstream code receives.</simpara>
        </listitem>
        <listitem>
          <simpara>As an embedded OS (for example, for an OEM router
            and firewall device).  In this model, organizations use a
            customized FreeBSD kernel and application program set
            along with a proprietary management layer for their
            device. OEMs benefit from new hardware support being added
            by the FreeBSD project upstream, and from the testing that
            the base system receives.</simpara>
          <simpara>FreeBSD ships with a self-hosting development
            environment that allows easy creation of such
            configurations.</simpara>
        </listitem>
        <listitem>
          <simpara>As a Unix compatible environment for the management
            functions of high-end storage and networking devices,
            running on a separate processor <quote>blade</quote>.</simpara>
          <simpara>FreeBSD provides the tools for creating dedicated
            OS and application program images.  Its implementation of
            a BSD unix API is mature and tested.  FreeBSD can also
            provide a stable cross-development environment for the
            other components of the high-end device.</simpara>
        </listitem>
        <listitem>
          <simpara>As a vehicle to get widespread testing and support
            from a worldwide team of developers for non-critical
            <quote>intellectual property</quote>.</simpara>
          <simpara>In this model, organizations contribute useful
            infrastructural frameworks to the FreeBSD project (for
            example, see &man.netgraph.3;).  The widespread
            exposure that the code gets helps to quickly identify
            performance issues and bugs.  The involvement of
            top-notch developers also leads to useful extensions to
            the infrastructure that the contributing organization also
            benefits from.</simpara>
        </listitem>

        <listitem>
          <simpara>As a development environment supporting
            cross-development for embedded OSes like <ulink
              url="http://www.rtems.com/">RTEMS</ulink> and <ulink
              url="http://ecos.sourceware.org/">eCOS</ulink>.</simpara>
          <simpara>There are many full-fledged development environments
            in the &os.numports;-strong collection of applications ported and
            packaged with FreeBSD.</simpara>
        </listitem>

        <listitem>
          <simpara>As a way to support a Unix-like API in an otherwise
            proprietary OS, increasing its palatability for
            application developers.</simpara>
          <simpara>Here parts of FreeBSD's kernel and application
            programs are <quote>ported</quote> to run alongside
            other tasks in the proprietary OS.  The availability of a
            stable and well tested <trademark>Unix</trademark> API
            implementation can reduce the effort needed to port
            popular applications to the proprietary OS.  As FreeBSD
            ships with high-quality documentation for its internals
            and has effective vulnerability management and release
            engineering processes, the costs of keeping upto-date are
            kept low.</simpara>
        </listitem>
      </itemizedlist>
    </sect2>

    <sect2 id="freebsd-technologies">
      <title>Technologies</title>

      <para>There are a large number of technologies supported by the
        FreeBSD project.  A selection of these are listed
        below:</para>

      <itemizedlist>
        <listitem>
          <simpara>A complete system that can cross-host itself for
            the following architectures: alpha (up to &os; version 6.X), amd64, ia64, i386,
            sparc64, powerpc (see &man.build.7;).</simpara>
        </listitem>
        <listitem>
          <simpara>Support for the following technologies, protocols
            and standards: <!-- Keyword soup. Urk. -->
            <acronym>ATA</acronym>, <acronym>ATAPI</acronym>,
            <acronym>ATM</acronym>, <trademark>Bluetooth</trademark>,
            <acronym>CAM</acronym>, <trademark>CardBus</trademark>,
            <acronym>DHCP</acronym>, <acronym>DNS</acronym>,
            <trademark>EISA</trademark>,
            <trademark>Ethernet</trademark>, <acronym>FDDI</acronym>,
            Fibre Channel, <acronym>GPIB</acronym>, IEEE 1394, IPv4,
            IPv6, <acronym>IPSEC</acronym>,
            <trademark>IPX</trademark>, <acronym>ISDN</acronym>,
            <acronym>MAC</acronym>, <acronym>NIS</acronym>,
            <acronym>NFS</acronym>,  OpenSSH, <acronym>OPIE</acronym>,
            <acronym>PAM</acronym>, <trademark>PCI</trademark>,
            <acronym>PCMCIA</acronym>, <trademark>POSIX</trademark>,
            <acronym>PnP</acronym>, <acronym>RAID</acronym>,
            <acronym>RPC</acronym>, <acronym>SATA</acronym>,
            <acronym>SCSI</acronym>, <acronym>SMB</acronym>,
            <acronym>TCP</acronym>, <acronym>USB</acronym>,
            <acronym>VESA</acronym>, <acronym>VLAN</acronym>,
            <acronym>VLB</acronym>,
            <trademark>WebNFS</trademark>.</simpara>
        </listitem>
        <listitem>
          <simpara>A modular symmetric multiprocessing capable kernel,
            with loadable kernel modules and a flexible and easy to
            use configuration system.</simpara>
        </listitem>
        <listitem>
          <simpara>Support for emulation of
            <trademark>Linux</trademark> and SVR4 binaries at near
            machine speeds.  Support for binary
            <trademark>Windows</trademark> (<acronym>NDIS</acronym>)
            network drivers.</simpara>
        </listitem>
        <listitem>
          <simpara>Libraries for many programming tasks: archivers,
            FTP and HTTP support, thread support, in addition to a
            full <trademark>POSIX</trademark> like programming
            environment.</simpara>
        </listitem>
        <listitem>
          <simpara>Advanced security features: Mandatory Access
            Control (&man.mac.9;), jails (&man.jail.2;),
            <acronym>ACL</acronym>s, and in-kernel
            cryptographic device support.</simpara>
        </listitem>
        <listitem>
          <simpara>Advanced networking features: firewall-ing, QoS
            management, high-performance TCP/IP networking with
            support for many advanced features.</simpara>
          <simpara>FreeBSD's in-kernel Netgraph  (&man.netgraph.4;)
            framework allows kernel networking modules to be connected
            together in flexible ways.</simpara>
        </listitem>
        <listitem>
          <simpara>Support for advanced storage technologies: Fibre
            Channel,  <acronym>SCSI</acronym>, software and hardware
            RAID, <acronym>ATA</acronym> and
            <acronym>SATA</acronym>.</simpara>
          <simpara>FreeBSD supports a number of filesystems, and its
            native UFS2 filesystem supports soft updates, snapshots and
            very large filesystem sizes (16TB per filesystem)
            <citation>McKu1999</citation>.</simpara>
          <simpara>FreeBSD's in-kernel <acronym>GEOM</acronym> (&man.geom.4;)
            framework allows kernel storage modules to be
            composed in flexible ways.</simpara>
        </listitem>
        <listitem>
          <simpara>Over &os.numports; ported applications, both commercial
            and open-source, managed via the FreeBSD ports
            collection.</simpara>
        </listitem>
      </itemizedlist>
    </sect2>

    <sect2>
      <title>Organizational Structure</title>
      <para>FreeBSD's organizational structure is
        non-hierarchical.</para>

      <para>There are essentially two kinds of contributors to
        FreeBSD, general users of FreeBSD, and developers with write
        access (known as <firstterm>committers</firstterm> in the
        jargon) to the source base.</para>

      <para>There are many thousands of contributors in the first
        group; the vast majority of contributions to FreeBSD come from
        individuals in this group.  Commit rights (write access) to
        the repository are granted to individuals who contribute
        consistently to the project.  Commit rights come with
        additional responsibilities, and new committers are assigned
        mentors to help them learn the ropes.</para>

      <figure>
        <title>FreeBSD Organization</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="freebsd-organization.pic" format="PIC"/>
          </imageobject>
        </mediaobject>
      </figure>

      <para>Conflict resolution is performed by a nine member
        <quote>Core Team</quote> that is elected from the group of
        committers.</para>

      <para>FreeBSD does not have <quote>corporate</quote> committers.
        Individual committers are required to take responsibility for
        the changes they introduce to the code.  The <ulink
          url="&url.articles.committers-guide;">FreeBSD Committer's
          guide</ulink> <citation>ComGuide</citation> documents the
        rules and responsibilities for committers.</para>

      <para>FreeBSD's project model is examined in detail in
        <citation>Nik2005</citation>.</para>
    </sect2>

    <sect2>
      <title>FreeBSD Release Engineering Processes</title>

      <para>FreeBSD's release engineering processes play a major role
        in ensuring that its released versions are of a high quality.
        At any point of time, FreeBSD's volunteers support multiple
        code lines (<xref linkend="fig-freebsd-branches"/>):</para>

      <itemizedlist>
        <listitem>
          <simpara>New features and disruptive code enters on the
            development branch, also known as the
            <firstterm>-CURRENT</firstterm> branch.</simpara>
        </listitem>
        <listitem>
          <simpara><firstterm>-STABLE</firstterm> branches are code
            lines that are branched from HEAD at regular intervals.
            Only tested code is allowed onto a -STABLE branch.  New
            features are allowed once they have been tested and
            stabilized in the -CURRENT branch.</simpara>
        </listitem>
        <listitem>
          <simpara><firstterm>-RELEASE</firstterm> branches are
            maintained by the FreeBSD security team.  Only bug fixes
            for critical issues are permitted onto -RELEASE
            branches.</simpara>
        </listitem>
      </itemizedlist>

      <figure id="fig-freebsd-branches">
        <title>FreeBSD Release Branches</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="freebsd-branches.eps" format="EPS"/>
          </imageobject>
        </mediaobject>
      </figure>

      <para>Code lines are kept alive for as long as there is user and
        developer interest in them.</para>

      <para>Machine architectures are grouped into
        <quote>tiers</quote>; <firstterm>Tier 1</firstterm>
        architectures are fully supported by the project's release
        engineering and security teams, <firstterm>Tier 2</firstterm>
        architectures are supported on a best effort basis, and
        experimental architectures comprise <firstterm>Tier
          3</firstterm>.  The list of <ulink
          url="&url.articles.committers-guide;/archs.html">supported
          architectures</ulink> is part of the FreeBSD documentation
        collection.</para>

      <para>The release engineering team publishes a <ulink
          url="&url.base;/releng/">road map</ulink> for future
        releases of FreeBSD on the project's web site.  The dates laid
        down in the road map are not deadlines; FreeBSD is released
        when its code and documentation are ready.</para>

      <para>FreeBSD's release engineering processes are described in
        <citation>RelEngDoc</citation>.</para>

    </sect2>
  </sect1>

  <sect1 id="freebsd-collaboration">
    <title>Collaborating with FreeBSD</title>

    <para>Open-source projects like FreeBSD offer finished code of a
      very high quality <citation>Cov2005</citation>.  Previous
      studies have examined the effect of source code availability on
      software development <citation>Com2004</citation>.</para>

    <para>While access to quality source code can reduce the cost of
      initial development, in the long-term the costs of managing
      change begin to dominate. As computing environments change over
      the years and new security vulnerabilities are discovered, your
      product too needs to change and adapt. Using open-source code is
      best viewed not as a one-off activity, but as an
      <emphasis>ongoing process</emphasis>. The best projects to
      collaborate with are the ones that are
      <emphasis>live</emphasis>; i.e., with an active community, clear
      goals and a transparent working style.</para>

    <itemizedlist>
      <listitem>
        <simpara>FreeBSD has an active developer community around it.
          At the time of writing there are many thousands of
          contributors from every populated continent in the world and
          over 300 individuals with write access to the project's
          source repositories.</simpara>
      </listitem>
      <listitem>
        <simpara>The goals of the FreeBSD project are
          <citation>Hub1994</citation>:</simpara>
        <itemizedlist spacing="compact">
          <listitem>
            <simpara>To develop a high-quality operating system for
              popular computer hardware, and,</simpara>
          </listitem>
          <listitem>
            <simpara>To make our work available to all under a liberal
              license.</simpara>
          </listitem>
        </itemizedlist>
      </listitem>
      <listitem>
        <simpara>FreeBSD enjoys an open and transparent working
          culture.  Nearly all discussion in the project happens by
          email, on <ulink url="&a.mailman.listinfo;">public mailing
            lists</ulink> that are also archived for posterity. The
          project's policies are <ulink
            url="&url.base;/internal/policies.html">documented</ulink>
          and maintained under revision control. Participation in the
          project is open to all.</simpara>
      </listitem>
    </itemizedlist>

    <sect2 id="freebsd-org">
      <title>Understanding FreeBSD culture</title>

      <para>To be able to work effectively with the FreeBSD project,
        you need to understand the project's culture.</para>

      <para>Volunteer driven projects operate under different rules
        than for-profit corporates.  A common mistake that companies
        make when venturing into the open-source world is that of
        underplaying these differences.</para>

      <!-- XXX using <formalpara> constructs is clunky, but I like using
           <variablelist> even less -->
      <formalpara>
        <title>Motivation</title>

        <para>Most contributions to FreeBSD are done voluntarily
          without monetary rewards entering the picture.  The factors
          that motivate individuals are complex, ranging from
          altruism, to an interest in solving the kinds of problems
          that FreeBSD attempts to solve.  In this environment,
          <quote>elegance is never optional</quote>
          <citation>Nor1993</citation>.</para>
      </formalpara>

      <formalpara>
        <title>The Long Term View</title>
        <para>FreeBSD traces its roots back nearly twenty years to the
          work of the Computer Science Research Group at the
          University of California Berkeley.<footnote>
            <simpara>FreeBSD's <ulink
                url="http://cvsweb.freebsd.org/">source
                repository</ulink> contains a history of the project
              since its inception, and there are <ulink
                url="http://www.mckusick.com/csrg/">CDROMs
                available</ulink> that contain earlier code from the
              CSRG.</simpara>
          </footnote>  A number of the original CSRG developers remain
          associated with the project.</para>
      </formalpara>

      <para>The project values long-term perspectives
        <citation>Nor2001</citation>.  A frequent acronym encountered
        in the project is <acronym>DTRT</acronym>, which stands for
        <quote>Do The Right Thing</quote>.</para>

      <formalpara>
        <title>Development Processes</title>
        <para>Computer programs are tools for communication: at one
          level programmers communicate their intentions using a
          precise notation to a tool (a compiler) that translates
          their instructions to executable code.  At another level,
          the same notation is used for communication of intent
          between two programmers.</para>
      </formalpara>

      <para>Formal specifications and design documents are seldom used
        in the project.  Clear and well-written code and well-written
        change logs (<xref linkend="fig-change-log"/>) are used in
        their place.  FreeBSD development happens by <quote>rough
          consensus and running code</quote>
        <citation>Carp1996</citation>.</para>

      <figure id="fig-change-log">
        <title>A sample change log entry</title>
        <programlisting>
bde         2005-10-29 16:34:50 UTC

  FreeBSD src repository

  Modified files:
    lib/msun/src         e_rem_pio2f.c
  Log:
  Use double precision to simplify and optimize arg reduction for small
  and medium size args too: instead of conditionally subtracting a float
  17+24, 17+17+24 or 17+17+17+24 bit approximation to pi/2, always
  subtract a double 33+53 bit one.  The float version is now closer to
  the double version than to old versions of itself &mdash; it uses the same
  33+53 bit approximation as the simplest cases in the double version,
  and where the float version had to switch to the slow general case at
  |x| == 2^7*pi/2, it now switches at |x| == 2^19*pi/2 the same as the
  double version.

  This speeds up arg reduction by a factor of 2 for |x| between 3*pi/4 and
  2^7*pi/4, and by a factor of 7 for |x| between 2^7*pi/4 and 2^19*pi/4.

  Revision  Changes    Path
  1.14      +22 -97    src/lib/msun/src/e_rem_pio2f.c
        </programlisting>
      </figure>

      <simpara>Communication between programmers is enhanced by the
        use of a common coding standard &man.style.9;.</simpara>

      <formalpara>
        <title>Communication Channels</title>
        <para>FreeBSD's contributors are spread across the world.
          Email (and to a lesser extent, IRC) is the preferred means
          of communication in the project.</para>
      </formalpara>
    </sect2>

    <sect2>
      <title>Best Practices for collaborating with the FreeBSD
        project</title>

      <para>We now look at a few best practices for making the best
        use of FreeBSD in product development.</para>

      <variablelist>
        <varlistentry>
          <term>Plan for the long term</term>
          <listitem>
            <para>Setup processes that help in tracking the development of
              FreeBSD.  For example:</para>
            <formalpara>
              <title>Track FreeBSD source code</title>
              <para>The project makes it easy to mirror its CVS
                repository using <ulink
                  url="&url.articles.cvsup-advanced;"><!--
                  --><application>CVSup</application></ulink>. Having
                the complete history of the source is useful when
                debugging complex problems and offers valuable insight
                into the intentions of the original developers.  Use a
                capable source control system that allows you to
                easily merge changes between the upstream FreeBSD code
                base and your own in-house code.</para>
            </formalpara>
            <para><xref linkend="fig-cvs-annotate"/> shows a portion of
              an annotated listing of the file referenced by the
              change log in <xref linkend="fig-change-log"/>.  The
              ancestry of each line of the source is clearly visible.
              Annotated listings showing the history of every file
              that is part of FreeBSD are <ulink
                url="http://cvsweb.freebsd.org/">available on the
                web</ulink>.</para>
            <figure id="fig-cvs-annotate">
              <title>An annotated source listing generated using <command>cvs annotate</command></title>
              <programlisting>
<![CDATA[
#LINE #REV         #WHO      #DATE       #TEXT

62    1.1          (jkh      19-Aug-94):      int32_t __ieee754_rem_pio2f(float x, float *y)
63    1.1          (jkh      19-Aug-94): {
64    1.14         (bde      29-Oct-05):      double z,w,t,r,fn;
65    1.13         (bde      29-Oct-05):      double tx[3];
66    1.14         (bde      29-Oct-05):      int32_t e0,i,nx,n,ix,hx;
67    1.1          (jkh      19-Aug-94):
68    1.1          (jkh      19-Aug-94):      GET_FLOAT_WORD(hx,x);
69    1.1          (jkh      19-Aug-94):      ix = hx&0x7fffffff;
70    1.1          (jkh      19-Aug-94):      if(ix<=0x3f490fd8)   /* |x| ~<= pi/4 , no need for reduction */
71    1.1          (jkh      19-Aug-94):          {y[0] = x; y[1] = 0; return 0;}
72    1.14         (bde      29-Oct-05):      /* 33+53 bit pi is good enough for special and medium size cases */
73    1.2          (bde      07-Apr-95):      if(ix<0x4016cbe4) {  /* |x| < 3pi/4, special case with n=+-1 */
74    1.14         (bde      29-Oct-05):          if(hx>0) {
75    1.15         (bde      06-Nov-05):              z = x - pio2;
76    1.15         (bde      06-Nov-05):              n = 1;
77    1.15         (bde      06-Nov-05):          } else {
78    1.15         (bde      06-Nov-05):              z = x + pio2;
79    1.15         (bde      06-Nov-05):              n = 3;
80    1.9          (bde      08-Oct-05):          }
81    1.15         (bde      06-Nov-05):          y[0] = z;
82    1.15         (bde      06-Nov-05):          y[1] = z - y[0];
83    1.15         (bde      06-Nov-05):          return n;
84    1.15         (bde      06-Nov-05):      }
85    1.15         (bde      06-Nov-05):      if(ix<0x407b53d1) {  /* |x| < 5*pi/4, special case with n=+-2 */
]]>
              </programlisting>
            </figure>

            <formalpara>
              <title>Use a gatekeeper</title>
              <para>Appoint a <firstterm>gatekeeper</firstterm> to
                monitor FreeBSD development, to keep an eye out for
                changes that could potentially impact your
                products.</para>
            </formalpara>
            <formalpara>
              <title>Report bugs upstream</title>
              <para>If you notice bug in the FreeBSD code that you are
                using, file a <ulink url="&url.base;/send-pr.html">bug
                  report</ulink>.  This step helps ensure that you do
                not have to fix the bug the next time you take a code
                drop from upstream.</para>
            </formalpara>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Leverage FreeBSD's release engineering efforts</term>
          <listitem>
            <simpara>Use code from a -STABLE development branch of
              FreeBSD.  These development branches are formally
              supported by FreeBSD's release engineering and security
              teams and comprise of tested code.
            </simpara>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Donate code to reduce costs</term>
          <listitem>
            <simpara>A major proportion of the costs associated with
              developing products is that of doing maintenance. By
              donating non-critical code to the project, you benefit
              by having your code see much wider exposure than it
              would otherwise get.  This in turn leads to more bugs
              and security vulnerabilities being flushed out and
              performance anomalies being identified and fixed.
            </simpara>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Get support effectively</term>
          <listitem>
            <simpara>For products with tight deadlines, it is
              recommended that you hire or enter into a consulting
              agreement with a developer or firm with FreeBSD
              experience.  The &a.jobs; is a useful communication
              channel to find talent. The FreeBSD project maintains a
              <ulink
                url="&url.base;/commercial/consult_bycat.html">gallery
                of consultants and consulting firms</ulink>
              undertaking FreeBSD work. The <ulink
                url="http://www.bsdcertification.org/">BSD
                Certification Group</ulink> offers certification for
              all the major BSD derived OSes.</simpara>

            <simpara>For less critical needs, you can ask for help on
              the <ulink
                url="http://lists.FreeBSD.org/mailman/listinfo">project
                mailing lists</ulink>.  A useful guide to follow when
              asking for help is given in
              <citation>Ray2004</citation>.
            </simpara>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Publicize your involvement</term>
          <listitem>
            <simpara>You are not required to publicize your use of
              FreeBSD, but doing so helps both your effort as well as
              that of the project.</simpara>
            <simpara>Letting the FreeBSD community know that your
              company uses FreeBSD helps improve your chances of
              attracting high quality talent.  A large roster of
              support for FreeBSD also means more mind share for it
              among developers.  This in turn yields a healthier
              foundation for your future.</simpara>
          </listitem>
        </varlistentry>

        <varlistentry>
          <term>Support FreeBSD developers</term>
          <listitem>
            <simpara>Sometimes the most direct way to get a desired
              feature into FreeBSD is to support a developer who is
              already looking at a related problem.  Help can range
              from hardware donations to direct financial assistance.
              In some countries, donations to the FreeBSD project
              enjoy tax benefits. The project has a dedicated <ulink
                url="&url.base;/donations/">donations liaison</ulink>
              to assist donors.  The project also maintains a web page
              where developers <ulink
                url="&url.base;/donations/wantlist.html">list their
                needs</ulink>.
            </simpara>
            <simpara>As a policy the FreeBSD project <ulink
                url="&url.articles.contributors;">acknowledges</ulink>
              all contributions received on its web site.</simpara>
          </listitem>
        </varlistentry>
      </variablelist>
    </sect2>
  </sect1>

  <sect1 id="conclusion">
    <title>Conclusion</title>
    <para>The FreeBSD project's goals are to create and give away the
      source code for a high-quality operating system.  By working
      with the FreeBSD project you can reduce development costs and
      improve your time to market in a number of product development
      scenarios.</para>
    <para>We examined the characteristics of the FreeBSD project that
      make it an excellent choice for being part of an organization's
      product strategy.  We then looked at the prevailing culture of
      the project and examined effective ways of interacting with its
      developers.  The article concluded with a list of best-practices
      that could help organizations collaborating with the
      project.</para>
  </sect1>

  <bibliography>
    <biblioentry>
      <abbrev>Carp1996</abbrev>
      <citetitle><ulink url="http://www.ietf.org/rfc/rfc1958.txt">The
          Architectural Principles of the Internet</ulink></citetitle>
      <author>
        <firstname>B.</firstname>
        <surname>Carpenter</surname>
        <affiliation>
          <orgname>The Internet Architecture Board</orgname>
        </affiliation>
      </author>
      <copyright>
        <year>1996</year>
      </copyright>
    </biblioentry>
    <biblioentry xreflabel="Com2004">
      <abbrev>Com2004</abbrev>
      <citetitle><ulink
          url="http://csdl.computer.org/comp/mags/so/2004/01/s1028.pdf">How
          is Open-Source Affecting Software
          Development?</ulink></citetitle>
      <authorgroup>
        <author>
          <firstname>Diomidis</firstname>
          <surname>Spinellis</surname>
        </author>
        <author>
          <firstname>Clemens</firstname>
          <surname>Szyperski</surname>
        </author>
      </authorgroup>
      <title>IEEE Computer</title>
      <copyright>
        <year>Jan/Feb 2004</year>
      </copyright>
      <publisher>
        <publishername>IEEE Computer Society</publishername>
      </publisher>
    </biblioentry>
    <biblioentry>
      <abbrev>ComGuide</abbrev>
      <citetitle><ulink
          url="&url.articles.committers-guide;">Committer's
          Guide</ulink></citetitle>
      <authorgroup>
        <corpauthor>The FreeBSD Project</corpauthor>
      </authorgroup>
      <copyright>
        <year>2005</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>Cov2005</abbrev>
      <citetitle><ulink
          url="http://www.coverity.com/news/nf_news_06_27_05_story_9.html">Coverity
          study on kernel security holes in Linux and FreeBSD</ulink></citetitle>
      <authorgroup>
        <corpauthor>Coverity Inc.</corpauthor>
      </authorgroup>
      <copyright>
        <year>2005</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>GoldGab2005</abbrev> <citetitle><ulink
          url="http://dreamsongs.com/IHE/IHE.html">Innovation Happens
          Elsewhere: Open Source as Business Strategy</ulink></citetitle>
      <authorgroup>
        <author>
          <firstname>Ron</firstname>
          <surname>Goldman</surname>
        </author>
        <author>
          <firstname>Richard</firstname>
          <surname>Gabriel</surname>
        </author>
      </authorgroup>
      <copyright>
        <year>2005</year>
      </copyright>
      <isbn>ISBN 1558608893</isbn>
      <publisher>
        <publishername>Morgan-Kaufmann</publishername>
      </publisher>
    </biblioentry>
    <biblioentry xreflabel="Hub1994">
      <!-- XXX Get the date of this article right -->
      <abbrev>Hub1994</abbrev>
      <citetitle><ulink url="&url.articles.contributing;">Contributing
          to the FreeBSD Project</ulink></citetitle>
      <author>
        <firstname>Jordan</firstname>
        <surname>Hubbard</surname>
      </author>
      <copyright>
        <year>1994&mdash;2005</year>
      </copyright>
      <publisher>
        <publishername>The FreeBSD Project</publishername>
      </publisher>
    </biblioentry>
    <biblioentry>
      <abbrev>McKu1999</abbrev>
      <citetitle><ulink
          url="http://www.usenix.org/publications/library/proceedings/usenix99/mckusick.html">Soft
          Updates: A Technique for Eliminating Most Synchronous Writes
          in the Fast Filesystem</ulink></citetitle>
      <authorgroup>
        <author>
          <firstname>Kirk</firstname>
          <surname>McKusick</surname>
        </author>
        <author>
          <firstname>Gregory</firstname>
          <surname>Ganger</surname>
        </author>
      </authorgroup>
      <confgroup>
        <conftitle>USENIX Annual Technical Conference</conftitle>
      </confgroup>
      <copyright>
        <year>1999</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>McKu1999-1</abbrev>
      <citetitle><ulink
          url="http://www.oreilly.com/catalog/opensources/book/kirkmck.html"
          >Twenty Years of Berkeley Unix: From AT&amp;T-Owned to
          Freely Redistributable</ulink></citetitle>
      <authorgroup>
        <author>
          <firstname>Marshall Kirk</firstname>
          <surname>McKusick</surname>
        </author>
      </authorgroup>
      <title><ulink
          url="http://www.oreilly.com/catalog/opensources/book/toc.html">Open
          Sources: Voices from the Open Source
          Revolution</ulink></title>
      <isbn>ISBN 1-56592-582-3</isbn>
      <publisher>
        <publishername>O'Reilly Inc.</publishername>
      </publisher>
      <copyright>
        <year>1993</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>Mon2005</abbrev>
      <citetitle><ulink url="&url.articles.bsdl-gpl;/article.html">Why you should
          use a BSD style license for your Open Source
          Project</ulink></citetitle>
      <author>
        <firstname>Bruce</firstname>
        <surname>Montague</surname>
      </author>
      <publisher>
        <publishername>The FreeBSD Project</publishername>
      </publisher>
      <copyright>
        <year>2005</year>
      </copyright>
    </biblioentry>
    <biblioentry xreflabel="Nik2005">
      <abbrev>Nik2005</abbrev>
      <citetitle><ulink url="&url.books.dev-model;/book.html">A
          project model for the FreeBSD Project</ulink></citetitle>
      <author>
        <firstname>Niklas</firstname>
        <surname>Saers</surname>
      </author>
      <copyright>
        <year>2005</year>
      </copyright>
      <publisher>
        <publishername>The FreeBSD Project</publishername>
      </publisher>
    </biblioentry>
    <biblioentry xreflabel="Nor1993">
      <abbrev>Nor1993</abbrev>
      <citetitle><ulink
          url="http://www.norvig.com/luv-slides.ps">Tutorial
          on Good Lisp Programming Style</ulink></citetitle>
      <authorgroup>
        <author>
          <firstname>Peter</firstname>
          <surname>Norvig</surname>
        </author>
        <author>
          <firstname>Kent</firstname>
          <surname>Pitman</surname>
        </author>
      </authorgroup>
      <copyright>
        <year>1993</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>Nor2001</abbrev>
      <citetitle><ulink url="http://www.norvig.com/21-days.html">Teach
          Yourself Programming in Ten Years</ulink></citetitle>
      <author>
        <firstname>Peter</firstname>
        <surname>Norvig</surname>
      </author>
      <copyright>
        <year>2001</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>Ray2004</abbrev>
      <citetitle><ulink
          url="http://www.catb.org/~esr/faqs/smart-questions.html">How
          to ask questions the smart way</ulink></citetitle>
      <authorgroup>
        <author>
          <firstname>Eric Steven</firstname>
          <surname>Raymond</surname>
        </author>
      </authorgroup>
      <copyright>
        <year>2004</year>
      </copyright>
    </biblioentry>
    <biblioentry>
      <abbrev>RelEngDoc</abbrev>
      <citetitle><ulink url="&url.articles.releng;">FreeBSD Release
          Engineering</ulink></citetitle>
      <author>
        <firstname>Murray</firstname>
        <surname>Stokely</surname>
      </author>
      <copyright>
        <year>2001</year>
      </copyright>
      <publisher>
        <publishername>The FreeBSD Project</publishername>
      </publisher>
    </biblioentry>
  </bibliography>

</article>