Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1688173 - Cannot create src.rpm in epel-7-x86_64 chroot
Summary: Cannot create src.rpm in epel-7-x86_64 chroot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-03-13 10:22 UTC by Lukas Slebodnik
Modified: 2019-05-17 01:04 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-17 01:04:41 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Slebodnik 2019-03-13 10:22:13 UTC
Description of problem:
I tried to create src.rpm for epel7 and it failed for me on rawhide


Version-Release number of selected component (if applicable):
sh$ rpm -q python2-urlgrabber python3-urlgrabber mock yum dnf systemd
python2-urlgrabber-4.0.0-1.fc31.noarch
package python3-urlgrabber is not installed
mock-1.4.14-1.fc31.noarch
yum-3.4.3-521.fc30.noarch
dnf-4.2.1-1.fc31.noarch
systemd-241-2.gita09c170.fc31.x86_64

How reproducible:
Deterministic

Steps to Reproduce:
1. dnf isntall -y mock cpio wget 
# just in case you already used mock on that system
2. rm -rf /var/cache/mock/*
3. dnf remove -y python3-urlgrabber
4. wget https://kojipkgs.fedoraproject.org//packages/mock/1.4.14/2.el7/src/mock-1.4.14-2.el7.src.rpm
5. rpm2cpio mock-1.4.14-2.el7.src.rpm | cpio -i
6.  mock --root epel-7-x86_64 --resultdir . --buildsrpm --sources=. --spec=mock.spec

Actual results:
[build@host mock]$ mock --root epel-7-x86_64 --resultdir . --buildsrpm --sources=. --spec=mock.spec 
INFO: mock.py version 1.4.14 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(mock.spec)  Config(epel-7-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.14
INFO: Mock Version: 1.4.14
Start: yum install
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.
//snip

 chkconfig-1.7.4-1.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  sqlite-3.7.17-8.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  zip-3.0-11.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  libcurl-7.29.0-51.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  perl-Exporter-5.68-3.el7.noarch: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  libgcc-4.8.5-36.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  basesystem-10.0-7.el7.centos.noarch: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  libselinux-2.5-14.1.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  ca-certificates-2018.2.22-70.0.el7_5.noarch: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  openldap-2.4.44-21.el7_6.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  glibc-headers-2.17-260.el7_6.3.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  perl-Socket-2.010-4.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  nspr-4.19.0-1.el7_5.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed
  libverto-0.2.5-4.el7.x86_64: [Errno 5] "/usr/libexec/urlgrabber-ext-down" is not installed

Expected results:
[build@host mock]$ mock --root epel-7-x86_64 --resultdir . --buildsrpm --sources=. --spec=mock.spec 
INFO: mock.py version 1.4.14 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
INFO: Start(mock.spec)  Config(epel-7-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
Start: unpacking root cache
Finish: unpacking root cache
INFO: enabled dnf cache
Start: cleaning dnf metadata
Finish: cleaning dnf metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.14
INFO: Mock Version: 1.4.14
Start: dnf update
BaseOS                                                                                                                                                      32 kB/s | 3.6 kB     00:00    
updates                                                                                                                                                    9.8 kB/s | 3.4 kB     00:00    
epel                                                                                                                                                        15 kB/s | 4.7 kB     00:00    
extras                                                                                                                                                      31 kB/s | 3.4 kB     00:00    
sclo                                                                                                                                                       7.6 kB/s | 2.9 kB     00:00    
sclo-rh                                                                                                                                                    8.4 kB/s | 3.0 kB     00:00    
Dependencies resolved.
Nothing to do.
Complete!
Finish: dnf update
Finish: chroot init
Start: buildsrpm
Start: rpmbuild -bs
sh: /usr/bin/python2: No such file or directory
sh: /usr/bin/python2: No such file or directory
Building target platforms: x86_64
Building for target x86_64
Wrote: /builddir/build/SRPMS/mock-1.4.14-2.el7.src.rpm
Finish: rpmbuild -bs
Finish: buildsrpm
INFO: Done(mock.spec) Config(epel-7-x86_64) 0 minutes 6 seconds
INFO: Results and/or logs in: .
INFO: Cleaning up build root ('cleanup_on_success=True')
Start: clean chroot
Finish: clean chroot
Finish: run

Additional info:
It did not help to install missing binary due to python2/3 incompatibilities

[root@host ~]#  dnf install /usr/libexec/urlgrabber-ext-down
Fedora 29 kernel - x86_64 from Updates           24 kB/s |  22 kB     00:00    
Fedora - Modular Rawhide - Developmental packag  29 kB/s |  17 kB     00:00    
Fedora - Rawhide - Developmental packages for t  27 kB/s |  18 kB     00:00    
Dependencies resolved.
================================================================================
 Package                  Architecture Version              Repository     Size
================================================================================
Installing:
 python3-urlgrabber       noarch       4.0.0-1.fc31         rawhide       105 k

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

Total download size: 105 k
Installed size: 418 k
Is this ok [y/N]: y
Downloading Packages:
python3-urlgrabber-4.0.0-1.fc31.noarch.rpm      3.6 MB/s | 105 kB     00:00    
--------------------------------------------------------------------------------
Total                                           111 kB/s | 105 kB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Installing       : python3-urlgrabber-4.0.0-1.fc31.noarch                 1/1 
  Running scriptlet: python3-urlgrabber-4.0.0-1.fc31.noarch                 1/1 
  Verifying        : python3-urlgrabber-4.0.0-1.fc31.noarch                 1/1 

Installed:
  python3-urlgrabber-4.0.0-1.fc31.noarch                                        

Complete!

[build@host mock]$ mock --root epel-7-x86_64 --resultdir . --buildsrpm --sources=. --spec=mock.spec 
INFO: mock.py version 1.4.14 starting (python version = 3.7.2)...
Start: init plugins
INFO: selinux disabled
Finish: init plugins
Start: run
INFO: Start(mock.spec)  Config(epel-7-x86_64)
Start: clean chroot
Finish: clean chroot
Start: chroot init
INFO: calling preinit hooks
INFO: enabled root cache
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled HW Info plugin
Mock Version: 1.4.14
INFO: Mock Version: 1.4.14
Start: yum install
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

base                                                                                                                                                                | 3.6 kB  00:00:00     
epel                                                                                                                                                                | 4.7 kB  00:00:00     
extras                                                                                                                                                              | 3.4 kB  00:00:00     
sclo                                                                                                                                                                | 2.9 kB  00:00:00     
sclo-rh                                                                                                                                                             | 3.0 kB  00:00:00     
updates                                                                                                                                                             | 3.4 kB  00:00:00     
Traceback (most recent call last):
  File "/usr/libexec/urlgrabber-ext-down", line 75, in <module>
    main()
  File "/usr/libexec/urlgrabber-ext-down", line 52, in main
    for k in line.split(' '):
TypeError: a bytes-like object is required, not 'str

Comment 1 Miroslav Suchý 2019-04-19 19:42:07 UTC
Hmm, I do not have python3-urlgrabber installed, but I can run
  mock --root epel-7-x86_64 --resultdir . --buildsrpm --sources=. --spec=mock.spec
without any issue.

Comment 2 Lukas Slebodnik 2019-04-22 14:35:56 UTC
(In reply to Miroslav Suchý from comment #1)
> Hmm, I do not have python3-urlgrabber installed, but I can run
>   mock --root epel-7-x86_64 --resultdir . --buildsrpm --sources=.
> --spec=mock.spec
> without any issue.

I cannot reproduce with following packages either.

sh$ rpm -q python2-urlgrabber python3-urlgrabber mock yum dnf systemd
python2-urlgrabber-4.0.0-1.fc31.noarch
package python3-urlgrabber is not installed
mock-1.4.14-1.fc31.noarch
yum-4.2.2-2.fc31.noarch
dnf-4.2.2-2.fc31.noarch
systemd-241-2.gita09c170.fc31.x86_64

dnf was upgraded and yum (yum3 was replaced by dnf/yum4))

Comment 3 Doran Barton 2019-05-06 19:57:16 UTC
I am seeing the same behavior as Lukas on Fedora 30 trying to build EL6/EL7 packages with mock. Some help resolving this problem would be very helpful.

Comment 4 Lukas Slebodnik 2019-05-07 07:54:53 UTC
(In reply to Doran Barton from comment #3)
> I am seeing the same behavior as Lukas on Fedora 30 trying to build EL6/EL7
> packages with mock. Some help resolving this problem would be very helpful.

I am already on rawhide.
Please reopen BZ change version to f30 and provide version of following packages:
  rpm -q python2-urlgrabber python3-urlgrabber mock yum dnf systemd

Comment 5 Sergio Basto 2019-05-09 23:42:27 UTC
On Fedora 30 with mock-1.4.15-1.fc30.noarch I see the same error.

I found the solution, we need add [1] to /etc/mock/epel-6-i386.cfg 

package_manager = yum seems that is the problem, the message [2] proves that mock try use yum . 

Reopening this bug ... 
 

[1] 
config_opts['package_manager'] = 'dnf'

[2]
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

Comment 6 Pavel Raiskup 2019-05-10 07:50:34 UTC
I bet the traceback should be fixed in python3-urlgrabber.

I'm curious though who should in this case depend on python3-urlgrabber,
mock or dnf-yum?

Comment 7 Fedora Update System 2019-05-12 11:04:19 UTC
python-urlgrabber-4.0.0-2.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-ef2f2050b6

Comment 8 Fedora Update System 2019-05-13 02:24:37 UTC
python-urlgrabber-4.0.0-2.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-ef2f2050b6

Comment 9 Fedora Update System 2019-05-17 01:04:41 UTC
python-urlgrabber-4.0.0-2.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.


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