* [PATCH 1/2] multilib_script: Add support for multilib scripts
@ 2018-07-30 22:25 Richard Purdie
2018-07-30 22:25 ` [PATCH 2/2] libtool: Fix problem with libtoolize in multilib installations Richard Purdie
2018-07-30 22:32 ` ✗ patchtest: failure for "multilib_script: Add support f..." and 1 more Patchwork
0 siblings, 2 replies; 3+ messages in thread
From: Richard Purdie @ 2018-07-30 22:25 UTC (permalink / raw)
To: openembedded-core
Whilst the package managers handle multilib ELF binaries well, they don't
handle scripts in the *bindir directories well. This adds support for
marking these up so that they can be handled using update-alternatives.
Its done this way so that non-multilib systems don't see any changes and
there is standardisation amongst the multilibs on how the alternatives are
named and prioritiesd. The priotitisation code needs to be added but this
change means there is somewhere to add it.
Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g.
MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2"
to indicate which script files to process from which packages.
libtool is used a as a reference to stop the libtool scripts conflicting
in a multilib case and allows the kernel-devsrc change to be merged.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
meta/classes/multilib_script.bbclass | 32 +++++++++++++++++++
.../recipes-devtools/libtool/libtool_2.4.6.bb | 4 +++
2 files changed, 36 insertions(+)
create mode 100644 meta/classes/multilib_script.bbclass
diff --git a/meta/classes/multilib_script.bbclass b/meta/classes/multilib_script.bbclass
new file mode 100644
index 00000000000..a5a552b7163
--- /dev/null
+++ b/meta/classes/multilib_script.bbclass
@@ -0,0 +1,32 @@
+#
+# Recipe needs to set MULTILIB_SCRIPTS in the form <pkgname>:<scriptname>, e.g.
+# MULTILIB_SCRIPTS = "${PN}-dev:${bindir}/file1 ${PN}:${base_bindir}/file2"
+# to indicate which script files to process from which packages.
+#
+
+inherit update-alternatives
+
+MULTILIB_SUFFIX = "${@d.getVar('base_libdir',1).split('/')[-1]}"
+
+PACKAGE_PREPROCESS_FUNCS += "multilibscript_rename"
+
+multilibscript_rename() {
+ :
+}
+
+python () {
+ # Do nothing if multilib isn't being used
+ if not d.getVar("MULTILIB_VARIANTS"):
+ return
+ # Do nothing for native/cross
+ if bb.data.inherits_class('native', d) or bb.data.inherits_class('cross', d):
+ return
+
+ for entry in (d.getVar("MULTILIB_SCRIPTS", False) or "").split():
+ pkg, script = entry.split(":")
+ scriptname = os.path.basename(script)
+ d.setVar("ALTERNATIVE_" + pkg, scriptname)
+ d.setVarFlag("ALTERNATIVE_LINK_NAME", scriptname, script)
+ d.setVarFlag("ALTERNATIVE_TARGET", scriptname, script + "-${MULTILIB_SUFFIX}")
+ d.appendVar("multilibscript_rename", "\n mv ${PKGD}" + script + " ${PKGD}" + script + "-${MULTILIB_SUFFIX}")
+}
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index b02620b4b41..b8a52408853 100644
--- a/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -26,3 +26,7 @@ do_install_append () {
-e "s@${HOSTTOOLS_DIR}/@@g" \
-i ${D}${bindir}/libtool
}
+
+inherit multilib_script
+
+MULTILIB_SCRIPTS = "${PN}:${bindir}/libtool"
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 2/2] libtool: Fix problem with libtoolize in multilib installations
2018-07-30 22:25 [PATCH 1/2] multilib_script: Add support for multilib scripts Richard Purdie
@ 2018-07-30 22:25 ` Richard Purdie
2018-07-30 22:32 ` ✗ patchtest: failure for "multilib_script: Add support f..." and 1 more Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Richard Purdie @ 2018-07-30 22:25 UTC (permalink / raw)
To: openembedded-core
Without this patch /usr/bin/libtoolize is different for each multilib
since their host-triplets are different, despite there being no difference in
the functionality of libtoolize itself.
This change just patches out the problematic line since its just a comment for the user
in help text. Ugly but solves the problem. This fixes issues where libtool and
libXX-libtool couldn't be installed into the same system.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
.../libtool/libtool/multilib.patch | 23 +++++++++++++++++++
.../recipes-devtools/libtool/libtool_2.4.6.bb | 2 ++
2 files changed, 25 insertions(+)
create mode 100644 meta/recipes-devtools/libtool/libtool/multilib.patch
diff --git a/meta/recipes-devtools/libtool/libtool/multilib.patch b/meta/recipes-devtools/libtool/libtool/multilib.patch
new file mode 100644
index 00000000000..c4794113efe
--- /dev/null
+++ b/meta/recipes-devtools/libtool/libtool/multilib.patch
@@ -0,0 +1,23 @@
+Without this patch /usr/bin/libtoolize is different for each multilib
+since their host-triplets are different, despite there being no difference in
+the functionality of libtoolize itself.
+
+Ugly, but just patch this out. This fixes issues where libtool and
+libXX-libtool couldn't be installed into the same system.
+
+Upstream-Status: Inapproriate
+RP 2018/7/30
+
+Index: libtool-2.4.6/libtoolize.in
+===================================================================
+--- libtool-2.4.6.orig/libtoolize.in
++++ libtool-2.4.6/libtoolize.in
+@@ -113,7 +113,7 @@ You must 'cd' to the top directory of yo
+ When reporting a bug, please describe a test case to reproduce it and
+ include the following information:
+
+- host-triplet: @host_triplet@
++ host-triplet <redacted>
+ version: $progname (GNU @PACKAGE@) @VERSION@
+ automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q`
+ autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q`
diff --git a/meta/recipes-devtools/libtool/libtool_2.4.6.bb b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
index b8a52408853..f5fdd00e5ee 100644
--- a/meta/recipes-devtools/libtool/libtool_2.4.6.bb
+++ b/meta/recipes-devtools/libtool/libtool_2.4.6.bb
@@ -1,5 +1,7 @@
require libtool-${PV}.inc
+SRC_URI += "file://multilib.patch"
+
RDEPENDS_${PN} += "bash"
#
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* ✗ patchtest: failure for "multilib_script: Add support f..." and 1 more
2018-07-30 22:25 [PATCH 1/2] multilib_script: Add support for multilib scripts Richard Purdie
2018-07-30 22:25 ` [PATCH 2/2] libtool: Fix problem with libtoolize in multilib installations Richard Purdie
@ 2018-07-30 22:32 ` Patchwork
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2018-07-30 22:32 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
== Series Details ==
Series: "multilib_script: Add support f..." and 1 more
Revision: 1
URL : https://patchwork.openembedded.org/series/13308/
State : failure
== Summary ==
Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:
* Issue A patch file has been added, but does not have a Signed-off-by tag [test_signed_off_by_presence]
Suggested fix Sign off the added patch file (meta/recipes-devtools/libtool/libtool/multilib.patch)
* Issue Upstream-Status is in incorrect format [test_upstream_status_presence_format]
Suggested fix Fix Upstream-Status format in multilib.patch
Current Upstream-Status: Inapproriate
Standard format Upstream-Status: <Valid status>
Valid status Pending, Accepted, Backport, Denied, Inappropriate [reason], Submitted [where]
If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).
---
Guidelines: https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-07-30 22:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-30 22:25 [PATCH 1/2] multilib_script: Add support for multilib scripts Richard Purdie
2018-07-30 22:25 ` [PATCH 2/2] libtool: Fix problem with libtoolize in multilib installations Richard Purdie
2018-07-30 22:32 ` ✗ patchtest: failure for "multilib_script: Add support f..." and 1 more Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox