[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] CI: Fix CONTAINER_UID0=1 scripts/containerize



commit 3420cc1a50f794df82e398855f72f928c127548f
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Mon Jul 8 18:00:49 2024 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Thu Jul 11 17:45:57 2024 +0100

    CI: Fix CONTAINER_UID0=1 scripts/containerize
    
    Right now, most build containers use root.  Archlinux, Fedora and Yocto set 
up
    a regular user called `user`.
    
    For those containers, trying to containerize as root fails, because
    CONTAINER_UID0=1 does nothing, whereas CONTAINER_UID0=0 forces the user away
    from root.
    
    To make CONTAINER_UID0=1 work reliably, force to root if requested.
    
    Fixes: 17fbe6504dfd ("automation: introduce a new variable to control 
container user")
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
    Release-Acked-By: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
---
 automation/scripts/containerize | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/automation/scripts/containerize b/automation/scripts/containerize
index acdef1b548..03bc483735 100755
--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -51,7 +51,7 @@ esac
 
 # Use this variable to control whether root should be used
 case "_${CONTAINER_UID0}" in
-    _1)   userarg= ;;
+    _1)   userarg="-u 0" ;;
     _0|_) userarg="-u $(id -u) $userns_podman" ;;
 esac
 
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.