Skip to contentSkip to conversation

rpm: Enable MIPS64 N32 transactions

PATCH In review Robert Yang 2 participants 4 messages Dec 2, 2015

lore
Share & tools
lore
#0 lore raw

cover rpm: Enable MIPS64 N32 transactions

The following changes since commit 687e5ef86361a16d6c411386939d4ba96a5909ea:

libsdl: remove redundant configure_tweak patch (2015-12-01 21:31:04 +0000)

are available in the git repository at:

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

Mark Hatle (1):
rpm_5.4.14: Enable MIPS64 N32 transactions

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

 ...ction.c-fix-file-conflicts-for-mips64-N32.patch |   43 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.14.bb            |    4 ++
 2 files changed, 47 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 rpm_5.4.14: Enable MIPS64 N32 transactions

From: Mark Hatle <[email protected]>

In a multilib install RPM will break a conflict using the transaction color. However, by default MIPS64 N32 transactions are not enabled.

This change always enables them. This is effectively a no-op on non-MIPS systems, and required if we need to support N32 on MIPS.

---
 meta/recipes-devtools/rpm/rpm_5.4.14.bb |    3 +++
 1 file changed, 3 insertions(+)
meta/recipes-devtools/rpm/rpm_5.4.14.bb +3 -0
index 8e1d3cb..b0e67c5 100644
@@ -409,6 +409,9 @@ do_install_append() {
 	sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
 	sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
 
+	# Enable MIPS64 N32 transactions.  (This is a no-op on non-MIPS targets.)
+	sed -i -e 's,%_transaction_color[^_].*,%_transaction_color 7,' ${D}/${libdir}/rpm/macros
+
 	# Enable Debian style arbitrary tags...
 	sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH 2/2 rpm: fix file conflicts for MIPS64 N32

In reply to Robert Yang

Fixed:
1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
2) smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32

This was because when elf file is MIPS64 N32:
FColor = 0x100 & 111 = 100
Now 100 != 0 then error happened, the similar to oFColor. Check whether FColor == 4 will fix the problem.

Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as installed).

---
 ...ction.c-fix-file-conflicts-for-mips64-N32.patch |   43 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.14.bb            |    1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch new file +43 -0
new file mode 100644
index 0000000..150afcf
@@ -0,0 +1,43 @@
+From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Wed, 2 Dec 2015 00:56:07 -0800
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+Fixed:
+1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
+2) smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
+error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
+error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
+
+This was because when elf file is MIPS64 N32:
+FColor = 0x100 & 111 = 100
+Now 100 != 0 then error happened, the similar to oFColor. Check whether
+FColor == 4 will fix the problem.
+
+Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
+installed).
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ lib/transaction.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index fa60006..c4d84bb 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -420,7 +420,8 @@ assert(otherFi != NULL);
+ 			fi->actions[i] = FA_SKIPCOLOR;
+ 			rConflicts = 0;
+ 		    } else
+-		    if (FColor == 0 && oFColor == 0) {
++		    /* ... 4 is for MIPS64 N32, and prefcolor != 4 goes here. ... */
++		    if ((FColor == 0 && oFColor == 0) || FColor == 4 || oFColor == 4) {
+ 			/* ... otherwise, do both, last in wins. */
+ 			otherFi->actions[otherFileNum] = FA_CREATE;
+ 			fi->actions[i] = FA_CREATE;
+-- 
+1.7.9.5
+
meta/recipes-devtools/rpm/rpm_5.4.14.bb +1 -0
index b0e67c5..56f36bf 100644
@@ -102,6 +102,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
 	   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 \
+	   file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
 	  "
 
 # Uncomment the following line to enable platform score debugging
Signature · 1 line
1.7.9.5
#3 lore raw

Re: [PATCH 2/2] rpm: fix file conflicts for MIPS64 N32

FYI, expect a 'v2' version of this. We found some further issues.

The previous patch 1/2 is correct and won't change.

--Mark

Quoted 83 lines · Robert Yang

Fixed:
1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
2) smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32

This was because when elf file is MIPS64 N32:
FColor = 0x100 & 111 = 100
Now 100 != 0 then error happened, the similar to oFColor. Check whether FColor == 4 will fix the problem.

Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as installed).

---
 ...ction.c-fix-file-conflicts-for-mips64-N32.patch |   43 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.14.bb            |    1 +
 2 files changed, 44 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch
meta/recipes-devtools/rpm/rpm/rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch new file +43 -0
new file mode 100644
index 0000000..150afcf
@@ -0,0 +1,43 @@
+From 67ec7531e6297200eaa97ef917d49b0a75876cb4 Mon Sep 17 00:00:00 2001
+From: Robert Yang <[email protected]>
+Date: Wed, 2 Dec 2015 00:56:07 -0800
+Subject: [PATCH] lib/transaction.c: fix file conflicts for MIPS64 N32
+
+Fixed:
+1) set %_transaction_color 7 in lib/rpm/macros to install MIPS64 N32
+2) smart install libc6-2.22-r0.1@lib32_mips32r2octeon3 libc6-dbg-2.22-r0.1@lib32_mips32r2octeon3
+error: file /sbin/ldconfig conflicts between attempted installs of libc6-2.22-r0.1.lib32_mips32r2octeon3 and libc6-2.22-r0.1.octeon3_n32
+error: file /sbin/.debug/ldconfig conflicts between attempted installs of libc6-dbg-2.22-r0.1.lib32_mips32r2octeon3 and libc6-dbg-2.22-r0.1.octeon3_n32
+
+This was because when elf file is MIPS64 N32:
+FColor = 0x100 & 111 = 100
+Now 100 != 0 then error happened, the similar to oFColor. Check whether
+FColor == 4 will fix the problem.
+
+Note, if _transaction_color is 3, MIPS64 N32 will be skipped (pretend as
+installed).
+
+Upstream-Status: Pending
+
+Signed-off-by: Robert Yang <[email protected]>
+---
+ lib/transaction.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/transaction.c b/lib/transaction.c
+index fa60006..c4d84bb 100644
+--- a/lib/transaction.c
++++ b/lib/transaction.c
+@@ -420,7 +420,8 @@ assert(otherFi != NULL);
+ 			fi->actions[i] = FA_SKIPCOLOR;
+ 			rConflicts = 0;
+ 		    } else
+-		    if (FColor == 0 && oFColor == 0) {
++		    /* ... 4 is for MIPS64 N32, and prefcolor != 4 goes here. ... */
++		    if ((FColor == 0 && oFColor == 0) || FColor == 4 || oFColor == 4) {
+ 			/* ... otherwise, do both, last in wins. */
+ 			otherFi->actions[otherFileNum] = FA_CREATE;
+ 			fi->actions[i] = FA_CREATE;
+-- 
+1.7.9.5
+
meta/recipes-devtools/rpm/rpm_5.4.14.bb +1 -0
index b0e67c5..56f36bf 100644
@@ -102,6 +102,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.14-0.20131024.src.rpm;e
 	   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 \
+	   file://rpm-lib-transaction.c-fix-file-conflicts-for-mips64-N32.patch \
 	  "
 
 # Uncomment the following line to enable platform score debugging