Blame SOURCES/postfix-2.10.1-timestamps.patch

9a804a
diff --git a/postfix-install b/postfix-install
9a804a
index 6b2a261..3edd2c6 100644
9a804a
--- a/postfix-install
9a804a
+++ b/postfix-install
9a804a
@@ -40,6 +40,10 @@
9a804a
 #	is installed from a pre-built package or from source code.
9a804a
 #
9a804a
 #	Arguments
9a804a
+# .IP -keep-build-mtime
9a804a
+#      When installing files preserve new file's mtime timestamps.
9a804a
+#      Otherwise, mtimes will be set to the time that postfix-install
9a804a
+#      is run.
9a804a
 # .IP -non-interactive
9a804a
 #	Do not ask the user for parameter settings. Installation parameters
9a804a
 #	are specified via one of the non-interactive methods described
9a804a
@@ -179,6 +183,7 @@ BACKUP_IFS="$IFS"
9a804a
 LC_ALL=C; export LC_ALL
9a804a
 
9a804a
 USAGE="Usage: $0 [name=value] [option]
9a804a
+    -keep-build-mtime         Preserve build-time file mtime timestamps.
9a804a
     -non-interactive        Do not ask for installation parameters.
9a804a
     -package                Build a ready-to-install package.
9a804a
     name=value              Specify an installation parameter".
9a804a
@@ -193,6 +198,8 @@ do
9a804a
       *=*) IFS= eval $arg; IFS="$BACKUP_IFS";;
9a804a
 -non-int*) non_interactive=1;;
9a804a
  -package) need_install_root=install_root;;
9a804a
+-keep-build-mtime)
9a804a
+           keep_build_mtime=1;;
9a804a
         *) echo "$0: Error: $USAGE" 1>&2; exit 1;;
9a804a
     esac
9a804a
     shift
9a804a
@@ -245,6 +252,7 @@ compare_or_replace() {
9a804a
 	echo Updating $dst...
9a804a
 	rm -f $tempdir/junk || exit 1
9a804a
 	cp $src $tempdir/junk || exit 1
9a804a
+	test -z "$keep_build_mtime" || touch -r $src $tempdir/junk || exit 1
9a804a
 	mv -f $tempdir/junk $dst || exit 1
9a804a
 	test -z "$owner" || chown $owner $dst || exit 1
9a804a
 	test -z "$group" || chgrp $group $dst || exit 1