Bug 11654 - [krogoth] ERROR: setUpClass (oeqa.selftest.signing.Signing)
Summary: [krogoth] ERROR: setUpClass (oeqa.selftest.signing.Signing)
Status: VERIFIED WONTFIX
Alias: None
Product: Runtime Testing
Classification: QA/Testing
Component: general (show other bugs)
Version: 2.1.3
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.4 M2
Assignee: Jose Perez C
QA Contact:
URL:
Whiteboard: Backport to 2.3.1, 2.2.2, 2.1.3
Depends on:
Blocks:
 
Reported: 2017-06-13 14:59 UTC by oscar lopez arandas
Modified: 2017-07-05 17:20 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments
ubuntu16.10_ error: setupclases (34.14 KB, text/plain)
2017-06-13 14:59 UTC, oscar lopez arandas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description oscar lopez arandas 2017-06-13 14:59:50 UTC
Created attachment 3810 [details]
ubuntu16.10_ error: setupclases

STATUS: fail
BUILD: 2.1.3: rc1-fe7fb002216f7886d49942333ea6d8592339bb05
ENVIRONMENT: ubuntu 16.10 x86_64

STEPS TO REPRODUCE: 
1.-clone poky
2.-source oe-init-build-env
3.-oe-selftest oe-selftest --run-all 


EXPECTED RESULT

All test cases should be OK 


ACTUAL RESULT:
When running selftest on GDC AB Ubuntu16.10 is failing with below output:

======================================================================
ERROR: setUpClass (oeqa.selftest.signing.Signing)
----------------------------------------------------------------------

Full log attached.
Comment 1 Ross Burton 2017-06-15 14:52:59 UTC
AssertionError: Command 'gpg --homedir /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-selftest/files/signing/ --import /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-selftest/files/signing/key.pub /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-selftest/files/signing/key.secret' returned non-zero exit status 2:
gpg: WARNING: unsafe permissions on homedir '/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-selftest/files/signing/'
gpg: keybox '/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-selftest/files/signing//pubring.kbx' created
gpg: /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-selftest/files/signing//trustdb.gpg: trustdb created
gpg: key 7B31316B5D64AD52: public key "testuser (nocomment) <testuser@testemail.com>" imported
gpg: can't connect to the agent: File name too long

Looks like gpg doesn't like long paths, so we should put the temporary gpg database in /tmp instead (and fix the permissions to 700 to silence the other warnings).
Comment 2 Monserrat 2017-06-19 17:38:54 UTC
(In reply to comment #1)
> AssertionError: Command 'gpg --homedir
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/ --import
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/key.pub
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/key.secret' returned non-zero exit status 2:
> gpg: WARNING: unsafe permissions on homedir
> '/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/'
> gpg: keybox
> '/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing//pubring.kbx' created
> gpg:
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing//trustdb.gpg: trustdb created
> gpg: key 7B31316B5D64AD52: public key "testuser (nocomment)
> <testuser@testemail.com>" imported
> gpg: can't connect to the agent: File name too long
> 
> Looks like gpg doesn't like long paths, so we should put the temporary gpg
> database in /tmp instead (and fix the permissions to 700 to silence the
> other warnings).
The error did not appear on 2.4 M1 release. 

http://yctb01.zpn.intel.com:8010/builders/nightly-oe-selftest-ubuntu1610/builds/49
Comment 3 Jose Perez C 2017-06-28 13:47:47 UTC
(In reply to comment #1)
> AssertionError: Command 'gpg --homedir
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/ --import
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/key.pub
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/key.secret' returned non-zero exit status 2:
> gpg: WARNING: unsafe permissions on homedir
> '/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing/'
> gpg: keybox
> '/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing//pubring.kbx' created
> gpg:
> /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta-
> selftest/files/signing//trustdb.gpg: trustdb created
> gpg: key 7B31316B5D64AD52: public key "testuser (nocomment)
> <testuser@testemail.com>" imported
> gpg: can't connect to the agent: File name too long
> 
> Looks like gpg doesn't like long paths, so we should put the temporary gpg
> database in /tmp instead (and fix the permissions to 700 to silence the
> other warnings).

I test a branch with above approach [1] and the error of long names is not longer present, but there is still an error on agent sending keys. I was researching and this seems to be a compatibility issue [2][3]. 

After failures on morty (supports python3) gpg was updated to 2.1.15 on workers, after that update this failure is not present anymore on morty, pyron and current master (all with support for python3) but starts failing for krogoth (python2). As this is only happening on krogoth branch and in Ubuntu 16.10 on which is not longer supported at AB. setting this as wontfix. 


1- http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=jperez/bug11654
2- https://bugs.launchpad.net/ubuntu/+source/gnupg2/+bug/1565963
3- https://dev.gnupg.org/T2312  



Traceback (most recent call last):
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta/lib/oeqa/selftest/signing.py", line 34, in setUpClass
    runCmd('gpg --homedir %s --import %s %s' % (cls.gpg_dir, pub_key_location, secret_key_location))
  File "/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta/lib/oeqa/utils/commands.py", line 110, in runCmd
    raise AssertionError("Command '%s' returned non-zero exit status %d:\n%s" % (command, result.status, result.output))
AssertionError: Command 'gpg --homedir /tmp/gpg_dir_test/ --import /tmp/gpg_dir_test/key.pub /tmp/gpg_dir_test/key.secret' returned non-zero exit status 2:
gpg: keybox '/tmp/gpg_dir_test//pubring.kbx' created
gpg: /tmp/gpg_dir_test//trustdb.gpg: trustdb created
gpg: key 7B31316B5D64AD52: public key "testuser (nocomment) <testuser@testemail.com>" imported
gpg: key 7B31316B5D64AD52: "testuser (nocomment) <testuser@testemail.com>" not changed
gpg: key 7B31316B5D64AD52/7B31316B5D64AD52: error sending to agent: Operation cancelled
gpg: Total number processed: 2
gpg:               imported: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1
Comment 4 oscar lopez arandas 2017-07-05 17:20:43 UTC
As this is only happening on krogoth branch and in Ubuntu 16.10 on which is not longer supported at AB. setting this as wontfix.