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.
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.
(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) :(
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.
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
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
Bug is still present in all released versions of Fedora.
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.
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.
Reopening ... bug persists.
bot fail. Re-opening.
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
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
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
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
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.
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
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
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
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.
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
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
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
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
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.
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.
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
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
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
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
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
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.
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.
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.
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.
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.