I am building a RPM package for a c++ application. The compilation and installation succeed. Then the the following command fails /usr/lib/rpm/check-buildroot
with the following error:
Found '/user/dfsdf/rpmbuild/BUILDROOT/vendor-xerces-c-3.1.3-3.1.3-1.x86_64' in installed files; aborting
I haven't found any documentation about this command. What does check-buildroot does?
By using Buildroot: in your spec file you are indicating that your package can be built (installed into and packaged from) a user-definable directory. This helps package building by normal users. RPM will use the buildroot listed in the spec file as the default buildroot.
rpmbuild is used to build both binary and source software packages. A package consists of an archive of files and meta- data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package.
The BUILD directory is used during the build process of the RPM package. This is where the temporary files are stored, moved around, etc. The RPMS directory holds RPM packages built for different architectures and noarch if specified in . spec file or during the build.
Here is a pointer to a copy of the script. Because it is considered an "internal" part of rpmbuild
(in /usr/lib/rpm
, rather than /usr/bin
), there is no manual page for it.
However, it is known to people who troubleshoot problems building rpms.
The script checks for a common problem: when building an rpm, your package compiles and installs into a BUILDROOT
directory. If it is done properly, no trace of that directory name will remain in the final package. Occurrences of the actual installation directory, e.g., /usr/bin
, /usr/lib
, etc., are okay.
Further reading:
check-buildroot
message.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With