#1613 Missing dependency on python-requests
Closed: Invalid Opened by mkosek.

pki-base-10.2.6-7.fc23.noarch miss dependency on python-requests. It breaks FreeIPA, if the package is not installed:

# ipa-server-install --version
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 31, in <module>
    from ipaserver.install import (
  File "/usr/lib/python2.7/site-packages/ipaserver/install/bindinstance.py", line 35, in <module>
    from ipaserver.install.cainstance import IPA_CA_RECORD
  File "/usr/lib/python2.7/site-packages/ipaserver/install/cainstance.py", line 67, 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

Per CS/DS meeting of 09/21/2015: 10.2.7

Need to determine which platforms require this.

This ticket as well as the associated bug 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.fc23 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 23 is:

Finally, although the associated 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.

I created a Fedora 23 VM (vm-025.example.com), and attempted to replicate the steps described in the initial description:

    * launched console to obtain vm name
      vm-025.example.com
    * logged in
    * sudo passwd root
    * su -
    * dnf update
    * sync; sync; sync; reboot
    * logged in
      NOTE: name changed to vm-026.example.com
    * 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.fc23
    * ipa-server-install --help
      Correctly displayed Usage: ipa-server-install [options]

Please verify that this issue still exists.

Metadata Update from @mkosek:
- Issue assigned to mharmsen
- Issue set to the milestone: 10.2.x

Dogtag PKI is moving from Pagure issues to GitHub issues. This means that existing or new
issues will be reported and tracked through Dogtag PKI's GitHub Issue tracker.

This issue has been cloned to GitHub and is available here:
https://github.com/dogtagpki/pki/issues/2172

If you want to receive further updates on the issue, please navigate to the
GitHub issue and click on Subscribe button.

Thank you for understanding, and we apologize for any inconvenience.

Metadata