This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1264160 - pki-base needs to Require: python-requests
pki-base needs to Require: python-requests
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: pki-core (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Matthew Harmsen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-17 12:41 EDT by Peter Robinson
Modified: 2015-11-12 05:17 EST (History)
16 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-12 05:17:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Peter Robinson 2015-09-17 12:41:24 EDT
Doing a "dnf install freeipa-server" I get the following:

$ ipa-server-install --help
Traceback (most recent call last):
  File "/usr/sbin/ipa-server-install", line 25, in <module>
    from ipaserver.install.server import Server
  File "/usr/lib/python2.7/site-packages/ipaserver/install/server/__init__.py", line 5, in <module>
    from .install import Server
  File "/usr/lib/python2.7/site-packages/ipaserver/install/server/install.py", line 29, in <module>
    from ipaserver.install import (
  File "/usr/lib/python2.7/site-packages/ipaserver/install/bindinstance.py", line 32, in <module>
    from ipaserver.install.cainstance import IPA_CA_RECORD
  File "/usr/lib/python2.7/site-packages/ipaserver/install/cainstance.py", line 65, in <module>
    from ipaserver.install.dogtaginstance import DogtagInstance
  File "/usr/lib/python2.7/site-packages/ipaserver/install/dogtaginstance.py", line 27, in <module>
    from pki.client import PKIConnection
  File "/usr/lib/python2.7/site-packages/pki/__init__.py", line 28, in <module>
    import requests
ImportError: No module named requests
$

If I then do: "dnf install python-requests" it works as expected
Comment 1 Alexander Bokovoy 2015-09-17 12:54:31 EDT
Looking at the backtrace, I can see that it is pki-base which needs to gain this dependency.

$ rpm -qf /usr/lib/python2.7/site-packages/pki/__init__.py
pki-base-10.2.7-0.2.fc22.noarch

However, at least in Fedora 22 pki-base has requires on python-requests:

$ rpm -q --requires pki-base|grep python
/usr/bin/python
python(abi) = 2.7
python-ldap
python-lxml
python-requests >= 1.1.0-3

Moving to Dogtag to investigate.
Comment 2 Matthew Harmsen 2015-09-23 12:29:30 EDT
This bug as well as the associated ticket reference the 'pki-base' RPM which is constructed as one of the RPMS of the 'pki-core' component.

The pki-core-10.2.6-7.fc22 spec file contains the following:

    BuildRequires:    python-requests

and

    %package -n       pki-base
    Summary:          Certificate System - PKI Framework
    Group:            System Environment/Base

    BuildArch:        noarch

    Provides:         pki-common = %{version}-%{release}
    Provides:         pki-util = %{version}-%{release}

    Obsoletes:        pki-common < %{version}-%{release}
    Obsoletes:        pki-util < %{version}-%{release}

    Conflicts:        freeipa-server < 3.0.0
    Requires:         apache-commons-cli
    Requires:         apache-commons-codec
    Requires:         apache-commons-io
    Requires:         apache-commons-lang
    Requires:         apache-commons-logging
    Requires:         jakarta-commons-httpclient
    Requires:         java-headless >= 1:1.7.0
    Requires:         javassist
    Requires:         jpackage-utils >= 0:1.7.5-10
    Requires:         jss >= 4.2.6-35
    Requires:         ldapjdk
    Requires:         python-ldap
    Requires:         python-lxml
    Requires:         python-requests >= 1.1.0-3

Additionally, checking Koji, I see that the latest available package for 'python-requests' for Fedora 22 is:
* [http://koji.fedoraproject.org/koji/buildinfo?buildID=678959 python-requests-2.7.0-6.fc22]

Finally, although this bug references a source build for Fedora 22 (pki-base-10.2.7-0.2.fc22.noarch) rather than a Koji build for Fedora 22 (e. g. - pki-base-10.2.6-7.fc22), the associated BuildRequires and Requires have been part of the pki-core.spec file for a very long time:

    # git blame pki-core.spec | grep python-requests
    f630689f specs/pki-core.spec     (Abhishek Koneru   2013-08-14 11:20:58 -0400  109) BuildRequires:    python-requests
    a3b4489e specs/pki-core.spec     (Endi Sukma Dewata 2013-03-11 14:05:30 -0400  289) Requires:         python-requests >= 1.1.0-3
    f630689f specs/pki-core.spec     (Abhishek Koneru   2013-08-14 11:20:58 -0400 1183) - Packages added: python-requests, python-ldap, libselinux-python,
    a3b4489e specs/pki-core.spec     (Endi Sukma Dewata 2013-03-11 14:05:30 -0400 1265) - Added minimum python-requests version.
    c87a6502 specs/pki-core.spec     (Endi Sukma Dewata 2013-02-21 19:47:35 -0500 1271) - Added dependency on python-requests.
Comment 3 Matthew Harmsen 2015-09-23 12:34:55 EDT
Peter,

Please see comment #2 above -- 'pki-base' has had both BuildRequires and Requires of 'python-requests' for a very long time, and 'python-requests' still appears to be available on Fedora 22 and Fedora 23.

Any other ideas?

-- Matt
Comment 4 Peter Robinson 2015-09-24 00:26:34 EDT
No idea but it definitely wasn't installed, I don't have direct access to this device to look at logs at the moment because I'm traveling.
Comment 5 Matthew Harmsen 2015-09-28 16:59:32 EDT
after discussions with edewata on IRC on 9/28/2015, it is believed that this runtime requirement will be needed by both the server and the client, therefore the runtime requirement should be placed in pki-base
Comment 6 Matthew Harmsen 2015-09-28 17:00:16 EDT
(In reply to Matthew Harmsen from comment #5)
> after discussions with edewata on IRC on 9/28/2015, it is believed that this
> runtime requirement will be needed by both the server and the client,
> therefore the runtime requirement should be placed in pki-base

Ignore this entry -- placed comment in wrong bug!
Comment 7 Matthew Harmsen 2015-09-29 20:31:18 EDT
I was finally able to create a Fedora 22 VM using the minimal IPA template in the ABCDE lab (vm-024.abc.idm.lab.eng.brq.redhat.com), and attempted to replicate the steps described in the initial description:

    * launched console to obtain vm name and IP address
      vm-024.abc.idm.lab.eng.brq.redhat.com
      10.34.78.24
    * logged in
    * sudo passwd root
    * su -
    * dnf update
    * sync; sync; sync; reboot
    * logged in
    * su -
    * rpm -q python-requests
      package python-requests is not installed
    * rpm -q freeipa-server
      package freeipa-server is not installed
    * dnf install freeipa-server
      NOTE:  This installed python-requests.noarch 2.7.0-6.fc22
    * ipa-server-install --help
      Correctly displayed Usage: ipa-server-install [options]

Please verify that this bug still exists.
Comment 8 Peter Robinson 2015-09-29 23:08:44 EDT
I was testing on F-23 and rawhide.

I don't currently have access to the device but I'll attempt to re-test but I probably won't have time until late this week or early next.
Comment 9 Matthew Harmsen 2015-09-30 11:47:05 EDT
(In reply to Peter Robinson from comment #8)
> I was testing on F-23 and rawhide.
> 

I also tested this on F-23 per https://fedorahosted.org/pki/ticket/1613 PKI TRAC Ticket #1613.

> I don't currently have access to the device but I'll attempt to re-test but
> I probably won't have time until late this week or early next.

That is fine -- thanks!
Comment 10 Matthew Harmsen 2015-11-11 12:16:00 EST
Peter,

Is it possible you were encountering the problem described in:
* https://fedorahosted.org/pki/ticket/1690 pki.client may use PyOpenSSL or ssl?

Sounds like problems associated with python-requests.

Thanks,
-- Matt

P. S. - added cheimes to cc list of this bug.
Comment 11 Peter Robinson 2015-11-12 05:17:31 EST
> Is it possible you were encountering the problem described in:
> * https://fedorahosted.org/pki/ticket/1690 pki.client may use PyOpenSSL or
> ssl?
> 
> Sounds like problems associated with python-requests.

No, not at all, for starters this wasn't an upgrade but a clean install and the problem was purely a missing dependency as stated in the bug title.

Doing a "dnf install freeipa-server" on a minimal install seems to pull this in now on F-24 at least so it looks like it might be fixed

Note You need to log in before you can comment on or make changes to this bug.