diff --git a/Makefile b/Makefile index 4039439cd0..2eb099020f 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ REMOTETAGS ?= remote exclude_graphdriver_btrfs containers_image_openpgp BUILDTAGS ?= \ $(shell hack/apparmor_tag.sh) \ $(shell hack/btrfs_installed_tag.sh) \ + $(shell hack/sqlite_tag.sh) \ $(shell hack/systemd_tag.sh) \ $(shell hack/libsubid_tag.sh) \ $(if $(filter linux,$(GOOS)), seccomp,) diff --git a/hack/libdm_tag.sh b/hack/libdm_tag.sh deleted file mode 100755 index 815b5d914e..0000000000 --- a/hack/libdm_tag.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash -tmpdir="$PWD/tmp.$RANDOM" -mkdir -p "$tmpdir" -trap 'rm -fr "$tmpdir"' EXIT -${CC:-cc} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -o "$tmpdir"/libdm_tag -x c - -ldevmapper > /dev/null 2> /dev/null << EOF -#include -int main() { - struct dm_task *task; - dm_task_deferred_remove(task); - return 0; -} -EOF -if test $? -ne 0 ; then - echo libdm_no_deferred_remove -fi diff --git a/hack/sqlite_tag.sh b/hack/sqlite_tag.sh new file mode 100755 index 0000000000..0248355cf3 --- /dev/null +++ b/hack/sqlite_tag.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +${CPP:-${CC:-cc} -E} ${CPPFLAGS} - &> /dev/null << EOF +#include +EOF +if test $? -eq 0 ; then + echo libsqlite3 +fi diff --git a/rpm/podman.spec b/rpm/podman.spec index a717907c21..fd89e342f4 100644 --- a/rpm/podman.spec +++ b/rpm/podman.spec @@ -96,6 +96,7 @@ BuildRequires: shadow-utils-subid-devel BuildRequires: pkgconfig BuildRequires: make BuildRequires: man-db +BuildRequires: sqlite-devel BuildRequires: systemd BuildRequires: systemd-devel Requires: catatonit @@ -252,7 +253,7 @@ LDFLAGS="$LDFLAGS -X %{ld_libpod}/define.gitCommit=$GIT_COMMIT" # build rootlessport first %gobuild -o bin/rootlessport ./cmd/rootlessport -export BASEBUILDTAGS="seccomp $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh)" +export BASEBUILDTAGS="seccomp $(hack/systemd_tag.sh) $(hack/libsubid_tag.sh) libsqlite3" # libtrust_openssl buildtag switches to using the FIPS-compatible func # `ecdsa.HashSign`. @@ -263,7 +264,7 @@ export BASEBUILDTAGS="$BASEBUILDTAGS libtrust_openssl" %endif # build %%{name} -export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/libdm_tag.sh)" +export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh)" %gobuild -o bin/%{name} ./cmd/%{name} # build %%{name}-remote