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: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
Depends on:
Reported: 2020-10-25 17:23 UTC by Dmytro Bilokha
Modified: 2020-12-10 21:30 UTC (History)
3 users (show)

See Also:

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?

Comment 2 Daniel Engberg 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

Does it pass portlint and poudriere?
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?
Comment 7 Kurt Jaeger freebsd_committer 2020-12-10 20:36:06 UTC
Comment 8 Kurt Jaeger freebsd_committer 2020-12-10 21:29:45 UTC
Committed, thanks!
Comment 9 commit-hook freebsd_committer 2020-12-10 21:30:48 UTC
A commit references this bug:

Author: pi
Date: Thu Dec 10 21:29:43 UTC 2020
New revision: 557479
URL: https://svnweb.freebsd.org/changeset/ports/557479

  New port: security/py-onlykey: cli for the OnlyKey hardware password manager

  Python command line tool for configuring and using the OnlyKey
  hardware password manager.

  WWW: https://github.com/trustcrypto/python-onlykey

  PR:		250601
  Submitted by:	Dmytro Bilokha <dmytro@posteo.net>