Files
newgrok/patches/0002-Add-FORK.md-identifying-this-tree-as-a-downstream-fo.patch
iceBear67andClaude Opus 5 618c8e31ee Set up CraftBukkit-style patch workflow for xai-org/grok-build
Upstream is a periodic one-way export of xAI's monorepo (linear
"Synced from monorepo" commits, SOURCE_REV pinning the internal SHA)
and explicitly refuses external contributions. So local changes can
never be upstreamed, and upstream re-drops the whole tree on every
sync -- structurally the same problem CraftBukkit has with Mojang.

Adopt the Spigot/BuildTools model: patches/ is the source of truth,
work/ is a disposable build artifact regenerated from upstream.rev
plus patches/.

  scripts/apply-patches.sh    ~ applyPatches.sh
  scripts/rebuild-patches.sh  ~ rebuildPatches.sh
  scripts/update-upstream.sh  forward-ports patches onto a new sync
  scripts/setup.sh            toolchain: rust 1.94.0, dotslash/protoc
  upstream.rev                ~ BuildTools versions/*.json pin

format-patch uses --zero-commit so rebases do not rewrite the From
line of every patch, and apply's git clean preserves work/target so
replaying patches does not cost a cold Rust rebuild.

Ships two [EXAMPLE PATCH] commits demonstrating a source edit and a
new-file addition; both are safe to delete.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-14 04:50:07 +00:00

38 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: iceBear67 <icebear67@sfclub.cc>
Date: Fri, 14 Aug 2026 04:48:16 +0000
Subject: [PATCH] Add FORK.md identifying this tree as a downstream fork
Upstream refuses external contributions, so anyone who lands in this
checkout needs to know it is patched and that work/ is disposable.
[EXAMPLE PATCH] Demonstrates a new-file patch. Safe to drop: delete the
patch file and run 'make apply'.
diff --git a/FORK.md b/FORK.md
new file mode 100644
index 0000000000000000000000000000000000000000..1afd0f0fbe91bc70c2e463373d361ae25b60f705
--- /dev/null
+++ b/FORK.md
@@ -0,0 +1,20 @@
+# newgrok — a downstream fork of xai-org/grok-build
+
+This tree is **not** an official xAI build. It is upstream `grok-build` with a
+set of local patches replayed on top of it.
+
+- Upstream: <https://github.com/xai-org/grok-build> (Apache-2.0)
+- The exact upstream commit this was built from is pinned in the fork repo's
+ `upstream.rev`; upstream's own `SOURCE_REV` records the monorepo commit.
+- Binaries built here identify themselves as `grok [newgrok] <version>`.
+
+## Do not edit this tree directly and expect it to survive
+
+`work/` is a derived artifact. It is deleted and regenerated from
+`upstream.rev` + `patches/` whenever patches are applied or upstream is
+updated. Changes only persist if you **commit** them here and then run
+`make rebuild`, which writes them back out to `patches/`.
+
+Upstream does not accept external contributions (see `CONTRIBUTING.md`), which
+is the whole reason this fork carries its changes as patches instead of as
+merged commits.