diff --git a/Makefile b/Makefile index 65aa909323..aa2feab303 100644 --- a/Makefile +++ b/Makefile @@ -91,10 +91,9 @@ MANPAGES_MD = $(wildcard docs/*.md) MANPAGES ?= $(MANPAGES_MD:%.md=%) BTRFS_BUILD_TAG = $(shell hack/btrfs_tag.sh) $(shell hack/btrfs_installed_tag.sh) -LIBDM_BUILD_TAG = $(shell hack/libdm_tag.sh) LIBSUBID_BUILD_TAG = $(shell hack/libsubid_tag.sh) -LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBDM_BUILD_TAG) $(LIBSUBID_BUILD_TAG) -BUILDTAGS += $(LOCAL_BUILD_TAGS) +LOCAL_BUILD_TAGS = $(BTRFS_BUILD_TAG) $(LIBSUBID_BUILD_TAG) +BUILDTAGS += exclude_graphdriver_devicemapper $(LOCAL_BUILD_TAGS) ifeq ($(DISABLE_CGO), 1) override BUILDTAGS = exclude_graphdriver_devicemapper exclude_graphdriver_btrfs containers_image_openpgp diff --git a/hack/libdm_tag.sh b/hack/libdm_tag.sh deleted file mode 100755 index c430faffc2..0000000000 --- a/hack/libdm_tag.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash -tmpdir="$PWD/tmp.$RANDOM" -mkdir -p "$tmpdir" -trap 'rm -fr "$tmpdir"' EXIT -cc -c -o "$tmpdir"/libdm_tag.o -x c - > /dev/null 2> /dev/null << EOF -#include -int main() { - struct dm_task *task; - return 0; -} -EOF -if test $? -ne 0 ; then - echo libdm_no_deferred_remove -fi diff --git a/install.md b/install.md index f7f4b04467..3499a8f1b3 100644 --- a/install.md +++ b/install.md @@ -157,12 +157,12 @@ Install the necessary dependencies: ```bash # Fedora: -sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel device-mapper-devel +sudo dnf install gpgme-devel libassuan-devel btrfs-progs-devel ``` ```bash # Ubuntu (`libbtrfs-dev` requires Ubuntu 18.10 and above): -sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev libdevmapper-dev pkg-config +sudo apt install libgpgme-dev libassuan-dev libbtrfs-dev pkg-config ``` ```bash @@ -172,12 +172,12 @@ brew install gpgme ```bash # openSUSE: -sudo zypper install libgpgme-devel device-mapper-devel libbtrfs-devel glib2-devel +sudo zypper install libgpgme-devel libbtrfs-devel glib2-devel ``` ```bash # Arch Linux: -sudo pacman -S base-devel gpgme device-mapper btrfs-progs +sudo pacman -S base-devel gpgme btrfs-progs ``` Make sure to clone this repository in your `GOPATH` - otherwise compilation fails. @@ -267,7 +267,7 @@ sudo make install ### Building a static binary There have been efforts in the past to produce and maintain static builds, but the maintainers prefer to run Skopeo using distro packages or within containers. This is because static builds of Skopeo tend to be unreliable and functionally restricted. Specifically: -- Some features of Skopeo depend on non-Go libraries like `libgpgme` and `libdevmapper`. +- Some features of Skopeo depend on non-Go libraries like `libgpgme`. - Generating static Go binaries uses native Go libraries, which don't support e.g. `.local` or LDAP-based name resolution. That being said, if you would like to build Skopeo statically, you might be able to do it by combining all the following steps. diff --git a/rpm/skopeo.spec b/rpm/skopeo.spec index 46d074e9cf..f363f9ec3e 100644 --- a/rpm/skopeo.spec +++ b/rpm/skopeo.spec @@ -67,7 +67,6 @@ BuildRequires: go-rpm-macros %endif BuildRequires: gpgme-devel BuildRequires: libassuan-devel -BuildRequires: pkgconfig(devmapper) BuildRequires: ostree-devel BuildRequires: glib2-devel BuildRequires: make @@ -119,7 +118,7 @@ CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-an export CGO_CFLAGS="$CGO_CFLAGS -m64 -mtune=generic -fcf-protection=full" %endif -BASEBUILDTAGS="$(hack/libdm_tag.sh) $(hack/libsubid_tag.sh)" +BASEBUILDTAGS="exclude_graphdriver_devicemapper $(hack/libsubid_tag.sh)" %if %{defined build_with_btrfs} export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_tag.sh) $(hack/btrfs_installed_tag.sh)" %else