From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6543937367387930624 X-Received: by 2002:a19:9907:: with SMTP id b7-v6mr446425lfe.3.1523875729116; Mon, 16 Apr 2018 03:48:49 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.82.84 with SMTP id g81ls1400290ljb.9.gmail; Mon, 16 Apr 2018 03:48:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx49jCxxe/91uTW2hdmatKsugZwl/p+6OVOBljC42Pp3Z6LCpv2t+4ENShc30JXvDBoFFPRnw X-Received: by 10.46.128.130 with SMTP id i2mr418969ljg.33.1523875728607; Mon, 16 Apr 2018 03:48:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523875728; cv=none; d=google.com; s=arc-20160816; b=TFK2qYU017ME2YtDr9sZtsf53F/WUwMd1o1hyTMm9UlVE8sTM9bNYr+6G4QP/PljQQ KuicPJLWRnJv1JxAdZQGV3QT/yUvn468y+G1P2o33z9mzecnZB4qRUyRxBgrUS/mlXF4 jfegE6D1mlWFazpWKjEUF3rMEl5UcGVMLjfoTXJcjv6JHJ5peA/gSQjxdQ8adaP1FWRI Xxkw+6x2DJ64txcyN4xxEw/eTyOJXfMPAPbVAtEQfuMkRm3bT7RSAGw7aWBYJ3CRjDb/ QMmn/odpFGDt03IRabt6V6ItF5pyptknYrkweRx/dXrLmpdqt3tD6uh8uHtRw+O319NW iB8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:content-description :mime-version:references:message-id:subject:cc:to:from:date :arc-authentication-results; bh=OT/VXOr96A9SZFVjEP9czogwe0ylpYh8EJcuJR2oIHI=; b=Kdbyw0L9V44X6fXJuMd5jHqWF165ZkCrcop5QSgl8jOcTV2snUT6byX366DrjxJmoH 7W9DMBFmx79ejIFjHOGP2+7kbZp/7jfzi4Tu0k3wJ++2/1mTyONL6psu4W38lkRhZVte K8R7nJcOyiD+k4WzzdCFT0JaeLRPG5LGVtyxwf/U+1mEsmuqKdePAvXW8I5iGM2rilKl m3fHTaErY1l2mbz4ZBjKrhAb1jyHF2h8uR6H3HWgVRBGlhtVMqMLdAOMjGxfYJ982kIn m/7iWQcTor7rlRkS1afq6k8x7nBrImt7dJ2AEQUBaqYDj0alAV+hfNzUYRQHmuxrAg2k diOw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id p138-v6si600971lfd.0.2018.04.16.03.48.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 03:48:48 -0700 (PDT) Received-SPF: pass (google.com: domain of andreas.reichel.ext@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id w3GAmlEU002623 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Apr 2018 12:48:47 +0200 Received: from iiotirae (golem.ppmd.siemens.net [139.25.69.245]) by mail2.sbs.de (8.15.2/8.15.2) with SMTP id w3GAmlsB001387; Mon, 16 Apr 2018 12:48:47 +0200 Date: Mon, 16 Apr 2018 12:44:56 +0200 From: Andreas Reichel To: Henning Schild Cc: isar-users@googlegroups.com, Cedric Hombourger Subject: Re: [PATCH v2 04/17] Revert "wic: Use sudo instead of pseudo" Message-ID: <20180416104456.GD8866@iiotirae> References: <165ec037905a68576eb72dbe8e525323e02b2f0c.1523628814.git.henning.schild@siemens.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: message Content-Disposition: inline In-Reply-To: <165ec037905a68576eb72dbe8e525323e02b2f0c.1523628814.git.henning.schild@siemens.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-TUID: 43blVS8ICzsa On Fri, Apr 13, 2018 at 04:18:53PM +0200, Henning Schild wrote: > This reverts commit bf873d3b089474d9061df4c1f0985abfac038ff6. > > Not required if you run wic as root or set FAKEROOTCMD. > > Signed-off-by: Henning Schild > --- > scripts/lib/wic/partition.py | 27 +++++++++++++++++++-------- > 1 file changed, 19 insertions(+), 8 deletions(-) > > diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py > index 34130d8..20bc4a2 100644 > --- a/scripts/lib/wic/partition.py > +++ b/scripts/lib/wic/partition.py > @@ -201,6 +201,17 @@ class Partition(): > > Currently handles ext2/3/4, btrfs and vfat. > """ > + p_prefix = os.environ.get("PSEUDO_PREFIX", "%s/usr" % native_sysroot) > + p_localstatedir = os.environ.get("PSEUDO_LOCALSTATEDIR", > + "%s/../pseudo" % rootfs_dir) > + p_passwd = os.environ.get("PSEUDO_PASSWD", rootfs_dir) > + p_nosymlinkexp = os.environ.get("PSEUDO_NOSYMLINKEXP", "1") > + pseudo = "export PSEUDO_PREFIX=%s;" % p_prefix > + pseudo += "export PSEUDO_LOCALSTATEDIR=%s;" % p_localstatedir > + pseudo += "export PSEUDO_PASSWD=%s;" % p_passwd > + pseudo += "export PSEUDO_NOSYMLINKEXP=%s;" % p_nosymlinkexp > + pseudo += "%s " % get_bitbake_var("FAKEROOTCMD") > + In patch 11 you write that Isar does/ cannot use Pseudo. So why do you reinstantiate the variables here. I don't understand their purpose because they are prefixed with PSEUDO. > rootfs = "%s/rootfs_%s.%s.%s" % (cr_workdir, self.label, > self.lineno, self.fstype) > if os.path.isfile(rootfs): > @@ -226,7 +237,7 @@ class Partition(): > self.source_file = rootfs > > # get the rootfs size in the right units for kickstart (kB) > - du_cmd = "sudo du -Lbks %s" % rootfs > + du_cmd = "du -Lbks %s" % rootfs > out = exec_cmd(du_cmd) > self.size = int(out.split()[0]) > > @@ -234,7 +245,7 @@ class Partition(): > """ > Prepare content for an ext2/3/4 rootfs partition. > """ > - du_cmd = "sudo du -ks %s" % rootfs_dir > + du_cmd = "du -ks %s" % rootfs_dir > out = exec_cmd(du_cmd) > actual_rootfs_size = int(out.split()[0]) > > @@ -249,7 +260,7 @@ class Partition(): > if self.label: > label_str = "-L %s" % self.label > > - mkfs_cmd = "sudo mkfs.%s -F %s %s %s -d %s" % \ > + mkfs_cmd = "mkfs.%s -F %s %s %s -d %s" % \ > (self.fstype, extra_imagecmd, rootfs, label_str, rootfs_dir) > exec_cmd(mkfs_cmd) > > @@ -262,7 +273,7 @@ class Partition(): > > Currently handles ext2/3/4 and btrfs. > """ > - du_cmd = "sudo du -ks %s" % rootfs_dir > + du_cmd = "du -ks %s" % rootfs_dir > out = exec_cmd(du_cmd) > actual_rootfs_size = int(out.split()[0]) > > @@ -275,7 +286,7 @@ class Partition(): > if self.label: > label_str = "-L %s" % self.label > > - mkfs_cmd = "sudo mkfs.%s -b %d -r %s %s %s" % \ > + mkfs_cmd = "mkfs.%s -b %d -r %s %s %s" % \ > (self.fstype, rootfs_size * 1024, rootfs_dir, label_str, rootfs) > exec_cmd(mkfs_cmd) > > @@ -283,7 +294,7 @@ class Partition(): > """ > Prepare content for a msdos/vfat rootfs partition. > """ > - du_cmd = "sudo du -bks %s" % rootfs_dir > + du_cmd = "du -bks %s" % rootfs_dir > out = exec_cmd(du_cmd) > blocks = int(out.split()[0]) > > @@ -331,7 +342,7 @@ class Partition(): > if self.label: > label_str = "-L %s" % self.label > > - mkfs_cmd = "sudo mkfs.%s -F %s %s %s" % \ > + mkfs_cmd = "mkfs.%s -F %s %s %s" % \ > (self.fstype, extra_imagecmd, label_str, rootfs) > exec_cmd(mkfs_cmd) > > @@ -347,7 +358,7 @@ class Partition(): > if self.label: > label_str = "-L %s" % self.label > > - mkfs_cmd = "sudo mkfs.%s -b %d %s %s" % \ > + mkfs_cmd = "mkfs.%s -b %d %s %s" % \ > (self.fstype, self.size * 1024, label_str, rootfs) > exec_cmd(mkfs_cmd) > > -- > 2.16.1 > -- Andreas Reichel Dipl.-Phys. (Univ.) Software Consultant Andreas.Reichel@tngtech.com, +49-174-3180074 TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterfoehring Geschaeftsfuehrer: Henrik Klagges, Dr. Robert Dahlke, Gerhard Mueller Sitz: Unterfoehring * Amtsgericht Muenchen * HRB 135082