rpmrebuild下载链接: https://sourceforge.net/projects/rpmrebuild/files/rpmrebuild/2.12-1/
rpm -ivh rpmrebuild-2.14-1.noarch.rpm #安装rmprebuild
可以提取提取已经安装的rpm包的SPEC文件
rpmrebuild -s test.spec htop-1.0.3-4.fc21.loongson.mips64el
[root@localhost temp]# rpm -qa | grep htop
htop-1.0.3-4.fc21.loongson.mips64el
[root@localhost temp]#
[root@localhost temp]#
[root@localhost temp]# rpmrebuild -s test.spec htop-1.0.3-4.fc21.loongson.mips64el
[root@localhost temp]# ls
gradle-6.0.1-1-omv4001.noarch.rpm htop-1.0.3-4.fc21.loongson.src.rpm htop.spec test.spec usr
[root@localhost temp]#
[root@localhost temp]# vimdiff htop.spec test.spec