1
0
mirror of https://github.com/skeeto/w64devkit.git synced 2026-10-23 06:08:56 +03:00

Add shared quilt settings and patch queue documentation

src/quiltrc fixes refresh output (no Index: lines or timestamps, a/ b/
prefixes, diffstat) so that every contributor produces identical
patches. src/README.md describes driving the queues with it, the policy
of refreshing a component's whole queue when its version changes, and
how gcc-final stacks on gcc.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Christopher Wellons
2026-10-11 09:28:38 -04:00
parent 13688517ff
commit 623d0d8a88
2 changed files with 64 additions and 0 deletions

58
src/README.md Normal file
View File

@@ -0,0 +1,58 @@
# Patch queues
Each subdirectory here is a [quilt][] patch queue for one component: a
`series` file listing patches in application order, plus the patches. The
Dockerfile applies each queue to a freshly unpacked source tree. Order
comes from `series`, never from file names.
## Working on a queue
Drive a queue straight out of this directory by pointing `QUILT_PATCHES`
at it from inside an unpacked source tree, with `--quiltrc` selecting the
shared settings in `quiltrc` so that everyone produces identical patches:
$ W=/path/to/w64devkit
$ tar xf $W/source/cmake-4.4.3.tar.gz
$ cd cmake-4.4.3/
$ export QUILT_PATCHES=$W/src/cmake
$ quilt --quiltrc $W/src/quiltrc push -a
From there use quilt as usual (`push`, `pop`, `refresh`, `new`, `edit`,
etc.). `refresh` writes directly into this directory, so check `git
status` afterward.
Always start from a freshly unpacked tree. Quilt records applied patches
in `.pc/`, and a tree reused with a different `QUILT_PATCHES` acts on the
queue recorded there.
## Updating a component
When a component's version changes, refresh its entire queue against the
new source in the same commit:
$ quilt --quiltrc $W/src/quiltrc push -a --refresh
Read the output before committing. "Hunk succeeded at N (offset M)" is
harmless and is what the refresh cleans up. "with fuzz" means patch
discarded context to make a hunk fit, so check that the hunk landed where
intended before accepting the refreshed result.
## GCC's two queues
`gcc` and `gcc-final` apply to the same GCC tree. `gcc` goes on first and
affects both the bootstrap cross-compiler and the distributed compiler.
`gcc-final` goes on top afterward, just before the distributed compiler
is configured, and affects only that compiler. Patches in `gcc-final`
therefore apply to an already-patched tree, and must be refreshed that
way:
$ QUILT_PATCHES=$W/src/gcc quilt --quiltrc $W/src/quiltrc push -a --refresh
$ rm -rf .pc
$ QUILT_PATCHES=$W/src/gcc-final quilt --quiltrc $W/src/quiltrc push -a --refresh
Removing `.pc` between queues mirrors the Dockerfile, which never pops.
The w64devkit distribution includes this directory and `quilt.exe`, so
the same commands work inside the kit.
[quilt]: https://savannah.nongnu.org/projects/quilt

6
src/quiltrc Normal file
View File

@@ -0,0 +1,6 @@
# Shared quilt settings for the patch queues under src/, so everyone
# produces identical patches: quilt --quiltrc path/to/src/quiltrc ...
# See src/README.md.
QUILT_NO_DIFF_INDEX=1
QUILT_NO_DIFF_TIMESTAMPS=1
QUILT_REFRESH_ARGS="-p ab --diffstat"