summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/package_manager/ipk/rootfs.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-03 16:48:56 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-05 12:26:36 +0000
commita242274d98e6f0f8d2aa21f778df690de7b42144 (patch)
treeff784d0fb2d5ca91387da92db7379cf18ab54707 /meta/lib/oe/package_manager/ipk/rootfs.py
parentc98fc3933142783db2ed735d971a8c5b8408344c (diff)
downloadpoky-a242274d98e6f0f8d2aa21f778df690de7b42144.tar.gz
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 <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package_manager/ipk/rootfs.py')
-rw-r--r--meta/lib/oe/package_manager/ipk/rootfs.py37
1 files changed, 0 insertions, 37 deletions
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):
145 self.pm.recover_packaging_data() 145 self.pm.recover_packaging_data()
146 146
147 bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True) 147 bb.utils.remove(self.d.getVar('MULTILIB_TEMP_ROOTFS'), True)
148
149 def _prelink_file(self, root_dir, filename):
150 bb.note('prelink %s in %s' % (filename, root_dir))
151 prelink_cfg = oe.path.join(root_dir,
152 self.d.expand('${sysconfdir}/prelink.conf'))
153 if not os.path.exists(prelink_cfg):
154 shutil.copy(self.d.expand('${STAGING_DIR_NATIVE}${sysconfdir_native}/prelink.conf'),
155 prelink_cfg)
156
157 cmd_prelink = self.d.expand('${STAGING_DIR_NATIVE}${sbindir_native}/prelink')
158 self._exec_shell_cmd([cmd_prelink,
159 '--root',
160 root_dir,
161 '-amR',
162 '-N',
163 '-c',
164 self.d.expand('${sysconfdir}/prelink.conf')])
165
166 ''' 148 '''
167 Compare two files with the same key twice to see if they are equal. 149 Compare two files with the same key twice to see if they are equal.
168 If they are not equal, it means they are duplicated and come from 150 If they are not equal, it means they are duplicated and come from
169 different packages. 151 different packages.
170 1st: Comapre them directly;
171 2nd: While incremental image creation is enabled, one of the
172 files could be probaly prelinked in the previous image
173 creation and the file has been changed, so we need to
174 prelink the other one and compare them.
175 ''' 152 '''
176 def _file_equal(self, key, f1, f2): 153 def _file_equal(self, key, f1, f2):
177
178 # Both of them are not prelinked
179 if filecmp.cmp(f1, f2): 154 if filecmp.cmp(f1, f2):
180 return True 155 return True
181
182 if bb.data.inherits_class('image-prelink', self.d):
183 if self.image_rootfs not in f1:
184 self._prelink_file(f1.replace(key, ''), f1)
185
186 if self.image_rootfs not in f2:
187 self._prelink_file(f2.replace(key, ''), f2)
188
189 # Both of them are prelinked
190 if filecmp.cmp(f1, f2):
191 return True
192
193 # Not equal 156 # Not equal
194 return False 157 return False
195 158