From 2b72f61e41b661ca3391c00d50284bde2b1c186c Mon Sep 17 00:00:00 2001 From: Admin Pupkin Date: Tue, 9 Jun 2026 16:56:22 +0300 Subject: [PATCH] =?UTF-8?q?docs:=20amend=20NO=20OVERLAY-STYLE=20PATCHES=20?= =?UTF-8?q?policy=20=E2=80=94=20Red=20Bear=20forks=20allowed=20for=20big?= =?UTF-8?q?=20external=20projects=20(mesa,=20wayland,=20qt,=20KF6,=20KWin,?= =?UTF-8?q?=20SDDM,=20llvm,=20libdrm)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The blanket reading from commit 5396e6c3c would have forced every direct edit to mesa, wayland, qt, KF6, KWin, SDDM, llvm, libdrm, redox-drm, libepoxy, and similar multi-million-line external projects to live inside recipes//source/, where a 'make clean' or upstream sync would silently clobber our work. That is not a full fork, that is a liability. Replace the single hard prohibition with a two-rule model: Rule 1 — In-tree Red Bear components (kernel, relibc, base, installer, bootloader) and small Red Bear-initiated packages: NO overlay, NO local fork of mainline. Direct edits in recipes//source/ and recipes//recipe.toml. No symlinks, no patch files. Rule 2 — Big external projects (mesa, wayland, qt, KF6, KWin, SDDM, llvm, libdrm, redox-drm, libepoxy, etc.): Red Bear fork at local/sources// is mandatory. The mainline recipe points at the fork via 'git = ...' or a 'Local' source type. We own the source, the recipe just builds it. Both AGENTS.md (top-level) and local/AGENTS.md updated. Cross-references to the section name in the anti-pattern tables at the bottom of the policy remain valid. --- AGENTS.md | 150 +++++++++++++++++++++++++++++++++++++++++++++--- local/AGENTS.md | 146 +++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 278 insertions(+), 18 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2591097c85..579481abf4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -41,12 +41,40 @@ This means: - If a Cargo dependency breaks, we fork the dependency crate to `local/sources/` and pin our Cargo.toml to our fork. - The Linux kernel in `local/reference/` is read-only reference — never a dependency. -### NO OVERLAY-STYLE PATCHES — DIRECT EDITS ONLY +### NO OVERLAY-STYLE PATCHES — SCOPED POLICY (AMENDED 2026) -**Hard policy. No exceptions. No "just this once." No "temporary until we fork."** +**Hard policy for in-tree Red Bear components. Explicit allowance for +Red Bear forks of big external projects.** The blanket "no patches +anywhere" reading from commit `5396e6c3c` was too broad — it would have +forced every direct edit to mesa, wayland, qt, KF6, KWin, SDDM, llvm, +libdrm, redox-drm, libepoxy, and similar multi-million-line external +projects to live inside `recipes//source/`, where a `make clean` +or upstream sync would clobber it. That is not a full fork, that is a +liability. This section sets the two-rule model Red Bear OS actually +follows. -The Red Bear build is a **full fork**, not an overlay on top of Redox. The -correct workflow for any change is: +--- + +#### Rule 1 — In-tree Red Bear components: NO overlay, NO local fork of mainline + +These are Red Bear's own core components. They are small, fast-moving, +and tightly coupled to the rest of the system. **Direct edits go into +the mainline `recipes//recipe.toml` and `recipes//source/`.** +There is **no** Red Bear fork in `local/`, **no** symlink layer, +**no** patch file. + +| Component | Why in-tree, not a fork | +|---|---| +| `kernel` (`recipes/core/kernel`) | Red Bear's microkernel fork; ACPI, x2APIC, MSI/MSI-X, scheduling, branding — all live in `recipes/core/kernel/source/` directly | +| `relibc` (`recipes/core/relibc`) | Red Bear's C library fork; eventfd, signalfd, timerfd, waitid, SysV IPC, credential syscalls — all live in `recipes/core/relibc/source/` directly | +| `base` (drivers) (`recipes/core/base`) | Red Bear's userspace drivers fork; acpid, pcid, inputd, ps2d, xhcid migrations — all live in `recipes/core/base/source/` directly | +| `installer` (`recipes/core/installer`) | Red Bear's installer fork; ext4 + GRUB support — all lives in `recipes/core/installer/source/` directly | +| `bootloader` (`recipes/core/bootloader`) | Red Bear's UEFI bootloader fork; UEFI alloc fix, branding, GPT offset — all lives in `recipes/core/bootloader/source/` directly | + +For these components, the mainline recipe IS the Red Bear fork. We own +it. There is no upstream to sync with — it is our code, full stop. +The same rule applies to Red Bear-initiated new packages in +`local/recipes///`. | Want to change | Where to do it (DIRECT EDIT) | |---|---| @@ -56,7 +84,7 @@ correct workflow for any change is: | Change a build script | Edit `local/scripts/