Merge ~mwhudson/curtin:chrootabletarget-non-root into curtin:master

Proposed by Michael Hudson-Doyle
Status: Merged
Approved by: Michael Hudson-Doyle
Approved revision: 3a2577cd816e24848537f9e8ecb3f75f8e2c8c1c
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~mwhudson/curtin:chrootabletarget-non-root
Merge into: curtin:master
Diff against target: 13 lines (+1/-1)
1 file modified
curtin/util.py (+1/-1)
Reviewer Review Type Date Requested Status
Dan Bungert Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+446719@code.launchpad.net

Commit message

have ChrootableTarget ignore allow_daemons when target == "/"

For one thing, disabling deamons in the root filesystem is almost
certainly never wanted and for another this allows ChrootableTarget to
be used with "/" as non-root (for example, allowing you to run
get_efibootmgr("/") as non-root when running subiquity integration
tests).

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Dan Bungert (dbungert) wrote :

I feel like doing curtin stuff in a "chroot" to / is quite strange anyhow, but if this helps tests let's do it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/util.py b/curtin/util.py
2index 025b306..005a521 100644
3--- a/curtin/util.py
4+++ b/curtin/util.py
5@@ -740,7 +740,7 @@ class ChrootableTarget(object):
6 if do_mount(p, tpath, opts='--bind'):
7 self.umounts.append(tpath)
8
9- if not self.allow_daemons:
10+ if self.target != "/" and not self.allow_daemons:
11 self.disabled_daemons = disable_daemons_in_root(self.target)
12
13 rconf = paths.target_path(self.target, "/etc/resolv.conf")

Subscribers

People subscribed via source and target branches