summarylogtreecommitdiffstats
path: root/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch
diff options
context:
space:
mode:
Diffstat (limited to '0003-Mangle-PAX-headers-when-using-posix-tar-format.patch')
-rw-r--r--0003-Mangle-PAX-headers-when-using-posix-tar-format.patch16
1 files changed, 11 insertions, 5 deletions
diff --git a/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch b/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch
index bb2b4187af30..d2862b0eacb1 100644
--- a/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch
+++ b/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch
@@ -2,8 +2,14 @@ From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Date: Thu, 6 Jun 2013 14:31:25 +0300
Subject: Mangle PAX headers when using posix tar format
-Mangle tar PAX headers in order to guarantee that created tarballs are
-always identical so that the delta can be applied cleanly.
+Remove all timestamps from extended PAX headers in order to guarantee
+that created tarballs are always identical so that the delta can be
+applied cleanly.
+
+The timestamps can break pristine-tar generation as they are different
+every time an archive is generated from git (when using tree id
+instead of commit id as the sha-1 to checkout). Git uses the current
+time as the modification time of files when a tree is archived.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
@@ -11,17 +17,17 @@ Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
1 file changed, 5 insertions(+)
diff --git a/pristine-tar b/pristine-tar
-index f1fae98..3e92a74 100755
+index d36e51b..4421068 100755
--- a/pristine-tar
+++ b/pristine-tar
-@@ -357,6 +357,11 @@ sub recreatetarball_helper {
+@@ -378,6 +378,11 @@ sub recreatetarball_helper {
"--files-from", "$tempdir/manifest");
if (exists $options{tar_format}) {
push @cmd, ("-H", $options{tar_format});
+ if ($options{tar_format} eq 'posix') {
+ # Mangle PAX headers so that created tarballs are always identical
+ # so that delta can be successfully applied
-+ push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,ctime:=0');
++ push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,mtime:=0,atime:=0,ctime:=0');
+ }
}