Summary: | security/py-pyotp2289: Update to 1.2.1 | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Simeon Simeonov <sgs> | ||||||||||||
Component: | Individual Port(s) | Assignee: | Nuno Teixeira <eduardo> | ||||||||||||
Status: | Closed FIXED | ||||||||||||||
Severity: | Affects Only Me | CC: | eduardo | ||||||||||||
Priority: | --- | ||||||||||||||
Version: | Latest | ||||||||||||||
Hardware: | Any | ||||||||||||||
OS: | Any | ||||||||||||||
URL: | https://github.com/blackm0re/pyotp2289/blob/master/CHANGELOG.md | ||||||||||||||
Attachments: |
|
Created attachment 239300 [details]
git diff patch
Created attachment 239328 [details]
port diff patch
(In reply to Simeon Simeonov from comment #2) Please upload a git diff not a shell archive. Created attachment 239330 [details]
git diff patch
(In reply to Nuno Teixeira from comment #3) Done (In reply to Simeon Simeonov from comment #5) testunit: "no tests ran in 0.01s" *** Error code 5, same on 1.1.1 and 1.2.0 Are you sure that upstream supports tests? Not sure what you mean by 'supports tests' [sgs@Blackmore ~/development/gitprogs/python/pyotp2289 (master)]$ pytest ======================================================================================================================================== test session starts ========================================================================================================================================= platform linux -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0 rootdir: /home/sgs/development/gitprogs/python/pyotp2289, configfile: pyproject.toml, testpaths: tests plugins: anyio-3.6.1, cov-4.0.0 collected 17 items tests/test_generator.py .... [ 23%] tests/test_main.py ...... [ 58%] tests/test_server.py ..... [ 88%] tests/test_static.py .. [100%] ========================================================================================================================================= 17 passed in 0.22s ============= tests are written for 'pytest' I suspect that when tests are ran cwd is set to pyotp2289/src and not to pyotp2289 where the 'tests' folder resides. (In reply to Simeon Simeonov from comment #7) These tests taken from linux? For what I see there, it seams that distfile doesn't have tests included: --- platform freebsd13 -- Python 3.9.16, pytest-7.2.0, pluggy-1.0.0 rootdir: /wrkdirs/usr/ports/security/py-pyotp2289/work-py39/pyotp2289-1.2.0, configfile: pyproject.toml collected 0 items --- --- ls -l work-py39/pyotp2289-1.2.0/ total 36 -rw-r--r-- 1 nunotex nunotex 1302 Jan 5 13:39 COPYING -rw-r--r-- 1 nunotex nunotex 1302 Jan 5 13:44 LICENSE -rw-r--r-- 1 nunotex nunotex 9645 Jan 5 22:29 PKG-INFO -rw-r--r-- 1 nunotex nunotex 8425 Jan 5 13:04 README.md -rw-r--r-- 1 nunotex nunotex 180 Mar 31 2022 pyproject.toml -rw-r--r-- 1 nunotex nunotex 1287 Jan 5 22:29 setup.cfg -rw-r--r-- 1 nunotex nunotex 87 Apr 2 2022 setup.py drwxr-xr-x 4 nunotex nunotex 4 Jan 5 22:29 src ls -l work-py39/pyotp2289-1.2.0/src/ total 9 drwxr-xr-x 2 nunotex nunotex 6 Jan 5 22:29 otp2289 drwxr-xr-x 2 nunotex nunotex 7 Jan 5 22:29 pyotp2289.egg-info ls -l work-py39/pyotp2289-1.2.0/src/otp2289/ total 42 -rw-r--r-- 1 nunotex nunotex 2214 Jan 5 13:20 __init__.py -rw-r--r-- 1 nunotex nunotex 11668 Jan 5 13:22 __main__.py -rw-r--r-- 1 nunotex nunotex 35118 Jan 5 13:20 generator.py -rw-r--r-- 1 nunotex nunotex 15553 Jan 5 13:34 server.py --- Could you check it? (In reply to Nuno Teixeira from comment #9) (...) Confirmed, CHESESHOP tarball doesn't include tests, https://files.pythonhosted.org/packages/source/p/pyotp2289/pyotp2289-1.1.1.tar.gz ( https://github.com/blackm0re/pyotp2289/tree/master/tests ) Solution is to fetch from https://github.com/blackm0re/pyotp2289 Also, you could use USE_PYTHON+= pytest and remove TEST_DEPENDS and 'do-test' target since it will be created automaticly. I understand. Perhaps including the 'tests' in the sdist (tar.gz) will be a better solution than fetching from github? (In reply to Simeon Simeonov from comment #11) For what I have seen, the best way is to change it to github and ask upstream to include whats missing in tarball and switch if it is fixed. Created attachment 239350 [details]
git diff patch to 1.2.1
Should have been fixed upstream now. ====> Running Q/A tests (stage-qa) ===> Testing for py311-pyotp2289-1.2.1 ===> py311-pyotp2289-1.2.1 depends on package: py311-pytest>=7,1 - found ===> py311-pyotp2289-1.2.1 depends on file: /usr/local/bin/python3.11 - found cd /usr/ports/security/py-pyotp2289/work-py311/pyotp2289-1.2.1 && /usr/bin/env XDG_DATA_HOME=/usr/ports/security/py-pyotp2289/work-py311 XDG_CONFIG_HOME=/usr/ports/security/py-pyotp2289/work-py311 XDG_CACHE_HOME=/usr/ports/security/py-pyotp2289/work-py311/.cache HOME=/usr/ports/security/py-pyotp2289/work-py311 PATH=/usr/ports/security/py-pyotp2289/work-py311/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin PKG_CONFIG_LIBDIR=/usr/ports/security/py-pyotp2289/work-py311/.pkgconfig:/usr/local/libdata/pkgconfig:/usr/local/share/pkgconfig:/usr/libdata/pkgconfig MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES LDSHARED="cc -shared" PYTHONDONTWRITEBYTECODE= PYTHONOPTIMIZE= PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fno-strict-aliasing -fstack-protector-strong " CPP="cpp" CPPFLAGS="" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fno-strict-aliasing -fstack-protector-strong " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" /usr/local/bin/python3.11 -m pytest -k '' -rs -v -o addopts= ======================================================================================================================================== test session starts ======================================================================================================================================== platform freebsd13 -- Python 3.11.1, pytest-7.2.0, pluggy-1.0.0 -- /usr/local/bin/python3.11 cachedir: .pytest_cache rootdir: /usr/ports/security/py-pyotp2289/work-py311/pyotp2289-1.2.1, configfile: pyproject.toml, testpaths: test plugins: xdist-2.5.0, forked-1.4.0, anyio-3.6.2 collected 17 items test/test_generator.py::test_caller_exceptions PASSED [ 5%] test/test_generator.py::test_constructor_exceptions PASSED [ 11%] test/test_generator.py::test_md5 PASSED [ 17%] test/test_generator.py::test_sha1 PASSED [ 23%] test/test_main.py::test_main_generate_otp_response PASSED [ 29%] test/test_main.py::test_main_generate_otp_response_env_passwd PASSED [ 35%] test/test_main.py::test_main_generate_otp_range PASSED [ 41%] test/test_main.py::test_main_generate_otp_range_passwd_prompt[args0] PASSED [ 47%] test/test_main.py::test_main_generate_otp_range_passwd_prompt[args1] PASSED [ 52%] test/test_main.py::test_main_initiate PASSED [ 58%] test/test_server.py::test_state_caller_exceptions PASSED [ 64%] test/test_server.py::test_state_constructor_exceptions PASSED [ 70%] test/test_server.py::test_state_validation_md5 PASSED [ 76%] test/test_server.py::test_state_validation_sha1 PASSED [ 82%] test/test_server.py::test_store PASSED [ 88%] test/test_static.py::test_bytes_and_tokens PASSED [ 94%] test/test_static.py::test_random_bytes PASSED [100%] ======================================================================================================================================== 17 passed in 0.20s ========================================================================================================================================= A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9385886cd8daa2446ca534ba07dc63579f02c4cc commit 9385886cd8daa2446ca534ba07dc63579f02c4cc Author: Simeon Simeonov <sgs@pichove.org> AuthorDate: 2023-01-09 08:57:02 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2023-01-09 08:59:01 +0000 security/py-pyotp2289: Update to 1.2.1 ChangeLog: https://github.com/blackm0re/pyotp2289/blob/master/CHANGELOG.md PR: 268781 security/py-pyotp2289/Makefile | 11 +++-------- security/py-pyotp2289/distinfo | 4 ++-- 2 files changed, 5 insertions(+), 10 deletions(-) (In reply to Simeon Simeonov from comment #14) Yes it is, nice! Committed, thanks! |
Created attachment 239299 [details] port diff patch The new port builds and runs on all supported Python versions. port test (including portlint) passes without warnings. port diff and git diff patches attached. Best regards Simeon Simeonov