From: Andreas Reichel <andreas.reichel.ext@siemens.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: isar-users@googlegroups.com,
Cedric Hombourger <Cedric_Hombourger@mentor.com>
Subject: Re: [PATCH v2 04/17] Revert "wic: Use sudo instead of pseudo"
Date: Mon, 16 Apr 2018 12:53:45 +0200 [thread overview]
Message-ID: <20180416105345.GH8866@iiotirae> (raw)
In-Reply-To: <20180416104456.GD8866@iiotirae>
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 <henning.schild@siemens.com>
> > ---
> > 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
next prev parent reply other threads:[~2018-04-16 10:57 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-13 14:18 [PATCH v2 00/16] wic integration Henning Schild
2018-04-13 14:18 ` [PATCH v2 01/17] Revert "wic: Make the bootimg-efi plugin generate usable images" Henning Schild
2018-04-13 14:18 ` [PATCH v2 02/17] Revert "wic: Introduce the `WicExecError` exception class" Henning Schild
2018-04-13 14:18 ` [PATCH v2 03/17] Revert "wic: Work around mcopy error" Henning Schild
2018-04-13 14:18 ` [PATCH v2 04/17] Revert "wic: Use sudo instead of pseudo" Henning Schild
2018-04-16 10:44 ` Andreas Reichel
2018-04-16 10:53 ` Andreas Reichel [this message]
2018-04-16 10:57 ` Henning Schild
2018-04-13 14:18 ` [PATCH v2 05/17] Revert "wic: Remove sysroot support" Henning Schild
2018-04-13 14:18 ` [PATCH v2 06/17] wic: now truly go for the wic version we claim to have Henning Schild
2018-04-13 14:18 ` [PATCH v2 07/17] Revert "isar-init-build-env: Add /sbin to PATH" Henning Schild
2018-04-13 14:18 ` [PATCH v2 08/17] classes: image: introduce size measuring function, for before do_*_image Henning Schild
2018-04-13 14:18 ` [PATCH v2 09/17] meta/image: Fix broken variables KERNEL_IMAGE and INITRD_IMAGE Henning Schild
2018-04-16 10:45 ` Andreas Reichel
2018-04-13 14:18 ` [PATCH v2 10/17] isar-init-build-env: make ISARROOT available in bitbake Henning Schild
2018-04-13 14:19 ` [PATCH v2 11/17] images: New class wic-img for wic intregration Henning Schild
2018-04-13 14:44 ` Henning Schild
2018-04-16 10:17 ` Claudius Heine
2018-04-16 10:25 ` Henning Schild
2018-04-16 10:31 ` Andreas Reichel
2018-04-13 14:19 ` [PATCH v2 12/17] wic: Add pcibios boot plugins and wks files Henning Schild
2018-04-16 10:52 ` Andreas Reichel
2018-04-16 11:48 ` Henning Schild
2018-04-13 14:19 ` [PATCH v2 13/17] scripts/start_vm: Enable booting of full disk images Henning Schild
2018-04-16 10:33 ` Andreas Reichel
2018-04-16 11:46 ` Henning Schild
2018-04-16 13:24 ` Andreas Reichel
2018-04-13 14:19 ` [PATCH v2 14/17] multiconfig: Switch qemuamd64-stretch to using wic by default Henning Schild
2018-04-16 10:25 ` Claudius Heine
2018-04-16 10:32 ` Henning Schild
2018-04-13 14:19 ` [PATCH v2 15/17] multiconfig: Switch qemui386-stretch " Henning Schild
2018-04-16 10:35 ` Andreas Reichel
2018-04-16 10:43 ` Henning Schild
2018-04-16 10:51 ` Henning Schild
2018-04-16 10:56 ` Claudius Heine
2018-04-13 14:19 ` [PATCH v2 16/17] docs: Change according to recent patches Henning Schild
2018-04-13 14:19 ` [PATCH v2 17/17] scripts/vm_smoke_test: double the timeout we wait for qemus Henning Schild
2018-04-16 10:47 ` Andreas Reichel
2018-04-16 11:45 ` Henning Schild
2018-04-25 15:53 ` [PATCH v2 00/16] wic integration Alexander Smirnov
2018-04-26 11:26 ` Henning Schild
2018-05-01 19:23 ` Alexander Smirnov
2018-05-03 16:32 ` Henning Schild
2018-05-03 16:39 ` Alexander Smirnov
2018-05-04 8:16 ` Henning Schild
2018-05-04 8:32 ` Alexander Smirnov
2018-05-04 9:30 ` Henning Schild
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180416105345.GH8866@iiotirae \
--to=andreas.reichel.ext@siemens.com \
--cc=Cedric_Hombourger@mentor.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox