solokeys / solo2-cli

Solo 2 library and CLI in Rust
https://docs.rs/solo2
Apache License 2.0
173 stars 31 forks source link

PKGBUILD: Add missing dependency and cleanup #8

Closed Foxboron closed 2 years ago

Foxboron commented 2 years ago

This adds the missing pcsclite dependency to the build. Also a couple of cleanups:

https://wiki.archlinux.org/title/Rust_package_guidelines

Signed-off-by: Morten Linderud morten@linderud.pw

nickray commented 2 years ago

Thanks, @Foxboron!

Do you know what would be the best way to release these AUR packages (based on tag push)? I've seen some GitHub Actions floating around that deal with AUR expecting a standalone git repo push, and experimented with git subrepo, but it all seems hacky.

Foxboron commented 2 years ago

I use subtrees for my stuff. Should be fairly trivial to implement.

https://github.com/Foxboron/sbctl/blob/master/Makefile#L52

nickray commented 2 years ago

I incorporated most of your changes in release v0.0.7 (with credit, was easier this way). If you have more suggestions regarding that latest PKGBUILD, I'd be happy to take them!

Foxboron commented 2 years ago

You need to revert this line: https://github.com/solokeys/solo2-cli/commit/1a1089f6ccd3e9193dcbdedced6df2e46bc02bfa#diff-7b4a3ca95ccfe814ecfc3fab667be2f639e808c7ad691627db1e57602dd17f9aL16

makepkg is going to look for the file existing before downloading, and in this case it is always going to exist regardless of the package version. This works in a CI context, but building manually from the AUR is going to just repackage the same solokey version every time.

nickray commented 2 years ago

Thanks.

(In case you're wondering about the reopen/close, I got myself in a git pickle temporarily).

nickray commented 2 years ago

Is there some way to suggest to the user that PCSC should be running for most things to work? I have the ccid dependency now (just pcsclite is not enough), and an info to the user if they e.g. run solo2 ls or solo2 update with PCSC off, but that still doesn't communicate "if you want to use this, you should probably systemctl start pcscd.

Foxboron commented 2 years ago

You could do a post install hook that echos a recommendation. But this is Arch and the fact that pcscd should be running for smartcards to work is documented over several places.

Example here: https://github.com/archlinux/svntogit-community/tree/packages/cri-o/trunk

I didn't realize ccid had some more stuff. I have all of this running and was mostly fixing the build error :)