Skip to contentSkip to conversation

rpm: resolve a host contamination issue for mono packaging

PATCH In review Alexander Kanavin 2 participants 3 messages Aug 27, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rpm: resolve a host contamination issue for mono packaging

---
 ...es-requires-do-not-use-monodis-from-.patch | 58 +++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_4.14.2.1.bb     |  1 +
 2 files changed, 59 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch new file +58 -0
new file mode 100644
index 00000000000..24aa4c7ffff
@@ -0,0 +1,58 @@
+From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Tue, 27 Aug 2019 17:42:34 +0200
+Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
+
+There was a host contamination issue here: if monodis was installed
+on the host, do_package would use that to resolve dependencies
+of mono libraries (and often fail in that). Without monodis,
+no dependencies are resolved, which is seemingly how things
+are supposed to work.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ scripts/mono-find-provides | 8 ++++----
+ scripts/mono-find-requires | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
+index 9348457d3..b28872ffb 100644
+--- a/scripts/mono-find-provides
++++ b/scripts/mono-find-provides
+@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
+ build_bindir="$2/usr/bin"
+ build_libdir="$2$3"
+ 
+-if [ -x $build_bindir/monodis ]; then
+-    monodis="$build_bindir/monodis"
++if [ -x $build_bindir/monodis.bogus ]; then
++    monodis="$build_bindir/monodis.bogus"
+     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+-elif [ -x /usr/bin/monodis ]; then
+-    monodis="/usr/bin/monodis"
++elif [ -x /usr/bin/monodis.bogus ]; then
++    monodis="/usr/bin/monodis.bogus"
+ else
+     exit 0;
+ fi
+diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
+index ea58cae48..d270169e1 100644
+--- a/scripts/mono-find-requires
++++ b/scripts/mono-find-requires
+@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
+ build_bindir="$2/usr/bin"
+ build_libdir="$2$3"
+ 
+-if [ -x $build_bindir/monodis ]; then
+-    monodis="$build_bindir/monodis"
++if [ -x $build_bindir/monodis.bogus ]; then
++    monodis="$build_bindir/monodis.bogus"
+     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+-elif [ -x /usr/bin/monodis ]; then
+-    monodis="/usr/bin/monodis"
++elif [ -x /usr/bin/monodis.bogus ]; then
++    monodis="/usr/bin/monodis.bogus"
+ else
+     exit 0;
+ fi
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1 -0
index 063f4269a57..c37330eb4c6 100644
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
            file://0001-perl-disable-auto-reqs.patch \
            file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
            file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
+           file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
            "
 
 PE = "1"
Signature · 1 line
2.17.1
#1 lore raw
Quoted 6 lines · Alexander Kanavin
---
 ...es-requires-do-not-use-monodis-from-.patch | 58 +++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_4.14.2.1.bb     |  1 +
 2 files changed, 59 insertions(+)
 create mode 100644 meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch

Instead of hacking with with different names that (shouldn't or) don't exist.. It would be better to just disable the mono-find-* wouldn't it?

If that is the case..

In the fileattrs/mono.attr directory, just remove mono.attr or comment out all of the lines.

--Mark

Quoted 77 lines
meta/recipes-devtools/rpm/files/0001-mono-find-provides-requires-do-not-use-monodis-from-.patch new file +58 -0
new file mode 100644
index 00000000000..24aa4c7ffff
@@ -0,0 +1,58 @@
+From 43fbc3f53302a395463e8450ac81c53f623eec3f Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Tue, 27 Aug 2019 17:42:34 +0200
+Subject: [PATCH] mono-find-provides/requires: do not use monodis from the host
+
+There was a host contamination issue here: if monodis was installed
+on the host, do_package would use that to resolve dependencies
+of mono libraries (and often fail in that). Without monodis,
+no dependencies are resolved, which is seemingly how things
+are supposed to work.
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ scripts/mono-find-provides | 8 ++++----
+ scripts/mono-find-requires | 8 ++++----
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/scripts/mono-find-provides b/scripts/mono-find-provides
+index 9348457d3..b28872ffb 100644
+--- a/scripts/mono-find-provides
++++ b/scripts/mono-find-provides
+@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
+ build_bindir="$2/usr/bin"
+ build_libdir="$2$3"
+ 
+-if [ -x $build_bindir/monodis ]; then
+-    monodis="$build_bindir/monodis"
++if [ -x $build_bindir/monodis.bogus ]; then
++    monodis="$build_bindir/monodis.bogus"
+     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+-elif [ -x /usr/bin/monodis ]; then
+-    monodis="/usr/bin/monodis"
++elif [ -x /usr/bin/monodis.bogus ]; then
++    monodis="/usr/bin/monodis.bogus"
+ else
+     exit 0;
+ fi
+diff --git a/scripts/mono-find-requires b/scripts/mono-find-requires
+index ea58cae48..d270169e1 100644
+--- a/scripts/mono-find-requires
++++ b/scripts/mono-find-requires
+@@ -18,11 +18,11 @@ monolist=($(printf "%s\n" "${filelist[@]}" | grep -E "\\.(exe|dll)\$"))
+ build_bindir="$2/usr/bin"
+ build_libdir="$2$3"
+ 
+-if [ -x $build_bindir/monodis ]; then
+-    monodis="$build_bindir/monodis"
++if [ -x $build_bindir/monodis.bogus ]; then
++    monodis="$build_bindir/monodis.bogus"
+     export LD_LIBRARY_PATH=$build_libdir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+-elif [ -x /usr/bin/monodis ]; then
+-    monodis="/usr/bin/monodis"
++elif [ -x /usr/bin/monodis.bogus ]; then
++    monodis="/usr/bin/monodis.bogus"
+ else
+     exit 0;
+ fi
meta/recipes-devtools/rpm/rpm_4.14.2.1.bb +1 -0
index 063f4269a57..c37330eb4c6 100644
@@ -41,6 +41,7 @@ SRC_URI = "git://github.com/rpm-software-management/rpm;branch=rpm-4.14.x \
            file://0001-perl-disable-auto-reqs.patch \
            file://0001-rpm-rpmio.c-restrict-virtual-memory-usage-if-limit-s.patch \
            file://0016-rpmscript.c-change-logging-level-around-scriptlets-t.patch \
+           file://0001-mono-find-provides-requires-do-not-use-monodis-from-.patch \
            "
 
 PE = "1"
#2 lore raw
Quoted 10 lines · Mark Hatle

Instead of hacking with with different names that (shouldn't or) don't exist..
It would be better to just disable the mono-find-* wouldn't it?

If that is the case..

In the fileattrs/mono.attr directory, just remove mono.attr or comment out all
of the lines.

The upcoming rpm 4.15 does exactly that (remove mono.attr and dependent files altogether), so maybe it's not worth the time to improve this patch.

Alex