Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] rpm: fix for N32 MIPS64
Date: Thu, 26 Nov 2015 08:58:08 -0600	[thread overview]
Message-ID: <56571E00.2040503@windriver.com> (raw)
In-Reply-To: <ffc91bbcddb6b8806c4e4aacaaaf8ea122adc1c1.1448534065.git.liezhi.yang@windriver.com>

On 11/26/15 4:35 AM, Robert Yang wrote:
> It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
> $ file image/usr/bin/getent
> getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
> 
> And "rpm -qp --filecolor" was wrong (it was 1, but should be 4), which
> caused multilib installation error.
> 
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
>  .../rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch   |   34 ++++++++++++++++++++
>  meta/recipes-devtools/rpm/rpm_5.4+cvs.bb           |    1 +
>  meta/recipes-devtools/rpm/rpm_5.4.14.bb            |    1 +
>  3 files changed, 36 insertions(+)
>  create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
> 
> diff --git a/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch b/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
> new file mode 100644
> index 0000000..a516574
> --- /dev/null
> +++ b/meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch
> @@ -0,0 +1,34 @@
> +From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
> +From: Robert Yang <liezhi.yang@windriver.com>
> +Date: Thu, 26 Nov 2015 01:36:40 -0800
> +Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64
> +
> +It is 'N32 MIPS64', not 'N32 MIPS32' as command file shows:
> +$ file image/usr/bin/getent
> +getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
> +
> +And "rpm -qp --filecolor" was wrong (it was 1, but should be 4).
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> +---
> + lib/rpmfc.c |    2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/lib/rpmfc.c b/lib/rpmfc.c
> +index fde00c7..49779f8 100644
> +--- a/lib/rpmfc.c
> ++++ b/lib/rpmfc.c
> +@@ -575,7 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = {
> +   { " not stripped",		RPMFC_NOTSTRIPPED },
> +   { " archive",			RPMFC_ARCHIVE },
> + 
> +-  { "MIPS, N32 MIPS32",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
> ++  { "MIPS, N32 MIPS64",		RPMFC_ELFMIPSN32|RPMFC_INCLUDE },

I mentioned this to Robert off the list as well.  But I believe we need to look
for both N32 MIPS32 and N32 MIPS64 here.

Older versions of file 'magic' (which is what rpmfc.c is looking at) reported
'N32 MIPS32', while it appears newer versions report 'N32 MIPS64'.  So checking
both is my recommendation.  But this does fix an issue where you can't install
both N32 and O32 multilibs without ELF collisions.

--Mark

> +   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
> +   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
> + 
> +-- 
> +1.7.9.5
> +
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
> index 951b251..0d14728 100644
> --- a/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
> +++ b/meta/recipes-devtools/rpm/rpm_5.4+cvs.bb
> @@ -111,6 +111,7 @@ SRC_URI = "cvs://anonymous@rpm5.org/cvs;tag=rpm-5_4;module=rpm \
>  	   file://rpm-rpmpgp-fix.patch \
>  	   file://rpm-disable-Wno-override-init.patch \
>  	   file://rpm-realpath.patch \
> +	   file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
>  	  "
>  
>  # Uncomment the following line to enable platform score debugging
> diff --git a/meta/recipes-devtools/rpm/rpm_5.4.14.bb b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
> index 3930410..8e1d3cb 100644
> --- a/meta/recipes-devtools/rpm/rpm_5.4.14.bb
> +++ b/meta/recipes-devtools/rpm/rpm_5.4.14.bb
> @@ -101,6 +101,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
>  	   file://rpm-opendb-before-verifyscript-to-avoid-null-point.patch \
>  	   file://configure.ac-check-for-both-gpg2-and-gpg.patch \
>  	   file://0001-define-EM_AARCH64.patch \
> +	   file://rpm-rpmfc.c-fix-for-N32-MIPS64.patch \
>  	  "
>  
>  # Uncomment the following line to enable platform score debugging
> 



  reply	other threads:[~2015-11-26 14:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-26 10:35 [PATCH 0/1] rpm: fix for N32 MIPS64 Robert Yang
2015-11-26 10:35 ` [PATCH 1/1] " Robert Yang
2015-11-26 14:58   ` Mark Hatle [this message]
2015-11-27  1:31     ` Robert Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56571E00.2040503@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox