diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-02-09 10:52:29 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2019-02-09 10:54:20 +0100 |
commit | 9817af0d881bf3f3a86d0cb09b86fe6e47aa5fd1 (patch) | |
tree | 6949a2947bbd446622d0f2611a42803f32ff14cd /bootstrap.conf | |
parent | 810758516a79ce42e9d8ed3ec6dcdb1696a58bb3 (diff) | |
download | gnutls-9817af0d881bf3f3a86d0cb09b86fe6e47aa5fd1.tar.gz |
bootstrap: refuse to bootstrap if any dependencies bring gnulib's network stacktmp-enforce-gnulib-rules-for-lib
If gnulib's network stack is brought (due to a dependency) in the library
it will make the library unusable to non-gnulib using applications. This
prevents windows applications for example to use gnutls, and so on. Even
more it is quite hard to catch that issue because our testsuite uses
gnulib as well. Instead we try to catch the these modules at import time.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'bootstrap.conf')
-rw-r--r-- | bootstrap.conf | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bootstrap.conf b/bootstrap.conf index 31f054bc0e..f03f637ff7 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -24,7 +24,7 @@ use_libtool=1 checkout_only_file= local_gl_dir=gl/override/ required_submodules="tests/suite/tls-fuzzer/python-ecdsa tests/suite/tls-fuzzer/tlsfuzzer tests/suite/tls-fuzzer/tlslite-ng" - +GNULIB_SRCDIR="${GNULIB_SRCDIR:-./gnulib/}" # Reproduce by: gnulib-tool --import --local-dir=gl/override --lib=libgnu --source-base=gl --m4-base=gl/m4 --doc-base=doc --tests-base=gl/tests --aux-dir=build-aux --with-tests --avoid=alignof-tests --avoid=lock-tests --avoid=lseek-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl --no-vc-files alloca byteswap c-ctype extensions func gendocs getline gettext-h gettimeofday hash-pjw-bare havelib intprops lib-msvc-compat lib-symbol-versions maintainer-makefile manywarnings memmem-simple minmax netdb netinet_in pmccabe2html read-file secure_getenv snprintf stdint strcase strndup strtok_r strverscmp sys_socket sys_stat time_r unistd vasprintf vsnprintf warnings @@ -74,6 +74,16 @@ for mod in $required_submodules;do git submodule update --init $git_options $mod done + +deps=$(${GNULIB_SRCDIR}/gnulib-tool --extract-recursive-dependencies ${gnulib_modules}) +deps="echo -n ${deps} ${gnulib_modules}|sort -u" +case ${deps} in + *select*|*poll*|*sockets*|*recv*|*send*) + echo "******************************************************************" + die "the library cannot include the gnulib sockets; see CONTRIBUTION.md" + ;; +esac + bootstrap_post_import_hook () { # we re-use malloc-posix from the original gnulib |