Vendoring considered harmfull

Examples

Vendoring library header are compiled in cryptographic library

Vendored library headers are being compiled inside the cryptographic library. Even if GnuTLS is built against a fully installed system libtasn1, libgnutls-dane still uses the header files from lib/minitasn1. In bug 1144080, Makefile.am contains:

AM_CPPFLAGS += \
        -I$(srcdir)/../gl               \
        -I$(builddir)/../gl             \
        -I$(builddir)/../lib/includes   \
        -I$(srcdir)/../lib/includes     \
        -I$(srcdir)/includes            \
        -I$(builddir)/includes          \
        -I$(srcdir)/../lib/minitasn1    \
        -I$(srcdir)/../lib

These includes are really used:

(13trixie)ametzler@argenau:/tmp/GNUTLS28/gnutls28$ for in in  lib/minitasn1/*.h ; do echo invalid > $i ; done
# now start a build
make[3]: Entering directory '/tmp/GNUTLS28/gnutls28/b4deb/libdane'
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../libdane -I..  -DGNUTLS_BUILDING_LIB=1 -I../../libdane/../gl -I./../gl -I./../lib/includes -I../../libdane/../lib/includes -I../../libdane/includes -I./includes -I../../libdane/../lib/minitasn1 -I../../libdane/../lib -Wdate-time -D_FORTIFY_SOURCE=2  -Wtype-limits -fanalyzer -fstrict-flex-arrays -Wall -Wbad-function-cast -Wcast-align=strict -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wflex-array-member-not-at-end -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wopenmp-simd -Wpacked -Wpointer-arith -Wshadow -Wstrict-flex-arrays -Wstrict-prototypes -Wsuggest-attribute=cold -Wsuggest-attribute=format -Wsuggest-attribute=malloc -Wsuggest-final-methods -Wsuggest-final-types -Wsync-nand -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunused-macros -Wvariadic-macros -Wvector-operation-performance -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2 -Wbidi-chars=any,ucn -Wformat-overflow=2 -Wformat=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2 -Wuse-after-free=3 -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-analyzer-malloc-leak -Wno-missing-field-initializers -Wno-unused-parameter -Wno-format-truncation -Wimplicit-fallthrough=2 -Wabi=11 -fdiagnostics-show-option -fno-builtin-strcmp    -I/usr/include/p11-kit-1    -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/tmp/GNUTLS28/gnutls28=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -c -o dane.lo ../../libdane/dane.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../libdane -I.. -DGNUTLS_BUILDING_LIB=1 -I../../libdane/../gl -I./../gl -I./../lib/includes -I../../libdane/../lib/includes -I../../libdane/includes -I./includes -I../../libdane/../lib/minitasn1 -I../../libdane/../lib -Wdate-time -D_FORTIFY_SOURCE=2 -Wtype-limits -fanalyzer -fstrict-flex-arrays -Wall -Wbad-function-cast -Wcast-align=strict -Wdate-time -Wdisabled-optimization -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wextra -Wflex-array-member-not-at-end -Winit-self -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wnested-externs -Wnull-dereference -Wold-style-definition -Wopenmp-simd -Wpacked -Wpointer-arith -Wshadow -Wstrict-flex-arrays -Wstrict-prototypes -Wsuggest-attribute=cold -Wsuggest-attribute=format -Wsuggest-attribute=malloc -Wsuggest-final-methods -Wsuggest-final-types -Wsync-nand -Wtrampolines -Wuninitialized -Wunknown-pragmas -Wunused-macros -Wvariadic-macros -Wvector-operation-performance -Wwrite-strings -Warray-bounds=2 -Wattribute-alias=2 -Wbidi-chars=any,ucn -Wformat-overflow=2 -Wformat=2 -Wformat-truncation=2 -Wimplicit-fallthrough=5 -Wshift-overflow=2 -Wuse-after-free=3 -Wunused-const-variable=2 -Wvla-larger-than=4031 -Wno-analyzer-malloc-leak -Wno-missing-field-initializers -Wno-unused-parameter -Wno-format-truncation -Wimplicit-fallthrough=2 -Wabi=11 -fdiagnostics-show-option -fno-builtin-strcmp -I/usr/include/p11-kit-1 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/tmp/GNUTLS28/gnutls28=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -c ../../libdane/dane.c  -fPIC -DPIC -o .libs/dane.o
In file included from ../../libdane/../lib/global.h:26,
                 from ../../libdane/../lib/errors.h:27,
                 from ../../libdane/../lib/str.h:29,
                 from ../../libdane/../lib/gnutls_int.h:374,
                 from ../../libdane/dane.c:37:
../../libdane/../lib/minitasn1/libtasn1.h:1:8: error: expected ';' before 'int'
    1 | invalid