]> git.ipfire.org Git - thirdparty/mkosi.git/commitdiff
Make sure we're root in the sandbox when invoking pacman
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 22 Feb 2024 10:48:16 +0000 (11:48 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 22 Feb 2024 12:31:21 +0000 (13:31 +0100)
mkosi/installer/pacman.py

index de240f5314dca038f51022492d43188d53546f9c..1c5982ad81528ecac5a7cdf089617f691b528fa0 100644 (file)
@@ -165,6 +165,9 @@ class Pacman(PackageManager):
                             *cls.mounts(context),
                             *sources,
                             "--chdir", "/work/src",
+                            # pacman will fail unless invoked as root so make sure we're uid/gid 0 in the sandbox.
+                            "--uid", "0",
+                            "--gid", "0",
                         ],
                     ) + (apivfs_cmd(context.root) if apivfs else [])
                 ),