mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 10:25:25 +01:00
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:
parent
749b2bfe37
commit
a67db8fcbd
156 changed files with 1265 additions and 1263 deletions
|
|
@ -10,8 +10,8 @@ unicodetype_db.h indiscriminately.
|
|||
We are effectively restricted to ASCII characters with this change,
|
||||
but it works.
|
||||
|
||||
--- Objects/unicodectype.c 2000-09-26 08:48:13.000000000 +1100
|
||||
+++ Objects/unicodectype.c 2022-10-03 21:09:02.108869321 +1100
|
||||
--- Python-2.0.1/Objects/unicodectype.c 2000-09-26 08:48:13.000000000 +1100
|
||||
+++ Python-2.0.1/Objects/unicodectype.c 2022-10-03 21:09:02.108869321 +1100
|
||||
@@ -29,30 +29,12 @@
|
||||
const unsigned char digit;
|
||||
} _PyUnicode_TypeRecord;
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ src_prepare() {
|
|||
sed -i "/^unicodedata/d" Modules/Setup.in
|
||||
|
||||
# Patch
|
||||
patch -Np0 -i disable-unicode.patch
|
||||
patch -Np1 -i disable-unicode.patch
|
||||
|
||||
# Regenerate autoconf
|
||||
autoreconf-2.71 -fi
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ SPDX-License-Identifier: Python-2.0.1
|
|||
|
||||
Python 2.0 does not support DESTDIR, so add it in.
|
||||
|
||||
--- Makefile.in 2022-10-21 17:56:48.034287578 +1100
|
||||
+++ Makefile.in 2022-10-21 18:07:54.267542882 +1100
|
||||
--- Python-2.0.1/Makefile.in 2022-10-21 17:56:48.034287578 +1100
|
||||
+++ Python-2.0.1/Makefile.in 2022-10-21 18:07:54.267542882 +1100
|
||||
@@ -224,16 +224,16 @@
|
||||
|
||||
# Install the interpreter (by creating a hard link to python$(VERSION))
|
||||
|
|
@ -193,8 +193,8 @@ Python 2.0 does not support DESTDIR, so add it in.
|
|||
prefix="$(prefix)" \
|
||||
exec_prefix="$(exec_prefix)" \
|
||||
sharedinstall
|
||||
--- Modules/Makefile.pre.in 2022-10-21 17:56:44.635251486 +1100
|
||||
+++ Modules/Makefile.pre.in 2022-10-21 17:57:00.124415957 +1100
|
||||
--- Python-2.0.1/Modules/Makefile.pre.in 2022-10-21 17:56:44.635251486 +1100
|
||||
+++ Python-2.0.1/Modules/Makefile.pre.in 2022-10-21 17:57:00.124415957 +1100
|
||||
@@ -240,7 +240,7 @@
|
||||
sharedinstall: $(DESTSHARED) $(SHAREDMODS)
|
||||
-for i in X $(SHAREDMODS); do \
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ SPDX-License-Identifier: Python-2.0.1
|
|||
musl (correctly) implements the POSIX posix_close function, however
|
||||
this was added well after Python 2.0.1 was released.
|
||||
|
||||
--- Modules/posixmodule.c 2022-09-16 16:46:09.809812072 +1000
|
||||
+++ Modules/posixmodule.c 2022-09-16 16:47:23.254166370 +1000
|
||||
--- Python-2.0.1/Modules/posixmodule.c 2022-09-16 16:46:09.809812072 +1000
|
||||
+++ Python-2.0.1/Modules/posixmodule.c 2022-09-16 16:47:23.254166370 +1000
|
||||
@@ -3267,12 +3267,12 @@
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ SPDX-License-Identifier: Python-2.0.1
|
|||
|
||||
Disable creation of pyc files.
|
||||
|
||||
--- Lib/py_compile.py 2024-01-22 11:28:00.291261389 +1100
|
||||
+++ Lib/py_compile.py 2024-01-22 11:28:13.462600939 +1100
|
||||
--- Python-2.0.1/Lib/py_compile.py 2024-01-22 11:28:00.291261389 +1100
|
||||
+++ Python-2.0.1/Lib/py_compile.py 2024-01-22 11:28:13.462600939 +1100
|
||||
@@ -41,6 +41,7 @@
|
||||
directories).
|
||||
|
||||
|
|
@ -14,8 +14,8 @@ Disable creation of pyc files.
|
|||
import os, marshal, __builtin__
|
||||
f = open(file)
|
||||
try:
|
||||
--- Python/import.c 2024-01-22 12:23:34.349395727 +1100
|
||||
+++ Python/import.c 2024-01-22 12:23:30.299285640 +1100
|
||||
--- Python-2.0.1/Python/import.c 2024-01-22 12:23:34.349395727 +1100
|
||||
+++ Python-2.0.1/Python/import.c 2024-01-22 12:23:30.299285640 +1100
|
||||
@@ -672,6 +672,7 @@
|
||||
static void
|
||||
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
|
||||
|
|
|
|||
|
|
@ -5,8 +5,8 @@ SPDX-License-Identifier: Python-2.0.1
|
|||
Python 2.0.1's Makefile does not support custom CFLAGS for some
|
||||
reason, so we have to patch our __DATE__ __TIME__ undefs in.
|
||||
|
||||
--- Makefile.in 2022-12-23 18:33:56.486325025 +1100
|
||||
+++ Makefile.in 2022-12-23 18:46:05.910387214 +1100
|
||||
--- Python-2.0.1/Makefile.in 2022-12-23 18:33:56.486325025 +1100
|
||||
+++ Python-2.0.1/Makefile.in 2022-12-23 18:46:05.910387214 +1100
|
||||
@@ -127,7 +127,7 @@
|
||||
DIST= $(DISTFILES) $(DISTDIRS)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue