diff options
author | Ross Burton <ross.burton@arm.com> | 2022-07-22 12:13:01 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-07-25 22:59:00 +0100 |
commit | 454a0ea700b1118e8b24136e03bb03879db960e1 (patch) | |
tree | 916cd3e20eecfea26b7a54415ea122471c22cc6b | |
parent | fa4b74a5a78273fd2f951963e196174070a3d0b3 (diff) | |
download | poky-454a0ea700b1118e8b24136e03bb03879db960e1.tar.gz |
zlib: remove historical movement of libz.so to /lib
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.
[RP: Fixed up selftest to match]
(From OE-Core rev: 990073dfc167354b4af41db83ac46c18b1aa99d5)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/cases/pkgdata.py | 9 | ||||
-rw-r--r-- | meta/recipes-core/zlib/zlib_1.2.12.bb | 12 |
2 files changed, 4 insertions, 17 deletions
diff --git a/meta/lib/oeqa/selftest/cases/pkgdata.py b/meta/lib/oeqa/selftest/cases/pkgdata.py index 254abc40c6..87d069de65 100644 --- a/meta/lib/oeqa/selftest/cases/pkgdata.py +++ b/meta/lib/oeqa/selftest/cases/pkgdata.py | |||
@@ -47,8 +47,8 @@ class OePkgdataUtilTests(OESelftestTestCase): | |||
47 | self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output) | 47 | self.assertGreater(pkgsize, 1, "Size should be greater than 1. %s" % result.output) |
48 | 48 | ||
49 | def test_find_path(self): | 49 | def test_find_path(self): |
50 | result = runCmd('oe-pkgdata-util find-path /lib/libz.so.1') | 50 | result = runCmd('oe-pkgdata-util find-path /usr/lib/libz.so.1') |
51 | self.assertEqual(result.output, 'zlib: /lib/libz.so.1') | 51 | self.assertEqual(result.output, 'zlib: /usr/lib/libz.so.1') |
52 | result = runCmd('oe-pkgdata-util find-path /usr/bin/m4') | 52 | result = runCmd('oe-pkgdata-util find-path /usr/bin/m4') |
53 | self.assertEqual(result.output, 'm4: /usr/bin/m4') | 53 | self.assertEqual(result.output, 'm4: /usr/bin/m4') |
54 | result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True) | 54 | result = runCmd('oe-pkgdata-util find-path /not/exist', ignore_status=True) |
@@ -120,8 +120,7 @@ class OePkgdataUtilTests(OESelftestTestCase): | |||
120 | curpkg = line.split(':')[0] | 120 | curpkg = line.split(':')[0] |
121 | files[curpkg] = [] | 121 | files[curpkg] = [] |
122 | return files | 122 | return files |
123 | bb_vars = get_bb_vars(['base_libdir', 'libdir', 'includedir', 'mandir']) | 123 | bb_vars = get_bb_vars(['libdir', 'includedir', 'mandir']) |
124 | base_libdir = bb_vars['base_libdir'] | ||
125 | libdir = bb_vars['libdir'] | 124 | libdir = bb_vars['libdir'] |
126 | includedir = bb_vars['includedir'] | 125 | includedir = bb_vars['includedir'] |
127 | mandir = bb_vars['mandir'] | 126 | mandir = bb_vars['mandir'] |
@@ -138,7 +137,7 @@ class OePkgdataUtilTests(OESelftestTestCase): | |||
138 | self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output) | 137 | self.assertIn('libz1', list(files.keys()), "listed pkgs. files: %s" %result.output) |
139 | self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output) | 138 | self.assertIn('libz-dev', list(files.keys()), "listed pkgs. files: %s" %result.output) |
140 | self.assertGreater(len(files['libz1']), 1) | 139 | self.assertGreater(len(files['libz1']), 1) |
141 | libspec = os.path.join(base_libdir, 'libz.so.1.*') | 140 | libspec = os.path.join(libdir, 'libz.so.1.*') |
142 | found = False | 141 | found = False |
143 | for fileitem in files['libz1']: | 142 | for fileitem in files['libz1']: |
144 | if fnmatch.fnmatchcase(fileitem, libspec): | 143 | if fnmatch.fnmatchcase(fileitem, libspec): |
diff --git a/meta/recipes-core/zlib/zlib_1.2.12.bb b/meta/recipes-core/zlib/zlib_1.2.12.bb index e921703137..77e7a4937f 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() { | |||
39 | install ${B}/examplesh ${D}${PTEST_PATH} | 39 | install ${B}/examplesh ${D}${PTEST_PATH} |
40 | } | 40 | } |
41 | 41 | ||
42 | # Move zlib shared libraries for target builds to $base_libdir so the library | ||
43 | # can be used in early boot before $prefix is mounted. | ||
44 | do_install:append:class-target() { | ||
45 | if [ ${base_libdir} != ${libdir} ] | ||
46 | then | ||
47 | mkdir -p ${D}/${base_libdir} | ||
48 | mv ${D}/${libdir}/libz.so.* ${D}/${base_libdir} | ||
49 | libname=`readlink ${D}/${libdir}/libz.so` | ||
50 | ln -sf ${@oe.path.relative("${libdir}", "${base_libdir}")}/$libname ${D}${libdir}/libz.so | ||
51 | fi | ||
52 | } | ||
53 | |||
54 | BBCLASSEXTEND = "native nativesdk" | 42 | BBCLASSEXTEND = "native nativesdk" |