Fpm: Unwanted directories added to RPM

Created on 6 Jun 2018  路  4Comments  路  Source: jordansissel/fpm

When creating an RPM from a virtualenv (whether I use -s dir or -s virtualenv), unwanted directories and files are included in the RPM.

I do not specify /usr/lib/.build-id anywhere and --edit does not show the directories in the spec, but rpm -qlp output.rpm shows the directories.

I have tried excluding and disabling dependencies, but nothing prevents those directories from showing up and failing my installations :( Has anyone else run into this issue?

When I try to install the generated RPM, yum complains about conflicts on /usr/lib/.build-id/$file from the Python package that contains the virtualenv I used. If I uninstall the Python package, then I can install the FPM package (which is broken because it's missing those necessary Python packages that I uninstalled).

Most helpful comment

@hellosputnik I've just also encountered this issue (without installation problems, though) on Fedora 28 box. After some googling around, it comes out, that it has nothing to do with fpm, virtualenv etc. This's an rpmbild's feature (see: https://fedoraproject.org/wiki/Releases/FeatureBuildId and https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo.
Try this option to suppress generation of /usr/lib/.build-id/ links:
fpm .... --rpm-rpmbuild-define "_build_id_links none"

All 4 comments

I uninstalled the Python package and installed an older version of the same Python package and installation was successful. However, the mysterious files and directories still exist in my RPM.

@hellosputnik I've just also encountered this issue (without installation problems, though) on Fedora 28 box. After some googling around, it comes out, that it has nothing to do with fpm, virtualenv etc. This's an rpmbild's feature (see: https://fedoraproject.org/wiki/Releases/FeatureBuildId and https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo.
Try this option to suppress generation of /usr/lib/.build-id/ links:
fpm .... --rpm-rpmbuild-define "_build_id_links none"

Thanks @daoxxx! I really appreciate your response!

@hellosputnik You're welcome. Guess you shold close the issue.

Was this page helpful?
0 / 5 - 0 ratings