diff options
| author | Zuul <zuul@review.opendev.org> | 2026-07-06 08:21:33 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2026-07-06 08:21:33 +0000 |
| commit | 3c88fb847c87755a831ee955419aff94befd2562 (patch) | |
| tree | afcaf74557816ca67d6f5f0a4741d653d1a922d3 | |
| parent | b281ea100c72509953ce764e47d9661be20412e1 (diff) | |
| parent | 0e5deba69102d45d33bc43328dfa2410e6d9f9d9 (diff) | |
| download | kolla-3c88fb847c87755a831ee955419aff94befd2562.tar.gz kolla-3c88fb847c87755a831ee955419aff94befd2562.zip | |
Merge "kolla-build: normalize mtime in archive creation"
| -rw-r--r-- | kolla/image/tasks.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/kolla/image/tasks.py b/kolla/image/tasks.py index 93ba91835..f8d07e221 100644 --- a/kolla/image/tasks.py +++ b/kolla/image/tasks.py @@ -201,6 +201,7 @@ class BuildTask(EngineTask): def reset_userinfo(tarinfo): tarinfo.uid = tarinfo.gid = 0 tarinfo.uname = tarinfo.gname = "root" + tarinfo.mtime = 0 return tarinfo if source.get('type') == 'url': @@ -355,10 +356,12 @@ class BuildTask(EngineTask): def reset_userinfo(tarinfo): tarinfo.uid = tarinfo.gid = 0 tarinfo.uname = tarinfo.gname = "root" + tarinfo.mtime = 0 return tarinfo with tarfile.open(arc_path, 'w') as tar: tar.add(items_path, arcname=arcname, filter=reset_userinfo) + os.utime(arc_path, (0, 0)) return len(os.listdir(items_path)) self.logger.debug('Processing') |
