Public bug reported: Hello,
I encountered a bug while updating some Dell server BIOS, with a 3.0.0 BIOS on Ubuntu 10.04 LTS (lucid). The current version of python- libsmbios on lucid suffers of a parsing bug on the bios version string, due to null bytes (.0.0) in the version string. With the following files: Works: http://linux.dell.com/repo/firmware/bios-hdrs/system_bios_ven_0x1028_dev_0x0236_version_2.3.12/bios.hdr Fails: http://linux.dell.com/repo/firmware/bios-hdrs/system_bios_ven_0x1028_dev_0x0236_version_3.0.0/bios.hdr this can be verified with the following command: # smbios-rbu-bios-update --hdr-info=bios-3.0.0.hdr BIOS HDR file information dump. Filename: /dev/shm/bios.hdr File magic header: $RBU Header length: 84 Header major version: 2 Header minor version: 0 Number of supported systems: 10 Quick check field: Copyright 2011 Dell Inc. Traceback (most recent call last): File "/usr/sbin/smbios-rbu-bios-update", line 185, in <module> sys.exit( main() ) File "/usr/sbin/smbios-rbu-bios-update", line 138, in main dumpHdrFileInfo(h) File "<libsmbios_c._peak_util_decorators.rewrap wrapping libsmbios_c.rbu_hdr.dumpHdrFileInfo at 0x0184C6E0>", line 3, in dumpHdrFileInfo File "/usr/lib/python2.6/dist-packages/libsmbios_c/trace_decorator.py", line 98, in trace result = func(*args, **kw) File "/usr/lib/python2.6/dist-packages/libsmbios_c/rbu_hdr.py", line 43, in dumpHdrFileInfo print _("BIOS Version: %s") % hdr.biosVersion() File "<libsmbios_c._peak_util_decorators.rewrap wrapping libsmbios_c.rbu_hdr.biosVersion at 0x018A25F0>", line 3, in biosVersion File "/usr/lib/python2.6/dist-packages/libsmbios_c/trace_decorator.py", line 98, in trace result = func(*args, **kw) File "/usr/lib/python2.6/dist-packages/libsmbios_c/rbu_hdr.py", line 87, in biosVersion ver = "%d.%d.%d" % struct.unpack("BBB", self.hdr.biosVersion) struct.error: unpack requires a string argument of length 3 On newer Ubuntu versions, libsmbios has a fix about that ; could it be backported to lucid ? --- /usr/lib/python2.6/dist-packages/libsmbios_c/rbu_hdr.py.old 2011-07-19 23:57:50.506269986 +0200 +++ /usr/lib/python2.6/dist-packages/libsmbios_c/rbu_hdr.py 2011-07-20 00:14:46.656270075 +0200 @@ -107,7 +107,7 @@ #char quickCheck[40]; ("quickCheck", ctypes.c_char * 40), #char biosVersion[3]; - ("biosVersion", ctypes.c_char * 3), + ("biosVersion", ctypes.c_uint8 * 3), #u8 miscFlags; ("miscFlags", ctypes.c_uint8), #u8 biosInternalUse; Thanks. Description: Ubuntu 10.04.2 LTS Release: 10.04 libsmbios2: Installed: 2.2.13-0ubuntu4.1 Candidate: 2.2.13-0ubuntu4.1 Version table: *** 2.2.13-0ubuntu4.1 0 500 http://fr.archive.ubuntu.com/ubuntu/ lucid-updates/universe Packages 100 /var/lib/dpkg/status 2.2.13-0ubuntu4 0 500 http://fr.archive.ubuntu.com/ubuntu/ lucid/universe Packages 500 http://linux.dell.com/repo/community/deb/latest/ Packages ** Affects: libsmbios (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/813210 Title: python-libsmbbios bios version check on lucid [backport request] To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/libsmbios/+bug/813210/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
