IRC channel logs

2021-04-05.log

back to list of logs

<fossy>when using git it is significantly easier for it to be MITMd and data changed within
<stikonas>but bootstrap can check validity of checksums
<bauen1>stikonas: that depends on the hosts tar being decent enough
<fossy>we have to do that either way?
<fossy>(download million of gnulib snapshots)
<fossy>as a submodule points to a specific commit
<bauen1>stikonas: another option discussed here was using the software heritage archive as backup mirror
<stikonas>well, git downloads all snapshots, but it compresses them better
<stikonas>hmm
<fossy>yes but downloading a tar.gz snapshot is like depth=1
<fossy>so it's always going to be faster/smaller than full git submodule
<stikonas>but yes, I guess we depend on tar being decent enough
<stikonas>fossy: for one thing yes
<stikonas>but once we have more, like 20, I'm not sure what is faster...
<stikonas>but ok, I can switch to snapshot
*fossy would eventually like to remove the need for submodules entirely and preferably git on the host as well
<fossy>smaller TCB for generation
<stikonas>well, Ideally we create a release at some point
<fossy>yes
<fossy>how does having more change how fast it is? cause you still need a submodule for every single gnulib checkout, and same for the tarball
<stikonas>I thought it's the same submodule
<fossy>no
<stikonas>just checked out to different revisions
<stikonas>git can't do that?
<fossy>no, i tried that before
<fossy>don't remember with which package
<stikonas>oh ok...
<stikonas>probably tcc
<fossy>oh no it was mes libc
<stikonas>that's the only early package that we build twice
<stikonas>oh ok
<fossy>the main one and then -patched
<fossy>i think
<fossy>it has 0 form of caching :|
<stikonas>ok, then I agree, submodules wouldn't be faster
<stikonas>hmm, slightly annoyingly though, get_file function only supports 1 download
<fossy>we need to look at how to 'fix' that
<stikonas>I think I need to fix that first
<stikonas>yeah...
<stikonas>get_files function that is similar to get_file wrt to the first argument but also downloads rest of the files?
<OriansJ`>well git submodules only make sense if you have various pieces all in development and you can't depend upon tar, wget and/or sha256sum being available
<stikonas>well, fossy convinced me that snapshot is better anyway..
<OriansJ`>which is fine for the really low level pieces like stage0-posix (which you can manually check for correctness)
<stikonas>I had an impression that there would be more caching, but apparently that's wrong
<OriansJ`>yeah git submodule really hogs bandwidth
<OriansJ`>which doesn't matter if the repo is 10KB but becomes a bitch when you have something like 100MB repo
<OriansJ`>that you would have to download perhaps a dozen times
<OriansJ`>like mes or tcc
<OriansJ`>right now live-bootstrap can *NOT* be downloaded using git on a flaky network connection
<fossy>it has a lot of submodules rn, yes
<stikonas>oh, yeah, that might be the problem. luckily my connections is quite reliable
<fossy>i wonder how downloading over tor would go
<OriansJ`>and mes and TCC submodules flat out die
<OriansJ`>and because git pull/fetch doesn't resume downloads it tries to download the 100+MB pack file from scratch again
<OriansJ`>So the only way it can be downloaded for those people is to setup a VPS and do the git clone --recursive and then tar it up and use sftp to download it (it supports resume)
<stikonas>but in any case I was thinking that at some point once we get a bit further, we should make a release
<stikonas>i.e. git tag and tarball of all sources
<fossy>we should do that once we get to modern toolchain
<fossy>that's when i think it has fufilled its main purpose
<fossy>then we need to go back and make various improvements
<OriansJ`>absolutely traditionally in bootstrapping projects once you bootstrap GCC, you call it version 1.0
<stikonas>well, our GCC is so far C only...
<fossy>i think OriansJ` means modern GCC
<stikonas>I'm not sure...
<fossy>idk
<stikonas>which one do you mean?
<fossy>i don't think it's release-ready
<stikonas>yeah, we need to solve more issues
<OriansJ`>and 1.0 releases don't have to be amazing just something to point to and say hey look
<fossy>mm, kinda, i prefer saying 1.0 is stable-ish and known to work well
<OriansJ`>with the promise of something better at version 1.1 or 2.0 (depending how fast you are making progress)
<stikonas>although, I was thinking we should write to bootstrappable mailing list that live-bootstrap can now get to GCC 4.04
<OriansJ`>fossy: It is your project, do what makes you happest ^_^
<stikonas>by the way, a few more tests showed that we might already win a minute or two if we don't rebuild mes
<OriansJ`>stikonas: public announcments in bootstrapping is one area we have always been traditionally weak at but I hope you can help address that weakness.
<stikonas>well, I can write there, but I first want to solve pregen files in findutils
<stikonas>which is just redoing gnulib import
<stikonas>(should be similar to what I'm trying with tar now)
<fossy>stikonas: i'm happy to draft an email and we can co-sign it? i'll post a draft in a second
<fossy>i'm waiting for a run of live-bootstrap rn anyway
<stikonas>ok
<stikonas>but maybe let's send if once findutils issue is resolved
<fossy>ok
<stikonas>it should be fairly similar to tar, so once tar is done we can copy/paste the same solution to there
<stikonas>by the way, other than submodule, that PR looks alright?
<fossy>yeah think so
<fossy>if you push with submodule i'll give it green tick
<fossy>wat is /after/libexec/rmt?
<fossy>also, perhaps 4-space indenting in import-gnulib.sh (dosen't matter too much tho)
<stikonas>ok, I can change that too
<stikonas>I'm now writing some fucntion to get multiple files
<stikonas>2-space indenting was inherited from copy-pasted file
<stikonas>actually there it was #+3 spaces
<stikonas>fossy: I'm not sure what is rmt
<stikonas>never used it
<stikonas>but manpage says remote magnetic tape server
<stikonas>well, tar is tape archive after all
<fossy>mkay
<OriansJ`>rmt: "Using this utility as a general-purpose remote file access tool is discouraged."
<fossy>stikonas: https://github.com/fosslinux/live-bootstrap/pull/90
<fossy>that was slightly painful
<stikonas>fossy: oh, you were also doing that
<stikonas>hmm, I have a slightly different version
<fossy>oops, were you doing it?
<fossy>what's yours look like
<stikonas>let me upload, then we can pick
<stikonas>fossy: https://github.com/stikonas/live-bootstrap/commit/1fd99fb9048eb3d14ca4905e11e11edc0069495e
<stikonas>yours is a bit more complete
<stikonas>since I haven't unpacked multiple tarballs yet
<stikonas>it's just downloading
<fossy>i think yours is /slightly/ cleaner but also mine does positional arguments
<fossy>uh
<fossy>named arguments
<stikonas>yeah, that were my thoughts...
<stikonas>named arguments are nice...
<stikonas>although, my code is a bit shorter
<stikonas>hmm, OriansJ`: up for review?
<stikonas>we now have two functions doing similar things...
<fossy>another advantage of mine is that it has a supprot for all features
<stikonas>need to pick one
<stikonas>yeah, mine does not rename
<stikonas>any extra files
<fossy>i can invisinge usecases for that
<stikonas>fossy: maybe yours can be a bit cleaner if you can split into smaller functions?
<fossy>yeah ok
<stikonas>although, bash might be painful
<fossy>it is :|
<stikonas>well, returning arguments, etc...
<OriansJ`>stikonas: sure give me one minute
<OriansJ`>as I am just about to announce that stage0-posix has both M2libc and mes-m2 (actual mes.c) build functional: https://paste.debian.net/1192327/
<OriansJ`>just have to duplicate for AMD64 and AArch64 to finish off but that will take a while to spot check for everything. So what did you want me to review stikonas?
<stikonas> https://github.com/fosslinux/live-bootstrap/pull/90 vs https://github.com/stikonas/live-bootstrap/commit/1fd99fb9048eb3d14ca4905e11e11edc0069495e
<stikonas>although, I think fossy's has more features
<stikonas>so I'm leaning to go for that versoin
<fossy>note more features != good lol
<fossy>but in this case i think it is more versatile
<OriansJ`>I like the more explicit options in fossy's that is definitely a good idea
<stikonas>yeah, I didn't like those positional arguments that we had before
<OriansJ`>but stikonas: your seperate _get_file function is a good idea
<stikonas>yeah, that's why I asked fossy if that big function can be split into smaller
<stikonas>then we might end up with a better option than both initial versions
<stikonas>anyway, I'm going to bed now, will review in the morning
<OriansJ`>so here is my suggestion choose fossy's for merge and then break up that big function (steal stikonas' good idea of a seperate _get_file function) and it should be in better shape long term.
<OriansJ`>(I really need to find time to work on mes-m2 this week as in its current form it can't run on AArch64 and the AMD64 isn't native but legacy)
<OriansJ`>janneke: if you get a minute free to look at the current mes-m2; I'd like it to be able to actually run the copy of MesCC in it (as well as have guile be able to run that copy of MesCC) so that when I do M2libc conversion work I can make sure to keep it working every step of the way.
<OriansJ`>that way mes-m2 will have a native AMD64 build, a working AArch64 and a working armv7l build as well.
<OriansJ`>and mes-m2 (mes.c) MesCC will have native M2-Planet binaries for all M2-Planet supported architectures
<fossy>siraben: i have split it into a couple of smaller functions and am testing full run now then ill push
<fossy>./go 17
<fossy>oops wrong ping
<fossy>stikonas[m]:
<OriansJ`>fossy: is this: https://github.com/fosslinux/live-bootstrap.git the official link for live-bootstrap master repo (I am updating stage0-posix's README)
<fossy>yes
<janneke>OriansJ`: that's very good news. MesCC is mostly "just another" scheme program.
<janneke>if you look at mes, you can do:
<janneke>guix environment -l guix.scm
<janneke>./configure
<janneke>make
<janneke>./pre-inst-env mescc scaffold/main.c
<janneke>and it runs scripts/mescc (from scripts/mescc.in), which runs
<janneke>scripts/mescc.scm (from scripts/mescc.scm.in)
<janneke>to run mescc on guile, just do MES=GUILE ./pre-inst-env mescc ...
***ChanServ sets mode: +o rekado_
<gforce_de1977>4 out of 15 runs of live-bootstrap in qemu, have bad bash checksums: my base64 seems not to work, i will upload some binaries and logs in ~12 hours
<gforce_de1977>stikonas: fossy: bauen1: ok, found a way to start multiple qemu-instances in parallel, so i have more results: http://intercity-vpn.de/bootstrap/
<gforce_de1977>here are only logs of failed bash-builts: search for 'bash: FAILED', using base64-encoding, i can "screenscrape" the bash-binaries, and it seems in cause if "fail" they all have the hash df8251032006c8ef3f173f3c8859414ad0c9fe2cf4c5df5bcf5afbaf34ded1f5
<gforce_de1977>it's more easy to just search for string "base64"
<gforce_de1977>i have included the output of "gcc -dM -E -xc /dev/null"
<gforce_de1977>the base64-encoder is just a small pearl script
<gforce_de1977> http://intercity-vpn.de/base64.pl.txt
<stikonas>gforce_de1977: ok, this time difference from good is very small
<stikonas>0005670A 00 02
<stikonas>0005670B 01 00
<stikonas>A is from good hash and B is from your bash binary
<stikonas>so its just 2 bytes
<stikonas>that are different
<stikonas>I guess next step is to disasamble it
<stikonas>gforce_de1977: that looks like pipesize issue
<gforce_de1977>very good...but remember, there was also a version with another size an totally different binary layout. but first things first
<stikonas>yours is 512
<gforce_de1977>ok, i will output/log the pipesize.h
<stikonas>this is the diff between two binaries https://paste.debian.net/1192382/
<gforce_de1977>this need some ci-runs again...)
<stikonas>0x200 is 512
<stikonas>and 0x10000 is 64K
<gforce_de1977>good catch!
<gforce_de1977>just for saying it: your output if "gcc -dM -E -xc /dev/null" is the same like in my CI (also on case of a "bad" bash binary)
<gforce_de1977>"output of"
<gforce_de1977>stikonas: can you say me the exact pathname of the generated pipesize.h (or similar)
<gforce_de1977>or should we just hardcode the 0x10000 value ???
<stikonas>gforce_de1977: well, that might be one option...
<stikonas>let's see what fossy and pder think about it...
<stikonas>gforce_de1977: path is builtins/pipesize.h
<stikonas>or I guess absolute would be /after/bash-5.1/build/bash-5.1/builtins/pipesize.h
<pder>stikonas: nice to see you got tar working- I started on that until I noticed the gnulib-tool issue.
<pder>There are many places where we are doing make MAKEINFO=true. Could we set MAKEINFO=true when running configure instead?
<pder>It's not clear to me what the bash pipesize.h value is for gforce_de1977. I guess the sleep 3; sync is not working?
<stikonas>pder: hmm, not sure about MAKEINFO, haven't tied
<stikonas>pder: maybe we can just try building makeinfo...
<stikonas>(it's in texinfo package)
<stikonas>even some old version might be better than nothing
<pder>yeah that might work
<stikonas>pder: as for tar, it's almost working, but we need to download gnulib tarball
<stikonas>and that needs get_file to be reworked
<stikonas>fossy and me tried yesterday, got something working
<stikonas>but it might be that this bash script is just getting too big
<stikonas>I'm not looking at whether to rewrite it in Python
<gforce_de1977>stikonas: pder: it is a qemu run. always with the same kernel and the same initrd. mostly on runs without issues, but around 5% has at least this pipesize variation. there are also other variations already spotted, i'am preparing another massive parallel run (50 qemu-invokations each with 3gb ram)
<stikonas>gforce_de1977: pipesize issue is intermittent
<stikonas>we also had it intermittently
<stikonas>but adding sync command after sleep 3 in psize.sh seemed to help
<stikonas>but for some reason it doesn't help you
<stikonas>(you can also try replacing sync with sleep 1)
<gforce_de1977>stikonas: ok, will replace 'sync' with sync; sleep 15
<gforce_de1977>(just so we can see if this help somehow)
<stikonas>well, it's probably some kind of race, since it is intermittent
<stikonas>(and not that it only happens in bash built with mes libc)
<stikonas>i.e. you would have correct pipesize.h if you rebuild bash 5.1 with bash 5.1
<bauen1>gforce_de1977: are compute resources an issue for you at all ?
<stikonas>I'm preparing rootfs change that will allow any number of runs too...
<bauen1>i'm not sure if why 8gb ram laptop is gonna fancy parallel runs lol
<bauen1>*my
<stikonas>parallel chroot runs might work...
<fossy><stikonas> fossy and me tried yesterday, got something working
<fossy>yeah I finished that last night
<fossy>after bashing out an annoying bug
<fossy>(remember to declare variables local kiddies)