Hi,
I have a problem updating kernel with python code using yum api compiled to
binary using pyinstaller (Centos 6.4 64bit). When using pure python version
it works. Binary version updates kernel but after reboot that system
crashes (kernel panic during boot):
mkdir: error while loading shared libraries: libselinux.so.1: cannot open
shared object file: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-358.23.2.el6.x86_64 #1
Here is the python code:
import yum;
updates = ['kernel']
yumb = yum.YumBase()
pl = yumb.doPackageLists('updates')
exactmatch, matched, unmatched = yum.packages.parsePackages(pl.updates,
updates)
yb = yum.YumBase()
yb.doUnlock()
yb.conf.assumeyes = True
for po in exactmatch:
yb.update(po)
yb.buildTransaction()
yb.processTransaction()
yb.closeRpmDB()
After investigation it appears that the problem is in initramfs img file.
Comparing two versions of initramfs shows that the one generated by update
started by binary version lacks some shared libs. Here is the list of
missing libraries:
libacl.so.1
libacl.so.1.1.0
libattr.so.1
libattr.so.1.1.0
libbz2.so.1
libbz2.so.1.0.4
libcap.so.2
libcap.so.2.16
libgcc_s-4.4.7-20120601.so.1
libgcc_s.so.1
libglib-2.0.so.0
libglib-2.0.so.0.2200.5
libgpg-error.so.0
libgpg-error.so.0.5.0
libpopt.so.0
libpopt.so.0.0.0
libreadline.so.6
libreadline.so.6.0
libselinux.so.1
libtinfo.so.5
libtinfo.so.5.7
Compiling with bbfreeze gives binary which is able to perform
update successfully. However it succeeds only when patchelf is installed
and run this way (it is run by bbfreeze):
patchelf --set-rpath '${ORIGIN}:${ORIGIN}/../lib' dist/pyexpat.so
Any suggestions if it is possible to get it working with pyinstaller?
--
You received this message because you are subscribed to the Google Groups
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.