public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH 0/2] Revert wic Y2038 series
@ 2021-02-15 10:44 ` florian.bezdeka
  2021-02-15 10:44   ` [PATCH 1/2] Revert "wic-img: Forward warnings from wic to bitbake" florian.bezdeka
  2021-02-15 10:44   ` [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used" florian.bezdeka
  0 siblings, 2 replies; 4+ messages in thread
From: florian.bezdeka @ 2021-02-15 10:44 UTC (permalink / raw)
  To: isar-users; +Cc: amikan, henning.schild, jan.kiszka, florian.bezdeka

From: Florian Bezdeka <florian.bezdeka@siemens.com>

I sent out an RFC series to fetch some comments / feedback regarding the 
wic related changes to warn on Y2038 affected file system configurations.

As it turned out this series was already applied to `next`. This has to
be reverted until upstream (the OE project) accepts these changes. The
patch will be submitted soon. (I'm waiting for some kind of internal
approval to do so)

The second patch should be reverted for sure, but the fist one could
stay unreverted if maintainers like it.

@Anton: Please take care of patches / series tagged with "RFC" in the 
future. Thanks!

Florian Bezdeka (2):
  Revert "wic-img: Forward warnings from wic to bitbake"
  Revert "wic: Warn if an ext filesystem affected by the Y2038 problem
    is used"

 meta/classes/wic-img.bbclass | 20 +++++--------------
 scripts/lib/wic/partition.py | 38 ------------------------------------
 2 files changed, 5 insertions(+), 53 deletions(-)

-- 
2.29.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/2] Revert "wic-img: Forward warnings from wic to bitbake"
  2021-02-15 10:44 ` [PATCH 0/2] Revert wic Y2038 series florian.bezdeka
@ 2021-02-15 10:44   ` florian.bezdeka
  2021-02-15 10:44   ` [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used" florian.bezdeka
  1 sibling, 0 replies; 4+ messages in thread
From: florian.bezdeka @ 2021-02-15 10:44 UTC (permalink / raw)
  To: isar-users; +Cc: amikan, henning.schild, jan.kiszka, florian.bezdeka

From: Florian Bezdeka <florian.bezdeka@siemens.com>

This reverts commit cf6e025ebb3a37b7d79df7c39cfa58ac25234f3c.

Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
 meta/classes/wic-img.bbclass | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)

diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass
index 59dcd2b..dedd2bf 100644
--- a/meta/classes/wic-img.bbclass
+++ b/meta/classes/wic-img.bbclass
@@ -129,21 +129,7 @@ do_rootfs_wicenv[prefuncs] = 'set_image_size'
 
 WIC_IMAGE_FILE ="${DEPLOY_DIR_IMAGE}/${IMAGE_FULLNAME}.wic.img"
 
-python check_for_wic_warnings() {
-    with open("{}/log.do_wic_image".format(d.getVar("T"))) as f:
-        for line in f.readlines():
-            if line.startswith("WARNING"):
-                bb.warn(line.strip())
-}
-
-do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"
-python do_wic_image() {
-    bb.build.exec_func("generate_wic_image", d)
-    bb.build.exec_func("check_for_wic_warnings", d)
-}
-addtask wic_image before do_image after do_image_tools
-
-generate_wic_image() {
+do_wic_image() {
     buildchroot_do_mounts
     sudo -s <<'EOSUDO'
         ( flock 9
@@ -200,3 +186,7 @@ EOSUDO
     rm -rf ${BUILDCHROOT_DIR}/${WICTMP}
     rm -rf ${IMAGE_ROOTFS}/../pseudo
 }
+
+do_wic_image[file-checksums] += "${WKS_FILE_CHECKSUM}"
+
+addtask wic_image before do_image after do_image_tools
-- 
2.29.2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used"
  2021-02-15 10:44 ` [PATCH 0/2] Revert wic Y2038 series florian.bezdeka
  2021-02-15 10:44   ` [PATCH 1/2] Revert "wic-img: Forward warnings from wic to bitbake" florian.bezdeka
@ 2021-02-15 10:44   ` florian.bezdeka
  2021-03-02 19:49     ` vijaikumar....@gmail.com
  1 sibling, 1 reply; 4+ messages in thread
From: florian.bezdeka @ 2021-02-15 10:44 UTC (permalink / raw)
  To: isar-users; +Cc: amikan, henning.schild, jan.kiszka, florian.bezdeka

From: Florian Bezdeka <florian.bezdeka@siemens.com>

This reverts commit aa5dd75a7314798bba5b413eea2886983449bd28.

Signed-off-by: Florian Bezdeka <florian.bezdeka@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used"
  2021-02-15 10:44   ` [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used" florian.bezdeka
@ 2021-03-02 19:49     ` vijaikumar....@gmail.com
  0 siblings, 0 replies; 4+ messages in thread
From: vijaikumar....@gmail.com @ 2021-03-02 19:49 UTC (permalink / raw)
  To: isar-users


[-- Attachment #1.1: Type: text/plain, Size: 2858 bytes --]

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 
>

[-- Attachment #1.2: Type: text/html, Size: 3843 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-03-02 19:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AQHXA4eGCyAaaBIRYkefwrjJFwY5pw==>
2021-02-15 10:44 ` [PATCH 0/2] Revert wic Y2038 series florian.bezdeka
2021-02-15 10:44   ` [PATCH 1/2] Revert "wic-img: Forward warnings from wic to bitbake" florian.bezdeka
2021-02-15 10:44   ` [PATCH 2/2] Revert "wic: Warn if an ext filesystem affected by the Y2038 problem is used" florian.bezdeka
2021-03-02 19:49     ` vijaikumar....@gmail.com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox