23.4. 追蹤開發分支

FreeBSD 有兩個開發分支:FreeBSD-CURRENT 及 FreeBSD-STABLE。

本節將說明每個分支及其的特定使用者,也會說明如何在各別分支維持系統為最新版。

23.4.1. 使用 FreeBSD-CURRENT

FreeBSD-CURRENT 是 FreeBSD 開發的 最前線,FreeBSD-CURRENT 的使用者需具備較強的技術能力。技術能力較弱的使用者應改追蹤 FreeBSD-STABLE 開發分支。

FreeBSD-CURRENT 是 FreeBSD 最新的原始碼,其中包括正在進行的開發工作、實驗性的變更以及不一定會在下一個官方發行版出現的過渡機制。 雖然 FreeBSD 開發者每天編譯 FreeBSD-CURRENT 原始碼,但仍可能有短暫時間原始碼是無法編譯的。雖然這些問題會儘快被解決,但是無論 FreeBSD-CURRENT 帶來災難或是新功能,同步原始碼時都要考量這個問題。

FreeBSD-CURRENT 主要給下以三種族群:

  1. 致力於開發某一部份原始碼樹的 FreeBSD 社群成員。

  2. FreeBSD 社群成員中活耀的測試人員。 他們願意花時間解決問題,對 FreeBSD 的變更及大方向提出專業建議並送交修補。

  3. 隨時關注的使用者,使用目前原始碼做為參考用途,或是偶爾提供意見或貢獻原始碼。

不應將 FreeBSD-CURRENT 當做下一個發行版前取得新功能的快速途徑,因為尚未發行的功能並未被完整測試,很可能有問題。這也不是一個快速取得問題修正的方式,因為任何已知的問題修正有可能產生新的問題。 使用 FreeBSD-CURRENT 不在 官方支援 的範圍內。

若要追蹤 FreeBSD-CURRENT:

  1. 加入 freebsd-currentsvn-src-head 郵遞論壇。這是 重要 的,是為了要了解目前人們對於系統目前狀態的評論並接收有關 FreeBSD-CURRENT 目前狀態的重要公告。

    svn-src-head 郵遞論壇會記錄每一次修改的提交項目,以及可能產生的副作用的相關資訊。

    要加入這兩個郵遞論壇,請前往 http://lists.FreeBSD.org/mailman/listinfo 點選要訂閱的郵遞論壇,並依照網頁指示的步驟操作。要追蹤整個原始碼樹,不單只有 FreeBSD-CURRENT 的變更,可訂閱 svn-src-all 郵遞論壇。

  2. 同步 FreeBSD-CURRENT 原始碼。 通常會使用 svn 自列於 節 A.3.6, “Subversion 鏡像站” 中的其中一個 Subversion 鏡像站的 head 分支中取出 -CURRENT 的程式碼。

  3. 考量到檔案庫的大小,部份使用者選擇只同步他們有興趣或貢獻修補的部份原始碼。然而, 計劃要從原始碼編譯整個作業系統的使用者須下載 全部 的 FreeBSD-CURRENT,不可只有選擇的部份。

    編譯 FreeBSD-CURRENT 前,請仔細地閱讀 /usr/src/Makefile 並依照 節 23.5, “從原始碼更新 FreeBSD” 的指示操作。 閱讀 FreeBSD-CURRENT 郵遞論壇 以及 /usr/src/UPDATING 來了解升級的相關資訊,有時會含有升級下一個發行版的必要資訊。

  4. 積極!很鼓勵 FreeBSD-CURRENT 使用者發表他們對加強哪些功能或是修復哪些錯誤的建議。 如果您在建議時能附上相關程式碼的話, 那真是太棒了!

23.4.2. Using FreeBSD-STABLE

FreeBSD-STABLE is the development branch from which major releases are made. Changes go into this branch at a slower pace and with the general assumption that they have first been tested in FreeBSD-CURRENT. This is still a development branch and, at any given time, the sources for FreeBSD-STABLE may or may not be suitable for general use. It is simply another engineering development track, not a resource for end-users. Users who do not have the resources to perform testing should instead run the most recent release of FreeBSD.

Those interested in tracking or contributing to the FreeBSD development process, especially as it relates to the next release of FreeBSD, should consider following FreeBSD-STABLE.

While the FreeBSD-STABLE branch should compile and run at all times, this cannot be guaranteed. Since more people run FreeBSD-STABLE than FreeBSD-CURRENT, it is inevitable that bugs and corner cases will sometimes be found in FreeBSD-STABLE that were not apparent in FreeBSD-CURRENT. For this reason, one should not blindly track FreeBSD-STABLE. It is particularly important not to update any production servers to FreeBSD-STABLE without thoroughly testing the code in a development or testing environment.

To track FreeBSD-STABLE:

  1. Join the freebsd-stable list in order to stay informed of build dependencies that may appear in FreeBSD-STABLE or any other issues requiring special attention. Developers will also make announcements in this mailing list when they are contemplating some controversial fix or update, giving the users a chance to respond if they have any issues to raise concerning the proposed change.

    Join the relevant svn list for the branch being tracked. For example, users tracking the 9-STABLE branch should join the svn-src-stable-9 list. This list records the commit log entry for each change as it is made, along with any pertinent information on possible side effects.

    To join these lists, go to http://lists.FreeBSD.org/mailman/listinfo, click on the list to subscribe to, and follow the instructions. In order to track changes for the whole source tree, subscribe to svn-src-all.

  2. To install a new FreeBSD-STABLE system, install the most recent FreeBSD-STABLE release from the FreeBSD mirror sites or use a monthly snapshot built from FreeBSD-STABLE. Refer to www.freebsd.org/snapshots for more information about snapshots.

    To compile or upgrade to an existing FreeBSD system to FreeBSD-STABLE, use svn to check out the source for the desired branch. Branch names, such as stable/9, are listed at www.freebsd.org/releng.

  3. Before compiling or upgrading to FreeBSD-STABLE , read /usr/src/Makefile carefully and follow the instructions in 節 23.5, “從原始碼更新 FreeBSD”. Read the FreeBSD-STABLE mailing list and /usr/src/UPDATING to keep up-to-date on other bootstrapping procedures that sometimes become necessary on the road to the next release.

本文及其他文件,可由此下載: ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/

若有 FreeBSD 方面疑問,請先閱讀 FreeBSD 相關文件,如不能解決的話,再洽詢 <questions@FreeBSD.org>。

關於本文件的問題,請洽詢 <doc@FreeBSD.org>。