Table of Contents
這裡給出您在投入 Debian 相關工作之前應當理解掌握的一些必備的預備知識。
在 Debian 社群中有這幾類常見的角色:
注意,您不可能在一夜之間成為 Debian 開發者(DD),因為成為 DD 所需要的遠不只是技術技巧。不過別因此而氣餒,如果您的套件對其他人有用,您可以當這個軟體的套件維護者,然後通過一位贊助者來上傳這份軟體,或者您可以申請成為 Debian 維護者。
還有,要成為 Debian 開發者不一定要建立新套件。對已有軟體做出貢獻也是成為 Debian 開發者的理想途徑。眼下正有很多套件等著好的維護者來接手(參見 Section 2.8, “貢獻流程”)。
請參考下列文件來了解應當如何為 Debian 作出貢獻:
為做好準備和 Debian 進行互動,請理解 Debian 的社會動力學:
我們都是志願者。
友好的合作是我們前行的動力。
Debian 並不是一所學校,在這裡沒有所謂的老師會自動地注意到您。
Debian 一直在不斷進步。
在這篇指南之後的部分中,我們只關注打包的技術方面。因此,請參考下面的文件來理解 Debian 的社會動力學:
這裡給出一些技術上的建議,參考行事可以讓您與其他維護者共同維護套件時變得更加輕鬆有效,從而讓 Debian 專案的輸出成果最大化。
讓您的套件容易除錯(debug)。
讓您的套件擁有良好的文件記錄。
![]() |
Note |
---|---|
對軟體進行除錯(debug)通常會比編寫初始可用的軟體花費更多的時間。 |
Please make yourself ready to read the pertinent part of the latest Debian documentation to generate perfect Debian packages:
《Debian 政策手冊》
“Debian 開發者參考”
“Guide for Debian Maintainers” — this guide
All these documents are published to https://www.debian.org using the unstable suite versions of corresponding Debian packages. If you wish to have local accesses to all these documents from your base system, please consider to use techniques such as apt-pinning and chroot (Section 7.10, “chroot”).[5]
如果本指南文件的內容與官方的 Debian 文件有所衝突,那麼官方的那些總是對的。請使用 reportbug 工具對 debmake-doc 套件報告問題。
這裡有一些替代性的教材文件,您可以與本指南一起閱讀進行參考:
“Debian 新維護者手冊”(較舊)
“Debian 打包教材”
“Ubuntu 打包指南”(Ubuntu 基於 Debian。)
![]() |
Tip |
---|---|
When reading these tutorials, you should consider using the debmake command in place of the dh_make command. |
在您決定在某些公共場合問出您的問題之前,請先做好自己能做到的事情,例如,閱讀能找到的文件:
要取得您所需要的資訊,一種有效的方法是在網頁搜尋引擎中構建類似“關鍵字 site:lists.debian.org”這樣具有限制條件的搜尋字串來限定搜尋的域名。
製作一個小型測試用套件也是瞭解打包細節的一個好辦法。對當前已有的維護良好的套件進行檢查則是瞭解其他人如何製作套件的最好方法。
如果您對打包仍然存在疑問,您可以使用以下方式與他人進行溝通:
特定語言的郵件列表。
如果您在做好功課後能在這些場合中合適地提出您的疑問的話,那些更有經驗的 Debian 開發者會很願意幫助您。
![]() |
Caution |
---|---|
Debian 的開發是一個不斷變動的目標。您在網上找到的某些資訊可能是過時的、不正確的或者不適用的,使用時請留意。 |
請了解 Debian 倉庫的當前狀況。
因此,對已經存在於倉庫內的套件做出貢獻是十分歡迎的(這也更有可能得到其他維護者的支援和協助上傳)。
![]() |
Tip |
---|---|
來自 devscripts 套件的 wnpp-alert 命令可以檢查已安裝軟體中需要接手或已被丟棄的套件。 |
![]() |
Tip |
---|---|
The how-can-i-help package can show opportunities for contributing to Debian on packages installed locally. |
這裡使用類 Python 虛擬碼,給出了對 Debian 貢獻名為 program 的軟體所走的貢獻流程:
if exist_in_debian(program): if is_team_maintained(program): join_team(program) if is_orphaned(program): # maintainer: Debian QA Group adopt_it(program) elif is_RFA(program): # Request for Adoption adopt_it(program) else: if need_help(program): contact_maintainer(program) triaging_bugs(program) preparing_QA_or_NMU_uploads(program) else: leave_it(program) else: # new packages if not is_good_program(program): give_up_packaging(program) elif not is_distributable(program): give_up_packaging(program) else: # worth packaging if is_ITPed_by_others(program): if need_help(program): contact_ITPer_for_collaboration(program) else: leave_it_to_ITPer(program) else: # really new if is_applicable_team(program): join_team(program) if is_DFSG(program) and is_DFSG(dependency(program)): file_ITP(program, area="main") # This is Debian elif is_DFSG(program): file_ITP(program, area="contrib") # This is not Debian else: # non-DFSG file_ITP(program, area="non-free") # This is not Debian package_it_and_close_ITP(program)
其中:
對 exist_in_debian() 和 is_team_maintained(),需檢查:
對 is_orphaned()、is_RFA() 和 is_ITPed_by_others(),需檢查:
對於 is_good_program(),請檢查:
對 is_it_DFSG(),及 is_its_dependency_DFSG(),請檢查:
對 is_it_distributable(),請檢查:
您或是需要填寫並提交一份 ITP,或是需要“收養”一個套件並開始為其工作。請見“Debian 開發者參考(Debian Developer's Reference)”文件:
新手貢獻者和維護者可能想知道在開始對 Debian 進行貢獻之前需要事先學習哪些知識。根據您個人的側重點不同,下面有我的一些建議供您參考:
打包
翻譯
文件
新手貢獻者和維護者可能想知道從哪裡開始對 Debian 進行貢獻。根據您掌握的技能,下面有我的一些建議供您參考:
POSIX shell、Perl 和 Python 的技巧:
C 和 C++ 技能:
英語之外的技能:
文件技能:
這些活動應當能讓您在各位 Debian 社群成員之間得到存在感,從而建立您的信譽與名聲。
新手維護者應當避免打包具有潛在高度安全隱患的程式:
在積累足夠的打包經驗後,您可以再嘗試打包這樣的程式。
[4] 絕大多數 Debian 維護者使用 git 而非其它版本控制系統,如 hg、bzr 等等。
[5] It is unwise to run your base system under the pure unstable suite even for the development system. Normally, most package development activities use unstable chroot as in Section 7.10, “chroot”. By using virtualization, you can test demanding situation such as the full Desktop system, network daemons, and system installer in the unstable suite environment even from the base system running the stable suite.
[6] 這一條不是絕對的要求,但請注意:遇上不友好的上游可能需要大家為此投入大量精力,而一個友好的上游則能協助解決程式的各類問題。