diff options
Diffstat (limited to 'scripts/lib/wic/plugins')
| -rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 3 | ||||
| -rw-r--r-- | scripts/lib/wic/plugins/source/rootfs.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index da483daed5..3e766972b4 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
| @@ -149,6 +149,9 @@ class DirectPlugin(ImagerPlugin): | |||
| 149 | self.updated_fstab_path = os.path.join(self.workdir, "fstab") | 149 | self.updated_fstab_path = os.path.join(self.workdir, "fstab") |
| 150 | with open(self.updated_fstab_path, "w") as f: | 150 | with open(self.updated_fstab_path, "w") as f: |
| 151 | f.writelines(fstab_lines) | 151 | f.writelines(fstab_lines) |
| 152 | if os.getenv('SOURCE_DATE_EPOCH'): | ||
| 153 | fstab_time = int(os.getenv('SOURCE_DATE_EPOCH')) | ||
| 154 | os.utime(self.updated_fstab_path, (fstab_time, fstab_time)) | ||
| 152 | 155 | ||
| 153 | def _full_path(self, path, name, extention): | 156 | def _full_path(self, path, name, extention): |
| 154 | """ Construct full file path to a file we generate. """ | 157 | """ Construct full file path to a file we generate. """ |
diff --git a/scripts/lib/wic/plugins/source/rootfs.py b/scripts/lib/wic/plugins/source/rootfs.py index fc06312ee4..e29f3a4c2f 100644 --- a/scripts/lib/wic/plugins/source/rootfs.py +++ b/scripts/lib/wic/plugins/source/rootfs.py | |||
| @@ -224,7 +224,7 @@ class RootfsPlugin(SourcePlugin): | |||
| 224 | if part.update_fstab_in_rootfs and part.has_fstab and not part.no_fstab_update: | 224 | if part.update_fstab_in_rootfs and part.has_fstab and not part.no_fstab_update: |
| 225 | fstab_path = os.path.join(new_rootfs, "etc/fstab") | 225 | fstab_path = os.path.join(new_rootfs, "etc/fstab") |
| 226 | # Assume that fstab should always be owned by root with fixed permissions | 226 | # Assume that fstab should always be owned by root with fixed permissions |
| 227 | install_cmd = "install -m 0644 %s %s" % (part.updated_fstab_path, fstab_path) | 227 | install_cmd = "install -m 0644 -p %s %s" % (part.updated_fstab_path, fstab_path) |
| 228 | if new_pseudo: | 228 | if new_pseudo: |
| 229 | pseudo = cls.__get_pseudo(native_sysroot, new_rootfs, new_pseudo) | 229 | pseudo = cls.__get_pseudo(native_sysroot, new_rootfs, new_pseudo) |
| 230 | else: | 230 | else: |
