Commit 873c6cba authored by Raúl Marín's avatar Raúl Marín

Enable deterministic builds

Honor SOURCE_DATE_EPOCH variable if present to enable reproducible builds

Patch by Christoph Berg <myon -at- debian.org> 

Closes #4147
Closes #4148



git-svn-id: http://svn.osgeo.org/postgis/trunk@16693 b70326c6-7e19-0410-871a-916f4a2858ee
parent eb17d348
Pipeline #27850806 passed with stage
in 26 minutes and 7 seconds
......@@ -2,6 +2,7 @@ PostGIS 2.5.0rc1
2018/XX/XX
New since PostGIS 2.5.0beta2
- #4146, Fix compilation error against Postgres 12 (Raúl Marín).
- #4147, #4148, Honor SOURCE_DATE_EPOCH when present (Christoph Berg).
PostGIS 2.5.0beta2
2018/08/11
......
......@@ -1075,7 +1075,7 @@ if test "$HAVE_LIBXML2" = "1"; then
fi
POSTGIS_LIB_VERSION="$POSTGIS_MAJOR_VERSION.$POSTGIS_MINOR_VERSION.$POSTGIS_MICRO_VERSION"
POSTGIS_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
POSTGIS_BUILD_DATE=`date ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH} -u "+%Y-%m-%d %H:%M:%S"`
POSTGIS_SCRIPTS_VERSION="$POSTGIS_LIB_VERSION"
AC_DEFINE_UNQUOTED([POSTGIS_VERSION], ["$POSTGIS_VERSION"], [PostGIS version])
......@@ -1253,7 +1253,7 @@ if test "x$with_raster" != "xno"; then
dnl ==============================
POSTGIS_RASTER_VERSION="$POSTGIS_RASTER_MAJOR_VERSION.$POSTGIS_RASTER_MINOR_VERSION"
POSTGIS_RASTER_LIB_VERSION="$POSTGIS_RASTER_MAJOR_VERSION.$POSTGIS_RASTER_MINOR_VERSION.$POSTGIS_RASTER_MICRO_VERSION"
POSTGIS_RASTER_BUILD_DATE=`date -u "+%Y-%m-%d %H:%M:%S"`
POSTGIS_RASTER_BUILD_DATE=`date ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH} -u "+%Y-%m-%d %H:%M:%S"`
POSTGIS_RASTER_SCRIPTS_VERSION="$POSTGIS_RASTER_LIB_VERSION"
AC_DEFINE_UNQUOTED([POSTGIS_RASTER_VERSION], ["$POSTGIS_RASTER_VERSION"], [PostGIS Raster version])
......
......@@ -55,7 +55,7 @@ sub strip_default {
return $line;
}
my $time = POSIX::strftime("%c", localtime);
my $time = POSIX::strftime("%F %T", gmtime(defined($ENV{SOURCE_DATE_EPOCH}) ? $ENV{SOURCE_DATE_EPOCH} : time));
print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
print "--\n";
print "-- PostGIS - Spatial Types for PostgreSQL\n";
......
......@@ -145,7 +145,7 @@ END;
EOF
}
my $time = POSIX::strftime("%c", localtime);
my $time = POSIX::strftime("%F %T", gmtime(defined($ENV{SOURCE_DATE_EPOCH}) ? $ENV{SOURCE_DATE_EPOCH} : time));
print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
print "--\n";
print "-- PostGIS - Spatial Types for PostgreSQL\n";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment