ansibleplaybookbundle / ansible-playbook-bundle

THIS REPO IS MIGRATING: https://github.com/automationbroker/apb
GNU General Public License v2.0
140 stars 70 forks source link

Unresolved dependencies for CLI tools on Fedora 28 #290

Closed erdeiattila closed 6 years ago

erdeiattila commented 6 years ago

Trying to install APB CLI tools on Fedora 28 with

sudo dnf -y install dnf-plugins-core
sudo dnf -y copr enable @ansible-service-broker/ansible-service-broker-latest
sudo dnf -y install apb

Throws the following error:

[...]
Problem: conflicting requests
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.5-1.20180427200931.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.6-1.20180430151155.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.7-1.20180504183957.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.20180511143338.fc28.noarch
[...]

Similar thing happens when trying to build with tito from source:

git clone https://github.com/fusor/ansible-playbook-bundle.git
cd ansible-playbook-bundle/
tito build --test --rpm -i
[...]
Error: 
 Problem 1: conflicting requests
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.git.0.2872e77.fc28.noarch
 Problem 2: package apb-container-scripts-1.2.8-1.git.0.2872e77.fc28.noarch requires apb, but none of the providers can be installed
  - conflicting requests
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.5-1.20180427200931.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.6-1.20180430151155.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.7-1.20180504183957.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.20180511143338.fc28.noarch
  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.git.0.2872e77.fc28.noarch

ERROR: Error running command: sudo dnf install -C -y /tmp/tito/noarch/apb-1.2.8-1.git.0.2872e77.fc28.noarch.rpm /tmp/tito/noarch/apb-container-scripts-1.2.8-1.git.0.2872e77.fc28.noarch.rpm

Status code: 1

Command output: ['Last metadata expiration check: 0:01:41 ago on Fri May 11 16:39:06 2018.', 'Error: ', ' Problem 1: conflicting requests', '  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.git.0.2872e77.fc28.noarch', ' Problem 2: package apb-container-scripts-1.2.8-1.git.0.2872e77.fc28.noarch requires apb, but none of the providers can be installed', '  - conflicting requests', '  - nothing provides python-docker < 3.0.0 needed by apb-1.2.5-1.20180427200931.fc28.noarch', '  - nothing provides python-docker < 3.0.0 needed by apb-1.2.6-1.20180430151155.fc28.noarch', '  - nothing provides python-docker < 3.0.0 needed by apb-1.2.7-1.20180504183957.fc28.noarch', '  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.20180511143338.fc28.noarch', '  - nothing provides python-docker < 3.0.0 needed by apb-1.2.8-1.git.0.2872e77.fc28.noarch']
[...]

python-docker is not available from the Fedora repo, but python2-docker and python3-docker are: (not sure if this has any significance)

dnf list "python*-docker"
Last metadata expiration check: 0:14:07 ago on Fri 11 May 2018 04:39:06 PM CEST.
Installed Packages
python2-docker.noarch                                                                                                 3.2.1-1.fc28                                                                           @fedora
python3-docker.noarch                                                                                                 3.2.1-1.fc28                                                                           @fedora

System:

Linux localhost.localdomain 4.16.7-300.fc28.x86_64 #1 SMP Wed May 2 20:09:13 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
jmontleon commented 6 years ago

Thansk for the report. It looks like python2-docker was updated to 3.2.1 in Fedora 28.

I submitted a PR that I think will solve this rather easily. https://github.com/ansibleplaybookbundle/ansible-playbook-bundle/pull/291

Please be aware that when this gets merged and built you're likely going to hit an issue with google-auth/pyasn1-modules. python2-google-auth was updated to 1.3.0 in F28, but python2-pyasn1-modules is only providing 0.1.5, whereas it requires 0.2.1. I filed a BZ for this as it's between two Fedora packages out of our hands. https://bugzilla.redhat.com/show_bug.cgi?id=1577286

That said, you can sudo dnf downgrade python2-google-auth to get google-auth 1.1.1 from our repo until the above issue is sorted out.

erdeiattila commented 6 years ago

No problem! Out of curiosity: Looking at the PR, how can ...

 -Requires: python-docker < 3.0.0 

...solve this? The python-docker package is not available from the Fedora repo, only python2-docker and python3-docker are. Won't it still try to fetch the first, even with the relaxed requirements?

jmontleon commented 6 years ago

python2-docker satisfies it.

sudo dnf whatprovides python-docker Failed to synchronize cache for repo 'beaker', disabling. Last metadata expiration check: 2:41:27 ago on Fri 11 May 2018 10:58:01 AM EDT. python2-docker-3.2.1-1.fc28.noarch : A Python library for the Docker Engine API Repo : @System Matched from: Provide : python-docker = 3.2.1-1.fc28

python2-docker-3.2.1-1.fc28.noarch : A Python library for the Docker Engine API Repo : fedora Matched from: Provide : python-docker = 3.2.1-1.fc28

$ sudo dnf install ~/rpmbuild/RPMS/noarch/apb-1.2.8-1.git.1.72ad259.fc28.noarch.rpm 
Failed to synchronize cache for repo 'beaker', disabling.
Last metadata expiration check: 2:47:12 ago on Fri 11 May 2018 10:58:01 AM EDT.
Dependencies resolved.
====================================================================================================================================================================================
 Package                                         Arch                            Version                                                Repository                             Size
====================================================================================================================================================================================
Installing:
 apb                                             noarch                          1.2.8-1.git.1.72ad259.fc28                             @commandline                           55 k
Installing dependencies:
 python2-docker                                  noarch                          3.2.1-1.fc28                                           fedora                                191 k
 python2-docker-pycreds                          noarch                          0.2.2-2.fc28                                           fedora                                 19 k

Transaction Summary
====================================================================================================================================================================================
Install  3 Packages

Total size: 266 k
Total download size: 210 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): python2-docker-pycreds-0.2.2-2.fc28.noarch.rpm                                                                                                36 kB/s |  19 kB     00:00    
(2/2): python2-docker-3.2.1-1.fc28.noarch.rpm                                                                                                       265 kB/s | 191 kB     00:00    
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                               271 kB/s | 210 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                                                                                            1/1 
  Installing       : python2-docker-pycreds-0.2.2-2.fc28.noarch                                                                                                                 1/3 
  Installing       : python2-docker-3.2.1-1.fc28.noarch                                                                                                                         2/3 
  Installing       : apb-1.2.8-1.git.1.72ad259.fc28.noarch                                                                                                                      3/3 
  Running scriptlet: apb-1.2.8-1.git.1.72ad259.fc28.noarch                                                                                                                      3/3 
  Verifying        : apb-1.2.8-1.git.1.72ad259.fc28.noarch                                                                                                                      1/3 
  Verifying        : python2-docker-3.2.1-1.fc28.noarch                                                                                                                         2/3 
  Verifying        : python2-docker-pycreds-0.2.2-2.fc28.noarch                                                                                                                 3/3 

Installed:
  apb.noarch 1.2.8-1.git.1.72ad259.fc28                      python2-docker.noarch 3.2.1-1.fc28                      python2-docker-pycreds.noarch 0.2.2-2.fc28                     

Complete!