[Cryptech Core] ubuntu 20.04 breaks cryptech

Paul Selkirk paul at psgd.org
Mon May 18 18:05:29 UTC 2020

I just upgraded my desktop to Ubuntu 20.04 LTS ("Focal Fossa"). Shit

The upgrade disabled cryptech as a package source (seems to do that
every time), and uninstalled the cryptech-alpha package (because that
package was for bionic?). I re-enabled the package source, but installed
failed on dependencies for python-serial and python-tornado, because
python2 is EOL, and Ubuntu removed all python2 packages (except the base

Okay, for now I'll run cryptech_muxd out of the git repo. Except, no, I
still don't have pyserial or tornado.

Can I just run cryptech_muxd in python3? No, I can't.

  File "cryptech_muxd", line 67
    SLIP_END     = chr(0300)        # Indicates end of SLIP packet
SyntaxError: leading zeros in decimal integer literals are not
permitted; use an 0o prefix for octal integers

That's more informative than the last time I tried it, when it just said
"invalid token", but did Guido really need to break literal decades of

Okay, fix all of that. Next:

  File "/home/pselkirk/cryptech/sw/libhal/cryptech/libhal.py", line 73,
in define
    name, text = kw.items()[0]
TypeError: 'dict_items' object is not subscriptable

AIUI, dictionaries are un-ordered, so there's no "first" item.

Okay, change it to iterate over the single entry, whatever. Next:

  File "/home/pselkirk/cryptech/sw/libhal/cryptech/libhal.py", line 144,
in define
    for name in names.translate(None, "{}").split(","):
TypeError: translate() takes exactly one argument (2 given)

It looks like the whole point of the translate() call here is to remove
curly brackets from Enum definitions, but we don't have any, so change
that to names.split(). Next:

  File "/home/pselkirk/cryptech/sw/libhal/cryptech/libhal.py", line 485,
in HSM
    _pack_builtin = (((int, long),        "_pack_uint"),
NameError: name 'long' is not defined

Here I gave up, and decided to just install python2 pyserial and tornado
with pip. Except pip was uninstalled in the upgrade, and removed from
the focal package repos along with the python2 packages.

Eventually, I found the magic get-pip.py script, and was able to install
pyserial and tornado, so that I could talk to my Alpha, but it took all
morning, and we still need to upgrade all of our python, and fix the
package dependencies.


More information about the Core mailing list