diff --git a/postfix-3.1.3-timestamps.patch b/postfix-3.1.3-timestamps.patch new file mode 100644 index 0000000..74ad243 --- /dev/null +++ b/postfix-3.1.3-timestamps.patch @@ -0,0 +1,84 @@ +diff --git a/postfix-install b/postfix-install +index 922402b..9cc52d5 100644 +--- a/postfix-install ++++ b/postfix-install +@@ -40,6 +40,10 @@ + # is installed from a pre-built package or from source code. + # + # Arguments ++# .IP -keep-new-mtime ++# When installing files preserve new file's mtime timestamps. ++# Otherwise, mtimes will be set to the time that postfix-install ++# is run. + # .IP -non-interactive + # Do not ask the user for parameter settings. Installation parameters + # are specified via one of the non-interactive methods described +@@ -210,6 +214,7 @@ if [ -n "$SHLIB_ENV_VAR" ]; then + fi + + USAGE="Usage: $0 [name=value] [option] ++ -keep-new-mtime Preserve new file's mtime timestamps. + -non-interactive Do not ask for installation parameters. + -package Build a ready-to-install package. + name=value Specify an installation parameter". +@@ -225,6 +230,8 @@ do + *=*) IFS= eval $arg; IFS="$BACKUP_IFS";; + -non-int*) non_interactive=1;; + -package) need_install_root=install_root;; ++-keep-new-mtime) ++ keep_new_mtime=1;; + *) echo "$0: Error: $USAGE" 1>&2; exit 1;; + esac + shift +@@ -305,6 +312,7 @@ compare_or_replace() { + echo Updating $dst... + rm -f $tempdir/junk || exit 1 + cp $src $tempdir/junk || exit 1 ++ test -z "$keep_new_mtime" || touch -r $src $tempdir/junk || exit 1 + mv -f $tempdir/junk $dst || exit 1 + test -z "$owner" || chown $owner $dst || exit 1 + test -z "$group" || chgrp $group $dst || exit 1 +diff --git a/Makefile.in b/Makefile.in +index 6d9d9b4..ae61297 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -122,23 +122,24 @@ printfck: update + install: update + SHLIB_ENV_VAR= SHLIB_ENV_VAL= \ + $(SHLIB_ENV) shlib_directory=$(SHLIB_DIR_OVERRIDE) $(SHELL) \ +- postfix-install ++ postfix-install $(POSTFIX_INSTALL_OPTS) + + package: update + SHLIB_ENV_VAR= SHLIB_ENV_VAL= \ + $(SHLIB_ENV) shlib_directory=$(SHLIB_DIR_OVERRIDE) $(SHELL) \ +- postfix-install -package ++ postfix-install -package $(POSTFIX_INSTALL_OPTS) + + upgrade: update + SHLIB_ENV_VAR= SHLIB_ENV_VAL= \ + $(SHLIB_ENV) shlib_directory=$(SHLIB_DIR_OVERRIDE) $(SHELL) \ +- postfix-install -non-interactive ++ postfix-install -non-interactive $(POSTFIX_INSTALL_OPTS) + + + non-interactive-package: update + SHLIB_ENV_VAR= SHLIB_ENV_VAL= \ + $(SHLIB_ENV) shlib_directory=$(SHLIB_DIR_OVERRIDE) $(SHELL) \ +- postfix-install -non-interactive -package ++ postfix-install -non-interactive -package \ ++ $(POSTFIX_INSTALL_OPTS) + + depend clean: + set -e; for i in $(DIRS); do \ +diff --git a/makedefs b/makedefs +index 8f78601..eb11838 100644 +--- a/makedefs ++++ b/makedefs +@@ -1196,5 +1196,6 @@ PLUGIN_MAP_OBJ_UPDATE = $PLUGIN_MAP_OBJ_UPDATE + PLUGIN_MAP_SO_MAKE = $PLUGIN_MAP_SO_MAKE + PLUGIN_MAP_SO_UPDATE = $PLUGIN_MAP_SO_UPDATE + PLUGIN_LD = $PLUGIN_LD ++POSTFIX_INSTALL_OPTS = $POSTFIX_INSTALL_OPTS + # Application-specific rules. + EOF diff --git a/postfix.spec b/postfix.spec index 63c3031..b3200fd 100644 --- a/postfix.spec +++ b/postfix.spec @@ -42,7 +42,7 @@ Name: postfix Summary: Postfix Mail Transport Agent Version: 3.1.3 -Release: 1%{?dist} +Release: 2%{?dist} Epoch: 2 Group: System Environment/Daemons URL: http://www.postfix.org @@ -86,6 +86,8 @@ Patch2: postfix-3.1.0-files.patch Patch3: postfix-3.1.0-alternatives.patch Patch4: postfix-3.1.0-large-fs.patch Patch9: pflogsumm-1.1.3-datecalc.patch +# Upstream patch +Patch10: postfix-3.1.3-timestamps.patch # Optional patches - set the appropriate environment variables to include # them when building the package/spec file @@ -221,6 +223,7 @@ pushd pflogsumm-%{pflogsumm_ver} %patch9 -p1 -b .datecalc popd %endif +%patch10 -p1 -b timestamps for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && @@ -293,7 +296,8 @@ make -f Makefile.init makefiles shared=yes dynamicmaps=yes \ AUXLIBS_MYSQL="${AUXLIBS_MYSQL}" AUXLIBS_PGSQL="${AUXLIBS_PGSQL}" \ AUXLIBS_SQLITE="${AUXLIBS_SQLITE}" AUXLIBS_CDB="${AUXLIBS_CDB}"\ DEBUG="" SHLIB_RPATH="-Wl,-rpath,%{postfix_shlib_dir} $LDFLAGS" \ - OPT="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-comment" + OPT="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-comment" \ + POSTFIX_INSTALL_OPTS=-keep-new-mtime make %{?_smp_mflags} @@ -732,6 +736,10 @@ rm -rf $RPM_BUILD_ROOT %endif %changelog +* Wed Oct 5 2016 Ondřej Lysoněk - 2:3.1.3-2 +- Preserve timestamps during 'make install' + Resolves: rhbz#1307064 + * Mon Oct 3 2016 Jaroslav Škarvada - 2:3.1.3-1 - New version Resolves: rhbz#1381077