Git Product home page Git Product logo

live-bootstrap's Introduction

live-bootstrap

An attempt to provide a reproducible, automatic, complete end-to-end bootstrap from a minimal number of binary seeds to a supported fully functioning operating system.

How do I use this?

Quick start:

See ./rootfs.py --help and follow the instructions given there. This uses a variety of userland tools to prepare the bootstrap.

(Currently, there is no way to perform the bootstrap without external preparations! This is a currently unsolved problem.)

Without using Python:

  1. git clone https://github.com/fosslinux/live-bootstrap

  2. git submodule update --init --recursive

  3. Consider whether you are going to run this in a chroot, in QEMU, or on bare metal. (All of this can be automated, but not in a trustable way. See further below.) a. chroot: Create a directory where the chroot will reside, run

    ./download-distfiles.sh, and copy: * The entire contents of seed/stage0-posix into that directory. * All other files in seed into that directory. * steps/ and distfiles/ into that directory.

    • At least all files listed in steps/pre-network-sources must be copied in. All other files will be obtained from the network.
    • Run /bootstrap-seeds/POSIX/x86/kaem-optional-seed in the chroot. (Eg, chroot rootfs /bootstrap-seeds/POSIX/x86/kaem-optional-seed).
    1. QEMU: Create two blank disk images. * Generate builder-hex0-x86-stage1.img from hex0 source:

      sed 's/[;#].*$//g' builder-hex0/builder-hex0-x86-stage1-hex0 | xxd -r -p

      • On the first image, write builder-hex0-x86-stage1.img to it, followed by kernel-bootstrap/builder-hex0-x86-stage2.hex0, followed by zeros padding the disk to the next sector.

      • distfiles can be obtained using ./download-distfiles.sh.

      • See the list in part a. For every file within that list, write a line to the disk src <size-of-file> <path-to-file>, followed by the contents of the file. * Only copy distfiles listed in sources files for build: steps

        manifested before improve: get_network into this disk.

      • Optionally (if you don't do this, distfiles will be network downloaded): * On the second image, create an MSDOS partition table and one ext3

        partition.

        • Copy distfiles/ into this disk.
      • Run QEMU, with 4+G RAM, optionally SMP (multicore), both drives (in the order introduced above), a NIC with model E1000 (-nic user,model=e1000), and -machine kernel-irqchip=split.

    c. Bare metal: Follow the same steps as QEMU, but the disks need to be two different physical disks, and boot from the first disk.

Background

Problem statement

live-bootstrap's overarching problem statement is;

> How can a usable Linux system be created with only human-auditable, and wherever possible, human-written, source code?

Clarifications:

  • "usable" means a modern toolchain, with appropriate utilities, that can be used to expand the amount of software on the system, interactively, or non-interactively.
  • "human-auditable" is discretionary, but is usually fairly strict. See "Specific things to be bootstrapped" below.

Why is this difficult?

The core of a modern Linux system is primarily written in C and C++. C and C++ are self-hosting, ie, nearly every single C compiler is written in C.

Every single version of GCC was written in C. To avoid using an existing toolchain, we need some way to be able to compile a GCC version without C. We can use a less well-featured compiler, TCC, to do this. And so forth, until we get to a fairly primitive C compiler written in assembly, cc_x86.

Going up through this process requires a bunch of other utilities as well; the autotools suite, guile and autogen, etc. These also have to be matched appropriately to the toolchain available.

Why should I care?

That is outside of the scope of this README. Here’s a few things you can look at:

Specific things to be bootstrapped

GNU Guix is currently the furthest along project to automate bootstrapping. However, there are a number of non-auditable files used in many of their packages. Here is a list of file types that we deem unsuitable for bootstrapping.

  1. Binaries (apart from seed hex0, kaem, builder-hex0).
  2. Any pre-generated configure scripts, or Makefile.in’s from autotools.
  3. Pre-generated bison/flex parsers (identifiable through a .y file).
  4. Any source code/binaries downloaded within a software’s build system that is outside of our control to verify before use in the build system.
  5. Any non-free software. (Must be FSF-approved license).

How does this work?

For a more in-depth discussion, see parts.rst.

Firstly, builder-hex0 is launched. builder-hex0 is a minimal kernel that is written in hex0, existing in 3 self-bootstrapping stages.

This is capable of executing the entirety of stage0-posix, (see seed/stage0-posix), which produces a variety of useful utilities and a basic C language, M2-Planet.

stage0-posix runs a file called after.kaem. This is a shell script that builds and runs a small program called script-generator. This program reads steps/manifest and converts it into a series of shell scripts that can be executed in sequence to complete the bootstrap.

From this point forward, steps/manifest is effectively self documenting. Each package built exists in steps/<pkg>, and the build scripts can be seen there.

live-bootstrap's People

Contributors

ajherchenroder avatar bauen1 avatar bittorf avatar doraskayo avatar eduardosm avatar emilytrau avatar fgeorgatos avatar fosslinux avatar gbrlwck avatar googulator avatar maxhearnden avatar melg8 avatar mid-kid avatar nanonyme avatar pder avatar pyy avatar rick-masters avatar stikonas avatar tonalidadehidrica avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

live-bootstrap's Issues

Random failures in sysa help2man 1.36.4

help2man-1.36.4: beginning build using script help2man-1.36.4.sh
help2man-1.36.4: getting sources.
help2man-1.36.4.tar.gz: OK
help2man-1.36.4: unpacking source.
help2man-1.36.4: preparing source.
Applying patch: /sysa/help2man-1.36.4/patches/date.patch
patching file help2man.PL
help2man-1.36.4: configuring source.
checking for perl... perl
checking for a BSD-compatible install... /usr/bin/install -c
checking for makeinfo... :
checking for install-info... :
configure: creating ./config.status
config.status: creating Makefile
help2man-1.36.4: compiling source.
perl help2man.PL
Extracting help2man (with variable substitutions)
make help2man
make[1]: Entering directory `/sysa/help2man-1.36.4/build/help2man-1.36.4'
make[1]: `help2man' is up to date.
make[1]: Leaving directory `/sysa/help2man-1.36.4/build/help2man-1.36.4'
./help2man --include=./help2man.h2m \
    --output=help2man.1 ./help2man
make: ./x86/bin/kaem: Shell program not found
make: *** [help2man.1] Error 127
Subprocess error 2

Installing grep is broken

When grep is installed, it fails (at least if checksumming is working, right now is broken).

During installation we do reset timestamps by touching but old touch dereferences symlinks, so touches /usr/bin/grep which becomes an empty file. Later checksumming fails as grep exists but is not executable.

Probably the best way to proceed is to implement touch --no-dereference in coreutils 5.0.

automake-1.13.4: infrequently 4% ABORT: doc/amhello-1.0.tar.gz: recipe failed.

seen with 2423b77 and qemu-386 with kernel 3.18.140 and 3G RAM.

see:
http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-6-1618349045.txt

01h18m10s | automake-1.13.4: compiling source.
01h18m10s | test -f doc/.dirstamp || make  doc/.dirstamp
01h18m10s | make[1]: Entering directory `/after/automake-1.13.4/build/automake-1.13.4'
01h18m11s | make[1]: Leaving directory `/after/automake-1.13.4/build/automake-1.13.4'
01h18m11s | Updating ./doc/version.texi
01h18m11s | GEN      automake
01h18m11s | GEN      aclocal
01h18m11s | GEN      t/ax/shell-no-trail-bslash
01h18m11s | GEN      runtest
01h18m11s | GEN      doc/aclocal.1
01h18m11s | GEN      doc/automake.1
01h18m11s | GEN      lib/Automake/Config.pm
01h18m11s | GEN      doc/aclocal-1.13.1
01h18m11s | GEN      doc/automake-1.13.1
01h18m12s | GEN      doc/amhello-1.0.tar.gz
01h18m17s | doc/amhello-1.0.tar.gz: recipe failed.
01h18m17s | See file '/after/automake-1.13.4/build/automake-1.13.4/doc/amhello/amhello-output.tmp' for details
01h18m17s | make: *** [doc/amhello-1.0.tar.gz] Error 1
01h18m17s | Subprocess error 512
01h18m17s | ABORTING HARD

automake-1.15.1: infrequently 0.5% ABORT: doc/amhello-1.0.tar.gz: recipe failed.

seen with 31caabd and qemu-386 with kernel 3.18.140 and 3G RAM.

see: (320 Megabytes)
http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-16-1619558854.xz

[...]
01h14m06s | automake-1.15.1: compiling source.
01h14m06s | make[1]: Entering directory `/after/automake-1.15.1/build/automake-1.15.1'
01h14m06s | make[1]: Leaving directory `/after/automake-1.15.1/build/automake-1.15.1'
01h14m06s | called date binary with: '' in '/after/automake-1.15.1/build/automake-1.15.1'
01h14m06s | called date binary result 'Tue Apr 27 22:41:39  2021'
01h14m06s | Updating ./doc/version.texi
01h14m06s | MAKEINFO doc/automake-history.info
01h14m06s | GEN      bin/automake
01h14m06s | GEN      bin/aclocal
01h14m06s | GEN      t/ax/shell-no-trail-bslash
01h14m06s | GEN      t/ax/cc-no-c-o
01h14m07s | GEN      runtest
01h14m07s | GEN      doc/aclocal.1
01h14m07s | GEN      doc/automake.1
01h14m07s | GEN      lib/Automake/Config.pm
01h14m07s | GEN      doc/aclocal-1.15.1
01h14m07s | GEN      doc/automake-1.15.1
01h14m08s | GEN      doc/amhello-1.0.tar.gz
01h14m13s | doc/amhello-1.0.tar.gz: recipe failed.
01h14m13s | See file '/after/automake-1.15.1/build/automake-1.15.1/doc/amhello/amhello-output.tmp' for details
01h14m13s | make: *** [doc/amhello-1.0.tar.gz] Error 1
01h14m13s | # end of call src_compile:2

the content of the resulting file amhello-output.tmp is:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal-1.15 --force 
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: autoconf --force
autoreconf: running: autoheader --force
autoreconf: running: automake-1.15 --add-missing --copy --force-missing
configure.ac:7: installing './compile'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
src/Makefile.am: installing './depcomp'
autoreconf: Leaving directory `.'
checking for a BSD-compatible install... /after/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /after/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... tcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/after/automake-1.15.1/build/automake-1.15.1/doc/amhello':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

autoconf-2.57: infrequently 6% ABORT: autom4te.cfg: No such file or directory

seen with dcec416 and qemu-386 with kernel 3.18.140 and 3G RAM
see: http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-9.txt
see: normal/OK run: http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-22-1617824223.txt

happens in about 6% (12 out of 193 runs)

[...]
01h50m15s | autoconf-2.57: compiling source.
01h50m15s | Making all in bin
01h50m15s | make[1]: Entering directory `/after/autoconf-2.57/build/autoconf-2.57/bin'
01h50m15s | rm -f autom4te autom4te.tmp
01h50m15s | sed -e 's,@SHELL\@,/bin/sh,g' -e 's,@PERL\@,/after/bin/perl,g' -e 's,@bindir\@,/after/bin,g' -e 's,@datadir\@,/after/share/autoconf-2.57,g' -e 's,@prefix\@,/after,g' -e 's,@autoconf-name\@,'`echo autoconf | sed 's,$,-2.57,'`',g' -e 's,@autoheader-name\@,'`echo autoheader | sed 's,$,-2.57,'`',g' -e 's,@autom4te-name\@,'`echo autom4te | sed 's,$,-2.57,'`',g' -e 's,@M4\@,/after/bin/m4,g' -e 's,@AWK\@,gawk,g' -e 's,@VERSION\@,2.57,g' -e 's,@PACKAGE_NAME\@,GNU Autoconf,g' ./autom4te.in >autom4te.tmp
01h50m15s | chmod +x autom4te.tmp
01h50m15s | mv autom4te.tmp autom4te
01h50m15s | ../tests/autom4te --language M4sh --cache '' ./autoconf.as -o autoconf.in
01h50m15s | autom4te: cannot open /after/autoconf-2.57/build/autoconf-2.57/lib/autom4te.cfg: No such file or directory
01h50m15s | at /after/autoconf-2.57/build/autoconf-2.57/bin/autom4te line 455
01h50m15s | make[1]: *** [autoconf.in] Error 1
01h50m15s | make[1]: Leaving directory `/after/autoconf-2.57/build/autoconf-2.57/bin'
01h50m15s | make: *** [all-recursive] Error 1
01h50m15s | Subprocess error 512
01h50m15s | ABORTING HARD

Patch with wstrcpy for heirloom-devtools lex should zero terminate string

The wide character patch for lex in heirloom-devtools-070525 does not zero terminate strings. It only works if the destination buffer is zero initialized, but that is not necessarily the case. On the fiwix kernel, the buffer gets non-zero data from the process stack, so the string is not properly terminated, resulting in bad lexer output and a compilation error.

Make it possible to run without sudo

I'm testing on a Docker image running NixOS which does not have sudo installed, but even if I do have it, since /etc/sudoers doesn't exist, sudo fails:

Mounting tmpfs on ./temp
sudo: unable to stat /etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Bootstrapping failed
Unmounting tmpfs from ./temp
sudo: unable to stat /etc/sudoers: No such file or directory
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Bootstrapping failed
Exception ignored in: <function SysA.__del__ at 0x7fa8a057fca0>
Traceback (most recent call last):
  File "/root/live-bootstrap/sysa.py", line 39, in __del__
    umount(self.tmp_dir)
  File "/root/live-bootstrap/lib/utils.py", line 34, in umount
    run('sudo', 'umount', target, **kwargs)
  File "/root/live-bootstrap/lib/utils.py", line 26, in run
    sys.exit(1)
SystemExit: 1

To reproduce:

$ docker run --rm -it lnl7/nix
bash-4.4# nix-shell -p git sudo
[nix-shell:/]# cd ~ && git clone --recursive https://github.com/fosslinux/live-bootstrap && cd live-bootstrap
[nix-shell:~/live-bootstrap]# nix-shell -I nixpkgs=channel:nixpkgs-unstable -p python3 python38Packages.requests qemu linuxPackages_4_4.kernel --run 'python3 ./rootfs.py --chroot --force_timestamps --tmpdir ./temp'

Fix warning

It would be nice to fix the following warning:
Use of uninitialized value in concatenation (.) or string at /after/lib/perl5/5.6.2/Errno.pm line 11.

It seems to be harmless but printed many times.

Binutils autogen

Binutils also uses autogen + guile for top level Makefile, almost exactly in the same way as #78.

ca-certificates fails due to expired certificates

When a certificate expires in the ca-certificates package that certificate is excluded from the package which results in a different package checksum, which fails the build.

I have a PR forthcoming which uses a special keyword IGNORECHECKSUM in place of the checksum in SHA256SUMS.pkgs which fixes this in the least invasive way I can think of. This would need to be replaced every time checksums are regenerated. Perhaps someone has a better idea...

RFC: Using VCS snapshots

Despite the best of our ability, sometimes pregenerated files manage to slip through the cracks, such as with coreutils 5.0 today, there's been a couple other cases too.

Perhaps it would be a better idea to source all of our distfiles from VCS (normally git) snapshots?

Git snapshots are less likely to have pregenerated files generally speaking. They will obviously still have some in some cases, but there is less margin for manual auditing error not finding pregenerated files.

Thoughts?

Clarification on 32-bit kernel requirement

Hello,

I am attempting to extend this project to AArch64, and just had a question. Could someone clarify technically why the README states

Provide a kernel (vmlinuz file) as the name kernel in the root of the repository. This must be a 32-bit kernel.

Is it just because the only support architecture at this point is x86?

Thanks!

libtool-2.2.4: infrequently 4% ABORT: cp: cannot stat `vti.tmp': No such file or directory | make[2]: *** [doc/stamp-vti] Error 1

seen with dcec416 and qemu-386 with kernel 3.18.140 and 3G RAM
happens in about 4% (24 testruns)

bad: http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-3-1617888807.txt
good: http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-4-1617888807.txt

strange: text seems somehow mangled?!

00h59m22s | make  install-recursive
00h59m22s | make[1]: Entering directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | make[2]: Enterimake[1]: Entering directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | ng directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | test -f doc/.dirstamp || make doc/.dirstamp
00h59m22s | make[2]: Entering directory `/after/libtool-2.2.4/builmake[3]: Entering directory `/after/libtd/libtool-2.2.4'
00h59m22s | test -f doc/.dirstamp || make doc/.dirstamp
00h59m22s | ool-2.2.4/build/libtool-2.2.4'
00h59m22s | make[3]: Leaving directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | make[3]: Entering directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | make[3]: `doc/.dirstamp' is up to date.
00h59m22s | make[3]: Leaving directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | Updating ./doc/versioUpdating ./doc/ven.texi
00h59m22s | source='libltdl/loaders/preopen.c' object='libltdl/loaders/libltdl_libltdl_la-preopen.lo' libtool=yes \
00h59m22s | DEPDIR=.deps depmode=icc /bin/sh ./libltdl/confrsion.texi
00h59m22s | cp: cannot stat `vti.tmp': No such file or directory
00h59m22s | make[2]: *** [doc/stamp-vti] Error 1
00h59m22s | make[2]: Leaving directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | make[1]: *** [install-recursive] Error ig/depcomp \
00h59m22s | /bin/sh ./libtool --tag=CC --mode=compile tcc -DHAVE_CONFIG_H -I. -I. -I.  -DLT1
00h59m22s | make[1]: Leaving directory `/after/libtool-2.2.4/build/libtool-2.2.4'
00h59m22s | make: *** [install]DLOPEN=libltdl -DLT_CONFIG_H='<config.h>' -DLTDL -I. -I. -Ilibltdl -I./libltdl -I./libltdl Error 2
00h59m22s | Subprocess error 512
00h59m22s | ABORTING HARD

gcc-4.0.4: infrequently 0.5% ABORT: run.sh: line 72: cd: libcpp: error 02

seen with a6630ff and qemu-386 with kernel 3.18.140 and 3G RAM.

see:
http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-2-1618438037.txt

[...]
00h59m06s | checking for sysmp... no
00h59m06s | checking for getsysinfo... no
00h59m06s | checking for table... no
00h59m06s | checking for sysctl... no
00h59m06s | checking for __fsetlocking... yes
00h59m06s | checking whether canonicalize_file_name must be declared... yes
00h59m06s | checking for stdlib.h... (cached) yes
00h59m06s | checking for unistd.h... (cached) yes
00h59m06s | checking for getpagesize... (cached) yes
00h59m06s | checking for working mmap... yes
00h59m06s | checking for working strncmp... yes
00h59m06s | configure: creating ./config.status
00h59m06s | config.status: creating Makefile
00h59m06s | config.status: creating testsuite/Makefile
00h59m06s | config.status: creating config.h
00h59m06s | config.status: executing default commands
00h59m06s | run.sh: line 72: cd: libcpp: error 02
00h59m06s | Subprocess error 256
00h59m06s | ABORTING HARD

End-state goals docs

This project is great! I love that it can take me from almost-nothing to a fairly complete OS.

One bit that's unclear to me is what the goals are for the built environment. Obviously not every package in the world should be added--so it'd be great to document at what stage it would be considered complete. Some possibilities:

  1. Build enough to self-host: A kernel, python with requests, qemu
  2. Build the prerequisites for some system that allows installing more software from source: Gentoo Prefix, pkgsrc, etc
  3. Build enough to bootstrap some other distro: Linux From Scratch, GUIX, Gentoo (via bootstrap-portage), Debian (with rebootstrap), NetBSD (with build.sh), etc

Would love to hear your thoughts.

findutils-4.2.33: infrequently 0.5% ABORT: make: *** No targets specified and no makefile found. Stop.

seen with a6630ff and qemu-386 with kernel 3.18.140 and 3G RAM.

see:
http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-2-1618409001.txt

[...]
00h53m51s | - invoke gl_INIT in ./configure.in.
00h53m53s | /after/share/aclocal/ltdl.m4:27: warning: underquoted definition of AC_LIB_LTDL
00h53m53s | run info '(automake)Extending aclocal'
00h53m53s | or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
00h53m53s | /after/share/aclocal/ltdl.m4:58: warning: underquoted definition of AC_LTDL_ENABLE_INSTALL
00h53m53s | /after/share/aclocal/ltdl.m4:68: warning: underquoted definition of AC_LTDL_SYS_DLOPEN_DEPLIBS
00h53m53s | /after/share/aclocal/ltdl.m4:94: warning: underquoted definition of AC_LTDL_SHLIBEXT
00h53m53s | /after/share/aclocal/ltdl.m4:114: warning: underquoted definition of AC_LTDL_SHLIBPATH
00h53m53s | /after/share/aclocal/ltdl.m4:126: warning: underquoted definition of AC_LTDL_SYSSEARCHPATH
00h53m53s | /after/share/aclocal/ltdl.m4:150: warning: underquoted definition of AC_LTDL_OBJDIR
00h53m53s | /after/share/aclocal/ltdl.m4:172: warning: underquoted definition of AC_LTDL_DLPREOPEN
00h53m53s | /after/share/aclocal/ltdl.m4:190: warning: underquoted definition of AC_LTDL_DLLIB
00h53m53s | /after/share/aclocal/ltdl.m4:221: warning: underquoted definition of AC_LTDL_SYMBOL_USCORE
00h53m53s | /after/share/aclocal/ltdl.m4:260: warning: underquoted definition of AC_LTDL_DLSYM_USCORE
00h53m53s | /after/share/aclocal/libtool.m4:153: warning: underquoted definition of _LT_AC_CHECK_DLFCN
00h53m53s | /after/share/aclocal/libtool.m4:508: warning: underquoted definition of _LT_AC_TRY_DLOPEN_SELF
00h53m53s | /after/share/aclocal/libtool.m4:595: warning: underquoted definition of AC_LIBTOOL_DLOPEN_SELF
00h54m42s | findutils-4.2.33: configuring source.
00h54m42s | findutils-4.2.33: compiling source.
00h54m42s | make: *** No targets specified and no makefile found.  Stop.
00h54m42s | Subprocess error 512
00h54m42s | ABORTING HARD

coreutils-5.0: Use of generated `false.c`, `dircolors.h`, `wheel.h`, `wheel-size.h`

When looking at coreutils-5.0, the build uses 4 pre-generated files that are not part of the source repository.

  • false.c: Can probably be generated from true.c via sed or patch

  • dircolors.c: Can probably be stubbed, or the functionality patched out.

  • wheel{,-size}.h: Probably exclude factor from the binaries to generate?

I did not look at coreutils-6.10 yet, so maybe there are similar pre-generated files.

automake-1.13.4: infrequently 20% ABORT: Argument "" isn't numeric in bitwise and (&) at ./gen-testsuite-part line 67.

seen with dcec416 and qemu-386 with kernel 3.18.140 and 3G RAM
happens in about 20% (24 testruns)

bad: http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-1-1617888807.txt
good: http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-4-1617888807.txt

01h12m46s | automake-1.13.4: compiling source.
01h12m46s | GEN      t/testsuite-part.am
01h12m47s | Argument "" isn't numeric in bitwise and (&) at ./gen-testsuite-part line 67.
01h12m47s | make: *** [t/testsuite-part.am] Error 2
01h12m47s | Subprocess error 512
01h12m47s | ABORTING HARD

automake-1.15.1 failed to build

Probably some race condition

automake-1.15.1: compiling source.
make[1]: Entering directory `/usr/src/automake-1.15.1/build/automake-1.15.1'
make[1]: Leaving directory `/usr/src/automake-1.15.1/build/automake-1.15.1'
Updating ./doc/version.texi
  MAKEINFO doc/automake.info
  MAKEINFO doc/automake-history.info
  GEN      bin/automake
  GEN      bin/aclocal
  GEN      t/ax/shell-no-trail-bslash
  GEN      t/ax/cc-no-c-o
  GEN      runtest
  GEN      doc/aclocal.1
  GEN      doc/automake.1
  GEN      lib/Automake/Config.pm
  GEN      doc/aclocal-1.15.1
  GEN      doc/automake-1.15.1
  GEN      doc/amhello-1.0.tar.gz
doc/amhello-1.0.tar.gz: recipe failed.
See file '/usr/src/automake-1.15.1/build/automake-1.15.1/doc/amhello/amhello-output.tmp' for details
make: *** [doc/amhello-1.0.tar.gz] Error 1

findutils-4.2.33: infrequently 0.5% ABORT: make[2]: sh: Command not found

seen with 2423b77 and qemu-386 with kernel 3.18.140 and 3G RAM.

see:
http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-12-1618333812.txt

00h58m27s | Reading makefiles...
00h58m27s | Updating goal targets....
00h58m27s | File `all' does not exist.
00h58m27s | Prerequisite `gnulib-version.sh' is newer than target `gnulib-version.c'.
00h58m27s | Must remake target `gnulib-version.c'.
00h58m27s | make[2]: Entering directory `/after/findutils-4.2.33/build/findutils-4.2.33/lib'
00h58m27s | sh ./gnulib-version.sh .. .  ../import-gnulib.config
00h58m27s | make[2]: sh: Command not found
00h58m27s | make[2]: *** [gnulib-version.c] Error 127
00h58m27s | make[2]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33/lib'
00h58m27s | make[1]: *** [all-recursive] Error 1
00h58m27s | make[1]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33'
00h58m27s | make: *** [all] Error 2
00h58m27s | Subprocess error 512
00h58m27s | ABORTING HARD

findutils-4.2.33: infrequently 0.5% ABORT: make[2]: sh: Command not found

seen with f592186 (stikonas/unar) and qemu-386 with kernel 3.18.140 and 3G RAM.

see:
http://intercity-vpn.de/bootstrap/bootstrap.log-multilog-8-1618712725

[...]
00h55m20s | DEPDIR=.deps depmode=icc /bin/sh ../../depcomp \
00h55m20s | tcc -DHAVE_CONFIG_H -I. -I. -I../..  -I../../intl -D__UCLIBC__  -g -c alloca.c
00h55m20s | rm -f libgnulib.a
00h55m20s | ar cru libgnulib.a areadlink-with-size.o file-set.o fpurge.o freadahead.o freading.o hash-pjw.o hash-triple.o localcharset.o malloca.o openat-die.o progname.o xalloc-die.o xstrndup.o xstrtoumax.o argmatch.o basename.o canonicalize.o canonicalize-lgpl.o chdir-long.o close-stream.o closein.o closeout.o creat-safer.o dirname.o dup-safer.o error.o exitfail.o fd-safer.o filemode.o filenamecat.o fnmatch.o fopen-safer.o getcwd.o getopt.o getopt1.o hash.o human.o idcache.o modechange.o mountlist.o open-safer.o openat-proc.o pipe-safer.o quote.o quotearg.o regex.o rpmatch.o same.o save-cwd.o savedir.o strftime.o stripslash.o xgetcwd.o xmalloc.o xstrtol.o xstrtol-error.o xstrtoul.o yesno.o alloca.o
00h55m20s | ranlib libgnulib.a
00h55m20s | rm -f t-charset.alias charset.alias
00h55m20s | /bin/sh ./config.charset 'i486-pc-linux-gnuaout' > t-charset.alias
00h55m20s | mv t-charset.alias charset.alias
00h55m20s | rm -f t-ref-add.sed ref-add.sed
00h55m20s | sed -e '/^#/d' -e 's/@''PACKAGE''@/findutils/g' ref-add.sin > t-ref-add.sed
00h55m20s | mv t-ref-add.sed ref-add.sed
00h55m20s | rm -f t-ref-del.sed ref-del.sed
00h55m20s | sed -e '/^#/d' -e 's/@''PACKAGE''@/findutils/g' ref-del.sin > t-ref-del.sed
00h55m20s | mv t-ref-del.sed ref-del.sed
00h55m20s | make[4]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33/gnulib/lib'
00h55m20s | make[3]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33/gnulib/lib'
00h55m20s | make[3]: Entering directory `/after/findutils-4.2.33/build/findutils-4.2.33/gnulib'
00h55m20s | make[3]: Nothing to be done for `all-am'.
00h55m20s | make[3]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33/gnulib'
00h55m20s | make[2]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33/gnulib'
00h55m20s | Making all in lib
00h55m20s | make[2]: Entering directory `/after/findutils-4.2.33/build/findutils-4.2.33/lib'
00h55m20s | sh ./gnulib-version.sh .. .  ../import-gnulib.config
00h55m20s | make[2]: sh: Command not found
00h55m20s | make[2]: *** [gnulib-version.c] Error 127
00h55m20s | make[2]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33/lib'
00h55m20s | make[1]: *** [all-recursive] Error 1
00h55m20s | make[1]: Leaving directory `/after/findutils-4.2.33/build/findutils-4.2.33'
00h55m20s | make: *** [all] Error 2
00h55m20s | Subprocess error 512
00h55m20s | ABORTING HARD

automake-1.11.2_0.tar.bz2 is not reproducible

--- tmp/sysc/usr/src/repo/automake-1.11.2_0.tar.bz2
+++ ../repo/automake-1.11.2_0.tar.bz2
├── automake-1.11.2_0.tar
│ ├── file list
│ │ @@ -131,15 +131,15 @@
│ │  -rw-r--r--   0        0        0   315814 1970-01-01 00:00:00.000000 ./usr/share/automake-1.11/texinfo.tex
│ │  -rwxr-xr-x   0        0        0     6383 1970-01-01 00:00:00.000000 ./usr/share/automake-1.11/ylwrap
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/share/doc/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/share/doc/automake/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/share/info/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/share/man/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/share/man/man1/
│ │ --rw-r--r--   0        0        0     2399 1970-01-01 00:00:00.000000 ./usr/share/man/man1/aclocal-1.11.1
│ │ +-rw-r--r--   0        0        0     2398 1970-01-01 00:00:00.000000 ./usr/share/man/man1/aclocal-1.11.1
│ │  -rw-r--r--   0        0        0       24 1970-01-01 00:00:00.000000 ./usr/share/man/man1/aclocal.1
│ │  -rw-r--r--   0        0        0     3655 1970-01-01 00:00:00.000000 ./usr/share/man/man1/automake-1.11.1
│ │  -rw-r--r--   0        0        0       25 1970-01-01 00:00:00.000000 ./usr/share/man/man1/automake.1
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/src/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/src/automake-1.11.2/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/src/automake-1.11.2/build/
│ │  drwxr-xr-x   0        0        0        0 1970-01-01 00:00:00.000000 ./usr/src/automake-1.11.2/build/automake-1.11.2/
│ ├── ./usr/share/man/man1/aclocal-1.11.1
│ │ @@ -1,9 +1,9 @@
│ │  .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
│ │ -.TH ACLOCAL "1" "June 2022" "aclocal 1.11.2" "User Commands"
│ │ +.TH ACLOCAL "1" "May 2022" "aclocal 1.11.2" "User Commands"
│ │  .SH NAME
│ │  aclocal \- manual page for aclocal 1.11.2
│ │  .SH SYNOPSIS
│ │  .B aclocal
│ │  [\fIOPTIONS\fR] ...
│ │  .SH DESCRIPTION
│ │  Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'

gcc: Regenerate prebuilt files

The following files are generated:

  • Makefile.in
  • fixincludes/fixincl.x

Both of them need GNU Autogen which depends on GNU Guile. I.e. very non-trivial to build it.

Possible alternative: downgrade GCC to something old enough (3.x) that does not have these files. This only postpones bootstrap of Guile, although, it might be necessary if we can't build Guile/autogen with tinycc.

See also:

rootfs.py -q --external-sources is broken

Installing packages into sysc
coreutils-5.0: installing package
sed-4.0.9: installing package
autoconf-2.64: installing package
automake-1.10.3: installing package
binutils-2.14: installing package
bzip2-1.0.8: installing package
bison-3.4.1: installing package
coreutils-6.10: installing package
curl-7.83.0: installing package
dhcpcd-9.4.1: installing package
diffutils-2.7: installing package
findutils-4.2.33: installing package
flex-2.6.4: installing package
gawk-3.0.4: installing package
gcc-4.0.4: installing package
grep-2.4: installing package
help2man-1.36.4: installing package
libtool-2.2.4: installing package
linux-headers-5.10.41: installing package
m4-1.4.7: installing package
make-3.82: installing package
musl-1.2.3: installing package
perl-5.6.2: installing package
util-linux-2.19.1: installing package
sha256sum: /usr/src/SHA256SUMS.sources: No such file or directory
[   13.638189] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[   13.638189] 
[   13.639465] CPU: 0 PID: 1 Comm: init Not tainted 4.9.10-gnu_1 #1
[   13.640280] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-20210628_193338-localhost 04/01/2014
[   13.641686] Call Trace:
[   13.642112] Kernel Offset: 0x19000000 from 0xc1000000 (relocation range: 0xc0000000-0xf83fdfff)
[   13.643314] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[   13.643314] 
QEMU: Terminated
Detaching /dev/loop0
Slaptažodis: 
Unmounting tmpfs from /home/andrius/repositories/bootstrap/live-bootstrap/sysc/tmp
Removing /home/andrius/repositories/bootstrap/live-bootstrap/sysc/tmp
Unmounting tmpfs from /home/andrius/repositories/bootstrap/live-bootstrap/tmp
Removing /home/andrius/repositories/bootstrap/live-bootstrap/tmp

bash-5.1: frequently 50% ABORT: bad checksum

seen with 2423b77 and qemu-386 with kernel 3.18.140 and 3G RAM.
a workaround is the add an additional sleep in sysa/bash-5.1/bash-5.1.sh like:

- sed -i 's/sleep 3/sleep 3; sync/' builtins/psize.sh
+ sed -i 's/sleep 3/sleep 3; sync; sleep 3/' builtins/psize.sh

see:
http://intercity-vpn.de/bootstrap/lbmulti-log-1617621903.txt

[...]
01h31m48s | gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob -L./lib/tilde  -L./lib/sh  -L./lib/termcap -rdynamic -g -O2 -Wno-paren
theses -Wno-format-security  -static -o bash shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o  dispose_cmd.o execute_cmd.o variables.o copy
_cmd.o error.o expr.o flags.o jobs.o subst.o hashcmd.o hashlib.o mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o alias.o
 array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o bashline.o  list.o stringlib.o locale.o findcmd.o redir.o pcomplete.o pcomplib.o synt
ax.o xmalloc.o  -lbuiltins -lglob -lsh -lreadline -lhistory ./lib/termcap/libtermcap.a -ltilde
01h31m49s | ls -l bash
01h31m49s | -rwxr-xr-x    1 0        0         2621878 Apr  5 12:55 bash
01h31m49s | size bash
01h31m49s | text           data     bss     dec     hex filename
01h31m49s | 1043217       20000   45968 1109185  10ecc1 bash
01h31m49s | make[1]: Entering directory `/after/bash-5.1/build/bash-5.1/support'
01h31m49s | rm -f man2html.o
01h31m49s | gcc -c  -DHAVE_CONFIG_H -DSHELL  -I/after/bash-5.1/build/bash-5.1 -I..   -g -O2 -Wno-parentheses -Wno-format-security man2html.c
01h31m53s | gcc  -DHAVE_CONFIG_H -DSHELL  -I/after/bash-5.1/build/bash-5.1 -I..   -g -O2 -Wno-parentheses -Wno-format-security man2html.o -o man2h
tml
01h31m54s | make[1]: Leaving directory `/after/bash-5.1/build/bash-5.1/support'
01h31m54s | bash-5.1: installing.
01h31m54s | bash-5.1: checksumming installed files.
01h31m54s | /after/bin/bash: FAILED
01h31m54s | sha256sum: WARNING: 1 of 1 computed checksum did NOT match
01h31m54s | 6af92e0a1b5db87220ae2ae5d345bfba4801bb4011c3386ce87b975bf9c24637  checksums
01h31m54s | -rw-rw-r--    1 1000     1000           82 Apr  5 11:11 checksums
01h31m54s | total 41947
01h31m54s | -rwxr-xr-x    1 0        0         2621878 Apr  5 12:55 bash
01h31m54s | -rwxr-xr-x    3 0        0          214839 Apr  5 12:52 gcc
01h31m54s | -rwxr-xr-x    3 0        0          214839 Apr  5 12:52 i386-unknown-linux-gnu-gcc
01h31m54s | -rwxr-xr-x    3 0        0          214839 Apr  5 12:52 i386-unknown-linux-gnu-gcc-4.0.4
01h31m54s | -rwxr-xr-x    1 0        0          219158 Apr  5 12:52 cpp
01h31m54s | -rwxr-xr-x    1 0        0           15610 Apr  5 12:52 gccbug
01h31m54s | -rwxr-xr-x    1 0        0          102234 Apr  5 12:52 gcov
[...]

"No space left on device" when bootstrapping with QEMU

Most of the bootstrap works as expected with QEMU, but when I reach gcc-4.7.4, it starts spitting out "No space left on device" errors and drops me in bash:

install: error writing '/image/bin/gcov': No space left on device
make: [Makefile:4665: install-common] Error 1 (ignored)
/bin/sh ../../gcc/../mkinstalldirs /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/include
mkdir -p -- /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/include
rm -rf /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/include-fixed
mkdir /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/include-fixed
chmod a+rx /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/include-fixed
(cd `${PWDCMD-pwd}`/include ; \
 tar -cf - .; exit 0) | (cd /image/lib/musl/gcc/i386-unknown-linux-musl/4.7.4/include; tar xpf - )
tar: ./unwind.h: Cannot write: No space left on device
tar: ./stdint.h: Cannot write: No space left on device
tar: ./stdint-gcc.h: Cannot write: No space left on device
tar: ./mm_malloc.h: Cannot write: No space left on device
tar: ./f16cintrin.h: Cannot write: No space left on device
tar: ./fmaintrin.h: Cannot write: No space left on device
tar: ./avx2intrin.h: Cannot write: No space left on device
tar: ./tbmintrin.h: Cannot write: No space left on device
tar: ./bmi2intrin.h: Cannot write: No space left on device
tar: ./bmiintrin.h: Cannot write: No space left on device
tar: ./lzcntintrin.h: Cannot write: No space left on device
tar: ./popcntintrin.h: Cannot write: No space left on device
tar: ./lwpintrin.h: Cannot write: No space left on device
tar: ./cross-stdarg.h: Cannot write: No space left on device
tar: ./ia32intrin.h: Cannot write: No space left on device
tar: ./xopintrin.h: Cannot write: No space left on device
tar: ./avxintrin.h: Cannot write: No space left on device
tar: ./x86intrin.h: Cannot write: No space left on device
tar: ./immintrin.h: Cannot write: No space left on device
tar: ./wmmintrin.h: Cannot write: No space left on device
tar: ./fma4intrin.h: Cannot write: No space left on device
tar: ./bmmintrin.h: Cannot write: No space left on device
tar: ./nmmintrin.h: Cannot write: No space left on device
tar: ./smmintrin.h: Cannot write: No space left on device
tar: ./ammintrin.h: Cannot write: No space left on device
tar: ./tmmintrin.h: Cannot write: No space left on device
tar: ./pmmintrin.h: Cannot write: No space left on device
tar: ./emmintrin.h: Cannot write: No space left on device
tar: ./xmmintrin.h: Cannot write: No space left on device
tar: ./mm3dnow.h: Cannot write: No space left on device
tar: ./mmintrin.h: Cannot write: No space left on device
tar: ./cpuid.h: Cannot write: No space left on device
tar: ./stdalign.h: Cannot write: No space left on device
tar: ./stdnoreturn.h: Cannot write: No space left on device
tar: ./stdfix.h: Cannot write: No space left on device
tar: ./varargs.h: Cannot write: No space left on device
tar: ./stddef.h: Cannot write: No space left on device
tar: ./stdbool.h: Cannot write: No space left on device
tar: ./stdarg.h: Cannot write: No space left on device
tar: ./iso646.h: Cannot write: No space left on device
tar: ./float.h: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors
make: *** [Makefile:4831: install-headers-tar] Error 2
make: Leaving directory '/after/gcc-4.7.4/build/gcc-4.7.4/build/gcc'
bash: cannot set terminal process group (-1): Not a tty
bash: no job control in this shell
bash-5.1#

I'm not sure if this is an issue with live-bootstrap or QEMU -- I haven't spent much time with either of the two. All I did is run the rootfs.py script with the kernel that my host system is currently using.

P.S. This is a very cool project you have here! Keep up the good work :-)

Pregenerated texinfo files

It's lower priority since they are clearly not used for anything but eventually it would be nicer to deal with pre-built texinfo files.

We can remove them completely before texinfo is available.

That might be easier once we have staged install.

Support live-bootstrapping only up to sysc_image and resuming sysc separately

Currently when you use chroot/bwrap method for live-bootstrapping, you need to chroot at the end of sysa. Allowing separate top-level sandboxes for sysa and sysc allows more flexible integration to build systems. Additionally, having separate sandbox for sysc allows even with direct rootfs usage dropping chroot permission from bwrap as you can simply create a new bwrap sandbox.

Gnulib portability library

The process of gnulib import creates some files that are not hand-written.

Those files have a comment how to reproduce them with gnulib-tool but I guess we need exact same gnulib checkout (note that there are no standalone gnulib releases).

Checksums are not checked

_grep "${pkg}_${revision}" "${SOURCES}/SHA256SUMS.pkgs" | sha256sum -c fails before GNU coreutils 6.0 is built.

sha256sum from stage0-posix does not accept piped input.

Different checksum on packages from different source

Hi,

I noticed some different checksum when downloading coreutils.

When I download from http://git.savannah.gnu.org/cgit/coreutils.git/snapshot/coreutils-8.32.tar.gz, it has this checksum
6f7cfc0ac6717afb6ba1f41b0da43a713ba0dd97dec1227e32effc12d79f08c1 coreutils-8.32.tar.gz

But when I download from https://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.gz, it has
d5ab07435a74058ab69a2007e838be4f6a90b5635d812c2e26671e3972fca1b8 coreutils-8.32.tar.gz.1

Similar thing happened to guile-3.0.7.tar.gz.

I wondered if this is expected or not.

Pregenerated files in libtool 2.4.7

libtool 2.4.7 imports the following pregenerated files via gnulib

libtool/lib/uniwidth/width0.h
libtool/lib/uniwidth/width2.h

I think our options are:

  1. Rebuild it (might not be easy if rebuilding tool gen-uni-tables.c depends on newer gcc).
  2. Switch to an older gnulib (That might not be an option if it depends on some new gnulib modules).
  3. Revert addition of libtool 2.4.7.

libtcc1.a: abort, bad checksum

Seen with trunk in my first attempt to do a live-bootstrap with this package. 64-bit x86-64 box, building with bwrap via:

PATH=/usr/src/live-bootstrap/bwrap:$PATH ./rootfs.py --bwrap

(I have to point PATH through a directory that contains a non-setuid bwrap because the setuid one refuses to allow CAP_SETPCAP wrapping.)

Here's the end of the bootstrap process, including at least one thing that had a correctly-validated checksum:

 +> cp boot3-tcc /usr/bin 
 +> chmod 755 /usr/bin/boot3-tcc 
 +> cd ../mes-aa5f1533e1736a89e60d2c34c2a0ab3b01f8d037 
 +> boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crt1.o lib/linux/x86-mes-gcc/crt1.c 
 +> boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crtn.o lib/linux/x86-mes-gcc/crtn.c 
 +> boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crti.o lib/linux/x86-mes-gcc/crti.c 
 +> boot3-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c 
 +> boot3-tcc -c -D TCC_TARGET_I386=1 ../tcc-0.9.26-1136-g5bba73cc/lib/libtcc1.c 
 +> boot3-tcc -ar cr /usr/lib/mes/tcc/libtcc1.a libtcc1.o 
 +> boot3-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c 
unified-libc.c:2000: warning: assignment makes integer from pointer without a cast
unified-libc.c:2000: warning: assignment makes pointer from integer without a cast
unified-libc.c:2284: warning: SYS_exit redefined
unified-libc.c:2502: warning: SYS_write redefined
unified-libc.c:5877: warning: assignment from incompatible pointer type
unified-libc.c:6767: warning: assignment from incompatible pointer type
 +> boot3-tcc -ar cr /usr/lib/mes/libc.a unified-libc.o 
 +> cd ../tcc-0.9.26-1136-g5bba73cc 
 +> boot3-tcc -version 
tcc version 0.9.26 (i386 Linux)
 +> boot3-tcc -g -v -static -o boot4-tcc -D BOOTSTRAP=1 -D HAVE_BITFIELD=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -D HAVE_SETJMP=1 -I . -I /usr/include -D TCC_TARGET_I386=1 -D CONFIG_TCCDIR="/usr/lib/mes/tcc" -D CONFIG_TCC_CRTPREFIX="/usr/lib/mes" -D CONFIG_TCC_ELFINTERP="/mes/loader" -D CONFIG_TCC_LIBPATHS="/usr/lib/mes:/usr/lib/mes/tcc" -D CONFIG_TCC_SYSINCLUDEPATHS="/usr/include" -D TCC_LIBGCC="/usr/lib/mes/libc.a" -D TCC_LIBTCC1="libtcc1.a" -D CONFIG_TCCBOOT=1 -D CONFIG_TCC_STATIC=1 -D CONFIG_USE_LIBGCC=1 -D TCC_MES_LIBC=1 -D TCC_VERSION="0.9.26" -D ONE_SOURCE=1 -L . tcc.c 
tcc version 0.9.26 (i386 Linux)
-> tcc.c
<- boot4-tcc
 +> cp boot4-tcc /usr/bin 
 +> chmod 755 /usr/bin/boot4-tcc 
 +> cd ../mes-aa5f1533e1736a89e60d2c34c2a0ab3b01f8d037 
 +> boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crt1.o lib/linux/x86-mes-gcc/crt1.c 
 +> boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crtn.o lib/linux/x86-mes-gcc/crtn.c 
 +> boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crti.o lib/linux/x86-mes-gcc/crti.c 
 +> boot4-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c 
 +> boot4-tcc -c -D TCC_TARGET_I386=1 ../tcc-0.9.26-1136-g5bba73cc/lib/libtcc1.c 
 +> boot4-tcc -ar cr /usr/lib/mes/tcc/libtcc1.a libtcc1.o 
 +> boot4-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c 
unified-libc.c:2000: warning: assignment makes integer from pointer without a cast
unified-libc.c:2000: warning: assignment makes pointer from integer without a cast
unified-libc.c:2284: warning: SYS_exit redefined
unified-libc.c:2502: warning: SYS_write redefined
unified-libc.c:5877: warning: assignment from incompatible pointer type
unified-libc.c:6767: warning: assignment from incompatible pointer type
 +> boot4-tcc -ar cr /usr/lib/mes/libc.a unified-libc.o 
 +> cd ../tcc-0.9.26-1136-g5bba73cc 
 +> boot4-tcc -version 
tcc version 0.9.26 (i386 Linux)
 +> boot4-tcc -g -v -static -o boot5-tcc -D BOOTSTRAP=1 -D HAVE_BITFIELD=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -D HAVE_SETJMP=1 -I . -I /usr/include -D TCC_TARGET_I386=1 -D CONFIG_TCCDIR="/usr/lib/mes/tcc" -D CONFIG_TCC_CRTPREFIX="/usr/lib/mes" -D CONFIG_TCC_ELFINTERP="/mes/loader" -D CONFIG_TCC_LIBPATHS="/usr/lib/mes:/usr/lib/mes/tcc" -D CONFIG_TCC_SYSINCLUDEPATHS="/usr/include" -D TCC_LIBGCC="/usr/lib/mes/libc.a" -D TCC_LIBTCC1="libtcc1.a" -D CONFIG_TCCBOOT=1 -D CONFIG_TCC_STATIC=1 -D CONFIG_USE_LIBGCC=1 -D TCC_MES_LIBC=1 -D TCC_VERSION="0.9.26" -D ONE_SOURCE=1 -L . tcc.c 
tcc version 0.9.26 (i386 Linux)
-> tcc.c
<- boot5-tcc
 +> cp boot5-tcc /usr/bin 
 +> chmod 755 /usr/bin/boot5-tcc 
 +> cd ../mes-aa5f1533e1736a89e60d2c34c2a0ab3b01f8d037 
 +> boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crt1.o lib/linux/x86-mes-gcc/crt1.c 
 +> boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crtn.o lib/linux/x86-mes-gcc/crtn.c 
 +> boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o /usr/lib/mes/crti.o lib/linux/x86-mes-gcc/crti.c 
 +> boot5-tcc -c -D HAVE_CONFIG_H=1 -D HAVE_FLOAT=1 -D HAVE_LONG_LONG=1 -I include -I include/linux/x86 lib/libtcc1.c 
 +> boot5-tcc -c -D TCC_TARGET_I386=1 ../tcc-0.9.26-1136-g5bba73cc/lib/libtcc1.c 
 +> boot5-tcc -ar cr /usr/lib/mes/tcc/libtcc1.a libtcc1.o 
 +> boot5-tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 -o unified-libc.o unified-libc.c 
unified-libc.c:2000: warning: assignment makes integer from pointer without a cast
unified-libc.c:2000: warning: assignment makes pointer from integer without a cast
unified-libc.c:2284: warning: SYS_exit redefined
unified-libc.c:2502: warning: SYS_write redefined
unified-libc.c:5877: warning: assignment from incompatible pointer type
unified-libc.c:6767: warning: assignment from incompatible pointer type
 +> boot5-tcc -ar cr /usr/lib/mes/libc.a unified-libc.o 
 +> boot5-tcc -version 
tcc version 0.9.26 (i386 Linux)
 +> cp /usr/bin/boot5-tcc /usr/bin/tcc 
 +> chmod 755 /usr/bin/tcc 
 +> cp /usr/bin/tcc /usr/bin/tcc-0.9.26 
 +> chmod 755 /usr/bin/tcc-0.9.26 
 +> tcc -c -D HAVE_CONFIG_H=1 -I include -I include/linux/x86 lib/posix/getopt.c 
 +> tcc -ar cr /usr/lib/mes/libgetopt.a getopt.o 
 +> cd ../.. 
 +> if match xFalse xTrue 
/usr/bin/mes-tcc: OK
/usr/bin/boot0-tcc: OK
/usr/bin/boot1-tcc: OK
/usr/bin/boot2-tcc: OK
/usr/bin/boot3-tcc: OK
/usr/bin/boot4-tcc: OK
/usr/bin/tcc: OK
/usr/lib/mes/libc.a: OK
/usr/lib/mes/libgetopt.a: OK
/usr/lib/mes/crt1.o: OK
/usr/lib/mes/crti.o: OK
/usr/lib/mes/crtn.o: OK
/usr/lib/mes/tcc/libtcc1.a: FAILED
Wanted:   ac11f09698f092ed76ae40ebcd56cf3f2b903ea1333ef7537a00673dd6f73da7
Received: 2adce9b440aefc6dd458b046582f3584de224dc2e0cf3cf1c0c17e98182beaa5
Subprocess error 1
ABORTING HARD
Subprocess error 1
ABORTING HARD
Subprocess error 1
ABORTING HARD
Subprocess error
ABORTING HARD
Bootstrapping failed

I don't know where to start debugging this because I don't have an instance that works to work from. Clearly codegen is broken, but where? (I can provide the probably-broken binaries to anyone who wants them.)

tmpfs file ordering affects reproducibility (hash mismatch)

Running with mounting a tmpfs, by patching this out manually, results in different hashes because the filesystem file order affects the generated tar files.

There are multiple ways to fix it:

  1. Use find and sort to supply the filenames in a fixed order
  2. Backport the --sort option for tar (starting at https://git.savannah.gnu.org/cgit/tar.git/commit/?id=29a6964af3e1baabe978ce608e0466e1250d08ab )
  3. Build a newer tar that supports --sort, this requires version 1.28

qemu mode is broken after sources PR

Probably runs out of memory.

Need to figure out why is it using more now or find some other way to reduce memory usage (e.g. unifying linux headers and linux might save a lot...)

Split stage sources to parseable configuration files

Currently downloaded URL's are stored as Python unless I'm missing something. This makes it harder than necessary to parse configurations from this repo for vendoring sources. Please let's have some trivial parseable files that contains the URL's and expected output names.

Is this project currently limited to 32bit platforms?

First of all, thanks for this amazing project!
I found that the instructions in README and the parts.rst are specific to x86 platform, are there any plan to expand this project to x86_64 platforms? Is the mes-m2 a main blocker to port this project to 64bit platforms?

Unnecessary files in automake 1.10

tarball contains extra empty directories.

automake-1.10.3_0.tar.bz2: Tar in Bzip2
./
./sysa/
./sysa/automake-1.10.3/
./sysa/automake-1.10.3/build/
./sysa/automake-1.10.3/build/automake-1.10.3/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/amhello-1.0/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/amhello-1.0/_inst/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/amhello-1.0/_inst/bin/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/amhello-1.0/_inst/share/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/amhello-1.0/_inst/share/doc/
./sysa/automake-1.10.3/build/automake-1.10.3/doc/amhello/amhello-1.0/_inst/share/doc/amhello/
./usr/
./usr/bin/
./usr/bin/aclocal
./usr/bin/aclocal-1.10
./usr/bin/automake
...

I haven't yet checked other versions of automake.

Missing checksums for packages use by qemu build

When I build with qemu, it fails with:

kexec-tools-2.0.22: creating package.
kexec-tools-2.0.22: no checksum stored!
Subprocess error 1

If the above is fixed, it fails again:

linux-4.9.10: install to fakeroot.
linux-4.9.10: creating package.
linux-4.9.10: no checksum stored!
Subprocess error 1

The checksums for those two packages were removed recently from sysa/SHA256SUMS.pkgs in this commit:
31bc944

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.