Bug 493137 - mock can't build packages for non-$basearch
mock can't build packages for non-$basearch
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
11
All Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-31 14:39 EDT by Jarod Wilson
Modified: 2014-06-09 14:47 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-06-28 07:36:50 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
mock root.log from ppc64 failure (57.89 KB, text/plain)
2009-03-31 14:39 EDT, Jarod Wilson
no flags Details

  None (edit)
Description Jarod Wilson 2009-03-31 14:39:48 EDT
Created attachment 337382 [details]
mock root.log from ppc64 failure

Description of problem:
mock can't build packages for the non-$basearch arch right now. On a ppc64 host with ppc32 userspace, building ppc64 packages fails. Similarly, trying to build i686 packages on an x86_64 host fails.

mock spew from x86_64 rawhide host:

$ mock -r fedora-rawhide-i386 --arch i686 kernel-2.6.29-29.fc11.src.rpm 
INFO: mock.py version 0.9.14 starting...
State Changed: init plugins
State Changed: start
INFO: Start(kernel-2.6.29-29.fc11.src.rpm)  Config(fedora-rawhide-i386)
State Changed: lock buildroot
State Changed: clean
State Changed: init
State Changed: lock buildroot
Mock Version: 0.9.14
INFO: Mock Version: 0.9.14
INFO: enabled root cache
INFO: enabled yum cache
State Changed: cleaning yum metadata
INFO: enabled ccache
State Changed: running yum
State Changed: creating cache
State Changed: setup
ERROR: Exception(kernel-2.6.29-29.fc11.src.rpm) Config(fedora-rawhide-i386) 4 minutes 22 seconds
INFO: Results and/or logs in: /var/lib/mock/fedora-rawhide-i386/result
ERROR: Command failed: 
 # /usr/bin/yum --installroot /var/lib/mock/fedora-rawhide-i386/root/  resolvedep  ccache  'bash >= 2.03' 'bzip2' 'redhat-rpm-config' 'sh-utils' 'tar' 'gcc >= 3.4.2' 'patch >= 2.5.4' 'diffutils' 'binutils >= 2.12' 'rpm-build >= 4.4.2.1-4' 'make >= 3.78' 'gawk' 'perl' 'm4' 'module-init-tools' 'findutils' 'net-tools' 'gzip'
rpmdb: Build signature doesn't match environment
error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30971)
error: cannot open Packages database in /var/lib/mock/fedora-rawhide-i386/root/var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 308, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 157, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 188, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 649, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 239, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 794, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.6/site-packages/yum/config.py", line 864, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed


Possibly actually yum's bug here, but mock blowing up is how I noticed it, so we'll start here...


Version-Release number of selected component (if applicable):
mock-0.9.14-3.fc11.noarch
yum-3.2.22-1.fc11.noarch
rpm-4.7.0-0.beta1.7.fc11.x86_64

How reproducible:
Install x86_64 rawhide host, try to build x86_32 package.
Comment 1 Clark Williams 2009-03-31 16:10:41 EDT
Jarod,

I just did a fast pass at trying to duplicate on an F10 x86_64 box and didn't see the failure in setup (i.e. I went on to the build phase). It'll take me a little while to get my rawhide system setup for test.

Just to confirm, you're seeing it on an x86_64 rawhide box, trying to build a 32-bit i686 kernel rpm?
Comment 2 Jarod Wilson 2009-03-31 16:21:07 EDT
(In reply to comment #1)
> Just to confirm, you're seeing it on an x86_64 rawhide box, trying to build a
> 32-bit i686 kernel rpm?  

That is correct -- and F10's mock/yum/rpm combo works fine here too.
Comment 3 Jarod Wilson 2009-03-31 17:09:59 EDT
Turns out this only happens if you're being lazy and firing off the mock build as root. Works as expected if you're non-root.
Comment 4 Clark Williams 2009-03-31 17:37:03 EDT
root squash issue on NFS filer?
Comment 5 Jesse Keating 2009-03-31 17:47:38 EDT
No, its an all local filesystem.  I've seem some other oddities when running mock as root too.
Comment 6 Clark Williams 2009-03-31 17:51:50 EDT
Ok, we'll keep this one open and see if we can track down the root cause...
Comment 7 Bug Zapper 2009-06-09 08:52:50 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Ian Pilcher 2009-10-02 16:22:25 EDT
Trying to build an i686 package on an x86_64 system, and I ran across this
bug, which seems to indicate I should be running mock as a non-root user.
When I try to do so, however, I get prompted for the root password.

Then when I enter the root password, I still get permission denied errors:

[pilcher@ian srpms]$ mock -r fedora-11-i386 --init
You are attempting to run "mock" which requires administrative
privileges, but more information is needed in order to do so.
Authenticating as "root"
Password:
INFO: mock.py version 0.9.17 starting...
State Changed: init plugins
State Changed: start
State Changed: lock buildroot
State Changed: clean
State Changed: init
ERROR: Could not create dir /var/lib/mock/fedora-11-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/mock/util.py", line 61, in mkdirIfAbsent
    os.makedirs(dirName)
  File "/usr/lib64/python2.6/os.py", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
ERROR: Could not create dir /var/lib/mock/fedora-11-i386/result. Error: [Errno 13] Permission denied: '/var/lib/mock/fedora-11-i386/result'
Comment 9 Stephen Gallagher 2009-10-02 16:27:53 EDT
ipilcher: You need to add your username to the "mock" group in /etc/group.
Comment 10 Ian Pilcher 2009-10-02 17:21:13 EDT
(In reply to comment #9)
> ipilcher: You need to add your username to the "mock" group in /etc/group.  

OK, thanks.  Am I just blind, or is that really not documented anywhere in the package?
Comment 11 Bug Zapper 2010-04-27 09:23:24 EDT
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '11'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 11's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 11 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 12 Jesse Keating 2010-04-27 11:30:42 EDT
We documented it now, and I think we're going to phase out using mock as root.

Need to re-test to see if this still happens though.
Comment 13 Bug Zapper 2010-06-28 07:36:50 EDT
Fedora 11 changed to end-of-life (EOL) status on 2010-06-25. Fedora 11 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 14 Jarod Wilson 2014-06-09 14:47:11 EDT
Just clearing the needinfo flag, so this doesn't show up in the newly-unleashed bugzilla nagmails.

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