Thursday, 2021-08-19

SparshaHi I'm Sparsha. I recently joined.06:51
abhishek_sharmaHi All, I am Abhishek Sharma. from India. joined the list06:52
lkclghostmansd: just running test_caller_bcd.py now (all of it), i notice you templated doing the 31 regs19:01
lkclany reason why 31, not 32? :)19:01
lkclohh add gpr, gpr, gpr+119:02
lkclgot it19:02
ghostmansdYep. I could've used 32, though, but it required wraparound, so I didn't bother19:03
mikolajwlkcl: is that appending to /etc/fstab necessary in mk-deb-chroot?19:34
programmerjakein my experience with schroot, it is unnecessary19:36
lkclm... oh he's gone :)19:43
mikolajw File "<string>", line 119:47
mikolajw    import crypt; print crypt.crypt("1234","Fx")19:47
mikolajw                        ^19:47
mikolajwSyntaxError: invalid syntax19:47
mikolajwso it sees Python 2 instead of 319:47
mikolajwI'll try Qemu instead for now19:50
lkclmikolajw, ah where's that? in one of the devscripts? moo?20:51
mikolajwlkcl: mk-deb-chroot21:17
lkclbut.. what the hell? python == /usr/bin/python2.7 as a symlink in buster21:31
mikolajweh, it's probably due to trying to run it on Arch Linux21:33
mikolajwi'll try Qemu21:33
lkclyeah it works perfectly21:33
lkclah yes if you run it outside of the chroot that would fail21:34
lkcli don't recommend qemu21:34
lkclyou will end up having to install qemu inside qemu21:34
lkclfix it with using python3 explicitly instead21:34
lkcland put brackets round the print statement21:35
mikolajwwell, it's pretty likely there's more problems than this one21:36
lkclrunning it now21:37
lkclthere really shouldn't be.21:37
lkcllook closely at it: the rest of the commands are run *inside* the chroot21:38
lkcl(which we know works)21:38
lkclthen there's a cat > /etc/schroot/{chrootname}.conf21:38
mikolajwuhh but that command is also in chroot21:38
lkclwhich if that breaks you've serious problems well beyond this21:39
lkclwhich is extremely weird, but i'm testing it now21:39
lkclpython2.7 *has* to be installed inside the debootstrap chroot, it's the default21:40
lkcli need to check thta21:40
lkclthis is pretty fundamental, we critically rely on these scripts, so i have to make sure it works21:43
mikolajwdon't get too alarmed, it's quite likely it's a problem on my side21:43
lkclE: Failed to fetch http://ftp.debian.org/debian/pool/main/p/perl/perl_5.28.1-6+deb10u1_amd64.deb  400  Bad Request [IP: 199.232.174.132 80]21:45
lkclE: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?21:45
lkclthat's annoying21:45
mikolajwI also get this, but after that Python error21:46
mikolajwactually not this, but something similar21:46
mikolajwa flurry of "Temporary failure resolving 'ftp.debian.org'"21:47
lkclok then that's the cause of the failure21:47
lkclnot the script, at all21:47
mikolajwhow to fix this?21:48
mikolajwwget http://ftp.debian.org/debian/pool/main/p/perl/perl_5.28.1-6+deb10u1_amd64.deb appears to work21:49
lkcli'm going to change it to ftp.uk.debian.org21:49
lkclyes, but ftp.debian.org is actually a redirector21:49
lkcla DNS redirector "to your closest mirror"21:49
lkclwhich, clearly, isn't working reliably21:50
lkclso i'm going to change it to ftp.uk.debian.org which i know is run by my friend phil21:50
lkclmikolajw: git pull on dev-env-setup21:51
mikolajwok, just a reboot first21:55
lkclreboot?! moo? :)21:55
lkclahh the "run setup scripts" option is false22:08
* lkcl investigating the bind-mounts22:08
mikolajwnow I get "W: Cannot check Release signature; keyring file not available /usr/share/keyrings/debian-archive-keyring.gpg"22:08
mikolajwyou changed "http://" to "https://". Switching it back to "http://" removed the error22:11
mikolajwis http:// tolerable for you?22:11
mikolajw(the warning is still here, but is not treated like an error, apparently)22:12
lkclyes i don't care at all.  will commit that22:12
lkcli found out how to not need the bind mounts, schroot type=directory22:13
mikolajwthe Python error went away. but I still get hostname resolution errors, but for ftp.uk.debian.org22:14
mikolajwErr:1 http://ftp.uk.debian.org/debian buster InRelease22:14
mikolajw  Temporary failure resolving 'ftp.uk.debian.org'22:14
lkclbizarre.22:16
lkclohh i wonder if you have something weird / unique about archlinux involving DNS resolution22:16
mikolajwalso I sometimes get something messed up in my Arch system due to this script22:16
mikolajwI can't create new Tmux panes now22:16
lkcl??22:17
mikolajwthis happened for the second time now22:17
mikolajwwarning: An error occured while redirecting file '/dev/null'22:17
lkcl!!22:17
lkclahh hang on22:17
lkclcheck /etc/fstab22:18
mikolajwyea22:18
mikolajwduplicates22:18
lkclyou didn't happen to... yeah22:18
lkcldelete the duplicates22:18
lkclrun umount /opt/chroot/etc/etc manually22:18
lkcli'm just removing that part of the script22:18
lkclyou absolutely do not need to reboot, this is a windows-ism22:19
mikolajwthere should be a way to prevent the duplicates from appearing, that's why I asked if this /etc/fstab part is necessary earlier22:19
lkclyes, i'm sorting that out22:19
lkcl>>>> * lkcl investigating the bind-mounts  <<<<22:19
mikolajwI reboot to put my system in a determined state without having to think too much22:19
lkcl>>>> lkcl> i found out how to not need the bind mounts, schroot type=directory <<<<22:19
lkclok git pull22:20
mikolajwbut first another reboot, because neither git pull nor umount appear to be working :)22:22
lkcldoh22:23
* lkcl welcome back22:31
mikolajwyes, I need a bouncer22:31
lkclbnc4you22:31
lkcla bit obscure, but they're really helpful and responsive on #bnc4you22:32
mikolajwE: /etc/schroot/schroot.conf: line 77: Duplicate group ‘chrootdir’22:32
lkclok to *possibly* help with /etc/resolv.conf inside the chroot i'm...22:32
lkclyes if you're using the same name you'll need to delete the duplicate entries in /etc/schroot/schroot.conf22:33
lkclalso trying to debootstrap twice to the same location... mmm...22:33
lkcli've just updated the script so that it uses schroot -c {chrootname} /bin/bash << EOF22:34
lkcl*not*22:34
lkclchroot /blah/blah /bin/bash << EOF22:34
lkclso you *will* have to make sure that there's no duplicate entries already in /etc/schroot/schroot.conf22:34
lkclbtw FOR GODS SAKE do NOT attempt to rm -fr from inside the chroot to get rid of the chroot22:35
mikolajwyeah, I now have three groups "chrootdir" and 10 groups "deb" (that's how I call my chroot dir) in schroot.conf22:35
lkclyou will DESTROY /tmp, and your actual /home directory both of which are bind-mounted22:35
mikolajwI suggest making the script idempotent22:35
lkclrun "mount | grep chrootdir" from OUTSIDE22:36
lkclthese are not intended to be sophisticated scripts22:36
lkclthey're "get-it-done" scripts22:36
lkcli'm quite happy for someone to submit patches that improve them though22:36
lkclbut without "are you sure are you really sure are you really really sure" prompts :)22:37
mikolajwoh, but that would just require grepping for [$chrootdir]22:38
lkclunix "we assume you know the consequences" philosophy applies :)22:38
lkclstrictly speaking you should never be running with the exact same chroot name anyway22:38
lkclit's intended as a one-off22:38
mikolajwall I want is just not shooting myself in the foot22:38
lkcltherefore, strictly, the correct thing to do would be to terminate the script if it finds that /opt/schroot/{insertchrootname} already exists22:39
lkclwell, beyond this point it's plain sailing22:40
lkclbut22:40
lkcli did say, "anything other than debian", we really should not be spending time on22:40
lkclfor exactly the reasons of incompatibility and "support"22:41
mikolajwok, that would be sufficient for me22:41
lkclhowever what's happened now is that the scripts are much better22:41
lkclno explicit bind mounts22:41
lkclusing schroot itself to install the base dependencies22:41
lkclwhich _shouuuuld_ also fix /etc/resolv.conf22:42
lkcldue to running the schroot setup scripts now, i think it copies over /etc/resolv.conf22:42
lkclyes it does, excellent22:42
lkclurr oh! and appears to bind-mount /etc/passwd and /etc/shadow. nice22:43
lkclor copy them over22:43
lkclnot too sure that's a good idea or not, have to think about that22:43
lkclbut /etc/resolv.conf, yeah that should "fix" the DNS issues22:43
lkclok from here you should be good to go22:44
lkclironically you now need to git clone (or cp -aux) the dev-setup-env scripts _again_ but this time inside the schroot22:44
lkclhttps://libre-soc.org/HDL_workflow/devscripts/22:44
* lkcl going to try that22:44
lkclah.22:45
lkclwe actually don't want /home bind-mounted22:45
lkclfor coriolis222:45
mikolajwgetting a different error (usually) means progress, here's the new error:22:54
mikolajwE: 20nssdatabases: /usr/bin/stat: cannot statx '/etc/networks': No such file or directory22:54
mikolajwE: deb-d7e8411d-04b8-4d8c-a409-9021dbe0b739: Chroot setup failed: stage=setup-start22:55
lkcli know what that is.22:58
lkclhaaang on, the schroot has mounted the entire / directory!22:59
lkclsigh22:59
lkclfrickin frick22:59
mikolajwsnafu22:59
lkcland there's also nssdatabases including /etc/networks which gets copied over by default schroot profile23:00
lkclwhich don't exist *but* would have been set up in /opt/chroot/{chrootname}23:00
lkclgrrrr23:00
lkclooo chroot scripts are a time-sink :)23:28
lkclrunning them again and again each time 5-10-15 mins because of one error, sigh23:28
lkclpaaaatieeeeeence....23:28
mikolajwsuccess?23:47

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!