Question

I am trying to get the source code of 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

I have several questions:

  1. What's the dsc file?
  2. Why does the error "gpgv: Can't check signature: public key not found" happen and how can I resolve it?
  3. Why are two tar files retrieved, and why is the "orig" one much larger?
Was it helpful?

Solution

If you're just looking to understand the source of the calculator, then the only file you need to review in depth is gnome-calculator_3.8.1.orig.tar.xz.

What's the dsc file?

The .dsc file is a Debian Source package description file. See the man page for dpkg-source and How *.dsc files are related to *.deb and source code files.

It's an ASCII file and you can use cat to view it. It should have a bunch of information that will be familiar to you if you've looked at the package in aptitude, or used apt-cache show gnome-calculator or similar.

Some specific things it does is list the files that are applicable, and their checksums. It also has a PGP signature that is used to verify the validity of the package (see discussion below).

You probably don't have much to do with this unless you're learning about packaging up the software again, or just curious.

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

The .orig.tar.xz file is the original source from the original project (external to Ubuntu). This will be a particular version of the code that was selected by Ubuntu to be the one included in the distribution. It should be a complete source tree, and should, theoretically, compile to a working (although possibly not optimal for your distro) application.

The -0ubuntu1.debian.tar.gz file is for packaging and any customisations applied to make it part of the distro. It can include patches and code modifications. In the case of the gnome-calculator code I've just downloaded, there is no additional code, or patches, so you needn't spend long looking at it.

If you're interested in the packaging process, you could have a look at the Ubuntu packaging guide.

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

The Cannot verify signature message arises because in the .dsc file there's a signature. Apt tries to verify the signature (and hence the package). This is a pretty important step to make sure the code that you've got is what the Ubuntu team wanted you to get, and hasn't been mucked around with in any way. In your case it's not able to do this validation because it can't find the public key that applies.

I can't reproduce the issue, but I'd suggest these two links will help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top