章 3. 預備知識

內容目錄

3.1. Debian 社群的工作者
3.2. 如何做出貢獻
3.3. Debian 的社會驅動力
3.4. 技術提醒
3.5. Debian 文件
3.6. 幫助資源
3.7. 倉庫狀況
3.8. 貢獻流程
3.9. 新手貢獻者和維護者

Here are the prerequisites you need to understand before getting involved with Debian.

在 Debian 社群中有這幾類常見的角色:

  • 上游作者(upstream author):程式的原始作者。
  • 上游維護者(upstream maintainer):目前在上游維護程式程式碼的人。
  • 套件維護者(maintainer):製作並維護該程式 Debian 套件的人。
  • 贊助者(sponsor):幫助維護者上傳套件到 Debian 官方倉庫的人(在通過內容檢查之後)。
  • 導師(mentor):幫助新手維護者熟悉和深入打包的人。
  • Debian 開發者(DD, Debian Developer):Debian 社群的官方成員。DD 擁有對 Debian 官方倉庫上傳的全部許可權。
  • Debian 維護者(Debian Maintainer, DM):擁有對 Debian 官方倉庫部分上傳許可權的人。

Please note that you can’t become an official Debian Developer (DD) overnight, as it requires more than just technical skills. Don’t be discouraged by this. If your work is useful to others, you can still upload your package either as a maintainer through a sponsor or as a Debian Maintainer.

Please note that you don’t need to create new packages to become an official Debian Developer. Contributing to existing packages can also provide a path to becoming an official Debian Developer. There are many packages waiting for good maintainers (see "`節 3.8, “貢獻流程””`").

請參考下列文件來了解應當如何為 Debian 作出貢獻:

為做好準備和 Debian 進行互動,請理解 Debian 的社會動力學:

  • We are all volunteers.

    • You can’t impose tasks on others.
    • You should be self-motivated to do things.
  • 友好的合作是我們前行的動力。

    • 您的貢獻不應致使他人增加負擔。
    • 只有當別人欣賞和感激您的貢獻時,它才有真正的價值。
  • Debian is not a school where you get automatic attention from teachers.

    • You should be able to learn many things independently.
    • Attention from other volunteers is a scarce resource.
  • Debian 一直在不斷進步。

    • Debian 期望您製作出高質量的套件。
    • 您應該隨時調整自己來適應變化。

在這篇指南之後的部分中,我們只關注打包的技術方面。因此,請參考下面的文件來理解 Debian 的社會動力學:

Here are some technical reminders to help other maintainers work on your package easily and effectively, maximizing the output of Debian as a whole.

[注意]注意

對軟體進行除錯(debug)通常會比編寫初始可用的軟體花費更多的時間。

It is unwise to run your base system under the unstable suite, even for development purposes.

[注意]注意

Advanced package development activities, such as testing full Desktop systems, network daemons, and system installer packages, should use the unstable suite running under virtualization.

Please make yourself ready to read the pertinent part of the latest Debian documentation to generate perfect Debian packages:

All these documents are published on https://www.debian.org using the unstable suite versions of corresponding Debian packages. If you wish to have local access to all these documents from your base system, please consider using techniques such as apt-pinning and chroot.

如果本指南文件的內容與官方的 Debian 文件有所衝突,那麼官方的那些總是對的。請使用 reportbug 工具對 debmake-doc 套件報告問題。

這裡有一些替代性的教材文件,您可以與本指南一起閱讀進行參考:

[提示]提示

When reading these, you may consider using the debmake command in place of the dh_make command.

Before deciding to ask your question in a public forum, please do your part by reading the relevant documentation:

You can find your desired information effectively by using a well-formed search string such as "keyword site:lists.debian.org" to limit the search domain of the web search engine.

Creating a small test package is a good way to learn the details of packaging. Inspecting existing well-maintained packages is the best way to learn how other people make packages.

如果您對打包仍然存在疑問,您可以使用以下方式與他人進行溝通:

More experienced Debian developers will gladly help you if you ask properly after making the required efforts.

[注意]注意

Debian development is a moving target. Some information found on the web may be outdated, incorrect, or non-applicable. Please use such information carefully.

請了解 Debian 倉庫的當前狀況。

  • Debian 已經包含了絕大多數種類程式的套件。
  • Debian 倉庫內套件的數量是活躍維護者的數十倍。
  • 遺憾的是,某些套件缺乏維護者的足夠關注。

因此,對已經存在於倉庫內的套件做出貢獻是十分歡迎的(這也更有可能得到其他維護者的支援和協助上傳)。

[提示]提示

The wnpp-alert command from the devscripts package can check for installed packages that are up for adoption or orphaned.

[提示]提示

The how-can-i-help package can show opportunities for contributing to Debian based 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)

其中:

You either need to file an ITP or adopt a package to start working on it. See the Debian Developer’s Reference:

新手貢獻者和維護者可能想知道在開始對 Debian 進行貢獻之前需要事先學習哪些知識。根據您個人的側重點不同,下面有我的一些建議供您參考:

  • 打包

    • POSIX shellmake 的基本知識。
    • 一些 PerlPython 的入門知識。
  • 翻譯

    • 基於 PO 的翻譯系統的工作原理和基本知識。
  • 文件

    • Basics of text markups (XML, ReST, Wiki, …​).

新手貢獻者和維護者可能想知道從哪裡開始對 Debian 進行貢獻。根據您掌握的技能,下面有我的一些建議供您參考:

這些活動應當能讓您在各位 Debian 社群成員之間得到存在感,從而建立您的信譽與名聲。

新手維護者應當避免打包具有潛在高度安全隱患的程式:

  • setuidsetgid 程式
  • 背景服務程序(daemon)程式
  • 安裝至 /sbin//usr/sbin/ 目錄的程式

在積累足夠的打包經驗後,您可以再嘗試打包這樣的程式。



[4] 絕大多數 Debian 維護者使用 git 而非其它版本控制系統,如 hgbzr 等等。

[5] 這一條不是絕對的要求,但請注意:遇上不友好的上游可能需要大家為此投入大量精力,而一個友好的上游則能協助解決程式的各類問題。