pocc / merlink

This program will connect desktop clients to Meraki firewalls
Apache License 2.0
3 stars 1 forks source link

Travis-generated .deb packages fail to start #49

Closed pocc closed 5 years ago

pocc commented 6 years ago

Problem

0.7.3 travis build#103 (ecd31ca)

https://travis-ci.org/pocc/merlink/builds/399901479

Error output when starting merlink on both 0.7.3 and 0.8

Traceback (most recent call last): File "merlink/merlink.py", line 11, in File "/home/travis/virtualenv/python3.6.3/lib/python3.6/site-packages/PyInstaller/loader/pyimod03_importers.py", line 714, in load_module ModuleNotFoundError: No module named 'PyQt5.sip' [13326] Failed to execute script merlink

Firmware/hardware

Testing on virtual machine: Ubuntu 18.04

Analysis

pocc commented 6 years ago

Use these commands to start:

pip3 install --user https://github.com/pyinstaller/pyinstaller/tarball/develop
pip3 install --user -r requirements.txt
pyinstaller -y <location of pyinstaller.spec> 

Use git bisect to find bug

Latest commit (broken): 386e1fff48611f0b91618c816d6207a99923f8f9 Earliest confirmed working commit: 954df0f0a20054e3b29ab887f77b3b8966334268

pocc commented 6 years ago

This fails on 16.04 Ubuntu if the latest build of pyinstaller is not used: pip3 install --user https://github.com/pyinstaller/pyinstaller/tarball/develop

pocc commented 6 years ago

Fixed in dev. There were 3 problems here:

Problem 1: libdrm.so.2 was not removed for deb packages

Problem

Resolution

Include this line after pyinstaller has run but before we build with fpm, debreate, etc.

rm -fv dist/merlink/libdrm.so.2

Problem 2: Build and deploy targets didn't match

Problem

Resolution

Putting in debugging commands in build_nix_packages.sh because travis ci is lacking them here:

# The following should match EXACTLY if they are to be deployed to a github release
echo "Built targets:"
ls -1d build/* | grep merlink
echo "Deploy targets:"
echo "build/merlink-${VERSION}_x64.deb"
echo "build/merlink-${VERSION}_x64.rpm"
echo "build/merlink-${VERSION}_x64.tar.gz"
echo "build/merlink-${VERSION}_x64.dmg"

Problem 3: Errors due to not using latest pyinstaller build

Problem