Bug 1446214

Summary: python2-crypto-2.6.1-13 fails to install on CentOS Linux release 7.3.1611
Product: [Fedora] Fedora EPEL Reporter: dendory
Component: python-cryptoAssignee: Paul Howarth <paul>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: athmanem, dendory, maxhaase, paul, pcahyna, s.adam
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-10 14:26:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description dendory 2017-04-27 13:12:56 UTC
Description of problem:

python2-crypto-2.6.1-13 fails to install on CentOS Linux release 7.3.1611

Version-Release number of selected component (if applicable):


How reproducible:

Always

Steps to Reproduce:
1. Run yum update

Actual results:


Expected results:


Additional info:

Running transaction
  Installing : python2-crypto-2.6.1-13.el7.x86_64                                                                                                    1/1
Error unpacking rpm package python2-crypto-2.6.1-13.el7.x86_64
error: unpacking of archive failed on file /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info: cpio: rename
  Verifying  : python2-crypto-2.6.1-13.el7.x86_64                                                                                                    1/1

Failed:
  python2-crypto.x86_64 0:2.6.1-13.el7

Comment 1 Paul Howarth 2017-04-27 13:48:01 UTC
Hmm, I wonder what you already have there; a directory or a symlink?

# ls -l /usr/lib64/python2.7/site-packages/

Comment 2 dendory 2017-04-27 15:25:56 UTC
[root@gwendis ~]# ls -l /usr/lib64/python2.7/site-packages/pycrypto*
---------- 1 root root 666 Oct 16  2016 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;5803dcdf
-rw-r--r-- 1 root root 666 Jan 18 14:31 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;589d8fb7
-rw-r--r-- 1 root root 666 Jan 18 14:31 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;5901c19c
-rw-r--r-- 1 root root 666 Jan 18 14:31 /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info;5901ec5e

/usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info:
total 32
-rw-r--r-- 1 root root    1 Jul 21  2016 dependency_links.txt
-rw-r--r-- 1 root root 9076 Jul 21  2016 installed-files.txt
-rw-r--r-- 1 root root  666 Jul 21  2016 PKG-INFO
-rw-r--r-- 1 root root 5918 Jul 21  2016 SOURCES.txt
-rw-r--r-- 1 root root    7 Jul 21  2016 top_level.txt

Comment 3 Paul Howarth 2017-04-29 15:45:52 UTC
Let's see where that existing directory comes from:

# rpm -qf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info

Did you previously install python-crypto/pycrypto from anywhere, either via rpm or other method?

Comment 4 dendory 2017-05-08 15:37:54 UTC
[root@gwendis ~]# rpm -qf /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info
file /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info is not owned by any package

I don't think I would have installed this manually at any time.

Comment 5 Paul Howarth 2017-05-09 07:47:22 UTC
Can you delete or move out of the way (to some other temp directory perhaps) the files/dirs /usr/lib64/python2.7/site-packages/pycrypto* and then try installing the package?

Comment 6 dendory 2017-05-09 15:14:24 UTC
This seems to have worked:


[root@gwendis ~]# mv /usr/lib64/python2.7/site-packages/pycrypto* /tmp/
[root@gwendis ~]# yum install python2-crypto
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * epel: mirrors.cat.pdx.edu
 * extras: mirrors.sonic.net
 * nux-dextop: li.nux.ro
 * updates: mirror.chpc.utah.edu
Resolving Dependencies
--> Running transaction check
---> Package python2-crypto.x86_64 0:2.6.1-13.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================================
 Package                                  Arch                             Version                                  Repository                      Size
=========================================================================================================================================================
Installing:
 python2-crypto                           x86_64                           2.6.1-13.el7                             epel                           476 k

Transaction Summary
=========================================================================================================================================================
Install  1 Package

Total download size: 476 k
Installed size: 2.2 M
Is this ok [y/d/N]: y
Downloading packages:
python2-crypto-2.6.1-13.el7.x86_64.rpm                                                                                            | 476 kB  00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python2-crypto-2.6.1-13.el7.x86_64                                                                                                    1/1
  Verifying  : python2-crypto-2.6.1-13.el7.x86_64                                                                                                    1/1

Installed:
  python2-crypto.x86_64 0:2.6.1-13.el7

Complete!
[root@gwendis ~]#

Comment 7 Paul Howarth 2017-05-09 15:17:41 UTC
I'd guess that someone installed it directly from upstream on 21-07-2016, which would install the software OK (less any security patches) but not satisfy any RPM dependencies.

Anyway, seems OK now, yes?

Comment 8 Pavel Cahyna 2017-06-01 15:44:01 UTC
(In reply to Paul Howarth from comment #7)
> I'd guess that someone installed it directly from upstream on 21-07-2016,

I think https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe should lower the odds of such things happening, no?

Comment 9 Paul Howarth 2017-06-02 10:42:45 UTC
(In reply to Pavel Cahyna from comment #8)
> (In reply to Paul Howarth from comment #7)
> > I'd guess that someone installed it directly from upstream on 21-07-2016,
> 
> I think https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe should
> lower the odds of such things happening, no?

Well not really, since that's all about python3 ...

Comment 10 Paul Howarth 2017-07-10 14:26:35 UTC
OK, closing this now as it appears to have been an issue local to the reporter.

Comment 11 Max 2018-05-16 13:07:46 UTC
(In reply to Paul Howarth from comment #10)
> OK, closing this now as it appears to have been an issue local to the
> reporter.
###############################################################

This is a bug. I can reproduce it on several RHEL 7.5 servers.




Dependencies Resolved

================================================================================
 Package           Arch      Version         Repository                    Size
================================================================================
Updating:
 ansible           noarch    2.5.2-1.el7     epel                         9.0 M
Installing for dependencies:
 python2-crypto    x86_64    2.6.1-15.el7    rhel-7-server-extras-rpms    477 k

Transaction Summary
================================================================================
Install             ( 1 Dependent package)
Upgrade  1 Package

Total size: 9.5 M
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : python2-crypto-2.6.1-15.el7.x86_64                           1/3Error unpacking rpm package python2-crypto-2.6.1-15.el7.x86_64
 
error: unpacking of archive failed on file /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info: cpio: rename
  Updating   : ansible-2.5.2-1.el7.noarch                                   2/3 
error: python2-crypto-2.6.1-15.el7.x86_64: install failed
  Cleanup    : ansible-2.5.1-1.el7.noarch                                   3/3 
  Verifying  : ansible-2.5.2-1.el7.noarch                                   1/3 
  Verifying  : python2-crypto-2.6.1-15.el7.x86_64                           2/3 
  Verifying  : ansible-2.5.1-1.el7.noarch                                   3/3 

Updated:
  ansible.noarch 0:2.5.2-1.el7                                                  

Failed:
  python2-crypto.x86_64 0:2.6.1-15.el7                                          

Complete!
Warning: yum update failed. continuing anyway.

Comment 12 Pavel Cahyna 2018-05-16 13:18:33 UTC
By the way, it is IMO a bug that EPEL ansible requires python(2)-crypto. (And the version in Extras is deprecated and it is better to not use it.)

Comment 13 Paul Howarth 2018-05-16 13:30:58 UTC
(In reply to Pavel Cahyna from comment #12)
> By the way, it is IMO a bug that EPEL ansible requires python(2)-crypto.
> (And the version in Extras is deprecated and it is better to not use it.)

python-crypto is pretty much dead upstream anyway so anyone currently using it would be better switching to pycryptodome.

Regarding Comment#11 (Max), this seems to be a fresh install of python2-crypto from rhel-7-server-extras-rpms (not EPEL), so what is it conflicting with? What owns /usr/lib64/python2.7/site-packages/pycrypto-2.6.1-py2.7.egg-info in the existing system?

Comment 14 Max 2018-05-17 07:45:24 UTC
I'm using one of our templates that's about 1 year old to create the servers. 
Now I'm a bit more confused:

 yum remove python2-crypto.x86_64
Loaded plugins: enabled_repos_upload, fastestmirror, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager
No Match for argument: python2-crypto.x86_64
No Packages marked for removal
Uploading Enabled Repositories Report
Loaded plugins: fastestmirror, langpacks, product-id, subscription-manager

Comment 15 Paul Howarth 2018-05-17 07:51:40 UTC
See Comment#3 to see if the conflict is from an existing rpm, and if not, Comment#5 to work around the conflict.