@@ -684,8 +684,10 @@ export PYTHONHASHSEED = "0"
export PERL_HASH_SEED = "0"
export SOURCE_DATE_EPOCH ?= "${@get_source_date_epoch_value(d)}"
# A SOURCE_DATE_EPOCH of '0' might be misinterpreted as no SDE
+# If these 2 are misaligned, when generating fstab later on wic, the timestamps will never match because
+# The repeatibility uses the REPRODUCIBLE_TIMESTAMP_ROOTFS while wic uses SOURCE_DATE_EPOCH (therefore its fallback)
SOURCE_DATE_EPOCH_FALLBACK ??= "1302044400"
-REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1520598896"
+REPRODUCIBLE_TIMESTAMP_ROOTFS ??= "1302044400"
##################################################################
# Settings used by bitbake-layers.
@@ -131,7 +131,7 @@ class Partition():
partition command parameters.
"""
self.updated_fstab_path = updated_fstab_path
- if self.updated_fstab_path and not (self.fstype.startswith("ext") or self.fstype == "msdos"):
+ if self.updated_fstab_path:
self.update_fstab_in_rootfs = True
if not self.source:
@@ -295,15 +295,6 @@ class Partition():
(self.fstype, extraopts, rootfs, label_str, self.fsuuid, rootfs_dir)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
- if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update:
- debugfs_script_path = os.path.join(cr_workdir, "debugfs_script")
- with open(debugfs_script_path, "w") as f:
- f.write("cd etc\n")
- f.write("rm fstab\n")
- f.write("write %s fstab\n" % (self.updated_fstab_path))
- debugfs_cmd = "debugfs -w -f %s %s" % (debugfs_script_path, rootfs)
- exec_native_cmd(debugfs_cmd, native_sysroot)
-
mkfs_cmd = "fsck.%s -pvfD %s" % (self.fstype, rootfs)
exec_native_cmd(mkfs_cmd, native_sysroot, pseudo=pseudo)
@@ -400,10 +391,6 @@ class Partition():
mcopy_cmd = "mcopy -i %s -s %s/* ::/" % (rootfs, rootfs_dir)
exec_native_cmd(mcopy_cmd, native_sysroot)
- if self.updated_fstab_path and self.has_fstab and not self.no_fstab_update:
- mcopy_cmd = "mcopy -m -i %s %s ::/etc/fstab" % (rootfs, self.updated_fstab_path)
- exec_native_cmd(mcopy_cmd, native_sysroot)
-
chmod_cmd = "chmod 644 %s" % rootfs
exec_cmd(chmod_cmd)
@@ -223,8 +223,8 @@ class RootfsPlugin(SourcePlugin):
part.has_fstab = os.path.exists(os.path.join(new_rootfs, "etc/fstab"))
if part.update_fstab_in_rootfs and part.has_fstab and not part.no_fstab_update:
fstab_path = os.path.join(new_rootfs, "etc/fstab")
- # Assume that fstab should always be owned by root with fixed permissions
- install_cmd = "install -m 0644 -p %s %s" % (part.updated_fstab_path, fstab_path)
+ # We dont want any metadata of the updated fstab, just the one that already existed
+ install_cmd = "cp --no-preserve=all %s %s" % (part.updated_fstab_path, fstab_path)
if new_pseudo:
pseudo = cls.__get_pseudo(native_sysroot, new_rootfs, new_pseudo)
else: