Hi Cedric,

Ah, you have found another issue. Further evidence we need more formal 
verification in the world, all the way down to bash and python scripts ;)

The summary is: we add a group for `stack`, the haskell dependency manager, 
which chose the GID 1000. When the code tries to add your user's GID (in this 
case, also 1000), it clashes, and so the operation fails.

The fix is to move the stack GID to be out of the way of normal GIDs. 
Unfortunately, I missed it, because our UID and GIDs are in a completely 
different range to the normal ~1000 range of most users.
I've made the change internally, and should be out on GitHub soon. If it 
doesn't pop up soon, I'll just make another PR to link you to for it.

Thanks again for finding these issues!

Cheers,
Luke

--
Dr Luke Mondy, Systems Administrator,
P +61 2 9490 5773 | https://ts.data61.csiro.au
Trustworthy Systems | DATA61 | CSIRO
CSIRO Staff Association Delegate

Hours at CSIRO
Monday:         9:00am to 5pm
Tues, Wed, Fri: 1:30pm to 5pm

________________________________________
From: Cedric MAIRE <[email protected]>
Sent: Monday, 17 August 2020 11:15 PM
To: Mondy, Luke (Data61, Kensington NSW)
Cc: [email protected]
Subject: RE: Devel Digest, Vol 75, Issue 8

Hi Luke,

Thanks for your help!

I just tried out your solution and get back the following error: `groupmod: GID 
'1000' already exists`. Here is the workflow that I follow:

```
$ git clone https://github.com/SEL4PROJ/seL4-CAmkES-L4v-dockerfiles.git
$ cd ~/sel4/seL4-CAmkES-L4v-dockerfiles/
$ git pull # Make sure to be up-to-date.
$ git checkout fix_rust
$ git pull # Make sure to be up-to-date. `fix_rust` is ahead of `master` so no 
missing commits.
$ ./build.sh -p -b camkes -s rust
$ make user CAMKES_IMG=camkes-rust HOST_DIR="~/sel4/"
```

I attached a more detailed log of the error I get. The command throwing this is 
(full command in log file):
`/bin/sh -c groupadd -fg ${GID} ${GROUP} [...] && chmod -R ug+rw /home/${UNAME}`

Does this look familiar to you?

Best,

Cedric

-----Original Message-----
From: Devel <[email protected]> On Behalf Of [email protected]
Sent: samedi, 15 août 2020 04:00
To: [email protected]
Subject: Devel Digest, Vol 75, Issue 8

Send Devel mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        
https://sel4.systems/lists/listinfo/devel?mc_phishing_protection_id=28047-bsrk3aadu815grd7h9vg
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific than "Re: 
Contents of Devel digest..."


Today's Topics:

   1. Re: Dockerfiles - "camkes-rust" Image
      (Mondy, Luke (Data61, Kensington NSW))


----------------------------------------------------------------------

Message: 1
Date: Fri, 14 Aug 2020 06:29:32 +0000
From: "Mondy, Luke (Data61, Kensington NSW)"
        <[email protected]>
To: "[email protected]" <[email protected]>
Subject: Re: [seL4] Dockerfiles - "camkes-rust" Image
Message-ID:
        
<syapr01mb25284e1d39674828fdc11ebed5...@syapr01mb2528.ausprd01.prod.outlook.com>

Content-Type: text/plain; charset="us-ascii"

Hello Cedric,

Thanks for the report. I believe the best way to use the camkes-rust image is 
to run this:

    make user CAMKES_IMG=camkes-rust

However, in saying that, it unfortunately does not perform quite as hoped. 
Because of the way the code is built, it ends up putting the Cargo/Rust content 
into /root/.cargo, which is inaccessible to you as a non-root user.

This is an oversight on my part, as unfortunately these interactive bits of the 
Dockerfile system don't get tested automatically.

I've made a PR on GitHub, which shows the fixes needed: 
https://github.com/SEL4PROJ/seL4-CAmkES-L4v-dockerfiles/pull/24
Note that the master branch has also been recently updated, so you may need to 
pick further commits from there (or simply pull them all down first) for things 
to work.

Let me know if that helps.

Cheers,
Luke

--
Dr Luke Mondy, Systems Administrator,
P +61 2 9490 5773 | 
https://ts.data61.csiro.au/?mc_phishing_protection_id=28047-bsrk3aadu815grd7h9vg
Trustworthy Systems | DATA61 | CSIRO
CSIRO Staff Association Delegate

Hours at CSIRO
Monday:         9:00am to 5pm
Tues, Wed, Fri: 1:30pm to 5pm

________________________________________
From: Devel <[email protected]> on behalf of Cedric MAIRE 
<[email protected]>
Sent: Friday, 14 August 2020 2:42 AM
To: [email protected]
Subject: [seL4] Dockerfiles - "camkes-rust" Image

Dear seL4 developers,

I am using the provided dockerfiles repository to build the docker images in 
order to compile seL4.

I would like to add a rust compiler to my docker image, which I do with 
"./build.sh -p -b camkes -s rust". This builds an image tagged 
"trustworthysystems/camkes-rust". I would like to launch this image in a 
container using the "Makefile" as I would do for the 
"trustworthysystems/camkes" image (using "make user").

I tried adding targets to the "Makefile" file changing the "USER_BASE_IMG" 
variable to use "trustworthysystems/camkes-rust" instead of 
"trustworthysystems/camkes", without success. I also tried to force the image 
by renaming/retagging "trustworthysystems/camkes " to 
"trustworthysystems/camkes-old" and "trustworthysystems/camkes-rust" to 
"trustworthysystems/camkes ". I also forced every base image to be the one 
containing the Rust compiler (in "Makefile"). All without success.

For some reason "trustworthysystems/camkes-rust" image is never used. If I 
start it manually using docker commands I am able to launch and attach to it, 
getting the expected Rust compiler. Through the "Makefile" it ever only uses 
"trustworthysystems/camkes" without the Rust compiler.

Is there an easy way to get this to work? What am I missing?

Best regards,

Cedric


===============================================================================
The ICRC - working to protect and assist people affected by armed conflict and 
other situations of violence. Find out more: www.icrc.org

This e-mail is intended for the named recipient(s) only.
Its contents are confidential and may only be retained by the named recipient
(s) and may only be copied or disclosed with the consent of the International 
Committee of the Red Cross (ICRC). If you are not an intended recipient please 
delete this e-mail and notify the sender.
===============================================================================


_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel?mc_phishing_protection_id=28047-bsrk3aadu815grd7h9vg



------------------------------

Subject: Digest Footer

_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel?mc_phishing_protection_id=28047-bsrk3aadu815grd7h9vg


------------------------------

End of Devel Digest, Vol 75, Issue 8
************************************

===============================================================================
The ICRC - working to protect and assist people affected by armed conflict and
other situations of violence. Find out more: www.icrc.org

This e-mail is intended for the named recipient(s) only.
Its contents are confidential and may only be retained by the named recipient
(s) and may only be copied or disclosed with the consent of the International
Committee of the Red Cross (ICRC). If you are not an intended recipient please
delete this e-mail and notify the sender.
===============================================================================


_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to