Add durability policy, userutils branding patch for Red Bear OS login/issue

Enforce that every source-tree edit must be mirrored to local/patches/
and wired into recipe.toml in the same session. Apply the policy
retroactively to userutils res/issue and res/motd (Redox → Red Bear).
This commit is contained in:
2026-04-25 16:34:45 +01:00
parent 296861f1ce
commit 7a36312588
3 changed files with 55 additions and 0 deletions
+28
View File
@@ -158,6 +158,34 @@ make all
- **DO NOT** skip patches in WIP recipes — document what's missing with `#TODO`
- **DO NOT** skip warnings — investigate, diagnose, and fix the root cause; suppressing or ignoring warnings is not acceptable when a fix is feasible
## DURABILITY POLICY
Every change to an upstream-owned source tree (anything under `recipes/*/source/`) **must** be
mirrored into a durable location **in the same work session** it was made. A change that exists
only inside a fetched source tree is not preserved.
**Required actions after any source-tree edit:**
1. **Generate a patch** from the source git diff and save it under `local/patches/<component>/`.
2. **Wire the patch** into the recipe's `recipe.toml` `patches = [...]` list.
3. **Commit** the patch file and recipe change before the session ends.
**Why:** `make distclean`, `make clean`, upstream source refreshes, and `sync-upstream.sh` all
discard or replace `recipes/*/source/` trees. Only `local/patches/`, `local/recipes/`, tracked
configs, and `local/docs/` survive.
**Examples of changes that require immediate patching:**
| What you edited | Durable location |
|---|---|
| `recipes/core/relibc/source/src/header/sys_select/mod.rs` | `local/patches/relibc/P3-select-not-epoll-timeout.patch` + `recipe.toml` |
| `recipes/core/relibc/source/src/header/signal/cbindgen.toml` | same patch as above |
| `recipes/core/userutils/source/res/issue` | `local/patches/userutils/redox.patch` + `recipe.toml` |
| `recipes/core/kernel/source/...` | `local/patches/kernel/redox.patch` (symlinked from recipe) |
**What does NOT need patching:** Files that already live in `local/`, tracked `config/redbear-*.toml`,
or any path that is already git-tracked and not inside a fetched source tree.
## PATCH MANAGEMENT
All Red Bear OS modifications to upstream files are kept separately in `local/patches/`.
+24
View File
@@ -0,0 +1,24 @@
diff --git a/res/issue b/res/issue
index 6a963d8..59ffbd4 100644
--- a/res/issue
+++ b/res/issue
@@ -1,6 +1,6 @@
-########## Redox OS ##########
-# Login with the following: #
-# `user` #
-# `root`:`password` #
-##############################
+########## Red Bear OS #########
+# Login with the following: #
+# `user` #
+# `root`:`password` #
+################################
diff --git a/res/motd b/res/motd
index 5cd097a..dc28b04 100644
--- a/res/motd
+++ b/res/motd
@@ -1,2 +1,2 @@
-Welcome to Redox OS!
+Welcome to Red Bear OS!
+3
View File
@@ -1,5 +1,8 @@
[source]
git = "https://gitlab.redox-os.org/redox-os/userutils.git"
patches = [
"../../../local/patches/userutils/redox.patch",
]
[build]
template = "custom"