版本控制rpm规格文件 [英] Version Controlling rpm spec files

查看:128
本文介绍了版本控制rpm规格文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在配置一台生成机器,为大量非常类似的项目生成rpms。每个项目的spec文件都有些不同,无论是在名称上,还是在依赖和其他属性上。每个项目都有自己的包含项目文件的git仓库。



这些spec文件只存在并且如实地仅用于构建系统本身;每个项目都可以手动安装,但为了便于自动部署,我将其打包为rpms。



构建系统本身也有自己的git存储库。



规范文件是否应该版本化?如果是的话,在哪里?每个规格文件是否应该在相关项目的版本库中进行版本控制?还是应该将它们全部版本化为与构建系统相同的存储库?最重要的是,为什么?



我担心版本控制项目存储库中的规格会导致文件与对方不同步,因为我逐渐改进到安装过程。我还担心在构建存储库中对规范进行版本控制会导致在对依赖关系进行更改时忘记文件。 解决方案

p>我正在开发一个项目,在该项目中,我们版本控制与库或项目相同的目录树中的RPM spec文件。为什么?这使得所有东西都整齐地放置在一起。当我们更新库中的源文件时,spec文件就在那里为%changelog添加一个合适的条目,详细说明为错误修复或增强所做的工作。



对于你的情况,这是一个艰难的呼叫。但是我认为你的构建/安装系统最终会达到一个稳定点,而所有的项目无疑需要在修正错误时进行更新。是的,当你调整你的构建/安装过程时,近期可能会很痛苦,但一旦稳定下来,从长远来看会更容易。


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.

解决方案

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.

这篇关于版本控制rpm规格文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆