Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does /usr/lib/rpm/check-buildroot do?

Tags:

c++

rpm

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?

like image 424
Giuseppe Pes Avatar asked Feb 19 '16 17:02

Giuseppe Pes


People also ask

What is Buildroot in RPM spec file?

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.

What is Rpmbuild in Linux?

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.

Which file specifies how an RPM source package is compiled?

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.


1 Answers

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:

  • rpmdevtools-5.3-1.el4 RPM for noarch describes the rpmdevtools and gives its changelog.
  • pk's Tech Page discusses a change that a developer made based on the check-buildroot message.
  • check-buildroot failure is another example where it was used
  • How do I safely remove a path string from a compiled library without corrupting the library? illustrates the real problem: getting good advice.
like image 89
Thomas Dickey Avatar answered Sep 21 '22 14:09

Thomas Dickey