summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2020-12-06 14:50:33 +0100
committerSlávek Banko <slavek.banko@axis.cz>2020-12-07 03:33:38 +0100
commitc8ee49a69d1777b65064d4c15ae2850250e8588b (patch)
tree41abe4b63a5196d67bd2beb245ce8515bfe8e790
parent542f9054069f146c97f1bc20389516a1c179542d (diff)
downloadcmake-c8ee49a69d1777b65064d4c15ae2850250e8588b.tar.gz
cmake-c8ee49a69d1777b65064d4c15ae2850250e8588b.zip
tde_create_tarball: Add options to make tarballs reproducible
independently of UMASK and time zone. Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 7b6865d9e60d3220cecea027f227ab084f1a903c)
-rw-r--r--modules/TDEMacros.cmake5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/TDEMacros.cmake b/modules/TDEMacros.cmake
index e2c1e52..5a9f29b 100644
--- a/modules/TDEMacros.cmake
+++ b/modules/TDEMacros.cmake
@@ -2122,11 +2122,12 @@ macro( tde_create_tarball )
if( "${TAR_VERSION}" MATCHES "GNU *tar" )
set( TAR_SETOWNER "--owner=root;--group=root" )
set( TAR_REPRODUCIBLE "--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime" )
+ list( APPEND TAR_REPRODUCIBLE "--mode=u+rw,go=rX,a-s" )
tde_read_src_metadata()
if( TDE_PKG_DATETIME )
- list( APPEND TAR_REPRODUCIBLE --mtime "${TDE_PKG_DATETIME}" )
+ list( APPEND TAR_REPRODUCIBLE --mtime "${TDE_PKG_DATETIME} UTC" )
elseif( TDE_SCM_MODULE_DATETIME )
- list( APPEND TAR_REPRODUCIBLE --mtime "${TDE_SCM_MODULE_DATETIME}" )
+ list( APPEND TAR_REPRODUCIBLE --mtime "${TDE_SCM_MODULE_DATETIME} UTC" )
endif( )
elseif( "${TAR_VERSION}" MATCHES "bsd *tar" )
set( TAR_SETOWNER "--uname=root;--gname=root" )