excluding file types when packaging an rpm

不问归期 提交于 2019-12-05 12:05:11

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.

Leandro

You need to use %exclude macro, i.e.

%files
%exclude /lib/*.py
%exclude /comm/*.py

Or just remove them from buildroot:

%install
...
find %{buildroot} -name ".py" -delete
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!