[Git][debian-gis-team/postgis][experimental] Make SQL files reproducible by using SOURCE_DATE_EPOCH.

Christoph Berg gitlab at salsa.debian.org
Mon Aug 13 14:19:25 BST 2018


Christoph Berg pushed to branch experimental at Debian GIS Project / postgis


Commits:
d1d9bcb4 by Christoph Berg at 2018-08-13T13:14:36Z
Make SQL files reproducible by using SOURCE_DATE_EPOCH.

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/reproducible-build-date
- + debian/patches/reproducible-sql
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+postgis (2.5.0~beta2+dfsg-1~exp2) UNRELEASED; urgency=medium
+
+  * Make SQL files reproducible by using SOURCE_DATE_EPOCH.
+
+ -- Christoph Berg <myon at debian.org>  Mon, 13 Aug 2018 15:14:00 +0200
+
 postgis (2.5.0~beta2+dfsg-1~exp1) experimental; urgency=medium
 
   [ Bas Couwenberg ]


=====================================
debian/patches/reproducible-build-date
=====================================
--- /dev/null
+++ b/debian/patches/reproducible-build-date
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -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])


=====================================
debian/patches/reproducible-sql
=====================================
--- /dev/null
+++ b/debian/patches/reproducible-sql
@@ -0,0 +1,22 @@
+--- a/utils/create_undef.pl
++++ b/utils/create_undef.pl
+@@ -55,7 +55,7 @@ sub strip_default {
+ 	return $line;
+ }
+ 
+-my $time = POSIX::strftime("%c", localtime);
++my $time = POSIX::strftime("%F %T", gmtime($ENV{SOURCE_DATE_EPOCH} || time));
+ print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
+ print "--\n";
+ print "-- PostGIS - Spatial Types for PostgreSQL\n";
+--- a/utils/create_unpackaged.pl
++++ b/utils/create_unpackaged.pl
+@@ -145,7 +145,7 @@ END;
+ EOF
+ }
+ 
+-my $time = POSIX::strftime("%c", localtime);
++my $time = POSIX::strftime("%F %T", gmtime($ENV{SOURCE_DATE_EPOCH} || time));
+ print "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --\n";
+ print "--\n";
+ print "-- PostGIS - Spatial Types for PostgreSQL\n";


=====================================
debian/patches/series
=====================================
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
 link-liblwgeom
 relax-test-timing-constraints.patch
+reproducible-build-date
+reproducible-sql



View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/commit/d1d9bcb4c91c2b22e53004c53c39d32dd41c8823

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/postgis/commit/d1d9bcb4c91c2b22e53004c53c39d32dd41c8823
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20180813/bb8b0ad5/attachment-0001.html>


More information about the Pkg-grass-devel mailing list