Source: ossim
Version: 1.8.16-3
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that ossim could not be built reproducibly.

The attached patch removes extra timestamps from the build system:

* avoid_overwrite_build_date.patch: avoid overwrite OSSIM_BUILD_DATE
  through TODAYS_DATE in CMakeLists.txt if OSSIM_BUILD_DATE was already
  defined.

* debian-rules.patch: modify debian/rules to set the variable
  OSSIM_BUILD_DATE in cmake command line.

Once applied, ossim can be built reproducibly in our current experimental
framework.

 [1]: https://wiki.debian.org/ReproducibleBuilds


-- System Information:
Debian Release: stretch/sid
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Description: Avoid overwrite build date.
 Previous to use the current date to set the variable OSSIM_BUILD_DATE check if
 it was already defined in command line.
Author: Juan Picca <jumap...@gmail.com>
Last-Update: 2015-06-04
---
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -148,7 +148,9 @@ endif ( ZLIB_FOUND )
 #---
 # Call the OSSIM macros in OssimUtilities.cmake
 #---
-TODAYS_DATE(OSSIM_BUILD_DATE)
+if ( NOT OSSIM_BUILD_DATE )
+    TODAYS_DATE(OSSIM_BUILD_DATE)
+endif()
 SET(OSSIM_SVN_REVISION_NUMBER "UNKNOWN")
 GET_SVN_REVISION()
 if ( NOT ${Project_WC_REVISION} EQUAL 0 )
diff -ruNp ossim-1.8.16/debian/rules ossim-1.8.16.new/debian/rules
--- ossim-1.8.16/debian/rules	2014-11-02 10:12:44.000000000 -0200
+++ ossim-1.8.16.new/debian/rules	2015-06-04 15:45:25.611943209 -0300
@@ -1,5 +1,8 @@
 #!/usr/bin/make -f
 
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%Y%m%d" -d "$(LAST_CHANGE)")
+
 OSSIM_VERSION=$(shell dpkg-parsechangelog|grep Version:|cut -d' ' -f2|cut -d- -f1)
 OSSIM_VERSION_TAG=$(subst .,_,$(OSSIM_VERSION))
 
@@ -21,6 +24,7 @@ endif
 # Add here any variable or target overrides you need.
 CMAKE_OPTS = \
        -DCMAKE_INSTALL_PREFIX=/usr \
+       -DOSSIM_BUILD_DATE=$(BUILD_DATE) \
        -DBUILD_OSSIM_FRAMEWORKS=ON \
        -DBUILD_OSSIM_FREETYPE_SUPPORT=ON \
        -DBUILD_OSSIM_ID_SUPPORT=ON \
_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to