Make patches relative to where tarballs are extracted

Ever since an old patch version, it has (for reasonable security
reasons) not supported patched with ../ in the filename.
Many of our patches have been relying on this behaviour being OK,
because we start off with an ancient patch version that didn't perform
such checks. As soon as we need this behaviour after we build a newer
patch though, we will have problems.

So, let's change the policy.
Patches are relative to where tarballs are extracted, rather than the
"working directory" - e.g. have patches for `coreutils-9.4/src/cp.c`
instead of `src/cp.c`.
Keeping this consistent has a few implications;
- patches are applied from the build/ directory in bash era now, with
  `-p0`
- when patches are manually applied in the bash era, use `-p` as
  required, usually `-p1`
- in kaem era where patches are always manually applied, `-p1` is used
This commit is contained in:
fosslinux 2024-12-21 16:50:23 +11:00
parent 749b2bfe37
commit a67db8fcbd
156 changed files with 1265 additions and 1263 deletions

View file

@ -15,8 +15,8 @@ the applicable combination of 'aclocal', 'autoconf', 'autoheader'.
See also 'AC_CONFIG_MACRO_DIRS'/'AC_CONFIG_MACRO_DIR' usage elsewhere.
--- gcc/configure.ac 2023-01-22 16:22:57.833166450 +1100
+++ gcc/configure.ac 2023-01-22 16:23:08.971274603 +1100
--- gcc-10.4.0/gcc/configure.ac 2023-01-22 16:22:57.833166450 +1100
+++ gcc-10.4.0/gcc/configure.ac 2023-01-22 16:23:08.971274603 +1100
@@ -25,6 +25,7 @@
AC_INIT
@ -25,8 +25,8 @@ See also 'AC_CONFIG_MACRO_DIRS'/'AC_CONFIG_MACRO_DIR' usage elsewhere.
AC_CONFIG_HEADER(auto-host.h:config.in)
gcc_version=`cat $srcdir/BASE-VER`
--- libobjc/configure.ac 2023-01-22 16:23:42.648601085 +1100
+++ libobjc/configure.ac 2023-01-22 16:23:28.937468262 +1100
--- gcc-10.4.0/libobjc/configure.ac 2023-01-22 16:23:42.648601085 +1100
+++ gcc-10.4.0/libobjc/configure.ac 2023-01-22 16:23:28.937468262 +1100
@@ -20,6 +20,7 @@
AC_INIT(package-unused, version-unused,, libobjc)

View file

@ -12,8 +12,8 @@ https://stackoverflow.com/questions/22160093/inconsistent-operand-constraints-in
Pre-5.0 GCC does not support PIC inline ASM that touches ebx (as
presumably the cpuid call does); so we must disable PIC.
--- libgcc/Makefile.in 2023-01-25 16:03:45.928059755 +1100
+++ libgcc/Makefile.in 2023-01-25 16:04:06.711464255 +1100
--- gcc-10.4.0/libgcc/Makefile.in 2023-01-25 16:03:45.928059755 +1100
+++ gcc-10.4.0/libgcc/Makefile.in 2023-01-25 16:04:06.711464255 +1100
@@ -282,7 +282,7 @@
# subdirectory rather than in the source directory.
# -I$(@D) and -I$(srcdir)/$(@D) cause the subdirectory of the file

View file

@ -18,8 +18,8 @@ __LIBGCC_HAS_XF_MODE__ is not defined.
diff --git libgcc/config/libbid/_dd_to_xf.c libgcc/config/libbid/_dd_to_xf.c
index 5a2abbbb1f4..e4b12e8ac4f 100644
--- libgcc/config/libbid/_dd_to_xf.c
+++ libgcc/config/libbid/_dd_to_xf.c
--- gcc-10.4.0/libgcc/config/libbid/_dd_to_xf.c
+++ gcc-10.4.0/libgcc/config/libbid/_dd_to_xf.c
@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
@ -35,8 +35,8 @@ index 5a2abbbb1f4..e4b12e8ac4f 100644
+#endif
diff --git libgcc/config/libbid/_sd_to_xf.c libgcc/config/libbid/_sd_to_xf.c
index 9af09913684..288ccb25075 100644
--- libgcc/config/libbid/_sd_to_xf.c
+++ libgcc/config/libbid/_sd_to_xf.c
--- gcc-10.4.0/libgcc/config/libbid/_sd_to_xf.c
+++ gcc-10.4.0/libgcc/config/libbid/_sd_to_xf.c
@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
@ -52,8 +52,8 @@ index 9af09913684..288ccb25075 100644
+#endif
diff --git libgcc/config/libbid/_td_to_xf.c libgcc/config/libbid/_td_to_xf.c
index b0c76a71497..e990282162d 100644
--- libgcc/config/libbid/_td_to_xf.c
+++ libgcc/config/libbid/_td_to_xf.c
--- gcc-10.4.0/libgcc/config/libbid/_td_to_xf.c
+++ gcc-10.4.0/libgcc/config/libbid/_td_to_xf.c
@@ -25,6 +25,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
@ -69,8 +69,8 @@ index b0c76a71497..e990282162d 100644
+#endif
diff --git libgcc/config/libbid/_xf_to_dd.c libgcc/config/libbid/_xf_to_dd.c
index 9feb0f2c3d6..e3246a1c2e1 100644
--- libgcc/config/libbid/_xf_to_dd.c
+++ libgcc/config/libbid/_xf_to_dd.c
--- gcc-10.4.0/libgcc/config/libbid/_xf_to_dd.c
+++ gcc-10.4.0/libgcc/config/libbid/_xf_to_dd.c
@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
@ -85,8 +85,8 @@ index 9feb0f2c3d6..e3246a1c2e1 100644
+#endif
diff --git libgcc/config/libbid/_xf_to_sd.c libgcc/config/libbid/_xf_to_sd.c
index 7d46548af6c..9147e979182 100644
--- libgcc/config/libbid/_xf_to_sd.c
+++ libgcc/config/libbid/_xf_to_sd.c
--- gcc-10.4.0/libgcc/config/libbid/_xf_to_sd.c
+++ gcc-10.4.0/libgcc/config/libbid/_xf_to_sd.c
@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"
@ -101,8 +101,8 @@ index 7d46548af6c..9147e979182 100644
+#endif
diff --git libgcc/config/libbid/_xf_to_td.c libgcc/config/libbid/_xf_to_td.c
index 07987fdcc3a..c8d102b0b7f 100644
--- libgcc/config/libbid/_xf_to_td.c
+++ libgcc/config/libbid/_xf_to_td.c
--- gcc-10.4.0/libgcc/config/libbid/_xf_to_td.c
+++ gcc-10.4.0/libgcc/config/libbid/_xf_to_td.c
@@ -25,9 +25,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "bid_functions.h"
#include "bid_gcc_intrinsics.h"

View file

@ -4,8 +4,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
In new gettext external is required for AM_GNU_GETTEXT.
--- intl/configure.ac 2023-02-07 18:43:58.989786230 +1100
+++ intl/configure.ac 2023-02-07 18:43:02.182632631 +1100
--- gcc-10.4.0/intl/configure.ac 2023-02-07 18:43:58.989786230 +1100
+++ gcc-10.4.0/intl/configure.ac 2023-02-07 18:43:02.182632631 +1100
@@ -4,7 +4,7 @@
AC_CONFIG_HEADER(config.h)
AC_CONFIG_MACRO_DIR(../config)

View file

@ -5,8 +5,8 @@ SPDX-License-Identifier: GPL-3.0-or-later
GCC 4.7 doesn't have fisolate-erroneous-paths-dereference. Hence
this line does nothing.
--- libgcc/generic-morestack.c 2023-01-25 16:52:35.382471998 +1100
+++ libgcc/generic-morestack.c 2023-01-25 16:52:40.773585043 +1100
--- gcc-10.4.0/libgcc/generic-morestack.c 2023-01-25 16:52:35.382471998 +1100
+++ gcc-10.4.0/libgcc/generic-morestack.c 2023-01-25 16:52:40.773585043 +1100
@@ -23,8 +23,6 @@
see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */