Version Controlling rpm spec files

好久不见. 提交于 2019-12-10 17:18:02

问题


I'm configuring a build machine to produce rpms for a large number of very similar projects. The spec file for each project is slightly different, both in name and sometimes in dependencies and other attributes. Each project has its own git repository containing the project files.

These spec files only exist and truthfully are only useful to the build system itself; each project can be installed manually, but I package into rpms for ease of automated deployment.

The build system itself also has its own git repository.

Should the spec files be versioned? And if so, where? Should each spec file be versioned in the repository for the project it correlates with? Or should they all be versioned in the same repository as the build system? And, most importantly, why?

I'm concerned that versioning the specs in project repositories will cause the files to become out of sync with each other as I make gradual improvements to the install process. I'm also concerned that versioning the specs in the build repository will cause the files to be forgotten when changes to dependencies are made.


回答1:


I'm working a project where we version control the RPM spec files in the same directory tree as the library or project. Why? This keeps everything neatly co-located. When we update a source file in the library, then the spec file is right there to add an appropriate entry to the %changelog, detailing what was done for the bug fix or enhancement.

For your situation, it's a tough call. But I'm thinking your build/install system will eventually reach a stable point, whereas all your projects will doubtless need to be updated at some point to when fixing bugs. Yes, it might be painful in the near-term as you tweak your build/install process, but once that's stabilized, it'll be easier in the long term.



来源:https://stackoverflow.com/questions/13295860/version-controlling-rpm-spec-files

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