<?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>13143</bug_id>
          
          <creation_ts>2019-01-17 07:37:13 +0000</creation_ts>
          <short_desc>[2.6.1 rc1] bitbake core-image-minimal failed because no module named &apos;gpg&apos; on CentOS 7 and OpenSuse 42.3</short_desc>
          <delta_ts>2019-02-27 03:04:01 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>10</classification_id>
          <classification>QA/Testing</classification>
          <product>Functional (self) Testing</product>
          <component>general</component>
          <version>2.6.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.6.2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Mohamad Noor Alim">mohamad.noor.alim.hussin</reporter>
          <assigned_to name="Anuj Mittal">anuj.mittal</assigned_to>
          <cc>akuster</cc>
    
    <cc>anuj.mittal</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Mohamad Noor Alim">mohamad.noor.alim.hussin</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>82811</commentid>
    <comment_count>0</comment_count>
    <who name="Mohamad Noor Alim">mohamad.noor.alim.hussin</who>
    <bug_when>2019-01-17 07:37:13 +0000</bug_when>
    <thetext>Building core-image-minimal failed as no module named &apos;gpg&apos;. Most of test cases such as imagefeatures, runqemu, wic, runtime_test and buildoptions failed due to this issue. 
Following is a log from autobuilder.

NOTE: Running task 2191 of 2428 (/home/user/yocto-worker/oe-selftest/build/meta/recipes-core/images/core-image-minimal.bb:do_rootfs)
NOTE: recipe core-image-minimal-1.0-r0: task do_rootfs: Started
ERROR: core-image-minimal-1.0-r0 do_rootfs: Could not invoke dnf. Command &apos;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/dnf -v --rpmverbosity=debug -y -c /home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/dnf/dnf.conf --setopt=reposdir=/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs/etc/yum.repos.d --repofrompath=oe-repo,/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo --installroot=/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/rootfs --setopt=logdir=/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/temp makecache --refresh&apos; returned 1:
Traceback (most recent call last):
  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/bin/dnf.real&quot;, line 57, in &lt;module&gt;
    from dnf.cli import main
  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/__init__.py&quot;, line 31, in &lt;module&gt;
    import dnf.base
  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/base.py&quot;, line 29, in &lt;module&gt;
    from dnf.yum import history
  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/yum/history.py&quot;, line 28, in &lt;module&gt;
    from . import misc as misc
  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/yum/misc.py&quot;, line 30, in &lt;module&gt;
    import dnf.crypto
  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/crypto.py&quot;, line 29, in &lt;module&gt;
    import gpg
ImportError: No module named &apos;gpg&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82812</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2019-01-17 11:38:42 +0000</bug_when>
    <thetext>Can you reproduce this outside of the autobuilder?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82818</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-01-17 15:41:45 +0000</bug_when>
    <thetext>We&apos;re going to need help to looking into this from people with access to these machines as we aren&apos;t seeing this on the public centos or suse autobuilders. Any idea on what the differences may be or how to reproduce?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82823</commentid>
    <comment_count>3</comment_count>
    <who name="Mohamad Noor Alim">mohamad.noor.alim.hussin</who>
    <bug_when>2019-01-18 01:52:39 +0000</bug_when>
    <thetext>To reproduce this issue. Use machine with centos 7 or opensuse 42.3
1. clone poky
   $ git clone git://git.yoctoproject.org/poky
   $ cd poky; git checkout 1cab405d88149fd63322a867c6adb4a80ba68db3
2. run oe-selftest specifically on wic test cases.
   $ source oe-init-build-env
   $ oe-selftest -r wic.Wic -j 15


NOTE: if we try to build core-image-minimal, bitbake will complain gpg module not exist. Should we install gpg python package on host machine?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82834</commentid>
    <comment_count>4</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-01-22 15:40:22 +0000</bug_when>
    <thetext>Could you retest with the HEAD of the thud branch please? This may be something which has been fixed in the QA changes later in that branch which were not included in 2.6.1 rc1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82835</commentid>
    <comment_count>5</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-01-22 16:55:30 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; Could you retest with the HEAD of the thud branch please? This may be
&gt; something which has been fixed in the QA changes later in that branch which
&gt; were not included in 2.6.1 rc1.

The commit I think that should have addressed this went in 12 Dec and is included in the commit being checkout out.

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=thud&amp;id=920a95e42475d5d4733b1afab03514c000a37e42</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82836</commentid>
    <comment_count>6</comment_count>
    <who name="Mohamad Noor Alim">mohamad.noor.alim.hussin</who>
    <bug_when>2019-01-23 08:43:54 +0000</bug_when>
    <thetext>I retest on thud HEAD, 7022689b109a7e2bb52c76a46d76fd3760658ad0. The result same as reported with no module name &apos;gpg&apos; on both CentOS 7 and opensuse 42.3. I also retest on Ubuntu 18.04 and Fedora 26 but both distos passed. What is missing here?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82849</commentid>
    <comment_count>7</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2019-01-24 16:59:17 +0000</bug_when>
    <thetext>I keep getting confused between &quot;gpg not found&quot; as in the binary executable and &quot;import gpg failed&quot; as in the python module is missing.

The former was fixed by some changes we made but you&apos;re seeing you&apos;re seeing the latter case. dnf is configured to unconditionally depend on gpg so it should always be present. There should be no need to install gpg on the host system and even if you did, that wouldn&apos;t give a python module our python-native could use (since that uses gpg-native, not gpg from the host).

When an error like &quot;  File &quot;/home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native/usr/lib/python3.5/site-packages/dnf/crypto.py&quot;, line 29, in &lt;module&gt;
    import gpg&quot;

occurs, it would be useful to know if there is any gpg* files in /home/user/yocto-worker/oe-selftest/build/build-st-37375/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/recipe-sysroot-native.

The build logs for dnf-native would also be useful to see if gpg was enabled.

I think someone with access to these autobuilders may need to help debug this unfortunately. Ross or Anuj maybe?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82942</commentid>
    <comment_count>8</comment_count>
    <who name="Anuj Mittal">anuj.mittal</who>
    <bug_when>2019-02-01 13:08:41 +0000</bug_when>
    <thetext>I think the problem is that gpgme-native is installing the module in wrong directory. Configure scripts detects the host version of python and installs the module in (in this case) ... /python3.4/site-packages/

Probably works on public autobuilder because host python is also 3.5?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83129</commentid>
    <comment_count>9</comment_count>
    <who name="Mohamad Noor Alim">mohamad.noor.alim.hussin</who>
    <bug_when>2019-02-27 01:51:21 +0000</bug_when>
    <thetext>Close the ticket as I did not see the gpg issue on latest thud branch head with commit id b904775c2b82f110a9e0ae9281be452546916fea.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>83130</commentid>
    <comment_count>10</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2019-02-27 03:04:01 +0000</bug_when>
    <thetext>thanks</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>