mirror of
https://github.com/containers/podman.git
synced 2025-09-21 03:35:06 +08:00
Merge pull request #26334 from Luap99/sqlite-dynamic-link
dynamically link sqlite
This commit is contained in:
1
Makefile
1
Makefile
@ -61,6 +61,7 @@ REMOTETAGS ?= remote exclude_graphdriver_btrfs containers_image_openpgp
|
|||||||
BUILDTAGS ?= \
|
BUILDTAGS ?= \
|
||||||
$(shell hack/apparmor_tag.sh) \
|
$(shell hack/apparmor_tag.sh) \
|
||||||
$(shell hack/btrfs_installed_tag.sh) \
|
$(shell hack/btrfs_installed_tag.sh) \
|
||||||
|
$(shell hack/sqlite_tag.sh) \
|
||||||
$(shell hack/systemd_tag.sh) \
|
$(shell hack/systemd_tag.sh) \
|
||||||
$(shell hack/libsubid_tag.sh) \
|
$(shell hack/libsubid_tag.sh) \
|
||||||
$(if $(filter linux,$(GOOS)), seccomp,)
|
$(if $(filter linux,$(GOOS)), seccomp,)
|
||||||
|
@ -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 <libdevmapper.h>
|
|
||||||
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
|
|
7
hack/sqlite_tag.sh
Executable file
7
hack/sqlite_tag.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
${CPP:-${CC:-cc} -E} ${CPPFLAGS} - &> /dev/null << EOF
|
||||||
|
#include <sqlite3.h>
|
||||||
|
EOF
|
||||||
|
if test $? -eq 0 ; then
|
||||||
|
echo libsqlite3
|
||||||
|
fi
|
@ -96,6 +96,7 @@ BuildRequires: shadow-utils-subid-devel
|
|||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
BuildRequires: man-db
|
BuildRequires: man-db
|
||||||
|
BuildRequires: sqlite-devel
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd
|
||||||
BuildRequires: systemd-devel
|
BuildRequires: systemd-devel
|
||||||
Requires: catatonit
|
Requires: catatonit
|
||||||
@ -252,7 +253,7 @@ LDFLAGS="$LDFLAGS -X %{ld_libpod}/define.gitCommit=$GIT_COMMIT"
|
|||||||
# build rootlessport first
|
# build rootlessport first
|
||||||
%gobuild -o bin/rootlessport ./cmd/rootlessport
|
%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
|
# libtrust_openssl buildtag switches to using the FIPS-compatible func
|
||||||
# `ecdsa.HashSign`.
|
# `ecdsa.HashSign`.
|
||||||
@ -263,7 +264,7 @@ export BASEBUILDTAGS="$BASEBUILDTAGS libtrust_openssl"
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
# build %%{name}
|
# 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}
|
%gobuild -o bin/%{name} ./cmd/%{name}
|
||||||
|
|
||||||
# build %%{name}-remote
|
# build %%{name}-remote
|
||||||
|
Reference in New Issue
Block a user