rpmbuild apparently has strict requirements on the path names used during a
build. However before rpmbuild begins to run it does not validate the path names
to verify they are compliant with its internal requirements and instead will
process almost the entire build before failing with a cryptic error message
related to 1 character length differentials between arguments to a script
rpmbuild invokes.
More info from an email thread:
> Ok, it's simply as it says. /rpmbuild/build is 15 chars and /usr/src/debug
> is 14 chars. That's just a bad choice for the directory name. In koji
> builds go under /builddir/build/BUILD (21 chars), so there is no problem.
> The default for vanilla rpmbuild is /usr/src/redhat/BUILD (21 chars).
>
> It's a technical limitation of the debugedit program that, like the error
> message says, the length of the top build directory name has to be 14 chars
> (to match /usr/src/debug), or more than 15 chars. It does a very limited
> kind of rewriting of the very complex DWARF formats, so there has to be
> enough room in the existing string table for the new directory name.
> Making it able to cope in the general case opens huge cans of worms, and is
> absolutely not going to happen any time soon (or ever in that program as it
> exists today).
>
> Suffice it to say it is far, far more work than is justified to avoid the
> arcane but trivial caveat that the base directory name used for builds must
> be at least 16 chars long.
Thank you very much Roland, I really appreciate the explanation! I would have
been really stuck without it.
The only thing I might take issue with is your belief the error message is
patently obvious. There is no reference to the top build directory or the
requirements for it's length. Just something cryptic about 1 character
differentials in arguments passed to what is essentially a private rpm utility
unlikely to ever be invoked directly.
May I suggest the error message be replaced with something which would direct a
developer to the root cause of the problem, especially since this is a somewhat
arcane limitation.
This is what rpmbuild spits out:
extracting debug info from
/var/tmp/freeradius-1.1.7-3.2.ipa.fc8-root-jdennis/usr/lib/rlm_passwd-1.1.7.so
/usr/lib/rpm/debugedit: -b arg has to be either the same length as -d arg, or
more than 1 char shorter
error: Bad exit status from /var/tmp/rpm-tmp.74023 (%install)
I truly would never have matched the fact a build directory of "/rpmbuild/build"
was the offending culprit, the string does not even appear in the error message.
Maybe rpmbuild should stop immediately with an error if you invoke it with a
topdir which is unacceptable to it's internal operation.
Based on the date this bug was created, it appears to have been reported
during the development of Fedora 8. In order to refocus our efforts as
a project we are changing the version of this bug to '8'.
If this bug still exists in rawhide, please change the version back to
rawhide.
(If you're unable to change the bug's version, add a comment to the bug
and someone will change it for you.)
Thanks for your help and we apologize for the interruption.
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.
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.
I'm glad you found the bug in debugedit.c here even if you don't wish to
confess publically to just how gross the debugedit.c hack of rewriting paths in a fixed
size ELF section _REALLY_ is.
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.
rpmbuild apparently has strict requirements on the path names used during a
build. However before rpmbuild begins to run it does not validate the path names
to verify they are compliant with its internal requirements and instead will
process almost the entire build before failing with a cryptic error message
related to 1 character length differentials between arguments to a script
rpmbuild invokes.
More info from an email thread:
> Ok, it's simply as it says. /rpmbuild/build is 15 chars and /usr/src/debug build/BUILD (21 chars), so there is no problem. redhat/ BUILD (21 chars).
> is 14 chars. That's just a bad choice for the directory name. In koji
> builds go under /builddir/
> The default for vanilla rpmbuild is /usr/src/
>
> It's a technical limitation of the debugedit program that, like the error
> message says, the length of the top build directory name has to be 14 chars
> (to match /usr/src/debug), or more than 15 chars. It does a very limited
> kind of rewriting of the very complex DWARF formats, so there has to be
> enough room in the existing string table for the new directory name.
> Making it able to cope in the general case opens huge cans of worms, and is
> absolutely not going to happen any time soon (or ever in that program as it
> exists today).
>
> Suffice it to say it is far, far more work than is justified to avoid the
> arcane but trivial caveat that the base directory name used for builds must
> be at least 16 chars long.
Thank you very much Roland, I really appreciate the explanation! I would have
been really stuck without it.
The only thing I might take issue with is your belief the error message is
patently obvious. There is no reference to the top build directory or the
requirements for it's length. Just something cryptic about 1 character
differentials in arguments passed to what is essentially a private rpm utility
unlikely to ever be invoked directly.
May I suggest the error message be replaced with something which would direct a
developer to the root cause of the problem, especially since this is a somewhat
arcane limitation.
This is what rpmbuild spits out:
extracting debug info from freeradius- 1.1.7-3. 2.ipa.fc8- root-jdennis/ usr/lib/ rlm_passwd- 1.1.7.so rpm/debugedit: -b arg has to be either the same length as -d arg, or rpm-tmp. 74023 (%install)
/var/tmp/
/usr/lib/
more than 1 char shorter
error: Bad exit status from /var/tmp/
I truly would never have matched the fact a build directory of "/rpmbuild/build"
was the offending culprit, the string does not even appear in the error message.
Maybe rpmbuild should stop immediately with an error if you invoke it with a
topdir which is unacceptable to it's internal operation.