Rpmbuild spec files config




















The -b option tells rpmbuild to build an RPM. The extra BuildStage option is a special code that tells the rpmbuild command how far to go when building. Table lists these options:. Check the listing of files for the RPM and generate errors if the buildroot is missing any of the files to be installed. For example, to set up all the necessary files and prepare for building, run the following command:. Using a subdirectory keeps the sources for this package from intermixing with the sources for other packages.

For example:. The first regards reformatting. Adjacent lines without leading whitespace are considered a single paragraph and may be subject to formatting by glint or another RPM tool. This is where sources are unpacked and possible patches applied, and other similar activies could be performed.

This optional script can be used to determine BuildRequires dynamically. The script must print the found build dependencies to stdout in the same syntax as used after BuildRequires: one dependency per line.

If some dependencies are missing a package with the. It can be used to install the build requires and restart the build. On success the found build dependencies are also added to the source package. As always they depend on the exact circumstance of the build and may be different when bulding based on other packages or even another architecture.

Different build- and language ecosystems come with their own helper macros, but rpm has helpers for autotools based builds such as itself which typically look like this:.

For many simple packages this is just:. Runtime scriptlets are executed at the time of install and erase of the package. Other supported operations include scriptlet expansion. More information is available in file trigger chapter. Such files can be easily filtered out on queries and also left out of installations if space is tight. It is typically used when the attributes of the file are important while the contents is not e. This file is not required to exist at either install or uninstall time.

The usual rules for shell globbing apply. Spaces are used to separate file names and so must be escaped by enclosing the file name with quotes.

For example:. When trying to escape large number of file names, it is often best to create a file with the complete list of escaped file names. This is easiest to do with a shell script like this:. Spec file format Generic syntax Comments Comments in spec file have at the start of the line.

License: GPLv3. Summary: Utility for converting mumbles into giggles. Source0: mysoft BuildRequires: rather than Requires: 2 they are resolved before building rather than before installing. The following table shows what we ended up with after installing an RPM, optionally editing the resulting files, and then upgrading the RPM.

For the two cases where noreplace has an effect, there is also the question of what happens if the status of the file as defined in the spec file changes. And the answer is:. In summary: if a file is not marked as a config file, or if a file has not been altered since installation, then it will be sliently replaced by the version from an update RPM.



0コメント

  • 1000 / 1000