How to reduce rpm size using rpmbuild

编译出来的rpm就是比deb大,就去研究如何减少rpm的大小
关键还是在SPECS文件上,要改变默认的压缩方式,在%prep后面加上这句就行了:
%define _binary_payload w7.xzdio
# Compression type and level for source/binary package payloads.
# “w9.gzdio”: gzip level 9 (default).
# “w9.bzdio”: bzip2 level 9.
# “w7.xzdio”: xz level 7, xz’s default.
# “w7.lzdio”: lzma-alone level 7, lzma’s default

 

参考:
https://stackoverflow.com/questions/9292243/rpmbuild-change-compression-format

发表评论