[Libre-soc-dev] Coriolis2 Non-Chroot Script

Luke Kenneth Casson Leighton lkcl at lkcl.net
Tue Sep 14 17:12:02 BST 2021

On Sat, Sep 11, 2021 at 7:30 PM Andrey Miroshnikov
<andrey at technepisteme.xyz> wrote:

> Was just looking at the explanation of schroot "plain" and "directory"
> as you sent the email, as well as the devscripts wiki page which talks
> about setting up a chroot using "mk-deb-chroot".


> Yesterday when I ran the scripts which pull in the soc files into ~/src
> directory, I didn't setup a chroot beforehand.
> Was I supposed to setup a chroot first, in order to have an isolated,
> standardised root system/environment that can be modified by a non-sudo
> user?

ideally, yes, so that the script doesn't "damage" your main system.
and, if you want to go "backwards" it's a simple matter of deleting
that chroot.

> > use the following strategy:
> >
> > 1) take a copy
> > 2) remove the parts that set up an schroot
> > 3) convert anything that requires to be run as a user to just... run as a user
> So looking at "coriolis2-chroot" file and for making a non-chroot
> version, I should (file line numbers where functions occur in [] brackets) :
> -[6-7] Ignore coriolis chroot creation


> -[9-20] Ignore the /tmp/brokenproxy section

ah no, because the "apt-get" *inside* the chroot will be just as broken
as *outside*.

wait.... yes, you should ignore it, because mk-deb-chroot will take
care of creating the relevant brokenproxy apt config.

> -[22-45] Ignore debootstrap, systemd userdb, nssdatabase


> -[47-55] Ignore fstab config


> -[57-77] Ignore schroot config for coriolis


> -[80-100] Install/Remove packages needed for coriolis


> -[102-118] Ignore account creation

correct, because that's taken care of by mk-deb-chroot

> -[120-151] Compile/Install yosys, coriolis2 (removing schroot statements)
> -[153-157] Setup environment vars for coriolisenv
> -[159-177] Compile/Install alliance
> -[179-198] Compile/Install alliance-check-toolkit

yep, yep, yep and yep.

> Just giving "mk-deb-chroot" a read, I noticed lines 25-30, 57-62, 69-75,
> 79-88, would crash the script (as they are not valid commands, or
> continued by backslashes, or encapsulated by quotes).


> Was it used by anyone yet?

just running it now.

> Also it has reference to supporting Arch
> Linux (lines 39-41), must be have been an experimental script.

that was last week.  39-41 should be incorporated into mk-deb-chroot...
ah! they already have.

> I'd need to rework this one before running it as well.

mk-deb-chroot *should* work fine.


we really should have left both of these scripts as "plain" chroots,
not "directory" chroots.  that's the cause of all the aggravation.


More information about the Libre-soc-dev mailing list