美文网首页
rpm 查看spec文件属性

rpm 查看spec文件属性

作者: 偷油考拉 | 来源:发表于2021-10-15 09:50 被阅读0次
[root@VM-99-33-centos ~]# rpm --qf '%{Packager}\n' -q openssh-server-7.4p1-21.el7.x86_64
CentOS BuildSystem <http://bugs.centos.org>
[root@VM-99-33-centos ~]# 
[root@VM-99-33-centos ~]# rpm --qf '%{Packager}\n' -q openssh-server-7.4p1-21.el7.x86_64
CentOS BuildSystem <http://bugs.centos.org>

[root@VM-99-33-centos ~]# rpm -qi openssh-server-7.4p1-21.el7.x86_64
Name        : openssh-server
Version     : 7.4p1
Release     : 21.el7
Architecture: x86_64
Install Date: Tue 05 Nov 2019 11:10:14 PM CST
Group       : System Environment/Daemons
Size        : 993586
License     : BSD
Signature   : RSA/SHA256, Fri 23 Aug 2019 05:37:29 AM CST, Key ID 24c6a8a7f4a80eb5
Source RPM  : openssh-7.4p1-21.el7.src.rpm
Build Date  : Fri 09 Aug 2019 09:40:49 AM CST
Build Host  : x86-01.bsys.centos.org
Relocations : (not relocatable)
Packager    : CentOS BuildSystem <http://bugs.centos.org>
Vendor      : CentOS
URL         : http://www.openssh.com/portable.html
Summary     : An open source SSH server daemon
Description :
OpenSSH is a free version of SSH (Secure SHell), a program for logging
into and executing commands on a remote machine. This package contains
the secure shell daemon (sshd). The sshd daemon allows SSH clients to
securely connect to your SSH server.

yumdownloader --source < something.rpm
rpm2cpio packagename | cpio -ivd
yumdownloader --source <package name, like 'emacs-nox'>
rpm2cpio <package name>.src.rpm | cpio -civ '*.spec'
rpmrebuild -e -p <rpm_file>
rpmbuild --recompile --noclean ./SRPMS/somerpm.src.rpm
[root@VM-99-33-centos ~]# rpm -q --queryformat="%{NAME}: %{OPTFLAGS}\n" openssh-server-7.4p1-21.el7.x86_64
openssh-server: -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic

You can get a list of potential query tags like so:

rpm --querytags
rpm --querytags | grep OPTFLAGS

相关文章

网友评论

      本文标题:rpm 查看spec文件属性

      本文链接:https://www.haomeiwen.com/subject/wnjqoltx.html