The branch, master has been updated via 420bbb1d92f wafsamba: require PYTHONHASHSEED=1 to be exported via aa02cf3c444 ctdb/packaging/RPM: don't use waf directly via 22c46d9f418 configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts via a6b1e4b5766 wafsamba: let test_duplicate_symbol.sh export PYTHONHASHSEED=1 via 0be4f567233 s4:selftest/provisions: make use of 'make testenv' and avoid direct waf via 10d69da1d34 lib/fuzzing/README.md: don't use waf directly via 42eeed05f1a buildtools: remove unused testwaf.sh from 825dcc6a13d smbd: Don't NULL out "::$DATA"
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 420bbb1d92fd2a28725b53f425ba3d214831b660 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 13:00:03 2022 +0200 wafsamba: require PYTHONHASHSEED=1 to be exported This avoids a lot of trouble with random build failures, if people try to use waf directly. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> Autobuild-User(master): Andrew Bartlett <abart...@samba.org> Autobuild-Date(master): Tue Mar 29 23:31:38 UTC 2022 on sn-devel-184 commit aa02cf3c4449cb0a22da8f359f0b3edc4f1d9bb7 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 12:38:36 2022 +0200 ctdb/packaging/RPM: don't use waf directly ./configure && make && make install is will always work. Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 22c46d9f41876d9ec7187148e658d1692bf37cdd Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 12:59:12 2022 +0200 configure/Makefile: export PYTHONHASHSEED=1 in all 'configure/Makefile' scripts Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit a6b1e4b5766205b7337e0e4b00944184289bfc36 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 12:50:55 2022 +0200 wafsamba: let test_duplicate_symbol.sh export PYTHONHASHSEED=1 Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 0be4f5672338802042b06308c5cf0ea04bcaf48e Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 12:49:50 2022 +0200 s4:selftest/provisions: make use of 'make testenv' and avoid direct waf Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 10d69da1d34b2b11920d9bf051f5a26dbbcadf02 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 12:49:24 2022 +0200 lib/fuzzing/README.md: don't use waf directly Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> commit 42eeed05f1aed10b48f7008a18e47cf15ac2c010 Author: Stefan Metzmacher <me...@samba.org> Date: Mon Mar 28 12:38:02 2022 +0200 buildtools: remove unused testwaf.sh Signed-off-by: Stefan Metzmacher <me...@samba.org> Reviewed-by: Andrew Bartlett <abart...@samba.org> ----------------------------------------------------------------------- Summary of changes: buildtools/scripts/Makefile.waf | 4 +- buildtools/scripts/configure.waf | 11 +++- buildtools/testwaf.sh | 70 ---------------------- buildtools/wafsamba/test_duplicate_symbol.sh | 3 + buildtools/wafsamba/wscript | 4 ++ configure | 4 ++ ctdb/Makefile | 2 +- ctdb/configure | 7 +++ ctdb/packaging/RPM/ctdb.spec.in | 6 +- lib/fuzzing/README.md | 12 ++-- lib/ldb/configure | 7 +++ lib/replace/configure | 7 +++ lib/talloc/configure | 7 +++ lib/tdb/configure | 7 +++ lib/tevent/configure | 7 +++ .../release-4-1-0rc3/steps-to-reproduce.txt | 2 +- 16 files changed, 75 insertions(+), 85 deletions(-) delete mode 100755 buildtools/testwaf.sh Changeset truncated at 500 lines: diff --git a/buildtools/scripts/Makefile.waf b/buildtools/scripts/Makefile.waf index 5fc939c99e0..a15a5f87607 100644 --- a/buildtools/scripts/Makefile.waf +++ b/buildtools/scripts/Makefile.waf @@ -1,7 +1,7 @@ # simple makefile wrapper to run waf -WAF_BINARY=BUILDTOOLS/bin/waf -WAF=WAF_MAKE=1 $(WAF_BINARY) +WAF_BINARY=$(PYTHON) BUILDTOOLS/bin/waf +WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) all: $(WAF) build diff --git a/buildtools/scripts/configure.waf b/buildtools/scripts/configure.waf index a7d8d1dbd64..ccb62849a54 100755 --- a/buildtools/scripts/configure.waf +++ b/buildtools/scripts/configure.waf @@ -1,6 +1,6 @@ #!/bin/sh -PREVPATH=`dirname $0` +PREVPATH=$(dirname $0) WAF=BUILDTOOLS/bin/waf @@ -9,6 +9,13 @@ WAF=BUILDTOOLS/bin/waf JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd BUILDPATH || exit 1 -$WAF configure "$@" || exit 1 +$PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/buildtools/testwaf.sh b/buildtools/testwaf.sh deleted file mode 100755 index 3e8e6431c78..00000000000 --- a/buildtools/testwaf.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -set -e -set -x - -d=$(dirname $0) - -cd $d/.. -PREFIX=$HOME/testprefix - -if [ $# -gt 0 ]; then - tests="$*" -else - tests="lib/replace lib/talloc lib/tevent lib/tdb lib/ldb" -fi - -echo "testing in dirs $tests" - -for d in $tests; do - echo "$(date): testing $d" - pushd $d - rm -rf bin - type waf - waf dist - ./configure -C --enable-developer --prefix=$PREFIX - time make - make install - make distcheck - case $d in - "lib/ldb") - ldd bin/ldbadd - ;; - "lib/replace") - ldd bin/replace_testsuite - ;; - "lib/talloc") - ldd bin/talloc_testsuite - ;; - "lib/tdb") - ldd bin/tdbtool - ;; - esac - popd -done - -echo "testing python portability" -pushd lib/talloc -versions="python2.4 python2.5 python2.6 python3.0 python3.1" -for p in $versions; do - ret=$(which $p || echo "failed") - if [ $ret = "failed" ]; then - echo "$p not found, skipping" - continue - fi - echo "Testing $p" - $p ../../buildtools/bin/waf configure -C --enable-developer --prefix=$PREFIX - $p ../../buildtools/bin/waf build install -done -popd - -echo "testing cross compiling" -pushd lib/talloc -ret=$(which arm-linux-gnueabi-gcc || echo "failed") -if [ $ret != "failed" ]; then - CC=arm-linux-gnueabi-gcc ./configure -C --prefix=$PREFIX --cross-compile --cross-execute='runarm' - make && make install -else - echo "Cross-compiler not installed, skipping test" -fi -popd diff --git a/buildtools/wafsamba/test_duplicate_symbol.sh b/buildtools/wafsamba/test_duplicate_symbol.sh index 46f44a67dcf..dffac757002 100755 --- a/buildtools/wafsamba/test_duplicate_symbol.sh +++ b/buildtools/wafsamba/test_duplicate_symbol.sh @@ -5,6 +5,9 @@ subunit_start_test duplicate_symbols +PYTHONHASHSEED=1 +export PYTHONHASHSEED + if $PYTHON ./buildtools/bin/waf build --dup-symbol-check; then subunit_pass_test duplicate_symbols else diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index a4d6f3e5c49..8729b0829da 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -8,6 +8,10 @@ import wafsamba from samba_utils import symlink from optparse import SUPPRESS_HELP +phs = os.environ.get("PYTHONHASHSEED", None) +if phs != "1": + raise Errors.WafError('''PYTHONHASHSEED=1 missing! Don't use waf directly, use ./configure and make!''') + # this forces configure to be re-run if any of the configure # sections of the build scripts change. We have to check # for this in sys.argv as options have not yet been parsed when diff --git a/configure b/configure index 237d2306f79..ef80911d944 100755 --- a/configure +++ b/configure @@ -12,6 +12,10 @@ export JOBS # Make sure we don't have any library preloaded. unset LD_PRELOAD +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/ctdb/Makefile b/ctdb/Makefile index ec362e29408..5dbc7acdc54 100644 --- a/ctdb/Makefile +++ b/ctdb/Makefile @@ -1,7 +1,7 @@ # simple makefile wrapper to run waf WAF_BINARY=$(PYTHON) ../buildtools/bin/waf -WAF=WAF_MAKE=1 $(WAF_BINARY) +WAF=PYTHONHASHSEED=1 WAF_MAKE=1 $(WAF_BINARY) all: $(WAF) build diff --git a/ctdb/configure b/ctdb/configure index dbb0c1446b5..48b786b1612 100755 --- a/ctdb/configure +++ b/ctdb/configure @@ -10,6 +10,13 @@ WAF=buildtools/bin/waf JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in index 8fea8911ad2..46bced14334 100644 --- a/ctdb/packaging/RPM/ctdb.spec.in +++ b/ctdb/packaging/RPM/ctdb.spec.in @@ -88,7 +88,7 @@ fi export CC CFLAGS="$RPM_OPT_FLAGS $EXTRA -D_GNU_SOURCE" \ -$PYTHON ./buildtools/bin/waf configure \ +./configure \ --builtin-libraries=replace,popt \ --bundled-libraries=!talloc,!tevent,!tdb \ --minimum-library-version=talloc:%libtalloc_version,tdb:%libtdb_version,tevent:%libtevent_version \ @@ -103,7 +103,7 @@ $PYTHON ./buildtools/bin/waf configure \ --mandir=%{_mandir} \ --localstatedir=%{_localstatedir} -$PYTHON ./buildtools/bin/waf build +make -j %install # Clean up in case there is trash left from a previous build @@ -112,7 +112,7 @@ rm -rf $RPM_BUILD_ROOT # Create the target build directory hierarchy mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sudoers.d -DESTDIR=$RPM_BUILD_ROOT $PYTHON ./buildtools/bin/waf install +DESTDIR=$RPM_BUILD_ROOT make -j install install -m644 config/ctdb.conf $RPM_BUILD_ROOT%{_sysconfdir}/ctdb install -m644 config/ctdb.tunables $RPM_BUILD_ROOT%{_sysconfdir}/ctdb diff --git a/lib/fuzzing/README.md b/lib/fuzzing/README.md index 33d33b92390..d3e34bd79a3 100644 --- a/lib/fuzzing/README.md +++ b/lib/fuzzing/README.md @@ -17,9 +17,9 @@ Example command line to build binaries for use with [honggfuzz](https://github.com/google/honggfuzz/): ```sh -buildtools/bin/waf -C --without-gettext --enable-debug --enable-developer \ +./configure -C --without-gettext --enable-debug --enable-developer \ --address-sanitizer --enable-libfuzzer --abi-check-disable \ - CC=.../honggfuzz/hfuzz_cc/hfuzz-clang configure \ + CC=.../honggfuzz/hfuzz_cc/hfuzz-clang \ LINK_CC=.../honggfuzz/hfuzz_cc/hfuzz-clang ``` @@ -30,7 +30,7 @@ Example for fuzzing `tiniparser` using `honggfuzz` (see `--help` for more options): ```sh -buildtools/bin/waf --targets=fuzz_tiniparser build && \ +make bin/fuzz_tiniparser && \ .../honggfuzz/honggfuzz --sanitizers --timeout 3 --max_file_size 256 \ --rlimit_rss 100 -f .../tiniparser-corpus -- bin/fuzz_tiniparser ``` @@ -43,9 +43,9 @@ Example command line to build binaries for use with [afl](http://lcamtuf.coredump.cx/afl/) ```sh -buildtools/bin/waf -C --without-gettext --enable-debug --enable-developer \ +./configure -C --without-gettext --enable-debug --enable-developer \ --enable-afl-fuzzer --abi-check-disable \ - CC=afl-gcc configure + CC=afl-gcc ``` ## Fuzzing tiniparser @@ -54,7 +54,7 @@ Example for fuzzing `tiniparser` using `afl-fuzz` (see `--help` for more options): ```sh -buildtools/bin/waf --targets=fuzz_tiniparser build && \ +make bin/fuzz_tiniparser build && \ afl-fuzz -m 200 -i inputdir -o outputdir -- bin/fuzz_tiniparser ``` diff --git a/lib/ldb/configure b/lib/ldb/configure index 8979f07581b..2ed32403fd7 100755 --- a/lib/ldb/configure +++ b/lib/ldb/configure @@ -16,6 +16,13 @@ fi JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/replace/configure b/lib/replace/configure index d0ab6685fbe..af761854ef4 100755 --- a/lib/replace/configure +++ b/lib/replace/configure @@ -16,6 +16,13 @@ fi JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/talloc/configure b/lib/talloc/configure index d0ab6685fbe..af761854ef4 100755 --- a/lib/talloc/configure +++ b/lib/talloc/configure @@ -16,6 +16,13 @@ fi JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/tdb/configure b/lib/tdb/configure index d0ab6685fbe..af761854ef4 100755 --- a/lib/tdb/configure +++ b/lib/tdb/configure @@ -16,6 +16,13 @@ fi JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/lib/tevent/configure b/lib/tevent/configure index 63e4a2a00b5..7b972bd0bc8 100755 --- a/lib/tevent/configure +++ b/lib/tevent/configure @@ -16,6 +16,13 @@ fi JOBS=1 export JOBS +# Make sure we don't have any library preloaded. +unset LD_PRELOAD + +# Make sure we get stable hashes +PYTHONHASHSEED=1 +export PYTHONHASHSEED + cd . || exit 1 $PYTHON $WAF configure "$@" || exit 1 cd $PREVPATH diff --git a/source4/selftest/provisions/release-4-1-0rc3/steps-to-reproduce.txt b/source4/selftest/provisions/release-4-1-0rc3/steps-to-reproduce.txt index fc0dfddf8ac..19466e252f6 100644 --- a/source4/selftest/provisions/release-4-1-0rc3/steps-to-reproduce.txt +++ b/source4/selftest/provisions/release-4-1-0rc3/steps-to-reproduce.txt @@ -6,7 +6,7 @@ patch -p1 < rename-domains.patch # MASTER_SRC needs to point at where the schema files can be found, not the 4.1.0rc1 checkout -SELFTEST_TESTENV=promoted_dc:local ./buildtools/bin/waf test --testenv +SELFTEST_TESTENV=promoted_dc:local make testenv # then in the testenv, run: -- Samba Shared Repository