RPM Spec File Reference

RPM Spec File Reference

Spec File Reference

Tags

  • Name: is used to define the name of the software being packaged.
  • Version: defines the version of the software being packaged.
  • Release: can be thought of as the package’s version.
  • %description describe the packages intended use.
  • Summary: is used to define a one-line description of the packaged software.
  • Copyright: is used to define the copyright terms applicable to the software being packaged.
  • Distribution: is used to define a group of packages, of which this package is a part.
  • Icon: is used to name a file containing an icon representing the packaged software.
  • Vendor: is used to define the name of the entity that is responsible for packaging the software.
  • URL: is used to define a URL that can be used to obtain additional information about the packaged software.
  • Group: is used to group packages together by the types of functionality they provide.
  • Packager: is used to hold the name and contact information for the person or persons who built the package.
  • Requires: is used to alert RPM to the fact that the package needs to have certain capabilities available in order to operate properly.
  • Serial: is used to define a serial number for a package. This is only necessary if RPM is unable to determine the ordering of a package’s version numbers.
  • Conflicts: is used to alert RPM to the fact that the package is not compatible with other packages.
  • AutoReqProv: is used to control the automatic dependency processing performed when the package is being built.
    • To disable automatic dependency processing, add the following line: AutoReqProv: no
  • ExcludeArch: is used to direct RPM to ensure that the package does not attempt to build on the excluded architecture(s).
  • ExclusiveArch: is used to direct RPM to ensure the package is only built on the specified architecture(s).
  • ExcludeOs: is used to direct RPM to ensure that the package does not attempt to build on the excluded operating system(s).
  • ExclusiveOs: is used to denote which operating system(s) should only be be permitted to build the package.
  • Prefix: is used to define part of the path RPM will use when installing the package’s files.
  • BuildArch: is used to define the architecture of the intended install target.
  • BuildRoot: is used to define an alternate build root, where the software will be installed during the build process.
  • Source: is used to define the filename of the sources to be packaged.
  • NoSource: is used to alert RPM to the fact that one or more source files should be excluded from the source package file.
  • Patch: is used to define the name of a patch file to be applied to the package’s sources.
  • NoPatch: is used to alert RPM to the fact that one or more patch files should be excluded from the source package file.
  • %files list indicates to RPM which files on the build system are to be packaged.

Scripts

  • %prep is executed first during an rpm build (creating an rpm).
  • %build is the second scriptlet executed during an rpm build.
  • %install does whatever is necessary to actually install the newly built software.
  • %clean as the name implies, is used to clean up the software’s build directory tree.
  • %pre executes just before the package is to be installed.
  • %post executes after the package has been installed.
  • %preun executes just before the package is to be erased.
  • %postun executes after the package has been erased.
  • %verifyscript executes whenever the installed package is verified by RPM’s verification command.

Macros

  • %setup is used to unpack the original sources, in preparation for the build.
  • %patch as its name implies, is used to apply patches to the unpacked sources.

File-related Directives

  • %doc flags the filename(s) that follow, as being documentation.
  • %config is used to flag the specified file as being a configuration file.
  • %attr permits finer control over three key file attributes: mode, uid, gid
  • %verify can control which of 9 file attributes are to be checked when an RPM verification is done.
  • %docdir is used to add a directory to the list of directories that will contain documentation.
  • %dir RPM will package only the directory itself.
  • %package is used to permit the creation of more than one package per spec file and can appear at any point in the spec file.

Conditionals

  • %ifarch is used to begin a section of the spec file that is architecture-specific.
  • %ifnarch is used in a similar fashion to %ifarch, except that the logic is reversed.
  • %ifos is used to control RPM’s spec file processing based on the build system’s operating system.
  • %ifnos is the logical complement to %ifos
  • %else is placed between a %if conditional of some persuasion, and a %endif.
  • %endif is used to end a conditional block of spec file statements.

转载于:https://my.oschina.net/u/158589/blog/76553

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/110329.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • matlab的length函数和size函数

    matlab的length函数和size函数在matlab中length函数和size函数的用法

    2022年5月2日
    68
  • java list去重_JAVA基础-List去重的6种方式[通俗易懂]

    java list去重_JAVA基础-List去重的6种方式[通俗易懂]简述java开发中经常会遇到List去重这个工作,现在就来整理一下List去重的6种方式。方法代码以及效率测试模拟测试数据相关代码:importjava.util.LinkedList;importjava.util.List;/***@ClassName:ListCleatMain*@Description:模拟数据进行List去重测试*@author:ssqxx*@date:…

    2022年5月25日
    35
  • java重载与重写的区别_java重载和重写的区别和联系

    java重载与重写的区别_java重载和重写的区别和联系1.重写(Override)从字面上看,重写就是重新写一遍的意思。其实就是在子类中把父类本身有的方法重新写一遍。子类继承了父类原有的方法,但有时子类并不想原封不动的继承父类中的某个方法,所以在方法名,参数列表,返回类型(除过子类中方法的返回值是父类中方法返回值的子类时)都相同的情况下,对方法体进行修改或重写,这就是重写。但要注意子类函数的访问修饰权限不能少于父类的。2.重载(Overload)在一个类中,同名的方法如果有不同的参数列表(参数类型不同、参数个数不同甚至是参数顺序不同)则视.

    2025年10月12日
    2
  • 想入行3D游戏建模,看完这个你还敢想吗?

    想入行3D游戏建模,看完这个你还敢想吗?所有行业都是一样的,没有什么容易的,只不过这一行是偏向于技术的,一个有好的建模师月薪10k+是很常见的,这个需要有自己刻苦学习的成果。游戏建模前景在游戏模型行业,你基本不用担心找不到工作,因为游戏模型师人才缺口非常大。举个例子:游戏制作公司的人员配比大多数是这样的:比如100人的三维制作组,可能有60人在做模型贴图,10个人在K动画。只要你保证技能在手,一定是抢手的人才。在几年前游戏建模这个行业不仅仅缺人才,甚至连新手都非常稀缺,那个时候公司愿意招聘实习生,培养他们然后给公司干活,但是工资一定不会给开.

    2022年5月12日
    39
  • Could not download kotlin-compiler-embeddable.jar

    Could not download kotlin-compiler-embeddable.jar

    2021年10月1日
    41
  • 透视投影变换矩阵推导_矩阵的投影

    透视投影变换矩阵推导_矩阵的投影投影矩阵的推导(DerivingProjectionMatrices) 本文乃译文,原文地址为:http://www.codeguru.com/cpp/misc/misc/math/article.php/c10123__1/Deriving-Projection-Matrices.htm,由于本人能力有限,有译的不明白的地方大家可以参考原文,谢谢^-^!译者:流星上的潴如

    2022年10月5日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号