Only dest dir longer than base dir not supported

Solution In Progress - Updated -

Environment

  • Any RHEL and Fedora versions
  • It happens usually if you build packages under root user

Issue

The following line gets printed while building packages through rpmbuild or rhpkg:

Only dest dir longer than base dir not supported

Resolution

  • In case of building a package through rpmbuild, define _topdir in ~/.rpmmacros to something longer than /usr/src/debug, e.g.:
%_topdir %(echo $HOME)/rpmbuild_usr_src_debug
  • In case of building a package through rhpkg, make a directory with the source code longer:
# mv /root/rpm /root/rpm_usr_src_debug

Root Cause

The error comes from debugedit utility, which is part of rpm package and is used to rewrite source path in debuginfo section of object files from build directory to /usr/src/debug.

Diagnostic Steps

# rhpkg local
...
extracting debug info from /root/rpmbuild/BUILDROOT/rpm-4.8.0-38.el6_6.x86_64/bin/rpm
Only dest dir longer than base dir not supported
error: Bad exit status from /var/tmp/rpm-tmp.BnwpLC (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.BnwpLC (%install)
Could not execute local: Non zero exit
#
  • Component
  • rpm

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments