From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7108629846932062208 X-Received: by 2002:a05:6870:5896:b0:e6:6c21:3584 with SMTP id be22-20020a056870589600b000e66c213584mr7116709oab.220.1655111887374; Mon, 13 Jun 2022 02:18:07 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6870:bace:b0:fe:29a0:4b41 with SMTP id js14-20020a056870bace00b000fe29a04b41ls920076oab.11.gmail; Mon, 13 Jun 2022 02:18:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNNd2IXZJbLGfeDJOfXaZAlPYYo0E86sA5KUi4A9xtIqxQ+f39ou6mxTJ+Ejy5cMfF6Oql X-Received: by 2002:a05:6870:339a:b0:f2:d065:be1f with SMTP id w26-20020a056870339a00b000f2d065be1fmr6842553oae.69.1655111886692; Mon, 13 Jun 2022 02:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655111886; cv=none; d=google.com; s=arc-20160816; b=lSaFrfm9Ot4X/NUlqpxKSutQW4kk6x9khF8Cvla3sHZClHM2KpknuC9TjYmbdGWlnQ PX97iD1LzahWWWXQfGzFEr+xznxxYe1q6MqFYQnQPmwYlzr6x2+7mXSIqYfZM+DFy5F6 XbzG/1Vhryj7A7+PK/Y3lsF0+51iCzvpqjBjkWYSQSjBI/3eSj+Kw4lp3fdan06JU4BQ eO4v0KCtKV7lTxUyDgzJMJ1seIadNI3M6blupGdUA8+yOxg3WfBr3WdEmcGJzwW+KXoU v9YxhEogEUgcgqDaSOfuedpWtLi1fTMkDsMvY84SUVBa0cSdYccOkxDYZzfyZwPcgl1O Nsbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr; bh=tPk0uz6zmI/l11tPhQymVmBE2AtfJvof3m9I44eTxy8=; b=r4onPu8aw2JVPK4ugeS/P9dCFWc6ZpqH0tEV0JyG0TaQBDCHEvifJ5C2uY08R1r+AD VJSMf0x9byovFB1EmGU+6IkP7YbC/9QGt6tJsGWnfrvDeXdmiCPibxzQNvKyqkM7RgoO vzbXiCC296eP36iRwbNzRmy2FOdzKPzbvpBOZrYfgkxHokQYCsoqQb4zlF5Yf5D7jh+R aBkrlQrNr9Qg8qw2AMycX/iy1iZxLk/brVZwmNQGl2g3ny4GATot1Q7SOhiM20Kd3mzf gcobtOcEiRW3KfvZp3fUjaN1UpbzG/zEBablZb46+tSnb/X4maBhxCWxMptSr8iNCe5c nnHg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id bk13-20020a056820190d00b0035e8a81e5fcsi371596oob.2.2022.06.13.02.18.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jun 2022 02:18:06 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com X-IronPort-AV: E=Sophos;i="5.91,297,1647331200"; d="scan'208";a="77173231" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 13 Jun 2022 01:18:05 -0800 IronPort-SDR: 6XMwJwNRbbPOgqlUxjwFUSxIj9iR+Q0LruuC97rHca7/1nvVsiEwLikQ5Uv5VUy22nTCloqRwO MQ0s12BhnYui7/PHnDim95mx/CSYnHregWlBE3q1ibwcWJNI5nkVfj/T2zlWToYcuritaAGOsi XhgoKAgjdfMTc91DCGw9dqVbPsuH6apVfkrrmsfGhI+piurTIhYbw1bMC3lP6+W/F5+rbFsV9r 6JJvsJgPtfw4kyVKZ7pmr635GsKLO1/qEKZ9dzM5JqX/Ji0HdQYD/cDPNh8u+eX1vJEH3hUSIG jEA= From: "Kanagarajan, Vijaikumar" To: Henning Schild CC: "isar-users@googlegroups.com" , "jan.kiszka@siemens.com" Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision Thread-Topic: [PATCH v2 2/2] wic: Update to the latest revision Thread-Index: AQHYfvrNjxcm/IOVjEqBYz97LelxMa1Nf+UA//+ObwA= Date: Mon, 13 Jun 2022 09:18:03 +0000 Message-ID: <476c6e8a8687499a85fced0e07299815@mentor.com> References: <20220613075401.2059119-1-Vijaikumar_Kanagarajan@mentor.com> <20220613075401.2059119-3-Vijaikumar_Kanagarajan@mentor.com> <20220613110206.0fa05e12@md1za8fc.ad001.siemens.net> In-Reply-To: <20220613110206.0fa05e12@md1za8fc.ad001.siemens.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [147.34.91.1] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TUID: FZ3EBHelTpwL > -----Original Message----- > From: Henning Schild > Sent: 13 June 2022 14:32 > To: Kanagarajan, Vijaikumar > Cc: isar-users@googlegroups.com; jan.kiszka@siemens.com > Subject: Re: [PATCH v2 2/2] wic: Update to the latest revision >=20 > Am Mon, 13 Jun 2022 13:24:01 +0530 > schrieb Vijai Kumar K : >=20 > > Update to the latest wic from OE-core. > > > > OE-core Revision: 06ed2aa93fc25a681e3a00ee120d9395b04845da > > > > Signed-off-by: Vijai Kumar K > > --- > > RECIPE-API-CHANGELOG.md | 19 +++++++++++++++++++ > > scripts/lib/wic/help.py | 6 ++++++ > > scripts/lib/wic/ksparser.py | 1 + > > scripts/lib/wic/partition.py | 1 + > > scripts/lib/wic/plugins/imager/direct.py | 5 +++-- > > 5 files changed, 30 insertions(+), 2 deletions(-) > > > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > index > > 2998824..436b204 100644 > > --- a/RECIPE-API-CHANGELOG.md > > +++ b/RECIPE-API-CHANGELOG.md > > @@ -406,3 +406,22 @@ groups are now created after all packages are > > installed. > > Changes in next > > --------------- > > + > > +### Wic adds / mountpoint to fstab > > + > > +In the older version of wic, any mount point named / is skipped from > > adding +into the fstab entry. > > + > > +With the latest wic, this is not the case. / mount point, if any, is > > added +to /etc/fstab for automount. > > + > > +Any wks file which assumed that / would be skipped from /etc/fstab > > should +now be corrected. Otherwise, it might result in multiple / > > entries in /etc/fstab. +One by the image_configure_fstab function from > > image class and one by wic. + > > +Below is an example wks entry that might cause an issue. > > +Replace "part /" with "part" to avoid adding duplicate entry for /. >=20 > I am not sure multiple entries would be an issue, i think the last one wi= ll > simply always win. It is good to have a note about that change, but i dou= bt > people really have to do anything. > And if anything has to be done, isar should drop the first one centrally. >=20 > The fstab entry for root is purely for adding some weird mount options, > usually root is not mounted with fstab but with cmdline and initrd. And n= ot > having / in fstab just makes that rootfs more generic ... it can become p= art of > nfs and next guy takes it as btrfs while next guy takes it as ext4. >=20 > Note is good, advise is not Noted. Will change the text accordingly in V3. Thanks, Vijai Kumar K >=20 > Henning >=20 > > + > > +``` > > +part / --source rootfs --ondisk sda --fstype ext4 --label platform > > --align 1024 --use-uuid +``` > > diff --git a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index > > 4ff7470..73e3380 100644 > > --- a/scripts/lib/wic/help.py > > +++ b/scripts/lib/wic/help.py > > @@ -940,6 +940,12 @@ DESCRIPTION > > quotes. If not specified, the default string > > is "defaults". > > > > + --fspassno: Specifies the order in which filesystem checks > > are done > > + at boot time by fsck. See fs_passno parameter > > of > > + fstab(5). This parameter will be copied into > > the > > + /etc/fstab file of the installed system. If not > > + specified the default value of "0" will be used. > > + > > --label label: Specifies the label to give to the filesystem > > to be made on the partition. If the given > > label is already in use by another > > filesystem, diff --git a/scripts/lib/wic/ksparser.py > > b/scripts/lib/wic/ksparser.py index 0df9eb0..a49b7b9 100644 > > --- a/scripts/lib/wic/ksparser.py > > +++ b/scripts/lib/wic/ksparser.py > > @@ -155,6 +155,7 @@ class KickStart(): > > part.add_argument('--change-directory') > > part.add_argument("--extra-space", type=3Dsizetype("M")) > > part.add_argument('--fsoptions', dest=3D'fsopts') > > + part.add_argument('--fspassno', dest=3D'fspassno') > > part.add_argument('--fstype', default=3D'vfat', > > choices=3D('ext2', 'ext3', 'ext4', 'btrfs', > > 'squashfs', 'vfat', 'msdos', > > 'erofs', diff --git a/scripts/lib/wic/partition.py > > b/scripts/lib/wic/partition.py index 09e491d..e50871b 100644 > > --- a/scripts/lib/wic/partition.py > > +++ b/scripts/lib/wic/partition.py > > @@ -33,6 +33,7 @@ class Partition(): > > self.include_path =3D args.include_path > > self.change_directory =3D args.change_directory > > self.fsopts =3D args.fsopts > > + self.fspassno =3D args.fspassno > > self.fstype =3D args.fstype > > self.label =3D args.label > > self.use_label =3D args.use_label diff --git > > a/scripts/lib/wic/plugins/imager/direct.py > > b/scripts/lib/wic/plugins/imager/direct.py index 4d0b836..c44159b > > 100644 --- a/scripts/lib/wic/plugins/imager/direct.py > > +++ b/scripts/lib/wic/plugins/imager/direct.py > > @@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin): > > updated =3D False > > for part in self.parts: > > if not part.realnum or not part.mountpoint \ > > - or part.mountpoint =3D=3D "/" or not > > part.mountpoint.startswith('/'): > > + or not part.mountpoint.startswith('/'): > > continue > > > > if part.use_uuid: > > @@ -138,8 +138,9 @@ class DirectPlugin(ImagerPlugin): > > device_name =3D "/dev/%s%s%d" % (part.disk, prefix, > > part.realnum) > > opts =3D part.fsopts if part.fsopts else "defaults" > > + passno =3D part.fspassno if part.fspassno else "0" > > line =3D "\t".join([device_name, part.mountpoint, > > part.fstype, > > - opts, "0", "0"]) + "\n" > > + opts, "0", passno]) + "\n" > > > > fstab_lines.append(line) > > updated =3D True