From a242274d98e6f0f8d2aa21f778df690de7b42144 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 3 Feb 2022 16:48:56 +0000 Subject: prelink: Drop support for it Prelink is being dropped by glibc in 2.36. It already causes issues with binary corruption, has a number of open bugs and is of questionable benefit without disabling load address randomization and PIE executables. We disabled it by default a while back but left people able to use it. We would be unable to maintain it alone without glibc support so remove the remaining pieces. (From OE-Core rev: 23c0be78106f1d1e2bb9c724174a1bb8c56c2469) Signed-off-by: Richard Purdie --- meta/lib/oe/package_manager/ipk/rootfs.py | 37 ------------------------------- meta/lib/oe/utils.py | 11 --------- 2 files changed, 48 deletions(-) (limited to 'meta/lib') diff --git a/meta/lib/oe/package_manager/ipk/rootfs.py b/meta/lib/oe/package_manager/ipk/rootfs.py index 26dbee6f6a..10a831994e 100644 --- a/meta/lib/oe/package_manager/ipk/rootfs.py +++ b/meta/lib/oe/package_manager/ipk/rootfs.py @@ -145,51 +145,14 @@ class PkgRootfs(DpkgOpkgRootfs): self.pm.recover_packaging_data() bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True) - - def _prelink_file(self, root_dir, filename): - bb.note('prelink %s in %s' % (filename, root_dir)) - prelink_cfg = oe.path.join(root_dir, - self.d.expand('${sysconfdir}/prelink.conf')) - if not os.path.exists(prelink_cfg): - shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'), - prelink_cfg) - - cmd_prelink = self.d.expand('${STAGING_DIR_NATIVE}${sbindir_native}/prelink') - self._exec_shell_cmd([cmd_prelink, - '--root', - root_dir, - '-amR', - '-N', - '-c', - self.d.expand('${sysconfdir}/prelink.conf')]) - ''' Compare two files with the same key twice to see if they are equal. If they are not equal, it means they are duplicated and come from different packages. - 1st: Comapre them directly; - 2nd: While incremental image creation is enabled, one of the - files could be probaly prelinked in the previous image - creation and the file has been changed, so we need to - prelink the other one and compare them. ''' def _file_equal(self, key, f1, f2): - - # Both of them are not prelinked if filecmp.cmp(f1, f2): return True - - if bb.data.inherits_class('image-prelink', self.d): - if self.image_rootfs not in f1: - self._prelink_file(f1.replace(key, ''), f1) - - if self.image_rootfs not in f2: - self._prelink_file(f2.replace(key, ''), f2) - - # Both of them are prelinked - if filecmp.cmp(f1, f2): - return True - # Not equal return False diff --git a/meta/lib/oe/utils.py b/meta/lib/oe/utils.py index 136650e6f7..84790b7dff 100644 --- a/meta/lib/oe/utils.py +++ b/meta/lib/oe/utils.py @@ -537,17 +537,6 @@ class ThreadedPool: for worker in self.workers: worker.join() -def write_ld_so_conf(d): - # Some utils like prelink may not have the correct target library paths - # so write an ld.so.conf to help them - ldsoconf = d.expand("${STAGING_DIR_TARGET}${sysconfdir}/ld.so.conf") - if os.path.exists(ldsoconf): - bb.utils.remove(ldsoconf) - bb.utils.mkdirhier(os.path.dirname(ldsoconf)) - with open(ldsoconf, "w") as f: - f.write(d.getVar("base_libdir") + '\n') - f.write(d.getVar("libdir") + '\n') - class ImageQAFailed(Exception): def __init__(self, description, name=None, logfile=None): self.description = description -- cgit v1.2.3-54-g00ecf