28 Commits

Author SHA1 Message Date
Ricardo Pardini
282fb964e5 patching: rewrite: fully stabilize patch index stanzas as well as From lines
- `git format-patch --zero-commit` doesn't affect `index xxx...yyy` lines, only `From: `
  - so use the _classy_ "use a regex with a callback" solution as git format-patch doesn't offer one
- this will make _all_ patches change when rewritten, but hopefully _for the last time_ !
- we need to preserve `index 000000000000..xxx` as zeros, which indicate new file creation, thus:
  - new file creations are rewritten as `index 000000000000..111111111111`
  - non-creations are rewritten as `index 111111111111..222222222222`
- this is the final version of #6455
2024-06-09 10:42:26 +02:00
Darsey Litzenberger
ce33bddb58 Make the colorized build output readable on a light background
This fixes the readability of colorized output of compile.sh when
running on a terminal with a light background.  It uses the COLORFGBG
environment variable similarly to how the ip(8) command does.

Signed-off-by: Darsey Litzenberger <dlitz@dlitz.net>
2024-02-09 19:38:03 +01:00
amazingfate
afc30e64eb patching: set commit index length to 12 when rewriting patches 2023-12-30 13:33:56 +01:00
Ricardo Pardini
6186a41c2b patching: if 0 files left to commit after config-filtering, don't commit nor rewrite the patches
- this is mostly useful for Makefile's and DT patches which should end be bare instead of null-patched
2023-10-26 14:48:49 +00:00
Ricardo Pardini
a547d3b101 patching: show the patch number for multi-patch mbox files in summary table 2023-10-03 14:10:46 +02:00
Ricardo Pardini
800d92045d tools: patching: don't rewrite auto-generated patches (eg, drivers) 2023-09-29 08:48:01 +02:00
Ricardo Pardini
fe36951c9f patching: auto patchers: bare dts, bare overlays, DT Makefile 2023-06-13 12:29:52 +02:00
Ricardo Pardini
70a64a0415 patching: Patching Summary and Patching Failures tables using Python's Rich
- even Rich'er patch output by colorizing certain strings green/yellow/red
- BASE_GIT_TAG now very sneakily also accepts a branch name
- IMPORTANT: this includes: BREAKING CHANGE: patches failing to apply now break the build. fixes #4958
  - also break on legacy `process_patch_file()` failure, remove `EXIT_PATCHING_ERROR`
2023-06-13 12:29:52 +02:00
Igor Pečovnik
d59fa58875 Add (c) also to python scripts (#4926) 2023-03-09 20:52:06 +01:00
Ricardo Pardini
5d3ba1bade armbian-next: patching: rewrite: don't gag on bad "/dev/null.c" rename patches; archeology: --find-copies-harder; try to get GHA to run GH pages
- try to convince GHA to actually run my kernel patching summary workflow on push
2023-02-18 07:44:51 -03:00
Ricardo Pardini
f71e6f4865 armbian-next: patching: accept b4's magic marker git@z Thu Jan 1 00:00:00 1970 for mbox validations 2023-02-18 07:44:15 -03:00
Ricardo Pardini
3e012306c4 armbian-next: patching: less horrible patching log, pt 38: downgrade utf-8 mbox to log warning, mark as problem 2023-02-18 07:43:47 -03:00
Ricardo Pardini
861b07305e armbian-next: patching: less horrible patching log, pt 37
- don't show stats for patches that are bind applied blind (failed to parse/autogen)
- don't show Author, it's too long
- don't dump Python exceptions in log
- extra: expand Python imports
2023-02-18 07:43:44 -03:00
Ricardo Pardini
b0bef8b1c4 armbian-next: patching.py vs decent logging: better, but not there yet
- mostly downgrading stuff to .debug()
- some stats
2023-02-18 07:43:37 -03:00
Ricardo Pardini
e540e52207 armbian-next: patching: parse renamed source files, don't swallow them during rewrite 2023-02-18 07:42:57 -03:00
Ricardo Pardini
a254643268 armbian-next: patching: avoid mangling valid utf-8 from mbox'es 2023-02-18 07:42:56 -03:00
Ricardo Pardini
7096cf70d3 armbian-next: patching: remove quotes from author name during parsing 2023-02-18 07:42:55 -03:00
Ricardo Pardini
0207d5f517 armbian-next: patching: don't rewrite empty desc as "None" 2023-02-18 07:42:54 -03:00
Ricardo Pardini
3c7587ef84 armbian-next: patching: don't complain about missing files when the patch parsed OK and file was actually deleted 2023-02-18 07:42:53 -03:00
Ricardo Pardini
4307bac073 armbian-next: patching: use --zero-commit instead of find/replace for rewrite 2023-02-18 07:42:02 -03:00
Ricardo Pardini
14ecc86b60 armbian-next: patching: grouping tryout, very basic by-dir: SPLIT_PATCHES=yes 2023-02-18 07:42:01 -03:00
Ricardo Pardini
f0a0fa3000 armbian-next: patching: patches-to-git: don't eat newline between subject and message 2023-02-18 07:42:00 -03:00
Ricardo Pardini
a57e128cfa armbian-next: patching: don't gag if empty hexsha / no archeology possible 2023-02-18 07:41:59 -03:00
Ricardo Pardini
0b0fa6630b armbian-next: patching: add sanity checks for magic markers matching mbox len & patch_contents not containing magic markers
- case in point, mvebu-edge's disappearing patch in `12-net-dsa-mv88e6xxx.patch`
2023-02-18 07:41:55 -03:00
Ricardo Pardini
b7efd70f1a armbian-next: patching: to-git: don't fail if is_autogen_dir; only change Subject if not rewriting in place 2023-02-18 07:41:54 -03:00