Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 681002 - app-emulation/docker-compose-1.23.2 fails to execute, allows install of incompatible requests library (e.g. dev-python/requests-2.21.0-r1)
Summary: app-emulation/docker-compose-1.23.2 fails to execute, allows install of incom...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sebastian Pipping
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-20 10:02 UTC by Albert W. Hopkins
Modified: 2019-05-10 22:29 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Albert W. Hopkins 2019-03-20 10:02:39 UTC
This is related (opposite of?) bug #678114.

$ docker-compose up -d
Traceback (most recent call last):
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 581, in _build_master
    ws.require(__requires__)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 898, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 789, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (requests 2.21.0 (/usr/lib64/python3.6/site-packages), Requirement.parse('requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1'), {'docker-compose'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.6/docker-compose", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3126, in <module>
    @_call_aside
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 596, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib64/python3.6/site-packages/pkg_resources/__init__.py", line 784, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'requests!=2.11.0,!=2.12.2,!=2.18.0,<2.21,>=2.6.1' distribution was not found and is required by docker-compose

$ python
Python 3.6.5 (default, Oct 26 2018, 22:00:51) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import requests
>>> requests.__version__
'2.21.0'
Comment 1 Albert W. Hopkins 2019-03-20 10:04:16 UTC
Portage 2.3.62 (python 3.6.5-final-0, unavailable, gcc-8.2.0, glibc-2.27-r6, 5.0.2-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.0.2-gentoo-x86_64-Intel_Core_Processor_-Skylake,_IBRS-with-gentoo-2.6
KiB Mem:     4032000 total,   1582816 free
KiB Swap:      10236 total,     10232 free
sh bash 4.4_p23-r1
ld GNU ld (Gentoo 2.30 p5) 2.30.0
dev-lang/python:          3.6.5::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-kernel/linux-headers: 4.14-r1::gentoo (virtual/os-headers)
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-max-age: 24

ACCEPT_LICENSE="* -@EULA"
CFLAGS="-Os  -Qn -s"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-Os -Qn -s"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=2 --autounmask=n"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg cgroup config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news nodoc noinfo noman nostrip notitles parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
USE="bindist ipv6 nptl openssl pam split-usr systemd udev unicode"
Unset:  ACCEPT_KEYWORDS, ENV_UNSET, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND

=================================================================
                        Package Settings
=================================================================

app-emulation/docker-compose-1.23.2::gentoo was built with the following:
USE="abi_x86_64 amd64 elibc_glibc kernel_linux python_targets_python3_6 userland_GNU -python_targets_python2_7 -python_targets_python3_4 -test"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Comment 2 Albert W. Hopkins 2019-03-20 10:12:58 UTC
FWIW I changed the requests entry in the requires.txt file of the .egg-info direcotry for docker_compose and so far haven't had any problems.
Comment 3 Sebastian Pipping gentoo-dev 2019-04-10 12:54:12 UTC
Now that dev-python/requests-2.21.0-r1 is the only version of requests left, docker-compose is effectively unusable.

We need to restore something like https://github.com/gentoo/gentoo/blob/da99ab05e7f74b6060fc9cd34f698fe235ac3861/app-emulation/docker-compose/files/docker-compose-1.22.0-setup-py.patch for docker-compose to not keep having this problem.
Comment 4 Sebastian Pipping gentoo-dev 2019-04-10 13:21:16 UTC
Found bug #679968 and https://github.com/gentoo/gentoo/commit/13231bbe125077f1e266b577a46699197c3ec2f7 now but it was done without a revbump, hence the fix did not propagate to everyone.  So it needs a revbump (and a better fix IMHO), still.
Comment 5 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-04-11 10:42:51 UTC
(In reply to Sebastian Pipping from comment #4)
> Found bug #679968 and
> https://github.com/gentoo/gentoo/commit/
> 13231bbe125077f1e266b577a46699197c3ec2f7 now but it was done without a
> revbump, hence the fix did not propagate to everyone.  So it needs a revbump
> (and a better fix IMHO), still.

well, I expect it to be missed so most of people would re-emerge this in anyway
Comment 6 Mikle Kolyada archtester Gentoo Infrastructure gentoo-dev Security 2019-04-11 10:43:51 UTC
(In reply to Sebastian Pipping from comment #3)
> Now that dev-python/requests-2.21.0-r1 is the only version of requests left,
> docker-compose is effectively unusable.
> 
> We need to restore something like
> https://github.com/gentoo/gentoo/blob/
> da99ab05e7f74b6060fc9cd34f698fe235ac3861/app-emulation/docker-compose/files/
> docker-compose-1.22.0-setup-py.patch for docker-compose to not keep having
> this problem.

actually this is much easier to sed the '!=' and '<' than create a patch for every release
Comment 7 Sebastian Pipping gentoo-dev 2019-04-28 20:36:58 UTC
(In reply to Mikle Kolyada from comment #5)
> well, I expect it to be missed so most of people would re-emerge this in
> anyway
Not necessarily, since this could have killed docker-compose days after installation of the package, as happened to me on a server recently.


(In reply to Mikle Kolyada from comment #6)
> actually this is much easier to sed the '!=' and '<' than create a patch for
> every release
Easier maybe but not very clean and not complete: it's not just requests, e.g. dev-python/pyyaml-5.1 is blocked by docker-compose as of today without good reason to.
Comment 8 Larry the Git Cow gentoo-dev 2019-05-10 22:27:05 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=da5c9b70bf178b68f852270718ef67dcbbfcb0c7

commit da5c9b70bf178b68f852270718ef67dcbbfcb0c7
Author:     Sebastian Pipping <sping@gentoo.org>
AuthorDate: 2019-05-10 22:08:44 +0000
Commit:     Sebastian Pipping <sping@gentoo.org>
CommitDate: 2019-05-10 22:26:27 +0000

    app-emulation/docker-compose: Fix dependencies
    
    This unblocks system-wide updates of e.g.
    - dev-python/jsonschema-3.0.1
    - dev-python/pyyaml-5.1
    - dev-python/texttable-1.6.1
    Closes: https://bugs.gentoo.org/681002
    Bug: https://bugs.gentoo.org/679968
    
    Signed-off-by: Sebastian Pipping <sping@gentoo.org>
    Package-Manager: Portage-2.3.65, Repoman-2.3.12

 .../docker-compose/docker-compose-1.23.2-r1.ebuild | 66 ++++++++++++++++++++++
 .../files/docker-compose-1.23.2-setup-py.patch     | 58 +++++++++++++++++++
 2 files changed, 124 insertions(+)