How to create many sub packages automatically in rpm spec

不打扰是莪最后的温柔 提交于 2019-12-11 15:51:24

问题


The number of sub-packages I want to create are so many (about 300 over).

I think.. to make the sub-package, the files should be installed (%install) early. So I installed whole files to some specific directories. Now I want to pack the file for each directory name.

in summaries,

  1. Is it possible to repeat rpm macros? (ex, %package %description %files)

  2. If it's possible, what should I use to repeat? (ex for ??)

  3. As I know, to use %files macro, the real files should be installed previously. then where should I write the codes?


回答1:


Natively, no there isn't. You'll have to use an external templating language like jinja2 to create the spec file on-the-fly.

That being said, having 300 subpackages is going to be an absolute nightmare for both your CM folks and for your users. You might want to ask another question explaining the use case to see if there are better alternatives.



来源:https://stackoverflow.com/questions/57456308/how-to-create-many-sub-packages-automatically-in-rpm-spec

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