Support U2F on Linux#951
Conversation
35a77e8 to
f063977
Compare
|
@mapkon @wolfeidau any chances this PR could get reviewed/merged? It is an important addition to us that run on Linux. Also, this PR seems pretty clean: only has changes to get U2F working on linux, and nothing more. |
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Install dependency required for linux builds | ||
| run: sudo apt-get update && sudo apt-get install -y libudev-dev |
There was a problem hiding this comment.
Why do you need libudev-dev?
There was a problem hiding this comment.
OK! The branch is a bit out of date with master. Mind rebasing?
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Install dependency required for linux builds | ||
| run: sudo apt-get update && sudo apt-get install -y libudev-dev |
|
I think we should move all the build configuration files to run on |
|
Makes sense, but I'd say that's outside the scope of this PR. 🙂 |
I don't think it will merge! I will try to get it merged ASAP! |
|
I didn't create the PR, so I don't think I can rebase in this PR. But I could create another PR (from another frok) being a rebase of this one. Would that work? Or would you prefer to try "rebase and merge" from github or doing it directly yourself? Just let me know how I can best help! |
|
I can rebase it 🙂 |
We need the hidraw tag and to enable CGO for linux builds. This is a requirement of the go-u2fhost dependency. See https://github.com/marshallbrekka/go-u2fhost#linux for details. Building with hidraw support also requires libudev headers. i.e. sudo apt install libudev-dev This change also updates the github workflows to build on ubuntu-latest for CGO support on Linux.
|
Thanks @smlx ! |
- This functionality was broken in #951 - Since we are using OSX toolchain, we need macos-X to build Co-authored-by: Mark Wolfe <mark@wolfe.id.au>
|
Please note that using |
|
@mapkon Ah I was afraid of that, I'll send another PR to fix it up. |
|
Not a worry! Let me know when the PR is ready. |
This PR enables U2F support on Linux amd64. It builds on the work done in, and supersedes, #592.
There are no code changes, just build configuration updates:
-tags=hidrawtogo buildon Linux amd64, which enables U2F as per the documentation in the underlying U2F library.libudev-devpackage and useCGO_ENABLED=1on Linux, because U2F support uses libudev.Closes: #419
Closes: #592
Note that this changes the release builder from macos to ubuntu. I have no way of testing the resulting macos binary to see if it still works, so would appreciate if someone else could confirm this.