gpg failure if /root/.gnupg doesn't exist and /var/lib/smart is empty
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Client |
Fix Released
|
Medium
|
Free Ekanayaka | ||
Smart Package Manager |
Fix Released
|
Undecided
|
Unassigned | ||
landscape-client (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Jaunty |
Fix Released
|
Undecided
|
Unassigned | ||
Karmic |
Fix Released
|
Undecided
|
Unassigned | ||
Lucid |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Steps to reproduce:
root@nsn2:~# rm -rf .gnupg/
root@nsn2:~# rm -rf /var/lib/smart/*
Notice how smart update fails for the first channel. I abort right afterwards:
root@nsn2:~# smart update
Updating cache... #######
Fetching information for 'lucid - partner'...
-> http://
Release.gpg #######
-> http://
Release #######
error: Channel 'lucid - partner' signed with unknown key
I now just run again, no other changes, and it works:
root@nsn2:~# smart update
Updating cache... #######
Fetching information for 'lucid - partner'...
-> http://
Release.gpg #######
-> http://
Release #######
-> http://
Packages.bz2 #######
(...)
Related branches
Changed in landscape-client: | |
assignee: | nobody → Free Ekanayaka (free.ekanayaka) |
status: | New → In Progress |
importance: | Undecided → Medium |
milestone: | none → 1.5.1 |
Changed in landscape-client: | |
status: | In Progress → Fix Committed |
Changed in smart: | |
milestone: | none → 1.4 |
tags: | added: needs-testing |
Changed in smart: | |
status: | New → Fix Committed |
Changed in landscape-client: | |
status: | Fix Committed → Fix Released |
tags: | removed: needs-testing verification-needed |
Changed in smart: | |
status: | Fix Committed → Fix Released |
This is how smart calls gpg:
root@nsn2:~# gpg --keyring /etc/apt/ trusted. gpg --status-fd 1 --no-default- keyring --no-secmem-warning --batch --verify Release.gpg Release pk677fzgzZBFIUb 9ehSs 2010-04-13 1271161539 .gnupg/ gpg.conf' created .gnupg/ gpg.conf' are not yet active during this run
gpg: Signature made Tue 13 Apr 2010 09:25:39 AM BRT using DSA key ID 437D05B5
[GNUPG:] SIG_ID mIKaw5+
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/
gpg: WARNING: options in `/root/
gpg: fatal: /root/.gnupg: directory does not exist!
secmem usage: 1408/1408 bytes in 2/2 blocks of pool 1408/32768
root@nsn2:~# echo $?
2
If I drop "--no-default- keyring" , then it seems to work:
root@nsn2:~# gpg --keyring /etc/apt/ trusted. gpg --status-fd 1 --no-secmem-warning --batch --verify Release.gpg Release .gnupg/ gpg.conf' created .gnupg/ gpg.conf' are not yet active during this run .gnupg/ pubring. gpg' created pk677fzgzZBFIUb 9ehSs 2010-04-13 1271161539 gnupg/trustdb. gpg: trustdb created FD81A27B140976E AF437D05B5 2010-04-13 1271161539 0 3 0 17 2 00 630239CC130E1A7 FD81A27B140976E AF437D05B5
gpg: directory `/root/.gnupg' created
gpg: new configuration file `/root/
gpg: WARNING: options in `/root/
gpg: keyring `/root/
gpg: Signature made Tue 13 Apr 2010 09:25:39 AM BRT using DSA key ID 437D05B5
[GNUPG:] SIG_ID mIKaw5+
gpg: /root/.
[GNUPG:] GOODSIG 40976EAF437D05B5 Ubuntu Archive Automatic Signing Key <email address hidden>
gpg: Good signature from "Ubuntu Archive Automatic Signing Key <email address hidden>"
[GNUPG:] VALIDSIG 630239CC130E1A7
[GNUPG:] TRUST_UNDEFINED
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 6302 39CC 130E 1A7F D81A 27B1 4097 6EAF 437D 05B5
root@nsn2:~# echo $?
0
With smart tweaked to not include --no-default- keyring:
root@nsn2:~# rm -rf .gnupg /var/lib/smart/* ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ### [100%]
root@nsn2:~# smart update
Updating cache... #######
Fetching information for 'lucid - partner'... archive. canonical. com/ubuntu/ dists/lucid/ Release. gpg ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ### [ 1%] archive. canonical. com/ubuntu/ dists/lucid/ Release ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ####### ### [ 3%] archive. canonical....
-> http://
Release.gpg #######
-> http://
Release #######
-> http://