|
284.
|
|
|
![](/@@/translation-newline)
mkdir ~/hello ![](/@@/translation-newline)
cd ~/hello ![](/@@/translation-newline)
wget http://ftp.gnu.org/gnu/hello/hello-2.1.1.tar.gz
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
(no translation yet)
|
|
|
|
Located in
C/basic.xml:59(screen)
|
|
285.
|
|
|
We will also compare our package to one that is already packaged in the <phrase>Ubuntu</phrase> repository. For now, we will place it in the <filename>ubuntu</filename> directory so we can look at it later. To get the source package, make sure you have a "deb-src" line in your <filename>/etc/apt/sources.list</filename> file for the Main repository. Then, simply execute:
|
|
|
|
(no translation yet)
|
|
|
|
Located in
C/basic.xml:64(para)
|
|
286.
|
|
|
![](/@@/translation-newline)
mkdir ubuntu ![](/@@/translation-newline)
cd ubuntu ![](/@@/translation-newline)
apt-get source hello ![](/@@/translation-newline)
cd ..
|
|
|
represents a line break.
Start a new line in the equivalent position in the translation.
|
|
|
|
![](/@@/translation-newline)
mkdir ubuntu ![](/@@/translation-newline)
cd ubuntu ![](/@@/translation-newline)
apt-get source hello ![](/@@/translation-newline)
cd ..
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:72(screen)
|
|
287.
|
|
|
Unlike most <application>apt-get</application> commands, you do not need to have root privileges to get the source package, because it is downloaded to the current directory. In fact, it is recommended that you <emphasis>only</emphasis> use <application>apt-get source</application> as a regular user, because then you can edit files in the source package without needing root privileges.
|
|
|
|
不像大多数的 <application>apt-get</application> 命令,您在获取源码包的时候不需要拥有 root 权限,因为它是被下载到当前目录中的。事实上,推荐您<emphasis>只</emphasis>作为普通用户使用 <application>apt-get source</application>,因为这样您才不需要 root 权限来编辑源码包中的文件。
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:78(para)
|
|
288.
|
|
|
What the <application>apt-get source</application> command does is:
|
|
|
|
<application>apt-get source</application> 命令完成的工作是:
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:85(para)
|
|
289.
|
|
|
Download the source package. A source package commonly contains a .dsc file describing the package and giving md5sums for the source package, an .orig.tar.gz file containing the source code from the author(s), and a .diff.gz file containing patches applied against the source code with the packaging information.
|
|
|
|
下载源码包。源码包通常包含一个 .dsc 文件,其描述软件包并给出该包的 md5 校验;一个 .orig.tar.gz 文件,包含了作者的源码;以及一个 .diff.gz 文件,包含了应用到源码上的补丁以及打包信息。
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:89(para)
|
|
290.
|
|
|
Untar the .orig.tar.gz file into the current directory.
|
|
|
|
将 .orig.tar.gz 文件解压到当前目录中。
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:95(para)
|
|
291.
|
|
|
Apply the gunzipped .diff.gz to the unpacked source directory.
|
|
|
|
将 gunzip 过的 .diff.gz 应用到解压后的源码目录。
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:98(para)
|
|
292.
|
|
|
If you manually download the source package (.dsc, .orig.tar.gz, and .diff.gz files), you can unpack them in the same way <application>apt-get source</application> does by using <application>dpkg-source</application> as follows:
|
|
|
|
如果您手工下载了源码包 (.dsc、.orig.tar.gz 以及 .diff.gz 文件),您可以通过 <application>dpkg-source</application> 使用与 <application>apt-get source</application> 同样的方式将它们解压,如下所示:
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:103(para)
|
|
293.
|
|
|
dpkg-source -x *.dsc
|
|
|
|
dpkg-source -x *.dsc
|
|
Translated and reviewed by
stone_unix
|
|
|
|
Located in
C/basic.xml:107(screen)
|