Commit Graph

174 Commits

Author SHA1 Message Date
Andrius Štikonas e748d62a62 Build gperf statically
Build both static and shared libraries for:
* libunistring
* libatomic_ops
* libffi
* gc
2022-09-19 14:33:36 +01:00
Andrius Štikonas ee853d91fe
Merge pull request #200 from stikonas/which
Add which 2.21.
2022-09-17 14:31:30 +01:00
Andrius Štikonas 263dd982cc
Merge pull request #199 from rick-masters/fix-vars-to-make-automake
Provide same vars to make as configure in case make re-runs configure.
2022-09-17 11:29:13 +01:00
Andrius Štikonas 9f3f65f146 Add which 2.21. 2022-09-17 11:12:10 +01:00
rick-masters bbca0f1e81 Provide same vars to make as configure in case make re-runs configure. 2022-09-16 18:13:36 +00:00
Dor Askayo 9d84539a70 Set --libdir when configuring gettext 0.21 2022-09-16 00:04:38 +03:00
Dor Askayo 3e3f7036f2 Set --libdir when configuring curl 7.83.0 2022-09-16 00:01:48 +03:00
Dor Askayo 916541707a Set --libdir when configuring bison 2.3 2022-09-16 00:01:39 +03:00
Dor Askayo 4c75d729b5 Add symlink for ldd
musl's ldd functionality is built into its dynamic linker.
2022-09-15 09:16:56 +03:00
Dor Askayo 9bde9d1afe Rebuild musl 1.2.3 with support for dynamic linking
Now that GCC and binutils support musl's toolchain natively, musl can
have its dynamic linking support enabled without ill-effects.
2022-09-15 09:16:56 +03:00
Dor Askayo 238520fee7 Patch GCC 4.7.4 for native musl support
Backport upstream patches to enable native musl toolchain support in
GCC. Only the changes required for i386 were taken, excluding
changes for libgo and libfortran.

These patches enable binaries built using gcc and g++ to automatically
use musl's dynamic linker as their interpreter when present during the
build.
2022-09-14 12:37:32 +03:00
Dor Askayo 4113d60b24 Add binutils 2.38 2022-09-14 12:36:32 +03:00
Dor Askayo 5aae443d65 Add libtool 2.4.7
Instead of using the pre-generated "bootstrap" script, execute the
relevant bootstrap operations manually. This doesn't actually change
the build output; the final package hash remains identical.
2022-09-11 09:19:16 +03:00
Dor Askayo e9d53f1e6e Skip the libgo directory in GCC 4.7.4
This should avoid configuration errors caused by combining an older
automake that doesn't support Go with a newer libtool that does.

No change in package hash.
2022-09-11 09:19:16 +03:00
Dor Askayo 1663cb2940 Use --add-missing in manual invocation of automake
This is needed when using newer versions of libtool.

No change in package hash.
2022-09-11 09:19:16 +03:00
Dor Askayo 555a06b469 Create a symlink for GCC
This is required when the "CC" environment variable isn't set
explicitly, which is to be expected when using sysc_image in
downstream projects.
2022-09-02 22:09:38 +03:00
Andrius Štikonas 7e95cbbefb Switch to unversioned automake. 2022-07-07 20:43:53 +01:00
Andrius Štikonas 5209078684 Switch to unversioned autoconf.
Remove unversioned autoconf symlink from all but the latest autoconf.

This makes it clearer which autoconf is used.
2022-07-07 20:43:46 +01:00
fosslinux 5ad055d2d3 Fix bubblewrap mode 2022-06-18 09:10:11 +10: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
fosslinux 39541e30f5 Add ca-certificates-3.78
Contains all required certificates for curl/openssl.
2022-06-10 13:30:58 +10:00
fosslinux 01129d20c2 Add curl-7.83.0 sysc rebuild
Adds ssl support.
2022-06-10 13:30:58 +10:00
fosslinux 060f44e5a5 Add curl 7.83.0 2022-06-10 13:30:58 +10:00
Andrius Štikonas a23f9d76b0 Fix reproducibility of automake manpages.
Fixes #180
2022-06-08 23:54:23 +01:00
Andrius Štikonas 0b3782d61b Allow preseeding with binary packages. 2022-05-29 00:04:57 +01:00
Andrius Štikonas 9d15314ebc Checksum source tarballs during bootstrap. 2022-05-21 23:49:37 +01:00
Andrius Štikonas c6ca548d5b Add after.sh hook to sysc (similarly to after.kaem hook in stage0-posix). 2022-05-21 00:50:37 +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 8054f60a3c Use existing mounts in sysc when available
This would be the case when bubblewrap is used for sandboxing the
bootstrap.
2022-05-19 21:54:56 +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 d32d0f1d51 Improve reproducibility of XBPS packages
XBPS packages don't seem to have an option to manipulate file
permissions at package creation time.

So as a best effort, set the umask as soon as possible to ensure
file permissions are the same when running the bootstrap.

This is enough to allow reproducible XBPS packages when starting the
bootstrap with a umask different than 0022.
2022-05-15 10:46:18 +03:00
Dor Askayo 24e3fa3601 Fix libtool archive reproducibility
This makes the order of objects in archives created by libtool
consistent.

It is known to affect cases where the *_LIBADD automake variable is
used to add extra objects from a separate archive.

Fixing this allows us to remove a few workarounds.
2022-05-15 00:35:39 +03:00
Andrius Štikonas 98ba2759b2 Upgrade musl to 1.2.3. 2022-05-12 00:41:17 +01:00
Andrius Štikonas 6c4b98a17a Some shellcheck fixes. 2022-05-09 22:53:46 +01: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 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
fosslinux acf713595c Update zlib to 1.2.12 2022-05-04 11:28: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
Andrius Štikonas 7a8567dc78 Rename /after to /sysa. 2022-04-11 18:53:35 +01:00
fosslinux 7366647595 Update stage0-posix, help2man fix, refactor
- stage0-posix update to correctly exist on fail.
- help2man reproducibility fix for month.
- refactor some bits into functions.
2022-04-05 20:25:40 +10:00
fosslinux b760b3eb2b Final fixes:
- All QEMU reproducibility issues resolved
- Added SPDX licensing
- Couple other small issues
- Fix guile reproducbility
2022-03-12 16:24:25 +11:00
fosslinux 9543a47f1b Fix up checksums + other fixes 2022-03-12 16:23:24 +11:00
fosslinux e7c39af4b9 Final reproducibility fixes 2022-03-07 19:02:12 +11:00
fosslinux 931490551a Fix a variety of reproducibility issues
Include:
- Not regenerated man pages.
- Automake tarball with bad time (and completely useless).
- Ordering of files within tarballs.
- Resetting timestamp various fixes.
- Older tars not properly overwriting files leading to many issues.
- Weird lack of reproducibility in libtool scripts paths to tools.
- and more
2022-03-07 19:02:12 +11:00
fosslinux a343dcf6ed Add new tarball-based checksums to all packages 2022-03-07 19:02:12 +11:00
fosslinux 968d2ea7d1 Introduce packaging support
Utilising previously introduced DESTDIR support, everything is installed
to aformentioned DESTDIR.

Prior to the building of XBPS, we use gzip compressed tarballs as
packages. This requires a lot of strange hacks especially for old tar +
gzip (timestamps, etc causing reproducibility problems). Then we use
XBPS once built.
2022-03-07 19:02:12 +11:00
fosslinux f4d43e2113 Make tar installable under packaging 2022-03-07 19:02:12 +11:00
fosslinux 0b7bd2a46d Fix gcc-4.7.4 mis-versioning error occuring under packaging 2022-03-07 19:02:12 +11:00
fosslinux c64367f608 Merge /usr/sbin and /usr/bin
Required for some stupid build system (and is also better for us).
2022-03-07 19:02:12 +11:00
fosslinux b8ef19150c Fix various things to use ${DESTDIR} 2022-03-07 19:02:12 +11:00
fosslinux a1520a07fa Add xbps-0.59.1.
This also required

- merging of usr/sbin and usr/bin (which should be done anyway), because
  of a dodgy PATH searcher
- moving of zlib earlier.
2022-03-07 19:02:12 +11:00
fosslinux 94069328ec Fix libdir of bison and flex. 2022-03-07 19:02:12 +11:00
fosslinux bdd0227fdd Add openssl 1.1.1l. 2022-03-07 19:02:12 +11:00
fosslinux a8cdecdfbd Add libarchive 3.5.2. 2022-03-07 19:02:12 +11:00
Dor Askayo 7ecad37d87 Avoid the creation of some dev nodes in chroot mode
In rootless boostrap, dev nodes must be mounted before starting the
bootstrap process. However, some of these aren't necessarily mounted,
such as when relying upon BuildStream's sandbox.

Since these are not actually required for either a rootless or
chroot-based bootstrap, simply avoid them.
2022-01-17 14:19:30 +02:00
Dor Askayo b03f3e11c0 Use rm -f to avoid interactive prompts
This is required when not running as root to avoid prompts when
removing read-only files.
2022-01-17 14:09:29 +02:00
fosslinux 5dbf82e8e4 A couple of fixes wrt bootstrap.cfg
Correctly source. export so that scripts can access.
2021-10-14 21:31:45 +11:00
fosslinux b0f9c00ef3 Make guile build work on chroot 2021-10-14 21:30:33 +11:00
fosslinux 622b4de875 Fix guile.
- The date reproducibility issue was not actually set to any date, which
  could cause issues in the fiture, fix that sed.
- Fix a reproducibility issue (under QEMU), where the ordering of files
  within libguile can be random. This also affects guile binary so we
  need to rebuild that.
- Some change in kernel versions means that guile binary is
  significantly different in newer kernel versions. Because we cannot
  know the version of the host under chroot mode we must disable guile
  checksum entirely.
- Update checksums accordingly.
2021-10-13 17:57:50 +01:00
Andrius Štikonas afa162397c Add autoconf 2.71. 2021-10-10 22:55:41 +01:00
Andrius Štikonas c6c8a1eb7f Move chroot transition script inside bootstrap. 2021-10-10 16:38:52 +01:00
Andrius Štikonas 097cb2d72f Remove pre-built java file. 2021-10-09 01:13:25 +01:00
Andrius Štikonas e3d0191949 Update stage0-posix. 2021-10-08 20:55:06 +01:00
Andrius Štikonas 8857f53cd1 GNU Guile 3.0.7 2021-09-20 14:25:54 +10:00
Andrius Štikonas de582f1866 Boehm-gc 8.0.4 2021-09-20 14:25:53 +10:00
Andrius Štikonas e1350d1745 libatomic_ops 7.6.10. 2021-09-20 14:25:53 +10:00
Andrius Štikonas bdab13eb60 libffi 3.3 2021-09-20 14:25:53 +10:00
fosslinux 04180f5672 Various fixes + cleanup.
- Add parts.rst documentation for Linux kernel.
- Completely fix problems caused by new bootstrap, update checksums for
  /usr.
- Globalise populate_device_nodes.
- Enable deblobbing.
2021-09-14 14:59:08 +10:00
fosslinux b93a931a53 Move to /usr prefix.
- This is much more standard and replaces /image in sysa and is the
  standard in sysc (avoids many issues).
- GCC needs to have a file created for some unknown reason.
- Checksums updated.
2021-08-27 14:54:08 +10: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