mirror of
https://github.com/containers/podman.git
synced 2025-09-13 18:54:02 +08:00
Merge pull request #6353 from lsm5/build-without-varlink
enable building without `varlink` tag
This commit is contained in:
@ -268,7 +268,7 @@ varlink_api_task:
|
|||||||
timeout_in: 10m
|
timeout_in: 10m
|
||||||
|
|
||||||
api_md_script:
|
api_md_script:
|
||||||
- '/usr/local/bin/entrypoint.sh varlink_api_generate |& ${TIMESTAMP}'
|
- '/usr/local/bin/entrypoint.sh BUILDTAGS="varlink" varlink_api_generate |& ${TIMESTAMP}'
|
||||||
- 'cd ${GOSRC} && ./hack/tree_status.sh |& ${TIMESTAMP}'
|
- 'cd ${GOSRC} && ./hack/tree_status.sh |& ${TIMESTAMP}'
|
||||||
|
|
||||||
on_failure:
|
on_failure:
|
||||||
|
36
Makefile
36
Makefile
@ -22,7 +22,7 @@ ETCDIR ?= /etc
|
|||||||
TMPFILESDIR ?= ${PREFIX}/lib/tmpfiles.d
|
TMPFILESDIR ?= ${PREFIX}/lib/tmpfiles.d
|
||||||
SYSTEMDDIR ?= ${PREFIX}/lib/systemd/system
|
SYSTEMDDIR ?= ${PREFIX}/lib/systemd/system
|
||||||
USERSYSTEMDDIR ?= ${PREFIX}/lib/systemd/user
|
USERSYSTEMDDIR ?= ${PREFIX}/lib/systemd/user
|
||||||
REMOTETAGS ?= !ABISupport remote exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper containers_image_openpgp
|
REMOTETAGS ?= !ABISupport remote exclude_graphdriver_btrfs btrfs_noversion exclude_graphdriver_devicemapper 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) \
|
||||||
@ -30,8 +30,7 @@ BUILDTAGS ?= \
|
|||||||
$(shell hack/selinux_tag.sh) \
|
$(shell hack/selinux_tag.sh) \
|
||||||
$(shell hack/systemd_tag.sh) \
|
$(shell hack/systemd_tag.sh) \
|
||||||
exclude_graphdriver_devicemapper \
|
exclude_graphdriver_devicemapper \
|
||||||
seccomp \
|
seccomp
|
||||||
varlink
|
|
||||||
PYTHON ?= $(shell command -v python3 python|head -n1)
|
PYTHON ?= $(shell command -v python3 python|head -n1)
|
||||||
PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
|
PKG_MANAGER ?= $(shell command -v dnf yum|head -n1)
|
||||||
# ~/.local/bin is not in PATH on all systems
|
# ~/.local/bin is not in PATH on all systems
|
||||||
@ -145,6 +144,9 @@ help:
|
|||||||
ifeq ("$(wildcard $(GOPKGDIR))","")
|
ifeq ("$(wildcard $(GOPKGDIR))","")
|
||||||
mkdir -p "$(GOPKGBASEDIR)"
|
mkdir -p "$(GOPKGBASEDIR)"
|
||||||
ln -sfn "$(CURDIR)" "$(GOPKGDIR)"
|
ln -sfn "$(CURDIR)" "$(GOPKGDIR)"
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(findstring varlink,$(BUILDTAGS)))
|
||||||
ln -sfn "$(CURDIR)/vendor/github.com/varlink" "$(FIRST_GOPATH)/src/github.com/varlink"
|
ln -sfn "$(CURDIR)/vendor/github.com/varlink" "$(FIRST_GOPATH)/src/github.com/varlink"
|
||||||
endif
|
endif
|
||||||
touch $@
|
touch $@
|
||||||
@ -333,8 +335,11 @@ ginkgo-remote:
|
|||||||
ginkgo -v $(TESTFLAGS) -tags "$(REMOTETAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.
|
ginkgo -v $(TESTFLAGS) -tags "$(REMOTETAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.
|
||||||
|
|
||||||
.PHONY: endpoint
|
.PHONY: endpoint
|
||||||
|
ifneq (,$(findstring varlink,$(BUILDTAGS)))
|
||||||
endpoint:
|
endpoint:
|
||||||
ginkgo -v $(TESTFLAGS) -tags "$(BUILDTAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -debug test/endpoint/.
|
ginkgo -v $(TESTFLAGS) -tags "$(BUILDTAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -debug test/endpoint/.
|
||||||
|
endpoint:
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: localintegration
|
.PHONY: localintegration
|
||||||
localintegration: varlink_generate test-binaries ginkgo
|
localintegration: varlink_generate test-binaries ginkgo
|
||||||
@ -554,17 +559,25 @@ install.docker: docker-docs
|
|||||||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR}
|
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR}
|
||||||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${TMPFILESDIR}
|
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${TMPFILESDIR}
|
||||||
|
|
||||||
.PHONY: install.systemd
|
.PHONY: install.varlink
|
||||||
install.systemd:
|
ifneq (,$(findstring varlink,$(BUILDTAGS)))
|
||||||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR}
|
install.varlink:
|
||||||
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${SYSTEMDDIR}/io.podman.socket
|
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${SYSTEMDDIR}/io.podman.socket
|
||||||
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${USERSYSTEMDDIR}/io.podman.socket
|
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${USERSYSTEMDDIR}/io.podman.socket
|
||||||
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.service ${DESTDIR}${SYSTEMDDIR}/io.podman.service
|
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.service ${DESTDIR}${SYSTEMDDIR}/io.podman.service
|
||||||
install ${SELINUXOPT} -d ${DESTDIR}${USERSYSTEMDDIR}
|
|
||||||
# User units are ordered differently, we can't make the *system* multi-user.target depend on a user unit.
|
# User units are ordered differently, we can't make the *system* multi-user.target depend on a user unit.
|
||||||
# For user units the default.target that's the default is fine.
|
# For user units the default.target that's the default is fine.
|
||||||
sed -e 's,^WantedBy=.*,WantedBy=default.target,' < contrib/varlink/io.podman.service > ${DESTDIR}${USERSYSTEMDDIR}/io.podman.service
|
sed -e 's,^WantedBy=.*,WantedBy=default.target,' < contrib/varlink/io.podman.service > ${DESTDIR}${USERSYSTEMDDIR}/io.podman.service
|
||||||
install ${SELINUXOPT} -m 644 contrib/varlink/podman.conf ${DESTDIR}${TMPFILESDIR}/podman.conf
|
install ${SELINUXOPT} -m 644 contrib/varlink/podman.conf ${DESTDIR}${TMPFILESDIR}/podman.conf
|
||||||
|
else
|
||||||
|
install.varlink:
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: install.systemd
|
||||||
|
install.systemd: install.varlink
|
||||||
|
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR}
|
||||||
|
install ${SELINUXOPT} -d ${DESTDIR}${USERSYSTEMDDIR}
|
||||||
# Install APIV2 services
|
# Install APIV2 services
|
||||||
install ${SELINUXOPT} -m 644 contrib/systemd/user/podman.socket ${DESTDIR}${USERSYSTEMDDIR}/podman.socket
|
install ${SELINUXOPT} -m 644 contrib/systemd/user/podman.socket ${DESTDIR}${USERSYSTEMDDIR}/podman.socket
|
||||||
install ${SELINUXOPT} -m 644 contrib/systemd/user/podman.service ${DESTDIR}${USERSYSTEMDDIR}/podman.service
|
install ${SELINUXOPT} -m 644 contrib/systemd/user/podman.service ${DESTDIR}${USERSYSTEMDDIR}/podman.service
|
||||||
@ -634,11 +647,20 @@ endef
|
|||||||
$(call go-get,github.com/cpuguy83/go-md2man); \
|
$(call go-get,github.com/cpuguy83/go-md2man); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# $BUILD_TAGS variable is used in hack/golangci-lint.sh
|
||||||
.PHONY: varlink_generate
|
.PHONY: varlink_generate
|
||||||
|
ifneq (or $(findstring varlink,$(BUILDTAGS)),$(findstring varlink,$(BUILD_TAGS)))
|
||||||
varlink_generate: .gopathok pkg/varlink/iopodman.go ## Generate varlink
|
varlink_generate: .gopathok pkg/varlink/iopodman.go ## Generate varlink
|
||||||
|
else
|
||||||
|
varlink_generate:
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: varlink_api_generate
|
.PHONY: varlink_api_generate
|
||||||
|
ifneq (,$(findstring varlink,$(BUILDTAGS)))
|
||||||
varlink_api_generate: .gopathok API.md
|
varlink_api_generate: .gopathok API.md
|
||||||
|
else
|
||||||
|
varlink_api_generate:
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: install.libseccomp.sudo
|
.PHONY: install.libseccomp.sudo
|
||||||
install.libseccomp.sudo:
|
install.libseccomp.sudo:
|
||||||
|
@ -5,12 +5,6 @@
|
|||||||
%bcond_without doc
|
%bcond_without doc
|
||||||
%bcond_without debug
|
%bcond_without debug
|
||||||
|
|
||||||
%if 0%{?fedora} >= 28
|
|
||||||
%bcond_without varlink
|
|
||||||
%else
|
|
||||||
%bcond_with varlink
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%if %{with debug}
|
%if %{with debug}
|
||||||
%global _find_debuginfo_dwz_opts %{nil}
|
%global _find_debuginfo_dwz_opts %{nil}
|
||||||
%global _dwz_low_mem_die_limit 0
|
%global _dwz_low_mem_die_limit 0
|
||||||
@ -387,9 +381,7 @@ popd
|
|||||||
ln -s vendor src
|
ln -s vendor src
|
||||||
export GO111MODULE=off
|
export GO111MODULE=off
|
||||||
export GOPATH=$(pwd)/_build:$(pwd):$(pwd):%{gopath}
|
export GOPATH=$(pwd)/_build:$(pwd):$(pwd):%{gopath}
|
||||||
export BUILDTAGS="varlink selinux seccomp systemd $(%{hackdir}/hack/btrfs_installed_tag.sh) $(%{hackdir}/hack/btrfs_tag.sh) $(%{hackdir}/hack/libdm_tag.sh) exclude_graphdriver_devicemapper"
|
export BUILDTAGS="selinux seccomp systemd $(%{hackdir}/hack/btrfs_installed_tag.sh) $(%{hackdir}/hack/btrfs_tag.sh) $(%{hackdir}/hack/libdm_tag.sh) exclude_graphdriver_devicemapper"
|
||||||
|
|
||||||
GOPATH=$GOPATH go generate ./pkg/varlink/...
|
|
||||||
|
|
||||||
%if %{with doc}
|
%if %{with doc}
|
||||||
BUILDTAGS=$BUILDTAGS make binaries docs
|
BUILDTAGS=$BUILDTAGS make binaries docs
|
||||||
@ -503,15 +495,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
|
|||||||
%{_datadir}/zsh/site-functions/*
|
%{_datadir}/zsh/site-functions/*
|
||||||
%{_libexecdir}/%{name}/conmon
|
%{_libexecdir}/%{name}/conmon
|
||||||
%config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist
|
%config(noreplace) %{_sysconfdir}/cni/net.d/87-%{name}-bridge.conflist
|
||||||
%{_unitdir}/io.podman.service
|
|
||||||
%{_unitdir}/io.podman.socket
|
|
||||||
%{_usr}/lib/systemd/user/io.podman.service
|
|
||||||
%{_usr}/lib/systemd/user/io.podman.socket
|
|
||||||
%{_unitdir}/podman.service
|
%{_unitdir}/podman.service
|
||||||
%{_unitdir}/podman.socket
|
%{_unitdir}/podman.socket
|
||||||
%{_usr}/lib/systemd/user/podman.service
|
%{_usr}/lib/systemd/user/podman.service
|
||||||
%{_usr}/lib/systemd/user/podman.socket
|
%{_usr}/lib/systemd/user/podman.socket
|
||||||
%{_usr}/lib/tmpfiles.d/%{name}.conf
|
|
||||||
|
|
||||||
%if 0%{?with_devel}
|
%if 0%{?with_devel}
|
||||||
%files -n libpod-devel -f devel.file-list
|
%files -n libpod-devel -f devel.file-list
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import "encoding/json"
|
import "encoding/json"
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
// +build varlink
|
||||||
|
|
||||||
package endpoint
|
package endpoint
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
Reference in New Issue
Block a user