<?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>3786</bug_id>
          
          <creation_ts>2013-01-23 21:31:43 +0000</creation_ts>
          <short_desc>RPM packaging fails for pkgconfig files with &apos;-&apos; in version field</short_desc>
          <delta_ts>2017-07-24 15:12:58 +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>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>OBSOLETE</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>2.4 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Phlip Balister">philip</reporter>
          <assigned_to name="Alexander Kanavin">alex.kanavin</assigned_to>
          <cc>mark.hatle</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>n3npq</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
          
          
          <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>29113</commentid>
    <comment_count>0</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2013-01-23 21:31:43 +0000</bug_when>
    <thetext>When building uhd (from meta-oe) AND enabling rpm packaging the rpm creation fails with an odd error:

.52.0 libstdc++.so.6(GLIBCXX_3.4) libc.so.6 libc.so.6(GLIBC_2.4) libc.so.6(GLIBC_2.9) libc.so.6(GLIBC_2.7) libc.so.6(GLIBC_2.8) libgcc_s.so.1(GCC_4.0.0) libtinfo.so.5 libncurses.so.5
| Processing files: uhd-dbg-3.5.0-r3.0.armv7a_vfp_neon
| Finding  Provides: /home/balister/src/oe-core/build/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/uhd/1_3.5.0-r3.0/uhd.provides
| Finding  Requires: /home/balister/src/oe-core/build/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/uhd/1_3.5.0-r3.0/uhd.requires
| Processing files: uhd-dev-3.5.0-r3.0.armv7a_vfp_neon
| Finding  Provides: /home/balister/src/oe-core/build/tmp-eglibc/work/armv7a-vfp-neon-oe-linux-gnueabi/uhd/1_3.5.0-r3.0/uhd.provides
| error: line 719: Illegal char &apos;-&apos; in EVR:
| 
| error: Failed to find Provides:
| 
| 
| RPM build errors:
|     line 719: Illegal char &apos;-&apos; in EVR:
| 
|     Failed to find Provides:
| DEBUG: Python function do_package_rpm finished


The recipe does find with opkg.

Mark Hatle looked at the uhd rpm files and suggested this:

do_install_append() {
    rm -f ${D}/usr/lib/pkgconfig/uhd.pc
}

This &quot;solves&quot; the problem, but something is not right. Mark asked me to create this bug.

This should be reproducible with just oe-core + meta-oe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29114</commentid>
    <comment_count>1</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-01-23 22:02:03 +0000</bug_when>
    <thetext>I have successfully reproduced the problem.  Reproducer:

download oe-core/bitbake
download meta-openembedded

configure a new build
edit conf/bblayers.conf -- add meta-openembedded/meta-oe

bitbake ncurses
bitbake uhd

(uhd has a minor bug in it&apos;s dependencies, it requires ncurses but does not yet state it.)

Result of the above matches Philip&apos;s comments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29115</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-01-23 22:20:34 +0000</bug_when>
    <thetext>Contents of packages-split/uhd-dev/usr/lib/pkgconfig/uhd.pc:


prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: UHD
Description: Ettus Research - USRP Hardware Driver
URL: http://code.ettus.com/redmine/ettus/projects/uhd/wiki
Version: 003.005.000-0-g5cb9779d
Requires:
Requires.private: 
Conflicts:
Cflags: -I${includedir} 
Libs: -L${libdir} -luhd
Libs.private: 


---

This causes the pkgconfig dependency code to pull out a dep on &quot;Version&quot; 003.005.000-0-g5cb9779d of the &quot;pkgconfig(uhd)&quot;.  RPM is assuming the versioning should be handled by standard rules, which are &quot;version-release&quot;, where &quot;-&quot; is not supported in either version or release.  Thus three &apos;-&apos; means it can&apos;t figure out which is version and which is release, thus the error is generated.

Still don&apos;t have a solution, but I can explain the fault at least.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29149</commentid>
    <comment_count>3</comment_count>
    <who name="Jeff Johnson">n3npq</who>
    <bug_when>2013-01-24 19:59:09 +0000</bug_when>
    <thetext>Probably the most general/simplest fix would
be to add
    ... | tr -- - _
(or equivalent) to the script that extracts the version
from the *.pc file.

The file that needs changing is pkgconfigdeps.sh,
the version is being extracted by these 2 lines

$pkgconfig --print-provides &quot;$filename&quot; 2&gt; /dev/null | while read n r v ; do
...
$pkgconfig --print-requires &quot;$filename&quot; 2&gt; /dev/null | while read n r v ; do

and you would need to split out the EVR field and change
all &apos;-&apos; dash characters to &apos;_&apos; underscore characters in the EVR field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29150</commentid>
    <comment_count>4</comment_count>
    <who name="Phlip Balister">philip</who>
    <bug_when>2013-01-24 20:05:30 +0000</bug_when>
    <thetext>I received this in the email also:


--- host/cmake/Modules/UHDVersion.cmake	2013-01-24 16:11:20.956506736 +0100
+++ host.b/cmake/Modules/UHDVersion.cmake	2013-01-24 17:11:22.966407775 +0100
@@ -69,7 +69,7 @@ ENDIF()
 
 ########################################################################
 IF(UHD_RELEASE_MODE STREQUAL &quot;release&quot;)
-    SET(UHD_VERSION &quot;${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_HASH}&quot;)
+    SET(UHD_VERSION &quot;${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}+${UHD_GIT_HASH}&quot;)
 ELSE()
-    SET(UHD_VERSION &quot;${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}-${UHD_GIT_COUNT}-${UHD_GIT_HASH}&quot;)
+    SET(UHD_VERSION &quot;${UHD_VERSION_MAJOR}.${UHD_VERSION_MINOR}.${UHD_VERSION_PATCH}+${UHD_GIT_COUNT}+${UHD_GIT_HASH}&quot;)
 ENDIF()


This patches uhd to avoid the problem. I&apos;ll discuss with the UHD maintainer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29151</commentid>
    <comment_count>5</comment_count>
    <who name="Jeff Johnson">n3npq</who>
    <bug_when>2013-01-24 20:07:58 +0000</bug_when>
    <thetext>Actually all the splitting is done: just wrap
a back ticked sed/tr onto the $v field in the
two places that look like
    echo &quot;pkgconfig($n) $r $v&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>29152</commentid>
    <comment_count>6</comment_count>
    <who name="Jeff Johnson">n3npq</who>
    <bug_when>2013-01-24 20:09:03 +0000</bug_when>
    <thetext>Yes changing the Version: string also Just Works
(but doesn&apos;t solve the problem generally and is
out-of-scope as an RPM &quot;fix&quot;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>30051</commentid>
    <comment_count>7</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-02-22 20:01:26 +0000</bug_when>
    <thetext>The original problem was resolved by a change to UHD.  The underlying issue still needs to be resolved via a patch to the pkgconfig scanning code in rpmdeps.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32800</commentid>
    <comment_count>8</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-04-30 23:19:27 +0000</bug_when>
    <thetext>We will work on this for the 1.5 release.  The workaround should be good enough for 1.4, and the issue is fairly rare.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34622</commentid>
    <comment_count>9</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-07-16 18:01:55 +0000</bug_when>
    <thetext>Not deployment, bug in RPM integration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42044</commentid>
    <comment_count>10</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2014-04-01 14:49:17 +0000</bug_when>
    <thetext>We&apos;ve had no more reports of this.. but it should be fixed.  Moving it forward to 1.7.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75195</commentid>
    <comment_count>11</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2017-07-20 15:27:40 +0000</bug_when>
    <thetext>Alex: Could you check if we have this issue with rpmdeps in rpm v4 please?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75255</commentid>
    <comment_count>12</comment_count>
    <who name="Alexander Kanavin">alex.kanavin</who>
    <bug_when>2017-07-24 15:12:58 +0000</bug_when>
    <thetext>I have baked a version with two dashes into sqlite3.pc.in file, and rpm4 had no problem with that (maybe it doesn&apos;t look into .pc files at all anymore?). I&apos;d say RESOLVED/OBSOLETE.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>