New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bump pius to 3.0.0 and add Nicholas Meyer as proxy maintainer #15014
Conversation
Pull Request assignmentSubmitter: @aristocrates app-crypt/pius: @gentoo/proxy-maint (maintainer needed) Linked bugsBugs linked: 702762 In order to force reassignment and/or bug reference scan, please append Docs: Code of Conduct ● Copyright policy (expl.) ● Devmanual ● GitHub PRs ● Proxy-maint guide |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'll crash in py3.6, FYI...
b74a912
to
0c8ef06
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for packaging PIUS! <3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, styling issues mostly. It also applies to your commit, you should check any previous commits to ::gentoo to see the syntax we use for summary line,
https://www.gentoo.org/glep/glep-0066.html#commit-messages
Also you can drop Bug:
since Closes:
references and closes the bug on merge.
If you'd like to become the proxy-maintainer for this package, just add yourself along with proxy-maint project to metadata.xml in a separate commit.
https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers/User_Guide#Proxied_maintainer_in_metadata.xml
Oh I noted upstream seems to have a file to test python runtime, could you try implementing it? |
0c8ef06
to
379c105
Compare
@juippis With
and if you break the test suite and try to merge, you get a message like this:
The diff I used to test breaking the pius test suite: diff --git a/test/libpius/test_state.py b/test/libpius/test_state.py
index 7af1891..1bc6ca7 100755
--- a/test/libpius/test_state.py
+++ b/test/libpius/test_state.py
@@ -9,7 +9,7 @@ from libpius.state import SignState
class TestFileConversion(unittest.TestCase):
kSAMPLE = {
- 'one': {'OUTBOUND': 'SIGNED', 'INBOUND': None},
+ 'one': {'OUTBOUNDD': 'SIGNED', 'INBOUND': None},
'two': {'OUTBOUND': 'SIGNED', 'INBOUND': None},
'three': {'OUTBOUND': 'SIGNED', 'INBOUND': None},
} |
I ran pius installed from this ebuild from my local overlay to sign some keys and it ran without error for me on python 3.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Messages for package app-crypt/pius-3.0.0:
* DISTUTILS_USE_SETUPTOOLS value is probably incorrect
* value: DISTUTILS_USE_SETUPTOOLS=bdepend (default?)
* expected: DISTUTILS_USE_SETUPTOOLS=no
Could you check if this is true? There's good documentation what this means in
https://dev.gentoo.org/~mgorny/python-guide/distutils.html#different-build-system-variations and https://devmanual.gentoo.org/eclass-reference/distutils-r1.eclass/index.html
app-crypt/pius/pius-3.0.0.ebuild
Outdated
src_test() { | ||
"${S}"/run_tests || die "Tests failed" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll want to use python_test
here so it runs the test phase through on every python implementation installed and enabled. Now it only uses your default one. Check the content of run_tests file, it looks like python3 -m unittest discover -s test/* -v
where you can just replace python3
with ${EPYTHON}
. However this test looks so simple you can most likely get it to work by calling distutils_enable_test unittests
from distutils-r1.eclass that you use.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it looks like distutils_enable_tests unittests
doesn't provide a way to pass in -s [arg]
gentoo/eclass/distutils-r1.eclass
Lines 422 to 428 in 990a108
unittest) | |
python_test() { | |
"${EPYTHON}" -m unittest discover -v || | |
die "Tests fail with ${EPYTHON}" | |
} | |
;; | |
*) |
python3 -m unittest discover
finds 0 tests to run:
>>> Test phase: app-crypt/pius-3.0.0
* python3_7: running distutils-r1_run_phase python_test
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
* python3_8: running distutils-r1_run_phase python_test
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
touch test/__init__.py && touch test/libpius/__init__.py
makes python -m unittest discover
just work (https://stackoverflow.com/a/29715336/2469311), which might be worth submitting upstream.
With this python_test
:
python_test() {
${EPYTHON} -m unittest discover -s test/* -v
}
tests are run on all enabled python versions:
>>> Test phase: app-crypt/pius-3.0.0
* python3_7: running distutils-r1_run_phase python_test
test_convert_from_v1 (test_state.TestFileConversion) ... ok
test_convert_from_v2 (test_state.TestFileConversion) ... ok
test_read_empty_writes_v3_with_new_data (test_state.TestFileConversion) ... ok
test_read_empty_writes_v3_with_no_new_data (test_state.TestFileConversion) ... ok
test_read_v1_writes_v3 (test_state.TestFileConversion) ... ok
test_read_v2_writes_v3 (test_state.TestFileConversion) ... ok
----------------------------------------------------------------------
Ran 6 tests in 0.013s
OK
* python3_8: running distutils-r1_run_phase python_test
test_convert_from_v1 (test_state.TestFileConversion) ... ok
test_convert_from_v2 (test_state.TestFileConversion) ... ok
test_read_empty_writes_v3_with_new_data (test_state.TestFileConversion) ... ok
test_read_empty_writes_v3_with_no_new_data (test_state.TestFileConversion) ... ok
test_read_v1_writes_v3 (test_state.TestFileConversion) ... ok
test_read_v2_writes_v3 (test_state.TestFileConversion) ... ok
----------------------------------------------------------------------
Ran 6 tests in 0.019s
OK
Also note that the unit tests themselves all pass on python 3.6, which should probably also be reported upstream.
Closes: https://bugs.gentoo.org/702762 Signed-off-by: Nicholas Meyer <nickaristocrates@gmail.com>
Signed-off-by: Nicholas Meyer <nickaristocrates@gmail.com>
99082e0
to
0c3d896
Compare
yeah my unittests are hardly comprehensive. They only cover the code converting between various versions of the config file format, because (1) it's easy to break back-compat and (2) that stuff is easy to write unittests for. They're just there to make my life easier. There has never been any attempt any any reasonable coverage (and given that the software just forks off gpg, there's not a lot that can be tested without significant mocking that would be quite cumbersome). That said, test contributions are welcome. |
You can confirm that @jaymzh's signature is valid for the tarball and that the b2sum and sha512sum match what is in my commit:
Bug: https://bugs.gentoo.org/702762
Closes: https://bugs.gentoo.org/702762
Signed-off-by: Nicholas Meyer nickaristocrates@gmail.com