s3: drop build_env
authorBernhard M. Wiedemann <bwiedemann@suse.de>
Mon, 10 Jul 2017 16:29:41 +0000 (18:29 +0200)
committerKarolin Seeger <kseeger@samba.org>
Tue, 25 Jul 2017 00:20:38 +0000 (02:20 +0200)
As a follow up to eedebe2ef1b ("docs-xml: Sort input file list"), this
change enables reproducible builds, without the added complexity of
https://lists.samba.org/archive/samba-technical/2017-June/121302.html

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12906

Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Jul 14 18:48:08 CEST 2017 on sn-devel-144

(cherry picked from commit 85b10a636e0eeeca0948c6b1d59d2df7b4507d45)

Autobuild-User(v4-7-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-7-test): Tue Jul 25 02:20:38 CEST 2017 on sn-devel-144

buildtools/wafsamba/samba_patterns.py
source3/script/build_env.sh [deleted file]
source3/wscript_build

index 1baa60190656ca82141a0648a041310747877b73..e809f26a095f4cd8a7cda21a2725c50e6de458cc 100644 (file)
@@ -51,7 +51,6 @@ def write_build_options_header(fp):
     fp.write("*/\n")
     fp.write("\n")
     fp.write("#include \"includes.h\"\n")
-    fp.write("#include \"build_env.h\"\n")
     fp.write("#include \"dynconfig/dynconfig.h\"\n")
     fp.write("#include \"lib/cluster_support.h\"\n")
 
@@ -92,19 +91,6 @@ def write_build_options_header(fp):
     fp.write("              return;\n")
     fp.write("       }\n")
     fp.write("\n")
-    fp.write("#ifdef _BUILD_ENV_H\n")
-    fp.write("       /* Output information about the build environment */\n")
-    fp.write("       output(screen,\"Build environment:\\n\");\n")
-    fp.write("       output(screen,\"   Built by:    %s@%s\\n\",BUILD_ENV_USER,BUILD_ENV_HOST);\n")
-    fp.write("       output(screen,\"   Built on:    %s\\n\",BUILD_ENV_DATE);\n")
-    fp.write("\n")
-    fp.write("       output(screen,\"   Built using: %s\\n\",BUILD_ENV_COMPILER);\n")
-    fp.write("       output(screen,\"   Build host:  %s\\n\",BUILD_ENV_UNAME);\n")
-    fp.write("       output(screen,\"   SRCDIR:      %s\\n\",BUILD_ENV_SRCDIR);\n")
-    fp.write("       output(screen,\"   BUILDDIR:    %s\\n\",BUILD_ENV_BUILDDIR);\n")
-    fp.write("\n")
-    fp.write("\n")
-    fp.write("#endif\n")
     fp.write("\n")
     fp.write("       /* Output various paths to files and directories */\n")
     fp.write("       output(screen,\"\\nPaths:\\n\");\n")
diff --git a/source3/script/build_env.sh b/source3/script/build_env.sh
deleted file mode 100755 (executable)
index eb54f37..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/sh
-
-if [ $# -lt 3 ]
-then
-    echo "Usage: $0 srcdir builddir compiler"
-    exit 1
-fi
-
-uname=`uname -a`
-date=`date`
-srcdir=$1
-builddir=$2
-compiler=$3
-
-if [ ! "x$USER" = "x" ]; then
-    whoami=$USER
-else 
-    if [ ! "x$LOGNAME" = "x" ]; then
-       whoami=$LOGNAME
-    else
-       whoami=`whoami || id -un`
-    fi
-fi
-
-host=`hostname`
-
-cat <<EOF
-/* This file is automatically generated with "make include/build_env.h". DO NOT EDIT */
-
-#ifndef _BUILD_ENV_H
-#define _BUILD_ENV_H
-
-#define BUILD_ENV_UNAME "${uname}"
-#define BUILD_ENV_DATE "${date}"
-#define BUILD_ENV_SRCDIR "${srcdir}"
-#define BUILD_ENV_BUILDDIR "${builddir}"
-#define BUILD_ENV_USER "${whoami}"
-#define BUILD_ENV_HOST "${host}"
-#define BUILD_ENV_COMPILER "${compiler}"
-#endif /* _BUILD_ENV_H */
-EOF
index a030b8ad177618a7c6bb53355569223d395b3d62..1c5e4c80c0fabaa835eb9664cc155652cfd1a509 100644 (file)
@@ -9,14 +9,6 @@ config_h = "../include/config.h"
 
 bld.SAMBA_BLDOPTIONS('smbd/build_options.c')
 
-t = bld.SAMBA_GENERATOR('build_env.h',
-                        source='script/build_env.sh',
-                        target='include/build_env.h',
-                        rule='${SRC} ${SRCDIR} ${BUILDDIR} ${CC} > ${TGT}')
-# todo: work out what is really wanted here
-t.env.SRCDIR = bld.path.abspath()
-t.env.BUILDDIR = bld.path.abspath()
-
 bld.SETUP_BUILD_GROUPS()
 
 ######################## SUBSYSTEMS #################################