Merge pull request #419 from fosslinux/live-system-nochange
Live system nochange
This commit is contained in:
commit
3e2663b3bd
|
@ -159,6 +159,9 @@ def main():
|
||||||
else:
|
else:
|
||||||
args.swap = 0
|
args.swap = 0
|
||||||
|
|
||||||
|
# Set constant umask
|
||||||
|
os.umask(0o022)
|
||||||
|
|
||||||
# bootstrap.cfg
|
# bootstrap.cfg
|
||||||
try:
|
try:
|
||||||
os.remove(os.path.join('steps', 'bootstrap.cfg'))
|
os.remove(os.path.join('steps', 'bootstrap.cfg'))
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
#define MAX_TOKEN 64
|
#define MAX_TOKEN 64
|
||||||
#define MAX_STRING 2048
|
#define MAX_STRING 2048
|
||||||
|
|
||||||
|
#include <bootstrappable.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <bootstrappable.h>
|
|
||||||
|
|
||||||
struct Token {
|
struct Token {
|
||||||
char *val;
|
char *val;
|
||||||
|
@ -22,7 +22,7 @@ typedef struct Token Token;
|
||||||
#define TYPE_IMPROVE 2
|
#define TYPE_IMPROVE 2
|
||||||
#define TYPE_DEFINE 3
|
#define TYPE_DEFINE 3
|
||||||
#define TYPE_JUMP 4
|
#define TYPE_JUMP 4
|
||||||
#define TYPE_MAINT 5
|
#define TYPE_UNINSTALL 5
|
||||||
|
|
||||||
struct Directive {
|
struct Directive {
|
||||||
Token *tok;
|
Token *tok;
|
||||||
|
@ -212,12 +212,12 @@ Token *fill(Token *tok, Directive *directive, int type) {
|
||||||
|
|
||||||
Token *logic(Token *tok, char **val) {
|
Token *logic(Token *tok, char **val) {
|
||||||
/* logic = "("
|
/* logic = "("
|
||||||
* (name |
|
* (name |
|
||||||
* (name "==" value) |
|
* (name "==" value) |
|
||||||
* (name "!=" value) |
|
* (name "!=" value) |
|
||||||
* (logic "||" logic) |
|
* (logic "||" logic) |
|
||||||
* (logic "&&" logic))
|
* (logic "&&" logic))
|
||||||
* ")"
|
* ")"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
char *lhs = tok->val;
|
char *lhs = tok->val;
|
||||||
|
@ -237,15 +237,15 @@ Token *logic(Token *tok, char **val) {
|
||||||
lhs = "False";
|
lhs = "False";
|
||||||
}
|
}
|
||||||
} else if (strcmp(tok->val, "!=") == 0) {
|
} else if (strcmp(tok->val, "!=") == 0) {
|
||||||
/* Case for inequality. */
|
/* Case for inequality. */
|
||||||
rhs = tok->next->val;
|
rhs = tok->next->val;
|
||||||
tok = tok->next->next;
|
tok = tok->next->next;
|
||||||
if (strcmp(get_var(lhs), rhs) == 0) {
|
if (strcmp(get_var(lhs), rhs) == 0) {
|
||||||
lhs = "False";
|
lhs = "False";
|
||||||
} else {
|
} else {
|
||||||
lhs = "True";
|
lhs = "True";
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fputs("Expected == or != after ", stderr);
|
fputs("Expected == or != after ", stderr);
|
||||||
fputs(lhs, stderr);
|
fputs(lhs, stderr);
|
||||||
fputs(" in logic\n", stderr);
|
fputs(" in logic\n", stderr);
|
||||||
|
@ -360,7 +360,7 @@ Token *define(Token *tok, Directive *directive) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int interpret(Directive *directive) {
|
int interpret(Directive *directive) {
|
||||||
/* directive = (build | improve | define | jump | maint) predicate? */
|
/* directive = (build | improve | define | jump | uninstall) predicate? */
|
||||||
Token *tok = directive->tok;
|
Token *tok = directive->tok;
|
||||||
if (strcmp(tok->val, "build:") == 0) {
|
if (strcmp(tok->val, "build:") == 0) {
|
||||||
tok = fill(tok->next, directive, TYPE_BUILD);
|
tok = fill(tok->next, directive, TYPE_BUILD);
|
||||||
|
@ -368,11 +368,23 @@ int interpret(Directive *directive) {
|
||||||
tok = fill(tok->next, directive, TYPE_IMPROVE);
|
tok = fill(tok->next, directive, TYPE_IMPROVE);
|
||||||
} else if (strcmp(tok->val, "jump:") == 0) {
|
} else if (strcmp(tok->val, "jump:") == 0) {
|
||||||
tok = fill(tok->next, directive, TYPE_JUMP);
|
tok = fill(tok->next, directive, TYPE_JUMP);
|
||||||
} else if (strcmp(tok->val, "maint:") == 0) {
|
|
||||||
tok = fill(tok->next, directive, TYPE_MAINT);
|
|
||||||
} else if (strcmp(tok->val, "define:") == 0) {
|
} else if (strcmp(tok->val, "define:") == 0) {
|
||||||
tok = define(tok->next, directive);
|
tok = define(tok->next, directive);
|
||||||
return 1; /* There is no codegen for a define. */
|
return 1; /* There is no codegen for a define. */
|
||||||
|
} else if (strcmp(tok->val, "uninstall:") == 0) {
|
||||||
|
tok = fill(tok->next, directive, TYPE_UNINSTALL);
|
||||||
|
while (tok != NULL) {
|
||||||
|
if (strcmp(tok->val, "(") == 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (strlen(directive->arg) + strlen(tok->val) + 1 > MAX_STRING) {
|
||||||
|
fputs("somehow you have managed to have too many uninstall arguments.\n", stderr);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
directive->arg = strcat(directive->arg, " ");
|
||||||
|
directive->arg = strcat(directive->arg, tok->val);
|
||||||
|
tok = tok->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tok != NULL) {
|
if (tok != NULL) {
|
||||||
|
@ -620,8 +632,10 @@ void generate(Directive *directives) {
|
||||||
fclose(out);
|
fclose(out);
|
||||||
out = start_script(counter, bash_build);
|
out = start_script(counter, bash_build);
|
||||||
counter += 1;
|
counter += 1;
|
||||||
} else if (directive->type == TYPE_MAINT) {
|
} else if (directive->type == TYPE_UNINSTALL) {
|
||||||
output_call_script(out, "maint", directive->arg, bash_build, 1);
|
fputs("uninstall ", out);
|
||||||
|
fputs(directive->arg, out);
|
||||||
|
fputs("\n", out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fclose(out);
|
fclose(out);
|
||||||
|
|
|
@ -87,20 +87,20 @@ c490016e49bbf77e7f63071f7aa60e8290a0c67f017846def1c3f65bd10d5712 openssl-1.1.1l
|
||||||
71864d042cdc564b65eab21360902c714e9b43f80a19689c5600589529b267e7 patch-2.7.6_0.tar.bz2
|
71864d042cdc564b65eab21360902c714e9b43f80a19689c5600589529b267e7 patch-2.7.6_0.tar.bz2
|
||||||
5ae7fe43d62d1064c123d9813017015e5e8d5107d0e70f0199576141416ff81d perl-5.000_0.tar.bz2
|
5ae7fe43d62d1064c123d9813017015e5e8d5107d0e70f0199576141416ff81d perl-5.000_0.tar.bz2
|
||||||
4994c55e3832649600f190079bd4779c463478a092b167098b1d00eff3358fbe perl-5.003_0.tar.bz2
|
4994c55e3832649600f190079bd4779c463478a092b167098b1d00eff3358fbe perl-5.003_0.tar.bz2
|
||||||
74d64a8af080022432fa94dba449090419d25b103d247710dc0b6102a4ad86a6 perl-5.10.1_0.tar.bz2
|
|
||||||
fdccd3ba27a44d2149f159040414a04b39bfc72673ba36f50051b61199cc425c perl-5.32.1_0.tar.bz2
|
|
||||||
101a791b6843b997ec10d5ce6dc32af2637f687772674eb6f1cdc1c8ff836a03 perl-5.6.2_0.tar.bz2
|
|
||||||
ae6c84e55c2d9bcd7b80bf780ae6921fe890608123c9ba904e1b7d90759ade3d perl5.004-05_0.tar.bz2
|
ae6c84e55c2d9bcd7b80bf780ae6921fe890608123c9ba904e1b7d90759ade3d perl5.004-05_0.tar.bz2
|
||||||
8cedd2240bbbd5bca65a1362998ed73884756aa7ff5208226d3fa22c68868052 perl5.005-03_0.tar.bz2
|
8cedd2240bbbd5bca65a1362998ed73884756aa7ff5208226d3fa22c68868052 perl5.005-03_0.tar.bz2
|
||||||
|
74d64a8af080022432fa94dba449090419d25b103d247710dc0b6102a4ad86a6 perl-5.10.1_0.tar.bz2
|
||||||
|
71ad3cadba5801cb19d4520825d4b3606713807b1eaa5eb3c49b3149bc2675ad perl-5.32.1_0.tar.bz2
|
||||||
|
101a791b6843b997ec10d5ce6dc32af2637f687772674eb6f1cdc1c8ff836a03 perl-5.6.2_0.tar.bz2
|
||||||
1b9d4260edf7b2241d10e4c4ad17d0f90047bd4bf42f2487a7133902529e9dfe pkg-config-0.29.2_0.tar.bz2
|
1b9d4260edf7b2241d10e4c4ad17d0f90047bd4bf42f2487a7133902529e9dfe pkg-config-0.29.2_0.tar.bz2
|
||||||
1e882c3206f9d1de2a9be8b5c6ae4cc65e80a4de607bd521058577bf4169c0e9 python-2.0.1_0.tar.bz2
|
2f7198009e4d021d52ee4ce86241b4936fb88349c20cc8b6c286261368878c3c python-2.0.1_0.tar.bz2
|
||||||
aba9710341db75b78c7bc1eb4ef45b9496e23f7a356128af6c2b116ee0f3f31a python-2.0.1_1.tar.bz2
|
b5d86ddc98cfbc684b03f1c84c786caaad810d5e4c7be38089f324eb3c276ad9 python-2.0.1_1.tar.bz2
|
||||||
d497c9b614194b941620bb5c5111fc72eca8cafd7d4f476eacb24fb7f909b614 python-2.3.7_0.tar.bz2
|
396577cdd0cc61d76420a1771c64156e49e8f9d00430c82feb88ad933b341632 python-2.3.7_0.tar.bz2
|
||||||
8a977205933431c2a4207f647cb683b570dfdb0146e21abf5fab3f8426e1356b python-2.3.7_1.tar.bz2
|
2499cb7f10f292c3506fbf1b6a876195179ec98edfe7b8c357140137a1449492 python-2.3.7_1.tar.bz2
|
||||||
34e5083ed3e72da5aa5950acebf9e95464089d693e3d6a047a2b69b6103f5ca9 python-2.5.6_0.tar.bz2
|
2dd06364e281da421a16251fa2258df201efd180461718f5a000012c4b2bdfe5 python-2.5.6_0.tar.bz2
|
||||||
|
52ffb1ea6f2b893a6fd26f930c8ff63f78ddcc31ac3ec9c2ddade555205aa1ef python-3.11.1_0.tar.bz2
|
||||||
3508248f299b73c50e3607c4c294d40face05170476a5026b0821aed69025863 python-3.1.5_0.tar.bz2
|
3508248f299b73c50e3607c4c294d40face05170476a5026b0821aed69025863 python-3.1.5_0.tar.bz2
|
||||||
12b1ffc7ec98ba8f807160b93ba69a694d5395567c3bcac1e49e8f8d1d50de43 python-3.1.5_1.tar.bz2
|
12b1ffc7ec98ba8f807160b93ba69a694d5395567c3bcac1e49e8f8d1d50de43 python-3.1.5_1.tar.bz2
|
||||||
52ffb1ea6f2b893a6fd26f930c8ff63f78ddcc31ac3ec9c2ddade555205aa1ef python-3.11.1_0.tar.bz2
|
|
||||||
60b93253a2078f849f81e7e1ed6233e30702f03b1893640eee95671d814f5514 python-3.3.7_0.tar.bz2
|
60b93253a2078f849f81e7e1ed6233e30702f03b1893640eee95671d814f5514 python-3.3.7_0.tar.bz2
|
||||||
da7c8ec579dd225c0d8bee63d95aeeb27ac2d5a60d4eefe298508cbf86bf506c python-3.4.10_0.tar.bz2
|
da7c8ec579dd225c0d8bee63d95aeeb27ac2d5a60d4eefe298508cbf86bf506c python-3.4.10_0.tar.bz2
|
||||||
0be505f63205b4bc1b1421896c610468ad1a2194bbc4c9abf58f61685c2023d1 python-3.8.16_0.tar.bz2
|
0be505f63205b4bc1b1421896c610468ad1a2194bbc4c9abf58f61685c2023d1 python-3.8.16_0.tar.bz2
|
||||||
|
|
|
@ -47,10 +47,7 @@ make
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
install bash ${PREFIX}/bin/
|
install bash ${PREFIX}/bin/
|
||||||
mkdir /bin/
|
install bash ${PREFIX}/bin/sh
|
||||||
ln -s ${PREFIX}/bin/bash /bin/bash
|
|
||||||
ln -s ${PREFIX}/bin/bash /bin/sh
|
|
||||||
ln -s ${PREFIX}/bin/bash ${PREFIX}/bin/sh
|
|
||||||
|
|
||||||
cd ../..
|
cd ../..
|
||||||
|
|
||||||
|
|
|
@ -53,9 +53,5 @@ src_compile() {
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
|
install -D bash "${DESTDIR}${PREFIX}/bin/bash"
|
||||||
# Work around weird symlink bug
|
|
||||||
install bash "${DESTDIR}${PREFIX}/bin/sh"
|
install bash "${DESTDIR}${PREFIX}/bin/sh"
|
||||||
|
|
||||||
# Needs special handling b/c is currently running - tar doesn't like this
|
|
||||||
rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,3 @@ src_prepare() {
|
||||||
|
|
||||||
cp "${mk_dir}/pass2.mk" Makefile
|
cp "${mk_dir}/pass2.mk" Makefile
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
|
||||||
default
|
|
||||||
|
|
||||||
# perl later requires /bin/pwd
|
|
||||||
ln -s "${PREFIX}/bin/pwd" /bin/pwd
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,14 +14,3 @@ src_prepare() {
|
||||||
src_compile() {
|
src_compile() {
|
||||||
make -j1 PREFIX="${PREFIX}"
|
make -j1 PREFIX="${PREFIX}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
|
||||||
if test -d /lex; then
|
|
||||||
# Remove lex, later make install will symlink lex to flex
|
|
||||||
rm -rf /lex
|
|
||||||
rm -f "${PREFIX}/bin/lex"
|
|
||||||
rm -f "${PREFIX}/lib/mes/libl.a"
|
|
||||||
fi
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
|
@ -20,7 +20,4 @@ src_install() {
|
||||||
cd src
|
cd src
|
||||||
default
|
default
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# Remove yacc, we won't need it any longer
|
|
||||||
rm "${PREFIX}/bin/yacc"
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,6 +7,9 @@
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
# Set constant umask
|
||||||
|
umask 022
|
||||||
|
|
||||||
# Get a list of files
|
# Get a list of files
|
||||||
get_files() {
|
get_files() {
|
||||||
echo "."
|
echo "."
|
||||||
|
@ -79,9 +82,11 @@ _grep() {
|
||||||
|
|
||||||
get_revision() {
|
get_revision() {
|
||||||
local pkg=$1
|
local pkg=$1
|
||||||
|
local oldpwd="${PWD}"
|
||||||
cd "/external/repo"
|
cd "/external/repo"
|
||||||
# Get revision (n time this package has been built)
|
# Get revision (n time this package has been built)
|
||||||
revision=$( (ls -1 "${pkg}"* 2>/dev/null || true) | wc -l | sed 's/ *//g')
|
revision=$( (ls -1 "${pkg}"* 2>/dev/null || true) | wc -l | sed 's/ *//g')
|
||||||
|
cd "${oldpwd}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Installs binary packages from an earlier run
|
# Installs binary packages from an earlier run
|
||||||
|
@ -93,11 +98,6 @@ bin_preseed() {
|
||||||
if [ "${UPDATE_CHECKSUMS}" = "True" ] || src_checksum "${pkg}" $((revision)); then
|
if [ "${UPDATE_CHECKSUMS}" = "True" ] || src_checksum "${pkg}" $((revision)); then
|
||||||
echo "${pkg}: installing prebuilt package."
|
echo "${pkg}: installing prebuilt package."
|
||||||
mv "${pkg}_${revision}"* /external/repo || return 1
|
mv "${pkg}_${revision}"* /external/repo || return 1
|
||||||
if [[ "${pkg}" == bash-* ]]; then
|
|
||||||
# tar does not like overwriting running bash
|
|
||||||
# shellcheck disable=SC2153
|
|
||||||
rm -f "${PREFIX}/bin/bash" "${PREFIX}/bin/sh"
|
|
||||||
fi
|
|
||||||
cd "/external/repo"
|
cd "/external/repo"
|
||||||
rm -f /tmp/filelist.txt
|
rm -f /tmp/filelist.txt
|
||||||
src_apply "${pkg}" $((revision))
|
src_apply "${pkg}" $((revision))
|
||||||
|
@ -108,6 +108,65 @@ bin_preseed() {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Removes either an existing package or file
|
||||||
|
uninstall() {
|
||||||
|
local in_fs in_pkg symlinks
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
removing="$1"
|
||||||
|
case "${removing}" in
|
||||||
|
/*)
|
||||||
|
# Removing a file
|
||||||
|
echo "removing file: ${removing}."
|
||||||
|
rm -f "${removing}"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "${removing}: uninstalling."
|
||||||
|
local oldpwd="${PWD}"
|
||||||
|
mkdir -p "/tmp/removing"
|
||||||
|
cd "/tmp/removing"
|
||||||
|
get_revision "${removing}"
|
||||||
|
local filename="/external/repo/${removing}_$((revision-1)).tar.bz2"
|
||||||
|
# Initial bzip2 built against meslibc has broken pipes
|
||||||
|
bzip2 -dc "${filename}" | tar -xf -
|
||||||
|
# reverse to have files before directories
|
||||||
|
if command -v find >/dev/null 2>&1; then
|
||||||
|
find . | sort -r > ../filelist
|
||||||
|
else
|
||||||
|
get_files . | tac > ../filelist
|
||||||
|
fi
|
||||||
|
# shellcheck disable=SC2162
|
||||||
|
while read file; do
|
||||||
|
if [ -d "${file}" ]; then
|
||||||
|
if [ -z "$(ls -A "/${file}")" ]; then
|
||||||
|
rmdir "/${file}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
# in some cases we might be uninstalling a file that has already been overwritten
|
||||||
|
# in this case we don't want to remove it
|
||||||
|
in_fs="$(sha256sum "${file}" 2>/dev/null | cut -d' ' -f1)"
|
||||||
|
in_pkg="$(sha256sum "/${file}" 2>/dev/null | cut -d' ' -f1)"
|
||||||
|
if [ "${in_fs}" = "${in_pkg}" ]; then
|
||||||
|
rm -f "/${file}"
|
||||||
|
fi
|
||||||
|
if [ -h "${file}" ]; then
|
||||||
|
symlinks="${symlinks} ${file}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done < ../filelist
|
||||||
|
rm -f ../filelist
|
||||||
|
for link in ${symlinks}; do
|
||||||
|
if [ ! -e "/${link}" ]; then
|
||||||
|
rm -f "/${link}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
cd "${oldpwd}"
|
||||||
|
rm -rf "/tmp/removing"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Common build steps
|
# Common build steps
|
||||||
# Build function provides a few common stages with default implementation
|
# Build function provides a few common stages with default implementation
|
||||||
# that can be overridden on per package basis in the build script.
|
# that can be overridden on per package basis in the build script.
|
||||||
|
@ -169,6 +228,7 @@ build() {
|
||||||
call $build_stage
|
call $build_stage
|
||||||
|
|
||||||
echo "${pkg}: install to fakeroot."
|
echo "${pkg}: install to fakeroot."
|
||||||
|
mkdir -p "${DESTDIR}"
|
||||||
build_stage=src_install
|
build_stage=src_install
|
||||||
call $build_stage
|
call $build_stage
|
||||||
|
|
||||||
|
@ -185,7 +245,6 @@ build() {
|
||||||
echo "${pkg}: cleaning up."
|
echo "${pkg}: cleaning up."
|
||||||
rm -rf "${SRCDIR}/${pkg}/build"
|
rm -rf "${SRCDIR}/${pkg}/build"
|
||||||
rm -rf "${DESTDIR}"
|
rm -rf "${DESTDIR}"
|
||||||
mkdir -p "${DESTDIR}"
|
|
||||||
|
|
||||||
echo "${pkg}: installing package."
|
echo "${pkg}: installing package."
|
||||||
src_apply "${pkg}" "${revision}"
|
src_apply "${pkg}" "${revision}"
|
||||||
|
@ -236,6 +295,7 @@ extract_file() {
|
||||||
*)
|
*)
|
||||||
case "${f}" in
|
case "${f}" in
|
||||||
*.tar* | *.tgz)
|
*.tar* | *.tgz)
|
||||||
|
# shellcheck disable=SC2153
|
||||||
if test -e "${PREFIX}/libexec/rmt"; then
|
if test -e "${PREFIX}/libexec/rmt"; then
|
||||||
# Again, we want to split out into words.
|
# Again, we want to split out into words.
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
|
@ -410,6 +470,11 @@ src_apply() {
|
||||||
TAR_PREFIX="/tmp/"
|
TAR_PREFIX="/tmp/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Bash does not like to be overwritten
|
||||||
|
if [[ "${pkg}" == bash-* ]]; then
|
||||||
|
rm "${PREFIX}/bin/bash"
|
||||||
|
fi
|
||||||
|
|
||||||
# Overwriting files is mega busted, so do it manually
|
# Overwriting files is mega busted, so do it manually
|
||||||
# shellcheck disable=SC2162
|
# shellcheck disable=SC2162
|
||||||
if [ -e /tmp/filelist.txt ]; then
|
if [ -e /tmp/filelist.txt ]; then
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# SPDX-FileCopyrightText: 2023 Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>
|
# SPDX-FileCopyrightText: 2023 Eduardo Sánchez Muñoz <eduardosm-dev@e64.io>
|
||||||
|
# SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
@ -37,6 +38,11 @@ for source in "${DISTFILES}/"*; do
|
||||||
rm "${source}"
|
rm "${source}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -e "/external/repo-preseeded/linux-4.9.10_0.tar.bz2" ]; then
|
||||||
|
# This is done in src_extract out of necessity usually -- I can't think of a better solution :(
|
||||||
|
rm -f "${DISTFILES}/linux-4.9.10.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
unset get_source_filename
|
unset get_source_filename
|
||||||
unset pkgs pkg line
|
unset pkgs pkg line
|
||||||
unset keep_sources keep_source
|
unset keep_sources keep_source
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
rm -rf /external/repo-preseeded
|
||||||
|
rm -rf /steps/*/build
|
||||||
|
rm -rf /steps/*/src
|
|
@ -3,13 +3,6 @@
|
||||||
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
#
|
|
||||||
# Add the rest of the FHS that we will use and is not created pre-boot
|
|
||||||
rm -rf /sbin /usr/sbin
|
|
||||||
ln -s /usr/bin /usr/sbin
|
|
||||||
for d in bin lib sbin; do
|
|
||||||
ln -s "/usr/${d}" "/${d}" || true # these might exist if rerunning
|
|
||||||
done
|
|
||||||
|
|
||||||
mkdir -p /etc /run /var/log /var/lock /var/spool /var/tmp /var/cache
|
mkdir -p /etc /run /var/log /var/lock /var/spool /var/tmp /var/cache
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
#
|
||||||
|
# Add the rest of the FHS that we will use and is not created pre-boot
|
||||||
|
ln -s bin /usr/sbin
|
||||||
|
for d in bin lib sbin; do
|
||||||
|
ln -s "usr/${d}" "/${d}" || true # these might exist if rerunning
|
||||||
|
done
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
src_unpack() {
|
src_unpack() {
|
||||||
mkdir "${pkg}"
|
mkdir "${pkg}"
|
||||||
mv "${DISTFILES}/deblob-4.9" "${pkg}/"
|
cp "${DISTFILES}/deblob-4.9" "${pkg}/"
|
||||||
default || true # Predictable link errors - not a problem
|
default || true # Predictable link errors - not a problem
|
||||||
rm "${DISTFILES}/${pkg}.tar.gz"
|
rm "${DISTFILES}/${pkg}.tar.gz"
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,9 @@
|
||||||
# eg, define: BUILD_FIWIX = KERNEL_BOOTSTRAP == True || BUILD_KERNELS == True
|
# eg, define: BUILD_FIWIX = KERNEL_BOOTSTRAP == True || BUILD_KERNELS == True
|
||||||
# - jump: jump (usually) to a new kernel, executes a script with that name
|
# - jump: jump (usually) to a new kernel, executes a script with that name
|
||||||
# eg, jump: fiwix
|
# eg, jump: fiwix
|
||||||
|
# - uninstall; removes a package or filenames
|
||||||
|
# eg, uninstall: perl-5.6.2
|
||||||
|
# eg, uninstall: /usr/bin/lex /usr/bin/flex
|
||||||
#
|
#
|
||||||
# The following directives have special significance:
|
# The following directives have special significance:
|
||||||
# - build directives beginning with "bash" (as well as jumps) trigger the generation of
|
# - build directives beginning with "bash" (as well as jumps) trigger the generation of
|
||||||
|
@ -50,6 +53,7 @@ build: heirloom-devtools-070527
|
||||||
build: bash-2.05b
|
build: bash-2.05b
|
||||||
improve: setup_repo
|
improve: setup_repo
|
||||||
improve: update_env
|
improve: update_env
|
||||||
|
improve: merged_usr
|
||||||
build: flex-2.5.11
|
build: flex-2.5.11
|
||||||
build: tcc-0.9.27
|
build: tcc-0.9.27
|
||||||
improve: musl_libdir
|
improve: musl_libdir
|
||||||
|
@ -61,6 +65,7 @@ build: sed-4.0.9
|
||||||
build: bzip2-1.0.8
|
build: bzip2-1.0.8
|
||||||
build: m4-1.4.7
|
build: m4-1.4.7
|
||||||
build: flex-2.6.4
|
build: flex-2.6.4
|
||||||
|
uninstall: /usr/bin/yacc
|
||||||
build: bison-3.4.1
|
build: bison-3.4.1
|
||||||
build: bison-3.4.1
|
build: bison-3.4.1
|
||||||
build: bison-3.4.1
|
build: bison-3.4.1
|
||||||
|
@ -74,6 +79,7 @@ build: perl-5.003
|
||||||
build: perl5.004-05
|
build: perl5.004-05
|
||||||
build: perl5.005-03
|
build: perl5.005-03
|
||||||
build: perl-5.6.2
|
build: perl-5.6.2
|
||||||
|
uninstall: perl-5.000 perl-5.003 perl5.004-05 perl5.005-03
|
||||||
improve: populate_device_nodes
|
improve: populate_device_nodes
|
||||||
build: autoconf-2.52
|
build: autoconf-2.52
|
||||||
build: automake-1.6.3
|
build: automake-1.6.3
|
||||||
|
@ -144,6 +150,7 @@ build: bison-3.4.2
|
||||||
build: perl-5.10.1
|
build: perl-5.10.1
|
||||||
build: dist-3.5-236
|
build: dist-3.5-236
|
||||||
build: perl-5.32.1
|
build: perl-5.32.1
|
||||||
|
uninstall: perl-5.6.2 perl-5.10.1
|
||||||
build: libarchive-3.5.2
|
build: libarchive-3.5.2
|
||||||
build: openssl-1.1.1l
|
build: openssl-1.1.1l
|
||||||
build: ca-certificates-3.95
|
build: ca-certificates-3.95
|
||||||
|
@ -178,10 +185,12 @@ build: python-3.3.7
|
||||||
build: python-3.4.10
|
build: python-3.4.10
|
||||||
build: python-3.8.16
|
build: python-3.8.16
|
||||||
build: python-3.11.1
|
build: python-3.11.1
|
||||||
|
uninstall: python-2.0.1 python-2.3.7 python-3.1.5 python-3.3.7 python-3.4.10 python-3.8.16
|
||||||
jump: break ( INTERNAL_CI == pass1 ) # scripts are generated in pass1
|
jump: break ( INTERNAL_CI == pass1 ) # scripts are generated in pass1
|
||||||
build: gcc-10.4.0
|
build: gcc-10.4.0
|
||||||
build: binutils-2.41
|
build: binutils-2.41
|
||||||
build: gcc-13.1.0
|
build: gcc-13.1.0
|
||||||
|
improve: cleanup_filesystem
|
||||||
improve: null_time ( FORCE_TIMESTAMPS == True )
|
improve: null_time ( FORCE_TIMESTAMPS == True )
|
||||||
improve: update_checksums ( UPDATE_CHECKSUMS == True )
|
improve: update_checksums ( UPDATE_CHECKSUMS == True )
|
||||||
improve: after
|
improve: after
|
||||||
|
|
|
@ -28,6 +28,5 @@ src_compile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
rm -rf "${PREFIX}/include"
|
|
||||||
make PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" install
|
make PREFIX="${PREFIX}" DESTDIR="${DESTDIR}" install
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,10 +28,3 @@ src_prepare() {
|
||||||
mv ext/Digest-SHA ext/Digest/SHA
|
mv ext/Digest-SHA ext/Digest/SHA
|
||||||
mv ext/Data-Dumper ext/Data/Dumper
|
mv ext/Data-Dumper ext/Data/Dumper
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# Remove old perl
|
|
||||||
rm -rf "${PREFIX}"/lib/perl5/
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
|
@ -42,9 +42,6 @@ src_configure() {
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
# Remove old perl
|
|
||||||
rm -rf "${PREFIX}"/lib/perl5/
|
|
||||||
|
|
||||||
default
|
default
|
||||||
|
|
||||||
# Remove messed up manpages
|
# Remove messed up manpages
|
||||||
|
|
|
@ -37,10 +37,3 @@ src_prepare() {
|
||||||
src_compile() {
|
src_compile() {
|
||||||
make -j1 PREFIX="${PREFIX}"
|
make -j1 PREFIX="${PREFIX}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# Remove old perl
|
|
||||||
rm -rf "${PREFIX}"/lib/perl5/
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
|
@ -18,10 +18,3 @@ src_prepare() {
|
||||||
perl ${file}.pl
|
perl ${file}.pl
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# Remove old perl
|
|
||||||
rm -rf "${PREFIX}"/lib/perl5/
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
|
@ -22,10 +22,3 @@ src_prepare() {
|
||||||
rm -f fbyterun.h byterun.c
|
rm -f fbyterun.h byterun.c
|
||||||
perl bytecode.pl
|
perl bytecode.pl
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
|
||||||
# Remove old perl
|
|
||||||
rm -rf "${PREFIX}"/lib/perl5/
|
|
||||||
|
|
||||||
default
|
|
||||||
}
|
|
||||||
|
|
|
@ -204,3 +204,18 @@ Python 2.0 does not support DESTDIR, so add it in.
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@@ -249,10 +249,10 @@
|
||||||
|
$(DESTSHARED):
|
||||||
|
@for i in $(DESTDIRS); \
|
||||||
|
do \
|
||||||
|
- if test ! -d $$i; then \
|
||||||
|
- echo "Creating directory $$i"; \
|
||||||
|
- mkdir $$i; \
|
||||||
|
- chmod 755 $$i; \
|
||||||
|
+ if test ! -d $(DESTDIR)$$i; then \
|
||||||
|
+ echo "Creating directory $(DESTDIR)$$i"; \
|
||||||
|
+ mkdir $(DESTDIR)$$i; \
|
||||||
|
+ chmod 755 $(DESTDIR)$$i; \
|
||||||
|
else true; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
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
|
||||||
|
@@ -41,6 +41,7 @@
|
||||||
|
directories).
|
||||||
|
|
||||||
|
"""
|
||||||
|
+ return
|
||||||
|
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
|
||||||
|
@@ -672,6 +672,7 @@
|
||||||
|
static void
|
||||||
|
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
|
||||||
|
{
|
||||||
|
+ return;
|
||||||
|
FILE *fp;
|
||||||
|
|
||||||
|
fp = open_exclusive(cpathname);
|
|
@ -0,0 +1,25 @@
|
||||||
|
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: PSF-2.0
|
||||||
|
|
||||||
|
Disable creation of pyc files.
|
||||||
|
--- Lib/py_compile.py 2024-01-22 11:28:44.333395804 +1100
|
||||||
|
+++ Lib/py_compile.py 2024-01-22 11:28:53.703636809 +1100
|
||||||
|
@@ -112,6 +112,7 @@
|
||||||
|
directories).
|
||||||
|
|
||||||
|
"""
|
||||||
|
+ return
|
||||||
|
f = open(file, 'U')
|
||||||
|
try:
|
||||||
|
timestamp = long(os.fstat(f.fileno()).st_mtime)
|
||||||
|
--- Python/import.c 2024-01-22 12:24:05.300236204 +1100
|
||||||
|
+++ Python/import.c 2024-01-22 12:24:36.513082356 +1100
|
||||||
|
@@ -807,6 +807,7 @@
|
||||||
|
static void
|
||||||
|
write_compiled_module(PyCodeObject *co, char *cpathname, long mtime)
|
||||||
|
{
|
||||||
|
+ return;
|
||||||
|
FILE *fp;
|
||||||
|
|
||||||
|
fp = open_exclusive(cpathname);
|
|
@ -0,0 +1,26 @@
|
||||||
|
SPDX-FileCopyrightText: 2024 fosslinux <fosslinux@aussies.space>
|
||||||
|
|
||||||
|
SPDX-License-Identifier: PSF-2.0
|
||||||
|
|
||||||
|
Disable creation of pyc files.
|
||||||
|
|
||||||
|
--- Lib/py_compile.py 2024-01-22 11:28:44.333395804 +1100
|
||||||
|
+++ Lib/py_compile.py 2024-01-22 11:28:53.703636809 +1100
|
||||||
|
@@ -112,6 +112,7 @@
|
||||||
|
directories).
|
||||||
|
|
||||||
|
"""
|
||||||
|
+ return
|
||||||
|
f = open(file, 'U')
|
||||||
|
try:
|
||||||
|
timestamp = long(os.fstat(f.fileno()).st_mtime)
|
||||||
|
--- Python/import.c 2024-01-22 12:24:59.390701654 +1100
|
||||||
|
+++ Python/import.c 2024-01-22 12:25:18.643222249 +1100
|
||||||
|
@@ -869,6 +869,7 @@
|
||||||
|
static void
|
||||||
|
write_compiled_module(PyCodeObject *co, char *cpathname, time_t mtime)
|
||||||
|
{
|
||||||
|
+ return;
|
||||||
|
FILE *fp;
|
||||||
|
|
||||||
|
fp = open_exclusive(cpathname);
|
|
@ -20,7 +20,7 @@ src_prepare() {
|
||||||
mkdir Tools/unicode/in Tools/unicode/out
|
mkdir Tools/unicode/in Tools/unicode/out
|
||||||
mv ../CP437.TXT Tools/unicode/in/
|
mv ../CP437.TXT Tools/unicode/in/
|
||||||
pushd Tools/unicode
|
pushd Tools/unicode
|
||||||
python gencodec.py in/ ../../Lib/encodings/
|
python -B gencodec.py in/ ../../Lib/encodings/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Regenerate unicode
|
# Regenerate unicode
|
||||||
|
@ -29,7 +29,7 @@ src_prepare() {
|
||||||
mv "../${f}-3.2.0.txt" .
|
mv "../${f}-3.2.0.txt" .
|
||||||
mv "../${f}-5.1.0.txt" "${f}.txt"
|
mv "../${f}-5.1.0.txt" "${f}.txt"
|
||||||
done
|
done
|
||||||
python Tools/unicode/makeunicodedata.py
|
python -B Tools/unicode/makeunicodedata.py
|
||||||
|
|
||||||
# Regenerate sre_constants.h
|
# Regenerate sre_constants.h
|
||||||
rm Modules/sre_constants.h
|
rm Modules/sre_constants.h
|
||||||
|
@ -57,22 +57,22 @@ src_compile() {
|
||||||
# Temporarily break include cycle
|
# Temporarily break include cycle
|
||||||
patch -Np0 -i graminit-regen.patch
|
patch -Np0 -i graminit-regen.patch
|
||||||
# Build pgen
|
# Build pgen
|
||||||
make "${MAKEJOBS}" Parser/pgen
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" Parser/pgen
|
||||||
# Regen graminit.c and graminit.h
|
# Regen graminit.c and graminit.h
|
||||||
make "${MAKEJOBS}" Include/graminit.h
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" Include/graminit.h
|
||||||
|
|
||||||
# Regenerate some Python scripts using the other regenerated files
|
# Regenerate some Python scripts using the other regenerated files
|
||||||
# Must move them out to avoid using Lib/ module files which are
|
# Must move them out to avoid using Lib/ module files which are
|
||||||
# incompatible with running version of Python
|
# incompatible with running version of Python
|
||||||
cp Lib/{symbol,keyword,token}.py .
|
cp Lib/{symbol,keyword,token}.py .
|
||||||
python symbol.py
|
python -B symbol.py
|
||||||
python keyword.py
|
python -B keyword.py
|
||||||
python token.py
|
python -B token.py
|
||||||
|
|
||||||
# Undo change
|
# Undo change
|
||||||
patch -Np0 -R -i graminit-regen.patch
|
patch -Np0 -R -i graminit-regen.patch
|
||||||
# Now build the main program
|
# Now build the main program
|
||||||
make "${MAKEJOBS}" CFLAGS="-U__DATE__ -U__TIME__"
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" CFLAGS="-U__DATE__ -U__TIME__"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
|
@ -11,7 +11,7 @@ src_prepare() {
|
||||||
|
|
||||||
# Regenerate ssl_data for ssl module
|
# Regenerate ssl_data for ssl module
|
||||||
rm Modules/_ssl_data_300.h Modules/_ssl_data.h
|
rm Modules/_ssl_data_300.h Modules/_ssl_data.h
|
||||||
python Tools/ssl/make_ssl_data.py ../openssl-1.1.1l Modules/_ssl_data_111.h
|
python -B Tools/ssl/make_ssl_data.py ../openssl-1.1.1l Modules/_ssl_data_111.h
|
||||||
sed -i 's#$(srcdir)/Modules/_ssl_data.h ##' Makefile.pre.in
|
sed -i 's#$(srcdir)/Modules/_ssl_data.h ##' Makefile.pre.in
|
||||||
sed -i 's#$(srcdir)/Modules/_ssl_data_300.h ##' Makefile.pre.in
|
sed -i 's#$(srcdir)/Modules/_ssl_data_300.h ##' Makefile.pre.in
|
||||||
|
|
||||||
|
@ -20,27 +20,27 @@ src_prepare() {
|
||||||
mkdir Tools/unicode/in Tools/unicode/out
|
mkdir Tools/unicode/in Tools/unicode/out
|
||||||
mv ../CP437.TXT Tools/unicode/in/
|
mv ../CP437.TXT Tools/unicode/in/
|
||||||
pushd Tools/unicode
|
pushd Tools/unicode
|
||||||
python gencodec.py in/ ../../Lib/encodings/
|
python -B gencodec.py in/ ../../Lib/encodings/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Regenerate stringprep
|
# Regenerate stringprep
|
||||||
rm Lib/stringprep.py
|
rm Lib/stringprep.py
|
||||||
mv ../rfc3454.txt .
|
mv ../rfc3454.txt .
|
||||||
python Tools/unicode/mkstringprep.py > Lib/stringprep.py
|
python -B Tools/unicode/mkstringprep.py > Lib/stringprep.py
|
||||||
|
|
||||||
# Regenerate unicode
|
# Regenerate unicode
|
||||||
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
||||||
mkdir -p Tools/unicode/data
|
mkdir -p Tools/unicode/data
|
||||||
mv ../*.txt ../*.zip Tools/unicode/data/
|
mv ../*.txt ../*.zip Tools/unicode/data/
|
||||||
python Tools/unicode/makeunicodedata.py
|
python -B Tools/unicode/makeunicodedata.py
|
||||||
|
|
||||||
# Regenerate Lib/re/_casefix.py
|
# Regenerate Lib/re/_casefix.py
|
||||||
rm Lib/re/_casefix.py
|
rm Lib/re/_casefix.py
|
||||||
python Tools/scripts/generate_re_casefix.py Lib/re/_casefix.py
|
python -B Tools/scripts/generate_re_casefix.py Lib/re/_casefix.py
|
||||||
|
|
||||||
# Regenerate Programs/test_frozenmain.h
|
# Regenerate Programs/test_frozenmain.h
|
||||||
rm Programs/test_frozenmain.h
|
rm Programs/test_frozenmain.h
|
||||||
python Programs/freeze_test_frozenmain.py Programs/test_frozenmain.h
|
python -B Programs/freeze_test_frozenmain.py Programs/test_frozenmain.h
|
||||||
|
|
||||||
# Create dummy Python/stdlib_module_names.h
|
# Create dummy Python/stdlib_module_names.h
|
||||||
echo 'static const char* _Py_stdlib_module_names[] = {};' > Python/stdlib_module_names.h
|
echo 'static const char* _Py_stdlib_module_names[] = {};' > Python/stdlib_module_names.h
|
||||||
|
@ -69,7 +69,9 @@ src_compile() {
|
||||||
# We have to choose the order ourselves because the Makefile is extremely lax about the order
|
# We have to choose the order ourselves because the Makefile is extremely lax about the order
|
||||||
# First of all, do everything that doesn't use any C
|
# First of all, do everything that doesn't use any C
|
||||||
rm Modules/_blake2/blake2s_impl.c
|
rm Modules/_blake2/blake2s_impl.c
|
||||||
make "${MAKEJOBS}" regen-opcode \
|
PYTHONDONTWRITEBYTECODE=1 \
|
||||||
|
make "${MAKEJOBS}" \
|
||||||
|
regen-opcode \
|
||||||
regen-opcode-targets \
|
regen-opcode-targets \
|
||||||
regen-typeslots \
|
regen-typeslots \
|
||||||
regen-token \
|
regen-token \
|
||||||
|
@ -82,17 +84,17 @@ src_compile() {
|
||||||
regen-global-objects
|
regen-global-objects
|
||||||
|
|
||||||
# Do the freeze regen process
|
# Do the freeze regen process
|
||||||
make "${MAKEJOBS}" regen-frozen
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" regen-frozen
|
||||||
make "${MAKEJOBS}" regen-deepfreeze
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" regen-deepfreeze
|
||||||
make "${MAKEJOBS}" regen-global-objects
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" regen-global-objects
|
||||||
|
|
||||||
make "${MAKEJOBS}" CPPFLAGS="-U__DATE__ -U__TIME__"
|
make "${MAKEJOBS}" CPPFLAGS="-U__DATE__ -U__TIME__"
|
||||||
|
|
||||||
# Regen Python/stdlib_module_names.h (you must have an existing build first)
|
# Regen Python/stdlib_module_names.h (you must have an existing build first)
|
||||||
make "${MAKEJOBS}" regen-stdlib-module-names
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" regen-stdlib-module-names
|
||||||
|
|
||||||
# Now rebuild with proper stdlib_module_names.h
|
# Now rebuild with proper stdlib_module_names.h
|
||||||
make "${MAKEJOBS}" CPPFLAGS="-U__DATE__ -U__TIME__"
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" CPPFLAGS="-U__DATE__ -U__TIME__"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
|
@ -21,21 +21,21 @@ src_prepare() {
|
||||||
mkdir Tools/unicode/in Tools/unicode/out
|
mkdir Tools/unicode/in Tools/unicode/out
|
||||||
mv ../CP437.TXT Tools/unicode/in/
|
mv ../CP437.TXT Tools/unicode/in/
|
||||||
pushd Tools/unicode
|
pushd Tools/unicode
|
||||||
python gencodec.py in/ ../../Lib/encodings/
|
python -B gencodec.py in/ ../../Lib/encodings/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Regenerate unicode
|
# Regenerate unicode
|
||||||
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
||||||
mv ../*.txt ../*.zip .
|
mv ../*.txt ../*.zip .
|
||||||
python Tools/unicode/makeunicodedata.py
|
python -B Tools/unicode/makeunicodedata.py
|
||||||
|
|
||||||
# Regenerate sre_constants.h
|
# Regenerate sre_constants.h
|
||||||
rm Modules/sre_constants.h
|
rm Modules/sre_constants.h
|
||||||
cp Lib/sre_constants.py .
|
cp Lib/sre_constants.py .
|
||||||
python sre_constants.py
|
python -B sre_constants.py
|
||||||
|
|
||||||
# Regenerate _ssl_data.h
|
# Regenerate _ssl_data.h
|
||||||
python Tools/ssl/make_ssl_data.py /usr/include/openssl Modules/_ssl_data.h
|
python -B Tools/ssl/make_ssl_data.py /usr/include/openssl Modules/_ssl_data.h
|
||||||
|
|
||||||
# Regenerate autoconf
|
# Regenerate autoconf
|
||||||
autoreconf-2.71 -fi
|
autoreconf-2.71 -fi
|
||||||
|
@ -55,21 +55,21 @@ src_configure() {
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
# Build pgen
|
# Build pgen
|
||||||
make "${MAKEJOBS}" Parser/pgen
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" Parser/pgen
|
||||||
# Regen graminit.c and graminit.h
|
# Regen graminit.c and graminit.h
|
||||||
make "${MAKEJOBS}" Include/graminit.h
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" Include/graminit.h
|
||||||
|
|
||||||
# Regenerate some Python scripts using the other regenerated files
|
# Regenerate some Python scripts using the other regenerated files
|
||||||
# Must move them out to avoid using Lib/ module files which are
|
# Must move them out to avoid using Lib/ module files which are
|
||||||
# incompatible with running version of Python
|
# incompatible with running version of Python
|
||||||
cp Lib/{symbol,keyword,token}.py .
|
cp Lib/{symbol,keyword,token}.py .
|
||||||
cp token.py _token.py
|
cp token.py _token.py
|
||||||
python symbol.py
|
python -B symbol.py
|
||||||
python keyword.py
|
python -B keyword.py
|
||||||
python token.py
|
python -B token.py
|
||||||
|
|
||||||
# Now build the main program
|
# Now build the main program
|
||||||
make -j1 CFLAGS="-U__DATE__ -U__TIME__"
|
PYTHONDONTWRITEBYTECODE=1 make -j1 CFLAGS="-U__DATE__ -U__TIME__"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
|
@ -21,23 +21,23 @@ src_prepare() {
|
||||||
mkdir Tools/unicode/in Tools/unicode/out
|
mkdir Tools/unicode/in Tools/unicode/out
|
||||||
mv ../CP437.TXT Tools/unicode/in/
|
mv ../CP437.TXT Tools/unicode/in/
|
||||||
pushd Tools/unicode
|
pushd Tools/unicode
|
||||||
python gencodec.py in/ ../../Lib/encodings/
|
python -B gencodec.py in/ ../../Lib/encodings/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Regenerate clinic
|
# Regenerate clinic
|
||||||
find . -name "*.c" -or -name "*.h" | \
|
find . -name "*.c" -or -name "*.h" | \
|
||||||
xargs grep 'clinic input' -l | \
|
xargs grep 'clinic input' -l | \
|
||||||
xargs -L 1 python Tools/clinic/clinic.py
|
xargs -L 1 python -B Tools/clinic/clinic.py
|
||||||
|
|
||||||
# Regenerate unicode
|
# Regenerate unicode
|
||||||
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
||||||
mv ../*.txt ../*.zip .
|
mv ../*.txt ../*.zip .
|
||||||
python Tools/unicode/makeunicodedata.py
|
python -B Tools/unicode/makeunicodedata.py
|
||||||
|
|
||||||
# Regenerate sre_constants.h
|
# Regenerate sre_constants.h
|
||||||
rm Modules/sre_constants.h
|
rm Modules/sre_constants.h
|
||||||
cp Lib/sre_constants.py .
|
cp Lib/sre_constants.py .
|
||||||
python sre_constants.py
|
python -B sre_constants.py
|
||||||
mv sre_constants.h Modules/
|
mv sre_constants.h Modules/
|
||||||
|
|
||||||
# Regenerate autoconf
|
# Regenerate autoconf
|
||||||
|
@ -58,21 +58,21 @@ src_configure() {
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
# Build pgen
|
# Build pgen
|
||||||
make -j1 Parser/pgen
|
PYTHONDONTWRITEBYTECODE=1 make -j1 Parser/pgen
|
||||||
# Regen graminit.c and graminit.h
|
# Regen graminit.c and graminit.h
|
||||||
make -j1 Include/graminit.h
|
PYTHONDONTWRITEBYTECODE=1 make -j1 Include/graminit.h
|
||||||
|
|
||||||
# Regenerate some Python scripts using the other regenerated files
|
# Regenerate some Python scripts using the other regenerated files
|
||||||
# Must move them out to avoid using Lib/ module files which are
|
# Must move them out to avoid using Lib/ module files which are
|
||||||
# incompatible with running version of Python
|
# incompatible with running version of Python
|
||||||
cp Lib/{symbol,keyword,token}.py .
|
cp Lib/{symbol,keyword,token}.py .
|
||||||
cp token.py _token.py
|
cp token.py _token.py
|
||||||
python symbol.py
|
python -B symbol.py
|
||||||
python keyword.py
|
python -B keyword.py
|
||||||
python token.py
|
python -B token.py
|
||||||
|
|
||||||
# Now build the main program
|
# Now build the main program
|
||||||
make -j1 CFLAGS="-U__DATE__ -U__TIME__"
|
PYTHONDONTWRITEBYTECODE=1 make -j1 CFLAGS="-U__DATE__ -U__TIME__"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
|
@ -15,24 +15,24 @@ src_prepare() {
|
||||||
mkdir Tools/unicode/in Tools/unicode/out
|
mkdir Tools/unicode/in Tools/unicode/out
|
||||||
mv ../CP437.TXT Tools/unicode/in/
|
mv ../CP437.TXT Tools/unicode/in/
|
||||||
pushd Tools/unicode
|
pushd Tools/unicode
|
||||||
python gencodec.py in/ ../../Lib/encodings/
|
python -B gencodec.py in/ ../../Lib/encodings/
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Regenerate unicode
|
# Regenerate unicode
|
||||||
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
rm Modules/unicodedata_db.h Modules/unicodename_db.h Objects/unicodetype_db.h
|
||||||
mv ../*.txt ../*.zip .
|
mv ../*.txt ../*.zip .
|
||||||
python Tools/unicode/makeunicodedata.py
|
python -B Tools/unicode/makeunicodedata.py
|
||||||
|
|
||||||
# Regenerate sre_constants.h
|
# Regenerate sre_constants.h
|
||||||
rm Modules/sre_constants.h
|
rm Modules/sre_constants.h
|
||||||
cp Lib/sre_constants.py .
|
cp Lib/sre_constants.py .
|
||||||
python sre_constants.py
|
python -B sre_constants.py
|
||||||
rm sre_constants.py
|
rm sre_constants.py
|
||||||
mv sre_constants.h Modules/
|
mv sre_constants.h Modules/
|
||||||
|
|
||||||
# Regenerate stringprep
|
# Regenerate stringprep
|
||||||
rm Lib/stringprep.py
|
rm Lib/stringprep.py
|
||||||
python Tools/unicode/mkstringprep.py > Lib/stringprep.py
|
python -B Tools/unicode/mkstringprep.py > Lib/stringprep.py
|
||||||
|
|
||||||
# Regenerate autoconf
|
# Regenerate autoconf
|
||||||
autoreconf-2.71 -fi
|
autoreconf-2.71 -fi
|
||||||
|
@ -42,6 +42,7 @@ src_configure() {
|
||||||
MACHDEP=linux ac_sys_system=Linux \
|
MACHDEP=linux ac_sys_system=Linux \
|
||||||
CPPFLAGS="-U__DATE__ -U__TIME__" \
|
CPPFLAGS="-U__DATE__ -U__TIME__" \
|
||||||
LDFLAGS="-L${LIBDIR}" \
|
LDFLAGS="-L${LIBDIR}" \
|
||||||
|
PYTHON_FOR_BUILD="python -B" \
|
||||||
./configure \
|
./configure \
|
||||||
--build=i386-unknown-linux-musl \
|
--build=i386-unknown-linux-musl \
|
||||||
--host=i386-unknown-linux-musl \
|
--host=i386-unknown-linux-musl \
|
||||||
|
@ -53,9 +54,9 @@ src_configure() {
|
||||||
src_compile() {
|
src_compile() {
|
||||||
# Regenerations
|
# Regenerations
|
||||||
rm Modules/_blake2/blake2s_impl.c
|
rm Modules/_blake2/blake2s_impl.c
|
||||||
make "${MAKEJOBS}" regen-all
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" regen-all
|
||||||
|
|
||||||
make "${MAKEJOBS}" CPPFLAGS="-U__DATE__ -U__TIME__"
|
PYTHONDONTWRITEBYTECODE=1 make "${MAKEJOBS}" CPPFLAGS="-U__DATE__ -U__TIME__"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
|
|
Loading…
Reference in New Issue