global: Remove BUILD_DATE and BUILD_TIME

All this does is make reproducible builds impossible.
This commit is contained in:
Adam Jackson 2019-08-14 14:51:56 -04:00 committed by Adam Jackson
parent 61aa40aeb3
commit 3c78d63755
8 changed files with 1 additions and 60 deletions

View File

@ -142,7 +142,6 @@ EXTRA_DIST += \
include/xorg-config.h.meson.in \
include/xwin-config.h.meson.in \
hw/xfree86/loader/symbol-test.c \
buildDateTime.sh \
composite/meson.build \
config/meson.build \
damageext/meson.build \

View File

@ -1,2 +0,0 @@
#define BUILD_DATE @BUILD_DATE@
#define BUILD_TIME @BUILD_TIME@

View File

@ -1,13 +0,0 @@
DATE_FMT="%Y%m%d"
TIME_FMT="1%H%M%S"
BUILD_DATE="`date "+$DATE_FMT"`"
BUILD_TIME="`date "+$TIME_FMT"`"
if test "x$SOURCE_DATE_EPOCH" != "x"; then
BUILD_DATE="`date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT"`"
BUILD_TIME="`date -u -d "@$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u "+$TIME_FMT"`"
fi
output=$1
echo "#define BUILD_DATE $BUILD_DATE" > $output
echo "#define BUILD_TIME $BUILD_TIME" >> $output

View File

@ -2383,16 +2383,6 @@ AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
AC_DEFINE_DIR(SYSCONFDIR, sysconfdir, [sysconfdir])
AC_SUBST([RELEASE_DATE])
DATE_FMT="%Y%m%d"
TIME_FMT="1%H%M%S"
BUILD_DATE="`date "+$DATE_FMT"`"
BUILD_TIME="`date "+$TIME_FMT"`"
if test "x$SOURCE_DATE_EPOCH" != "x"; then
BUILD_DATE="`date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT"`"
BUILD_TIME="`date -u -d "@$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u "+$TIME_FMT"`"
fi
AC_SUBST([BUILD_DATE])
AC_SUBST([BUILD_TIME])
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
@ -2413,7 +2403,6 @@ if test "x$CONFIG_HAL" = xno && test "x$CONFIG_UDEV" = xno; then
fi
AC_CONFIG_FILES([
buildDateTime.h
Makefile
glx/Makefile
include/Makefile

View File

@ -65,7 +65,6 @@
#include "xf86_OSlib.h"
#include "xf86cmap.h"
#include "xorgVersion.h"
#include "buildDateTime.h"
#include "mipointer.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
@ -188,28 +187,6 @@ xf86PrintBanner(void)
}
}
#endif
#if defined(BUILD_DATE) && (BUILD_DATE > 19000000)
{
struct tm t;
char buf[100];
memset(&t, 0, sizeof(t));
memset(buf, 0, sizeof(buf));
t.tm_mday = BUILD_DATE % 100;
t.tm_mon = (BUILD_DATE / 100) % 100 - 1;
t.tm_year = BUILD_DATE / 10000 - 1900;
#if defined(BUILD_TIME)
t.tm_sec = BUILD_TIME % 100;
t.tm_min = (BUILD_TIME / 100) % 100;
t.tm_hour = (BUILD_TIME / 10000) % 100;
if (strftime(buf, sizeof(buf), "%d %B %Y %I:%M:%S%p", &t))
xf86ErrorFVerb(0, "Build Date: %s\n", buf);
#else
if (strftime(buf, sizeof(buf), "%d %B %Y", &t))
xf86ErrorFVerb(0, "Build Date: %s\n", buf);
#endif
}
#endif
#if defined(BUILDERSTRING)
xf86ErrorFVerb(0, "%s \n", BUILDERSTRING);
#endif

View File

@ -34,7 +34,6 @@
#include <X11/X.h>
#include <X11/Xproto.h>
#include "buildDateTime.h"
#include "os.h"
#include "servermd.h"
#include "inputstr.h"
@ -169,7 +168,6 @@ DarwinPrintBanner(void)
{
ErrorF("Xquartz starting:\n");
ErrorF("X.Org X Server %s\n", XSERVER_VERSION);
ErrorF("Build Date: %d\n", BUILD_DATE);
}
/*

View File

@ -62,7 +62,6 @@
#include "mach_startupServer.h"
#include "console_redirect.h"
#include "buildDateTime.h"
/* From darwinEvents.c ... but don't want to pull in all the server cruft */
void
@ -100,7 +99,7 @@ asm (".desc ___crashreporter_info__, 0x10");
#endif
static const char *__crashreporter_info__base =
"X.Org X Server " XSERVER_VERSION " Build Date: " STRINGIZE(BUILD_DATE);
"X.Org X Server " XSERVER_VERSION ";
char *bundle_id_prefix = NULL;
static char *server_bootstrap_name = NULL;

View File

@ -584,12 +584,6 @@ manpage_config.set('modulepath', module_dir)
manpage_config.set('suid_wrapper_dir', join_paths(get_option('prefix'), 'libexec'))
manpage_config.set('default_font_path', default_font_path)
# generate header containing date & time build was configued
build_date_time = configure_file(
output: 'buildDateTime.h',
command: ['sh', join_paths(meson.current_source_dir(), 'buildDateTime.sh'), '@OUTPUT@'],
)
# Include must come first, as it sets up dix-config.h
subdir('include')