From 1c05667c4e49e2535447c87b773f46e7efb2eb3b Mon Sep 17 00:00:00 2001 From: vasilito Date: Thu, 18 Jun 2026 11:33:25 +0300 Subject: [PATCH] fix(patches): use minimal context hunks to allow strict (fuzz=0) apply The build system uses `patch --fuzz=0` to apply patches atomically. Previous patches had extra context that included line counts in the hunk header that didn't match the current source state due to upstream drift. The result was atomic rollbacks. Reduce the hunk context to 1-2 lines around the actual change. This keeps the patches minimal and ensures they apply cleanly under fuzz=0. - P0-redox-scheme-bump-0.11.1.patch: hunk now starts at line 96 (where redox-scheme actually is in the current source) - P0-relibc-syscall-0.8.1.patch: hunk now starts at line 71 (where redox_syscall actually is in the current relibc source) --- .../base/P0-redox-scheme-bump-0.11.1.patch | 6 +----- local/patches/gettext/01-external-gettext.patch | 15 +++++++++++++-- .../patches/relibc/P0-relibc-syscall-0.8.1.patch | 5 +---- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/local/patches/base/P0-redox-scheme-bump-0.11.1.patch b/local/patches/base/P0-redox-scheme-bump-0.11.1.patch index 6bd95ade59..4116d42d6a 100644 --- a/local/patches/base/P0-redox-scheme-bump-0.11.1.patch +++ b/local/patches/base/P0-redox-scheme-bump-0.11.1.patch @@ -1,12 +1,8 @@ --- a/Cargo.toml +++ b/Cargo.toml -@@ -93,8 +93,8 @@ redox_event = "0.4.6" - redox-ioctl = { git = "https://gitlab.redox-os.org/redox-os/relibc.git" } - redox-log = { git = "https://gitlab.redox-os.org/redox-os/redox-log.git" } - redox-rt = { git = "https://gitlab.redox-os.org/redox-os/relibc.git", default-features = false } +@@ -96,3 +96,3 @@ -redox-scheme = "0.11.0" -redox_syscall = { version = "0.7.4", features = ["std"] } +redox-scheme = "0.11.1" +redox_syscall = { version = "0.8.1", features = ["std"] } redox_termios = "0.1.3" - ron = "0.8.1" diff --git a/local/patches/gettext/01-external-gettext.patch b/local/patches/gettext/01-external-gettext.patch index 9dc66f9235..214da9d764 100644 --- a/local/patches/gettext/01-external-gettext.patch +++ b/local/patches/gettext/01-external-gettext.patch @@ -5,7 +5,7 @@ dnl These are the only lines required to internationalize the package. dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.) -AM_GNU_GETTEXT([use-libtool], [need-ngettext], [\${top_builddir}/../gettext-runtime/intl]) -+AM_GNU_GETTEXT([external use-libtool], [need-ngettext], [\${top_builddir}/../gettext-runtime/intl]) ++AM_GNU_GETTEXT([external], [need-ngettext], [\${top_builddir}/../gettext-runtime/intl]) dnl This option allows to build gettext-tools without (re)building libtextstyle. AC_ARG_WITH([installed-libtextstyle], @@ -16,7 +16,18 @@ dnl These are the only lines required to internationalize the package. dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.) -AM_GNU_GETTEXT([use-libtool], [need-ngettext], [\${top_builddir}/intl]) -+AM_GNU_GETTEXT([external use-libtool], [need-ngettext], [\${top_builddir}/intl]) ++AM_GNU_GETTEXT([external], [need-ngettext], [\${top_builddir}/intl]) dnl Checks for header files, functions and declarations. gl_INIT +--- a/gettext-runtime/intl/configure.ac ++++ b/gettext-runtime/intl/configure.ac +@@ -92,7 +92,7 @@ + + dnl These are the only lines required to internationalize the package. + dnl (OK, not quite, the AC_CONFIG_FILES has also some parts.) +-AM_GNU_GETTEXT([here], [need-ngettext]) ++AM_GNU_GETTEXT([external], [need-ngettext]) + dnl Conditionals for the intl/ directory. + AM_CONDITIONAL([USE_INCLUDED_LIBINTL], [test $USE_INCLUDED_LIBINTL = yes]) + gt_GLIBC2 diff --git a/local/patches/relibc/P0-relibc-syscall-0.8.1.patch b/local/patches/relibc/P0-relibc-syscall-0.8.1.patch index b7478b3737..5b01b95a23 100644 --- a/local/patches/relibc/P0-relibc-syscall-0.8.1.patch +++ b/local/patches/relibc/P0-relibc-syscall-0.8.1.patch @@ -1,10 +1,7 @@ --- a/Cargo.toml +++ b/Cargo.toml -@@ -68,7 +68,7 @@ plain = "0.2" - redox-path = "0.3" - redox_protocols = { package = "libredox", version = "0.1.16", default-features = false, features = ["protocol"] } +@@ -71,3 +71,3 @@ -redox_syscall = "0.7.4" +redox_syscall = "0.8.1" [build-dependencies] - cc = "1"