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 622792 - dysfunctional target_arch-check
Summary: dysfunctional target_arch-check
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 13
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-10 12:44 UTC by Ralf Corsepius
Modified: 2013-01-10 06:08 UTC (History)
3 users (show)

Fixed In Version: mock-1.1.10-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-28 20:56:02 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Ralf Corsepius 2010-08-10 12:44:45 UTC
Description of problem:

The check inside of /usr/sbin/mock to compare target_arch against arch is bogus.

target_arch is a target configuration feature not a host feature. I.e. whether a particular target_arch is supported by a particular buildroot setup can not be hard-coded into mock itself.

Examples: 
* building ppc rpms on i386 or x86_64.
It's well possible to supply a mock configuration (/etc/mock + buildgroups) to set up a cross-building environment to build ppc-rpms on x86_86.

* building rpms for other linux distros on Fedora, e.g. openSUSE-rpms on Fedora.
(OpenSUSE's target arch is i586 - This is the case I encountered this bug with).


Version-Release number of selected component (if applicable):
mock-1.1.3-1.fc13.noarch

How reproducible:
Always.

Steps to Reproduce:
1. set up an /etc/mock/*.cfg, which uses target_arch=i586
2. run mock
  
Actual results:

# /usr/bin/mock --configdir=/etc/mock -r suse-11.2-i586 rebuild rtems-4.9-sparc-rtems4.9-gcc-4.3.2-25.suse11.2.src.rpm
Building rtems-4.9-sparc-rtems4.9-gcc-4.3.2-25.suse11.2.src.rpm for suse-11.2-i586-rtems4.9
ERROR: Cannot build target i586 on arch x86_64


Expected results:
Function. This check is dysfunctional.

Additional info:
* AFAIS, you have hard-coded the restrictions applying to fedora/redhat-distro's default configuraion into mock. This is a mistake.
* This is a regresson. Older mocks (without this check) worked perfectly.

I can imagine several work-arounds to this issue:
* Add an option to disable this check, rsp. a config_opts item to disable it from inside of *.cfgs.
* Remove it (It's working prinicple is flawed)
* combine the check with "root" or the basename of "*.cfg", such that this check will only be applied to those *.cfg being shipped with fedora.

Comment 1 Clark Williams 2010-08-10 14:53:37 UTC
it's not dysfunctional. It works perfectly for what I want it to do, which is to prevent people from trying to build 64-bit  packages on 32-bit distros (since we do not support that on Fedora or RHEL and I know of no plans to support that). 

I have added i586 as a supported arch for the next release, which should be this week. 

I'll admit that I didn't think about cross compilation and will be perfectly happy to work with you to merge patches which make cross-compilation easier (i.e. moving this logic into config file space rather than hard-coded). Feel free to send me some.

Comment 2 Ralf Corsepius 2010-08-10 15:12:17 UTC
(In reply to comment #1)
> it's not dysfunctional. It works perfectly for what I want it to do, which is
> to prevent people from trying to build 64-bit  packages on 32-bit distros
> (since we do not support that on Fedora or RHEL and I know of no plans to
> support that). 
Well, this a matter of perspective. IMO, you turned mock from a general, distro-independent tool into a fedora/redhat specific tool - That's a regression.

> I have added i586 as a supported arch for the next release, which should be
> this week. 
OK, I see how this (IMHO: cludge) would work-around my issue.

Still, I think you have fallen into the old "build"<->"host"<->"target" trap like many people before.

> I'll admit that I didn't think about cross compilation and will be perfectly
> happy to work with you to merge patches which make cross-compilation easier
> (i.e. moving this logic into config file space rather than hard-coded). Feel
> free to send me some. 
I would do so, but I don't speak python (OK, I can read it, but writing is something entirely different) :(

Comment 3 Ralf Corsepius 2010-08-10 15:56:00 UTC
Another thought:

You could add support for a config_opts['build_arch'] to denote the required "minimum arch" or a config_opts['build_archs'] to denote all "compatible host archs". Then you could process this build_arch[s] in essentially the same way as you currently do with %target_arch.

It would
a) render build_arch[s] user-configurable
b) render the restrictions user-configurable.
c) decouple target and build-host.

AFAIS, all that would basically be required to implement the "build_arch" idea would be you to replace your current target_arch in your arch-check with build_arch and to add appropriate "config_opts['build_arch'] = ..." to fedora's/RH's /etc/mock/*.cfg.

Comment 4 Ralf Corsepius 2010-08-29 14:41:13 UTC
Now things are really f***ed up, now comprising Fedora 12:

/usr/bin/mock --configdir=/home/ERshare/rtems-mock/etc/mock -r mingw32-i686-rtems4.10 --resultdir=/home/ERshare/rtems-mock/var/lib/rtems-mock/result/mingw32-i686-rtems4.10/rtems-4.10-sparc-rtems4.10-gcc-4.4.4-4/ rebuild /home/ERshare/rtems-mock/var/lib/rtems-mock/tobuild/mingw32-i686-rtems4.10/rtems-4.10-sparc-rtems4.10-gcc-4.4.4-4.mgw.src.rpm
Building rtems-4.10-sparc-rtems4.10-gcc-4.4.4-4.mgw.src.rpm for mingw32-i686-rtems4.10
ERROR: Cannot build target i686-pc-mingw32 on arch x86_64

# rpm -q mock
mock-1.0.11-1.fc12.noarch

Comment 5 Bug Zapper 2010-11-03 11:04:38 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 '12'.

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 12'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 12 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 6 Ralf Corsepius 2010-11-03 11:12:36 UTC
Bug is still present in all released versions of Fedora.

Comment 7 Ralf Corsepius 2010-11-03 22:12:13 UTC
Resetting version to 12. 

This bug is present in all released versions of Fedora (i.e. >= 12) not only rawhide.

May-be this confuses the bug-zappers's scripts nevertheless setting "version" to "rawhide" is simply plain wrong.

Comment 8 Bug Zapper 2010-12-03 12:52:32 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 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 9 Ralf Corsepius 2010-12-04 04:35:08 UTC
Reopening ... bug persists.

Comment 10 Bug Zapper 2010-12-04 07:23:10 UTC
Fedora 12 changed to end-of-life (EOL) status on 2010-12-02. Fedora 12 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 11 Jesse Keating 2010-12-06 18:18:54 UTC
bot fail.  Re-opening.

Comment 12 Fedora Update System 2010-12-14 16:10:47 UTC
mock-1.1.7-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.7-1.fc13

Comment 13 Fedora Update System 2010-12-14 16:11:00 UTC
mock-1.1.7-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.7-1.fc14

Comment 14 Fedora Update System 2010-12-14 16:13:37 UTC
mock-1.0.14-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.14-1.el5

Comment 15 Fedora Update System 2010-12-15 09:02:14 UTC
mock-1.1.7-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/mock-1.1.7-1.fc14

Comment 16 Fedora Update System 2010-12-28 20:55:51 UTC
mock-1.1.7-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2011-01-18 19:58:18 UTC
mock-1.1.8-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.8-1.fc14

Comment 18 Fedora Update System 2011-01-18 19:58:59 UTC
mock-1.1.8-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.8-1.fc13

Comment 19 Fedora Update System 2011-01-18 20:03:53 UTC
mock-1.0.15-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.15-1.el5

Comment 20 Fedora Update System 2011-01-21 23:03:51 UTC
mock-1.1.8-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2011-02-20 02:26:02 UTC
mock-1.1.9-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc13

Comment 22 Fedora Update System 2011-02-20 02:29:14 UTC
mock-1.0.16-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5

Comment 23 Fedora Update System 2011-02-20 02:32:07 UTC
mock-1.1.9-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.el6

Comment 24 Fedora Update System 2011-02-20 02:35:00 UTC
mock-1.1.9-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc14

Comment 25 Fedora Update System 2011-03-03 08:24:36 UTC
mock-1.1.9-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Fedora Update System 2011-03-03 08:33:35 UTC
mock-1.1.9-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 27 Fedora Update System 2011-05-13 20:33:49 UTC
mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15

Comment 28 Fedora Update System 2011-05-13 20:38:32 UTC
mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14

Comment 29 Fedora Update System 2011-05-13 20:42:50 UTC
mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5

Comment 30 Fedora Update System 2011-05-13 20:47:08 UTC
mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13

Comment 31 Fedora Update System 2011-05-13 20:51:20 UTC
mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6

Comment 32 Fedora Update System 2011-05-19 04:35:11 UTC
mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2011-05-25 02:42:35 UTC
mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 34 Fedora Update System 2011-05-25 03:16:53 UTC
mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 35 Fedora Update System 2011-06-02 19:06:46 UTC
mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 36 Fedora Update System 2011-06-02 19:16:44 UTC
mock-1.1.10-1.el6 has been pushed to the Fedora EPEL 6 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.