From c9fa9a00f4dcc587522cef118ab6db838fdcbd65 Mon Sep 17 00:00:00 2001 From: fosslinux Date: Tue, 17 Dec 2024 18:27:53 +1100 Subject: [PATCH] Make Python bootstrap optional Sets precedent for including additional language bootstraps. --- rootfs.py | 10 ++++++++++ steps/configurator | 7 +++++++ steps/manifest | 24 ++++++++++++------------ 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/rootfs.py b/rootfs.py index 1cfeab94..3749be81 100755 --- a/rootfs.py +++ b/rootfs.py @@ -49,6 +49,8 @@ def create_configuration_file(args): config.write("DISK=sda1\n") config.write("KERNEL_BOOTSTRAP=False\n") config.write(f"BUILD_KERNELS={args.update_checksums or args.build_kernels}\n") + for extra in args.extras.split(","): + config.write(f"EXTRA_{extra.upper()}=True\n") config.write(f"CONFIGURATOR={args.configurator}\n") # pylint: disable=too-many-statements,too-many-branches @@ -101,6 +103,8 @@ def main(): parser.add_argument("--internal-ci", help="INTERNAL for github CI") parser.add_argument("-s", "--swap", help="Swap space to allocate in Linux", default=0) + parser.add_argument("-x", "--extras", help="Comma-separated list of extra bootstraps to run (python)", + default="") # QEMU arguments parser.add_argument("-q", "--qemu", help="Use QEMU", @@ -165,6 +169,12 @@ def main(): else: args.swap = 0 + # Check extra bootstraps + valid = ["python"] + for extra in args.extras.split(","): + if extra != "" and extra not in valid: + raise ValueError(f"{extra} is not a known bootstrap") + # Set constant umask os.umask(0o022) diff --git a/steps/configurator b/steps/configurator index ff97fe23..bb0eddf1 100644 --- a/steps/configurator +++ b/steps/configurator @@ -40,6 +40,13 @@ this correctly, otherwise you risk overwriting an existing disk on your system. LIVE-BOOTSTRAP TAKES NO LIABILITY FOR ANY DATA LOSS RESULTING FROM ITS USE. +m /extras _ _ _ Extra bootstraps +Various extra language or package bootstraps that are not core to +live-bootstrap, but are an optional part of it. + +o /extras/python EXTRA_PYTHON bool False Python bootstrap +Bootstraps Python. + m /sysinfo _ _ _ System information Details about your specific system and the environment live-bootstrap is running in. diff --git a/steps/manifest b/steps/manifest index 0f4a4cfb..ac0923c9 100644 --- a/steps/manifest +++ b/steps/manifest @@ -181,18 +181,6 @@ build: grep-3.7 build: sed-4.8 build: autogen-5.18.16 build: musl-1.2.4 -build: python-2.0.1 -build: python-2.0.1 -build: python-2.3.7 -build: python-2.3.7 -build: python-2.5.6 -build: python-3.1.5 -build: python-3.1.5 -build: python-3.3.7 -build: python-3.4.10 -build: python-3.8.16 -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 build: gcc-10.4.0 build: binutils-2.41 @@ -207,6 +195,18 @@ build: gzip-1.13 build: diffutils-3.10 build: gawk-5.3.0 build: m4-1.4.19 +build: python-2.0.1 ( EXTRA_PYTHON == True ) +build: python-2.0.1 ( EXTRA_PYTHON == True ) +build: python-2.3.7 ( EXTRA_PYTHON == True ) +build: python-2.3.7 ( EXTRA_PYTHON == True ) +build: python-2.5.6 ( EXTRA_PYTHON == True ) +build: python-3.1.5 ( EXTRA_PYTHON == True ) +build: python-3.1.5 ( EXTRA_PYTHON == True ) +build: python-3.3.7 ( EXTRA_PYTHON == True ) +build: python-3.4.10 ( EXTRA_PYTHON == True ) +build: python-3.8.16 ( EXTRA_PYTHON == True ) +build: python-3.11.1 ( EXTRA_PYTHON == True ) +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 ( EXTRA_PYTHON == True ) improve: cleanup_filesystem improve: null_time ( FORCE_TIMESTAMPS == True ) improve: update_checksums ( UPDATE_CHECKSUMS == True )