Page MenuHomeFreeBSD

security/py-pylibacl: Update to 0.5.4
AcceptedPublic

Authored by ngie on Mar 29 2020, 10:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 4:25 PM
Unknown Object (File)
Feb 19 2024, 8:57 PM
Unknown Object (File)
Jan 17 2024, 3:05 AM
Unknown Object (File)
Dec 22 2023, 11:55 PM
Unknown Object (File)
Dec 3 2023, 9:14 PM
Unknown Object (File)
Nov 26 2023, 5:48 PM
Unknown Object (File)
Nov 11 2023, 5:33 PM
Unknown Object (File)
Aug 23 2023, 12:34 PM
Subscribers

Details

Reviewers
koobs
Summary
security/py-pylibacl: Update to 0.5.4

This change upgrades pylibacl to the latest released version from 0.5.2 to
0.5.4 and also adds a "make test" target for maintainers/consumers.

This new version contains multiple minor bugfixes, noted in the release notes.

PR:	242493
Approved_by: koobs (ports, python)
MFH: 2010Q1 (blanket: bugfix releases)
Differential_Revision: 24218
Test Plan
  • portlint: OK
  • testport: ??? (poudriere: ...)
  • maketest: OK (Ran 14 tests in 0.002s OK (skipped=1))

portlint

$ portlint -V
portlint version 2.18.10
$ portlint security/py-pylibacl
looks fine.

testport

TBD

maketest

The tests assume and require a filesystem with POSIX ACLs enabled. This is
possible via a memory backed UFS filesystem, like so:

$ mkdir /tmp/md
$ sudo mdmfs -s 128m md /tmp/md
$ sudo make install
...
$ sudo env TEST_DIR=/tmp/md/ make test
===>  Testing for py37-pylibacl-0.5.4
===>   py37-pylibacl-0.5.4 depends on file: /usr/local/bin/python3.7 - found
running test
running egg_info
writing pylibacl.egg-info/PKG-INFO
writing dependency_links to pylibacl.egg-info/dependency_links.txt
writing top-level names to pylibacl.egg-info/top_level.txt
reading manifest file 'pylibacl.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pylibacl.egg-info/SOURCES.txt'
running build_ext
copying build/lib.freebsd-12.1-RELEASE-amd64-3.7/posix1e.so ->
testApplyToWithWrongObject (test.test_acls.AclExtensions) ... ok
testCmp (test.test_acls.AclExtensions) ... skipped '__cmp__ is missing'
testDoubleInit (test.test_acls.LoadTests) ... ok
testFromACL (test.test_acls.LoadTests)
Test creating an ACL from an existing ACL ... ok
testFromDir (test.test_acls.LoadTests)
Test loading ACLs from a directory ... ok
testFromEmpty (test.test_acls.LoadTests)
Test creating an empty ACL ... ok
testFromFd (test.test_acls.LoadTests)
Test loading ACLs from a file descriptor ... ok
testFromFile (test.test_acls.LoadTests)
Test loading ACLs from a file ... ok
testFromText (test.test_acls.LoadTests)
Test creating an ACL from text ... ok
testInvalidCreationParams (test.test_acls.LoadTests)
Test that creating an ACL from multiple objects fails ... ok
testInvalidValueCreation (test.test_acls.LoadTests)
Test that creating an ACL from wrong specification fails ... ok
testDeleteDefault (test.test_acls.WriteTests)
Test removing the default ACL ... ok
testDeleteDefaultWrongArg (test.test_acls.WriteTests) ... ok
testReapply (test.test_acls.WriteTests)
Test re-applying an ACL ... ok

----------------------------------------------------------------------
Ran 14 tests in 0.002s

OK (skipped=1)

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 30171
Build 27970: arc lint + arc unit

Event Timeline

koobs retitled this revision from Upgrade security/py-pylibacl to 0.5.4 to security/py-pylibacl: Update to 0.5.4.Mar 29 2020, 10:24 PM
koobs edited the summary of this revision. (Show Details)
koobs edited the test plan for this revision. (Show Details)
koobs requested changes to this revision.Mar 29 2020, 10:34 PM
  • Please confirm portlint and poudriere (Py 2.x and Py 3.x) pass (ive added bullet points for these in TEST PLAN section)
  • 0.5.3 and 0.5.4 are bugfix only releases, with specific FreeBSD bugfixes: MFH: 2010Q1
  • Changelog says: Drop support (well, drop testing) for Python lower than 2.7. but setup.py contains python_requires = ">=3.4", which will fail for 2.x. This should be patched out of setup.py and reported upstream. Upstream should add that only when 2.7 is explicitly *not* supported. If upstream says its unsupported now, then port should USES=python:3.4+ accordingly
  • Upstream switched from unittest to pytest and setup.py test has technically been deprecated. Switch [2] to:
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}

do-test:
  @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= tests
  • -v = verbose (one line per test)
  • -rs = report skipped reasons
  • -o addopts (null out any options set by pytest.cfg setup.cfg[pytest])

Since this is a C extension based Python package, you may need to override the build to build 'inplace'', so that tests work against the just-built module:

PYDISTUTILS_BUILD_TARGET=	build_ext
PYDISTUTILS_BUILDARGS+=	--inplace

[1] https://pylibacl.k1024.org/news.html#version-0-5-3
[2] https://github.com/iustin/pylibacl/blob/master/.travis.yml#L21

This revision now requires changes to proceed.Mar 29 2020, 10:34 PM
ngie edited the summary of this revision. (Show Details)

Update generated patch

  • Please confirm portlint and poudriere (Py 2.x and Py 3.x) pass (ive added bullet points for these in TEST PLAN section)

portlint passed; need to do poudriere (there's only 1 dependency to deal with).

  • 0.5.3 and 0.5.4 are bugfix only releases, with specific FreeBSD bugfixes: MFH: 2010Q1

Ok.

  • Changelog says: Drop support (well, drop testing) for Python lower than 2.7. but setup.py contains python_requires = ">=3.4", which will fail for 2.x. This should be patched out of setup.py and reported upstream. Upstream should add that only when 2.7 is explicitly *not* supported. If upstream says its unsupported now, then port should USES=python:3.4+ accordingly
  • Upstream switched from unittest to pytest and setup.py test has technically been deprecated. Switch [2] to:
TEST_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest@${PY_FLAVOR}

do-test:
  @cd ${WRKSRC} && ${PYTHON_CMD} -m pytest -v -rs -o addopts= tests
  • -v = verbose (one line per test)
  • -rs = report skipped reasons
  • -o addopts (null out any options set by pytest.cfg setup.cfg[pytest])

Since this is a C extension based Python package, you may need to override the build to build 'inplace'', so that tests work against the just-built module:

PYDISTUTILS_BUILD_TARGET=	build_ext
PYDISTUTILS_BUILDARGS+=	--inplace

These comments are applicable for the non-release version of pylibacl; pylibacl 0.5.4 supports 2.7 and doesn't support pytest: https://github.com/iustin/pylibacl/blob/pylibacl-v0.5.4/.travis.yml .

When the next version is released, the changes you requested should definitely be implemented.

These comments are applicable for the non-release version of pylibacl; pylibacl 0.5.4 supports 2.7 and doesn't support pytest: https://github.com/iustin/pylibacl/blob/pylibacl-v0.5.4/.travis.yml .

When the next version is released, the changes you requested should definitely be implemented.

Indeed, I was on master, apologies :)

LGTM, accepted contingent on poudriere passing

This revision is now accepted and ready to land.Mar 30 2020, 1:43 AM