1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
Description: Reproducible Builds
The "reproducible builds effort" at
https://wiki.debian.org/ReproducibleBuilds
noticed upstream about a problem with reproducible builds in testdisk. He
then provided this upstream patch which is already in the upstream GIT
repository.
Author: Christophe Grenier <grenier@cgsecurity.org>
Bug: http://bugs.debian.org/798776
Index: testdisk-7.0/configure.ac
===================================================================
--- testdisk-7.0.orig/configure.ac
+++ testdisk-7.0/configure.ac
@@ -290,6 +290,15 @@ AS_IF([test "x$enable_stack_protector" =
[stackProtector=1]
)
+AC_ARG_ENABLE([record-compilation-date],
+ AS_HELP_STRING([--enable-record-compilation-date],[record compilation date (default is NO)]),
+ [case "${enableval}" in
+ yes) AC_DEFINE([RECORD_COMPILATION_DATE],1,[Define to 1 to record compilation date]) ;;
+ no) ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-record-compilation-date]) ;;
+ esac]
+ )
+
use_icon=no
case "$target" in
Index: testdisk-7.0/src/dfxml.c
===================================================================
--- testdisk-7.0.orig/src/dfxml.c
+++ testdisk-7.0/src/dfxml.c
@@ -185,7 +185,9 @@ void xml_add_DFXML_creator(const char *p
xml_out2s("version", version);
xml_push("build_environment","");
xml_printf("<compiler>%s</compiler>\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
xml_out2s("compilation_date", get_compilation_date());
+#endif
xml_printf("<library name='libext2fs' version='%s'/>\n", td_ext2fs_version());
xml_printf("<library name='libewf' version='%s'/>\n", td_ewf_version());
xml_printf("<library name='libjpeg' version='%s'/>\n", td_jpeg_version());
Index: testdisk-7.0/src/fidentify.c
===================================================================
--- testdisk-7.0.orig/src/fidentify.c
+++ testdisk-7.0/src/fidentify.c
@@ -189,7 +189,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("libjpeg: %s\n", td_jpeg_version());
printf("OS: %s\n" , get_os());
}
Index: testdisk-7.0/src/misc.c
===================================================================
--- testdisk-7.0.orig/src/misc.c
+++ testdisk-7.0/src/misc.c
@@ -270,6 +270,7 @@ const char *get_compiler(void)
return buffer;
}
+#ifdef RECORD_COMPILATION_DATE
const char *get_compilation_date(void)
{
static char buffer[100] = {0x00};
@@ -294,3 +295,4 @@ const char *get_compilation_date(void)
#endif
return buffer;
}
+#endif
Index: testdisk-7.0/src/misc.h
===================================================================
--- testdisk-7.0.orig/src/misc.h
+++ testdisk-7.0/src/misc.h
@@ -25,7 +25,9 @@ extern "C" {
const char *get_os(void);
const char *get_compiler(void);
+#ifdef RECORD_COMPILATION_DATE
const char *get_compilation_date(void);
+#endif
#ifdef __cplusplus
} /* closing brace for extern "C" */
Index: testdisk-7.0/src/phmain.c
===================================================================
--- testdisk-7.0.orig/src/phmain.c
+++ testdisk-7.0/src/phmain.c
@@ -114,7 +114,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version(), td_curses_version());
printf("OS: %s\n" , get_os());
@@ -318,7 +320,9 @@ int main( int argc, char **argv )
log_info("PhotoRec %s, Data Recovery Utility, %s\nChristophe GRENIER <grenier@cgsecurity.org>\nhttp://www.cgsecurity.org\n", VERSION, TESTDISKDATE);
log_info("OS: %s\n" , get_os());
log_info("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
log_info("Compilation date: %s\n", get_compilation_date());
+#endif
log_info("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version(), td_curses_version());
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(DJGPP)
Index: testdisk-7.0/src/qmainrec.cpp
===================================================================
--- testdisk-7.0.orig/src/qmainrec.cpp
+++ testdisk-7.0/src/qmainrec.cpp
@@ -63,7 +63,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version());
printf("OS: %s\n" , get_os());
@@ -114,7 +116,9 @@ int main(int argc, char *argv[])
log_info("PhotoRec %s, Data Recovery Utility, %s\nChristophe GRENIER <grenier@cgsecurity.org>\nhttp://www.cgsecurity.org\n", VERSION, TESTDISKDATE);
log_info("OS: %s\n" , get_os());
log_info("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
log_info("Compilation date: %s\n", get_compilation_date());
+#endif
log_info("ext2fs lib: %s, ntfs lib: %s, ewf lib: %s, libjpeg: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_ewf_version(), td_jpeg_version());
Index: testdisk-7.0/src/testdisk.c
===================================================================
--- testdisk-7.0.orig/src/testdisk.c
+++ testdisk-7.0/src/testdisk.c
@@ -117,7 +117,9 @@ static void display_version(void)
printf("\n");
printf("Version: %s\n", VERSION);
printf("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
printf("Compilation date: %s\n", get_compilation_date());
+#endif
printf("ext2fs lib: %s, ntfs lib: %s, reiserfs lib: %s, ewf lib: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_reiserfs_version(), td_ewf_version(), td_curses_version());
printf("OS: %s\n" , get_os());
@@ -404,7 +406,9 @@ int main( int argc, char **argv )
log_info("TestDisk %s, Data Recovery Utility, %s\nChristophe GRENIER <grenier@cgsecurity.org>\nhttp://www.cgsecurity.org\n", VERSION, TESTDISKDATE);
log_info("OS: %s\n" , get_os());
log_info("Compiler: %s\n", get_compiler());
+#ifdef RECORD_COMPILATION_DATE
log_info("Compilation date: %s\n", get_compilation_date());
+#endif
log_info("ext2fs lib: %s, ntfs lib: %s, reiserfs lib: %s, ewf lib: %s, curses lib: %s\n",
td_ext2fs_version(), td_ntfs_version(), td_reiserfs_version(), td_ewf_version(), td_curses_version());
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(DJGPP)
|