Description of problem: rpmbuild cannot build rpm when called from ant. Ant called rpmbuid with following parameters (example taken using strace): "/usr/bin/rpmbuild" "--define" "_topdir/home/vlisivka/svnwork/ops/trunk-clean/tools/prr-mysqld_multi/build" "-bb" "--clean" "SPECS/prr-mysqld_multi.spec" rpmbuild reports following error: [rpm] Building the RPM based on the prr-mysqld_multi.spec file [rpm] error: File /home/vlisivka/svnwork/ops/trunk_clean/tools/prr_mysqld_multi/build/SOURCES/prr-mysqld_multi-3.2.tar.gz: No such file or directory BUILD FAILED Note the strange "_" character inserted instead of "-" in ".../trunk-clean/...". Version-Release number of selected component (if applicable): rpm-4.4.2.3-2.fc9.i386 How reproducible: Steps to Reproduce: 1. Copy directory /usr/src/redhat to /usr/src/redhat-test 2. Cd into that directory. 3. Issue command /usr/bin/rpmbuild --define _topdir`pwd` -bs --clean SPECS/A_SPEC_FILE.spec Actual result: $ pwd /usr/src/redhat-test $ /usr/bin/rpmbuild --define _topdir`pwd` -bs --clean SPECS/firefox.spec error: File /usr/src/redhat_test/SOURCES/firefox-2.0-source.tar.bz2: No such file or directory Workaround: install rpm from Fedora 8 instead of shipped with Fedora 9.
Reassigning to rpm, rpmdevtools does not have anything to do with this AFAICT.
This problem can be solved on ant side by inserting space between "_topdir" and path. See also: https://issues.apache.org/bugzilla/show_bug.cgi?id=45316 Workaround: This small shell wrapper script can be used as workaround: #!/bin/bash OPTIONS=( ) for I in "$@" do [[ "$I" == _topdir* ]] && I="_topdir ${I#_topdir}" OPTIONS[${#OPTIONS[@]}]="$I" done rpmbuild.orig "${OPTIONS[@]}" Just rename original rpmbuild tool to rpmbuild.orig and sotre the shell script as /usr/bin/rpmbuild (don't forget to chmod a+rwx /usr/bin/rpmbuild).
Patch: diff -rub apache-ant-1.7.0.orig/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java --- apache-ant-1.7.0.orig/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java 2006-12-13 14:16:22.000000000 +0200 +++ apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java 2008-07-02 16:10:42.000000000 +0300 @@ -120,7 +120,7 @@ : rpmBuildCommand); if (topDir != null) { toExecute.createArgument().setValue("--define"); - toExecute.createArgument().setValue("_topdir" + topDir); + toExecute.createArgument().setValue("_topdir " + topDir); } toExecute.createArgument().setLine(command); - See also: https://www.jpackage.org/bugzilla/show_bug.cgi?id=301
This message is a reminder that Fedora 9 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 9. 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 '9'. 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 9'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 9 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
This bug is still not fixed in mainstream. This trivial patch must be applied to ant to fix it: https://issues.apache.org/bugzilla/show_bug.cgi?id=45316#c3
This bug appears to have been reported against 'rawhide' during the Fedora 12 development cycle. Changing version to '12'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
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
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.