lddtree is used in critical tools like genkernel: * LVM: Adding support (copying binaries from system)... Traceback (most recent call last): File "/usr/bin/lddtree", line 789, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/lddtree", line 751, in main display=p, debug=options.debug) File "/usr/bin/lddtree", line 408, in ParseELF interp = bstr(segment.get_interp_name()) File "/usr/bin/lddtree", line 75, in bstr return buf.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' * >> Appending luks cpio data... * Including LUKS support Traceback (most recent call last): File "/usr/bin/lddtree", line 789, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/lddtree", line 751, in main display=p, debug=options.debug) File "/usr/bin/lddtree", line 408, in ParseELF interp = bstr(segment.get_interp_name()) File "/usr/bin/lddtree", line 75, in bstr return buf.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' * >> Appending modules cpio data... With pyelftools-0.24 this generates unusable ramdisks that render the system unbootable. That bug occurs only when python is python3. Downgrading to -0.23-r1 helps.
CC'ing genkernel project to let them know that initramfs generation with Python 3.4 for example can currently result in problems on ~arch.
confirmed. i against marking this bug report as medium. broken initramfs is critical problem.
* busybox: >> Using cache * initramfs: >> Initializing... * >> Appending base_layout cpio data... * >> Appending auxilary cpio data... * >> Copying keymaps * >> Appending busybox cpio data... * >> Appending modules cpio data... * >> Appending zfs cpio data... cp: cannot stat ‘/etc/zfs/zdev.conf’: No such file or directory * Could not copy file /etc/zfs/zdev.conf for ZFS Traceback (most recent call last): File "/usr/bin/lddtree", line 789, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/lddtree", line 751, in main display=p, debug=options.debug) File "/usr/bin/lddtree", line 408, in ParseELF interp = bstr(segment.get_interp_name()) File "/usr/bin/lddtree", line 75, in bstr return buf.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' * >> Appending blkid cpio data... Traceback (most recent call last): File "/usr/bin/lddtree", line 789, in <module> sys.exit(main(sys.argv[1:])) File "/usr/bin/lddtree", line 751, in main display=p, debug=options.debug) File "/usr/bin/lddtree", line 408, in ParseELF interp = bstr(segment.get_interp_name()) File "/usr/bin/lddtree", line 75, in bstr return buf.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' * >> Appending modprobed cpio data... * >> Compressing cpio data (.xz)... it generates initramfs image still but it's broken (unbootable)
Created attachment 452744 [details, diff] lddtree.py: work around pyelftools API change Here's a patch.
Fixed on master. I'll revbump 1.1.6 in a bit. https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=6557b1512ebfda508345e032e09ed85789c16c98
commit 19ffdf6414b7215a89a25c6b13cbf9197c86451a Author: Mike Gilbert <floppym@gentoo.org> Date: Tue Nov 8 17:04:10 2016 -0500 app-misc/pax-utils: fix lddtree with pyelfutils-0.24 Bug: https://bugs.gentoo.org/599082 Package-Manager: portage-2.3.2_p5 ...tree.py-work-around-pyelftools-API-change.patch | 29 ++++++++++ app-misc/pax-utils/pax-utils-1.1.6-r1.ebuild | 62 ++++++++++++++++++++++ 2 files changed, 91 insertions(+)
1.1.6-r1 fixes the problem for me, thanks :)
thanks for the fix!
Guys, it would have been nice to stabilize this version when dev-python/pyelftools version 0.24 got stabilized https://gitweb.gentoo.org/repo/gentoo.git/commit/dev-python/pyelftools?id=ff881e523b525df9b931f59baeef7804d9b47b9f Please block bug 606280.