arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2308.05942cs.SE
收藏

理解并修复 PyPI 生态系统中开源许可证不兼容问题

Understanding and Remediating Open-Source License Incompatibilities in the PyPI Ecosystem

Weiwei Xu, Hao He, Kai Gao, Minghui Zhou

AI总结:

本文对 PyPI 生态系统的许可证不兼容问题进行了大规模实证研究,揭示了其普遍性及传递依赖带来的修复挑战,并提出了基于 SMT 求解器的 SILENCE 方法,以最小成本自动推荐修复方案,已在真实软件包中验证有效。

摘要:

开源软件的重用与分发必须遵守其附带的开源许可证。在现代打包生态系统中,维持这种合规性具有挑战性,因为一个软件包可能具有复杂的多层依赖图,其中包含许多软件包,而其中任何一个都可能具有不兼容的许可证。尽管先前的研究发现许可证不兼容问题普遍存在,但在一些现代打包生态系统(例如 PyPI)中,经验证据仍然稀缺。开发人员如何修复其软件包依赖图(包括直接依赖和传递依赖)中的许可证不兼容问题也仍不清楚,更不用说任何自动化方法。为了弥补这一差距,我们对 PyPI 生态系统中的许可证不兼容问题及其修复实践进行了大规模实证研究。我们发现 7.27% 的 PyPI 软件包版本存在许可证不兼容问题,其中 61.3% 是由传递依赖引起的,这给修复带来了挑战;在修复方面,开发人员可以应用五种策略之一:迁移、移除、固定版本、更改自身许可证以及协商。受我们发现的启发,我们提出了 SILENCE,这是一种基于 SMT 求解器的方法,用于在软件包依赖图中以最小成本推荐许可证不兼容修复方案。我们的评估表明,SILENCE 提出的修复方案能够匹配 19 个历史真实案例(不包括现有知识库未覆盖的迁移情况),并已被五个流行的 PyPI 软件包接受,而这些软件包的开发人员此前并未意识到其存在许可证不兼容问题。

英文摘要:

The reuse and distribution of open-source software must be in compliance with its accompanying open-source license. In modern packaging ecosystems, maintaining such compliance is challenging because a package may have a complex multi-layered dependency graph with many packages, any of which may have an incompatible license. Although prior research finds that license incompatibilities are prevalent, empirical evidence is still scarce in some modern packaging ecosystems (e.g., PyPI). It also remains unclear how developers remediate the license incompatibilities in the dependency graphs of their packages (including direct and transitive dependencies), let alone any automated approaches. To bridge this gap, we conduct a large-scale empirical study of license incompatibilities and their remediation practices in the PyPI ecosystem. We find that 7.27% of the PyPI package releases have license incompatibilities and 61.3% of them are caused by transitive dependencies, causing challenges in their remediation; for remediation, developers can apply one of the five strategies: migration, removal, pinning versions, changing their own licenses, and negotiation. Inspired by our findings, we propose SILENCE, an SMT-solver-based approach to recommend license incompatibility remediations with minimal costs in package dependency graph. Our evaluation shows that the remediations proposed by SILENCE can match 19 historical real-world cases (except for migrations not covered by an existing knowledge base) and have been accepted by five popular PyPI packages whose developers were previously unaware of their license incompatibilities.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑