Bug 251447

Summary: sysutils/iocage: RUN_DEPENDS on devel/py-pytest-runner and devel/rcs57
Product: Ports & Packages Reporter: Mina Galić <freebsd>
Component: Individual Port(s)Assignee: Michael Gmelin <grembo>
Status: Closed FIXED    
Severity: Affects Only Me CC: araujo, asomers, cy, grembo, wg
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Mina Galić freebsd_triage 2020-11-29 11:13:27 UTC
sysutils/iocage has a RUN_DEPENDS on devel/py-pytest-runner and devel/rcs57, which seems… wrong.

I'm not seeing those in https://github.com/iocage/iocage/blob/master/requirements.txt or here https://github.com/iocage/iocage/blob/master/setup.py

so where are those dependencies coming from?
Comment 1 Michael Gmelin freebsd_committer freebsd_triage 2020-11-29 12:45:20 UTC
The dependency on rcs57 is required to have the "merge" command in place (otherwise upgrading <12 jails on a 12-RELEASE jailhost breaks, which is a common upgrade path when upgrading a jailhost from 11 to 12). See bug #240177 and https://svnweb.freebsd.org/ports?view=revision&revision=512299

So this one will stay there for the foreseeable future.

The dependency on py-pytest-runner is less clear - it came in as part of the update to 0.9.8.1 (https://svnweb.freebsd.org/ports/head/sysutils/iocage/Makefile?r1=436928&r2=442376), which was before I maintained the port.

Removing it doesn't seem to have any immediate ill side-effects (build or runtime), but I don't have the time to test it thoroughly at the moment. Maybe Marcelo could shed some light on this. IMHO ideally we would keep it as a build time dependency and have a working test target, but remove the run-time dependency.
Comment 2 Alan Somers freebsd_committer freebsd_triage 2021-07-19 15:20:36 UTC
This issue has just gained importance now that pkg-audit flags py38-pytest-runner.  Can we just remove it as a RUN_DEPENDS, at least from the main branch?
Comment 3 Michael Gmelin freebsd_committer freebsd_triage 2021-07-19 16:24:05 UTC
(In reply to Alan Somers from comment #2)

Fine with me (py-test-runner, rcs57 IMHO still required to update from old FreeBSD jails).
Comment 4 commit-hook freebsd_committer freebsd_triage 2021-07-19 17:05:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=de2b126b031bee981f4173b6f67cb5e1701abc57

commit de2b126b031bee981f4173b6f67cb5e1701abc57
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2021-07-19 16:28:28 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2021-07-19 16:44:02 +0000

    sysutils/iocage: Remove pytest-runner runtime dep

    py-pytest-runner is deprecated, but upstream is still using it.
    Having this as a runtime dependency was always a bit questionable.

    PR:             251447
    Reported by:    Mina Galic <me@igalic.co>

 sysutils/iocage/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Comment 5 Michael Gmelin freebsd_committer freebsd_triage 2021-07-19 17:09:28 UTC
Closing this for the time being, as:

py-pytest-runner is required by setup.py upstream, but only as a build time dependency, so I removed the runtime dependency on it as suggested by asomers@. Let's see what upstream will do (maybe migrate to tox?).

rcs57 is still required to update from 11 to 12 successfully (using the merge command):
https://svnweb.freebsd.org/ports?view=revision&revision=512299

Without this dependency, all files to be merged in the jail to upgrade will end up empty (which is a bad situation to recover from).
Comment 6 Kubilay Kocak freebsd_committer freebsd_triage 2021-07-20 03:39:26 UTC
(In reply to Michael Gmelin from comment #5)

Note: pytest-runner is deprecated (by its author upstream) and should be patched out of setup.py's, (sent upstream), with port test targets replaced with direct test invocations (like $PYTHON_CMD -m pytest | unittest or similar, not tox)
Comment 7 Michael Gmelin freebsd_committer freebsd_triage 2021-07-20 08:24:02 UTC
(In reply to Kubilay Kocak from comment #6)

I took the idea to use something like tox from the author's deprecation notice at
https://pypi.org/project/pytest-runner/ :


> - Remove 'pytest-runner' from your setup_requires, preferably
>   removing the setup_requires option.
> - Remove 'pytest' and any other testing requirements from
>   tests_require, preferably removing the tests_requires option.
> - Select a tool to bootstrap and then run tests such as tox.

So you would recommend to keep pytest and therefore only apply the first step (removing pytest-runner from setup-requires)?
Comment 8 commit-hook freebsd_committer freebsd_triage 2021-07-20 09:18:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=12d8f46d9b985f987ede218e15a5789ff0ace5df

commit 12d8f46d9b985f987ede218e15a5789ff0ace5df
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2021-07-20 09:13:14 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2021-07-20 09:13:14 +0000

    sysutils/iocage: Add test target, no pytest-runner

    Move test dependencies to TEST_DEPENDS and add test target.
    Patch out pytest-runner locally.

    PR:             251447
    Reported by:    koobs

 sysutils/iocage/Makefile                   |  8 +++++++-
 sysutils/iocage/files/patch-setup.py (new) | 11 +++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)