Open-source software is increasingly reused, complicating the process of patching to repair bugs. In the case of Linux, a distinct ecosystem has formed, with Linux mainline serving as the upstream, stable or long-term-support (LTS) systems forked from mainline, and Linux distributions, such as Ubuntu and Android, as downstreams forked from stable or LTS systems for end-user use. Ideally, when a patch is committed in the Linux upstream, it should not introduce new bugs and be ported to all the applicable downstream branches in a timely fashion. However, several concerns have been expressed in prior work about the responsiveness of patch porting in this Linux ecosystem. In this paper, we mine the software repositories to investigate a range of Linux distributions in combination with Linux stable and LTS, and find diverse patch porting strategies and competence levels that help explain the phenomenon. Furthermore, we show concretely using three metrics, i.e., patch delay, patch rate, and bug inheritance ratio, that different porting strategies have different tradeoffs. We find that hinting tags(e.g., Cc stable tags and fixes tags) are significantly important to the prompt patch porting, but it is noteworthy that a substantial portion of patches remain devoid of these indicative tags. Finally, we offer recommendations based on our analysis of the general patch flow, e.g., interactions among various stakeholders in the ecosystem and automatic generation of hinting tags, as well as tailored suggestions for specific porting strategies.
翻译:开源软件被广泛复用,使得修复缺陷的补丁流程愈发复杂。在Linux系统中,形成了独特的生态系统:Linux主线作为上游代码库,稳定版或长期支持版(LTS)系统从主线分支而出,而Ubuntu、Android等Linux发行版作为面向终端用户的下游版本,则派生自稳定版或LTS系统。理想情况下,当补丁被提交至Linux上游时,应不引入新缺陷,并能够及时移植到所有适用的下游分支。然而,先前研究已对Linux生态系统中补丁移植的响应效率提出诸多关切。本文通过挖掘软件仓库,对多个Linux发行版与Linux稳定版及LTS系统的结合进行调研,发现存在多样化的补丁移植策略及能力水平,这有助于解释上述现象。进一步,我们使用补丁延迟、补丁率和缺陷继承率三项指标具体论证了不同移植策略的权衡取舍。研究发现提示标签(如Cc稳定标签和修复标签)对促进及时补丁移植至关重要,但值得注意的是,相当比例的补丁仍缺乏这些指示性标签。最后,我们基于对通用补丁流动流程的分析(例如生态系统中各相关方的交互机制及提示标签的自动生成),以及针对特定移植策略的定制化建议,提出了改进建议。