Bug 250601 - [NEW PORT] security/py-onlykey: command line tool to work with OnlyKey hardware password manager
Summary: [NEW PORT] security/py-onlykey: command line tool to work with OnlyKey hardwa...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2020-10-25 17:23 UTC by Dmytro Bilokha
Modified: 2020-11-04 20:45 UTC (History)
2 users (show)

See Also:


Attachments
security/py-onlykey port (10.95 KB, patch)
2020-10-25 17:23 UTC, Dmytro Bilokha
no flags Details | Diff
security/py-onlykey port, with removed PORTREVISION (10.93 KB, patch)
2020-10-25 18:06 UTC, Dmytro Bilokha
no flags Details | Diff
V3 The new port patch with issues fixed (10.61 KB, patch)
2020-10-31 19:29 UTC, Dmytro Bilokha
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmytro Bilokha 2020-10-25 17:23:01 UTC
Created attachment 219069 [details]
security/py-onlykey port

OnlyKey is a hardware password manager similar to YubiKey, but with more slots and open source firmware.

Here is the website link: https://onlykey.io/
The docs: https://docs.crp.to/

The ported software is a command line tool to configure OnlyKey token, set username/password pairs, etc.
The python sources of the ported tool: https://github.com/trustcrypto/python-onlykey

The patch attached contains security/py-onlykey port.
Comment 1 Fernando Apesteguía freebsd_committer 2020-10-25 17:42:45 UTC
^Triage: Maintainer-feedback flag (+) not required unless requested (?) first

^Triage: Why is PORTREVISION set?

Thanks!
Comment 2 daniel.engberg.lists 2020-10-25 18:03:50 UTC
Are dependencies correct? Upstream's list is different, https://github.com/trustcrypto/python-onlykey/blob/master/setup.py#L26

Sample file is defined incorrectly
https://www.freebsd.org/doc/en/books/porters-handbook/book.html#plist-config

Does it pass portlint and poudriere?
https://www.freebsd.org/doc/en/books/porters-handbook/book.html#porting-testing
Comment 3 Dmytro Bilokha 2020-10-25 18:06:49 UTC
Created attachment 219078 [details]
security/py-onlykey port, with removed PORTREVISION

Sorry, it is my copy-past error from another Python port. Here I attach fixed patch with removed PORTREVISION
Comment 4 Dmytro Bilokha 2020-10-25 18:21:54 UTC
(In reply to daniel.engberg.lists from comment #2)
Sorry, seems like I did it wrong.

1. The dependencies list is incorrect, I'll fix it.
2. I din't get why the plist is not correct?

In the Makefile I have:
USE_PYTHON=     autoplist distutils
PLIST_FILES=    "${PREFIX}/etc/devd/onlykey.conf.sample" "${PREFIX}/man/man1/onlykey-cli.1.gz"

My intention is to have in the PLIST all the files generated by Python autoplist and two additional files created by me: sample and manpage.

How to achive this in correct way?

3. The port passes make stage/stage-qa/package/install/deinstall in a separate jail. I'll do additional checks after fixing the issues mentioned above.

Thanks for your comments and sorry for my mistakes. Its my second port and the only first with Python.
Comment 5 Dmytro Bilokha 2020-10-31 19:29:41 UTC
Created attachment 219257 [details]
V3 The new port patch with issues fixed

Here I attach the new patch with all the issues fixed. It passes both portlint and poudriere testport. Please, take a look. Thank you!
Comment 6 Dmytro Bilokha 2020-11-04 20:45:45 UTC
Hi guys,
I've submitted the new patch with issues fixed. Could you, please, take a look?