This check was added in 98fe4bd8f1e35f8e498e268f653a43cbfa31e751, to check
whether dm_task_deferred_remove could be removed, and to conditionally set
the corresponding build-tags. Now that the devicemapper graphdriver has been
removed in dc11d2a2d8e1df0a90ce289f5dd06cad38193073, we no longer need this.
This patch:
- removes uses of the (no longer used) `libdm`, `dlsym_deferred_remove`,
and `libdm_no_deferred_remove` build-tags.
- removes the `add_buildtag` utility, which is now unused.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
| ... | ... |
@@ -84,24 +84,10 @@ if [ ! "$GOPATH" ]; then |
| 84 | 84 |
exit 1 |
| 85 | 85 |
fi |
| 86 | 86 |
|
| 87 |
-# Adds $1_$2 to DOCKER_BUILDTAGS unless it already |
|
| 88 |
-# contains a word starting from $1_ |
|
| 89 |
-add_buildtag() {
|
|
| 90 |
- [[ " $DOCKER_BUILDTAGS" == *" $1_"* ]] || DOCKER_BUILDTAGS+=" $1_$2" |
|
| 91 |
-} |
|
| 92 |
- |
|
| 93 | 87 |
if ${PKG_CONFIG} 'libsystemd' 2> /dev/null; then
|
| 94 | 88 |
DOCKER_BUILDTAGS+=" journald" |
| 95 | 89 |
fi |
| 96 | 90 |
|
| 97 |
-# test whether "libdevmapper.h" is new enough to support deferred remove |
|
| 98 |
-# functionality. We favour libdm_dlsym_deferred_remove over |
|
| 99 |
-# libdm_no_deferred_remove in dynamic cases because the binary could be shipped |
|
| 100 |
-# with a newer libdevmapper than the one it was built with. |
|
| 101 |
-if command -v gcc &> /dev/null && ! (echo -e '#include <libdevmapper.h>\nint main() { dm_task_deferred_remove(NULL); }' | gcc -xc - -o /dev/null $(${PKG_CONFIG} --libs devmapper 2> /dev/null) &> /dev/null); then
|
|
| 102 |
- add_buildtag libdm dlsym_deferred_remove |
|
| 103 |
-fi |
|
| 104 |
- |
|
| 105 | 91 |
# Use these flags when compiling the tests and final binary |
| 106 | 92 |
|
| 107 | 93 |
if [ -z "$DOCKER_DEBUG" ]; then |
| ... | ... |
@@ -12,7 +12,7 @@ |
| 12 | 12 |
# |
| 13 | 13 |
set -eux -o pipefail |
| 14 | 14 |
|
| 15 |
-BUILDFLAGS=(-tags 'netgo libdm_no_deferred_remove journald') |
|
| 15 |
+BUILDFLAGS=(-tags 'netgo journald') |
|
| 16 | 16 |
TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}"
|
| 17 | 17 |
TESTDIRS="${TESTDIRS:-./...}"
|
| 18 | 18 |
exclude_paths='/vendor/|/integration' |