Closed mtlynch closed 1 year ago
I think best option is to try for 1-2 hours to build the Debian package with our fork. If we're not close to a complete solution by then, switch to option 1.
I tried building their Debian package for a couple hours but didn't have much luck. I got it to build under Docker, but I couldn't find the .deb
file.
https://github.com/mikefarah/yq/compare/master...tiny-pilot:yq:build-deb?expand=1
I think it's not worth the trouble.
We currently install yq using Ansible:
https://github.com/tiny-pilot/tinypilot/blob/c0d8e10628afe0ca5ff2116308a51c3c1e21f9a3/ansible-role-ustreamer/tasks/install_launcher.yml#L1-L22
As part of our War on Ansible, we want to reimplement this logic in some other way.
Options
Option 1: Include a yq binary in the TinyPilot bundle
The simplest option I can think of is to download the yq armv7 binary during
create-bundle
, and then in theinstall
script, we can move theyq
binary to/usr/bin/yq
.Option 2: Create our own yq Debian package
A cleaner option would be if we created our own Debian package for yq.
yq already has logic for building a Debian package and instructions for how to do it. I'm not sure if they still work or if they'll work on ARMv7, but they worked at one point.
There's an existing semi-official Debian package for yq, but there are no ARMv7 builds.
Option 3: Reimplement ustreamer-launcher to eliminate the dependency on yq
The only thing that depends on
yq
isustreamer-launcher
. We could reimplement the logic in Python or Go to eliminate the dependency onyq
.The problem with doing it in Python is that we then have to either install PyYAML globally or deal with virtualenv just to launch this one simple thing.
In Go, we could compile it down to a nice binary, but we'd have to have whole separate build logic for one Go binary. Also, it feels like a thing that should stay a script rather than a compiled binary.
I think Ruby processes YAML natively, but then we have to have a dependency on Ruby.
Considerations