Skip to content

Commit f557e07

Browse files
Mic92GetPsychedAndersonTorresAtemuScrumplex
authored
[RFC 0180] Remove broken and unmaintained leaf packages (#180)
Co-authored-by: Priyanshu Tripathi <[email protected]> Co-authored-by: Anderson Torres <[email protected]> Co-authored-by: Atemu <[email protected]> Co-authored-by: Sefa Eyeoglu <[email protected]>
1 parent 62d1245 commit f557e07

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
feature: broken-package-removal
3+
start-date: 2024-07-14
4+
author: Jörg "Mic92" Thalheim
5+
co-authors:
6+
shepherd-team: "@emilazy @preisi @jopejoe1"
7+
shepherd-leader: "@jopejoe1"
8+
related-issues:
9+
---
10+
11+
# Summary
12+
13+
[summary]: #summary
14+
15+
This RFC defines conditions under which we remove broken packages or unmaintained leaf packages.
16+
The RFC does not aim to define all possible reasons for removing a package but instead focuses on simple, automatable rules.
17+
Since this document serves as a guideline for automatic package removal, it also allows for the possibility of removing a package earlier for other reasons.
18+
19+
# Motivation
20+
21+
[motivation]: #motivation
22+
23+
Broken and unmaintained packages still consume valuable time.
24+
Broken packages need to be evaluated to some extent, and unmaintained packages might still need to be rebuilt when one of their dependencies changes.
25+
Removing unmaintained or unused code should improve overall package quality and help save resources.
26+
Since adding packages is easy, removing them should also be simple, ideally automated.
27+
28+
# Detailed Design
29+
30+
[design]: #detailed-design
31+
32+
All broken packages or unmaintained leaf packages will be removed after a full NixOS release cycle.
33+
For example, if `hello-unmaintained` is marked as unmaintained in 23.11, it can be removed from master after the 24.05 release.
34+
35+
If a NixOS module depends on any removed package and is non-functional without it, the module will be removed as well.
36+
In `pkgs/top-level/aliases.nix`, we can link to the pull request that removed the package, making it easier for users to recover the nix expression if needed.
37+
38+
In the pull request that removes a package, the people who have substantially contributed to the package declaration before and have not left the project should be pinged.
39+
40+
## Broken Packages
41+
42+
Packages that are unconditionally marked as broken on all platforms are candidates for removal.
43+
If a package has dependent packages, those dependent packages will also be marked as indirectly broken.
44+
If the dependent packages cannot function without the broken package, they should also be removed.
45+
For example, if a library is broken and an application depends on it, the application will also be removed within the same time frame.
46+
47+
## Unmaintained Packages
48+
49+
We will add an "unmaintained" warning for all packages with an empty maintainer field that do not have any dependent packages with a maintainer.
50+
Ideally, we will have automation or semi-automation in place to create pull requests for this process (see future work).
51+
52+
# Examples and Interactions
53+
54+
[examples-and-interactions]: #examples-and-interactions
55+
56+
- A release manager or another contributor marks `packageA` as broken in 23.11, notifying the maintainer.
57+
- They have one full release cycle, as described, to fix `packageA`.
58+
- After the 24.05 release, `packageA` can be automatically removed from the nixpkgs master branch, as outlined in this RFC.
59+
60+
# Drawbacks
61+
62+
[drawbacks]: #drawbacks
63+
64+
Some unmaintained packages may still have users who will no longer be able to use them, but the hope is that removing unmaintained packages will encourage these users to step up as maintainers.
65+
In such cases, recovering the package from the git history should be relatively easy.
66+
67+
# Alternatives
68+
69+
[alternatives]: #alternatives
70+
71+
- Keep all packages.
72+
- Archive removed nix expressions. Note that this RFC does not prevent this effort from being implemented in addition.
73+
74+
# Prior Art
75+
76+
[prior-art]: #prior-art
77+
78+
- Most Linux distributions have rules for removing unmaintained packages, e.g.:
79+
- Debian: [Orphaning a package](https://www.debian.org/doc/manuals/developers-reference/developers-reference.en.html#orphaning-a-package).
80+
- Gentoo:
81+
- [Ebuild removal](https://devmanual.gentoo.org/ebuild-maintenance/removal/index.html).
82+
- [Treecleaner](https://wiki.gentoo.org/wiki/Project:Treecleaner)
83+
- [Treecleaner policy](https://wiki.gentoo.org/wiki/Project:Treecleaner/Policy)
84+
85+
- [Nixpkgs eval time is increasing too fast](https://github.com/NixOS/nixpkgs/issues/320528): This issue discusses ways to improve evaluation time.
86+
- FreeBSD Porters Handbook: [13.15. Marking a Port for Removal](https://docs.freebsd.org/en/books/porters-handbook/book/#dads-deprecated)
87+
88+
# Unresolved Questions
89+
90+
[unresolved]: #unresolved-questions
91+
92+
None.
93+
94+
# Future Work
95+
96+
[future]: #future-work
97+
98+
- Develop automation that opens pull requests to remove packages.
99+
- Add deprecation warnings for packages scheduled for removal to notify potential users i.e. as described in [RFC0127 problems](https://github.com/NixOS/rfcs/blob/master/rfcs/0127-issues-warnings.md)

0 commit comments

Comments
 (0)