IRC channel logs

2021-02-08.log

back to list of logs

***ChanServ sets mode: +o rekado_
***rekado_ is now known as rekado
<dannym>janneke: I've put add.c, multiply.c and compile into /tmp on novena (also in my homedir under ~/src/integer-constant/). It seems that this failure (similar to the one I get when building guix wip-arm-bootstrap's glibc-mesboot0-2.2.5) is very similar to something where a lot of stuff was commented out in the preprocessor before
<dannym>janneke: Is wip-arm-bootstrap current?
<dannym>This works:
<dannym>#if (1 >= 5+5)
<dannym>#endif
<dannym>This doesn't work:
<dannym>#if (1 >= 10)
<dannym>#endif
<dannym>For the latter I get:
<dannym>noadd.c:1: warning: integer constant out of range
<dannym>Also, for multiply.c I get a division by zero somewhere
<dannym>(to test, invoke "./compile add.c" or similar)
<pder>stikonas: do you know if coreutils is needed before musl? I am wondering if we can just build this once after musl is built.
<stikonas>pder: yes
<stikonas>I think musl needs some
<stikonas>and in any case, bash building thing uses coreutils a lot
<pder>ok
<stikonas>stuff like rm install...
<stikonas>mv...
<stikonas>and probably others
<stikonas>so I think we'll need to build it twice...
<stikonas>I briefly tried to play with running some configure scripts, so those 4 are mostly enough, some need date, but we can probably create "fake" wrapper that prints unix time 1
<stikonas>unless you want to build date too...
<pder>I have a Makefile now that adds expr, uname, sort, and uniq
<pder>I'll try building date
<pder>it works
<stikonas>yeah, my experience was that once I managed to build a few utils, rest were much easier
***dongcarl8 is now known as dongcarl
<fossy>pder: would you mind looking at https://github.com/fosslinux/live-bootstrap/pull/32
<gforce_de1977>fossy: would you mind merging https://github.com/fosslinux/live-bootstrap/pull/30 8-)
<fossy> gforce_de1977 please see my most recent comments
<janneke>what is the status of powerpc and risc-v in stage0/mescc-tools?
<vagrantc>mescc-tools builds on riscv64 in debian
<vagrantc>in fact, it builds on almost all debian architectures https://buildd.debian.org/mescc-tools
<janneke>vagrantc: okay, great
<vagrantc>not sure how well it runs, but what could possibly go wrong?
<gforce_de1977>janneke: it is on my todo-list, to build minimal qemu-images for all qrchitectures (live-bootstrap as far as possible)
<janneke>vagrantc: ah, okay, but it could just cross-build to x86 then ;-)
<gforce_de1977>janneke: ofcourse this test will be done, to see if the binaries are identical
<janneke>great!
<stikonas>gforce_de1977: I think fossy wants tiy to move that mkdir out of if to make code simpler. Even if it's only needed in else case, it will be no-op in if case, so harmless
<gforce_de1977>stikonas: ok, will do
<gforce_de1977>fossy: thanks for reviewing, i have push-forced my changes
<gforce_de1977>fossy, here the real diff, the github-PR-view is really confusing: https://github.com/fosslinux/live-bootstrap/compare/master...bittorf:wget_cache
<gforce_de1977>fossy: why is 'test condition || bad-case' a 'badstyle'? IMHO it is bad style to do 'test ! condition && bad-case'
<gforce_de1977>maybe it is philosophy 8-)
<cle1408>This video to help people to have a better world without racism or discrimination
<cle1408>please like and subscriber
<cle1408> https://www.youtube.com/channel/UCfFth0Zpex_u7eub-M6EbTw?sub_confirmation=1
<siraben>off-topic for this channel
<pder>fossy: I added a comment that I agree to the licensing
<fossy><gforce_de1977> fossy: why is 'test condition || bad-case' a 'badstyle'? IMHO it is bad style to do 'test ! condition && bad-case'
<fossy>when you do test condition || { block }
<fossy>what that is equivalent to is if [ condition ]; then block; fi
<fossy>which is what is almost always what is done in shell scripting, rather than using a block and test
<fossy>I dont see any reason to use test instead of if...fi, tbh test just look rly odd
<xentrac>hmm, isn't test foo || bar equivalent to if [ ! foo ] ; then bar; fi?
<xentrac>test is [ FWIW, not if. || is if
<stikonas>I usually use || syntax for something short like command || fail. If it's more text on right side then I usually use if block
<fossy>yeah i know xentrac
<xentrac>&& is more often useful, especially if you're not using set -e
<fossy>that's what i mean as stikonas said
<xentrac>dosomething &&
<xentrac>dosomethingelse &&
<fossy>a short thing like:
<xentrac>doathirdthing ||
<xentrac>handlefailure
<fossy>test 1 == 1 || exit 1
<fossy>is fine
<fossy>but not a long thing like
<fossy>test 1 == 1 || {
<fossy>yada
<fossy>yada
<fossy>yada
<fossy>}
<xentrac>you could write my example as three nested ifs but I think it's more readable if it's flat
<xentrac>yeah, || { seems like it's rarely a good idea :)
<fossy>stikonas: am i missing something obvious here
<fossy> https://github.com/fosslinux/live-bootstrap/pull/30/files#diff-ed5f4c04bdf1baaf9d71576f4f3bd1aae440c8518e51a494aafe581628d9c1b0R47
<fossy>OHHHH I AM
<stikonas>let me check
<fossy>now i get the use of line 53
<fossy>but that's really confusing way
<xentrac>I think if ! grep would be slightly clearer than grep ... || {
<fossy>yeah...
<xentrac>but to my eye it's pretty readable
<fossy>it's ok.. i don't mind that too much, but the rest of the code uses if, as do all others in the repo, including for failure
<xentrac>otoh test -f ./rootfs.sh || { would be a lot more readable as if [ ! -f ./rootfs.sh ]; IMHO
<fossy>hm, gforce_de1977 i don't really get what your commit message means about /dl
<fossy>why download to sources/dl instead of sources? i knwon downloads could go anywhere depending on what the user specifies but why make it two layers deep by default
<stikonas>can we not just run sha256sum -c?
<stikonas>instead of looping
<fossy>stikonas: thats what I suggested but my suggestion was not taken up
<fossy>although gforce_de1977 your if-like syntax has given me a good idea for how to implement conditionals in kaem
<fossy>(Only support them the way you did)
<fossy>because that is very easy to implement
<xentrac>:)
<xentrac>you can rewrite a ? b : c, when executed for side effects, as a && (b; True) || c
<xentrac>when you care about the return value of b, it is not so easy
<stikonas>but what are the advantages of all this over sha256sum -c ../../SHA256SUMS.sources ?
<stikonas>can't we just run this one command after everything is downloaded?
<stikonas>(and maybe add some check in download function that file is mentioned in SHA256SUMS.sources)
<fossy>stikonas: yeah, idk.... I am reasonably unconcerned but I dont see any real reason to do it this way
<stikonas>fossy: one (minor) con of doing it this way is that we are much stricter on SHA256SUM file structure than even sha256sum is...
<stikonas>although, we should still keep style of checksum file consistent...
<stikonas>but sha256sum --check does not insist on two spaces
<stikonas>ok, I wrote my suggestion there in the comment
<stikonas>a single if, no loops required...
<stikonas> https://github.com/fosslinux/live-bootstrap/pull/30/files#r572383345
<stikonas>and in my opinion less confusing...
<fossy>same I agree
***ChanServ sets mode: +o rekado_
***rekado_ is now known as rekado