| 1 | Description: Reproducible build fix. |
| 2 | Use REPBUILDDATE which is pulled from debian/changelog in debian/rules |
| 3 | instead of __DATE__ as compile date. |
| 4 | Author: Andreas Metzler <ametzler@debian.org> |
| 5 | |
| 6 | --- a/exim_monitor/em_version.c |
| 7 | +++ b/exim_monitor/em_version.c |
| 8 | @@ -10,6 +10,8 @@ |
| 9 | #include <string.h> |
| 10 | #include <stdlib.h> |
| 11 | |
| 12 | +#include "../src/repbuildtime.h" |
| 13 | + |
| 14 | extern uschar *version_string; |
| 15 | extern uschar *version_date; |
| 16 | |
| 17 | @@ -21,7 +23,7 @@ uschar today[20]; |
| 18 | |
| 19 | version_string = US"2.06"; |
| 20 | |
| 21 | -Ustrcpy(today, __DATE__); |
| 22 | +Ustrcpy(today, REPBUILDDATE); |
| 23 | if (today[4] == ' ') i = 1; |
| 24 | today[3] = today[6] = '-'; |
| 25 | |
| 26 | @@ -31,7 +33,7 @@ Ustrncat(version_date, today+4+i, 3-i); |
| 27 | Ustrncat(version_date, today, 4); |
| 28 | Ustrncat(version_date, today+7, 4); |
| 29 | Ustrcat(version_date, " "); |
| 30 | -Ustrcat(version_date, __TIME__); |
| 31 | +Ustrcat(version_date, REPBUILDTIME); |
| 32 | } |
| 33 | |
| 34 | /* End of em_version.c */ |
| 35 | --- a/src/version.c |
| 36 | +++ b/src/version.c |
| 37 | @@ -11,6 +11,8 @@ |
| 38 | |
| 39 | #include "version.h" |
| 40 | |
| 41 | +#include "../src/repbuildtime.h" |
| 42 | + |
| 43 | |
| 44 | /* The header file cnumber.h contains a single line containing the |
| 45 | compilation number, making it easy to have it updated automatically. |
| 46 | @@ -40,7 +42,7 @@ version_cnumber_format = US"%d\0<<eximcn |
| 47 | sprintf(CS version_cnumber, CS version_cnumber_format, cnumber); |
| 48 | version_string = US EXIM_VERSION_STR "\0<<eximversion>>"; |
| 49 | |
| 50 | -Ustrcpy(today, __DATE__); |
| 51 | +Ustrcpy(today, REPBUILDDATE); |
| 52 | if (today[4] == ' ') today[4] = '0'; |
| 53 | today[3] = today[6] = '-'; |
| 54 | |
| 55 | @@ -50,7 +52,7 @@ Ustrncat(version_date, today+4, 3); |
| 56 | Ustrncat(version_date, today, 4); |
| 57 | Ustrncat(version_date, today+7, 4); |
| 58 | Ustrcat(version_date, " "); |
| 59 | -Ustrcat(version_date, __TIME__); |
| 60 | +Ustrcat(version_date, REPBUILDTIME); |
| 61 | } |
| 62 | |
| 63 | /* End of version.c */ |