<feed xmlns='http://www.w3.org/2005/Atom'>
<title>guix/tests/containers.scm, branch master</title>
<subtitle>Transactional package manager, declarative GNU/Linux distribution, reproducible deployment tool, and more! https://guix.gnu.org</subtitle>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/'/>
<entry>
<title>tests: Skip container tests that call ‘primitive-fork’ in a ‘safe-clone’ child.</title>
<updated>2026-06-18T14:46:53+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2026-06-14T16:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=47156e7abc45c50a3a52e7ac05698871555440fe'/>
<id>47156e7abc45c50a3a52e7ac05698871555440fe</id>
<content type='text'>
This works around guix/guix#7690 whereby calling ‘primitive-fork’ from a child
process created with ‘safe-clone’ causes said child process to hang.

* tests/containers.scm ("call-with-container, pid namespace")
("container-excursion")
("container-excursion, same namespaces")
("container-excursion*")
("container-excursion*, /proc"): Skip.

Change-Id: Ieb49a5c5e3e92cff40f6dd2472d0cb177680d9f4
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #9085
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This works around guix/guix#7690 whereby calling ‘primitive-fork’ from a child
process created with ‘safe-clone’ causes said child process to hang.

* tests/containers.scm ("call-with-container, pid namespace")
("container-excursion")
("container-excursion, same namespaces")
("container-excursion*")
("container-excursion*, /proc"): Skip.

Change-Id: Ieb49a5c5e3e92cff40f6dd2472d0cb177680d9f4
Signed-off-by: Ludovic Courtès &lt;ludo@gnu.org&gt;
Merges: #9085
</pre>
</div>
</content>
</entry>
<entry>
<title>Reinstate "linux-container: Remove #:lock-mounts? and related code."</title>
<updated>2025-10-29T02:34:28+00:00</updated>
<author>
<name>Maxim Cournoyer</name>
<email>maxim@guixotic.coop</email>
</author>
<published>2025-10-16T07:36:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=10edda5aa5f92e7bfcff4902d4f3c11373d1e725'/>
<id>10edda5aa5f92e7bfcff4902d4f3c11373d1e725</id>
<content type='text'>
This reverts commit e0e64be8de3d220a12612b3a2e4aee428277d865.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit e0e64be8de3d220a12612b3a2e4aee428277d865.
</pre>
</div>
</content>
</entry>
<entry>
<title>linux-container: Remove #:lock-mounts? and related code.</title>
<updated>2025-10-13T12:48:26+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2025-10-13T08:39:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=e0e64be8de3d220a12612b3a2e4aee428277d865'/>
<id>e0e64be8de3d220a12612b3a2e4aee428277d865</id>
<content type='text'>
This reverts commits 437bb9ece55f37d4b5a62cafc98c0c3b848a53ce and
a57ed987ffd1452ba5a4d70feb54893e99b8e076, which were reported in
guix/guix#1169 to occasionally cause errors like:

  guix shell: error: unshare : 268566528: Invalid argument
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commits 437bb9ece55f37d4b5a62cafc98c0c3b848a53ce and
a57ed987ffd1452ba5a4d70feb54893e99b8e076, which were reported in
guix/guix#1169 to occasionally cause errors like:

  guix shell: error: unshare : 268566528: Invalid argument
</pre>
</div>
</content>
</entry>
<entry>
<title>linux-container: Lock mounts by default.</title>
<updated>2025-05-05T12:34:00+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2025-04-08T12:03:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=a57ed987ffd1452ba5a4d70feb54893e99b8e076'/>
<id>a57ed987ffd1452ba5a4d70feb54893e99b8e076</id>
<content type='text'>
This makes it impossible to unmount or remount things from within
‘call-with-container’.

* gnu/build/linux-container.scm (initialize-user-namespace):
Add #:host-uid and #:host-gid. and honor them.
(run-container): Add #:lock-mounts?.  Honor it by calling ‘unshare’
followed by ‘initialize-user-namespace’.
(call-with-container): Add #:lock-mounts? and pass it down.
(container-excursion): Get the user namespace owning the PID namespace
and join it, then join the remaining namespaces.
* tests/containers.scm ("call-with-container, mnt namespace, locked mounts"):
New test.
("container-excursion"): Pass #:lock-mounts? #f.

Change-Id: I13be982aef99e68a653d472f0e595c81cfcfa392
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it impossible to unmount or remount things from within
‘call-with-container’.

* gnu/build/linux-container.scm (initialize-user-namespace):
Add #:host-uid and #:host-gid. and honor them.
(run-container): Add #:lock-mounts?.  Honor it by calling ‘unshare’
followed by ‘initialize-user-namespace’.
(call-with-container): Add #:lock-mounts? and pass it down.
(container-excursion): Get the user namespace owning the PID namespace
and join it, then join the remaining namespaces.
* tests/containers.scm ("call-with-container, mnt namespace, locked mounts"):
New test.
("container-excursion"): Pass #:lock-mounts? #f.

Change-Id: I13be982aef99e68a653d472f0e595c81cfcfa392
</pre>
</div>
</content>
</entry>
<entry>
<title>linux-container: Support having a read-only root file system.</title>
<updated>2025-05-05T12:33:59+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2025-04-04T14:36:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=a391394a22f76e29459132888f9950ad74993c5f'/>
<id>a391394a22f76e29459132888f9950ad74993c5f</id>
<content type='text'>
Until now, the read-only file system set up by ‘call-with-container’
would always be writable.  With this change, it can be made read-only.
With this patch, only ‘least-authority-wrapper’ switches to a read-only
root file system.

* gnu/build/linux-container.scm (remount-read-only): New procedure.
(mount-file-systems): Add #:writable-root? and #:populate-file-system
and honor them.
(run-container): Likewise.
(call-with-container): Likewise.
* gnu/system/linux-container.scm (container-script): Pass #:writable-root?
to ‘call-with-container’.
(eval/container): Add #:populate-file-system and #:writable-root? and
honor them.
* guix/scripts/environment.scm (launch-environment/container):
Pass #:writable-root? to ‘call-with-container’.
* guix/scripts/home.scm (spawn-home-container): Likewise.
* tests/containers.scm ("call-with-container, mnt namespace, read-only root")
("call-with-container, mnt namespace, writable root"): New tests.

Change-Id: I603e2fd08851338b737bb16c8af3f765e2538906
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Until now, the read-only file system set up by ‘call-with-container’
would always be writable.  With this change, it can be made read-only.
With this patch, only ‘least-authority-wrapper’ switches to a read-only
root file system.

* gnu/build/linux-container.scm (remount-read-only): New procedure.
(mount-file-systems): Add #:writable-root? and #:populate-file-system
and honor them.
(run-container): Likewise.
(call-with-container): Likewise.
* gnu/system/linux-container.scm (container-script): Pass #:writable-root?
to ‘call-with-container’.
(eval/container): Add #:populate-file-system and #:writable-root? and
honor them.
* guix/scripts/environment.scm (launch-environment/container):
Pass #:writable-root? to ‘call-with-container’.
* guix/scripts/home.scm (spawn-home-container): Likewise.
* tests/containers.scm ("call-with-container, mnt namespace, read-only root")
("call-with-container, mnt namespace, writable root"): New tests.

Change-Id: I603e2fd08851338b737bb16c8af3f765e2538906
</pre>
</div>
</content>
</entry>
<entry>
<title>linux-container: 'container-excursion' forks to join the PID namespace.</title>
<updated>2023-01-30T21:24:27+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-01-30T21:20:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=0ef8fe22ed8985c9656835fc25ab3463d55b6669'/>
<id>0ef8fe22ed8985c9656835fc25ab3463d55b6669</id>
<content type='text'>
Fixes &lt;https://issues.guix.gnu.org/61156&gt;.

* gnu/build/linux-container.scm (container-excursion): Add extra call to
'primitive-fork' and invoke THUNK in the child process.
* tests/containers.scm ("container-excursion"): Remove extra
'primitive-fork' call, now unnecessary.
("container-excursion*, /proc"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes &lt;https://issues.guix.gnu.org/61156&gt;.

* gnu/build/linux-container.scm (container-excursion): Add extra call to
'primitive-fork' and invoke THUNK in the child process.
* tests/containers.scm ("container-excursion"): Remove extra
'primitive-fork' call, now unnecessary.
("container-excursion*, /proc"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>container: Correctly report exit status.</title>
<updated>2023-01-30T21:24:27+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2023-01-29T21:13:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=52eb3db19cb9e5c294c86a8552a4baaa5b473672'/>
<id>52eb3db19cb9e5c294c86a8552a4baaa5b473672</id>
<content type='text'>
* gnu/build/linux-container.scm (container-excursion): Return the raw
status value.
* tests/containers.scm ("container-excursion, same namespaces"): Add
'status:exit-val' call.
* guix/scripts/container/exec.scm (guix-container-exec): Correctly
handle the different cases.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/build/linux-container.scm (container-excursion): Return the raw
status value.
* tests/containers.scm ("container-excursion, same namespaces"): Add
'status:exit-val' call.
* guix/scripts/container/exec.scm (guix-container-exec): Correctly
handle the different cases.
</pre>
</div>
</content>
</entry>
<entry>
<title>linux-container: Reset jailed root permissions.</title>
<updated>2020-10-01T10:51:13+00:00</updated>
<author>
<name>Jelle Licht</name>
<email>jlicht@fsfe.org</email>
</author>
<published>2020-09-29T21:25:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=e74818353882f187e5971b5a3a481f17df883dbe'/>
<id>e74818353882f187e5971b5a3a481f17df883dbe</id>
<content type='text'>
* gnu/build/linux-container.scm (mount-file-systems): Add 'chmod' call.
* tests/containers.scm
("call-with-container, mnt namespace, root permissions"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* gnu/build/linux-container.scm (mount-file-systems): Add 'chmod' call.
* tests/containers.scm
("call-with-container, mnt namespace, root permissions"): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Skip container test when lacking kernel support.</title>
<updated>2019-10-15T08:21:41+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-10-15T08:21:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=e464ac667297d2acf57e52438a39cadc87b95da2'/>
<id>e464ac667297d2acf57e52438a39cadc87b95da2</id>
<content type='text'>
This is a followup to 96b35998e610c7fc37bf87bf9e07e63d3bebd0a3.

* tests/containers.scm ("eval/container, non-empty load path"): Add
missing 'skip-if-unsupported' call.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a followup to 96b35998e610c7fc37bf87bf9e07e63d3bebd0a3.

* tests/containers.scm ("eval/container, non-empty load path"): Add
missing 'skip-if-unsupported' call.
</pre>
</div>
</content>
</entry>
<entry>
<title>linux-container: 'eval/container' correctly passes -L and -C flags.</title>
<updated>2019-09-18T21:08:28+00:00</updated>
<author>
<name>Ludovic Courtès</name>
<email>ludo@gnu.org</email>
</author>
<published>2019-09-18T13:11:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vineetk.net/guix/commit/?id=96b35998e610c7fc37bf87bf9e07e63d3bebd0a3'/>
<id>96b35998e610c7fc37bf87bf9e07e63d3bebd0a3</id>
<content type='text'>
This fixes a type error.

* gnu/system/linux-container.scm (eval/container): Use 'append-map', not
'map'.
* tests/containers.scm ("eval/container, non-empty load path"): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This fixes a type error.

* gnu/system/linux-container.scm (eval/container): Use 'append-map', not
'map'.
* tests/containers.scm ("eval/container, non-empty load path"): New test.
</pre>
</div>
</content>
</entry>
</feed>
