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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • java常用的英语单词_有趣的英文单词

    java常用的英语单词_有趣的英文单词资源共享学习交流群号:769674658(快满)qq交流二群(296389054)(一)Java基础 public公有的 private私有的 protected保护的 …

    2022年8月10日
    2
  • python编写手机app_手机学python的app

    python编写手机app_手机学python的app用程序控制手机,再也不用自己去做重复枯燥的任务了

    2022年8月12日
    4
  • 散列/散列函数「建议收藏」

    散列/散列函数「建议收藏」散列是一种用于以常数平均时间执行插入、删除和查找的技术。每个关键字被映射到从0-TableSize-1这个范围中的某个数,并且被放到适当的单元中。这种映射就叫做散列函数我认为,先用散列函数将我们所要进行操作的集合整合成散列表,是对之后的操作的一种便利。放到实际中去,我们要进行操作的集合不仅仅只是数字,例如图书馆中的书籍分类等等。而且就算是一组不连续差距较大的数字,要执行后序的插入删除和查找都是很不方

    2022年5月15日
    37
  • Centos 7 图形化界面安装

    Centos 7 图形化界面安装1.centos安装完成centos72.测试网络是否能进行链接重启网络。[root@localhost~]#servicenetworkrestart出现以下页面,则网络重启成功。测试链接。[root@localhost~]#pingwww.baidu.com出现以下页面则可以链接网络,ctrl+c退出,进入步骤4。如果链接失败进入步骤3。3.进行网络配置首先进入以下文件夹[root@localhost~]#cd/etc/sysconfig/netwo

    2022年5月30日
    59
  • leetcode–差分数组

    leetcode–差分数组0.差分数组的概念:常用于某个区间值都需加/减去a的问题。1.1094拼车classSolution:defcarPooling(self,trips:List[List[int]],capacity:int)->bool:max_val=0foriinrange(len(trips)):max_val=max(max_val,trips[i][2])diff=[0

    2022年6月8日
    26
  • 最典型的因果图_因果关系分析图制作

    最典型的因果图_因果关系分析图制作文章目录1dowhy介绍1.1dowhy的分析流程2案例2.1数据获取与整理2.2如何简单证明变量之间的因果关系2.3步骤一:因果图建模2.4步骤二:识别2.5步骤三:估计因果效应2.6反驳结果2.7与普通ML分类模型比较特征重要性1dowhy介绍github地址:microsoft/dowhydowhy文档:DoWhy|Anend-to-endlibraryforcausalinference1.1dowhy的分析流程参考材料:因果推断框架DoWh

    2022年8月14日
    2

发表回复

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

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