From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6929439507286589440 Date: Tue, 2 Mar 2021 11:49:58 -0800 (PST) From: "vijaikumar....@gmail.com" To: isar-users Message-Id: In-Reply-To: <20210215104357.18632-3-florian.bezdeka@siemens.com> References: <20210215104357.18632-1-florian.bezdeka@siemens.com> <20210215104357.18632-3-florian.bezdeka@siemens.com> Subject: Re: [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used" MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_8_1741790888.1614714598183" X-TUID: Os8WD5/JhY6R ------=_Part_8_1741790888.1614714598183 Content-Type: multipart/alternative; boundary="----=_Part_9_790260161.1614714598183" ------=_Part_9_790260161.1614714598183 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit We could take this revert if this feature can wait till next wic update. Or just wait for the wic update to send this revert along. Related to: https://groups.google.com/g/isar-users/c/AfLyJUeRNkQ Thanks, Vijai Kumar K On Monday, February 15, 2021 at 4:14:27 PM UTC+5:30 florian...@siemens.com wrote: > From: Florian Bezdeka > > This reverts commit aa5dd75a7314798bba5b413eea2886983449bd28. > > Signed-off-by: Florian Bezdeka > --- > scripts/lib/wic/partition.py | 38 ------------------------------------ > 1 file changed, 38 deletions(-) > > diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py > index 4a5a31e..85eb15c 100644 > --- a/scripts/lib/wic/partition.py > +++ b/scripts/lib/wic/partition.py > @@ -270,8 +270,6 @@ class Partition(): > mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs) > exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo) > > - self.check_for_Y2038_problem(rootfs, native_sysroot) > - > def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir, > native_sysroot, pseudo): > """ > @@ -358,8 +356,6 @@ class Partition(): > (self.fstype, extraopts, label_str, self.fsuuid, rootfs) > exec_native_cmd(mkfs_cmd, native_sysroot) > > - self.check_for_Y2038_problem(rootfs, native_sysroot) > - > def prepare_empty_partition_btrfs(self, rootfs, oe_builddir, > native_sysroot): > """ > @@ -421,37 +417,3 @@ class Partition(): > > mkswap_cmd = "mkswap %s -U %s %s" % (label_str, self.fsuuid, path) > exec_native_cmd(mkswap_cmd, native_sysroot) > - > - def check_for_Y2038_problem(self, rootfs, native_sysroot): > - """ > - Check if the filesystem is affected by the Y2038 problem > - (Y2038 problem = 32 bit time_t overflow in January 2038) > - """ > - def get_err_str(part): > - err = "The {} filesystem {} has no Y2038 support." > - if part.mountpoint: > - args = [part.fstype, "mounted at %s" % part.mountpoint] > - elif part.label: > - args = [part.fstype, "labeled %s" % part.label] > - elif part.part_name: > - args = [part.fstype, "in partition %s" % part.part_name] > - else: > - args = [part.fstype, ""] > - return err.format(*args) > - > - ret, out = exec_native_cmd("dumpe2fs %s" % rootfs, native_sysroot) > - > - # ext2 and ext3 are always affected by the Y2038 problem > - if self.fstype in ["ext2", "ext3"]: > - logger.warn(get_err_str(self)) > - return > - > - # if ext4 is affected by the Y2038 problem depends on the inode size > - # Remember: inode size depends on the file system size > - for line in out.splitlines(): > - if line.startswith("Inode size:"): > - size = int(line.split(":")[1].strip()) > - if size < 256: > - logger.warn("%s Inodes (of size %d) are too small." % \ > - (get_err_str(self), size)) > - break > \ No newline at end of file > -- > 2.29.2 > ------=_Part_9_790260161.1614714598183 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit We could take this revert if this feature can wait till next wic update. Or just wait for the wic update to send this revert along.

Related to: https://groups.google.com/g/isar-users/c/AfLyJUeRNkQ

Thanks,
Vijai Kumar K

On Monday, February 15, 2021 at 4:14:27 PM UTC+5:30 florian...@siemens.com wrote:
From: Florian Bezdeka <florian...@siemens.com>

This reverts commit aa5dd75a7314798bba5b413eea2886983449bd28.

Signed-off-by: Florian Bezdeka <florian...@siemens.com>
---
scripts/lib/wic/partition.py | 38 ------------------------------------
1 file changed, 38 deletions(-)

diff --git a/scripts/lib/wic/partition.py b/scripts/lib/wic/partition.py
index 4a5a31e..85eb15c 100644
--- a/scripts/lib/wic/partition.py
+++ b/scripts/lib/wic/partition.py
@@ -270,8 +270,6 @@ class Partition():
mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)

- self.check_for_Y2038_problem(rootfs, native_sysroot)
-
def prepare_rootfs_btrfs(self, rootfs, oe_builddir, rootfs_dir,
native_sysroot, pseudo):
"""
@@ -358,8 +356,6 @@ class Partition():
(self.fstype, extraopts, label_str, self.fsuuid, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot)

- self.check_for_Y2038_problem(rootfs, native_sysroot)
-
def prepare_empty_partition_btrfs(self, rootfs, oe_builddir,
native_sysroot):
"""
@@ -421,37 +417,3 @@ class Partition():

mkswap_cmd = "mkswap %s -U %s %s" % (label_str, self.fsuuid, path)
exec_native_cmd(mkswap_cmd, native_sysroot)
-
- def check_for_Y2038_problem(self, rootfs, native_sysroot):
- """
- Check if the filesystem is affected by the Y2038 problem
- (Y2038 problem = 32 bit time_t overflow in January 2038)
- """
- def get_err_str(part):
- err = "The {} filesystem {} has no Y2038 support."
- if part.mountpoint:
- args = [part.fstype, "mounted at %s" % part.mountpoint]
- elif part.label:
- args = [part.fstype, "labeled %s" % part.label]
- elif part.part_name:
- args = [part.fstype, "in partition %s" % part.part_name]
- else:
- args = [part.fstype, ""]
- return err.format(*args)
-
- ret, out = exec_native_cmd("dumpe2fs %s" % rootfs, native_sysroot)
-
- # ext2 and ext3 are always affected by the Y2038 problem
- if self.fstype in ["ext2", "ext3"]:
- logger.warn(get_err_str(self))
- return
-
- # if ext4 is affected by the Y2038 problem depends on the inode size
- # Remember: inode size depends on the file system size
- for line in out.splitlines():
- if line.startswith("Inode size:"):
- size = int(line.split(":")[1].strip())
- if size < 256:
- logger.warn("%s Inodes (of size %d) are too small." % \
- (get_err_str(self), size))
- break
\ No newline at end of file
--
2.29.2
------=_Part_9_790260161.1614714598183-- ------=_Part_8_1741790888.1614714598183--