傻瓜式网站制作,国土资源部门网站建设制度,做seo学网站,ui设计就业方向有哪些?文章目录一、命令介绍二、命令选项#xff08;一#xff09;从 specfile 建立#xff08;二#xff09;从 tarball 包建立#xff08;三#xff09;从 source package 包建立#xff08;四#xff09;其它选项#xff08;五#xff09;所有 rpm 都可使用的选项#…
文章目录一、命令介绍二、命令选项一从 specfile 建立二从 tarball 包建立三从 source package 包建立四其它选项五所有 rpm 都可使用的选项六附加选项七帮助选项三、命令示例一根据配置文件对源码包进一步解压得到最终的源码文件一、命令介绍
命令 rpmbuild 用于创建 RPM 软件包和 SRPM 软件包这两类软件包分别是 rpm 格式的二进制软件包和源码软件包
二、命令选项
Build options with [ specfile | tarball | source package ]
中文译为通过配置文件或 tar.gz 格式的源码包或者 rpm 格式的源码包来构建
一从 specfile 建立
选项说明-bpbuild through %prep (unpack sources and apply patches) from specfile. 译文从 specfile 文件的 %prep 开始建立解开源码包并打补丁只作准备解压与打补丁-bcbuild through %build (%prep, then compile) from specfile. 译文从文件的 %build 开始建立解开源码包、打补丁、编译-bibuild through %install (%prep, %build, then install) from specfile 译文从文件的 %install 开始建立解开源码包、打补丁、编译、安装-blverify %files section from specfile. 译文检查文件的 %files 段检验文件是否齐全-babuild source and binary packages from specfile. 译文创建源码包SRPM和二进制包RPM-bbbuild binary package only from specfile. 译文只构建二进制包-bsbuild source package only from specfile. 译文只建立源码包SRPM
二从 tarball 包建立
这个 tarball 应该是以 .tar 为后缀名的包。
选项说明-tpbuild through %prep (unpack sources and apply patches) from tarball. 译文从 tar 包的 %prep 开始构建解开源码包并打补丁-tcbuild through %build (%prep, then compile) from tarball. 译文从 tar 包的 %build 开始建立解开源码包、打补丁、编译-tibuild through %install (%prep, %build, then install) from tarball. 译文从 tar 包的 %install 开始建立解开源码包、打补丁、编译、安装-tabuild source and binary packages from tarball. 译文从 tar 包建立源码包和二进制包-tbbuild binary package only from tarball. 译文只建立二进制包-tsbuild source package only from tarball. 译文只建立源码包
三从 source package 包建立
这个源码包应该是以 .tar.gz 为后缀名的包。
选项说明--rebuildbuild binary package from source package. 译文基于源码包建立二进制包*.rpm--recompilebuild through %install (%prep, %build, then install) from source package. 译文基于源码包的 %install 开始建立解开源码包、打补丁、编译、安装
四其它选项
选项说明--buildrootDIRECTORYoverride build root. 重写生成根目录--cleanremove build tree when done. 完成打包后清除 BUILD下的文件目录--nobuilddo not execute any stages of the build. 不进行 BUILD 的阶段--nodepsdo not verify build dependencies. 不检查建立包时的关联文件--nodirtokensgenerate package header(s) compatible with (legacy) rpm[23] packaging. 生成与传统rpm[23]打包兼容的包头--rmsourceremove sources when done. 完成打包后清除 sources--rmspecremove specfile when done. 完成打包后清除 specfile--short-circuitskip straight to specified stage (only for c,i). 直接跳到指定的阶段仅适用于c、i--targetCPU-VENDOR-OSoverride target platform. 覆盖目标平台确定包的最终使用平台
五所有 rpm 都可使用的选项
Common options for all rpm modes.
选项说明-D 或 --define宏表达式define MACRO with value EXPR. 用值表达式定义宏-E 或 --eval表达式print macro expansion of EXPR. 打印表达式的宏扩展--macrosfilenameread instead of default file(s). 读取而不是默认文件--nodigestdon’t verify package digest(s). 不验证包摘要不检查包的说明信息--nosignaturedon’t verify package signature(s). 不检查包的签名信息--rcfilefilenameread instead of default file(s). 读 文件代替默认文件-r 或 --rootROOTuse ROOT as top level directory (default: “/”). 使用根目录作为顶级目录默认值“/”--querytagsdisplay known query tags. 显示已知查询标记--showrcdisplay final rpmrc and macro configuration. 显示最终的rpmrc和宏配置--quietprovide less detailed output. 提供不太详细的输出-v 或 --verboseprovide more detailed output. 提供大量的详细的信息--versionprint the version of rpm being used. 显示rpm包的版本
六附加选项
Options implemented via popt alias/exec. 通过popt alias/exec实现的选项
选项说明--dbpath目录use database in DIRECTORY. 使用目录中的数据库--with选项enable configure for build. 建立时允许配置的选项--without选项disable configure for build. 建立时不允许配置的选项
七帮助选项
Help options.
选项说明-? 或 --helpShow this help message. 显示帮助信息--usageDisplay brief usage message. 显示使用方法的信息
三、命令示例
一根据配置文件对源码包进一步解压得到最终的源码文件
这个最终的源码文件应该是存放在目录 BUILD 下。
先切换到目录 SPECS 下
[rootlocalhost ~]# cd /root/rpmbuild/SPECS选项 -bp 会根据配置文件对 SOURCES 目录下源码包进一步解压
rpmbuild -bp httpd.specs 欲了解命令 rpmbuild 在安装 SRPM 软件包的实际使用猛戳《Linux 如何安装 SRPM 包》