← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~xnox/launchpad-buildd:allow-dev-mem into launchpad-buildd:master

 

Dimitri John Ledkov has proposed merging ~xnox/launchpad-buildd:allow-dev-mem into launchpad-buildd:master.

Commit message:
lxd: add /dev/mem device

Normally, first boot snapd seeding takes some time, kind of like cooking from scratch. snap-preseed tool effectively does some of those first boot snapd seeding tasks at image build time instead. Effectively turning the image into a ready-meal, which boots much quicker on first boot.

It needs /dev/mem device to be available at the moment. I've tested that with mknod works from within livecd-rootfs, but I guess it would be much nicer if that device was readily available in the launchpad-buildd lxd livefs builders. Hence proposing this addition to the lxd profile.

I am querying separately from snapd team as to what for /dev/mem access by snap-preseed is needed. It was not immediately obvious to me.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~xnox/launchpad-buildd/+git/launchpad-buildd/+merge/383836
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~xnox/launchpad-buildd:allow-dev-mem into launchpad-buildd:master.
diff --git a/lpbuildd/target/lxd.py b/lpbuildd/target/lxd.py
index fcd6706..b7267a5 100644
--- a/lpbuildd/target/lxd.py
+++ b/lpbuildd/target/lxd.py
@@ -353,6 +353,12 @@ class LXD(Backend):
                 "parent": self.bridge_name,
                 "type": "nic",
                 },
+            "devmem": {
+                "source": "/dev/mem",
+                "uid": "0",
+                "gid": "15",
+                "type": "unix-char",
+               },
             }
         if major >= 3:
             devices["root"] = {

Follow ups