Description of problem: mock does not transparently escape the passed commands/parameters. copy-paster a list of requirements, quoted them by 's and it does not work. Version-Release number of selected component (if applicable): mock-1.1.5-1.fc13.noarch How reproducible: Always. Steps to Reproduce: mock -v -r fedora-14-x86_64 --install 'kde4-macros(api)' Actual results: DEBUG: Executing command: /usr/bin/yum --installroot /var/lib/mock/fedora-14-x86_64/root/ install kde4-macros(api) DEBUG: /bin/sh: -c: line 0: syntax error near unexpected token `(' DEBUG: /bin/sh: -c: line 0: `/usr/bin/yum --installroot /var/lib/mock/fedora-14-x86_64/root/ install kde4-macros(api)' DEBUG: Child returncode was: 1 Expected results: Installed kde-filesystem rpm. Additional info: mock -r fedora-14-x86_64 --shell yum install 'kde4-macros(api)' fails with: sh: -c: line 0: syntax error near unexpected token `(' sh: -c: line 0: `PS1='mock-chroot> ' /usr/sbin/chroot /var/lib/mock/fedora-14-x86_64/root/ yum install kde4-macros(api)' But: mock -r fedora-14-x86_64 --shell mock-chroot> yum install 'kde4-macros(api)' Installed: kde-filesystem.noarch 0:4-35.fc13
the quotes get stripped from input parameters when invoked from the shell. if you've got a package name with shell metacharacters in them, you'll need to escape the quotes so that they get passed in as part of the package name: mock -v -r fedora-14-x86_64 --install \'kde4-macros(api)\'
(In reply to comment #1) > the quotes get stripped from input parameters when invoked from the shell. Yes, mock gets it correctly: argc = 6 argv[0] = <mock> argv[1] = <-v> argv[2] = <-r> argv[3] = <fedora-14-x86_64> argv[4] = <--install> argv[5] = <kde4-macros(api)> > if you've got a package name with shell metacharacters in them, you'll need to > escape the quotes so that they get passed in as part of the package name: > > mock -v -r fedora-14-x86_64 --install \'kde4-macros(api)\' Yes, but this is a workaround of a mock bug. Caller of mock does not know and should not know how the arguments get processed internally in mock. Caller of mock passed the parameters correctly. If mock needs it mock has to escape the parameters on its own. I do not mind but if this bug remains in mock it is WONTFIX, not NOTABUG.
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
I would accept a patch that escapes the input arguments to be safe to passing to yum via the shell.
This message is a reminder that Fedora 13 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 13. 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 '13'. 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 13'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 13 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
Unaware since which fix but it works now, thanks. 32067 execve("/usr/bin/yum", ["/usr/bin/yum", "--installroot", "/var/lib/mock/fedora-14-x86_64/r"..., "install", "kde4-macros(api)"], [/* 9 vars */] <unfinished ...> DEBUG: ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-14-x86_64/root/', 'install', 'kde4-macros(api)'] DEBUG: Executing command: ['/usr/bin/yum', '--installroot', '/var/lib/mock/fedora-14-x86_64/root/', 'install', 'kde4-macros(api)'] DEBUG: ================================================================================ DEBUG: Package Arch Version Repository Size DEBUG: ================================================================================ DEBUG: Installing: DEBUG: kde-filesystem noarch 4-35.fc13 fedora 46 k DEBUG: Transaction Summary DEBUG: ================================================================================ DEBUG: Install 1 Package(s) DEBUG: Total download size: 46 k DEBUG: Installed size: 3.7 k DEBUG: Installed: DEBUG: kde-filesystem.noarch 0:4-35.fc13 DEBUG: Child returncode was: 0 INFO: ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: kde-filesystem noarch 4-35.fc13 fedora 46 k Transaction Summary ================================================================================ Install 1 Package(s) Total download size: 46 k Installed size: 3.7 k Installed: kde-filesystem.noarch 0:4-35.fc13