]> git.ipfire.org Git - people/ms/ipfire-2.x.git/log
people/ms/ipfire-2.x.git
11 months agomake.sh: Pass extra options in lfsmake1
Michael Tremer [Tue, 9 Jul 2024 19:46:30 +0000 (19:46 +0000)] 
make.sh: Pass extra options in lfsmake1

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agocdrom: Fix typo
Michael Tremer [Tue, 9 Jul 2024 19:25:17 +0000 (19:25 +0000)] 
cdrom: Fix typo

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months ago.gitignore: Ignore images_* directories
Michael Tremer [Tue, 9 Jul 2024 19:24:55 +0000 (19:24 +0000)] 
.gitignore: Ignore images_* directories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoflash-images: Create the base image as a sparse file
Michael Tremer [Tue, 9 Jul 2024 19:24:14 +0000 (19:24 +0000)] 
flash-images: Create the base image as a sparse file

This will be much faster as it creates less IO.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Use less aggressive compression for Zstandard
Michael Tremer [Tue, 9 Jul 2024 19:23:44 +0000 (19:23 +0000)] 
make.sh: Use less aggressive compression for Zstandard

Otherwise this takes way too long.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Rewrite how we are looking for rootfiles
Michael Tremer [Tue, 9 Jul 2024 19:23:11 +0000 (19:23 +0000)] 
make.sh: Rewrite how we are looking for rootfiles

No function changes, just performance.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoflash-images: Don't mess with depmod
Michael Tremer [Tue, 9 Jul 2024 17:52:02 +0000 (17:52 +0000)] 
flash-images: Don't mess with depmod

This file could not be created anyways as the directory did not exist.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoimages: Ensure that all mount points are created
Michael Tremer [Tue, 9 Jul 2024 17:51:37 +0000 (17:51 +0000)] 
images: Ensure that all mount points are created

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Drop stripping
Michael Tremer [Tue, 9 Jul 2024 17:47:04 +0000 (17:47 +0000)] 
make.sh: Drop stripping

This will massively improve the build process because we will only strip
the files that we need. The build system will remain as is.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Correctly pass ZSTD_OPT
Michael Tremer [Tue, 9 Jul 2024 17:46:48 +0000 (17:46 +0000)] 
make.sh: Correctly pass ZSTD_OPT

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Use --long for Zstandard compression
Michael Tremer [Tue, 9 Jul 2024 17:46:15 +0000 (17:46 +0000)] 
make.sh: Use --long for Zstandard compression

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoflash-images: Collect files again instead of relying on the tarball
Michael Tremer [Tue, 9 Jul 2024 17:38:12 +0000 (17:38 +0000)] 
flash-images: Collect files again instead of relying on the tarball

This has always been an ugly hack.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoflash-images: There is no need to for the mount check any more
Michael Tremer [Tue, 9 Jul 2024 17:36:10 +0000 (17:36 +0000)] 
flash-images: There is no need to for the mount check any more

We always start with a fresh mount namespace, so there cannot be
anything left.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoConfig: Create common functions to create archives
Michael Tremer [Tue, 9 Jul 2024 17:33:22 +0000 (17:33 +0000)] 
Config: Create common functions to create archives

The compression code is very messy because it has changed so many times.
This cleans this up and creates common functions that can be used for
the ISO images as well as packages.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agocdrom: Fix syntax error
Michael Tremer [Tue, 9 Jul 2024 17:32:32 +0000 (17:32 +0000)] 
cdrom: Fix syntax error

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoarchive.files: Make this slightly more efficient
Michael Tremer [Tue, 9 Jul 2024 16:52:26 +0000 (16:52 +0000)] 
archive.files: Make this slightly more efficient

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoConfig: Remove debugging code
Michael Tremer [Tue, 9 Jul 2024 16:44:37 +0000 (16:44 +0000)] 
Config: Remove debugging code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create Core Update packages, too
Michael Tremer [Tue, 9 Jul 2024 16:42:11 +0000 (16:42 +0000)] 
make.sh: Create Core Update packages, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create loop devices as block devices
Michael Tremer [Tue, 9 Jul 2024 16:41:25 +0000 (16:41 +0000)] 
make.sh: Create loop devices as block devices

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't drop into the lfs/ directory when entering a shell
Michael Tremer [Tue, 9 Jul 2024 16:04:47 +0000 (16:04 +0000)] 
make.sh: Don't drop into the lfs/ directory when entering a shell

This is not a very useful place to be.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor building packages
Michael Tremer [Tue, 9 Jul 2024 15:56:41 +0000 (15:56 +0000)] 
make.sh: Refactor building packages

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Simplify the initial configuration a little bit more
Michael Tremer [Tue, 9 Jul 2024 15:32:21 +0000 (15:32 +0000)] 
make.sh: Simplify the initial configuration a little bit more

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Change execute() so that it can be used outside the namespaces, too
Michael Tremer [Tue, 9 Jul 2024 15:11:35 +0000 (15:11 +0000)] 
make.sh: Change execute() so that it can be used outside the namespaces, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Use the new package function to download sources
Michael Tremer [Tue, 9 Jul 2024 15:11:19 +0000 (15:11 +0000)] 
make.sh: Use the new package function to download sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: tail on the preparation log file, too
Michael Tremer [Tue, 9 Jul 2024 15:10:57 +0000 (15:10 +0000)] 
make.sh: tail on the preparation log file, too

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Explicitely download packages when building the toolchain
Michael Tremer [Tue, 9 Jul 2024 15:01:58 +0000 (15:01 +0000)] 
make.sh: Explicitely download packages when building the toolchain

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't revalidate the images all the time
Michael Tremer [Tue, 9 Jul 2024 15:00:42 +0000 (15:00 +0000)] 
make.sh: Don't revalidate the images all the time

Calling b2 causes make to verify all source which creates a lot of IO.

This is not really necessary because install will do the same and the
build would fail if the source checksums didn't match.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor the execute function
Michael Tremer [Tue, 9 Jul 2024 14:59:45 +0000 (14:59 +0000)] 
make.sh: Refactor the execute function

The first version was a little bit messy with all the checks in all
sorts of places. We now create one large array and update it whenever
the configuration changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create a large unified function to run commands
Michael Tremer [Tue, 9 Jul 2024 14:09:56 +0000 (14:09 +0000)] 
make.sh: Create a large unified function to run commands

This now includes the toolchain for which we need to set up the same
environment, except slightly differently.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agocdrom+flash-images: Write images to the images directory
Michael Tremer [Tue, 9 Jul 2024 13:01:27 +0000 (13:01 +0000)] 
cdrom+flash-images: Write images to the images directory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Split environment and make variables
Michael Tremer [Tue, 9 Jul 2024 10:32:24 +0000 (10:32 +0000)] 
make.sh: Split environment and make variables

This got very messed up in the past and I think we would benefit greatly
from splitting this again for a less cluttered environment in the build
chroot and reusability of the make commands for the different stages.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Call the correct target for checksum check
Michael Tremer [Tue, 9 Jul 2024 10:19:37 +0000 (10:19 +0000)] 
make.sh: Call the correct target for checksum check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Bind-mount the QEMU helper instead of copying the binary
Michael Tremer [Tue, 9 Jul 2024 10:19:05 +0000 (10:19 +0000)] 
make.sh: Bind-mount the QEMU helper instead of copying the binary

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Install the QEMU helper only once
Michael Tremer [Tue, 9 Jul 2024 10:18:23 +0000 (10:18 +0000)] 
make.sh: Install the QEMU helper only once

This needs to be done only once when we initialize the environment.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Pass variables before the commands
Michael Tremer [Tue, 9 Jul 2024 09:33:33 +0000 (09:33 +0000)] 
make.sh: Pass variables before the commands

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Correctly pass the command return code in run_command
Michael Tremer [Tue, 9 Jul 2024 08:36:39 +0000 (08:36 +0000)] 
make.sh: Correctly pass the command return code in run_command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoflash-images: No need to sleep for automount any more
Michael Tremer [Mon, 8 Jul 2024 16:32:27 +0000 (16:32 +0000)] 
flash-images: No need to sleep for automount any more

I am not sure whether automount is being used at all any more, but since
we are now running in our own namespace, it certainly has no business
here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create and mount and images directory
Michael Tremer [Mon, 8 Jul 2024 16:24:07 +0000 (16:24 +0000)] 
make.sh: Create and mount and images directory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Add a tail command to stream any logs
Michael Tremer [Mon, 8 Jul 2024 16:18:57 +0000 (16:18 +0000)] 
make.sh: Add a tail command to stream any logs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Pass on individual build arguments
Michael Tremer [Sun, 7 Jul 2024 17:26:55 +0000 (17:26 +0000)] 
make.sh: Pass on individual build arguments

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't generate any documentation in the source directory
Michael Tremer [Fri, 5 Jul 2024 15:42:05 +0000 (15:42 +0000)] 
make.sh: Don't generate any documentation in the source directory

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Kill all child processes if unshare terminates
Michael Tremer [Fri, 5 Jul 2024 15:39:05 +0000 (15:39 +0000)] 
make.sh: Kill all child processes if unshare terminates

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Update the runtime after the interrupt
Michael Tremer [Fri, 5 Jul 2024 15:32:45 +0000 (15:32 +0000)] 
make.sh: Update the runtime after the interrupt

This is a lot better because this puts the code where it is being
executed and allows us to run run_command in a subshell, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Build the entire distribution in one go
Michael Tremer [Fri, 5 Jul 2024 15:00:59 +0000 (15:00 +0000)] 
make.sh: Build the entire distribution in one go

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Fix indentation
Michael Tremer [Fri, 5 Jul 2024 14:08:18 +0000 (14:08 +0000)] 
make.sh: Fix indentation

No functional changes.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Move a comment to where it should be
Michael Tremer [Fri, 5 Jul 2024 14:02:41 +0000 (14:02 +0000)] 
make.sh: Move a comment to where it should be

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Launch the timer only when we need it
Michael Tremer [Fri, 5 Jul 2024 14:02:12 +0000 (14:02 +0000)] 
make.sh: Launch the timer only when we need it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Have the background timer update the process runtime
Michael Tremer [Fri, 5 Jul 2024 14:01:26 +0000 (14:01 +0000)] 
make.sh: Have the background timer update the process runtime

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create a timer co-process
Michael Tremer [Fri, 5 Jul 2024 13:37:15 +0000 (13:37 +0000)] 
make.sh: Create a timer co-process

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't export loads of variables in the main script
Michael Tremer [Fri, 5 Jul 2024 10:47:12 +0000 (10:47 +0000)] 
make.sh: Don't export loads of variables in the main script

We clear and reset the environment when we launch any build commands and
therefore don't need to do this here.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't mess with Bash's command hashing
Michael Tremer [Fri, 5 Jul 2024 10:46:11 +0000 (10:46 +0000)] 
make.sh: Don't mess with Bash's command hashing

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor downloading sources
Michael Tremer [Fri, 5 Jul 2024 10:45:00 +0000 (10:45 +0000)] 
make.sh: Refactor downloading sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: run_command: Fix basedir in and outside the chroot
Michael Tremer [Fri, 5 Jul 2024 10:43:26 +0000 (10:43 +0000)] 
make.sh: run_command: Fix basedir in and outside the chroot

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Disconnect standard input from make commands
Michael Tremer [Fri, 5 Jul 2024 10:25:27 +0000 (10:25 +0000)] 
make.sh: Disconnect standard input from make commands

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Move download and check to lfsmake2 and out of the common check
Michael Tremer [Fri, 5 Jul 2024 10:24:15 +0000 (10:24 +0000)] 
make.sh: Move download and check to lfsmake2 and out of the common check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Add --quiet to run_command
Michael Tremer [Fri, 5 Jul 2024 10:23:45 +0000 (10:23 +0000)] 
make.sh: Add --quiet to run_command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Allow run_command to execute multiple actions at a time
Michael Tremer [Fri, 5 Jul 2024 10:19:33 +0000 (10:19 +0000)] 
make.sh: Allow run_command to execute multiple actions at a time

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Move lfscommoncheck out of run_command
Michael Tremer [Fri, 5 Jul 2024 10:18:49 +0000 (10:18 +0000)] 
make.sh: Move lfscommoncheck out of run_command

We would quite likely create an infinite loop here later and so should
rather treat run_command as a low-level function.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Remove some dead code
Michael Tremer [Fri, 5 Jul 2024 10:14:41 +0000 (10:14 +0000)] 
make.sh: Remove some dead code

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Show total runtime of commands after they are finished
Michael Tremer [Fri, 5 Jul 2024 10:11:57 +0000 (10:11 +0000)] 
make.sh: Show total runtime of commands after they are finished

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Add helper function to run a make command
Michael Tremer [Fri, 5 Jul 2024 10:06:53 +0000 (10:06 +0000)] 
make.sh: Add helper function to run a make command

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Fix checking if we have a fake environment
Michael Tremer [Fri, 5 Jul 2024 09:52:24 +0000 (09:52 +0000)] 
make.sh: Fix checking if we have a fake environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoConfig: Drop toolchain URL
Michael Tremer [Fri, 5 Jul 2024 09:49:14 +0000 (09:49 +0000)] 
Config: Drop toolchain URL

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor uploading sources
Michael Tremer [Fri, 5 Jul 2024 09:48:56 +0000 (09:48 +0000)] 
make.sh: Refactor uploading sources

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Make the disk space check optional
Michael Tremer [Fri, 5 Jul 2024 09:45:39 +0000 (09:45 +0000)] 
make.sh: Make the disk space check optional

There is little value in running this when entering a shell...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Mount the log directory for the correct architecture
Michael Tremer [Fri, 5 Jul 2024 09:42:20 +0000 (09:42 +0000)] 
make.sh: Mount the log directory for the correct architecture

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor compression the toolchain
Michael Tremer [Fri, 5 Jul 2024 09:39:50 +0000 (09:39 +0000)] 
make.sh: Refactor compression the toolchain

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create a custom log function
Michael Tremer [Fri, 5 Jul 2024 09:39:08 +0000 (09:39 +0000)] 
make.sh: Create a custom log function

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Use path variables for cleanup
Michael Tremer [Fri, 5 Jul 2024 09:17:05 +0000 (09:17 +0000)] 
make.sh: Use path variables for cleanup

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor downloading the toolchain
Michael Tremer [Fri, 5 Jul 2024 09:13:19 +0000 (09:13 +0000)] 
make.sh: Refactor downloading the toolchain

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months ago.gitignore: Ignore architecture directories
Michael Tremer [Fri, 5 Jul 2024 08:59:37 +0000 (08:59 +0000)] 
.gitignore: Ignore architecture directories

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Forward the architecture to the namespace
Michael Tremer [Fri, 5 Jul 2024 08:58:57 +0000 (08:58 +0000)] 
make.sh: Forward the architecture to the namespace

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor the toolchain extraction
Michael Tremer [Fri, 5 Jul 2024 08:58:46 +0000 (08:58 +0000)] 
make.sh: Refactor the toolchain extraction

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Build in a separate directory for each architecture
Michael Tremer [Fri, 5 Jul 2024 08:58:09 +0000 (08:58 +0000)] 
make.sh: Build in a separate directory for each architecture

This allows running multiple builds in the same working directory.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Use LOG_DIR for logs
Michael Tremer [Fri, 5 Jul 2024 08:29:46 +0000 (08:29 +0000)] 
make.sh: Use LOG_DIR for logs

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Check free space in the base directory
Michael Tremer [Fri, 5 Jul 2024 08:27:55 +0000 (08:27 +0000)] 
make.sh: Check free space in the base directory

This makes more sense if we want to support building multiple
architectures and if we consider cache and ccache, too.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create all bind-mounts as read-only where possible
Michael Tremer [Fri, 5 Jul 2024 08:21:10 +0000 (08:21 +0000)] 
make.sh: Create all bind-mounts as read-only where possible

This way, the build environment can no longer modify any source any
more. This was not a huge integrity problem before as Git would have
shown differences, but it might cause damage to the build system which
need to manually be recovered.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create /dev and /sys in the build environment
Michael Tremer [Fri, 5 Jul 2024 08:20:53 +0000 (08:20 +0000)] 
make.sh: Create /dev and /sys in the build environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agoperl-Device-SerialPort: Use /dev/null as test port
Michael Tremer [Fri, 5 Jul 2024 08:16:17 +0000 (08:16 +0000)] 
perl-Device-SerialPort: Use /dev/null as test port

The build failed with the new minimal /dev it is looking for some TTY
devices which are no longer present. This patch fixes the build.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create /proc in the chroot environment before mounting it
Michael Tremer [Fri, 5 Jul 2024 08:16:00 +0000 (08:16 +0000)] 
make.sh: Create /proc in the chroot environment before mounting it

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Move PS1 to the header
Michael Tremer [Thu, 4 Jul 2024 19:29:26 +0000 (19:29 +0000)] 
make.sh: Move PS1 to the header

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Remove TARGET_ARCH compatibility
Michael Tremer [Thu, 4 Jul 2024 19:16:54 +0000 (19:16 +0000)] 
make.sh: Remove TARGET_ARCH compatibility

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Remove option to make /usr/src a ramdisk
Michael Tremer [Thu, 4 Jul 2024 19:16:02 +0000 (19:16 +0000)] 
make.sh: Remove option to make /usr/src a ramdisk

I am not sure this is helping in any way these days that we have SSDs
everywhere...

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Remove docker stuff
Michael Tremer [Thu, 4 Jul 2024 19:14:19 +0000 (19:14 +0000)] 
make.sh: Remove docker stuff

This is basically unused for years. I even forgot we had this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Tidy up LOGFILE
Michael Tremer [Thu, 4 Jul 2024 19:10:15 +0000 (19:10 +0000)] 
make.sh: Tidy up LOGFILE

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor determining BASEDIR
Michael Tremer [Thu, 4 Jul 2024 19:05:37 +0000 (19:05 +0000)] 
make.sh: Refactor determining BASEDIR

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Group variables and initialization together
Michael Tremer [Thu, 4 Jul 2024 18:55:47 +0000 (18:55 +0000)] 
make.sh: Group variables and initialization together

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Set the CCACHE_DIR with the ccache to use
Michael Tremer [Thu, 4 Jul 2024 18:27:43 +0000 (18:27 +0000)] 
make.sh: Set the CCACHE_DIR with the ccache to use

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor the root user check
Michael Tremer [Thu, 4 Jul 2024 18:23:14 +0000 (18:23 +0000)] 
make.sh: Refactor the root user check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Tidy up the environment creation function
Michael Tremer [Thu, 4 Jul 2024 18:21:58 +0000 (18:21 +0000)] 
make.sh: Tidy up the environment creation function

NFC

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Refactor the space check
Michael Tremer [Thu, 4 Jul 2024 18:13:06 +0000 (18:13 +0000)] 
make.sh: Refactor the space check

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: No longer export LFS as it is not being used
Michael Tremer [Thu, 4 Jul 2024 17:59:43 +0000 (17:59 +0000)] 
make.sh: No longer export LFS as it is not being used

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Replace LFS with BUILD_DIR
Michael Tremer [Thu, 4 Jul 2024 17:59:11 +0000 (17:59 +0000)] 
make.sh: Replace LFS with BUILD_DIR

This is probably a more specific name for this.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Always mount a separate /tmp
Michael Tremer [Thu, 4 Jul 2024 17:54:08 +0000 (17:54 +0000)] 
make.sh: Always mount a separate /tmp

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Make BUILD_DIR a mountpoint
Michael Tremer [Thu, 4 Jul 2024 17:50:52 +0000 (17:50 +0000)] 
make.sh: Make BUILD_DIR a mountpoint

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create a new, minimal /dev in the build environment
Michael Tremer [Thu, 4 Jul 2024 17:48:53 +0000 (17:48 +0000)] 
make.sh: Create a new, minimal /dev in the build environment

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't bind-mount the host's /proc
Michael Tremer [Thu, 4 Jul 2024 17:18:24 +0000 (17:18 +0000)] 
make.sh: Don't bind-mount the host's /proc

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create the second mount namespace as slave
Michael Tremer [Thu, 4 Jul 2024 17:16:43 +0000 (17:16 +0000)] 
make.sh: Create the second mount namespace as slave

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Don't create a new IPC namespace
Michael Tremer [Thu, 4 Jul 2024 17:16:08 +0000 (17:16 +0000)] 
make.sh: Don't create a new IPC namespace

If we do this, we no longer can interrupt the build process on the
console.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
11 months agomake.sh: Create lots more namespaces when we enter the chroot
Michael Tremer [Thu, 4 Jul 2024 17:09:53 +0000 (17:09 +0000)] 
make.sh: Create lots more namespaces when we enter the chroot

This allows us to protect the host system a little bit more from the
host system by decoupling all namespaces.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>