<?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>4452</bug_id>
          
          <creation_ts>2013-05-06 17:29:17 +0000</creation_ts>
          <short_desc>rpm %install target fails because of incorrect __mkdir_p macro on x86 32bit only</short_desc>
          <delta_ts>2013-05-22 16:26:18 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>Package Management Issues</product>
          <component>RPM</component>
          <version>1.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>x86</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>major</bug_severity>
          <target_milestone>1.4.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Mohring">martin.mohring</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>martin.mohring</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>32896</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Mohring">martin.mohring</who>
    <bug_when>2013-05-06 17:29:17 +0000</bug_when>
    <thetext>rpms macro file in:

/usr/lib/rpm/macros:%__mkdir_p           /usr/bin/mkdir -p

sets mkdir_p to /usr/bin/mkdir instead of /bin/mkdir.

%install is not optional, so all rpm builds fail.

This is only on x86 32bit target, all other targets work.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32897</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-05-06 18:02:23 +0000</bug_when>
    <thetext>More information is needed here. I just did a build and it has the correct path which is set via the db_cv_path_mkdir in meta/site/common-linux file.

Can you attach your config.log file your rpm build? This file would be in the tmp/work/&lt;arch&gt;/rpm/&lt;version&gt;/build dir (if you are using 1.4).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32898</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Hatle">mark.hatle</who>
    <bug_when>2013-05-06 18:27:12 +0000</bug_when>
    <thetext>Note: This defect appears to be referring to &apos;rpmbuild&apos; when running -on the target-.

Martin, please verify this is correct.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32899</commentid>
    <comment_count>3</comment_count>
    <who name="Martin Mohring">martin.mohring</who>
    <bug_when>2013-05-06 18:32:41 +0000</bug_when>
    <thetext>I found the problem in the package from

http://downloads.yoctoproject.org/releases/yocto/yocto-1.4/rpm/i586/rpm-5.4.9-r62.i586.rpm

/usr/lib/rpm/macros

line 110

%__mkdir_p /usr/bin/mkdir -p

Maybe a borked release file ?

I could *not find this* in the other architectures...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32900</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Mohring">martin.mohring</who>
    <bug_when>2013-05-06 18:56:37 +0000</bug_when>
    <thetext>And on your question: yes, error occurs when rpm is run on the target.

In this case: rpmbuild is called.

I setup a chroot of the rpm packages from said location on the yocto release server, http://downloads.yoctoproject.org/releases/yocto/yocto-1.4/rpm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>32924</commentid>
    <comment_count>5</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2013-05-07 15:34:36 +0000</bug_when>
    <thetext>From 59fcb2a92b5928c3178b03701cf342ba8a6cac37 Mon Sep 17 00:00:00 2001
From: Poky Build User &lt;pokybuild@ab06.i.yoctoproject.org&gt;
Date: Tue, 7 May 2013 15:22:37 +0000
Subject: [PATCH] rpm: ensure __mkdir_p matches __mkdir

They differ at times because one is set from the db_cv_path_mkdir and the other is
found during config time for the host (/usr/bin/mkdir), in the macros we should just
use __mkdir for the __mkdir_p variant.

[YOCTO #4452]

Signed-off-by: Poky Build User &lt;pokybuild@ab06.i.yoctoproject.org&gt;
---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-devtools/rpm/rpm_5.4.9.bb b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
index 7d2cba4..24f0d3c 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.9.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.9.bb
@@ -359,6 +359,7 @@ FILES_${PN}-staticdev = &quot; \
 do_configure() {
 	# Disable tests!
 	echo &quot;all:&quot; &gt; ${S}/tests/Makefile.am
+	sed -e &apos;s/@__MKDIR_P@/%{__mkdir} -p/&apos; -i ${S}/macros/macros.in
 
 	( cd ${S}; ${S}/autogen.sh )
 
-- 
1.8.1.4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>33211</commentid>
    <comment_count>6</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2013-05-22 16:26:18 +0000</bug_when>
    <thetext>Fix has been merged into master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b34cf7ea4e59707283f786e9195b617bb4d5908a

and also dylan (for 1.4.1):

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?h=dylan&amp;id=3c138bc962ffc7103498bf6d9e8a2e42a8a3c967</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>