All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] multilib: Fix and improve support in musl and glibc
@ 2018-12-17 22:29 Serhey Popovych
  2018-12-17 22:29 ` [PATCH 1/2] musl: Fix ldd symlink install in case of multilib Serhey Popovych
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Serhey Popovych @ 2018-12-17 22:29 UTC (permalink / raw)
  To: openembedded-core

Both changes target ldd helper handling in packages:

  1) For musl this fixes do_install error where ldd provided in both
     main target and multilib packages.

  2) For glibc make behaviour inline with musl by providing ldd
     via RRECOMMENDS and avoid filename clash as fixed in 1) for musl.

Build tested on IBM POWER8 running RHEL7 machine for ppc64p5 as main
target and ppcp5 as multilib with package lib32-glib-2.0 from Yocto
manual.

Boot tested as KVM-HV guest on IBM POWER8 machine.

Serhey Popovych (2):
  musl: Fix ldd symlink install in case of multilib
  glibc: Rename ldd in multilib package

 meta/recipes-core/glibc/glibc-package.inc | 7 ++++++-
 meta/recipes-core/musl/musl_git.bb        | 5 +++--
 2 files changed, 9 insertions(+), 3 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] musl: Fix ldd symlink install in case of multilib
  2018-12-17 22:29 [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych
@ 2018-12-17 22:29 ` Serhey Popovych
  2018-12-17 22:29 ` [PATCH 2/2] glibc: Rename ldd in multilib package Serhey Popovych
  2019-01-12 10:19 ` [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych
  2 siblings, 0 replies; 4+ messages in thread
From: Serhey Popovych @ 2018-12-17 22:29 UTC (permalink / raw)
  To: openembedded-core

Otherwise dnf install lib32-musl and musl will fail with below error:

  ERROR: core-image-sato-1.0-r0 do_rootfs: Could not invoke dnf.
  ...
  Error: Transaction check error:
    file /usr/bin/ldd.musl conflicts between attempted installs of \
  musl-1.1.20+git0+39ef612aa1-r0.ppc64p8 and \
  lib32-musl-1.1.20+git0+39ef612aa1-r0.ppcp8
  ...

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
---
 meta/recipes-core/musl/musl_git.bb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 9cc875c..80dd9f2 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -61,8 +61,9 @@ do_install() {
 	oe_runmake install DESTDIR='${D}'
 
 	install -d ${D}${bindir}
-	rm -f ${D}${bindir}/ldd
-	lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
+	[ -n "${MLPREFIX}" ] && LDD="ldd.${PN}" || LDD="ldd"
+	rm -f ${D}${bindir}/${LDD}
+	lnr ${D}${libdir}/libc.so ${D}${bindir}/${LDD}
 	lnr ${D}${libdir}/libc.so ${D}${GLIBC_LDSO}
 	for l in crypt dl m pthread resolv rt util xnet
 	do
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] glibc: Rename ldd in multilib package
  2018-12-17 22:29 [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych
  2018-12-17 22:29 ` [PATCH 1/2] musl: Fix ldd symlink install in case of multilib Serhey Popovych
@ 2018-12-17 22:29 ` Serhey Popovych
  2019-01-12 10:19 ` [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych
  2 siblings, 0 replies; 4+ messages in thread
From: Serhey Popovych @ 2018-12-17 22:29 UTC (permalink / raw)
  To: openembedded-core

This is symmetrical to musl change that renames ldd to ldd.${PN} for
multilib package to avoid filename collision on install.

While there add ldd to glibc package RRECOMMENDS since it is a shell
script not larger than 6Kb in size that costs nothing in compare with
overall glibc binary size and utility could be useful for trivial
debugging steps. If required recommendation can be easily dropped
(e.g. via NO_RECOMMENDATIONS).

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
---
 meta/recipes-core/glibc/glibc-package.inc | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc b/meta/recipes-core/glibc/glibc-package.inc
index a98ae1a..3ab56bd 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -19,7 +19,8 @@ libc_baselibs_append_aarch64 = " /lib/ld-linux-aarch64*.so.1"
 INSANE_SKIP_${PN}_append_aarch64 = " libdir"
 
 FILES_${PN} = "${libc_baselibs} ${libexecdir}/* ${base_sbindir}/ldconfig ${sysconfdir}/ld.so.conf"
-FILES_ldd = "${bindir}/ldd"
+RRECOMMENDS_${PN} = "ldd"
+FILES_ldd = "${bindir}/ldd${@['.${PN}', ''][not d.getVar('MLPREFIX')]}"
 FILES_libsegfault = "${base_libdir}/libSegFault*"
 FILES_libcidn = "${base_libdir}/libcidn-*.so ${base_libdir}/libcidn.so.*"
 FILES_libmemusage = "${base_libdir}/libmemusage.so"
@@ -92,6 +93,10 @@ do_install_append () {
 		return
 	fi
 
+	if [ -n "${MLPREFIX}" ]; then
+		mv "${D}${bindir}/ldd" "${D}${bindir}/ldd.${PN}"
+	fi
+
 	install -d ${D}${sysconfdir}/init.d
 	install -d ${D}${localstatedir}/db/nscd
 	install -m 0755 ${S}/nscd/nscd.init ${D}${sysconfdir}/init.d/nscd
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/2] multilib: Fix and improve support in musl and glibc
  2018-12-17 22:29 [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych
  2018-12-17 22:29 ` [PATCH 1/2] musl: Fix ldd symlink install in case of multilib Serhey Popovych
  2018-12-17 22:29 ` [PATCH 2/2] glibc: Rename ldd in multilib package Serhey Popovych
@ 2019-01-12 10:19 ` Serhey Popovych
  2 siblings, 0 replies; 4+ messages in thread
From: Serhey Popovych @ 2019-01-12 10:19 UTC (permalink / raw)
  To: openembedded-core


[-- Attachment #1.1: Type: text/plain, Size: 944 bytes --]

Serhey Popovych wrote:

Does anyone have time to look at this? Reviews wanted!

Thanks,
Serhey

> Both changes target ldd helper handling in packages:
> 
>   1) For musl this fixes do_install error where ldd provided in both
>      main target and multilib packages.
> 
>   2) For glibc make behaviour inline with musl by providing ldd
>      via RRECOMMENDS and avoid filename clash as fixed in 1) for musl.
> 
> Build tested on IBM POWER8 running RHEL7 machine for ppc64p5 as main
> target and ppcp5 as multilib with package lib32-glib-2.0 from Yocto
> manual.
> 
> Boot tested as KVM-HV guest on IBM POWER8 machine.
> 
> Serhey Popovych (2):
>   musl: Fix ldd symlink install in case of multilib
>   glibc: Rename ldd in multilib package
> 
>  meta/recipes-core/glibc/glibc-package.inc | 7 ++++++-
>  meta/recipes-core/musl/musl_git.bb        | 5 +++--
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 501 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-12 10:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17 22:29 [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych
2018-12-17 22:29 ` [PATCH 1/2] musl: Fix ldd symlink install in case of multilib Serhey Popovych
2018-12-17 22:29 ` [PATCH 2/2] glibc: Rename ldd in multilib package Serhey Popovych
2019-01-12 10:19 ` [PATCH 0/2] multilib: Fix and improve support in musl and glibc Serhey Popovych

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.