Linux
01.系统维护
CPU
内存
drop_cache为什么有些不释放
swap交换分区
磁盘
lvm磁盘扩容
文件夹加密ecryptfs-utils
linux挂载ISCSI磁盘
创建lvm
fstab挂载文件系统
systemd.mount
存储故障
曲线为目录配置限额
lvm缩容
进程
如何找到某一个正在运行的进程?
CRIU进程快照
网络
TCP连接的10种状态
Ubuntu禁用ipv6
close_wait数量过多阻塞网络连接
IP地址与二进制转换
支持ACME的DNS服务器PowerDNS
系统
CentOS版本及对应默认内核版本
修改shell语言
系统启动流程
cgroup
CentOS7升级内核并开启BBR
配置内核参数优化linux
更新grub2默认启动的内核
CentOS-SCLo源
修改键盘映射
Debian12升级时内核编译错误
timesync(ntp)
内核
drop_caches
软件
更新openssl
GUI
Gnome Workspace Names
02.系统安全
Auditd审计服务配置
ssh登陆免公钥验证
恶意脚本处置
2023挖矿脚本m0nad
为ssh服务添加多因子认证
03.基本概念
Out Of Memory
70.QEMU
磁盘格式转换
80.LFS
90.常用脚本
使用except修改操作系统密码
init.d脚本模板
shell脚本判断参数数量
安装oh-my-zsh
systemd脚本模板
端口测试
适用于truenas的ipv6阿里云ddns脚本
更新nginx白名单
将文件改名为md5值
djvu转换为pdf并ocr
99.常用命令
man page中命令后的数字释义
tcpdump
nslookup
nc
rsync
awk
sed
echo
rm
tar
chage
auditctl
ausearch
ab
openssl
parted
find
date
firewall-cmd
sort
vmstat
nice-调整进程的优先级
top
taskset-进程绑定CPU核心
iptables
iostat
sysctl
tr
rpmbuild
转载nginx.spec含说明
安装使用rpmbuild
unpacked files found
grep
vimtutor
tlinux - tos
snmpwalk
chattr
本文档使用 MrDoc 发布
-
+
首页
rpmbuild
``` RPMBUILD(8) System Manager's Manual RPMBUILD(8) NAME rpmbuild - Build RPM Package(s) SYNOPSIS BUILDING PACKAGES: rpmbuild {-ba|-bb|-bp|-bc|-bi|-bl|-bs} [rpmbuild-options] SPECFILE ... rpmbuild {-ra|-rb|-rp|-rc|-ri|-rl|-rs} [rpmbuild-options] SOURCEPACKAGE ... rpmbuild {-ta|-tb|-tp|-tc|-ti|-tl|-ts} [rpmbuild-options] TARBALL ... rpmbuild {--rebuild|--recompile} SOURCEPKG ... MISCELLANEOUS: rpmbuild --showrc rpmbuild-options [--buildroot DIRECTORY] [--clean] [--nobuild] [--rmsource] [--rmspec] [--short-circuit] [--build-in-place] [--noprep] [--noclean] [--nocheck] [--rpmfcdebug] [--target PLATFORM] [--with OPTION] [--without OPTION] DESCRIPTION rpmbuild is used to build both binary and source software packages. A package consists of an archive of files and meta-data used to install and erase the archive files. The meta-data includes helper scripts, file attributes, and descriptive information about the package. Packages come in two varieties: binary packages, used to encapsulate software to be installed, and source packages, containing the source code and recipe necessary to produce binary packages. One of the following basic modes must be selected: Build Package, Build Package from Tarball, Recompile Package, Show Configuration. GENERAL OPTIONS These options can be used in all the different modes. -?, --help Print a longer usage message then normal. --version Print a single line containing the version number of rpm being used. --quiet Print as little as possible - normally only error messages will be displayed. -v Print verbose information - normally routine progress messages will be displayed. -vv Print lots of ugly debugging information. --rpmfcdebug Enables to debug dependencies generation. --rcfile FILELIST Each of the files in the colon separated FILELIST is read sequentially by rpm for configuration information. Only the first file in the list must exist, and tildes will be expanded to the value of $HOME. The default FILELIST is /usr/lib/rpm/rpmrc:/usr/lib/rpm/redhat/rpmrc:/etc/rpmrc:~/.rpmrc. --pipe CMD Pipes the output of rpm to the command CMD. --dbpath DIRECTORY Use the database in DIRECTORY rather than the default path /var/lib/rpm --root DIRECTORY Use the file system tree rooted at DIRECTORY for all operations. Note that this means the database within DIRECTORY will be used for dependency checks and any scriptlet(s) (e.g. %post if installing, or %prep if building, a package) will be run after a chroot(2) to DIRECTORY. -D, --define='MACRO EXPR' Defines MACRO with value EXPR. BUILD OPTIONS The general form of an rpm build command is rpmbuild -bSTAGE|-rSTAGE|-tSTAGE [ rpmbuild-options ] FILE ... The argument used is -b if a spec file is being used to build the package, -r if a source package is to be rebuild and -t if rpmbuild should look inside of a (possibly com‐ pressed) tar file for the spec file to use. After the first argument, the next character (STAGE) specifies the stages of building and packaging to be done and is one of: -ba Build binary and source packages (after doing the %prep, %build, and %install stages). -bb Build a binary package (after doing the %prep, %build, and %install stages). -bp Executes the "%prep" stage from the spec file. Normally this involves unpacking the sources and applying any patches. -bc Do the "%build" stage from the spec file (after doing the %prep stage). This generally involves the equivalent of a "make". -bi Do the "%install" stage from the spec file (after doing the %prep and %build stages). This generally involves the equivalent of a "make install". -bl Do a "list check". The "%files" section from the spec file is macro expanded, and checks are made to verify that each file exists. -bs Build just the source package. The following options may also be used: --buildroot DIRECTORY When building a package, override the BuildRoot tag with directory DIRECTORY. --clean Remove the build tree after the packages are made. --nobuild Do not execute any build stages. Useful for testing out spec files. --noprep Do not execute %prep build stage even if present in spec. --noclean Do not execute %clean build stage even if present in spec. --nocheck Do not execute %check build stage even if present in spec. --nodebuginfo Do not generate debuginfo packages.. --nodeps Do not verify build dependencies. --rmsource Remove the sources after the build (may also be used standalone, e.g. "rpmbuild --rmsource foo.spec"). --rmspec Remove the spec file after the build (may also be used standalone, eg. "rpmbuild --rmspec foo.spec"). --short-circuit Skip straight to specified stage (i.e., skip all stages leading up to the specified stage). Only valid with -bc, -bi, and -bb. Useful for local testing only. Pack‐ ages built this way will be marked with an unsatisfiable dependency to prevent their accidental use. --build-in-place Build from locally checked out sources. Sets _builddir to current working directory. Skips handling of -n and untar in the %setup and the deletion of the buildSubdir. --target PLATFORM When building the package, interpret PLATFORM as arch-vendor-os and set the macros %_target, %_target_cpu, and %_target_os accordingly. --with OPTION Enable configure OPTION for build. --without OPTION Disable configure OPTION for build. REBUILD AND RECOMPILE OPTIONS There are two other ways to invoke building with rpm: rpmbuild --rebuild|--recompile SOURCEPKG ... When invoked this way, rpmbuild installs the named source package, and does a prep, compile and install. In addition, --rebuild builds a new binary package. When the build has completed, the build directory is removed (as in --clean) and the the sources and spec file for the package are removed. These options are now superseded by the -r* options which allow much more fine control over what stages of the build to run. SHOWRC The command rpmbuild --showrc shows the values rpmbuild will use for all of the options are currently set in rpmrc and macros configuration file(s). FILES rpmrc Configuration /usr/lib/rpm/rpmrc /usr/lib/rpm/redhat/rpmrc /etc/rpmrc ~/.rpmrc Macro Configuration /usr/lib/rpm/macros /usr/lib/rpm/redhat/macros /etc/rpm/macros ~/.rpmmacros Temporary /var/tmp/rpm* SEE ALSO gendiff(1), popt(3), rpm(8), rpm2cpio(8), rpmkeys(8) rpmspec(8), rpmsign(8), rpmbuild --help - as rpm supports customizing the options via popt aliases it's impossible to guarantee that what's described in the manual matches what's available. http://www.rpm.org/ <URL:http://www.rpm.org/> AUTHORS Marc Ewing <marc@redhat.com> Jeff Johnson <jbj@redhat.com> Erik Troan <ewt@redhat.com> Red Hat, Inc. 09 June 2002 RPMBUILD(8) ```
zhangky
2021年9月1日 17:05
分享文档
收藏文档
上一篇
下一篇
微信扫一扫
复制链接
手机扫一扫进行分享
复制链接
关于 MrDoc
觅思文档MrDoc
是
州的先生
开发并开源的在线文档系统,其适合作为个人和小型团队的云笔记、文档和知识库管理工具。
如果觅思文档给你或你的团队带来了帮助,欢迎对作者进行一些打赏捐助,这将有力支持作者持续投入精力更新和维护觅思文档,感谢你的捐助!
>>>捐助鸣谢列表
微信
支付宝
QQ
PayPal
Markdown文件
分享
链接
类型
密码
更新密码