Kaynağa Gözat

hack: remove devicemapper leftovers and build-tags

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>
Sebastiaan van Stijn 1 yıl önce
ebeveyn
işleme
12d1f4f385
2 değiştirilmiş dosya ile 1 ekleme ve 15 silme
  1. 0 14
      hack/make.sh
  2. 1 1
      hack/test/unit

+ 0 - 14
hack/make.sh

@@ -84,24 +84,10 @@ if [ ! "$GOPATH" ]; then
 	exit 1
 fi
 
-# Adds $1_$2 to DOCKER_BUILDTAGS unless it already
-# contains a word starting from $1_
-add_buildtag() {
-	[[ " $DOCKER_BUILDTAGS" == *" $1_"* ]] || DOCKER_BUILDTAGS+=" $1_$2"
-}
-
 if ${PKG_CONFIG} 'libsystemd' 2> /dev/null; then
 	DOCKER_BUILDTAGS+=" journald"
 fi
 
-# test whether "libdevmapper.h" is new enough to support deferred remove
-# functionality. We favour libdm_dlsym_deferred_remove over
-# libdm_no_deferred_remove in dynamic cases because the binary could be shipped
-# with a newer libdevmapper than the one it was built with.
-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
-	add_buildtag libdm dlsym_deferred_remove
-fi
-
 # Use these flags when compiling the tests and final binary
 
 if [ -z "$DOCKER_DEBUG" ]; then

+ 1 - 1
hack/test/unit

@@ -12,7 +12,7 @@
 #
 set -eux -o pipefail
 
-BUILDFLAGS=(-tags 'netgo libdm_no_deferred_remove journald')
+BUILDFLAGS=(-tags 'netgo journald')
 TESTFLAGS+=" -test.timeout=${TIMEOUT:-5m}"
 TESTDIRS="${TESTDIRS:-./...}"
 exclude_paths='/vendor/|/integration'