diff mbox series

zlib: remove historical movement of libz.so to /lib

Message ID 20220722111301.2143531-1-ross.burton@arm.com
State New
Headers show
Series zlib: remove historical movement of libz.so to /lib | expand

Commit Message

Ross Burton July 22, 2022, 11:13 a.m. UTC
Historically there's been a split between /lib for early boot and
/usr/lib for everything else, but with modern systems this split is
meaningless and incomplete. If a minimal system for early boot is
needed, it should be a full minimal system in a initramfs.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-core/zlib/zlib_1.2.12.bb | 12 ------------
 1 file changed, 12 deletions(-)

Comments

Luca Ceresoli July 25, 2022, 10:47 a.m. UTC | #1
Hi Ross,

On Fri, 22 Jul 2022 12:13:01 +0100
"Ross Burton" <ross.burton@arm.com> wrote:

> Historically there's been a split between /lib for early boot and
> /usr/lib for everything else, but with modern systems this split is
> meaningless and incomplete. If a minimal system for early boot is
> needed, it should be a full minimal system in a initramfs.
> 
> Signed-off-by: Ross Burton <ross.burton@arm.com>

This patch is breaking oe-selftest:

  ERROR: Unable to find any package producing path /lib/libz.so.1
  ...
  AssertionError: False is not true : Could not find zlib library file
 /lib/libz.so.1.* in libz1 package file list: ['/usr/lib/libz.so.1', '/usr/lib/libz.so.1.2.12']

https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3880/steps/15/logs/stdio
https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3872/steps/14/logs/stdio
Richard Purdie July 25, 2022, 10:52 a.m. UTC | #2
On Mon, 2022-07-25 at 12:47 +0200, Luca Ceresoli via
lists.openembedded.org wrote:
> Hi Ross,
> 
> On Fri, 22 Jul 2022 12:13:01 +0100
> "Ross Burton" <ross.burton@arm.com> wrote:
> 
> > Historically there's been a split between /lib for early boot and
> > /usr/lib for everything else, but with modern systems this split is
> > meaningless and incomplete. If a minimal system for early boot is
> > needed, it should be a full minimal system in a initramfs.
> > 
> > Signed-off-by: Ross Burton <ross.burton@arm.com>
> 
> This patch is breaking oe-selftest:
> 
>   ERROR: Unable to find any package producing path /lib/libz.so.1
>   ...
>   AssertionError: False is not true : Could not find zlib library file
>  /lib/libz.so.1.* in libz1 package file list: ['/usr/lib/libz.so.1', '/usr/lib/libz.so.1.2.12']
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/3880/steps/15/logs/stdio
> https://autobuilder.yoctoproject.org/typhoon/#/builders/87/builds/3872/steps/14/logs/stdio

There is a fixup for that in master-next.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/recipes-core/zlib/zlib_1.2.12.bb b/meta/recipes-core/zlib/zlib_1.2.12.bb
index e9217031375..77e7a4937fa 100644
--- a/meta/recipes-core/zlib/zlib_1.2.12.bb
+++ b/meta/recipes-core/zlib/zlib_1.2.12.bb
@@ -39,16 +39,4 @@  do_install_ptest() {
 	install ${B}/examplesh ${D}${PTEST_PATH}
 }
 
-# Move zlib shared libraries for target builds to $base_libdir so the library
-# can be used in early boot before $prefix is mounted.
-do_install:append:class-target() {
-	if [ ${base_libdir} != ${libdir} ]
-	then
-		mkdir -p ${D}/${base_libdir}
-		mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir}
-		libname=`readlink ${D}/${libdir}/libz.so`
-		ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so
-	fi
-}
-
 BBCLASSEXTEND = "native nativesdk"