Bug 237512 - sysutils/docker-compose: Broken after devel/jsonschema >3 update
Summary: sysutils/docker-compose: Broken after devel/jsonschema >3 update
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Nikolai Lifanov
URL:
Keywords: needs-qa, regression
Depends on:
Blocks:
 
Reported: 2019-04-24 02:03 UTC by Duncan Bayne
Modified: 2019-05-24 00:06 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (lifanov)
koobs: maintainer-feedback? (bofh)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan Bayne 2019-04-24 02:03:29 UTC
py27-jsonschema is correctly determined as a dependency of docker-compose, however, docker-compose requires jsonschema version < 3, and 3.0.1 is being installed:

$ sudo pkg install -y docker-compose
Updating FreeBSD repository catalogue...
... snip ...
New packages to be INSTALLED:
  docker-compose: 1.23.2
  py27-jsonschema: 3.0.1_1
  ... snip ...

$ docker-compose build
Traceback (most recent call last):
  File "/usr/local/bin/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3191, in <module>
    @_call_aside
  ... snip ...
pkg_resources.DistributionNotFound: The 'jsonschema<3,>=2.5.1' distribution was not found and is required by docker-compose

This problem occurs regardless of whether I build from ports, or install via packages.
Comment 1 Duncan Bayne 2019-04-24 02:11:44 UTC
As a workaround, manually installing an earlier version of jsonschema works:

$ sudo pip install 'jsonschema<3,>=2.5.1' --force-reinstall
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-04-24 05:11:24 UTC
<3 should be patched out if docker-compose does in fact work with that version, verified by test suite passing if it has tests.

Failing that the issue should be reported upstream if it hasn't already, and if it has, commits adding/allowing jsonschema > 3 support should be backported.

CC committer/maintainer of ports r496698 (devel/py-jsonschema)
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2019-05-22 00:21:06 UTC
sunpoet@ created a 2.X ports but have also deleted it. Maybe we can resurrect it too for a quick workaround.
Comment 4 Kubilay Kocak freebsd_committer freebsd_triage 2019-05-22 03:49:44 UTC
(In reply to Muhammad Moinur Rahman from comment #3)

That specific proposal (patch/review pending) is a blanket candidate:

Approved by: portmgr (blanket: run time fix, just fix it)

Can you attach a patch resurrecting jsonschema2 and modifying this ports dependency to that

Since we don't have a patch attached here yet, we can't maintainer timeout, though it has been a month

Alternatively, docker-compose could be verified to work with > 3 (using its test suite), with a patch to remove <3 from requirements
Comment 5 commit-hook freebsd_committer freebsd_triage 2019-05-24 00:01:02 UTC
A commit references this bug:

Author: lifanov
Date: Fri May 24 00:00:30 UTC 2019
New revision: 502410
URL: https://svnweb.freebsd.org/changeset/ports/502410

Log:
  update sysutils/docker-compose dependencies

  This unbreaks the port build.
  Tested with: docker-compose build, docker-compose up

  PR:		237512
  Reported by:	bofh

Changes:
  head/sysutils/docker-compose/Makefile
  head/sysutils/docker-compose/files/patch-setup.py
Comment 6 Nikolai Lifanov freebsd_committer freebsd_triage 2019-05-24 00:06:26 UTC
I updated the dependencies and it works for my projects.
Thank you for the report and sorry for delayed response!