apt-add-repository fails

Bug #1060335 reported by Scott Moser
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
software-properties (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

$ sudo apt-add-repository ppa:maas-maintainers/dailybuilds -y
gpg: keyring `/tmp/tmpf0nr53/secring.gpg' created
gpg: keyring `/tmp/tmpf0nr53/pubring.gpg' created
gpg: requesting key 93EE8CC5 from hkp server keyserver.ubuntu.com
gpg: fatal: /home/ubuntu/.gnupg: directory does not exist!
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/32768

If I do create .gnupg for it, then:
$ sudo apt-add-repository ppa:maas-maintainers/dailybuilds -y
gpg: keyring `/tmp/tmp54k44x/secring.gpg' created
gpg: keyring `/tmp/tmp54k44x/pubring.gpg' created
gpg: requesting key 93EE8CC5 from hkp server keyserver.ubuntu.com
gpg: /home/ubuntu/.gnupg/trustdb.gpg: trustdb created
gpg: key 93EE8CC5: public key "Launchpad PPA for MaaS Maintainers" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
gpg: keyring `/home/ubuntu/.gnupg/secring.gpg' created
OK

but
a.) its still noisy
b.) I now have root owned files in my .gnupg directory:
$ ls -l .gnupg/
total 4
-rw------- 1 root root 0 Oct 2 17:08 secring.gpg
-rw------- 1 root root 1200 Oct 2 17:08 trustdb.gpg

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: software-properties-common 0.92.8
ProcVersionSignature: User Name 3.5.0-16.25-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
ApportVersion: 2.6.1-0ubuntu1
Architecture: amd64
Date: Tue Oct 2 17:10:44 2012
Ec2AMI: ami-00000159
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: software-properties
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Adam Conrad (adconrad) wrote :

Looks to me like it's not setting --homedir to tmp_keyring_dir like other GPG calls do.

Revision history for this message
Adam Conrad (adconrad) wrote :

Something like this (untested) should do the trick.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-properties - 0.92.9

---------------
software-properties (0.92.9) quantal; urgency=low

  * Call GnuPG with an appropriate --homedir argument (LP: #1060335)
 -- Adam Conrad <email address hidden> Tue, 02 Oct 2012 11:57:31 -0600

Changed in software-properties (Ubuntu):
status: New → Fix Released
Revision history for this message
Scott Moser (smoser) wrote :

The change here seems not to have fixed the problem:
$ dpkg -S `which apt-add-repository`
software-properties-common: /usr/bin/apt-add-repository

$ dpkg-query --show software-properties-common
software-properties-common 0.92.9

$ sudo apt-add-repository ppa:smoser/
ppa -y
gpg: keyring `/tmp/tmps0qrz0/secring.gpg' created
gpg: keyring `/tmp/tmps0qrz0/pubring.gpg' created
gpg: requesting key 03683F77 from hkp server keyserver.ubuntu.com
gpg: fatal: /home/ubuntu/.gnupg: directory does not exist!
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/32768
$ echo $?
0

$ sudo apt-get update -q
...
Fetched 15.1 kB in 0s (93.8 kB/s)
Reading package lists...
W: GPG error: http://ppa.launchpad.net quantal Release: The following signatures couldn't
 be verified because the public key is not available: NO_PUBKEY 5CFF1EA993EE8CC5
W: GPG error: http://ppa.launchpad.net quantal Release: The following signatures couldn't
 be verified because the public key is not available: NO_PUBKEY 0620BBCF03683F77

Revision history for this message
Adam Conrad (adconrad) wrote :

With the current version installed, I get:

(quantal-amd64)root@cthulhu:~# apt-add-repository ppa:smoser/ppa -y
gpg: keyring `/tmp/tmpd4te1g/secring.gpg' created
gpg: keyring `/tmp/tmpd4te1g/pubring.gpg' created
gpg: requesting key 03683F77 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpd4te1g/trustdb.gpg: trustdb created
gpg: key 03683F77: public key "Launchpad PPA for Scott Moser" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
(quantal-amd64)root@cthulhu:~# ls -l .gnupg
ls: cannot access .gnupg: No such file or directory

Did you upgrade python3-software-properties as well?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.