ubuntu - 在这里使用 apt-get source 时我得到了什么?

标签 ubuntu apt-get

我正在尝试获取 gnome-calculator 的源代码.

$ apt-get source gnome-calculator 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
NOTICE: 'gnome-calculator' packaging is maintained in the 'Svn' version control system at:
svn://anonscm.debian.org/svn/pkg-gnome/desktop/unstable/gnome-calculator
Need to get 1,065 kB of source archives.
Get:1 http://mirrors.ustc.edu.cn/ubuntu/ raring/main gnome-calculator 1:3.8.1-0ubuntu1 (dsc) [2,547 B]
Get:2 http://mirrors.ustc.edu.cn/ubuntu/ raring/main gnome-calculator 1:3.8.1-0ubuntu1 (tar) [1,053 kB]
Get:3 http://mirrors.ustc.edu.cn/ubuntu/ raring/main gnome-calculator 1:3.8.1-0ubuntu1 (diff) [9,177 B]
Fetched 1,065 kB in 2min 0s (8,813 B/s)
gpgv: Signature made Mon 15 Apr 2013 08:58:14 AM CST using RSA key ID EBFE6C7D
gpgv: Can't check signature: public key not found
dpkg-source: warning: failed to verify signature on ./gnome-calculator_3.8.1-0ubuntu1.dsc
dpkg-source: info: extracting gnome-calculator in gnome-calculator-3.8.1
dpkg-source: info: unpacking gnome-calculator_3.8.1.orig.tar.xz
dpkg-source: info: unpacking gnome-calculator_3.8.1-0ubuntu1.debian.tar.gz
$ ls -lh
total 1.1M
drwxr-xr-x  8 unimous root 4.0K Dec 21 14:44 gnome-calculator-3.8.1
-rw-r--r--  1 unimous root 9.0K Apr 15  2013 gnome-calculator_3.8.1-0ubuntu1.debian.tar.gz
-rw-r--r--  1 unimous root 2.5K Apr 15  2013 gnome-calculator_3.8.1-0ubuntu1.dsc
-rw-r--r--  1 unimous root 1.1M Apr 15  2013 gnome-calculator_3.8.1.orig.tar.xz

我有几个问题:
  • 什么是dsc文件?
  • 为什么会发生错误“gpgv:无法检查签名:未找到公钥”,我该如何解决?
  • 为什么要检索两个 tar 文件,为什么“原始”文件要大得多?
  • 最佳答案

    如果您只是想了解计算器的来源,那么您需要深入查看的唯一文件是 gnome-calculator_3.8.1.orig.tar.xz。 .

    What's the dsc file?


    .dsc文件是 Debian 来源 包描述文件。见man page for dpkg-source How *.dsc files are related to *.deb and source code files .

    这是一个 ASCII 文件,你可以使用 cat查看它。如果你看过 aptitude 中的包,它应该有一堆你会熟悉的信息。 , 或使用 apt-cache show gnome-calculator或类似的。

    它所做的一些具体事情是列出适用的文件及其校验和。它还有一个 PGP 签名,用于验证包的有效性(参见下面的讨论)。

    除非您正在学习再次打包软件,或者只是好奇,否则您可能与此无关。

    Why are two tar files retrieved, and why is the "orig" one much larger?


    .orig.tar.xz文件是原始项目的原始源代码(Ubuntu 外部)。这将是 Ubuntu 选择作为发行版中包含的代码的特定版本。它应该是一个完整的源代码树,并且理论上应该编译为一个工作(尽管对于您的发行版可能不是最佳的)应用程序。
    -0ubuntu1.debian.tar.gz文件用于打包和任何定制以使其成为发行版的一部分。它可以包括补丁和代码修改。对于我刚刚下载的 gnome-calculator 代码,没有额外的代码或补丁,所以你不需要花很长时间看它。

    如果您对打包过程感兴趣,可以查看Ubuntu packaging guide .

    Why does the error "gpgv: Can't check signature: public key not found" happen and how can I resolve it?


    Cannot verify signature出现消息是因为在 .dsc文件有签名。 Apt 尝试验证签名(以及包)。这是确保您拥有的代码是 Ubuntu 团队希望您获得的代码并且没有以任何方式被弄乱的非常重要的一步。在您的情况下,它无法进行此验证,因为它找不到适用的公钥。

    我无法重现该问题,但我建议这两个链接会有所帮助。
  • Add the key from the sources server to your local keyring
  • Add the GnuPG keys of the Ubuntu developers
  • 关于ubuntu - 在这里使用 apt-get source 时我得到了什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20716518/

    相关文章:

    ubuntu - 奇怪的 qt 解析错误 "Parse Error (' ')"

    c++ - 如何使用 C++ boost 库获取文件权限?

    ubuntu - easy_install PIL 失败

    android - 在 termux android N OS 上安装 python 时出错

    java - 使用 apt-get 在 Google Compute Engine 实例上安装 Java 8

    debian - 如何删除和清除 apt-get 安装的所有软件包?

    apache - Sqoop:找不到命令

    ruby - 如何为 Ubuntu 打包 Ruby 应用程序,包括它的 gem 依赖项?

    linux - bash:bin/hadoop:没有这样的文件或目录(ubuntu 16.04 上的 hadoop 2.7.3)

    linux - 无法安装 Java 6 和安装 7