You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.9 KiB

  1. From ebfccff8735ca0f8b6c9e8d06f2d3efe916affaf Mon Sep 17 00:00:00 2001
  2. From: Alexander Couzens <lynxis@fe80.eu>
  3. Date: Sun, 10 Dec 2017 01:23:29 +0100
  4. Subject: [PATCH] fix reproducible builds by removing build timestamp
  5. Build timestamps prevents reproducible builds. [0]
  6. [0] https://reproducible-builds.org/docs/timestamps/
  7. Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
  8. ---
  9. src/conf.c | 2 +-
  10. src/mosquitto.c | 4 +---
  11. 2 files changed, 2 insertions(+), 4 deletions(-)
  12. diff --git a/src/conf.c b/src/conf.c
  13. index a3e233de..e8162031 100644
  14. --- a/src/conf.c
  15. +++ b/src/conf.c
  16. @@ -309,7 +309,7 @@ void mqtt3_config_cleanup(struct mqtt3_config *config)
  17. static void print_usage(void)
  18. {
  19. - printf("mosquitto version %s (build date %s)\n\n", VERSION, TIMESTAMP);
  20. + printf("mosquitto version %s\n\n", VERSION);
  21. printf("mosquitto is an MQTT v3.1.1/v3.1 broker.\n\n");
  22. printf("Usage: mosquitto [-c config_file] [-d] [-h] [-p port]\n\n");
  23. printf(" -c : specify the broker config file.\n");
  24. diff --git a/src/mosquitto.c b/src/mosquitto.c
  25. index b28150ce..dcf3a72a 100644
  26. --- a/src/mosquitto.c
  27. +++ b/src/mosquitto.c
  28. @@ -291,7 +291,7 @@ int main(int argc, char *argv[])
  29. rc = 1;
  30. return rc;
  31. }
  32. - _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s (build date %s) starting", VERSION, TIMESTAMP);
  33. + _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "mosquitto version %s starting", VERSION);
  34. if(config.config_file){
  35. _mosquitto_log_printf(NULL, MOSQ_LOG_INFO, "Config loaded from %s.", config.config_file);
  36. }else{
  37. @@ -308,8 +308,6 @@ int main(int argc, char *argv[])
  38. /* Set static $SYS messages */
  39. snprintf(buf, 1024, "mosquitto version %s", VERSION);
  40. mqtt3_db_messages_easy_queue(&int_db, NULL, "$SYS/broker/version", 2, strlen(buf), buf, 1);
  41. - snprintf(buf, 1024, "%s", TIMESTAMP);
  42. - mqtt3_db_messages_easy_queue(&int_db, NULL, "$SYS/broker/timestamp", 2, strlen(buf), buf, 1);
  43. }
  44. #endif