Skip to contentSkip to conversation

rpm: fix for N32 MIPS64

PATCH In review Robert Yang 2 participants 4 messages Nov 26, 2015 – Nov 27, 2015

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 rpm: fix for N32 MIPS64

In reply to Robert Yang

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.

---
 .../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
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +34 -0
new file mode 100644
index 0000000..a516574
@@ -0,0 +1,34 @@
+From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+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 <[email protected]>
+---
+ 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 },
+   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
+ 
+-- 
+1.7.9.5
+
meta/recipes-devtools/rpm/rpm_5.4+cvs.bb +1 -0
index 951b251..0d14728 100644
@@ -111,6 +111,7 @@ SRC_URI = "cvs://[email protected]/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
meta/recipes-devtools/rpm/rpm_5.4.14.bb +1 -0
index 3930410..8e1d3cb 100644
@@ -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
Signature · 1 line
1.7.9.5
#0 lore raw

cover rpm: fix for N32 MIPS64

The following changes since commit 80b3974081c4a8c604e23982a6db8fb32c616058:

sstate: Ensure siginfo and sig files are also touched (2015-11-25 08:08:51 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/n32
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/n32

Robert Yang (1):
rpm: fix for N32 MIPS64

 .../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
Signature · 1 line
1.7.9.5
#2 lore raw
In reply to Robert Yang
Quoted 39 lines · Robert Yang

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.

---
 .../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
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +18 -0
new file mode 100644
index 0000000..a516574
@@ -0,0 +1,34 @@
+From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+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 <[email protected]>
+---
+ lib/rpmfc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+

meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch line 28

Quoted 10 lines
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +10 -0
+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

Quoted 31 lines
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +6 -0
+   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
+ 
+-- 
+1.7.9.5
+
meta/recipes-devtools/rpm/rpm_5.4+cvs.bb +1 -0
index 951b251..0d14728 100644
@@ -111,6 +111,7 @@ SRC_URI = "cvs://[email protected]/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
meta/recipes-devtools/rpm/rpm_5.4.14.bb +1 -0
index 3930410..8e1d3cb 100644
@@ -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
#3 lore raw

Thanks, updated in the repo:

git://git.openembedded.org/openembedded-core-contrib rbt/n32

commit b817f6b15376e9fc95c6ab50c6dae825a6c81ce6

Author: Robert Yang <[email protected]>
Date:   Thu Nov 26 02:05:17 2015 -0800

rpm: fix for N32 MIPS64

Issue: LIN8-1726

Older versions of 'file' reported it as N32 MIPS32, newer versions are reporting it as N32 MIPS64. So we should check for both.

$ file image/usr/bin/getent
getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]

(LOCAL REV: NOT UPSTREAM) -- Sent to oe-core on 20151126

meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +33 -0
new file mode 100644
index 0000000..99cdf85
@@ -0,0 +1,33 @@
+From e864ec768ad0736bddcd951b2db8fe12c7b30e4e Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Thu, 26 Nov 2015 01:36:40 -0800
+Subject: [PATCH] lib/rpmfc.c: fix for N32 MIPS64
+
+Older versions of 'file' reported it as N32 MIPS32, newer versions are
+reporting it as N32 MIPS64. So we should check for both.
+
+$ file image/usr/bin/getent
+getent: ELF 32-bit MSB executable, MIPS, N32 MIPS64 [snip]
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ lib/rpmfc.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/lib/rpmfc.c b/lib/rpmfc.c
+index fde00c7..c9c82bf 100644
+--- a/lib/rpmfc.c
++++ b/lib/rpmfc.c
+@@ -575,6 +575,7 @@ static struct rpmfcTokens_s rpmfcTokens[] = {
+   { " not stripped",          RPMFC_NOTSTRIPPED },
+   { " archive",                       RPMFC_ARCHIVE },
+
++  { "MIPS, N32 MIPS64",               RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+   { "MIPS, N32 MIPS32",               RPMFC_ELFMIPSN32|RPMFC_INCLUDE },
+   { "ELF 32-bit",             RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",             RPMFC_ELF64|RPMFC_INCLUDE },
+--
+1.7.9.5
+
meta/recipes-devtools/rpm/rpm_5.4+cvs.bb +1 -0
index 951b251..0d14728 100644
@@ -111,6 +111,7 @@ SRC_URI = "cvs://[email protected]/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
meta/recipes-devtools/rpm/rpm_5.4.14.bb +1 -0
index 3930410..8e1d3cb 100644
@@ -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

// Robert

Quoted 93 lines · Mark Hatle
Quoted 39 lines · Robert Yang

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.

---
  .../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

meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +18 -0
new file mode 100644
index 0000000..a516574
@@ -0,0 +1,34 @@
+From 16dc683aa50be9789d1674734b06a8a955ff22ad Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+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 <[email protected]>
+---
+ lib/rpmfc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+

meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch line 28

Quoted 10 lines
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +10 -0
+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

Quoted 31 lines
meta/recipes-devtools/rpm/rpm/rpm-rpmfc.c-fix-for-N32-MIPS64.patch new file +6 -0
+   { "ELF 32-bit",		RPMFC_ELF32|RPMFC_INCLUDE },
+   { "ELF 64-bit",		RPMFC_ELF64|RPMFC_INCLUDE },
+
+--
+1.7.9.5
+
meta/recipes-devtools/rpm/rpm_5.4+cvs.bb +1 -0
index 951b251..0d14728 100644
@@ -111,6 +111,7 @@ SRC_URI = "cvs://[email protected]/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
meta/recipes-devtools/rpm/rpm_5.4.14.bb +1 -0
index 3930410..8e1d3cb 100644
@@ -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