ubuntu-packaging-guide - en to zh_TW translation catalogue (145 entries)

en: autopkgtest: Automatic testing for packages
zh_TW: autopkgtest: 套件自動測試

en: add a file called ``debian/tests/control`` which specifies the requirements for the testbed,
zh_TW: 把一個叫做 ``debian/tests/control`` 的檔案加進以指定測試平臺的要求，

en: add the tests in ``debian/tests/``.
zh_TW: 把測試加進 ``debian/tests/`` 裏。

en: Testbed requirements
zh_TW: 測試温床要求

en: Below we are having a look at the ``glib2.0`` source package. In a very simple case the file would look like this::
zh_TW: 下面我們會看一看 ``glib2.0`` 原始碼套件。在一個非常简單的例子中該檔案會是這樣子：

en: For the test in ``debian/tests/build`` this would ensure that the packages ``libglib2.0-dev`` and ``build-essential`` are installed.
zh_TW: 爲了 ``debian/tests/build`` 中的測試，這會確保套件 ``libglib2.0-dev`` 及 ``build-essential`` 會被安装。

en: You can use ``@`` in the ``Depends`` line to indicate that you want all the packages installed which are built by the source package in question.
zh_TW: 您可以在 ``Depends`` 行裏使用 ``@`` 来指明所有此套件依赖的需要构建的套件。

en: The actual tests
zh_TW: 實際的測試

en: The accompanying test for the example above might be:
zh_TW: 上面例子的随附測試可能是：

en: Here a very simple piece of C code is written to a temporary directory. Then this is compiled with system libraries (using flags and library paths as provided by `pkg-config`). Then the compiled binary, which just exercises some parts of core glib functionality, is run.
zh_TW: 在這裏一篇非常简單的 C 代碼會被寫到一個臨時資料夹裏。然後（利用由 `pkg-config` 提供的標誌及庫路徑）代码會用系統庫編譯。編譯後，這個只實現了一部分核心 glib 功能的程序會被測試運行。

en: Executing the test
zh_TW: 運行測試

en: Further examples
zh_TW: 更多例子

en: This list is not comprehensive, but might help you get a better idea of how automated tests are implemented and used in Ubuntu.
zh_TW: 這列單不是太全面，可是有可能幫助您更好了解自動測試如何在Ubuntu裏應用和使用。

en: Ubuntu infrastructure
zh_TW: Ubuntu架構

en: Getting the test into Ubuntu
zh_TW: 把測試放進Ubuntu

en: The process of submitting an autopkgtest for a package is largely similar to :doc:`fixing a bug in Ubuntu<./fixing-a-bug>`. Essentially you simply:
zh_TW: 提交 autopkgtest 的過程與: doc:`修復 Ubuntu 的 bug<./fixing-a-bug>` 十分相似。基本上您只需：

en: run ``bzr branch ubuntu:<packagename>``,
zh_TW: 運行 ``bzr branch ubuntu:<套件名稱>`` ，

en: edit ``debian/control`` to enable the tests,
zh_TW: 更改 ``debian/control`` 以啓用測試，

en: add the ``debian/tests`` directory,
zh_TW: 建立 ``debian/tests`` 文件夹，

en: add your test case(s) to ``debian/tests``,
zh_TW: 把您的測試（們）加進 ``debian/tests`` ，

en: commit your changes, push them to Launchpad, propose a merge and get it reviewed just like any other improvement in a source package.
zh_TW: 儲下您的改動，把它們推到Launchpad,提出合併和像於其它原始碼套件的改進一樣接受覆核。

en: What you can do
zh_TW: 您可以做的事情

en: Backporting software updates
zh_TW: 把軟件更新帶後

en: Personal Package Archive (PPA)
zh_TW: 個人套件庫（PPA）

en: Using a PPA has a number of benefits. It is fairly straight-forward, you don't need approval of anyone, but the downside of it is that your users will have to manually enable it. It is a non-standard software source.
zh_TW: 試用一個個人套件庫有多個好處。它是直来直往，您不要任何人的任可，但缺點是您的用户要手動起動它。它是一個非標準軟件来源。

en: Official Ubuntu Backports
zh_TW: 官方Ubuntu軟件帶後

en: The Backports Project is a means to provide new features to users. Because of the inherent stability risks in backporting packages, users do not get backported packages without some explicit action on their part. This generally makes backports an inappropriate avenue for fixing bugs. If a package in an Ubuntu release has a bug, it should be fixed either through the :doc:`Security Update or the Stable Release Update process<./security-and-stable-release-updates>`, as appropriate.
zh_TW: 軟件帶後計劃是一個提供用户新功能的方法。因為軟件帶後過程中的潜在稳定性的風險，用户如果不做一些行動將不會得到帶後了的套件。這整體上令軟件帶後一個不合當的平台去修復臭蟲。如果一個在一個Ubuntu發行的套件中有臭蟲，它應該用:doc:`保安更新或稳定發行更新程序<./security-and-stable-release-updates>`中合當的選擇去修復。

en: Once you determined you want a package to be backported to a stable release, you will need to test-build and test it on the given stable release. ``pbuilder-dist`` (in the ``ubuntu-dev-tools`` package) is a very handy tool to do this easily.
zh_TW: 當您决定您要某套件帶後到一個稳定發行，您需要測試建構和測試它在指定的稳定發行。於``ubuntu-dev-tools``套件中的``pbuilder-dist``是一個非常好用的工具来简單地做這個工序。

en: To report the backport request and get it processed by the Backporters team, you can use the ``requestbackport`` tool (also in the ``ubuntu-dev-tools`` package). It will determine the intermediate releases that package needs to be backported to, list all reverse-dependencies, and file the backporting request.  Also will it include a testing checklist in the bug.
zh_TW: 以滙报軟件帶後的要求及讓它给軟件帶後團隊處理，您可以試用也在``ubuntu-dev-tools``套件裏的``requestbackport``工具。它會認定該套件需要被帶後到的中期發行，列出所有的反依賴套件，及滙报該軟件帶後的要求。它也會在該臭蟲中包括一個測試程序表。

en: Using Chroots
zh_TW: 使用 Chroots

en: If you are running one version of Ubuntu but working on packages for another versions you can create the environment of the other version with a ``chroot``.
zh_TW: 如果您在一個Ubuntu版本但在開發其它版本的套件您可以使用``chroot``創作其它版本的環境。

en: A ``chroot`` allows you to have a full filesystem from another distribution which you can work in quite normally.  It avoids the overhead of running a full virtual machine.
zh_TW: 一個``chroot``令您有一個從另一個發行来，您可以在裏面正常工作的完整的檔案系統。它避免了運行一個完正虚擬機器的需要。

en: Creating a Chroot
zh_TW: 建立一個chroot

en: Use the command ``debootstrap`` to create a new chroot::
zh_TW: 使用``debootstrap``命令去建立一個新chroot:

en: You can then work inside the chroot::
zh_TW: 您現在可以在chroot裏工作：：

en: Where you can install or remove any package you wish without affecting your main system.
zh_TW: 在那裏您可以在不影響您的主要系統下安装或移去您想的任何套件。

en: You might want to copy your GPG/ssh keys and Bazaar configuration into the chroot so you can access and sign packages directly::
zh_TW: 您可能會想覆製您的GPG/ssh錀匙和Bazaar設定到您的chroot裏讓您能直接達到和簽出套件：：

en: To stop apt and other programs complaining about missing locales you can install your relevant language pack::
zh_TW: 要停止apt及其它程試投訴關於消失本地語言您可以安装關乎您的語言套件：：

en: If you want to run X programs you will need to bind the /tmp directory into the chroot, from outside the chroot run::
zh_TW: 如果您想要運行X程式您要把/tmp資料夹合進chroot,從chroot外面運行：：

en: Some programs may need you to bind /dev or /proc.
zh_TW: 某些程式可能要您合/dev或/proc。

en: Alternatives
zh_TW: 替代選擇

en: You can also set up pbuilder to pause when it comes across a build failure.  Copy C10shell from /usr/share/doc/pbuilder/examples into a directory and use the ``--hookdir=`` argument to point to it.
zh_TW: 您也可以設定pbuilder在遇上建構失败時暫停。從/usr/share/doc/pbuilder/examples複製C10shell到一個文件夹並用``--hookdir=``選項去指明它。

en: Communication in Ubuntu Development
zh_TW: Ubuntu開發通訊

en: In a project where thousands of lines of code are changed, lots of decisions are made and hundreds of people interact every day, it is important to communicate effectively.
zh_TW: 在一個每天有數以千計的原始碼被改變，多個决定被定下和數以百計的人溝通的計劃，有效的溝通是重要的。

en: Mailing lists
zh_TW: 郵寄清單

en: Mailing lists are a very important tool if you want to communicate ideas to a broader team and make sure that you reach everybody, even across timezones.
zh_TW: 如果您想溝通想法去一個廣闊的團隊及確保您能達到所有人，甚至是跨時區的話，郵寄清單是一個很重要的工具。

en: In terms of development, these are the most important ones:
zh_TW: 對開發来說，這些是最重要的：

en: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-announce (announce-only, the most important development announcements go here)
zh_TW: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-announce （只是宣布，最重要的開發宣布會到這裏）

en: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel (general Ubuntu development discussion)
zh_TW: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel （整體Ubuntu開發討論）

en: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu (MOTU Team discussion, get help with packaging)
zh_TW: https://lists.ubuntu.com/mailman/listinfo/ubuntu-motu （MOTU團隊討論，獲取包装幫助）

en: IRC Channels
zh_TW: IRC 頻道

en: For real-time discussions, please connect to irc.freenode.net and join one or any of these channels:
zh_TW: 要進行實時通信，請連接到irc.freenode.net及加入任何一個下列的頻道：

en: #ubuntu-devel (for general development discussion)
zh_TW: #ubuntu-devel（综合開發討論）

en: #ubuntu-motu (for MOTU team discussion and generally getting help)
zh_TW: #ubuntu-motu（MOTU團隊討論和综合求助）

en: Basic Overview of the ``debian/`` Directory
zh_TW: ``debian/``資料夹的基本概覽

en: This article will briefly explain the different files important to the packaging of Ubuntu packages which are contained in the ``debian/`` directory. The most important of them are ``changelog``, ``control``, ``copyright``, and ``rules``. These are required for all packages. A number of additional files in the ``debian/`` may be used in order to customize and configure the behavior of the package. Some of these files are discussed in this article, but this is not meant to be a complete list.
zh_TW: 本文章將简單解釋不同於``debian/``資料夹裏對Ubuntu套件包装重要的檔案。當中最重要的是``changelog``，``control``，``copyright``和``rules``。這些對所有套件都是必要的。一些於``debian/``資料夹裏的附加檔案可以用来指定及設定套件的性質。某些檔案會在這文章中討論到，但這不是一個完整的名單。

en: The changelog
zh_TW: Changelog

en: This file is, as its name implies, a listing of the changes made in each version. It has a specific format that gives the package name, version, distribution, changes, and who made the changes at a given time. If you have a GPG key (see: :doc:`Getting set up<./getting-set-up/>`), make sure to use the same name and email address in ``changelog`` as you have in your key. The following is a template ``changelog``::
zh_TW: 本檔案名如其用，是一個每個版本的改變的列表。它有一個特定的規格，列明套件的名稱，版本，發行，改變，和當時做改變的人。如果您有一個GPG錀匙（参見::doc:`Getting set up<./getting-set-up/>`)，確保您在``changelog``裏使用與錀匙一樣的名稱和電子郵件地址。下面是一個``changelog``的範本：：

en: The format (especially of the date) is important. The date should be in :rfc:`5322` format, which can be obtained by using the command ``date -R``. For convenience, the command ``dch`` may be used to edit changelog. It will update the date automatically.
zh_TW: 該規格（尤其是日期）是相當重要。該日期該是:rfc:`5322`規格，您可以使用``date -R``命令獲得。為了方便起見，``dch``命令可以用来修改changelog，它會自動更新日期。

en: Minor bullet points are indicated by a dash "-", while major points use an asterisk "*".
zh_TW: 小列點用"-"来標示，大列點用星號"*"標示。

en: If you are packaging from scratch, ``dch --create`` (``dch`` is in the ``devscripts`` package) will create a standard ``debian/changelog`` for you.
zh_TW: 如果您是從零包装套件，``dch --create``（``dch``是在``devscripts``套件裏）會為您創造一個標準的``debian/changelog``。

en: Here is a sample ``changelog`` file for hello::
zh_TW: 這裏是一個為hello套件的``changelog``檔案範本：：

en: Notice that the version has a ``-0ubuntu1`` appended to it, this is the distro revision, used so that the packaging can be updated (to fix bugs for example) with new uploads within the same source release version.
zh_TW: 留意版本中``-0ubuntu1``是被附加在它旁邊，這是系統版本，能讓包装可以於同一原始碼發行版本裏跟據新上載而更新（例如修復臭蟲）。

en: Ubuntu and Debian have slightly different package versioning schemes to avoid conflicting packages with the same source version. If a Debian package has been changed in Ubuntu, it has ``ubuntuX`` (where ``X`` is the Ubuntu revision number) appended to the end of the Debian version. So if the Debian hello ``2.6-1`` package was changed by Ubuntu, the version string would be ``2.6-1ubuntu1``. If a package for the application does not exist in Debian, then the Debian revision is ``0`` (e.g. ``2.6-0ubuntu1``).
zh_TW: Ubuntu和Debian有稍微不同的版本命名系統以避免令有相同原始碼的套件互相分歧。如果一個Debian套件在Ubuntu裏被改變，它的Debian版本後面會加上``ubuntuX``（``X``是Ubuntu的版本號碼）。所以如果Debian的hello``2.6-1``套件被Ubuntu改變，版本名稱將會是``2.6-1ubuntu1``.如果該套件不在Debian裏存在，Debian版本號碼會是``0``（例如``2.6-0ubuntu1``）。

en: The control file
zh_TW: control檔案

en: The ``control`` file contains the information that the package manager (such as ``apt-get``, ``synaptic``, and ``adept``) uses, build-time dependencies, maintainer information, and much more.
zh_TW: ``control``檔案包括套件管理員（例如``apt-get``，``synaptic``，和``adpet``）使用的資料，建構時的依賴套件，維護者資訊，和更多。

en: For the Ubuntu ``hello`` package, the ``control`` file looks something like this:
zh_TW: Ubuntu``hello`套件裏的``control``檔案是這個樣子的：

en: The first paragraph describes the source package including the list of packages required to build the package from source in the ``Build-Depends`` field. It also contains some meta-information such as the maintainer's name, the version of Debian Policy that the package complies with, the location of the packaging version control repository, and the upstream home page.
zh_TW: 第一段描述原始碼套件包括於``Build-Depends``行裏需要用来建構套件的種種套件。它也包括一些综合資訊例如維護者名字，該套件建構時使用的Debian規格版本，包装版本控制分支的位置，及上游軟件的首頁。

en: Each additional paragraph describes a binary package to be built.
zh_TW: 每個附加的段落形容一個要建構的程試套件。

en: The copyright file
zh_TW: copyright檔案

en: Generally, copyright information is found in the ``COPYING`` file in the program's source directory. This file should include such information as the names of the author and the packager, the URL from which the source came, a Copyright line with the year and copyright holder, and the text of the copyright itself. An example template would be::
zh_TW: 總體上，版權資訊會在程試原始碼資料夹中的``COPYING``檔案找到。這檔案應該包括資訊例如作者和包装者的名字，原始碼来原的連接，有年份和版權持有者的版權欄，及版權自己的文字。一個設例範本會是：：

en: The rules file
zh_TW: rules檔案

en: The last file we need to look at is ``rules``. This does all the work for creating our package. It is a Makefile with targets to compile and install the application, then create the ``.deb`` file from the installed files. It also has a target to clean up all the build files so you end up with just a source package again.
zh_TW: 最後一個我們要看一看的是``rules``。這擔任所有創造我們的套件的工作。它是一個有目標的建構檔案，會建構並安装該應用程試，然後從安装了的檔案創造``.deb``檔案。它也有一個目標去清除所有的建構檔案，所以您會最後再得到一個原始碼套件。

en: Here is a simplified version of the rules file created by ``dh_make`` (which can be found in the ``dh-make`` package):
zh_TW: 這是一個從``dh_make``（能在``dh-make``套件中找到）創造的简化了的rules檔案：

en: Let us go through this file in some detail. What this does is pass every build target that ``debian/rules`` is called with as an argument to ``/usr/bin/dh``, which itself will call all the necessary ``dh_*`` commands.
zh_TW: 讓我們詳细地看一看這檔案。這做的是把所有``debian/rules``要求的所有的建構目標傳送為一個給``/usr/bin/dh``的選項，而自己就會運行所有的需要的``dh_*``命令。

en: ``dh`` runs a sequence of debhelper commands. The supported sequences correspond to the targets of a ``debian/rules`` file: "build", "clean", "install", "binary-arch", "binary-indep", and "binary". In order to see what commands are run in each target, run::
zh_TW: ``dh``運行一系列的debhelper命令。支援的次序相應一個``debian/rules``檔案的目標："build"，"clean"，"install“，"binary-arch"，"binary-indep"，及"binary"。要看在每一個目標裏會被運行的命令，請運行：：

en: Commands in the binary-indep sequence are passed the "-i" option to ensure they only work on binary independent packages, and commands in the binary-arch sequences are passed the "-a" option to ensure they only work on architecture dependent packages.
zh_TW: 在binary-indep次序的命令會被傳送以"-i"選項以確保它們只會在程式獨立套件上運作，而在binary-arch次序裏的命令會被傳送以"-a"選項以確保它們只會在位元依賴套件上運作。

en: Each debhelper command will record when it's successfully run in ``debian/package.debhelper.log``. (Which dh_clean deletes.) So dh can tell which commands have already been run, for which packages, and skip running those commands again.
zh_TW: 每個debhelper命令會在``debian/package.debhelper.log``（會被dh_clean删除）裏成功運行時記錄讓dh能分辨哪些命令已經被運行和為哪個套件，和跳過再次運行這些命令。

en: Each time ``dh`` is run, it examines the log, and finds the last logged command that is in the specified sequence. It then continues with the next command in the sequence. The ``--until``, ``--before``, ``--after``, and ``--remaining`` options can override this behavior.
zh_TW: 每一次``dh``運行，它會檢查記錄，和找出在指定次序裏最後被記錄的命令。它然後會從次序裏下一個命令繼續。``--until``，``--before``，``--after``，及``--remaining``選項能覆盖這種動作。

en: Additional Files
zh_TW: 附加檔案

en: The install file
zh_TW: install檔案

en: The ``install`` file is used by ``dh_install`` to install files into the binary package. It has two standard use cases:
zh_TW: ``install``檔案是被``dh_install``使用来安装檔案到程試套件。它有两個標準使用個案：

en: To install files into your package that are not handled by the upstream build system.
zh_TW: 安装不被上游建構系統接手的檔案到您的套件。

en: Splitting a single large source package into multiple binary packages.
zh_TW: 把一個單一大原始碼套件分開做多個程式套件。

en: The problem we are working on is special as it only concerns the packaging-related bits of ``bumprace``. If it was a problem in the source code it would be helpful to also check the Upstream bug tracker. This is unfortunately often different for every package you have a look at, but if you search the web for it, you should in most cases find it pretty easily.
zh_TW: 我們正在研究的是特別的問題，因爲它僅僅與  ``bumprace`` 包相關。如果源碼包出現問題，最好檢查上游的 bug 跟踪系統。雖然通常你查看的每包各不相同，但是如果您在網上搜索，您可以相當容易的找到。

en: Offering help
zh_TW: 提供幫助

en: If you found an open bug and it is not assigned to somebody and you are in a position to fix it, you should comment on it with your solution. Be sure to include as much information as you can: Under which circumstances does the bug occur? How did you fix the problem? Did you test your solution?
zh_TW: 如果您發現了一個開放的錯誤，它沒有分配給某人，您在這個修復者的位置，您應該對此發表評論，附上您的解決方案。一定要包括盡可能多的信息，你可以發表：這是在什麼情況下出現的bug，您是怎麼解決這個問題的，您是否測試您的解決方案。

en: If no bug report has been filed, you can file a bug for it. What you might want to bear in mind is: Is the issue so small that just asking for somebody to commit it is good enough? Did you manage to only partially fix the issue and you want to at least share your part of it?
zh_TW: 如果沒有已提交的錯誤報告，您可以提交一個錯誤報告。您可能要牢記的是：這問題是如此之小，只需要求別人提交夠不夠好？你是不是部分地解決這個問題，你要至少分享你的修復部分嗎？

en: It is great if you can offer help and will surely be appreciated.
zh_TW: 如果你能提供幫助，那就太棒了，一定會受讚賞的。

en: In a lot of cases you will have to actually install the package to make sure it works as expected. Our case is a lot easier. If the build succeeded, you will find the binary packages in ``~/pbuilder/<release>_result``. Install them via ``sudo dpkg -i <package>.deb`` or by double-clicking on them in your file manager.
zh_TW: 在很多情況下，你將需要實際安裝包，以確保它如預期工作。我們的這個案例容易得多。如果構建成功，您將會在 ``~/pbuider/<release>_result`` 中找到二進制包。使用 ``sudo dpkg -i <package>.deb`` 或者雙擊它來安裝。

en: This will take you through a series of steps to make sure the bug ends up in the correct place. Be sure to review the diff again to make sure it does not include random changes you made earlier.
zh_TW: 這將帶你通過一系列的步驟，以確保錯誤結束在正確的地方。務必再次檢查diff，以確保它不包括您剛才的隨機更動。

en: Communication is important, so when you add some more description to it to the inclusion request, be friendly, explain it well.
zh_TW: 溝通是很重要的，所以當您爲列入請求添加一些更多的描述，友好些，解釋好些。

en: If everything went well you should get a mail from Debian's bug tracking system with more information. This might sometimes take a few minutes.
zh_TW: 如果一切順利，你應該得到一封從 Debian 的 bug 跟踪系統郵件，提供更多的信息。有時這可能需要幾分鐘。

en: Additional considerations
zh_TW: 其他注意事項

en: If you find a package and find that there are a couple of trivial things you can fix at the same time, do it. This will speed up review and inclusion.
zh_TW: 如果你找到一個包，發現有幾個瑣碎的事情而且你同時可以修復它們，那就修復它們吧 。這將加快審查和修復入庫。

en: If there are multiple big things you want to fix, it might be advisable to send individual patches or merge proposals instead. If there are individual bugs filed for the issues already, this makes it even easier.
zh_TW: 如果您要修復多個大的問題，最好發送單個補丁或建議，而不是合併。如果是個別臭蟲的問題會更容易解決。

en: Fixing the issue
zh_TW: 修復問題

en: Getting Set Up
zh_TW: 快速設置

en: There are a number of things you need to do to get started developing for Ubuntu. This article is designed to get your computer set up so that you can start working with packages, and upload your packages to Ubuntu's hosting platform, Launchpad. Here's what we'll cover:
zh_TW: 要開始為 Ubuntu 開發，您需要做一些准备。本文的目的是讓您的電腦設置好，您就可以開始开发您的软件包，並上傳您的軟件包到 Ubuntu 的  託管平台， Launchpad。下面我們將討論：

en: Installing packaging-related software. This includes:
zh_TW: 安裝與包裝相關的軟件。這包括：

en: Ubuntu-specific packaging utilities
zh_TW: Ubuntu的特定打包工具

en: Encryption software so your work can be verified as being done by you
zh_TW: 加密軟件，所以驗證由您完成的工作是您的付出

en: Additional encryption software so you can securely transfer files
zh_TW: 額外的加密軟件，這樣你就可以安全地傳輸文件

en: Creating and configuring your account on Launchpad
zh_TW: 在 Launchpad 上創建和配置您的帳戶

en: Setting up your development environment to help you do local builds of packages, interact with other developers, and propose your changes on Launchpad.
zh_TW: 設置您的開發環境來幫你做本地編譯軟件包，與其他開發人員互動，並提出您的變化到 Launchpad 上。

en: It is advisable to do packaging work using the current development version of Ubuntu. Doing so will allow you to test changes in the same environment where those changes will actually be applied and used.
zh_TW: 建議最好是使用當前開發版本的 Ubuntu 做打包工作。這樣做可以讓你測試在同樣的環境的開發，這些開發成果將實際地被應用和使用。

en: Install basic packaging software
zh_TW: 安裝基本的打包軟件

en: This command will install the following software:
zh_TW: 這個命令會安裝以下軟件：

en: ``pbuilder`` -- a tool to do reproducible builds of a package in a clean and isolated environment.
zh_TW: ``pbuilder`` —— 一個工具，用來在乾淨的和孤立的環境中重現構建一個包。

en: ``ubuntu-dev-tools`` (and ``devscripts``, a direct dependency) -- a collection of tools that make many packaging tasks easier.
zh_TW: ``ubuntu-dev-tools`` （和 ``devscripts`` ，一个直接依賴）——一個工具集，使許多打包任務更容易。

en: ``apt-file`` provides an easy way to find the binary package that contains a given file.
zh_TW: ``apt-file`` 提供了一個簡單的方法來查找包含一個給定文件的是哪个二進制包。

en: Create your GPG key
zh_TW: 創建你的GPG密鑰

en: To generate a new GPG key, run::
zh_TW: 要生成一個新的GPG密鑰，運行：

en: GPG will first ask you which kind of key you want to generate. Choosing the default (RSA and DSA) is fine. Next it will ask you about the keysize. The default (currently 2048) is fine, but 4096 is more secure. Afterwards, it will ask you if you want it to expire the key at some stage. It is safe to say "0", which means the key will never expire. The last questions will be about your name and email address. Just pick the ones you are going to use for Ubuntu development here, you can add additional email addresses later on. Adding a comment is not necessary. Then you will have to set a passphrase, choose a safe one (a passphrase is just a password which is allowed to include spaces).
zh_TW: GPG 首先會問您，您要產生哪一種密鑰。選擇默認（RSA和DSA）的罰款。接下來，它會問你關於密鑰大小。默認值（目前為2048）可以，但4096是更安全的。之後，它會問你，如果你想讓它過期的时间是在什么时候。“0” 就很安全了，這意味著密鑰永遠不會過期。最後一個問題是您的姓名和電子郵件地址。只要挑選那些您要在 Ubuntu 開發使用的邮件地址就可以，你也可以之後添加電子郵件地址後。添加評論不是必要的。然後，您必須設置一個密碼，選擇一個安全的密碼（密碼允許包括空格）。

en: Now GPG will create a key for you, which can take a little bit of time; it needs random bytes, so if you give the system some work to do it will be just fine.  Move the cursor around, type some paragraphs of random text, load some web page.
zh_TW: GPG為您將創建一個密鑰，這可能需要一點點的時間，它需要隨機字節，所以如果你給系統一些工作要做，它會就好了。左右移動光標，​​鍵入一些隨機文本段落，加載一些網頁。

en: Once this is done, you will get a message similar to this one::
zh_TW: 一旦做到這一點，你會得到一個類似這個消息：

en: In this case ``43CDE61D`` is the *key ID*.
zh_TW: 在這裏的情況下  ``43CDE61D`` 就是 *密鑰 ID*.

en: Next, you need to upload the public part of your key to a keyserver so the world can identify messages and files as yours. To do so, enter::
zh_TW: 接下來，您需要上傳你的密鑰的公共部分，所以世界密鑰服務器可以識別您的消息和文件。要做到這一點，請輸入：

en: Create your SSH key
zh_TW: 創建您的 SSH 密鑰

en: SSH_ stands for *Secure Shell*, and it is a protocol that allows you to exchange data in a secure way over a network. It is common to use SSH to access and open a shell on another computer, and to use it to securely transfer files. For our purposes, we will mainly be using SSH to securely upload source packages to Launchpad.
zh_TW: SSH_ 表示 *Secure Shell* ， 它是一個協議，允許您以安全的方式通過網絡進行數據交換。通常，我們使用 SSH 訪問另一台電腦 ，打開一個 shell，並用它來安全地傳輸文件。對於我們這裏目的，我們將主要使用 SSH 安全地把源碼包上傳到 Launchpad。

en: To generate an SSH key, enter::
zh_TW: 要生成SSH密鑰，輸入：

en: The default file name usually makes sense, so you can just leave it as it is. For security purposes, it is highly recommended that you use a passphrase.
zh_TW: 默認的文件名通常是有道理的，所以你可以不用理會它。為了安全起見，我們強烈建議您使用一個口令。

en: Set up pbuilder
zh_TW: 設置 pbuilder

en: ``pbuilder`` allows you to build packages locally on your machine. It serves a couple of purposes:
zh_TW: ``pbuilder`` 允許您建立您機器上的本地包。它提供許多的用途：

en: The build will be done in a minimal and clean environment. This helps you make sure your builds succeed in a reproducible way, but without modifying your local system
zh_TW: 構建工作將在最小和清潔的環境。這將幫助您確保您以一個可重複的方式成功構建，卻沒有修改您的本地系統

en: There is no need to install all necessary *build dependencies* locally
zh_TW: 沒有必要本地安裝所有必需的 *構建依賴*

en: You can set up multiple instances for various Ubuntu and Debian releases
zh_TW: 您可以設置 Ubuntu 和 Debian 發行版的多個不同的實例

en: Setting ``pbuilder`` up is very easy, run::
zh_TW: 設置 ``pbuilder`` 很簡單，直接運行：

en: Get set up to work with Launchpad
zh_TW: 設置 LaunchPad

en: With a basic local configuration in place, your next step will be to configure your system to work with Launchpad. This section will focus on the following topics:
zh_TW: 隨著本地的基本配置到位，下一步將是配置您的系統與 Launchpad 工作。本節重點在以下主題：

en: What Launchpad is and creating a Launchpad account
zh_TW: LaunchPad 介紹和創建一個 Launchpad 帳戶

en: Uploading your GPG and SSH keys to Launchpad
zh_TW: 上傳您的 GPG 和 SSH 密鑰到 Launchpad

en: About Launchpad
zh_TW: 關於 Launchpad

en: Launchpad is the central piece of infrastructure we use in Ubuntu. It not only stores our packages and our code, but also things like translations, bug reports, and information about the people who work on Ubuntu and their team memberships.  You will also use Launchpad to publish your proposed fixes, and get other Ubuntu developers to review and sponsor them.
zh_TW: LaunchPad 是我們使用 Ubuntu 中的 Ubuntu 基礎設施的中心部分。它不僅存儲了我們的包和我們的代碼，還有還翻譯，bug報告，以及在 Ubuntu 工作的人和他們的團隊成員的信息等等。您還將使用 Launchpad 的發布您的建議修復，並得到其他 Ubuntu 的開發者的審查和贊助。

en: You will need to register with Launchpad and provide a minimal amount of information. This will allow you to download and upload code, submit bug reports, and more.
zh_TW: 您需要註冊 Launchpad 和提供少量的信息。這將允許您下載和上傳代碼，提交 bug 報告，以及更多。

en: Besides hosting Ubuntu, Launchpad can host any Free Software project. For more information see the `Launchpad Help wiki <https://help.launchpad.net/>`_.
zh_TW: 除了託管 Ubuntu 的項目，Launchpad 可以舉辦任何自由軟件項目。欲了解更多信息，請參閱 `Launchpad Help wiki <https://help.launchpad.net/>`_ 。

en: Get a Launchpad account
zh_TW: 獲取 Launchpad 帳戶

en: Launchpad's registration process will ask you to choose a display name. It is encouraged for you to use your real name here so that your Ubuntu developer colleagues will be able to get to know you better.
zh_TW: Launchpad 的註冊過程中會問您選擇的顯示名稱。鼓勵您使用您的真實姓名，讓您的 Ubuntu 開發的同事將能夠得到更好地了解您。

en: When you register a new account, Launchpad will send you an email with a link you need to open in your browser in order to verify your email address. If you don't receive it, check in your spam folder.
zh_TW: 當您註冊一個新帳戶，LaunchPad將發送給您一封電子郵件，其中有個一個鏈接。您需要在您的瀏覽器中打開它，以驗證您的電子郵件地址。如果您未收到郵件，請檢查您的垃圾郵件文件夾中。

en: Upload your GPG key to Launchpad
zh_TW: 上傳您的 GPG 公鑰到 Launchpad

en: To find about your GPG fingerprint, run::
zh_TW: 要找到你的 GPG 指紋，運行：

en: and it will print out something like::
zh_TW: 它會打印出類似：

en: Head to https://launchpad.net/~/+editpgpkeys and copy the "Key fingerprint" into the text box. In the case above this would be ``5C28 0144 FB08 91C0 2CF3  37AC 6F0B F90F 43CD E61D``. Now click on "Import Key".
zh_TW: 打開連接 https://launchpad.net/~/+editpgpkeys 然後複製 “密鑰指紋”到文本框中。在這裏例子中是 ``5C28 0144 FB08 91C0 2CF3  37AC 6F0B F90F 43CD E61D`` 。現在點擊“導入公鑰”。

en: Launchpad will use the fingerprint to check the Ubuntu key server for your key and, if successful, send you an encrypted email asking you to confirm the key import. Check your email account and read the email that Launchpad sent you. `If your email client supports OpenPGP encryption, it will prompt you for the password you chose for the key when GPG generated it. Enter the password, then click the link to confirm that the key is yours.`
zh_TW: LaunchPad 將使用指紋在 Ubuntu 的密鑰服務器上查找您的公鑰，如果成功的話，將給您發送一個加密電子郵件，要求您確認導入的公鑰。請檢查您的電子郵件帳戶，閱讀 Launchpad 發送您的電子郵件 。` 如果您的電子郵件客戶端支持 OpenPGP 加密，它會提示您選擇 GPG生成的密鑰。輸入對應的密碼，然後點擊鏈接以確認公鑰是您的。`

en: Back on the Launchpad website, use the Confirm button and Launchpad will complete the import of your OpenPGP key.
zh_TW: 返回到 Launchpad 網站上，點擊“確認”按鈕，Launchpad 將完成您的 OpenPGP 公鑰導入。
