Comment 5 for bug 1250370

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

marked as low.
I wasnt able to reproduce this using sstream-query, though i thought i would have been able to.
basically expected that:
 sudo PYTHONPATH=$PWD ./bin/sstream-query -vvv --keyring /usr/share/keyrings/ubuntu-cloudimage-keyring.gp http://maas.ubuntu.com/images/ephemeral-v2/daily/streams/v1/com.ubuntu.maas:daily:v2:download.sjson

would have done the change, but it did not.

I did reproduce another issue:
$ cat > gen-key <<EOT
Key-Type: RSA
Key-Length: 1024
Name-Real: Test User
Name-Email: <email address hidden>
EOT
$ rm -Rf ~/.gnupg; gpg --gen-key --batch gen-key
$ sstream-query -vvv --keyring /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg --max=1 http://maas.ubuntu.com/images/ephemeral-v2/daily/streams/v1/com.ubuntu.maas:daily:v2:download.sjson release=trusty arch=ppc64
failed: gpg --batch --verify --no-default-keyring --keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg -
 out=
 err=gpg: WARNING: unsafe ownership on configuration file `/home/ubuntu/.gnupg/gpg.conf'
gpg: Signature made Thu 29 Oct 2015 12:15:36 PM UTC using RSA key ID 476CF100
gpg: checking the trustdb
gpg: public key of ultimately trusted key 795D06FA not found
gpg: 3 marginal(s) needed, 1 complete(s) needed, PGP trust model
gpg: depth: 0 valid: 1 signed: 0 trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: Good signature from "Ubuntu Cloud Image Builder (Canonical Internal Cloud Image Builder) <email address hidden>"
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: 4A3C E3CD 565D 7EB5 C810 E2B9 7FF3 F408 476C F100

Traceback (most recent call last):
  File "/usr/bin/sstream-query", line 136, in <module>
    main()
  File "/usr/bin/sstream-query", line 129, in main
    tmirror.sync(smirror, path)
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 83, in sync
    content, payload = reader.read_json(path)
  File "/usr/lib/python3/dist-packages/simplestreams/mirrors/__init__.py", line 41, in read_json
    return raw, self.policy(content=raw, path=path)
  File "/usr/bin/sstream-query", line 116, in policy
    checked=cmdargs.verify)
  File "/usr/lib/python3/dist-packages/simplestreams/util.py", line 267, in read_signed
    raise e
  File "/usr/lib/python3/dist-packages/simplestreams/util.py", line 263, in read_signed
    subp(cmd, data=content)
  File "/usr/lib/python3/dist-packages/simplestreams/util.py", line 435, in subp
    raise subprocess.CalledProcessError(rc, args, output=(out, err))
subprocess.CalledProcessError: Command '['gpg', '--batch', '--verify', '--no-default-keyring', '--keyring=/usr/share/keyrings/ubuntu-cloudimage-keyring.gpg', '-']' returned non-zero exit status 2