packaging-tutorial (0.27) - en to zh_CN translation catalogue (546 entries)

note: Translators: change debiantutorial to debiantutorial.$lang to use translated file, and append to this string all commands to load localisation packages, e.g.: \\usepackage{debiantutorial.fr} \\usepackage[french]{babel} \\frenchsetup{...} type: Plain text
en: \usepackage{debiantutorial}
zh_CN: \usepackage{debiantutorial.zh_CN} \usepackage[UTF8]{ctex}

note: type: title{#2}
en: Debian Packaging Tutorial
zh_CN: Debian打包教程

note: type: frame{#2}
en: About this tutorial
zh_CN: 关于该教程

note: type: itemize
en: Goal: \textbf{tell you what you really need to know about Debian packaging}
zh_CN: 目标：\textbf{告诉你关于Debian打包必须知道的知识}

note: type: itemize
en: Modify existing packages
zh_CN: 修改现有软件包

note: type: itemize
en: Create your own packages
zh_CN: 创建你自己的软件包

note: type: itemize
en: Interact with the Debian community
zh_CN: 在Debian社区内与人交流

note: type: itemize
en: Become a Debian power-user
zh_CN: 成为Debian高手

note: type: itemize
en: Covers the most important points, but is not complete
zh_CN: 涵盖了大部分要点，但不是全部

note: type: itemize
en: You will need to read more documentation
zh_CN: 你还需要看更多的说明文档

note: type: itemize
en: Most of the content also applies to Debian derivative distributions
zh_CN: 绝大部分内容同样适用于Debian的各个衍生版本

note: type: itemize
en: That includes Ubuntu
zh_CN: 包括Ubuntu

note: type: frame{#2}
en: Outline
zh_CN: 内容概括

note: type: section{#2}
en: Introduction
zh_CN: 介绍

note: type: textbf{#1}
en: GNU/Linux distribution
zh_CN: 是一款 GNU/Linux 发行版

note: type: itemize
en: 1st major distro developed ``openly in the spirit of GNU''
zh_CN: 第一款遵循“GNU开放精神”而开发的大型发行版

note: type: itemize
en: \textbf{Non-commercial}, built collaboratively by over 1,000 volunteers
zh_CN: \textbf{非商业用途}，由超过1000名志愿者合作构建

note: type: itemize
en: 3 main features:
zh_CN: 3项主要特性：

note: type: itemize
en: \textbf{Quality} -- culture of technical excellence\\ {\small\sl We release when it's ready}
zh_CN: textbf{高质量}——技术至上主义\\ {\small\sl 尽善尽美才可发行}

note: type: itemize
en: \textbf{Freedom} -- devs and users bound by the \textsl{Social Contract}\\ Promoting the culture of Free Software since 1993
zh_CN: \textbf{自由}——开发者和用户以\textsl{社会契约}的方式联系在一起，\\ 共同推广1993年开始的自由软件精神

note: type: itemize
en: \textbf{Independence} -- no (single) company babysitting Debian\\ And open decision-making process (\textsl{do-ocracy} + \textsl{democracy})
zh_CN: \textbf{独立}——没有（单独一家）公司在照看Debian\\ 我们集思广益群策群力（\textsl{高行动力} + \textsl{民主决策}）

note: type: itemize
en: \textbf{Amateur} in the best sense: done for the love of it
zh_CN: \textbf{业余爱好者}们的理想状态：与同好们一起用爱发电

note: type: frame{#2}
en: Debian packages
zh_CN: Debian软件包

note: type: itemize
en: \textbf{.deb} files (binary packages)
zh_CN: \textbf{.deb} 文件（程序文件包）

note: type: itemize
en: A very powerful and convenient way to distribute software to users
zh_CN: 可靠又方便的软件发行方式

note: type: itemize
en: One of the two most common package formats (with RPM)
zh_CN: 两种应用最广泛的软件包格式之一（另一种是RPM）

note: type: itemize
en: Universal:
zh_CN: 概况：

note: type: itemize
en: 30,000 binary packages in Debian\\ $\rightarrow$ most of the available free software is packaged in Debian!
zh_CN: Debian有超过30,000个软件包\\ $\rightarrow$绝大多数可用的自由软件都被打包进了Debian！

note: type: itemize
en: For 12 ports (architectures), including 2 non-Linux (Hurd; KFreeBSD)
zh_CN: 覆盖12种架构，包括两款非Linux架构（Hurd; KFreeBSD）

note: type: itemize
en: Also used by 120 Debian derivative distributions
zh_CN: 同时被用于120款Debian衍生系统

note: type: frame{#2}
en: The Deb package format
zh_CN: Deb软件包格式

note: type: itemize
en: \texttt{.deb} file: an \texttt{ar} archive
zh_CN: \texttt{.deb} 文件：其实是一种\texttt{ar}压缩包，里面包含了以下文件：

note: $ type: itemize
en: \texttt{debian-binary}: version of the deb file format, \texttt{"2.0\textbackslash{}n"}
zh_CN: \texttt{debian-binary}: deb文件格式的版本，\texttt{"2.0\textbackslash{}n"}

note: type: itemize
en: \texttt{control.tar.gz}: metadata about the package\\ {\small \texttt{\textbf{control}, md5sums, (pre|post)(rm|inst), triggers, shlibs}, \ldots}
zh_CN: \texttt{control.tar.gz}: 软件包的元数据(metadata)，包括\\ {\small \texttt{\textbf{control}, md5sums, (pre|post)(rm|inst), triggers, shlibs}, \ldots}

note: type: itemize
en: \texttt{data.tar.gz}: data files of the package
zh_CN: \texttt{data.tar.gz}: 软件包的数据文件

note: type: itemize
en: You could create your \texttt{.deb} files manually\\ {\footnotesize \url{http://tldp.org/HOWTO/html\_single/Debian-Binary-Package-Building-HOWTO/}}
zh_CN: 你可以手动创建你自己的 \texttt{.deb} 文件\\ {\footnotesize \url{http://tldp.org/HOWTO/html\_single/Debian-Binary-Package-Building-HOWTO/}}

note: type: itemize
en: But most people don't do it that way
zh_CN: 但大家一般不这么做

note: type: textbf{#1}
en: This tutorial: create Debian packages, the Debian way
zh_CN: 此教程会教你：如何用Debian的方式创建Debian软件包

note: type: frame{#2}
en: Tools you will need
zh_CN: 你需要准备的工具

note: type: itemize
en: A Debian (or Ubuntu) system (with root access)
zh_CN: Debian（或Ubuntu）操作系统（且你有root权限）

note: type: itemize
en: Some packages:
zh_CN: 某些软件包：

note: type: itemize
en: \textbf{build-essential}: has dependencies on the packages that will be assumed to be available on the developer's machine (no need to specify them in the \texttt{Build-Depends:} control field of your package)
zh_CN: \textbf{build-essential}: 包含了在开发机上使用的依赖包（不需要逐一把这些依赖包在你软件包的命令控制参数\texttt{Build-Depends:}里列出来）

note: type: itemize
en: includes a dependency on \textbf{dpkg-dev}, which contains basic Debian-specific tools to create packages
zh_CN: 也包含了\textbf{dpkg-dev}的依赖包。\textbf{dpkg-dev}里有基本的Debian专用打包工具。

note: type: itemize
en: \textbf{devscripts}: contains many useful scripts for Debian maintainers
zh_CN: \textbf{devscripts}: 里面有很多对Debian维护者很有用的脚本。

note: type: frame
en: Many other tools will also be mentioned later, such as \textbf{debhelper}, \textbf{cdbs}, \textbf{quilt}, \textbf{pbuilder}, \textbf{sbuild}, \textbf{lintian}, \textbf{svn-buildpackage}, \textbf{git-buildpackage}, \ldots\\ Install them when you need them.
zh_CN: 之后还会提到很多其他工具，譬如 \textbf{debhelper}, \textbf{cdbs}, \textbf{quilt}, \textbf{pbuilder}, \textbf{sbuild}, \textbf{lintian}, \textbf{svn-buildpackage}, \textbf{git-buildpackage}, \ldots\\ 在你需要的时候可以安装它们。

note: type: frame{#2}
en: General packaging workflow
zh_CN: 通用打包流程

note: \draw[arr,->] (bin) -- (-1,-6) node[pos=0.5,left] {upload (\textttc{dput})}; hack hack hack type: tikzpicture
en: \node[node1] (www) at (0, 0) {Web}; \node[node1] (us) at (2.5, 0) {upstream source}; \node[node1] (da) at (-2.5, 0) {Debian mirror}; \node[node1] (sp) at (0, -2) {source package}; \draw[arr,<-,dashed,thick] (sp) -- (2.5,-2) node[right=0cm,text width=2.98cm,text centered,font=\small\sl] {where most of the manual work is done}; \node[node1] (bin) at (0, -4) {one or several binary packages}; \draw[arr,<-,dashed,thick] (bin) -- (3.5,-4) node[right,text centered,font=\small\ttfamily\sl] {.deb\normalfont}; \draw[arr,->] (us) -- (sp) node[pos=0.5,right,command] {dh\_make}; \draw[arr,->] (da) -- (sp) node[pos=0.5,left,command] {apt-get source}; \draw[arr,->] (www) -- (sp) node[pos=0.5,left,command] {dget}; \draw[arr,->] (sp) -- (bin) node[pos=0.5,right,text width=6cm] {\textttc{debuild} (build and test with \textttc{lintian}) or \textttc{dpkg-buildpackage}}; \draw[arr,->] (bin) -- (1,-6) node[pos=0.5,right] {install (\textttc{debi})}; \draw[transparent] (bin) -- (-1,-6) node[pos=0.5,left,opaque] {upload (\textttc{dput})}; \draw[arr,->,rounded corners] (bin) -- (-1,-6) -- (-4.5,-6) -- (-4.5,0) -- (da); \useasboundingbox (-4,-6) rectangle (6,0);
zh_CN: \node[node1] (www) at (0, 0) {网页}; \node[node1] (us) at (2.5, 0) {上游源代码}; \node[node1] (da) at (-2.5, 0) {Debian源镜像}; \node[node1] (sp) at (0, -2) {源码包}; \draw[arr,<-,dashed,thick] (sp) -- (2.5,-2) node[right=0cm,text width=2.98cm,text centered,font=\small\sl] {至此绝大部分人工操作完成}; \node[node1] (bin) at (0, -4) {一个或若干个程序包}; \draw[arr,<-,dashed,thick] (bin) -- (3.5,-4) node[right,text centered,font=\small\ttfamily\sl] {.deb\normalfont}; \draw[arr,->] (us) -- (sp) node[pos=0.5,right,command] {dh\_make}; \draw[arr,->] (da) -- (sp) node[pos=0.5,left,command] {apt-get source}; \draw[arr,->] (www) -- (sp) node[pos=0.5,left,command] {dget}; \draw[arr,->] (sp) -- (bin) node[pos=0.5,right,text width=6cm] {\textttc{debuild} (用\textttc{lintian}构建或测试) 或 \textttc{dpkg-buildpackage}}; \draw[arr,->] (bin) -- (1,-6) node[pos=0.5,right] {安装 (\textttc{debi})}; \draw[transparent] (bin) -- (-1,-6) node[pos=0.5,left,opaque] {上传 (\textttc{dput})}; \draw[arr,->,rounded corners] (bin) -- (-1,-6) -- (-4.5,-6) -- (-4.5,0) -- (da); \useasboundingbox (-4,-6) rectangle (6,0);

note: type: subsection{#2}
en: Rebuilding dash
zh_CN: 重构dash

note: type: frame{#2}
en: Example: rebuilding dash
zh_CN: 范例：重构dash

note: type: enumerate
en: Install packages needed to build dash, and devscripts\\ {\texttt{sudo apt-get build-dep dash}\\ (requires \texttt{deb-src} lines in \texttt{/etc/apt/sources.list})}\\ {\texttt{sudo apt-get install -{}-no-install-recommends devscripts fakeroot}}
zh_CN: 安装构建dash需要的软件包，以及devscripts\\ {\texttt{sudo apt-get build-dep dash}\\ (需要在 \texttt{/etc/apt/sources.list})} 文件里加上\texttt{deb-src}的相关地址内容\\ {\texttt{sudo apt-get install -{}-no-install-recommends devscripts fakeroot}}

note: type: enumerate
en: Create a working directory, and get in it:\\ \texttt{mkdir /tmp/debian-tutorial ; cd /tmp/debian-tutorial}
zh_CN: 新建工作目录文件夹，并进入\\ \texttt{mkdir /tmp/debian-tutorial ; cd /tmp/debian-tutorial}

note: type: enumerate
en: Grab the \texttt{dash} source package\\ \texttt{apt-get source dash}\\ {\small (This needs you to have \texttt{deb-src} lines in your \texttt{/etc/apt/sources.list})}
zh_CN: 获取 \texttt{dash} 的源码包\\ \texttt{apt-get source dash}\\ {\small （需要在 \texttt{/etc/apt/sources.list} 文件里加上\texttt{deb-src}的相关地址内容）}

note: type: enumerate
en: Build the package\\ {\texttt{cd dash-*\\ debuild -us -uc}} ~~~(\texttt{-us -uc} disables signing the package with GPG)
zh_CN: 构建软件包\\ {\texttt{cd dash-*\\ debuild -us -uc}} ~~~(\texttt{-us -uc} 指不将软件包标记为GPG)

note: type: enumerate
en: Check that it worked
zh_CN: 检查命令是否正常运作

note: type: itemize
en: There are some new \texttt{.deb} files in the parent directory
zh_CN: 上级目录下应该会出现几个新的 \texttt{.deb} 文件

note: type: enumerate
en: Look at the \texttt{debian/} directory
zh_CN: 查看 \texttt{debian/} 目录

note: type: itemize
en: That's where the packaging work is done
zh_CN: 打包完成后的软件包位于此目录

note: type: section{#2}
en: Creating source packages
zh_CN: 创建源码包

note: type: subsection{#2}
en: Source packages basics
zh_CN: 源码包基础

note: type: frame{#2}
en: Source package
zh_CN: 源码包

note: type: itemize
en: One source package can generate several binary packages\\ {\small e.g. the \texttt{\bfseries libtar} source generates the \texttt{\bfseries libtar0} and \texttt{\bfseries libtar-dev} binary packages}
zh_CN: 一个源码包可以生成若干个程序文件包\\ {\small 例如 \texttt{\bfseries libtar} 源代码可以生成\texttt{\bfseries libtar0} 和 \texttt{\bfseries libtar-dev} 程序文件包}

note: type: itemize
en: Two kinds of packages: (if unsure, use non-native)
zh_CN: 两种软件包：（如果不确定是哪种，选非原生）

note: type: itemize
en: Native packages: normally for Debian specific software (\textsl{dpkg}, \textsl{apt})
zh_CN: 原生软件包：专为Debian定制开发的软件(\textsl{dpkg}, \textsl{apt})

note: type: itemize
en: Non-native packages: software developed outside Debian
zh_CN: 非原生软件包：在Debian之外开发的软件

note: type: itemize
en: Main file: \texttt{.dsc} (meta-data)
zh_CN: 主要文件: \texttt{.dsc}（元数据）

note: type: itemize
en: Other files depending on the version of the source format
zh_CN: 与源码格式版本相关的其他文件

note: type: itemize
en: 1.0 or 3.0 (native): \texttt{package\_version.tar.gz}
zh_CN: 1.0或3.0（原生）：\texttt{package\_version.tar.gz}

note: type: itemize
en: 1.0 (non-native):
zh_CN: 1.0（非原生）：

note: type: itemize
en: \texttt{pkg\_ver.orig.tar.gz}: upstream source
zh_CN: \texttt{pkg\_ver.orig.tar.gz}: 上游源代码

note: type: itemize
en: \texttt{pkg\_debver.diff.gz}: patch to add Debian-specific changes
zh_CN: \texttt{pkg\_debver.diff.gz}: 专为Debian准备的更新补丁

note: type: itemize
en: 3.0 (quilt):
zh_CN: 3.0（quilt）

note: type: itemize
en: \texttt{pkg\_debver.debian.tar.gz}: tarball with the Debian changes
zh_CN: \texttt{pkg\_debver.debian.tar.gz}: 包含Debian补丁的压缩包

note: type: frame
en: (See \texttt{dpkg-source(1)} for exact details)
zh_CN: 详见 \texttt{dpkg-source(1)}

note: type: frame{#2}
en: Source package example (wget\_1.12-2.1.dsc)
zh_CN: 源码包范例（wget\_1.12-2.1.dsc）

note: type: subsection{#2}
en: Retrieving source packages
zh_CN: 获取源码包

note: type: frame{#2}
en: Retrieving an existing source package
zh_CN: 从现成源码包中获取

note: type: itemize
en: From the Debian archive:
zh_CN: 从Debian源代码库里获取

note: type: itemize
en: (You need \texttt{deb-src} lines in \texttt{sources.list})
zh_CN: (需要在\texttt{sources.list}文件里加上\texttt{deb-src}的相关地址内容)

note: type: itemize
en: From the Internet:
zh_CN: 从互联网上获取：

note: type: itemize
en: \texttt{dget http://snapshot.debian.org/archive/debian-archive/\\20090802T004153Z/debian/dists/bo/main/source/web/\\ wget\_1.4.4-6.dsc}\\ (\href{http://snapshot.debian.org/}{\ttfamily snapshot.d.o} provides all packages from Debian since 2005)
zh_CN: \texttt{dget http://snapshot.debian.org/archive/debian-archive/\\20090802T004153Z/debian/dists/bo/main/source/web/\\ wget\_1.4.4-6.dsc}\\ (\href{http://snapshot.debian.org/}{\ttfamily snapshot.d.o} 提供了自2005年起Debian的所有软件包)

note: type: itemize
en: From the (declared) version control system:
zh_CN: 从（已声明的）版本控制系统中获取：

note: type: itemize
en: Once downloaded, extract with \texttt{dpkg-source -x \textsl{file.dsc}}
zh_CN: 下载完毕后，用该命令解压缩：\texttt{dpkg-source -x \textsl{file.dsc}}

note: type: frame{#2}
en: Creating a basic source package
zh_CN: 创建基础源码包

note: type: itemize
en: Download the upstream source\\ (\textsl{upstream source} = the one from the software's original developers)
zh_CN: 下载上游源代码\\ （\textsl{上游源代码} = 软件开发者提供的源代码）

note: type: itemize
en: Rename to \texttt{<\textsl{source\_package}>\_<\textsl{upstream\_version}>.orig.tar.gz}\\ (example: \texttt{simgrid\_3.6.orig.tar.gz})
zh_CN: 将源代码包重命名为\texttt{<\textsl{source\_package}>\_<\textsl{upstream\_version}>.orig.tar.gz}\\ (例如: \texttt{simgrid\_3.6.orig.tar.gz})

note: type: itemize
en: Untar it
zh_CN: 解压缩

note: type: itemize
en: Rename the directory to \texttt{<\textsl{source\_package}>-<\textsl{upstream\_version}>}\\ (example: \texttt{simgrid-3.6})
zh_CN: 重命名目录为\texttt{<\textsl{source\_package}>-<\textsl{upstream\_version}>}\\ (例如: \texttt{simgrid-3.6})

note: type: itemize
en: \texttt{cd \texttt{<\textsl{source\_package}>-<\textsl{upstream\_version}>} \&\& dh\_make}\\ (from the \textbf{dh-make} package)
zh_CN: \texttt{cd \texttt{<\textsl{source\_package}>-<\textsl{upstream\_version}>} \&\& dh\_make}\\ (利用 \textbf{dh-make} 软件包)

note: type: itemize
en: There are some alternatives to \texttt{dh\_make} for specific sets of packages: \textbf{dh-make-perl}, \textbf{dh-make-php}, \ldots
zh_CN: 如果要用其他的\texttt{dh\_make}命令来处理某些特定的源码包种类，还需要安装对应的软件包，如\textbf{dh-make-perl}, \textbf{dh-make-php}, \ldots

note: type: itemize
en: \texttt{debian/} directory created, with a lot of files in it
zh_CN: 这时\texttt{debian/} 目录就会被创建，里面有一大堆文件

note: type: frame{#2}
en: Files in debian/
zh_CN: debian/ 目录下的文件

note: type: frame
en: All the packaging work should be made by modifying files in \texttt{debian/}
zh_CN: 所有的打包工作都应该通过修改\texttt{debian/} 目录下的文件来进行

note: type: itemize
en: Main files:
zh_CN: 主要文件：

note: type: itemize
en: \textbf{control} -- meta-data about the package (dependencies, etc.)
zh_CN: \textbf{control}——软件包的元数据（依赖包，之类）

note: type: itemize
en: \textbf{rules} -- specifies how to build the package
zh_CN: \textbf{rules}——规定了如何构建软件包

note: type: itemize
en: \textbf{copyright} -- copyright information for the package
zh_CN: \textbf{copyright}——软件包的版权信息

note: type: itemize
en: \textbf{changelog} -- history of the Debian package
zh_CN: \textbf{changelog}——Debian软件包的更新历史记录

note: type: itemize
en: Other files:
zh_CN: 其他文件：

note: type: itemize
en: compat
zh_CN: 兼容文件

note: type: itemize
en: watch
zh_CN: 监测文件

note: type: itemize
en: dh\_install* targets\\ {\small *.dirs, *.docs, *.manpages, \ldots}
zh_CN: dh\_install* 的保存目录\\ {\small *.dirs, *.docs, *.manpages, \ldots}

note: type: itemize
en: maintainer scripts\\ {\small *.postinst, *.prerm, \ldots}
zh_CN: 维护脚本\\ {\small *.postinst, *.prerm, \ldots}

note: type: itemize
en: source/format
zh_CN: 源码/格式

note: type: itemize
en: patches/ -- if you need to modify the upstream sources
zh_CN: 补丁/ ——如果你需要修改上游源代码

note: type: itemize
en: Several files use a format based on RFC 822 (mail headers)
zh_CN: 有几个文件使用基于RFC 8222的格式（邮件header格式）

note: type: itemize
en: Lists the Debian packaging changes
zh_CN: Debian打包更新历史记录

note: type: itemize
en: Gives the current version of the package
zh_CN: 列出软件包的当前版本

note: type: tikzpicture
en: \draw (0,0) node[above right] {\large 1.2.1.1-5}; \draw [decorate,decoration={brace}] (2,0) -- (1.45,0) node[at start,below,text width=1.6cm,text centered] {\small Debian revision}; \draw [decorate,decoration={brace}] (1.4,0) -- (0,0) node[midway,below,text width=1.6cm,text centered] { \small Upstream version};
zh_CN: \draw (0,0) node[above right] {\large 1.2.1.1-5}; \draw [decorate,decoration={brace}] (2,0) -- (1.45,0) node[at start,below,text width=1.6cm,text centered] {\small Debian 版本}; \draw [decorate,decoration={brace}] (1.4,0) -- (0,0) node[midway,below,text width=1.6cm,text centered] { \small 上游版本};

note: % type: itemize
en: Edited manually or with \textttc{dch}
zh_CN: 手动编辑或使用\textttc{dch}命令

note: type: itemize
en: Create a changelog entry for a new release: \textttc{dch -i}
zh_CN: 为新发行的软件创建更新日志：\textttc{dch -i}

note: type: itemize
en: Special format to automatically close Debian or Ubuntu bugs\\ Debian: \texttt{Closes:~\#595268}; Ubuntu: \texttt{LP:~\#616929}
zh_CN: 自动关闭Debian或Ubuntu bug的特殊字符：\\ Debian: \texttt{Closes:~\#595268}; Ubuntu: \texttt{LP:~\#616929}

note: type: itemize
en: Installed as \texttt{/usr/share/doc/\textit{package}/changelog.Debian.gz}
zh_CN: 安装在 \texttt{/usr/share/doc/\textit{package}/changelog.Debian.gz}

note: type: itemize
en: Package metadata
zh_CN: 软件包metadata

note: type: itemize
en: For the source package itself
zh_CN: 源码包的元数据

note: type: itemize
en: For each binary package built from this source
zh_CN: 从源代码构建出来的每个程序文件包的元数据

note: type: itemize
en: Package name, section, priority, maintainer, uploaders, build-dependencies, dependencies, description, homepage, \ldots
zh_CN: 软件包名称，分类，优先级，维护者，上传者，build依赖包，本体依赖包，描述介绍，主页，\ldots

note: type: itemize
en: Documentation: Debian Policy chapter 5\\ \url{https://www.debian.org/doc/debian-policy/ch-controlfields}
zh_CN: 说明文档： Debian 政策 第5章\\ \url{https://www.debian.org/doc/debian-policy/ch-controlfields}

note: type: frame{#2}
en: Architecture: all or any
zh_CN: 架构(Architecture)：全部(all)或任意(any)

note: type: frame
en: Two kinds of binary packages:
zh_CN: 有两种程序文件包：

note: type: itemize
en: Packages with different contents on each Debian architecture
zh_CN: 每种Debian架构上有不同内容的软件包

note: type: itemize
en: Example: C program
zh_CN: 例如：C 语言编程

note: type: itemize
en: \texttt{Architecture:\ any} in \texttt{debian/control}
zh_CN: \texttt{debian/control} 文件内\texttt{Architecture:\ any}

note: type: itemize
en: Or, if it only works on a subset of architectures:\\ \texttt{Architecture:\ amd64 i386 ia64 hurd-i386}
zh_CN: 或者，仅在某几种架构下可用：\\ \texttt{Architecture:\ amd64 i386 ia64 hurd-i386}

note: type: itemize
en: buildd.debian.org: builds all the other architectures for you on upload
zh_CN: buildd.debian.org：会在你上传软件包时自动为你构建所有其他架构

note: type: itemize
en: Named \texttt{\textsl{package}\_\textsl{version}\_\textsl{architecture}.deb}
zh_CN: 命名为 \texttt{\textsl{package}\_\textsl{version}\_\textsl{architecture}.deb}

note: type: itemize
en: Packages with the same content on all architectures
zh_CN: 所有架构下内容都相同的软件包

note: type: itemize
en: Example: Perl library
zh_CN: 举例：Perl 函数库

note: type: itemize
en: \texttt{Architecture:\ all} in \texttt{debian/control}
zh_CN: \texttt{debian/control} 文件内\texttt{Architecture:\ all}

note: type: itemize
en: Named \texttt{\textsl{package}\_\textsl{version}\_\textbf{all}.deb}
zh_CN: 命名为 \texttt{\textsl{package}\_\textsl{version}\_\textbf{all}.deb}

note: type: frame
en: A source package can generate a mix of \texttt{Architecture:\ any} and \texttt{Architecture:\ all} binary packages
zh_CN: 一个源码包可以生成既有\texttt{Architecture:\ any} 程序 又有\texttt{Architecture:\ all} 程序的文件包。

note: type: itemize
en: Makefile
zh_CN: 用于编译源代码生成文件(Makefile)

note: type: itemize
en: Interface used to build Debian packages
zh_CN: 用于构建Debian软件包的接口

note: type: itemize
en: Documented in Debian Policy, chapter 4.8\\ {\small \url{https://www.debian.org/doc/debian-policy/ch-source\#s-debianrules}}
zh_CN: 说明文档在 Debian 政策，章节4.8\\ {\small \url{https://www.debian.org/doc/debian-policy/ch-source\#s-debianrules}}

note: type: itemize
en: Required targets:
zh_CN: 用到的目标参数：

note: type: itemize
en: \texttt{build, build-arch, build-indep}: should perform all the configuration and compilation
zh_CN: \texttt{build, build-arch, build-indep}: 这几项包括了所有配置 和编译方法。

note: type: itemize
en: \texttt{binary, binary-arch, binary-indep}: build the binary packages
zh_CN: \texttt{binary, binary-arch, binary-indep}: 构建程序文件包

note: type: itemize
en: \texttt{dpkg-buildpackage} will call \texttt{binary} to build all the packages, or \texttt{binary-arch} to build only the \texttt{Architecture:~any} packages
zh_CN: \texttt{dpkg-buildpackage} 命令可以调用参数 \texttt{binary} 来构建所有的 软件包，也可以调用参数 \texttt{binary-arch} 只构建 \texttt{Architecture:~any} 的软件包

note: type: itemize
en: \texttt{clean}: clean up the source directory
zh_CN: \texttt{clean}: 清除源目录下的文件

note: type: subsection{#2}
en: Packaging helpers
zh_CN: 打包助手

note: type: frame{#2}
en: Packaging helpers -- debhelper
zh_CN: 打包助手——debhelper

note: type: itemize
en: You could write shell code in \texttt{debian/rules} directly
zh_CN: 你可以直接在 \texttt{debian/rules} 文件里写shell代码

note: type: itemize
en: Better practice (used by most packages): use a \textsl{Packaging helper}
zh_CN: 更好的打包实操方法（大多数软件包都用此方法）：使用\textsl{打包助手}

note: type: itemize
en: Most popular one: \textbf{debhelper} (used by 98\% of packages)
zh_CN: 最流行的打包助手：\textbf{debhelper}（98\% 的软件包用它打包）

note: type: itemize
en: Goals:
zh_CN: 目标：

note: type: itemize
en: Factor the common tasks in standard tools used by all packages
zh_CN: 归纳出用标准打包工具完成打包任务时适用于所有软件包的通用操作

note: type: itemize
en: Fix some packaging bugs once for all packages
zh_CN: 一次性解决所有软件包中共同存在的打包bug

note: type: itemize
en: Called from \texttt{debian/rules}
zh_CN: 调用 \texttt{debian/rules}

note: type: itemize
en: Configurable using command parameters or files in \texttt{debian/}
zh_CN: 可以使用命令行参数或者修改 \texttt{debian/} 目录内的文件来进行配置

note: type: itemize
en: Third-party helpers for sets of packages: \textbf{python-support}, \textbf{dh\_ocaml}, \ldots
zh_CN: 特定软件包种类的第三方助手：\textbf{python-support}, \textbf{dh\_ocaml}, \ldots

note: type: frame{#2}
en: debian/rules using debhelper (1/2)
zh_CN: 用到 debhelper 的 debian/rules 文件写法 (1/2)

note: type: frame{#2}
en: debian/rules using debhelper (2/2)
zh_CN: 用到 debhelper 的 debian/rules 文件写法（2/2）

note: type: itemize
en: With debhelper, still a lot of redundancy between packages
zh_CN: 即使用了debhelper，打不同的包依然有许多重复劳动

note: type: itemize
en: Second-level helpers that factor common functionality
zh_CN: 需要更进一步的归纳通用操作的助手软件

note: type: itemize
en: E.g. building with \texttt{./configure \&\& make \&\& make install} or CMake
zh_CN: 例如：用 \texttt{./configure \&\& make \&\& make install} 或者 CMake构建

note: type: itemize
en: Introduced in 2005, based on advanced \textsl{GNU make} magic
zh_CN: 出现在2005年，基于进阶 \textsl{GNU make} 功能

note: type: itemize
en: Documentation: \texttt{/usr/share/doc/cdbs/}
zh_CN: 说明文档: \texttt{/usr/share/doc/cdbs/}

note: type: itemize
en: Support for Perl, Python, Ruby, GNOME, KDE, Java, Haskell, \ldots
zh_CN: 支持 Perl, Python, Ruby, GNOME, KDE, Java, Haskell, \ldots

note: type: itemize
en: But some people hate it:
zh_CN: 但也有人很讨厌它：

note: type: itemize
en: Sometimes difficult to customize package builds:\\ "\textsl{twisty maze of makefiles and environment variables}"
zh_CN: 有时候会让自定义软件包构建变得困难：\\ “\textsl{搞得人头昏脑胀 的文件生成和环境变量}”

note: type: itemize
en: Slower than plain debhelper (many useless calls to \texttt{dh\_*})
zh_CN: 比普通的debhelper要慢（这是对\texttt{dh\_*}的大量无效调用导致的）

note: type: frame{#2}
en: Dh (aka Debhelper 7, or dh7)
zh_CN: Dh（也叫Debhelper 7，或 dh7）

note: type: itemize
en: Introduced in 2008 as a \textsl{CDBS killer}
zh_CN: 在2008年以\textsl{CDBS killer}的名义被公布

note: type: itemize
en: \textbf{dh} command that calls \texttt{dh\_*}
zh_CN: \textbf{dh} 命令调用\texttt{dh\_*}

note: type: itemize
en: Simple \textsl{debian/rules}, listing only overrides
zh_CN: 简易的 \textsl{debian/rules} 文件，仅仅列出覆盖内容

note: type: itemize
en: Easier to customize than CDBS
zh_CN: 比CDBS更容易定制

note: type: itemize
en: Doc: manpages (\texttt{debhelper(7)}, \texttt{dh(1)}) + slides from DebConf9 talk\\ \url{http://kitenet.net/~joey/talks/debhelper/debhelper-slides.pdf}
zh_CN: 说明文档: man手册 (\texttt{debhelper(7)}, \texttt{dh(1)}) + DebConf9 的幻灯片文档\\ \url{http://kitenet.net/~joey/talks/debhelper/debhelper-slides.pdf}

note: source for stats: https://anonscm.debian.org/cgit/collab-qa/dhistory.git/ type: frame{#2}
en: Classic debhelper vs CDBS vs dh
zh_CN: 经典debhelper vs CDBS vs dh

note: type: itemize
en: Mind shares:\\ Classic debhelper: 15\% \hskip 1em CDBS: 15\% \hskip 1em dh: 68\%
zh_CN: 份额比例：\\ 经典debhelper：15\% \hskip 1em CDBS:15\% \hskip 1em dh：68\%

note: type: itemize
en: Which one should I learn?
zh_CN: 我该学用哪个？

note: type: itemize
en: Probably a bit of all of them
zh_CN: 最好全学一点

note: type: itemize
en: You need to know debhelper to use dh and CDBS
zh_CN: 你得先搞懂debhelper才能用好dh和CDBS

note: type: itemize
en: You might have to modify CDBS packages
zh_CN: 你可能需要修改CDBS软件包

note: type: itemize
en: Which one should I use for a new package?
zh_CN: 打包新软件用哪个?

note: type: itemize
en: \textbf{dh} (only solution with an increasing mind share)
zh_CN: \textbf{dh} (份额比例不断上升的不二选择)

note: type: section{#2}
en: Building and testing packages
zh_CN: 构建与测试软件包

note: type: frame{#2}
en: Building packages
zh_CN: 构建软件包

note: type: itemize
en: \textttc{apt-get build-dep mypackage}\\ Installs the \textsl{build-dependencies} (for a package already in Debian)\\ Or \textttc{mk-build-deps -ir} (for a package not uploaded yet)
zh_CN: \textttc{apt-get build-dep mypackage}\\ 安装 \textsl{build-dependencies}（构建依赖库） (如果该包已经在Debian源内)\\ 或者 \textttc{mk-build-deps -ir} (如果该包还没被上传过)

note: type: itemize
en: \textttc{debuild}: build, test with \texttt{lintian}, sign with GPG
zh_CN: \textttc{debuild}: 使用 \texttt{lintian} 构建、测试，使用GPG签名

note: type: itemize
en: Also possible to call \textttc{dpkg-buildpackage} directly
zh_CN: 也可以直接调用 \textttc{dpkg-buildpackage}

note: type: itemize
en: Usually with \texttt{dpkg-buildpackage -us -uc}
zh_CN: 通常使用命令 \texttt{dpkg-buildpackage -us -uc}

note: type: itemize
en: It is better to build packages in a clean \& minimal environment
zh_CN: 尽可能在干净而精简的系统环境中构建软件包

note: type: itemize
en: \textttc{pbuilder} -- helper to build packages in a \textsl{chroot}\\ Good documentation: \url{https://wiki.ubuntu.com/PbuilderHowto}\\ (optimization: \textttc{cowbuilder} \textttc{ccache} \textttc{distcc})
zh_CN: \textttc{pbuilder} -- 在 \textsl{chroot}\\中构建软件包的助手 不错的说明文档：\url{https://wiki.ubuntu.com/PbuilderHowto}\\ (优化: \textttc{cowbuilder} \textttc{ccache} \textttc{distcc})

note: type: itemize
en: \textttc{schroot} and \textttc{sbuild}: used on the Debian build daemons\\ (not as simple as \texttt{pbuilder}, but allows LVM snapshots\\ see: \url{https://help.ubuntu.com/community/SbuildLVMHowto} )
zh_CN: \textttc{schroot} 和 \textttc{sbuild}: 用于Debian构建后台 \\ (不如 \texttt{pbuilder} 简单，但允许使用LVM快照 \\ 详见：\url{https://help.ubuntu.com/community/SbuildLVMHowto} )

note: type: itemize
en: Generates \texttt{.deb} files and a \texttt{.changes} file
zh_CN: 生成 \texttt{.deb} 文件和 \texttt{.changes} 文件

note: type: itemize
en: \texttt{.changes}: describes what was built; used to upload the package
zh_CN: \texttt{.changes}: 说明构建了哪些东西；上传软件包的时候用到

note: type: frame{#2}
en: Installing and testing packages
zh_CN: 安装和测试软件包

note: type: itemize
en: Install the package locally: \textttc{debi} (will use \texttt{.changes} to know what to install)
zh_CN: 在本机安装软件包: \textttc{debi} (查看 \texttt{.changes} 来 了解要安装哪些东西)

note: type: itemize
en: List the content of the package: \texttt{{\color{rouge}debc} ../mypackage<TAB>.changes}
zh_CN: 列出软件包内容：\texttt{{\color{rouge}debc} ../mypackage<标签>.changes}

note: type: itemize
en: Compare the package with a previous version:\\ \texttt{{\color{rouge}debdiff} ../mypackage\_1\_*.changes ../mypackage\_2\_*.changes}\\ or to compare the sources:\\ \texttt{{\color{rouge}debdiff} ../mypackage\_1\_*.dsc ../mypackage\_2\_*.dsc}\\
zh_CN: 与一版本的软件包进行对比：\\ \texttt{{\color{rouge}debdiff} ../mypackage\_1\_*.changes ../mypackage\_2\_*.changes}\\ 或者直接对比源代码\\ \texttt{{\color{rouge}debdiff} ../mypackage\_1\_*.dsc ../mypackage\_2\_*.dsc}\\

note: type: itemize
en: Check the package with \texttt{lintian} (static analyzer):\\ \texttt{{\color{rouge}lintian} ../mypackage<TAB>.changes}\\ \texttt{lintian -i}: gives more information about the errors \\ \texttt{lintian -EviIL +pedantic}: shows more problems
zh_CN: 用 \texttt{lintian} (静态检测工具)检查软件包:\\ \texttt{{\color{rouge}lintian} ../mypackage<标签>.changes}\\ \texttt{lintian -i}: 反馈更多错误信息 \\ \texttt{lintian -EviIL +pedantic}: 显示更多问题

note: type: itemize
en: Upload the package to Debian (\textttc{dput}) (needs configuration)
zh_CN: 把软件包上传到Debian (\textttc{dput}) (需要配置)

note: type: itemize
en: Manage a private Debian archive with \textttc{reprepro} or \textttc{aptly}\\ Documentation: \url{https://wiki.debian.org/HowToSetupADebianRepository}
zh_CN: 用 \textttc{reprepro} 或 \textttc{aptly} 管理个人Debian档案库\\ 说明文档: \url{https://wiki.debian.org/HowToSetupADebianRepository}

note: type: frame{#2}
en: Practical session 1: modifying the grep package
zh_CN: 实操练习环节1：修改grep软件包

note: type: enumerate
en: Go to \url{http://ftp.debian.org/debian/pool/main/g/grep/} and download version 2.12-2 of the package
zh_CN: 访问 \url{http://ftp.debian.org/debian/pool/main/g/grep/} 并下载 2.12-2版本的grep软件包

note: type: itemize
en: If the source package is not unpacked automatically, unpack it with \texttt{dpkg-source~-x~grep\_*.dsc}
zh_CN: 如果源码包没有自动解包，用 \texttt{dpkg-source~-x~grep\_*.dsc} 命令解包

note: type: enumerate
en: Look at the files in \texttt{debian/}.
zh_CN: 查看 \texttt{debian/} 目录下的文件。

note: type: itemize
en: How many binary packages are generated by this source package?
zh_CN: 此源码包生成了多少个程序文件包？

note: type: itemize
en: Which packaging helper does this package use?
zh_CN: 此软件包用了哪个打包助手？

note: type: itemize
en: Build the package
zh_CN: 构建软件包

note: type: enumerate
en: We are now going to modify the package. Add a changelog entry and increase the version number.
zh_CN: 现在我们要修改这个软件包。添加一条更新记录并且增加一位版本号。

note: type: enumerate
en: Now disable perl-regexp support (it is a \texttt{./configure} option)
zh_CN: 然后停用perl-regexp的支持（这是 \texttt{./configure} 里的一条选项）

note: type: enumerate
en: Rebuild the package
zh_CN: 重构软件包

note: type: enumerate
en: Compare the original and the new package with debdiff
zh_CN: 用debdiff对比原版和新版软件包的区别

note: type: enumerate
en: Install the newly built package
zh_CN: 安装新构建的软件包

note: type: section{#2}
en: Advanced packaging topics
zh_CN: 进阶打包知识

note: type: itemize
en: Copyright and license information for the source and the packaging
zh_CN: 源代码和打包的版权及证书信息

note: type: itemize
en: Traditionally written as a text file
zh_CN: 以前都是写成文本文件

note: type: itemize
en: New machine-readable format: {\small\url{https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/}}
zh_CN: 现在用的可被机器识别的格式: {\small\url{https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/}}

note: type: frame{#2}
en: Modifying the upstream source
zh_CN: 修改上游源代码

note: type: frame
en: Often needed:
zh_CN: 常用于：

note: type: itemize
en: Fix bugs or add customizations that are specific to Debian
zh_CN: 修复bug或添加Debian专属定制内容

note: type: itemize
en: Backport fixes from a newer upstream release
zh_CN: 从新的上游版本回注（backport）各种修复

note: type: frame
en: Several methods to do it:
zh_CN: 有几种方法

note: type: itemize
en: Modifying the files directly
zh_CN: 直接修改文件

note: type: itemize
en: Simple
zh_CN: 简单

note: type: itemize
en: But no way to track and document the changes
zh_CN: 但不能追踪和记录各种更新

note: type: itemize
en: Using patch systems
zh_CN: 使用补丁系统

note: type: itemize
en: Eases contributing your changes to upstream
zh_CN: 简化了将更新提交到上游源代码的操作

note: type: itemize
en: Helps sharing the fixes with derivatives
zh_CN: 与其他衍生系统分享你的修复内容

note: type: itemize
en: Gives more exposure to the changes\\ \url{http://patch-tracker.debian.org/} (down currently)
zh_CN: 让更多人知道你的更新\\ \url{http://patch-tracker.debian.org/} (暂不可用)

note: type: frame{#2}
en: Patch systems
zh_CN: 补丁系统

note: type: itemize
en: Principle: changes are stored as patches in \texttt{debian/patches/}
zh_CN: 原则：更新以补丁形式存储在 \texttt{debian/patches/}

note: type: itemize
en: Applied and unapplied during build
zh_CN: 在构建中实装或卸装

note: type: itemize
en: Past: several implementations -- \textsl{simple-patchsys} (\textsl{cdbs}), \textsl{dpatch}, \textbf{\textsl{quilt}}
zh_CN: 以前：几种实现方式—— \textsl{simple-patchsys} (\textsl{cdbs}), \textsl{dpatch}, \textbf{\textsl{quilt}}

note: type: itemize
en: Each supports two \texttt{debian/rules} targets:
zh_CN: 每一种都支持两个 \texttt{debian/rules} 目标参数：

note: type: itemize
en: \texttt{debian/rules patch}: apply all patches
zh_CN: \texttt{debian/rules patch}: 实装所有补丁

note: type: itemize
en: \texttt{debian/rules unpatch}: de-apply all patches
zh_CN: \texttt{debian/rules unpatch}: 卸装所有补丁

note: type: itemize
en: More documentation: \url{https://wiki.debian.org/debian/patches}
zh_CN: 更多说明文档：\url{https://wiki.debian.org/debian/patches}

note: type: textbf{#1}
en: New source package format with built-in patch system: 3.0 (quilt)
zh_CN: 包含内建补丁系统的新源码包格式：3.0（quilt）

note: type: itemize
en: Recommended solution
zh_CN: 推荐使用这个方案

note: type: itemize
en: You need to learn \textsl{quilt}\\ \url{https://perl-team.pages.debian.net/howto/quilt.html}
zh_CN: 你得先学用一下 \textsl{quilt}\\ \url{https://perl-team.pages.debian.net/howto/quilt.html}

note: type: itemize
en: Patch-system-agnostic tool in \texttt{devscripts}: \texttt{edit-patch}
zh_CN: 补丁工具在 \texttt{devscripts}: \texttt{edit-patch}

note: type: frame{#2}
en: Documentation of patches
zh_CN: 补丁说明文档

note: type: itemize
en: Standard headers at the beginning of the patch
zh_CN: 补丁开头要有标准的头标（header）

note: type: itemize
en: Documented in DEP-3 - Patch Tagging Guidelines\\ \url{http://dep.debian.net/deps/dep3/}
zh_CN: 说明文档在 DEP-3— 补丁标签引导\\ \url{http://dep.debian.net/deps/dep3/}

note: type: frame{#2}
en: Doing things during installation and removal
zh_CN: 安装或移除过程中的操作

note: type: itemize
en: Decompressing the package is sometimes not enough
zh_CN: 仅仅解压缩软件包通常是不够的

note: type: itemize
en: Create/remove system users, start/stop services, manage \textsl{alternatives}
zh_CN: 新建/移除系统用户，开始/停止服务，管理马甲命令（ \textsl{alternatives}）

note: type: itemize
en: Done in \textsl{maintainer scripts}\\ \texttt{preinst, postinst, prerm, postrm}
zh_CN: 用维护脚本（ \textsl{maintainer scripts}）完成\\ \texttt{preinst, postinst, prerm, postrm}

note: type: itemize
en: Snippets for common actions can be generated by debhelper
zh_CN: debhelper可以生成通用操作的重复脚本

note: type: itemize
en: Documentation:
zh_CN: 说明文档：

note: type: itemize
en: Debian Policy Manual, chapter 6\\ {\footnotesize \url{https://www.debian.org/doc/debian-policy/ch-maintainerscripts}}
zh_CN: Debian 政策说明, 第6章 \\ {\footnotesize \url{https://www.debian.org/doc/debian-policy/ch-maintainerscripts}}

note: type: itemize
en: Debian Developer's Reference, chapter 6.4\\ {\scriptsize \url{https://www.debian.org/doc/developers-reference/best-pkging-practices.html}}
zh_CN: Debian 开发者手册, 第6.4章 \\ {\scriptsize \url{https://www.debian.org/doc/developers-reference/best-pkging-practices.html}}

note: type: itemize
en: Prompting the user
zh_CN: 用户指引

note: type: itemize
en: Must be done with \textbf{debconf}
zh_CN: 需要用 \textbf{debconf} 做好用户指引

note: type: itemize
en: Documentation: \texttt{debconf-devel(7)} (\texttt{debconf-doc} package)
zh_CN: 说明文档: \texttt{debconf-devel(7)} (\texttt{debconf-doc} package)

note: type: frame{#2}
en: Monitoring upstream versions
zh_CN: 监测上游版本

note: type: itemize
en: Specify where to look in \texttt{debian/watch} (see \texttt{uscan(1)})
zh_CN: 在 \texttt{debian/watch} 文件中指定监测目标 (详见 \texttt{uscan(1)})

note: type: itemize
en: There are automated trackers of new upstream versions, that notify the maintainer on various dashboards including \url{https://tracker.debian.org/} and \url{https://udd.debian.org/dmd/}
zh_CN: 有网站会自动追踪上游软件的新版本， 且会通过控制台通知维护者，譬如 \url{https://tracker.debian.org/} 和 \url{https://udd.debian.org/dmd/}

note: type: itemize
en: \texttt{uscan}: run a manual check
zh_CN: \texttt{uscan}: 手动检查命令

note: type: itemize
en: \texttt{uupdate}: try to update your package to the latest upstream version
zh_CN: \texttt{uupdate}: 尝试将你的软件包更新到最新的上游版本

note: type: subsection{#2}
en: Packaging with a Version Control System (SVN, Git)
zh_CN: 用版本控制系统打包（SVN, Git）

note: type: frame{#2}
en: Packaging with a Version Control System
zh_CN: 用版本控制系统打包

note: type: itemize
en: Several tools to help manage branches and tags for your packaging work:\\ \texttt{svn-buildpackage}, \texttt{git-buildpackage}
zh_CN: 有些工具可以帮你在打包工作中管理分支版本（branch）和标签：\\ \texttt{svn-buildpackage}, \texttt{git-buildpackage}

note: type: itemize
en: Example: \texttt{git-buildpackage}
zh_CN: 例如：\texttt{git-buildpackage}

note: type: itemize
en: \texttt{upstream} branch to track upstream with \texttt{upstream/\textsl{version}} tags
zh_CN: \texttt{upstream} 分支会通过 \texttt{upstream/\textsl{version}} 标签追踪上游版本

note: type: itemize
en: \texttt{master} branch tracks the Debian package
zh_CN: \texttt{master} 分支用于追踪Debian软件包

note: type: itemize
en: \texttt{debian/\textsl{version}} tags for each upload
zh_CN: \texttt{debian/\textsl{version}} 标签用于每次上传

note: type: itemize
en: \texttt{pristine-tar} branch to be able to rebuild the upstream tarball
zh_CN: \texttt{pristine-tar} 分支用于重构上游压缩包

note: type: itemize
en: Doc: \url{http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.html}
zh_CN: 文档: \url{http://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.html}

note: type: itemize
en: \texttt{Vcs-*} fields in \texttt{debian/control} to locate the repository
zh_CN: \texttt{Vcs-*} \texttt{debian/control} 文件里用于定位软件仓库的代码块

note: type: itemize
en: VCS-agnostic interface: \texttt{debcheckout}, \texttt{debcommit}, \texttt{debrelease}\\
zh_CN: VCS-交互接口: \texttt{debcheckout}, \texttt{debcommit}, \texttt{debrelease}\\

note: type: itemize
en: \texttt{debcheckout grep} $\rightarrow$ checks out the source package from Git
zh_CN: \texttt{debcheckout grep} $\rightarrow$ 检查来自Git的源码包

note: type: frame{#2}
en: Backporting packages
zh_CN: 回注（Backport）软件包

note: type: itemize
en: Goal: use a newer version of a package on an older system\\ e.g. use \textsl{mutt} from Debian \textsl{unstable} on Debian \textsl{stable}
zh_CN: 目标：在老系统版本里使用新版软件包\\ 例如，在 Debian\textsl{stable} 分支使用 Debian \textsl{unstable} 分支的\textsl{mutt} 软件包

note: type: itemize
en: General idea:
zh_CN: 通用方法：

note: type: itemize
en: Take the source package from Debian unstable
zh_CN: 直接从 Debian unstable（开发）分支里照搬源码包

note: type: itemize
en: Modify it so that it builds and works fine on Debian stable
zh_CN: 修改并构建使之正常用于Debian stable（稳定）分支

note: type: itemize
en: Sometimes trivial (no changes needed)
zh_CN: 有时候没啥必要（不用改动代码）

note: type: itemize
en: Sometimes difficult
zh_CN: 有时候很麻烦

note: type: itemize
en: Sometimes impossible (many unavailable dependencies)
zh_CN: 有时候不可能（有很多不可用的依赖库）

note: type: itemize
en: Some backports are provided and supported by the Debian project\\ \url{http://backports.debian.org/}
zh_CN: 有些软件包回注是由以下这个Debian项目来提供和支持的 \\ \url{http://backports.debian.org/}

note: type: section{#2}
en: Maintaining packages in Debian
zh_CN: 维护Debian软件包

note: type: frame{#2}
en: Debian archive and suites
zh_CN: Debian档案库和分支

note: type: tikzpicture
en: \draw node[suite,prod] (sec) {security}; \draw node[suite,prod,right=of sec] (su) {stable-updates}; \draw node[suite,prod,right=of su] (st) {stable}; \draw node[suite,old,node distance=0.3cm,below=of st] (os) {oldstable}; \draw node[suite,veryold,node distance=0.3cm,below=of os] (ar) {archive.d.o}; \draw node[suite,prod,right=of st] (bp) {backports}; \draw node[suite,test] (spu) at ($(su) + (-0.6,2.5)$) {stable-proposed-updates}; \draw node[suite,internal] (sn) at ($(st) + (-1.8,1.4)$) {stable-new}; \draw node[suite,test,node distance=1.5cm,above=of st] (te) {testing}; \draw node[suite,devel,above=of te] (sid) {unstable}; \draw node[suite,devel] (exp) at ($(sid) + (2.5,0.5)$) {experimental}; \draw node[suite,devel] (tpu) at ($(te)!0.5!(sid) + (2.5,0)$) {testing-proposed-updates}; \draw node[people,above=of sid] (dd) {developer}; \draw node[people,node distance=3cm,left=of dd] (secteam) {security team}; \draw[arr,uploads,->] (dd) -- (sid); \draw[arr,uploads,->] (dd) -- (exp); \draw[arr,uploads,->,bend right=8] (dd) to (tpu); \draw[arr,uploads,->] (secteam) -- (sid); \draw[arr,uploads,->] (secteam) -- (sec); \draw[arr,uploads,->] (dd) to (spu); \draw[arr,uploads,->] plot [smooth, tension=0.75] coordinates { (dd.east) ($(exp.north east)+(0.1,0.1)$) ($(tpu.east)+(0.2,0)$)  ($(bp.north east) + (-0.4,0)$) }; \draw[arr,migrations,->] (tpu) -- (te); \draw[arr,migrations,->] (sid) -- (te); \draw[arr,migrations,->] (te) -- (st) node [midway,align=left,midway,right,font=\footnotesize] {stable\\ release}; \draw[arr,migrations,->] (sec) -- (sn); \draw[arr,migrations,->] (sn) to node [pos=0.2] (spulabel) {} (st); \draw node[font=\footnotesize,align=right] at ($(spulabel) + (-0.4,-0.45)$) {stable \\ point \\ release}; \draw[arr,migrations,->] (spu) to (sn); \draw[arr,migrations,->] (spu) -- (su); \draw[arr,migrations,->] (st) -- (os); \draw[arr,migrations,->] (os) -- (ar); \coordinate (legend) at (-2,-1); \draw[arr,uploads,->] (legend) -- ($(legend) + (0.7,0)$) node [right,legend] {package uploads}; \coordinate[node distance=1.1em,below=of legend] (legend2); \draw[arr,migrations,->] (legend2) -- ($(legend2) + (0.7,0)$) node [right,legend] {package migrations between suites}; \coordinate[node distance=1.5em,below=of legend2] (legend3); \draw node[right,suite,devel,legend] (ldev) at (legend3) {development}; \draw node[node distance=0.1cm,right=of ldev,suite,test,legend] (ltest) {test}; \draw node[node distance=0.1cm,right=of ltest,suite,internal,legend] (lint) {internal}; \draw node[node distance=0.1cm,right=of lint,suite,prod,legend] (lprod) {production}; \draw ($(legend.north west) + (-0.1,0.25)$) rectangle ($(lprod.south east) + (0.1,-0.1)$); \draw node[font=\bf,red!70!white,align=center] (tnext) at ($(te.east) + (2,-0.1)$) {preparation of \\ next release}; \draw node[font=\bf,green!70!black,align=center] (tsrm) at ($(sec.north east) + (1,1)$) {stable\\release\\management}; \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground}
zh_CN: \draw node[suite,prod] (sec) {security}; \draw node[suite,prod,right=of sec] (su) {stable-updates}; \draw node[suite,prod,right=of su] (st) {stable}; \draw node[suite,old,node distance=0.3cm,below=of st] (os) {oldstable}; \draw node[suite,veryold,node distance=0.3cm,below=of os] (ar) {archive.d.o}; \draw node[suite,prod,right=of st] (bp) {backports}; \draw node[suite,test] (spu) at ($(su) + (-0.6,2.5)$) {stable-proposed-updates}; \draw node[suite,internal] (sn) at ($(st) + (-1.8,1.4)$) {stable-new}; \draw node[suite,test,node distance=1.5cm,above=of st] (te) {testing}; \draw node[suite,devel,above=of te] (sid) {unstable}; \draw node[suite,devel] (exp) at ($(sid) + (2.5,0.5)$) {experimental}; \draw node[suite,devel] (tpu) at ($(te)!0.5!(sid) + (2.5,0)$) {testing-proposed-updates}; \draw node[people,above=of sid] (dd) {开发者}; \draw node[people,node distance=3cm,left=of dd] (secteam) {安全团队}; \draw[arr,uploads,->] (dd) -- (sid); \draw[arr,uploads,->] (dd) -- (exp); \draw[arr,uploads,->,bend right=8] (dd) to (tpu); \draw[arr,uploads,->] (secteam) -- (sid); \draw[arr,uploads,->] (secteam) -- (sec); \draw[arr,uploads,->] (dd) to (spu); \draw[arr,uploads,->] plot [smooth, tension=0.75] coordinates { (dd.east) ($(exp.north east)+(0.1,0.1)$) ($(tpu.east)+(0.2,0)$)  ($(bp.north east) + (-0.4,0)$) }; \draw[arr,migrations,->] (tpu) -- (te); \draw[arr,migrations,->] (sid) -- (te); \draw[arr,migrations,->] (te) -- (st) node [midway,align=left,midway,right,font=\footnotesize] {稳定版\\ 发行}; \draw[arr,migrations,->] (sec) -- (sn); \draw[arr,migrations,->] (sn) to node [pos=0.2] (spulabel) {} (st); \draw node[font=\footnotesize,align=right] at ($(spulabel) + (-0.4,-0.45)$) {稳定版 \\ 小数点 \\ 更新}; \draw[arr,migrations,->] (spu) to (sn); \draw[arr,migrations,->] (spu) -- (su); \draw[arr,migrations,->] (st) -- (os); \draw[arr,migrations,->] (os) -- (ar); \coordinate (legend) at (-2,-1); \draw[arr,uploads,->] (legend) -- ($(legend) + (0.7,0)$) node [right,legend] {软件包上传}; \coordinate[node distance=1.1em,below=of legend] (legend2); \draw[arr,migrations,->] (legend2) -- ($(legend2) + (0.7,0)$) node [right,legend] {软件包在不同分支间迁移}; \coordinate[node distance=1.5em,below=of legend2] (legend3); \draw node[right,suite,devel,legend] (ldev) at (legend3) {开发分支}; \draw node[node distance=0.1cm,right=of ldev,suite,test,legend] (ltest) {测试分支}; \draw node[node distance=0.1cm,right=of ltest,suite,internal,legend] (lint) {内部版本}; \draw node[node distance=0.1cm,right=of lint,suite,prod,legend] (lprod) {成品分支}; \draw ($(legend.north west) + (-0.1,0.25)$) rectangle ($(lprod.south east) + (0.1,-0.1)$); \draw node[font=\bf,red!70!white,align=center] (tnext) at ($(te.east) + (2,-0.1)$) {准备发行 \\ 下个版本}; \draw node[font=\bf,green!70!black,align=center] (tsrm) at ($(sec.north east) + (1,1)$) {稳定版\\发行\\管理}; \pgfdeclarelayer{background} \pgfdeclarelayer{foreground} \pgfsetlayers{background,main,foreground}

note: type: flushright
en: \tiny Based on graph by Antoine Beaupr\'e. \url{https://salsa.debian.org/debian/package-cycle}~~~~~~~~~~~~
zh_CN: \tiny 该图参考 Antoine Beaupr\'e 的图表绘制。\url{https://salsa.debian.org/debian/package-cycle}~~~~~~~~~~~~

note: type: frame{#2}
en: Suites for development
zh_CN: 开发分支

note: type: itemize
en: New versions of packages are uploaded to \textbf{unstable} (\textbf{sid})
zh_CN: 新的软件包版本一般都上传到 \textbf{unstable} (\textbf{sid}) 分支

note: type: itemize
en: Packages migrate from \textbf{unstable} to \textbf{testing} based on several criterias (e.g. has been in unstable for 10 days, and no regressions)
zh_CN: \textbf{unstable}（开发）分支中的软件在符合一定标准（例如在开发分支运行了10天且没有回滚过版本） 后会从 \textbf{unstable} 分支迁移到 \textbf{testing}（测试）分支

note: type: itemize
en: New packages can also be uploaded to:
zh_CN: 也可以把新软件包上传到

note: type: itemize
en: \textbf{experimental} (for more \textsl{experimental} packages, such as when the new version is not ready to replace the one currently in unstable)
zh_CN: \textbf{experimental}（实验）分支（用于某些\textsl{实验性} 的软件包， 如某个还没有确定将用于替换当前unstable分支版本的新版本）

note: type: itemize
en: \textbf{testing-proposed-updates}, to update the version in \textbf{testing} without going through \textbf{unstable} (this is rarely used)
zh_CN: \textbf{testing-proposed-updates}（用于测试的更新）分支, 不经过\textbf{unstable} 直接更新到 \textbf{testing} 分支（很少这么做）

note: type: frame{#2}
en: Freezing and releasing
zh_CN: 冻结和发行

note: type: itemize
en: At some point during the release cycle, the release team decides to \textsl{freeze} testing: automatic migrations from \textbf{unstable} to \textbf{testing} are stopped, and replaced by manual review
zh_CN: 在发行周期中的某个时间点，发行团队会 \textsl{freeze} （冻结）testing 分支: 停止软件在 \textbf{unstable} 和 \textbf{testing} 分支间的自动迁移，改为人工审核

note: type: itemize
en: When the release team considers \textbf{testing} to be ready for release:
zh_CN: 当发行团队认为\textbf{testing} 分支已经足够完善，可以对外发行时：

note: type: itemize
en: The \textbf{testing} suite becomes the new \textbf{stable} suite
zh_CN: \textbf{testing} 分支变为新的\textbf{stable} （稳定）分支

note: type: itemize
en: Similarly, the old \textbf{stable} becomes \textbf{oldstable}
zh_CN: 同时，原来的\textbf{stable}分支成为\textbf{oldstable}（旧稳定）分支

note: type: itemize
en: Unsupported releases are moved to \texttt{archive.debian.org}
zh_CN: 不再提供支持的发行版则归入 \texttt{archive.debian.org}

note: type: itemize
en: See \url{https://release.debian.org/}
zh_CN: 详见 \url{https://release.debian.org/}

note: type: frame{#2}
en: Stable release suites and management
zh_CN: 稳定版的分支和管理

note: type: itemize
en: Several suites are used to provide stable release packages:
zh_CN: 我们使用若干分支来发行稳定版软件包

note: type: itemize
en: \textbf{stable}: the main suite
zh_CN: \textbf{stable}: 主分支

note: type: itemize
en: \textbf{security} updates suite provided on \texttt{security.debian.org}, used by the security team. Updates are announced on the \texttt{debian-security-announce} mailing list
zh_CN: 安全团队在\texttt{security.debian.org} 网站提供\textbf{security} 分支更新， 同时也会向订阅 \texttt{debian-security-announce} 的邮件列表推送更新通知

note: type: itemize
en: \textbf{stable-updates}: updates that are not security related, but that should urgently be installed (without waiting for the next point release): antivirus databases, timezone-related packages, etc. Announced on the \texttt{debian-stable-announce} mailing list
zh_CN: \textbf{stable-updates}: 与安全无关但很紧急的更新（等不到下一次小数点更新）: 杀毒软件数据库，时区调整相关的软件包，等等。向订阅 \texttt{debian-stable-announce} 的邮件列表推送通知

note: type: itemize
en: \textbf{backports}: new upstream versions, based on the version in \textbf{testing}
zh_CN: \textbf{backports}: 从 \textbf{testing} 分支回注的新上游版本

note: type: itemize
en: The \textbf{stable} suite is updated every few months by \textsl{stable point releases} (that include only bug fixes)
zh_CN: \textbf{stable} 分支通常每几个月会进行一次 \textsl{stable point releases} （小数点更新）(一般就是修修bug)

note: type: itemize
en: Packages targetting the next stable point release are uploaded to \textbf{stable-proposed-updates} and reviewed by the release team
zh_CN: 随下一次小数点更新一起更新的软件包会被上传到 \textbf{stable-proposed-updates} 分支，并且由发行团队审核

note: type: itemize
en: The \textbf{oldstable} release has the same set of suites
zh_CN: \textbf{oldstable} 旧稳定版的分支系列保持不变

note: type: frame{#2}
en: Several ways to contribute to Debian
zh_CN: 几种为Debian做贡献的方式

note: type: itemize
en: \textbf{Worst} way to contribute:
zh_CN: \textbf{最糟糕的} 的贡献方式：

note: type: enumerate
en: Package your own application
zh_CN: 打包你自己的应用

note: type: enumerate
en: Get it into Debian
zh_CN: 放进Debian

note: type: enumerate
en: Disappear
zh_CN: 不管了

note: type: itemize
en: \textbf{Better} ways to contribute:
zh_CN: \textbf{更好的}贡献方式：

note: type: itemize
en: Get involved in packaging teams
zh_CN: 加入打包团队

note: type: itemize
en: Many teams that focus on set of packages, and need help
zh_CN: 许多专注于打包的团队需要人手

note: type: itemize
en: List available at \url{https://wiki.debian.org/Teams}
zh_CN: 团队列表 \url{https://wiki.debian.org/Teams}

note: type: itemize
en: An excellent way to learn from more experienced contributors
zh_CN: 这也是向高手们请教学习的绝佳途径

note: type: itemize
en: Adopt existing unmaintained packages (\textsl{orphaned packages})
zh_CN: 认领现有的未维护软件包（\textsl{orphaned packages} 遗弃软件包）

note: type: itemize
en: Bring new software to Debian
zh_CN: 为Debian提供新软件

note: type: itemize
en: Only if it's interesting/useful enough, please
zh_CN: 请务必只提供足够有趣/有用的软件，拜托

note: type: itemize
en: Are there alternatives already packaged in Debian?
zh_CN: 注意是不是已经有类似软件被打包上传过了？

note: type: frame{#2}
en: Adopting orphaned packages
zh_CN: 认领遗弃软件包

note: type: itemize
en: Many unmaintained packages in Debian
zh_CN: Debian里有很多未维护软件包

note: type: itemize
en: Full list + process: \url{https://www.debian.org/devel/wnpp/}
zh_CN: 详细的列表+当前状态：\url{https://www.debian.org/devel/wnpp/}

note: type: itemize
en: Installed on your machine: \texttt{wnpp-alert}\\ Or better: \texttt{how-can-i-help}
zh_CN: 你可以在自己系统里安装这两个包来查看： \texttt{wnpp-alert}\\ 或 \texttt{how-can-i-help}

note: type: itemize
en: Different states:
zh_CN: 不同的软件包状态

note: type: itemize
en: \textbf{O}rphaned: the package is unmaintained\\ Feel free to adopt it
zh_CN: \textbf{O}rphaned: 遗弃：该软件包无人维护\\ 可以直接认领

note: type: itemize
en: \textbf{RFA}: \textbf{R}equest \textbf{F}or \textbf{A}dopter\\ Maintainer looking for adopter, but continues work in the meantime\\ Feel free to adopt it. A mail to the current maintainer is polite
zh_CN: \textbf{RFA}: \textbf{R}equest \textbf{F}or \textbf{A}dopter 求认领\\ 现维护者正在找人接盘，有人接盘前会继续维护。\\ 可以直接认领，记得认领前给现维护者写一封邮件告知

note: type: itemize
en: \textbf{ITA}: \textbf{I}ntent \textbf{T}o \textbf{A}dopt\\ Someone intends to adopt the package\\ You could propose your help!
zh_CN: \textbf{ITA}: \textbf{I}ntent \textbf{T}o \textbf{A}dopt 打算认领\\ 有人想要认领某软件包\\ 你可以去帮他!

note: type: itemize
en: \textbf{RFH}: \textbf{R}equest \textbf{F}or \textbf{H}elp\\ The maintainer is looking for help
zh_CN: \textbf{RFH}: \textbf{R}equest \textbf{F}or \textbf{H}elp 求帮忙\\ 维护者想要找人一起维护

note: type: itemize
en: Some unmaintained packages not detected \arr not orphaned yet
zh_CN: 有一些未维护软件包还没有被检测到 \arr 尚未被遗弃

note: type: itemize
en: When in doubt, ask \texttt{debian-qa@lists.debian.org} \\ or \texttt{\#debian-qa} on \texttt{irc.debian.org}
zh_CN: 如果你不确定, 可以询问 \texttt{debian-qa@lists.debian.org} \\ 或 \texttt{irc.debian.org} 的\texttt{\#debian-qa} 频道

note: type: frame{#2}
en: Adopting a package: example
zh_CN: 认领软件包：范例

note: type: itemize
en: Polite to contact the previous maintainer (especially if the package was RFAed, not orphaned)
zh_CN: 记得联系一下上任维护者（特别是该软件包处于RFA状态而不是遗弃状态时），这是礼貌

note: type: itemize
en: Very good idea to contact the upstream project
zh_CN: 最好也能联系一下上游开发者

note: type: frame{#2}
en: Getting your package in Debian
zh_CN: 把你的软件包放进Debian

note: type: itemize
en: You do not need any official status to get your package into Debian
zh_CN: 你不需要获得任何官方身份就能直接上传你的软件包到Debian

note: type: enumerate
en: Submit an \textbf{ITP} bug (\textbf{I}ntent \textbf{T}o \textbf{P}ackage) using \texttt{reportbug wnpp}
zh_CN: 用 \texttt{reportbug wnpp} 来提交 \textbf{ITP} (\textbf{I}ntent \textbf{T}o \textbf{P}ackage 有意向打包) 的bug

note: type: enumerate
en: Prepare a source package
zh_CN: 准备好源码包

note: type: enumerate
en: Find a Debian Developer that will sponsor your package
zh_CN: 找一个肯帮你上传软件包的Debian Developer（DD—Debian开发者）

note: type: itemize
en: Official status (when you are an experienced package maintainer):
zh_CN: 官方身份（如果你已经是一个熟练的软件包维护者）：

note: type: itemize
en: \textbf{Debian Maintainer (DM):}\\ Permission to upload your own packages\\ See \url{https://wiki.debian.org/DebianMaintainer}
zh_CN: \textbf{Debian Maintainer (DM——Debian维护者):}\\ 有权上传你自己的 软件包\\ 详见 \url{https://wiki.debian.org/DebianMaintainer}

note: type: itemize
en: \textbf{Debian Developer (DD):}\\ Debian project member; can vote and upload any package
zh_CN: \textbf{Debian Developer (DD——Debian开发者):}\\ Debian 项目成员；有权投票或上传任何软件包

note: type: frame{#2}
en: Things to check before asking for sponsorship
zh_CN: 在找人上传前你需要检查的事项

note: type: itemize
en: Debian puts \textbf{a lot of focus on quality}
zh_CN: Debian \textbf{极重视软件质量}

note: type: itemize
en: Generally, \textbf{sponsors are hard to find and busy}
zh_CN: 通常，\textbf{维护者们都非常忙}

note: type: itemize
en: Make sure your package is ready before asking for sponsorship
zh_CN: 在找人上传前务必确保你的软件包已经准备妥当

note: type: itemize
en: Things to check:
zh_CN: 要检查的事项：

note: type: itemize
en: Avoid missing build-dependencies: make sure that your package build fine in a clean \textsl{sid} \textsl{chroot}
zh_CN: 不要遗漏构建依赖库： 确保你的软件包是在干净的 \textsl{sid} \textsl{chroot} 环境里构建的

note: type: itemize
en: Using \texttt{pbuilder} is recommended
zh_CN: 推荐使用 \texttt{pbuilder}

note: type: itemize
en: Run \texttt{lintian -EviIL +pedantic} on your package
zh_CN: 为你的软件包运行一下 \texttt{lintian -EviIL +pedantic}

note: type: itemize
en: Errors must be fixed, all other problems should be fixed
zh_CN: 修复Error错误和各种其他问题

note: type: itemize
en: Do extensive testing of your package, of course
zh_CN: 当然还要做好各种延申测试

note: type: itemize
en: In doubt, ask for help
zh_CN: 有问题就求助

note: type: frame{#2}
en: Where to find help?
zh_CN: 哪里可以求助？

note: type: frame
en: Help you will need:
zh_CN: 你可能需要的帮助：

note: type: itemize
en: Advice and answers to your questions, code reviews
zh_CN: 针对你的疑问给出建议和解答，以及代码审核

note: type: itemize
en: Sponsorship for your uploads, once your package is ready
zh_CN: 在你准备好软件包后替你上传

note: type: frame
en: You can get help from:
zh_CN: 你可以通过以下方式求助：

note: type: textbf{#1}
en: Other members of a packaging team
zh_CN: 各打包团队的成员

note: type: itemize
en: List of teams: \url{https://wiki.debian.org/Teams}
zh_CN: 打包团队列表：\url{https://wiki.debian.org/Teams}

note: type: itemize
en: The \textbf{Debian Mentors group} (if your package does not fit in a team)
zh_CN: \textbf{Debian 导师组}（如果你的软件包没有团队接）

note: type: itemize
en: Mailing list: \url{debian-mentors@lists.debian.org}\\ {\small (also a good way to learn by accident)}
zh_CN: 邮件列表：\url{debian-mentors@lists.debian.org}\\ {\small (正好也是个学习的好途径)}

note: type: itemize
en: IRC: \texttt{\#debian-mentors} on \texttt{irc.debian.org}
zh_CN: IRC聊天: \texttt{irc.debian.org} 上的\texttt{\#debian-mentors} 频道

note: type: itemize
en: Documentation: \url{http://mentors.debian.net/intro-maintainers}
zh_CN: 说明文档：\url{http://mentors.debian.net/intro-maintainers}

note: type: itemize
en: \textbf{Localized mailing lists} (get help in your language)
zh_CN: \textbf{本地化团队邮件列表} (以你的母语求助)

note: type: itemize
en: Full list: \url{https://lists.debian.org/devel.html}
zh_CN: 完整列表：\url{https://lists.debian.org/devel.html}

note: type: itemize
en: Or users lists: \url{https://lists.debian.org/users.html}
zh_CN: 或者用户列表：\url{https://lists.debian.org/users.html}

note: type: frame{#2}
en: More documentation
zh_CN: 更多说明文档

note: type: itemize
en: Debian Developers' Corner\\ \url{https://www.debian.org/devel/}\\ {\small Links to many resources about Debian development}
zh_CN: Debian 开发者圈子\\ \url{https://www.debian.org/devel/}\\ {\small 很多Debian开发方面的资源链接}

note: type: itemize
en: Guide for Debian Maintainers\\ \url{https://www.debian.org/doc/manuals/debmake-doc/}
zh_CN: Debian维护者指南\\ \url{https://www.debian.org/doc/manuals/debmake-doc/}

note: type: itemize
en: Debian Developer's Reference\\ \url{https://www.debian.org/doc/developers-reference/}\\ {\small Mostly about Debian procedures, but also some best packaging practices (part 6)}
zh_CN: Debian 开发者手册\\ \url{https://www.debian.org/doc/developers-reference/}\\ {\small 主要内容是关于Debian自身发展，但也有一些极好的打包实操 (part 6)}

note: type: itemize
en: Debian Policy\\ \url{https://www.debian.org/doc/debian-policy/}\\
zh_CN: Debian 政策\\ \url{https://www.debian.org/doc/debian-policy/}\\

note: type: itemize
en: {\small \begin{itemize} \item \small All the requirements that every package must satisfy \item \small Specific policies for Perl, Java, Python, \ldots \end{itemize}}
zh_CN: {\small \begin{itemize} \item \small 这是每个软件包都必须达到的硬性要求 \item \small 针对Perl，Java，Python，\ldots 都有专用条款 \end{itemize}}

note: type: itemize
en: Ubuntu Packaging Guide\\ \url{https://packaging.ubuntu.com/html/}
zh_CN: Ubuntu 打包指南\\ \url{https://packaging.ubuntu.com/html/}

note: type: frame{#2}
en: Debian dashboards for maintainers
zh_CN: Debian 维护者查询面板

note: type: itemize
en: \textbf{Source package centric}:\\ \url{https://tracker.debian.org/dpkg}
zh_CN: \textbf{源码包中心}:\\ \url{https://tracker.debian.org/dpkg}

note: type: itemize
en: \textbf{Maintainer/team centric}: Developer's Packages Overview (DDPO)\\ \url{https://qa.debian.org/developer.php?login=pkg-ruby-extras-maintainers@lists.alioth.debian.org}
zh_CN: \textbf{维护者/团队中心：}: Developer's Packages Overview (DDPO——开发者软件包概览)\\ \url{https://qa.debian.org/developer.php?login=pkg-ruby-extras-maintainers@lists.alioth.debian.org}

note: type: itemize
en: \textbf{TODO-list oriented}: Debian Maintainer Dashboard (DMD)\\ \url{https://udd.debian.org/dmd/}
zh_CN: \textbf{待办事项表：}: Debian Maintainer Dashboard (DMD——Debian维护者查询面板)\\ \url{https://udd.debian.org/dmd/}

note: type: frame{#2}
en: Using the Debian Bug Tracking System (BTS)
zh_CN: 使用Debian Bgu追踪系统（BTS）

note: type: itemize
en: A quite unique way to manage bugs
zh_CN: 非常独特的bug管理方式

note: type: itemize
en: Web interface to view bugs
zh_CN: 用web接口查看bug

note: type: itemize
en: Email interface to make changes to bugs
zh_CN: 用Email接口更新bug

note: type: itemize
en: Adding information to bugs:
zh_CN: 给bug添加相关信息：

note: type: itemize
en: Write to \texttt{123456@bugs.debian.org} (does not include the submitter, you need to add \texttt{123456-submitter@bugs.debian.org})
zh_CN: 发邮件给 \texttt{123456@bugs.debian.org} (不包括bug提交者，你得手动抄送给 \texttt{123456-submitter@bugs.debian.org})

note: type: itemize
en: Changing bug status:
zh_CN: 更新bug状态：

note: type: itemize
en: Send commands to \texttt{control@bugs.debian.org}
zh_CN: 给 \texttt{control@bugs.debian.org} 发邮件

note: type: itemize
en: Command-line interface: \texttt{bts} command in \texttt{devscripts}
zh_CN: 命令行接口：在\texttt{devscripts} 里用\texttt{bts}命令

note: type: itemize
en: Documentation: \url{https://www.debian.org/Bugs/server-control}
zh_CN: 说明文档：\url{https://www.debian.org/Bugs/server-control}

note: type: itemize
en: Reporting bugs: use \texttt{reportbug}
zh_CN: 报告bug：用 \texttt{reportbug}

note: type: itemize
en: Normally used with a local mail server: install \texttt{ssmtp} or \texttt{nullmailer}
zh_CN: 一般使用本地邮件服务器：安装 \texttt{ssmtp} 或者 \texttt{nullmailer}

note: type: itemize
en: Or use \texttt{reportbug -\@-template}, then send (manually) to \texttt{submit@bugs.debian.org}
zh_CN: 或者用 \texttt{reportbug -\@-template}, 然后 (手动) 发给 \texttt{submit@bugs.debian.org}

note: type: frame{#2}
en: Using the BTS: examples
zh_CN: 使用BTS（bug追踪系统）：范例

note: type: itemize
en: Sending an email to the bug and the submitter:\\ \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680822\#10}
zh_CN: 发邮件给bug和提交者：\\ \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680822\#10}

note: type: itemize
en: Tagging and changing the severity:\\ \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680227\#10}
zh_CN: 更改标签和更新严重程度：\\ \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680227\#10}

note: type: itemize
en: Reassigning, changing the severity, retitling \ldots: \\ \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680822\#93}
zh_CN: 分配任务，更新严重度，重命名 \ldots: \\ \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=680822\#93}

note: type: itemize
en: \texttt{notfound}, \texttt{found}, \texttt{notfixed}, \texttt{fixed} are for \textbf{version-tracking} \\ See \url{https://wiki.debian.org/HowtoUseBTS\#Version\_tracking}
zh_CN: \texttt{notfound}, \texttt{found}, \texttt{notfixed}, \texttt{fixed} 是给\textbf{version-tracking}（版本追踪）提供的标签\\ 详见 \url{https://wiki.debian.org/HowtoUseBTS\#Version\_tracking}

note: type: itemize
en: Using usertags: \url{https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=42;bug=642267}\\ See \url{https://wiki.debian.org/bugs.debian.org/usertags}
zh_CN: 使用用户标签：\url{https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=42;bug=642267}\\ 详见 \url{https://wiki.debian.org/bugs.debian.org/usertags}

note: type: itemize
en: BTS Documentation:
zh_CN: BTS说明文档：

note: type: frame{#2}
en: More interested in Ubuntu?
zh_CN: 对Ubuntu更感兴趣？

note: type: itemize
en: Ubuntu mainly manages the divergence with Debian
zh_CN: Ubuntu主要管理与Debian的差异部分

note: type: itemize
en: No real focus on specific packages\\ Instead, collaboration with Debian teams
zh_CN: Ubuntu并不关注特定的软件包，\\ 而是与Debian团队合作

note: type: itemize
en: Usually recommend uploading new packages to Debian first\\ \url{https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages}
zh_CN: 通常情况下，推荐将新软件包先上传到Debian\\ \url{https://wiki.ubuntu.com/UbuntuDevelopment/NewPackages}

note: type: itemize
en: Possibly a better plan:
zh_CN: 还有个更好的方案：

note: type: itemize
en: Get involved in a Debian team and act as a bridge with Ubuntu
zh_CN: 加入Debian团队然后负责与Ubuntu沟通

note: type: itemize
en: Help reduce divergence, triage bugs in Launchpad
zh_CN: 协助降低两者差异性，收集整理Launchpad里的bug

note: type: itemize
en: Many Debian tools can help:
zh_CN: 用好Debian的多种工具：

note: type: itemize
en: Ubuntu column on the Developer's packages overview
zh_CN: 开发者软件包概览（Developer’s packages overview)里的Ubuntu部分

note: type: itemize
en: Ubuntu box on the Package Tracking System
zh_CN: 软件包追踪系统(Package Tracking System)里的Ubuntu内容

note: type: itemize
en: Receive launchpad bugmail via the PTS
zh_CN: 通过PTS收取launchpad的bugmail邮件

note: type: frame{#2}
en: Conclusions
zh_CN: 结论

note: type: itemize
en: You now have a full overview of Debian packaging
zh_CN: 虽然你已经对Debian打包有了一个完整的大致印象

note: type: itemize
en: But you will need to read more documentation
zh_CN: 但你还需要阅读更多说明文档

note: type: itemize
en: Best practices have evolved over the years
zh_CN: 最好的打包实操方法经过了多年的优化

note: type: itemize
en: If not sure, use the \textbf{dh} packaging helper, and the \textbf{3.0 (quilt)} format
zh_CN: 如果不确定，就用\textbf{dh} 打包助手，以及\textbf{3.0 (quilt)}格式

note: type: centerline{#1}
en: \large Feedback: \textbf{packaging-tutorial@packages.debian.org}
zh_CN: \large 反馈： \textbf{packaging-tutorial@packages.debian.org}

note: type: frame{#2}
en: Legal stuff
zh_CN: 合规信息

note: type: frame
en: Copyright \copyright 2011--2019 Lucas Nussbaum -- lucas@debian.org
zh_CN: 版权所有 \copyright 2011--2019 Lucas Nussbaum -- lucas@debian.org

note: type: frame
en: {\small \textbf{This document is free software}: you can redistribute it and/or modify it under either (at your option): \hbr \begin{itemize} \item The terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.\\ \url{http://www.gnu.org/licenses/gpl.html} \br \item The terms of the Creative Commons Attribution-ShareAlike 3.0 Unported License.\\ \url{http://creativecommons.org/licenses/by-sa/3.0/} \end{itemize} }
zh_CN: {\small \textbf{该文档为自由软件}: 你可以随意传播/修改(以你自己的观点): \hbr \begin{itemize} \item GNU General Public License（GPL——GNU通用公共证书）条款， 由Free Software Foundation出版，在第三版或更新的后续版本中都有。\\ \url{http://www.gnu.org/licenses/gpl.html} \br \item Creative Commons Attribution-ShareAlike 3.0 未发布证书条款。\\ \url{http://creativecommons.org/licenses/by-sa/3.0/} \end{itemize} }

note: type: frame{#2}
en: Contribute to this tutorial
zh_CN: 为该教程做出贡献

note: type: itemize
en: Contribute:
zh_CN: 贡献方式：

note: type: itemize
en: {\small Open bugs: \url{bugs.debian.org/src:packaging-tutorial}}
zh_CN: {\small 已知bugs: \url{bugs.debian.org/src:packaging-tutorial}}

note: type: itemize
en: Provide feedback:
zh_CN: 提供反馈：

note: type: itemize
en: {\small What should be added to this tutorial?}
zh_CN: {\small 还需要在教程里添加哪些内容？}

note: type: itemize
en: {\small What should be improved?}
zh_CN: {\small 还有哪些内容需要优化？}

note: type: section{#2}
en: Additional practical sessions
zh_CN: 更多实操练习环节

note: type: frame{#2}
en: Practical session 2: packaging GNUjump
zh_CN: 实操练习环节2：打包GNUjump

note: type: enumerate
en: Download GNUjump 1.0.8 from \url{http://ftp.gnu.org/gnu/gnujump/gnujump-1.0.8.tar.gz}
zh_CN: 下载GNUjump 1.0.8 \url{http://ftp.gnu.org/gnu/gnujump/gnujump-1.0.8.tar.gz}

note: type: enumerate
en: Create a Debian package for it
zh_CN: 创建Debian软件包

note: type: itemize
en: Install build-dependencies so that you can build the package
zh_CN: 安装构建依赖库，用于构建软件包

note: type: itemize
en: Fix bugs
zh_CN: 修复bug

note: type: itemize
en: Get a basic working package
zh_CN: 获得基础工作包

note: type: itemize
en: Finish filling \texttt{debian/control} and other files
zh_CN: 填写\texttt{debian/control}和其他文件

note: type: enumerate
en: Enjoy
zh_CN: 开搞

note: type: frame{#2}
en: Practical session 2: packaging GNUjump (tips)
zh_CN: 实操练习环节2：打包GNUjump（提示）

note: type: itemize
en: To get a basic working package, use \texttt{dh\_make}
zh_CN: 要获得基础工作包，使用\texttt{dh\_make}

note: type: itemize
en: To start with, creating a \textsl{1.0} source package is easier than \textsl{3.0 (quilt)} (change that in \texttt{debian/source/format})
zh_CN: 刚上手的话，可以先建一个\textsl{1.0} 格式的源码包，比\textsl{3.0 (quilt)} 简单一点（在\texttt{debian/source/format}里修改格式）

note: type: itemize
en: To search for missing build-dependencies, find a missing file, and use \texttt{apt-file} to find the missing package
zh_CN: 要搜索缺失的构建依赖库，可以找到缺失文件，使用 \texttt{apt-file} 来查找缺失软件包

note: type: itemize
en: If you encounter that error:
zh_CN: 如果你遇到错误：

note: type: itemize
en: You need to add \texttt{-lm} to the linker command line:\\ Edit \texttt{src/Makefile.am} and replace
zh_CN: 你需要在关联命令行后加上 \texttt{-lm} ：\\ 编辑 \texttt{src/Makefile.am} 并将

note: type: itemize
en: by
zh_CN: 替换为以下内容

note: type: itemize
en: Then run \texttt{autoreconf -i}
zh_CN: 然后运行 \texttt{autoreconf -i}

note: type: frame{#2}
en: Practical session 3: packaging a Java library
zh_CN: 实操练习环节3：打包Java库

note: type: enumerate
en: Take a quick look at some documentation about Java packaging:\\
zh_CN:  快速浏览以下打包Java的说明文档：

note: type: enumerate
en: Download IRClib from \url{http://moepii.sourceforge.net/}
zh_CN: 从\url{http://moepii.sourceforge.net/} 下载IRClib

note: type: enumerate
en: Package it
zh_CN: 打包

note: type: frame{#2}
en: Practical session 4: packaging a Ruby gem
zh_CN: 实操练习环节4：打包Ruby库（Gem）

note: type: enumerate
en: Take a quick look at some documentation about Ruby packaging:\\
zh_CN: 快速浏览以下打包Ruby的说明文档：\\

note: type: itemize
en: \texttt{gem2deb(1)}, \texttt{dh\_ruby(1)} (in the \texttt{gem2deb} package)
zh_CN: \texttt{gem2deb(1)}, \texttt{dh\_ruby(1)} (在\texttt{gem2deb} 软件包里)

note: type: enumerate
en: Create a basic Debian source package from the \texttt{peach} gem:\\ \texttt{gem2deb peach}
zh_CN: 将\texttt{peach} 库创建成基础Debian源码包：\\ \texttt{gem2deb peach}

note: type: enumerate
en: Improve it so that it becomes a proper Debian package
zh_CN: 把它优化成合格的Debian软件包

note: type: frame{#2}
en: Practical session 5: packaging a Perl module
zh_CN: 实操练习环节5：打包Perl模组

note: type: enumerate
en: Take a quick look at some documentation about Perl packaging:\\
zh_CN: 快速浏览以下打包Perl的说明文档：

note: type: itemize
en: \texttt{dh-make-perl(1)}, \texttt{dpt(1)} (in the \texttt{pkg-perl-tools} package)
zh_CN: \texttt{dh-make-perl(1)}, \texttt{dpt(1)} (在\texttt{pkg-perl-tools} 软件包里)

note: type: enumerate
en: Create a basic Debian source package from the \texttt{Acme} CPAN distribution:\\ \verb|dh-make-perl --cpan Acme|
zh_CN: 将 \texttt{Acme} 的CPAN发行版创建成基础Debian源码包：\\ \verb|dh-make-perl --cpan Acme|

note: type: section{#2}
en: Answers to practical sessions
zh_CN: 实操练习环节解答

note: type: center
en: \LARGE Answers to
zh_CN: 解答

note: type: center
en: [0.5em] practical sessions
zh_CN: [0.5em] 实操练习环节

note: type: frame{#2}
en: Fetching the source
zh_CN: 获取源代码

note: type: itemize
en: Use dget to download the \texttt{.dsc} file:\\ {\small \texttt{dget http://cdn.debian.net/debian/pool/main/g/grep/grep\_2.12-2.dsc}}
zh_CN: 用dget命令下载\texttt{.dsc} 文件：\\ {\small \texttt{dget http://cdn.debian.net/debian/pool/main/g/grep/grep\_2.12-2.dsc}}

note: type: itemize
en: If you have \texttt{deb-src} for a Debian release that has \texttt{grep} version 2.12-2 (find out on \url{https://tracker.debian.org/grep}), you can use: \texttt{apt-get source grep=2.12-2}\\ or \texttt{apt-get source grep/release} (e.g. \texttt{grep/stable})\\ or, if you feel lucky: \texttt{apt-get source grep}
zh_CN: 如果你的Debian版本里的 \texttt{deb-src} 有2.12-2版的 \texttt{grep} (可以在 \url{https://tracker.debian.org/grep} 查询)，你可以：\texttt{apt-get source grep=2.12-2}\\ 或 \texttt{apt-get source grep/release} (例如\texttt{grep/stable})\\ 或者，干脆直接：\texttt{apt-get source grep}

note: type: itemize
en: The \texttt{grep} source package is composed of three files:
zh_CN: \texttt{grep}源码包由以下三个文件构成

note: type: itemize
en: This is typical of the "3.0 (quilt)" format.
zh_CN: 这是典型的"3.0 (quilt)"格式。

note: type: itemize
en: If needed, uncompress the source with\\ \texttt{dpkg-source -x grep\_2.12-2.dsc}
zh_CN: 如果有需要可以解压缩源码文件\\ \texttt{dpkg-source -x grep\_2.12-2.dsc}

note: type: frame{#2}
en: Looking around and building the package
zh_CN: 查看一下各个文件，然后构建软件包

note: type: enumerate
en: Look at the files in \texttt{debian/}
zh_CN: 查看\texttt{debian/} 下的文件

note: type: itemize
en: According to \texttt{debian/control}, this package only generates one binary package, named \texttt{grep}.
zh_CN: 根据\texttt{debian/control}，该源码包只生成了一个程序文件包，名为 \texttt{grep}.

note: type: itemize
en: According to \texttt{debian/rules}, this package is typical of \textsl{classic} debhelper packaging, without using \textsl{CDBS} or \textsl{dh}. One can see the various calls to \texttt{dh\_*} commands in \texttt{debian/rules}.
zh_CN: 根据\texttt{debian/rules}， 该软件包用\textsl{经典} debhelper 打包，而没有用\textsl{CDBS} 或 \textsl{dh}。可以发现在\texttt{debian/rules} 里调用了大量\texttt{dh\_*}命令。

note: type: itemize
en: Use \texttt{apt-get build-dep grep} to fetch the build-dependencies
zh_CN: 先用\texttt{apt-get build-dep grep} 命令获取构建依赖库

note: type: itemize
en: Then \texttt{debuild} or \texttt{dpkg-buildpackage -us -uc} (Takes about 1 min)
zh_CN: 再用 \texttt{debuild} 或 \texttt{dpkg-buildpackage -us -uc}命令（耗时约1 分钟）

note: type: frame{#2}
en: Editing the changelog
zh_CN: 编辑更新日志

note: type: itemize
en: \texttt{debian/changelog} is a text file. You could edit it and add a new entry manually.
zh_CN: \texttt{debian/changelog} 是个文本文件。你可以手动编辑并添加条目。

note: type: itemize
en: Or you can use \texttt{dch -i}, which will add an entry and open the editor
zh_CN:  或者你也可以用\texttt{dch -i}来添加条目并打开编辑器

note: type: itemize
en: The name and email can be defined using the \texttt{DEBFULLNAME} and \texttt{DEBEMAIL} environment variables
zh_CN: 姓名和邮件可以通过环境变量 \texttt{DEBFULLNAME} 和 \texttt{DEBEMAIL} 来定义

note: type: itemize
en: After that, rebuild the package: a new version of the package is built
zh_CN: 做完这些再重构一下软件包：这样新版本的软件包就构建好了

note: type: itemize
en: Package versioning is detailed in section 5.6.12 of the Debian policy\\ \url{https://www.debian.org/doc/debian-policy/ch-controlfields}
zh_CN: 软件包的版本号使用规则在Debian政策 5.6.12章节有详细阐述。\\ \url{https://www.debian.org/doc/debian-policy/ch-controlfields}

note: type: frame{#2}
en: Disabling Perl regexp support and rebuilding
zh_CN: 停用Perl regexp支持并重构

note: type: itemize
en: Check with \texttt{./configure -{}-help}: the option to disable Perl regexp is \texttt{-{}-disable-perl-regexp}
zh_CN: 用\texttt{./configure -{}-help}命令查看: 停用Perl regexp的选项是 \texttt{-{}-disable-perl-regexp}

note: type: itemize
en: Edit \texttt{debian/rules} and find the \texttt{./configure} line
zh_CN: 编辑 \texttt{debian/rules}文件，找到\texttt{./configure} 所在行

note: type: itemize
en: Add \texttt{-{}-disable-perl-regexp}
zh_CN: 在命令后添加\texttt{-{}-disable-perl-regexp}

note: type: itemize
en: Rebuild with \texttt{debuild} or \texttt{dpkg-buildpackage -us -uc}
zh_CN: 用\texttt{debuild} 或 \texttt{dpkg-buildpackage -us -uc} 命令重构

note: type: frame{#2}
en: Comparing and testing the packages
zh_CN: 对比和测试软件包

note: type: itemize
en: Compare the binary packages: \texttt{debdiff ../*changes}
zh_CN: 对比程序文件包：\texttt{debdiff ../*changes}

note: type: itemize
en: Compare the source packages: \texttt{debdiff ../*dsc}
zh_CN: 对比源码包：\texttt{debdiff ../*dsc}

note: type: itemize
en: Install the newly built package: \texttt{debi}\\ Or \texttt{dpkg -i ../grep\_<TAB>}
zh_CN: 安装新构建的软件包: \texttt{debi}\\ 或 \texttt{dpkg -i ../grep\_<TAB>}

note: type: itemize
en: \texttt{grep -P foo} no longer works!
zh_CN: \texttt{grep -P foo} 已经失效！

note: type: frame
en: Reinstall the previous version of the package:
zh_CN: 重装上一版本的软件包：

note: type: itemize
en: \texttt{apt-get install -{}-reinstall grep=2.6.3-3} \textit{(= previous version)}
zh_CN: \texttt{apt-get install -{}-reinstall grep=2.6.3-3} \textit{(= 上个版本)}

note: type: frame{#2}
en: Step by step\ldots
zh_CN: 具体步骤\ldots

note: type: itemize
en: Type of package: single binary (for now)
zh_CN: 当前软件包类型：单程序文件（暂时）

note: type: frame{#2}
en: Step by step\ldots (2)
zh_CN: 具体步骤\ldots (2)

note: type: itemize
en: Look at \texttt{debian/changelog}, \texttt{debian/rules}, \texttt{debian/control}\\ (auto-filled by \textbf{dh\_make})
zh_CN: 查看\texttt{debian/changelog}, \texttt{debian/rules}, \texttt{debian/control}\\ （由\textbf{dh\_make}自动填写）

note: type: itemize
en: In \texttt{debian/control}:\\ \texttt{Build-Depends: debhelper (>= 7.0.50~), autotools-dev}\\ Lists the \textsl{build-dependencies} = packages needed to build the package
zh_CN: \texttt{debian/control}文件内容：\\ \texttt{Build-Depends: debhelper (>= 7.0.50~), autotools-dev}\\ 用\textsl{build-dependencies} = 构建所需软件包名称 的格式列出构建依赖库

note: type: itemize
en: Try to build the package as-is with \texttt{debuild} (thanks to \textbf{dh} magic)
zh_CN: 尝试用\texttt{debuild}的“像xx一样”功能构建软件包（得益于\textbf{dh}的神奇功能）

note: type: itemize
en: And add build-dependencies, until it builds
zh_CN: 然后添加构建依赖库，开始构建

note: type: itemize
en: Hint: use \texttt{apt-cache search} and \texttt{apt-file} to find the packages
zh_CN: 提示：用\texttt{apt-cache search} 和\texttt{apt-file}命令查找软件包

note: type: itemize
en: Example:
zh_CN: 例如：

note: type: itemize
en: $\rightarrow$ Add \textbf{libsdl1.2-dev} to Build-Depends and install it.
zh_CN: $\rightarrow$ 将\textbf{libsdl1.2-dev}添加到构建依赖库并安装。

note: type: itemize
en: Better: use \textbf{pbuilder} to build in a clean environment
zh_CN: 如果可以尽量用\textbf{pbuilder}在干净的系统环境里构建。

note: type: frame{#2}
en: Step by step\ldots (3)
zh_CN: 具体步骤\ldots (3)

note: type: itemize
en: Required build-dependencies are \texttt{libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev}
zh_CN: 用到的构建依赖库有 \texttt{libsdl1.2-dev, libsdl-image1.2-dev, libsdl-mixer1.2-dev}

note: type: itemize
en: Then, you will probably run into another error:
zh_CN: 接下来你大概又会遇到如下错误：

note: type: itemize
en: This problem is caused by bitrot: gnujump has not been adjusted following linker changes.
zh_CN: 这个问题是bitrot产生的：gnujump没有跟着调整文件连接

note: type: itemize
en: If you are using source format version \textbf{1.0}, you can directly change upstream sources.
zh_CN: 如果你用的是源码格式版本\textbf{1.0}，你可以直接改上游源代码。

note: type: itemize
en: Edit \texttt{src/Makefile.am} and replace
zh_CN: 编辑 \texttt{src/Makefile.am}，将

note: type: frame{#2}
en: Step by step\ldots (4)
zh_CN: 具体步骤\ldots (4)

note: type: itemize
en: If you are using source format version \textbf{3.0 (quilt)}, use \texttt{quilt} to prepare a patch. (see \url{https://wiki.debian.org/UsingQuilt})
zh_CN: 如果你用的是源码格式版本 \textbf{3.0 (quilt)}，就用 \texttt{quilt} 命令制作补丁文件。（详见 \url{https://wiki.debian.org/UsingQuilt}）

note: type: itemize
en: Since \texttt{src/Makefile.am} was changed, autoreconf must be called during the build. To do that automatically with \texttt{dh}, change the \texttt{dh} call in \texttt{debian/rules} from: \texttt{dh \$\@ -{}-with autotools-dev}\\ to: \texttt{dh \$\@ -{}-with autotools-dev -{}-with autoreconf}
zh_CN: 因为修改了 \texttt{src/Makefile.am}，所以在构建时要调用一下autoreconf。用\texttt{dh}命令可以自动调用，将\texttt{debian/rules}里的\texttt{dh}调用代码块从：\texttt{dh \$\@ -{}-with autotools-dev}\\ 改成：\texttt{dh \$\@ -{}-with autotools-dev -{}-with autoreconf}

note: type: frame{#2}
en: Step by step\ldots (5)
zh_CN: 具体步骤\ldots (5)

note: type: itemize
en: The package should now build fine.
zh_CN: 现在软件包已经能正常构建了

note: type: itemize
en: Use \texttt{debc} to list the content of the generated package, and \texttt{debi} to install it and test it.
zh_CN: 用\texttt{debc} 列出所生成的软件包内容，用\texttt{debi}安装并测试。

note: type: itemize
en: Test the package with \texttt{lintian}
zh_CN: 用\texttt{lintian}测试软件包

note: type: itemize
en: While not a strict requirement, it is recommended that packages uploaded to Debian are \textsl{lintian-clean}
zh_CN: 虽然不是必须，但强烈推荐上传到Debian的软件包都是\textsl{lintian-clean}（lintian测试无误）的

note: type: itemize
en: More problems can be listed using \texttt{lintian -EviIL +pedantic}
zh_CN: 更多问题可以用\texttt{lintian -EviIL +pedantic} 命令列出来

note: type: itemize
en: Some hints:
zh_CN: 几条提醒：

note: type: itemize
en: Remove the files that you don't need in \texttt{debian/}
zh_CN: 将\texttt{debian/}里不需要的文件删掉

note: type: itemize
en: Fill in \texttt{debian/control}
zh_CN: 填写\texttt{debian/control}

note: type: itemize
en: Install the executable to \texttt{/usr/games} by overriding \texttt{dh\_auto\_configure}
zh_CN: 修改\texttt{dh\_auto\_configure} 来将可执行文件安装到\texttt{/usr/games}

note: type: itemize
en: Use \textsl{hardening} compiler flags to increase security.\\ See \url{https://wiki.debian.org/Hardening}
zh_CN: 利用\textsl{hardening} compiler flags（硬化编译器标识）增加安全性。\\ 详见\url{https://wiki.debian.org/Hardening}

note: type: frame{#2}
en: Step by step\ldots (6)
zh_CN: 具体步骤\ldots (6)

note: type: itemize
en: Compare your package with the one already packaged in Debian:
zh_CN: 将你的软件包与Debian中现有的软件包进行对比

note: type: itemize
en: It splits the data files to a second package, that is the same across all architectures ($\rightarrow$ saves space in the Debian archive)
zh_CN: 你的软件包在所有架构下统一地将data数据文件分离到了另一个软件包里（$\rightarrow$ 节约了Debian档案库的空间）

note: type: itemize
en: It installs a .desktop file (for the GNOME/KDE menus) and also integrates into the Debian menu
zh_CN: 你的软件包装有.desktop文件（用于GNOME/KDE菜单）并将其整合进了Debian菜单

note: type: itemize
en: It fixes a few minor problems using patches
zh_CN: 你的软件包用补丁修复了几个小问题

note: type: itemize
en: Create a basic source package: \texttt{jh\_makepkg}
zh_CN: 创建基础源码包：\texttt{jh\_makepkg}

note: type: itemize
en: Library
zh_CN: 库

note: type: itemize
en: None
zh_CN: 空

note: type: itemize
en: Default Free compiler/runtime
zh_CN: 默认免费编译器/运行环境

note: type: itemize
en: Look at and fix \texttt{debian/*}
zh_CN: 查看并修正\texttt{debian/*}

note: type: itemize
en: \texttt{dpkg-buildpackage -us -uc} or \texttt{debuild}
zh_CN: \texttt{dpkg-buildpackage -us -uc} 或 \texttt{debuild}

note: type: itemize
en: \texttt{lintian}, \texttt{debc}, etc.
zh_CN: \texttt{lintian}, \texttt{debc}, 等等

note: type: itemize
en: Compare your result with the \texttt{libirclib-java} source package
zh_CN: 将你的结果与\texttt{libirclib-java}源码包进行对比

note: type: itemize
en: Downloads the gem from rubygems.org
zh_CN: 从rubygems.org下载gem库

note: type: itemize
en: Creates a suitable .orig.tar.gz archive, and untar it
zh_CN: 创建合适的.orig.tar.gz压缩文件，然后解压缩

note: type: itemize
en: Initializes a Debian source package based on the gem's metadata
zh_CN: 基于gem库的元数据初始化一个Debian源码包

note: type: itemize
en: Named \texttt{ruby-\textsl{gemname}}
zh_CN: 命名为\texttt{ruby-\textsl{gemname}}

note: type: itemize
en: Tries to build the Debian binary package (this might fail)
zh_CN: 尝试构建Debian程序文件包（可能会失败）

note: type: frame
en: \texttt{dh\_ruby} (included in \textsl{gem2deb}) does the Ruby-specific tasks:
zh_CN: \texttt{dh\_ruby} (包含在 \textsl{gem2deb}内) 命令可以完成Ruby专属任务：

note: type: itemize
en: Build C extensions for each Ruby version
zh_CN: 为每个Ruby版本构建C语言扩展

note: type: itemize
en: Copy files to their destination directory
zh_CN: 把文件复制到目标目录

note: type: itemize
en: Update shebangs in executable scripts
zh_CN: 更新可执行脚本的shebang开头

note: type: itemize
en: Run tests defined in \texttt{debian/ruby-tests.rb}, \texttt{debian/ruby-tests.rake}, or \texttt{debian/ruby-test-files.yaml}, as well as various other checks
zh_CN: 运行\texttt{debian/ruby-tests.rb}, \texttt{debian/ruby-tests.rake}, 或 \texttt{debian/ruby-test-files.yaml}, 里定义地测试，以及其他各项检测

note: type: frame
en: Improve the generated package:
zh_CN: 优化生成的软件包：

note: type: itemize
en: Run \texttt{debclean} to clean the source tree. Look at \texttt{debian/}.
zh_CN: 运行\texttt{debclean}清理源码结构，查看\texttt{debian/}。

note: type: itemize
en: \texttt{changelog} and \texttt{compat} should be correct
zh_CN: \texttt{changelog} 和 \texttt{compat}必须准确无误

note: type: itemize
en: Edit \texttt{debian/control}: improve \texttt{Description}
zh_CN: 编辑\texttt{debian/control}：优化\texttt{Description}

note: type: itemize
en: Write a proper \texttt{copyright} file based on the upstream files
zh_CN: 基于上游文件编写正确的\texttt{copyright}版权文件

note: type: itemize
en: Compare your package with the \texttt{ruby-peach} package in the Debian archive
zh_CN: 将你的软件包与Debian档案库的\texttt{ruby-peach}软件包进行对比

note: type: itemize
en: Downloads the tarball from the CPAN
zh_CN: 从CPAN下载压缩包

note: type: itemize
en: Creates a suitable .orig.tar.gz archive, and untars it
zh_CN: 创建合适的.orig.tar.gz压缩文件，然后解压缩

note: type: itemize
en: Initializes a Debian source package based on the distribution's metadata
zh_CN: 基于分发文件的元数据初始化一份Debian源码包

note: type: itemize
en: Named \texttt{lib\textsl{distname}-perl}
zh_CN: 命名为 \texttt{lib\textsl{distname}-perl}

note: type: itemize
en: \texttt{debian/changelog}, \texttt{debian/compat}, \texttt{debian/libacme-perl.docs}, and \texttt{debian/watch} should be correct
zh_CN: 确保\texttt{debian/changelog}, \texttt{debian/compat}, \texttt{debian/libacme-perl.docs}, 和 \texttt{debian/watch} 文件都准确无误

note: type: itemize
en: Edit \texttt{debian/control}: improve \texttt{Description}, and remove boilerplate at the bottom
zh_CN: 编辑 \texttt{debian/control}: 优化 \texttt{Description}, 删除 底下的自动模板代码

note: type: itemize
en: Edit \texttt{debian/copyright}: remove boilerplate paragraph at the top, add years of copyright to the \texttt{Files:\hspace{0.3em}*} stanza
zh_CN: 编辑 \texttt{debian/copyright}: 删除顶上的样板代码，在\texttt{Files:\hspace{0.3em}*} 那节添加版权年份
