<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>11054</bug_id>
          
          <creation_ts>2017-02-14 18:08:54 +0000</creation_ts>
          <short_desc>selftest: Signing packages failing on ubuntu 16.10 with gpg (GnuPG) 2.1.15</short_desc>
          <delta_ts>2017-09-12 10:47:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.3</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jose Perez C">jose.perez.carranza</reporter>
          <assigned_to name="Markus Lehtonen">markus.lehtonen</assigned_to>
          <cc>alex.kanavin</cc>
    
    <cc>anibal.limon</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>markus.lehtonen</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>monserratx.sedeno.bustos</cc>
    
    <cc>oscarx.lopez.arandas</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>70699</commentid>
    <comment_count>0</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2017-02-14 18:08:54 +0000</bug_when>
    <thetext>Selftest is failing on Ubuntu 16.10

root@ubuntu1610:~# gpg --version 
gpg (GnuPG) 2.1.15

All other workers are working correctly and those have version 2.0 or below of gpg.

======================================================================
ERROR [0.000s]: setUpClass (oeqa.selftest.signing.Signing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta/lib/oeqa/selftest/signing.py&quot;, line 30, in setUpClass
    runCmd(&apos;gpg --homedir %s --import %s %s&apos; % (cls.gpg_dir, cls.pub_key_path, cls.secret_key_path))
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1610/build/meta/lib/oeqa/utils/commands.py&quot;, line 114, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, result.output))
AssertionError: Command &apos;gpg --homedir /tmp/oeqa-signing-9k2dbj0u --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&apos; returned non-zero exit status 2:
gpg: keybox &apos;/tmp/oeqa-signing-9k2dbj0u/pubring.kbx&apos; created
gpg: /tmp/oeqa-signing-9k2dbj0u/trustdb.gpg: trustdb created
gpg: key 7B31316B5D64AD52: public key &quot;testuser (nocomment) &lt;testuser@testemail.com&gt;&quot; imported
gpg: key 7B31316B5D64AD52: &quot;testuser (nocomment) &lt;testuser@testemail.com&gt;&quot; 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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70702</commentid>
    <comment_count>1</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-02-14 20:28:42 +0000</bug_when>
    <thetext>Shouldn&apos;t we be building our own gpg-native to perform any package signing, rather than relying on host utils?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70703</commentid>
    <comment_count>2</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2017-02-14 20:37:28 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Shouldn&apos;t we be building our own gpg-native to perform any package signing,
&gt; rather than relying on host utils?

Yes we are but seems a problem of configuration at ~/.gpg, i suggest the test to create a isolated configuration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70704</commentid>
    <comment_count>3</comment_count>
    <who name="Joshua Lock">joshuagloe</who>
    <bug_when>2017-02-14 20:40:03 +0000</bug_when>
    <thetext>The package signing classes have a GPG_PATH variable:

&quot;Optional variable for specifying the gnupg &quot;home&quot; directory&quot;

perhaps the tests could make use of that?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70849</commentid>
    <comment_count>4</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-02-21 08:02:25 +0000</bug_when>
    <thetext>Can you try if the issue still happens with this branch? 
https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4

Markus Lehtonen and I did some fixing specifically to make gpg work again, including Ubuntu. But it&apos;s done on top of rpm4/dnf, which is coming soon anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70850</commentid>
    <comment_count>5</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-02-21 08:04:34 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; The package signing classes have a GPG_PATH variable:
&gt; 
&gt; &quot;Optional variable for specifying the gnupg &quot;home&quot; directory&quot;
&gt; 
&gt; perhaps the tests could make use of that?

The tests are already setting up their private gnupg home directory (see the --homedir parameter above), this is not an issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70853</commentid>
    <comment_count>6</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-02-21 10:51:27 +0000</bug_when>
    <thetext>Yes, this will be fixed with Ale(In reply to comment #4)
&gt; Can you try if the issue still happens with this branch? 
&gt; https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-
&gt; rpm4
&gt; 
&gt; Markus Lehtonen and I did some fixing specifically to make gpg work again,
&gt; including Ubuntu. But it&apos;s done on top of rpm4/dnf, which is coming soon
&gt; anyway.

Yes, this will be fixed with Alexander&apos;s dfn/rpm4 patchset. I&apos;ve tested it specifically on Ubuntu 16.10 and it works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70874</commentid>
    <comment_count>7</comment_count>
    <who name="Jose Perez C">jose.perez.carranza</who>
    <bug_when>2017-02-21 22:00:27 +0000</bug_when>
    <thetext>Tested on GDC local AB were the failure was found and the &apos;gpg&apos; failure is not present anymore.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70890</commentid>
    <comment_count>8</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-02-23 08:25:02 +0000</bug_when>
    <thetext>This is still broken in master. Looks like the dnf patchset will not be merged until 2.4 so I&apos;ll fix this separately.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70892</commentid>
    <comment_count>9</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-02-23 10:00:33 +0000</bug_when>
    <thetext>I&apos;d say we need to wait for an official decision by RP; I&apos;ve sent the v2 of the dnf patch with everything fixed, so it may yet find its way to master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70894</commentid>
    <comment_count>10</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-02-23 10:28:24 +0000</bug_when>
    <thetext>Uh, I already sent a patchset for review. But, now we have a fix in any case. Let RP decide :)

https://patchwork.openembedded.org/series/5471/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>70900</commentid>
    <comment_count>11</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-02-23 13:32:30 +0000</bug_when>
    <thetext>I don&apos;t mind that, if your fixes are merged, I can drop a few patches from the dnf patchset, which are only tangential to its purpose.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71030</commentid>
    <comment_count>12</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2017-03-02 09:17:30 +0000</bug_when>
    <thetext>Fixed in master:
http://git.openembedded.org/openembedded-core/commit/?id=44a44b7e582a5a654baf21829d168568481c13d9</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76740</commentid>
    <comment_count>13</comment_count>
    <who name="oscar lopez arandas">oscarx.lopez.arandas</who>
    <bug_when>2017-09-11 21:07:35 +0000</bug_when>
    <thetext>
Selftest is failing on Ubuntu 17.04
2.2.2.rc2
All other workers are working correctly

======================================================================
ERROR [0.000s]: setUpClass (oeqa.selftest.signing.Signing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1704/build/meta/lib/oeqa/selftest/signing.py&quot;, line 30, in setUpClass
    runCmd(&apos;gpg --homedir %s --import %s %s&apos; % (cls.gpg_dir, cls.pub_key_path, cls.secret_key_path))
  File &quot;/home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1704/build/meta/lib/oeqa/utils/commands.py&quot;, line 114, in runCmd
    raise AssertionError(&quot;Command &apos;%s&apos; returned non-zero exit status %d:\n%s&quot; % (command, result.status, result.output))
AssertionError: Command &apos;gpg --homedir /tmp/oeqa-signing-hc7m5doc --import /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1704/build/meta-selftest/files/signing/key.pub /home/ab/autobuilder/yocto-worker/nightly-oe-selftest-ubuntu1704/build/meta-selftest/files/signing/key.secret&apos; returned non-zero exit status 2:
gpg: keybox &apos;/tmp/oeqa-signing-hc7m5doc/pubring.kbx&apos; created
gpg: /tmp/oeqa-signing-hc7m5doc/trustdb.gpg: trustdb created
gpg: key 7B31316B5D64AD52: public key &quot;testuser (nocomment) &lt;testuser@testemail.com&gt;&quot; imported
gpg: key 7B31316B5D64AD52: &quot;testuser (nocomment) &lt;testuser@testemail.com&gt;&quot; not changed
gpg: key 7B31316B5D64AD52/7B31316B5D64AD52: error sending to agent: Inappropriate ioctl for device
gpg: error building skey array: Inappropriate ioctl for device
gpg: Total number processed: 2
gpg:               imported: 1
gpg:              unchanged: 1
gpg:       secret keys read: 1

----------------------------------------------------------------------</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76758</commentid>
    <comment_count>14</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-09-12 10:47:40 +0000</bug_when>
    <thetext>Please open a new bug, as this is a different issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>