Commit Graph

47 Commits

Author SHA1 Message Date
fosslinux a89c76cc73 Fix musl-1.2.3 when umask on host system is not 022 2023-01-02 16:44:23 +11:00
rick-masters d2c669e0fc Always use file for checksums, mes built sha256sum doesn't support stdin. 2022-12-05 18:14:19 +00:00
Eduardo Sánchez Muñoz 6f4afb4e3f Make shellcheck happy 2022-11-28 20:10:30 +01:00
fosslinux 1c6c9a404d Hotfix shellcheck 2022-11-02 14:35:48 +11:00
fosslinux 31bc944dd3 Establish different XBPS packages for different versions 2022-10-30 21:07:57 +11:00
fosslinux c523eb9b47 Fix repo preseed in update_checksums mode 2022-10-30 21:07:57 +11:00
fosslinux 38b90d6a96 Make preseed work in sysc
- TODO: tar-1.34 does not work properly with preseed.
2022-10-30 21:07:57 +11:00
fosslinux 042deed5e5 Fix extract-only for old tar 2022-10-10 22:23:04 +11:00
fosslinux 10a55522a2 Change sources getting method.
- Rather than defining the urls where they are gotten (python sysa,
  python sysc, inside sysc), a spec file is now used that is easily
  interpretable and tool-independent.
- This is interpreted by rootfs.py and inside sysc.
- This is also used to make sources available and extract sources.
- Manual dirname selection is no longer required as is tarball renaming
  upon download - all of this is handled automatically.

Fixes #188
2022-10-02 09:48:20 +11:00
fosslinux 25f37ba926 Various fixes from rebase
This took a while so a bunch of stuff got broken in rebase.
2022-06-18 09:10:11 +10:00
fosslinux 0ce50a6393 Add options for;
- disk to be created (blank disk given to live-bootstrap) (default)
- disk to already exist but sources downloaded within live-bootstrap
- sources to be downloaded outside live-bootstrap (non-blank disk given
  to live-bootstrap)

Also migrate sysb to use sys_transfer in QEMU mode also.

Note that this means copy_sysc is now irrelevant. sysc is *always*
sourced from sysa.
2022-06-10 13:33:16 +10:00
fosslinux 8008de8e73 Add file downloading logic
Add urls to sysc, and modify some tarballs to http (non s) before ssl
2022-06-10 13:30:58 +10:00
Andrius Štikonas b0f0fa3a95 Fix return from bin_preseed. 2022-06-02 20:25:23 +01:00
Andrius Štikonas 0b3782d61b Allow preseeding with binary packages. 2022-05-29 00:04:57 +01:00
fosslinux fc0368aa6a
Merge pull request #169 from stikonas/links
Merge symlinks into tarball packages.
2022-05-20 22:46:30 +10:00
Andrius Štikonas 8f61b8400e Merge symlinks into tarball packages. 2022-05-20 09:39:57 +01:00
Dor Askayo 507f945419 Remove /dev/null only if it's not a character device 2022-05-19 21:55:25 +03:00
Andrius Štikonas 21f4174dc3 Fix packaging issues
* Bzip2 was manually installed directly into filesystem, so bzip2 package was empty.
  Fixed by installing it to destdir. bzip2 moves out its binary before installing
  its own package.
* sha256sum from stage0-posix was not checking any checksums because it does not
  accept piped input. Fixed by using temporary file.
* grep was broken for a short time (but with fixed bzip2 package this caused failures)
  due to touch creating grep file of zero size (egrep symlink was touched).
  Fixed by implementing touch -h

Resolves #156, resolves #166, resolves #167
2022-05-17 10:19:50 +01:00
Dor Askayo 3c60bdebc3 Improve reproducibility of tarball packages
This ensures the user running the bootstrap and its umask don't
affect the permission metadata in the tar archive.
2022-05-15 10:46:18 +03:00
Andrius Štikonas ef0030bbf3 Reinstall system from packages during sysa->sysc and sysb->sysc transitions. 2022-05-09 22:53:46 +01:00
Andrius Štikonas 424aa5be38 Move from mes-m2 to mes-0.24. 2022-05-05 23:59:52 +01:00
fosslinux c189dad168 Order early tarballs deterministically
Fixes #151
2022-05-05 17:44:47 +10:00
fosslinux f1600467a7 Variety of improvements
- Rename sources to distfiles for clarity.
- Per sys(a/c) distfiles to reduce rootfs.py processing and reduce RAM
  usage in sysa.
- Canonicalise early kaem mes/tcc files to kaem script conventions.
- Cleanup unused setup in python.
2022-05-05 17:44:47 +10:00
Andrius Štikonas 5b032cb46c rootfs.py refactoring.
Switch to bzip2 packages
Move most of the preprocessing done by rootfs.py
into kaem and bash scripts inside live-bootstrap.
2022-04-21 00:49:56 +01:00
fosslinux 5c88f1c87f Add sysb and sysc scaffolding.
Now that we have the Linux Kernel built, we move to a full-disk (rather
than initramfs) setup in sysc. However, we cannot assume the seed kernel
has support for mounting hard drives. So, first we need to kexec into
sysb, which is used as a jumping off point to create the hard drive for
sysc.

Additionally, since 2.6.16 does not have support for on-demand initramfs
(initramfs must be built into kernel), we will have to rebuild the linux
kernel within sysb without the initramfs.

All of this process is not performed for chroot mode. Instead, we skip
sysb and jump straight to sysc, copying over appropriate data.

The python scripts have been changed slightly. Each sys* inherits
SysGeneral, which contains various functions which are not specific to
any sys* and simplifies those files. rootfs now also handles sysb and
sysc.

bootstrap.cfg also gives an indication whether we are running in a
chroot to avoid attempting to kexec/mount within a chroot.
2021-08-27 14:54:08 +10:00
fosslinux 4c6e7afa42 Remove build directory
This extremely conserves storage space. Needed for larger packages to
fit within 4GB RAM limit of i386 no-PAE.
2021-08-27 14:54:07 +10:00
Andrius Štikonas c8784cbcd3 Split installed files out of /after into /image. 2021-06-29 17:49:34 +01:00
fosslinux c05c16e12c helpers.sh: add 5th argument, directory to cd into 2021-05-26 07:27:22 +10:00
fosslinux 338c85c8b8 Use absolute instead of relative paths in helpers.sh 2021-05-26 07:27:22 +10:00
fosslinux c168a3bd4c
Merge pull request #115 from melg8/master
Add coreutils 8.32 and fix creation dates
2021-05-24 07:34:23 +10:00
Melg Eight cf4ce56603
Add config file and force timestamp conditional option 2021-05-20 02:04:39 +03:00
Andrius Štikonas cd3fb17aa6 Unpack tarballs with --no-same-owner. 2021-05-08 13:53:42 +01:00
Andrius Štikonas a2c5745da4 helpers.sh: Add a helper function to call appropriate default stage function. 2021-05-03 23:48:06 +01:00
fosslinux 54234a5683 Add multiple tarball support, named args in rootfs.sh
1. Add named args to make this more clear and avoid unnessecarily
   setting default values for certain values ot set others positioned
   later.
2. Add support for multiple tarballs in rootfs.sh.
3. Add support for extracting multiple tarballs (name dosen't matter
   anymore) in helpers.sh.
4. Add comment for 4th arg to build.
2021-04-06 08:59:37 +10:00
Andrius Štikonas 70d1fc4163 Add support for DESTDIR variable in make install. 2021-04-02 12:24:40 +01:00
Paul Dersey 8565d26fef Update initial build of sed from version 4.0.7 to 4.0.9 2021-03-17 17:11:16 -04:00
Paul Dersey 6a5e57c2f8 helpers.sh: update default_src_unpack to support uncompressed tar files 2021-03-17 17:11:16 -04:00
Andrius Štikonas f3cea25b87 Rebuild musl with fewer patches. 2021-03-03 20:36:12 +00:00
Andrius Štikonas ecb6e4868a Be a bit more verbose when applying patches. 2021-03-02 22:02:07 +00:00
Andrius Štikonas 0be033fada Do remove empty checksum files. GNU sha256sum does not accept them. 2021-02-28 22:07:55 +00:00
Paul Dersey a6bc93b059 helpers.sh: fix default_src_unpack for tar 1.12
tar 1.12 does not support j for bzip2 or J for xz.
Instead use --use-compress-program
2021-02-24 16:02:53 -05:00
fosslinux 77ccf06efc Implement sha256summing in bash build harness
1. Adds sha256sum stage to the bash build harness.
2. Adds a third argument to build(), the checksum file name. This is
   used where there is more than one checksum file, most notably
   in multi-stage compilations.
3. Adds checksum files to all remaining programs.
4. Adds appropriate 3rd argument where needed (coreutils, tcc-musl,
   bison).
2021-02-20 10:52:54 +11:00
Andrius Štikonas c9a390d67c Update m4 to 1.4.7 2021-02-07 17:33:09 +00:00
Andrius Štikonas 9d5519ad79 Unset overridden functions at the end of build function. 2021-02-03 22:09:30 +00:00
Andrius Štikonas 066d32933d Fix src_unpack not being sourced. 2021-02-03 21:30:12 +00:00
Andrius Štikonas de9548dbff Build flex 2.5.11. 2021-01-30 19:27:02 +00:00
Andrius Štikonas 707328a15c Add bash based build harness. 2021-01-30 17:56:51 +00:00