From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6543937367387930624 X-Received: by 2002:a19:ca54:: with SMTP id h20-v6mr460307lfj.38.1523876257132; Mon, 16 Apr 2018 03:57:37 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 10.46.133.18 with SMTP id j18ls1348148lji.2.gmail; Mon, 16 Apr 2018 03:57:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx48fsF4ps+RJ/12gGlcm8Z5eCq0zZCBEZpu7rxh/ixSGINxtrmi57LvWQW6+HxbWRAuNkrjT X-Received: by 10.46.155.20 with SMTP id u20mr410880lji.41.1523876256657; Mon, 16 Apr 2018 03:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523876256; cv=none; d=google.com; s=arc-20160816; b=t7q+qTcLZpxu8xhsmBb6GJcVroX0kcThPEEQ2qO9wGFRXtdLa582GcDF+iYvWuV0Cf ksl5kRu9+EISccGLzZrCff3cC2ZBxConTVsb28AYqBvdVXrBvQvuHoBstjEjcp17Obif 35MujvwnxnISDvATxZ5h2CeAQ9DqEhb/ha948eygbQhI0Fa5CXy3dZroi7zuUfixepFf W3Mn6BKUM6XHEk4z4HqXgG40TbdQlKRHQaRWt6auTZgBsHMqahY4lKC9nNwxpOHbegtm 9XvSpKFqpbmFvSkJ9SuikRjlo1BlTX+pfCcoMAIbtWy0Mb3VmTN2I3bOVGd3aTEYS13Z s7WA== 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=dS8o+/VaunIvm6gFOFC2XvLdWxexmf7a7SJ1QqbfBB8=; b=m0euOS+Qk6m7PQJ3HjZd87g1Py7nmTIadyrXj+8Fdx3nZnWWmJHMOYrFW9kMfvWjVJ sBcCNDhy6W2DDOfZ/CpXSOsaZZoMR2XH0aM6z6nm+d34s0/yKk9Cebnre8fLqUlUtxe2 12O9ViceVL+tE5liS1fqucba4Tmx7Ia7CvGaKs8vUx7b87cK0QWzfDWeDR1bnwKvkkBE 8F0wPiWzsjW32i2/fDUhzb9INHm9YX+zFVjBeby3Hnb8X6mdnITWQYsErok/DksrG6GS n5NOb3QHK72uq+0Cq77kdmC3aKvCIndDmcgCI0TMAgbx8avhj57Oy1DuhtjhrTxW6ADC BQwQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Return-Path: Received: from thoth.sbs.de (thoth.sbs.de. [192.35.17.2]) by gmr-mx.google.com with ESMTPS id u16si335704ljg.4.2018.04.16.03.57.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Apr 2018 03:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of andreas.reichel.ext@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 andreas.reichel.ext@siemens.com designates 192.35.17.2 as permitted sender) smtp.mailfrom=andreas.reichel.ext@siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id w3GAvZ0h000930 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Apr 2018 12:57:36 +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 w3GAvZ9K025489; Mon, 16 Apr 2018 12:57:35 +0200 Date: Mon, 16 Apr 2018 12:53:45 +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: <20180416105345.GH8866@iiotirae> References: <165ec037905a68576eb72dbe8e525323e02b2f0c.1523628814.git.henning.schild@siemens.com> <20180416104456.GD8866@iiotirae> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: message Content-Disposition: inline In-Reply-To: <20180416104456.GD8866@iiotirae> User-Agent: Mutt/1.9.4 (2018-02-28) X-TUID: YLJdWev6dsg9 On Mon, Apr 16, 2018 at 12:44:56PM +0200, [ext] Andreas Reichel wrote: > 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. Okay please ignore this. I finally came to the cover letter :) > > > 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 > > -- > You received this message because you are subscribed to the Google Groups "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. > To post to this group, send email to isar-users@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20180416104456.GD8866%40iiotirae. > For more options, visit https://groups.google.com/d/optout. -- 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