From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6543937367387930624 X-Received: by 10.28.153.211 with SMTP id b202mr454352wme.21.1523876255731; Mon, 16 Apr 2018 03:57:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.28.153.88 with SMTP id b85ls1685337wme.1.canary-gmail; Mon, 16 Apr 2018 03:57:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx4++72adNww95E98Q/Vw/vNNjgAuvBAI7ZdM3BYcngMQWc/ZdZHEOtO8w6pbVDgQlnDlhoez X-Received: by 10.28.7.65 with SMTP id 62mr56298wmh.5.1523876255286; Mon, 16 Apr 2018 03:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523876255; cv=none; d=google.com; s=arc-20160816; b=TgEKTudAYA5eEbW9nOdfffPdmp4wG3kDPRMKY9nrRyUh5EWfP2vG1zxhS+AiGrPDyk 4JlCiKX9SWGCjHRQqadIE1Eq14ewnzkJjosTjqVrdzCvqKEc+4eQs22eyeP+E/Ixmst4 HIh2UIYIogwDoZouvHbhmPTP+fMDPtn1ZyOr7f6QSPrEnbkrAS3Jr1z2eKZ8oeGzYwHv jg6kazgKSB/XHa93fO2ZR0NuxBYM5SWBhVUs7GVlya4C6PHxg1FIy69bG1ecaoTlWt42 4ULUkw4e8uv5UzRodLLVs0ELRuZZ6QC7fCSXbEUFIwIzIyrSxwEygI1gidjUUVgNR+6a UQCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:arc-authentication-results; bh=Q7TXXtz4dUH8OycittbmCLYpgsNaHWvrUY2vJi2QYGw=; b=BxxF2MgmrWW+jDY6DuFGj8lvc81e9GH2K6z0eHYHhCh9gxs9hZd2+rUTCLeq2SVl9T CVRxrzHieqF83o3+OWCjAXfWcdpZ6ARgtx8xoyrtzZTXG8/X9gOuVMNaHgdAvgROnssZ 3hyQ5Hm9yNaR7iFo8rWU++Vo/CPeZGixJTbkPPt/z9rAvw805q7hM21VzHDM6D3Jrgef KamxGGZLkW8Qox7gKUtFaVHpQ7ZWGdnOkd2FwiOm4lTiZwtQuxomtz++ZmEyubSh4DSa 2oeELjPysyiiyDBAv2oKAWlF0cOXECgNUlvtpEV7KdnjK2GfaDpjU/rL0Q1oAiJiYneh bWdg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id s130si348592wms.0.2018.04.16.03.57.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 03:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) client-ip=192.35.17.2; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of henning.schild@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=henning.schild@siemens.com Received: from mail2.siemens.de (mail2.siemens.de [139.25.208.11]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w3GAvYGA000884 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Apr 2018 12:57:35 +0200 Received: from mmd1pvb1c.ad001.siemens.net (md1pvb1c.ad001.siemens.net [139.25.68.40] (may be forged)) by mail2.siemens.de (8.15.2/8.15.2) with ESMTP id w3GAvYMa027878; Mon, 16 Apr 2018 12:57:34 +0200 Date: Mon, 16 Apr 2018 12:57:34 +0200 From: Henning Schild To: Andreas Reichel Cc: , Cedric Hombourger Subject: Re: [PATCH v2 04/17] Revert "wic: Use sudo instead of pseudo" Message-ID: <20180416125734.31146dfe@mmd1pvb1c.ad001.siemens.net> In-Reply-To: <20180416104456.GD8866@iiotirae> References: <165ec037905a68576eb72dbe8e525323e02b2f0c.1523628814.git.henning.schild@siemens.com> <20180416104456.GD8866@iiotirae> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TUID: GbEUm6v7ktbe Am Mon, 16 Apr 2018 12:44:56 +0200 schrieb Andreas Reichel : > 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. This is not code from me. I just revert unnecessary changes that where made to our copy of wic. The code does not hurt if you set FAKEROOTCMD to something custom, which my patch does. Henning > > 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 > > >