mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-04 10:25:25 +01:00
Remove the notion of "sys*"
- This idea originates from very early in the project and was, at the
time, a very easy way to categorise things.
- Now, it doesn't really make much sense - it is fairly arbitary, often
occuring when there is a change in kernel, but not from builder-hex0
to fiwix, and sysb is in reality completely unnecessary.
- In short, the sys* stuff is a bit of a mess that makes the project
more difficult to understand.
- This puts everything down into one folder and has a manifest file that
is used to generate the build scripts on the fly rather than using
coded scripts.
- This is created in the "seed" stage.
stage0-posix -- (calls) --> seed -- (generates) --> main steps
Alongside this change there are a variety of other smaller fixups to the
general structure of the live-bootstrap rootfs.
- Creating a rootfs has become much simpler and is defined as code in
go.sh. The new structure, for an about-to-be booted system, is
/
-- /steps (direct copy of steps/)
-- /distfiles (direct copy of distfiles/)
-- all files from seed/*
-- all files from seed/stage0-posix/*
- There is no longer such a thing as /usr/include/musl, this didn't
really make any sense, as musl is the final libc used. Rather, to
separate musl and mes, we have /usr/include/mes, which is much easier
to work with.
- This also makes mes easier to blow away later.
- A few things that weren't properly in packages have been changed;
checksum-transcriber, simple-patch, kexec-fiwix have all been given
fully qualified package names.
- Highly breaking change, scripts now exist in their package directory
but NOT WITH THE packagename.sh. Rather, they use pass1.sh, pass2.sh,
etc. This avoids manual definition of passes.
- Ditto with patches; default directory is patches, but then any patch
series specific to a pass are named patches-passX.
This commit is contained in:
parent
0907cfd073
commit
6ed2e09f3a
546 changed files with 700 additions and 1299 deletions
110
steps/python-2.3.7/files/disable-unicode.patch
Normal file
110
steps/python-2.3.7/files/disable-unicode.patch
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: PSF-2.0
|
||||
|
||||
This is a nearly-equivalent patch to Python 2.0.1, with nearly
|
||||
identical reasoning.
|
||||
|
||||
Python 2.3's unicode regeneration code is a bit too incompatible
|
||||
with Python 2.0.1.
|
||||
|
||||
--- Objects/unicodectype.c 2022-10-05 18:11:21.989603599 +1100
|
||||
+++ Objects/unicodectype.c 2022-10-05 18:14:57.335843857 +1100
|
||||
@@ -29,31 +29,12 @@
|
||||
const unsigned char digit;
|
||||
} _PyUnicode_TypeRecord;
|
||||
|
||||
-#include "unicodetype_db.h"
|
||||
-
|
||||
-static const _PyUnicode_TypeRecord *
|
||||
-gettyperecord(Py_UNICODE code)
|
||||
-{
|
||||
- int index;
|
||||
-
|
||||
- if (code >= 0x110000)
|
||||
- index = 0;
|
||||
- else {
|
||||
- index = index1[(code>>SHIFT)];
|
||||
- index = index2[(index<<SHIFT)+(code&((1<<SHIFT)-1))];
|
||||
- }
|
||||
-
|
||||
- return &_PyUnicode_TypeRecords[index];
|
||||
-}
|
||||
-
|
||||
/* Returns 1 for Unicode characters having the category 'Zl' or type
|
||||
'B', 0 otherwise. */
|
||||
|
||||
int _PyUnicode_IsLinebreak(Py_UNICODE ch)
|
||||
{
|
||||
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
-
|
||||
- return (ctype->flags & LINEBREAK_MASK) != 0;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Returns the titlecase Unicode characters corresponding to ch or just
|
||||
@@ -61,18 +42,7 @@
|
||||
|
||||
Py_UNICODE _PyUnicode_ToTitlecase(register Py_UNICODE ch)
|
||||
{
|
||||
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
- int delta;
|
||||
-
|
||||
- if (ctype->title)
|
||||
- delta = ctype->title;
|
||||
- else
|
||||
- delta = ctype->upper;
|
||||
-
|
||||
- if (delta >= 32768)
|
||||
- delta -= 65536;
|
||||
-
|
||||
- return ch + delta;
|
||||
+ return ch;
|
||||
}
|
||||
|
||||
/* Returns 1 for Unicode characters having the category 'Lt', 0
|
||||
@@ -80,9 +50,7 @@
|
||||
|
||||
int _PyUnicode_IsTitlecase(Py_UNICODE ch)
|
||||
{
|
||||
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
-
|
||||
- return (ctype->flags & TITLE_MASK) != 0;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/* Returns the integer decimal (0-9) for Unicode characters having
|
||||
@@ -90,9 +58,7 @@
|
||||
|
||||
int _PyUnicode_ToDecimalDigit(Py_UNICODE ch)
|
||||
{
|
||||
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
-
|
||||
- return (ctype->flags & DECIMAL_MASK) ? ctype->decimal : -1;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
int _PyUnicode_IsDecimalDigit(Py_UNICODE ch)
|
||||
@@ -107,9 +73,7 @@
|
||||
|
||||
int _PyUnicode_ToDigit(Py_UNICODE ch)
|
||||
{
|
||||
- const _PyUnicode_TypeRecord *ctype = gettyperecord(ch);
|
||||
-
|
||||
- return (ctype->flags & DIGIT_MASK) ? ctype->digit : -1;
|
||||
+ return -1;
|
||||
}
|
||||
|
||||
int _PyUnicode_IsDigit(Py_UNICODE ch)
|
||||
--- Makefile.pre.in 2005-01-12 00:49:02.000000000 +1100
|
||||
+++ Makefile.pre.in 2022-10-05 18:35:05.979846971 +1100
|
||||
@@ -456,8 +456,7 @@
|
||||
Python/importdl.o: $(srcdir)/Python/importdl.c
|
||||
$(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
|
||||
|
||||
-Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c \
|
||||
- $(srcdir)/Objects/unicodetype_db.h
|
||||
+Objects/unicodectype.o: $(srcdir)/Objects/unicodectype.c
|
||||
|
||||
############################################################################
|
||||
# Header files
|
||||
71
steps/python-2.3.7/pass1.sh
Executable file
71
steps/python-2.3.7/pass1.sh
Executable file
|
|
@ -0,0 +1,71 @@
|
|||
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Remove broken file
|
||||
rm Lib/test/test_pep263.py
|
||||
|
||||
# Delete generated files
|
||||
rm Modules/glmodule.c
|
||||
rm Modules/unicodedata_db.h Objects/unicodetype_db.h
|
||||
rm Lib/stringprep.py
|
||||
mv Lib/plat-generic .
|
||||
rm -r Lib/plat-*
|
||||
mv plat-generic Lib/
|
||||
grep generated -r . -l | grep encodings | xargs rm
|
||||
|
||||
# Disable unicode
|
||||
patch -Np0 -i disable-unicode.patch
|
||||
|
||||
# Regenerate sre_constants.h
|
||||
rm Modules/sre_constants.h
|
||||
python Lib/sre_constants.py
|
||||
|
||||
# Regen ast module
|
||||
rm Lib/compiler/ast.py
|
||||
pushd Tools/compiler
|
||||
python astgen.py > ../../Lib/compiler/ast.py
|
||||
popd
|
||||
|
||||
# Regenerate autoconf
|
||||
autoreconf-2.71 -fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
MACHDEP=linux ac_sys_system=Linux \
|
||||
CFLAGS="-U__DATE__ -U__TIME__" \
|
||||
./configure \
|
||||
--prefix="${PREFIX}" \
|
||||
--libdir="${LIBDIR}" \
|
||||
--with-wctype-functions \
|
||||
--enable-ipv6
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Build pgen
|
||||
make "${MAKEJOBS}" Parser/pgen
|
||||
# Regen graminit.c and graminit.h
|
||||
make "${MAKEJOBS}" Include/graminit.h
|
||||
|
||||
# Regenerate some Python scripts using the other regenerated files
|
||||
# Must move them out to avoid using Lib/ module files which are
|
||||
# incompatible with running version of Python
|
||||
cp Lib/{symbol,keyword,token}.py .
|
||||
python symbol.py
|
||||
python keyword.py
|
||||
python token.py
|
||||
|
||||
# Now build the main program
|
||||
make "${MAKEJOBS}" CFLAGS="-U__DATE__ -U__TIME__"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# Remove non-reproducible .pyc/o files
|
||||
find "${DESTDIR}" -name "*.pyc" -delete
|
||||
find "${DESTDIR}" -name "*.pyo" -delete
|
||||
}
|
||||
72
steps/python-2.3.7/pass2.sh
Executable file
72
steps/python-2.3.7/pass2.sh
Executable file
|
|
@ -0,0 +1,72 @@
|
|||
# SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
src_prepare() {
|
||||
default
|
||||
|
||||
# Remove broken file
|
||||
rm Lib/test/test_pep263.py
|
||||
|
||||
# Delete generated files
|
||||
rm Modules/glmodule.c
|
||||
rm Lib/stringprep.py
|
||||
mv Lib/plat-generic .
|
||||
rm -r Lib/plat-*
|
||||
mv plat-generic Lib/
|
||||
grep generated -r . -l | grep encodings | xargs rm
|
||||
|
||||
# Regenerate unicode
|
||||
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
||||
mv ../UnicodeData-3.2.0.txt UnicodeData.txt
|
||||
mv ../CompositionExclusions-3.2.0.txt CompositionExclusions.txt
|
||||
python Tools/unicode/makeunicodedata.py
|
||||
|
||||
# Regenerate sre_constants.h
|
||||
rm Modules/sre_constants.h
|
||||
python Lib/sre_constants.py
|
||||
|
||||
# Regen ast module
|
||||
rm Lib/compiler/ast.py
|
||||
pushd Tools/compiler
|
||||
python astgen.py > ../../Lib/compiler/ast.py
|
||||
popd
|
||||
|
||||
# Regenerate autoconf
|
||||
autoreconf-2.71 -fi
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
MACHDEP=linux ac_sys_system=Linux \
|
||||
CFLAGS="-U__DATE__ -U__TIME__" \
|
||||
./configure \
|
||||
--prefix="${PREFIX}" \
|
||||
--libdir="${LIBDIR}" \
|
||||
--enable-ipv6
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
# Build pgen
|
||||
make "${MAKEJOBS}" Parser/pgen
|
||||
# Regen graminit.c and graminit.h
|
||||
make "${MAKEJOBS}" Include/graminit.h
|
||||
|
||||
# Regenerate some Python scripts using the other regenerated files
|
||||
# Must move them out to avoid using Lib/ module files which are
|
||||
# incompatible with running version of Python
|
||||
cp Lib/{symbol,keyword,token}.py .
|
||||
python symbol.py
|
||||
python keyword.py
|
||||
python token.py
|
||||
|
||||
# Now build the main program
|
||||
make "${MAKEJOBS}" CFLAGS="-U__DATE__ -U__TIME__"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# Remove non-reproducible .pyc/o files
|
||||
find "${DESTDIR}" -name "*.pyc" -delete
|
||||
find "${DESTDIR}" -name "*.pyo" -delete
|
||||
}
|
||||
33
steps/python-2.3.7/patches/posixmodule.patch
Normal file
33
steps/python-2.3.7/patches/posixmodule.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
SPDX-FileCopyrightText: 2022 fosslinux <fosslinux@aussies.space>
|
||||
|
||||
SPDX-License-Identifier: PSF-2.0
|
||||
|
||||
musl (correctly) implements the POSIX posix_close function, however
|
||||
this was added after Python 2.3.7 was released.
|
||||
|
||||
--- Modules/posixmodule.c 2022-10-05 18:38:46.718131893 +1100
|
||||
+++ Modules/posixmodule.c 2022-10-05 18:39:07.049250312 +1100
|
||||
@@ -5208,12 +5208,12 @@
|
||||
}
|
||||
|
||||
|
||||
-PyDoc_STRVAR(posix_close__doc__,
|
||||
+PyDoc_STRVAR(py_posix_close__doc__,
|
||||
"close(fd)\n\n\
|
||||
Close a file descriptor (for low level IO).");
|
||||
|
||||
static PyObject *
|
||||
-posix_close(PyObject *self, PyObject *args)
|
||||
+py_posix_close(PyObject *self, PyObject *args)
|
||||
{
|
||||
int fd, res;
|
||||
if (!PyArg_ParseTuple(args, "i:close", &fd))
|
||||
@@ -7371,7 +7371,7 @@
|
||||
{"tcsetpgrp", posix_tcsetpgrp, METH_VARARGS, posix_tcsetpgrp__doc__},
|
||||
#endif /* HAVE_TCSETPGRP */
|
||||
{"open", posix_open, METH_VARARGS, posix_open__doc__},
|
||||
- {"close", posix_close, METH_VARARGS, posix_close__doc__},
|
||||
+ {"close", py_posix_close, METH_VARARGS, py_posix_close__doc__},
|
||||
{"dup", posix_dup, METH_VARARGS, posix_dup__doc__},
|
||||
{"dup2", posix_dup2, METH_VARARGS, posix_dup2__doc__},
|
||||
{"lseek", posix_lseek, METH_VARARGS, posix_lseek__doc__},
|
||||
3
steps/python-2.3.7/sources
Normal file
3
steps/python-2.3.7/sources
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
https://www.python.org/ftp/python/2.3.7/Python-2.3.7.tgz 969a9891dce9f50b13e54f9890acaf2be66715a5895bf9b11111f320c205b90e
|
||||
http://ftp.unicode.org/Public/3.2-Update/UnicodeData-3.2.0.txt 5e444028b6e76d96f9dc509609c5e3222bf609056f35e5fcde7e6fb8a58cd446
|
||||
http://ftp.unicode.org/Public/3.2-Update/CompositionExclusions-3.2.0.txt 1d3a450d0f39902710df4972ac4a60ec31fbcb54ffd4d53cd812fc1200c732cb
|
||||
Loading…
Add table
Add a link
Reference in a new issue