打包rpm时不包括文件类型

打包rpm时不包括文件类型

本文介绍了打包rpm时不包括文件类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在用于打包python rpm的规范文件中,我想删除某些目录中的某些文件类型:

In my spec file for packaging a python rpm, I want to remove certain filetypes in certain directories:

例如,我要在以下目录中排除源* .py文件:

e.g., I want to exclude source *.py files in these directories:

lib/*.py

comm/*.py

我认为我应该在规范的%file部分中执行此操作.有什么建议吗?

I think I should do this in the %file section of my spec. Any suggestions?

推荐答案

在遥远的过去,您只是通过在%file部分中不包含不需要的文件来做到这一点,因此它们不打包.事实证明,这很容易出错,因此某些RPM实现开始抱怨未打包的文件.由于RPM开发一直都是零散的,而且文档不足,因此我不清楚什么是规范的解决方案,但是我建议最安全的方法是在安装例程结束时删除文件.这种方法还可以轻松地传输到其他包装系统,例如dpkg.

At one point in the distant past, you did that by just not including the files you didn't want in the %file section, and so they would not be packaged. That might have turned out to be too error prone, and so some RPM implementations started complaining about unpackaged files. Since RPM development has always been a bit fragmented and underdocumented, it's not clear to me what the canonical solution is, but I propose that the safest way is to just remove the files at the end of your installation routine. That approach will also easily transport to other packaging systems such as dpkg.

这篇关于打包rpm时不包括文件类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-31 00:28