Commit graph

28 commits

Author SHA1 Message Date
Samuel Tyler
f7672536e0
Make packages without tarball sources work nicely
When there are no directories extracted, use the base build/ directory
as the build directory.
2025-12-28 11:05:12 +11:00
Samuel Tyler
bbccded731
Use a "real" copyright line 2025-10-17 18:53:10 +11:00
Samuel Tyler
d16817a649 shellcheck fix 2025-10-06 12:21:53 +11:00
Samuel Tyler
d25949b8a5 Fix preseeding with >9 revisions 2025-10-06 12:21:53 +11:00
Samuel Tyler
8e408f77cc Fix bug with repo with more than 10 builds 2025-10-06 12:21:45 +11:00
fosslinux
dd2026dc19 Build perl-Devel-Tokenizer against latest version of perl 2025-10-06 12:21:26 +11:00
fosslinux
614482220c Restore permissions on stripped files 2025-10-06 12:21:26 +11:00
Samuel Tyler
9d08d181f0 Support new sources format within the lb environment 2025-10-04 17:50:36 +10:00
Alexandre Gomes Gaigalas
6e5e42307b Allow --qemu and file:// --mirrors to be used together
When using file:// mirrors, rootfs.py will spawn a local HTTP
server at 127.0.0.1.

In combination with --qemu, this poses a problem: downloads
on the host machine will work, but downloads on the guest
machine will not reach the local server.

This commit introduces a change to rewrite the address to
10.0.2.2 inside the guest, only when QEMU=True is set in
the configuration, allowing this combination to build
past the get_network improvement step.
2025-06-11 22:28:28 -03:00
fosslinux
62f147f242 Add error message when distfile doesn't exist 2025-02-03 17:23:53 +11:00
Samuel Tyler
736d7967fd
Merge pull request #495 from fosslinux/set-pipefail
Set pipefail when supported
2025-02-03 15:30:43 +11:00
fosslinux
1d2836e804 Don't checksum symlinks when uninstalling
symlinks are removed separately later. It doesn't really make sense to
checksum them - the file they are pointing to could have been deleted.
2025-02-03 08:54:40 +11:00
fosslinux
df1c9e9aba Support mirrors within 2025-02-02 10:02:32 +11:00
fosslinux
57f15d3515 Handle files correctly that start with a dash
Currently these were interpreted as options
2025-01-12 13:41:11 +11:00
fosslinux
a67db8fcbd 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
2024-12-23 15:20:42 +11:00
Googulator
c37486d428
Fix spurious error message for missing prebuilts in --repo mode 2024-05-22 01:12:37 +02:00
Googulator
b02c35443f
Stop src_get overrides from propagating between builds
Because src_get was never unset at the end of a build, it would propagate to subsequent builds until it would be either overridden again, or cleared by a new bash process starting (either due to a jump step or a new version of bash being built).

Thus, kexec-linux's override of src_get to a no-op would stay in effect in chroot mode until musl-1.2.4 phase2's override restored src_get's functionality. This override is actually obsolete, since musl-1.2.4's source code is now preserved across the Linux kexec via a different mechanism - but removing it mysteriously broke downloading bash-5.2.15 due to kexec-linux's override still being in effect.
2024-05-22 00:21:40 +02:00
Gábor Stefanik
89a4d18ff0 Support multiple mirrors for each source file
If multiple URLs are entered in a sources listing for the same file,
each will be tried in turn, until either one succeeds, or we fail
having run out of mirrors.
2024-04-14 00:17:41 +02:00
Gábor Stefanik
65953732a0 Support early xz/lzma decompression, and use it wherever possible 2024-02-14 14:34:16 +01:00
fosslinux
75772adb91 Allow the use of setuid binaries
This also changes checksum of util-linux.
2024-02-03 10:07:41 +11:00
fosslinux
2182076773 Use a constant umask 2024-01-26 10:29:57 +11:00
fosslinux
b1e3da4e46 Move where DESTDIR is made 2024-01-26 10:29:57 +11:00
fosslinux
0a98747dab Remove files unnecessarily kept around 2024-01-26 10:29:18 +11:00
fosslinux
5b84cdd178 Don't touch live filesystem in bash-5.2.15
Rather, uninstall existing bash before bash is built
2024-01-26 10:29:18 +11:00
fosslinux
bbe121f382 Add uninstall directive to manifest
Allows for removal of old files or packages
2024-01-26 10:29:18 +11:00
Gábor Stefanik
67aa2a4826 Fix the default build script used by "build <package name>"
Before the simplify refactor, the convention was to name the first
or default build script "<package name>.sh". The refactor changed
this default to "pass1.sh", with "pass2.sh" and so on used for
subsequent passes. This wasn't an issue when building usig scripts
generated by script-generator (which explicitly declares the build
script to use), but broke running "build <package name>" without
an explicit script name from the post-bootstrap bash prompt.

By deriving the script name from the current revision/pass number,
this commit restores that functionality.

An unfortunate blemish is that we number build scripts from 1, but
repo tarballs from 0 - it would be nice to standardize on a single
indexing convention.
2024-01-26 10:29:18 +11:00
fosslinux
ab47483a51 Linters & CI updates 2023-12-15 21:44:43 +11:00
fosslinux
6ed2e09f3a 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.
2023-12-15 21:43:19 +11:00
Renamed from sysa/helpers.sh (Browse further)