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


相关推荐

  • org.springframework.web.context.ContextLoaderListener

    org.springframework.web.context.ContextLoaderListener

    2021年7月17日
    68
  • Jenkins详细教程

    Jenkins详细教程大纲  1.背景  在实际开发中,我们经常要一边开发一边测试,当然这里说的测试并不是程序员对自己代码的单元测试,而是同组程序员将代码提交后,由测试人员测试;  或者前后端分离后,经常会修改接口,然后重新部署;  这些情况都会涉及到频繁的打包部署;  手动打包常规步骤:  1.提交代码  2.问一下同组小伙伴有没有要提交的代码  3.拉取代码并打包(war包,或者jar包)  4.上传到Linux服务器  5.查看当前程序是否在运行  6.关闭当前程序  .

    2022年5月15日
    67
  • android之获取应用中的图片资源_获取找你妹中的图片资源

    一直不知道原来获取一个应用中的图片资源这么简单,刚才直接把apk解压,就得到了里面的一下文件,搜索一下就全部把图片资源找出来了,想要模仿应用或者自己不会ui的话,用现成的资源方便多了.也没多少说的,直接解压就行了,根据存放路径很容易就找到了.分享一下找你妹的图片资源.点击打开链接

    2022年3月10日
    40
  • 成为一名CV(计算机视觉)工程师,你需要具备哪些能力?[通俗易懂]

    成为一名CV(计算机视觉)工程师,你需要具备哪些能力?[通俗易懂]2019年国家对人工智能加大了支持力度,媒体对人工智能的资讯报道也越来越多,刚刚结束的人工智能大会也展示了国内现在的人工智能的发展状况,“双马”对话中也处处透露出对人工智能的美好展望。人工智能一个很大的应用方向是CV(计算机视觉)。CV在如制造业、检验、文档分析、医疗诊断和军事等领域中各种智能系统中不可分割。具体的像无人驾驶、人脸识别、VR/AR等,未来在医疗领域等还将有更大的发展。那么成为一名计算机视觉工程师应该具备哪些能力呢?首先数学要学好。大学里开过的高数、线性代数、概率统计等课都十分

    2022年4月20日
    88
  • java中hashmap遍历_map遍历的两种方式

    java中hashmap遍历_map遍历的两种方式在java开发中,hashMap是非常重要的容器类,存储的是键值对(key,value)。HashMap继承AbstractMap,实现了Map、Cloneable、Serializable接口,非线程安全类,但是效率高。HashMap允许null健和null值,允许value重复,但不允许key重复。HashMap有两个参数影响其性能,初始容量和加载因子,当哈希表中的条目数超出加载因子与当前容量的乘积时,要对哈希表进行refresh操作,重建内部数据结构,容量扩大为之前的两倍,加载因子默认值为0.75。

    2025年10月12日
    4
  • vector越界访问会怎么样_vector下标访问

    vector越界访问会怎么样_vector下标访问intmain(){vector<int>ivec(10);cout<<ivec[0]<<endl;cout<<ivec[100]<endl;}vector中包含三个迭代器:first迭代器指向第一个元素;finish迭代器指向最后一个有效元素的下一个位置;end_of_storage迭代器指向整个vector空间末尾的下一个位置。访问ve…

    2022年10月1日
    6

发表回复

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

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