mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
[CI:BUILD] RPM: separate out gvproxy for copr and rawhide
gvproxy doesn't currently build on rawhide because of go1.21. It can be included as a standalone package on copr. It is currently open for review on bugzilla until which fedora releases can't include it. Official rawhide should be able to fetch the last active build of gvproxy, the min version requirement has been removed to allow it. Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2224434 [NO NEW TESTS NEEDED] Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
@ -25,6 +25,16 @@
|
|||||||
%define build_with_btrfs 1
|
%define build_with_btrfs 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# gvproxy doesn't currently build on rawhide because of go1.21.
|
||||||
|
# It can be included as a standalone package on copr.
|
||||||
|
# It is currently open for review on bugzilla until which fedora releases can't
|
||||||
|
# include it. Official rawhide should be able to fetch the last active build of
|
||||||
|
# gvproxy, the min version requirement has been removed to allow it.
|
||||||
|
# Ref: https://bugzilla.redhat.com/show_bug.cgi?id=2224434
|
||||||
|
%if !%{defined copr_username} && 0%{?fedora} <= 38
|
||||||
|
%define gvproxy_subpackage 1
|
||||||
|
%endif
|
||||||
|
|
||||||
%global container_base_path github.com/containers
|
%global container_base_path github.com/containers
|
||||||
%global container_base_url https://%{container_base_path}
|
%global container_base_url https://%{container_base_path}
|
||||||
|
|
||||||
@ -41,10 +51,12 @@
|
|||||||
%global commit_plugins 18822f9a4fb35d1349eb256f4cd2bfd372474d84
|
%global commit_plugins 18822f9a4fb35d1349eb256f4cd2bfd372474d84
|
||||||
%global import_path_plugins %{container_base_path}/%{repo_plugins}
|
%global import_path_plugins %{container_base_path}/%{repo_plugins}
|
||||||
|
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
# gvproxy
|
# gvproxy
|
||||||
%global repo_gvproxy gvisor-tap-vsock
|
%global repo_gvproxy gvisor-tap-vsock
|
||||||
%global git_gvproxy %{container_base_url}/%{repo_gvproxy}
|
%global git_gvproxy %{container_base_url}/%{repo_gvproxy}
|
||||||
%global commit_gvproxy 407efb5dcdb0f4445935f7360535800b60447544
|
%global commit_gvproxy 407efb5dcdb0f4445935f7360535800b60447544
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: podman
|
Name: podman
|
||||||
%if %{defined copr_username}
|
%if %{defined copr_username}
|
||||||
@ -71,7 +83,9 @@ URL: https://%{name}.io/
|
|||||||
# All SourceN files fetched from upstream
|
# All SourceN files fetched from upstream
|
||||||
Source0: %{git0}/archive/v%{version}.tar.gz
|
Source0: %{git0}/archive/v%{version}.tar.gz
|
||||||
Source1: %{git_plugins}/archive/%{commit_plugins}/%{repo_plugins}-%{commit_plugins}.tar.gz
|
Source1: %{git_plugins}/archive/%{commit_plugins}/%{repo_plugins}-%{commit_plugins}.tar.gz
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
Source2: %{git_gvproxy}/archive/%{commit_gvproxy}/%{repo_gvproxy}-%{commit_gvproxy}.tar.gz
|
Source2: %{git_gvproxy}/archive/%{commit_gvproxy}/%{repo_gvproxy}-%{commit_gvproxy}.tar.gz
|
||||||
|
%endif
|
||||||
Provides: %{name}-manpages = %{epoch}:%{version}-%{release}
|
Provides: %{name}-manpages = %{epoch}:%{version}-%{release}
|
||||||
BuildRequires: %{_bindir}/envsubst
|
BuildRequires: %{_bindir}/envsubst
|
||||||
BuildRequires: %{_bindir}/go-md2man
|
BuildRequires: %{_bindir}/go-md2man
|
||||||
@ -104,7 +118,11 @@ BuildRequires: python3
|
|||||||
Requires: catatonit
|
Requires: catatonit
|
||||||
Requires: conmon >= 2:2.1.7-2
|
Requires: conmon >= 2:2.1.7-2
|
||||||
Requires: containers-common-extra
|
Requires: containers-common-extra
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release}
|
Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release}
|
||||||
|
%else
|
||||||
|
Recommends: %{name}-gvproxy
|
||||||
|
%endif
|
||||||
Provides: %{name}-quadlet
|
Provides: %{name}-quadlet
|
||||||
Obsoletes: %{name}-quadlet <= 5:4.4.0-1
|
Obsoletes: %{name}-quadlet <= 5:4.4.0-1
|
||||||
Provides: %{name}-quadlet = %{epoch}:%{version}-%{release}
|
Provides: %{name}-quadlet = %{epoch}:%{version}-%{release}
|
||||||
@ -174,7 +192,11 @@ connections as well.
|
|||||||
%package plugins
|
%package plugins
|
||||||
Summary: Plugins for %{name}
|
Summary: Plugins for %{name}
|
||||||
Requires: dnsmasq
|
Requires: dnsmasq
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release}
|
Recommends: %{name}-gvproxy = %{epoch}:%{version}-%{release}
|
||||||
|
%else
|
||||||
|
Recommends: %{name}-gvproxy
|
||||||
|
%endif
|
||||||
|
|
||||||
%description plugins
|
%description plugins
|
||||||
This plugin sets up the use of dnsmasq on a given CNI network so
|
This plugin sets up the use of dnsmasq on a given CNI network so
|
||||||
@ -184,6 +206,7 @@ that dnsmasq will read in. Similarly, when a pod
|
|||||||
is removed from the network, it will remove the entry from the hosts
|
is removed from the network, it will remove the entry from the hosts
|
||||||
file. Each CNI network will have its own dnsmasq instance.
|
file. Each CNI network will have its own dnsmasq instance.
|
||||||
|
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
%package gvproxy
|
%package gvproxy
|
||||||
Summary: Go replacement for libslirp and VPNKit
|
Summary: Go replacement for libslirp and VPNKit
|
||||||
|
|
||||||
@ -192,6 +215,7 @@ A replacement for libslirp and VPNKit, written in pure Go.
|
|||||||
It is based on the network stack of gVisor. Compared to libslirp,
|
It is based on the network stack of gVisor. Compared to libslirp,
|
||||||
gvisor-tap-vsock brings a configurable DNS server and
|
gvisor-tap-vsock brings a configurable DNS server and
|
||||||
dynamic port forwarding.
|
dynamic port forwarding.
|
||||||
|
%endif
|
||||||
|
|
||||||
%package -n %{name}sh
|
%package -n %{name}sh
|
||||||
Summary: Confined login and user shell using %{name}
|
Summary: Confined login and user shell using %{name}
|
||||||
@ -213,8 +237,10 @@ sed -i 's;@@PODMAN@@\;$(BINDIR);@@PODMAN@@\;%{_bindir};' Makefile
|
|||||||
# untar dnsname
|
# untar dnsname
|
||||||
tar zxf %{SOURCE1}
|
tar zxf %{SOURCE1}
|
||||||
|
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
# untar %%{name}-gvproxy
|
# untar %%{name}-gvproxy
|
||||||
tar zxf %{SOURCE2}
|
tar zxf %{SOURCE2}
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%set_build_flags
|
%set_build_flags
|
||||||
@ -254,11 +280,13 @@ export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag
|
|||||||
# reset LDFLAGS for plugins and gvisor binaries
|
# reset LDFLAGS for plugins and gvisor binaries
|
||||||
LDFLAGS=''
|
LDFLAGS=''
|
||||||
|
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
# build gvisor-tap-vsock binaries
|
# build gvisor-tap-vsock binaries
|
||||||
cd %{repo_gvproxy}-%{commit_gvproxy}
|
cd %{repo_gvproxy}-%{commit_gvproxy}
|
||||||
%gobuild -o bin/gvproxy ./cmd/gvproxy
|
%gobuild -o bin/gvproxy ./cmd/gvproxy
|
||||||
%gobuild -o bin/gvforwarder ./cmd/vm
|
%gobuild -o bin/gvforwarder ./cmd/vm
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
%{__make} docs docker-docs
|
%{__make} docs docker-docs
|
||||||
|
|
||||||
@ -296,12 +324,14 @@ cd %{repo_plugins}-%{commit_plugins}
|
|||||||
%{__make} PREFIX=%{_prefix} DESTDIR=%{buildroot} install
|
%{__make} PREFIX=%{_prefix} DESTDIR=%{buildroot} install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
# install gvproxy
|
# install gvproxy
|
||||||
cd %{repo_gvproxy}-%{commit_gvproxy}
|
cd %{repo_gvproxy}-%{commit_gvproxy}
|
||||||
install -dp %{buildroot}%{_libexecdir}/%{name}
|
install -dp %{buildroot}%{_libexecdir}/%{name}
|
||||||
install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/%{name}
|
install -p -m0755 bin/gvproxy %{buildroot}%{_libexecdir}/%{name}
|
||||||
install -p -m0755 bin/gvforwarder %{buildroot}%{_libexecdir}/%{name}
|
install -p -m0755 bin/gvforwarder %{buildroot}%{_libexecdir}/%{name}
|
||||||
cd ..
|
cd ..
|
||||||
|
%endif
|
||||||
|
|
||||||
# do not include docker and podman-remote man pages in main package
|
# do not include docker and podman-remote man pages in main package
|
||||||
for file in `find %{buildroot}%{_mandir}/man[15] -type f | sed "s,%{buildroot},," | grep -v -e remote -e docker`; do
|
for file in `find %{buildroot}%{_mandir}/man[15] -type f | sed "s,%{buildroot},," | grep -v -e remote -e docker`; do
|
||||||
@ -364,12 +394,14 @@ cp -pav test/system %{buildroot}/%{_datadir}/%{name}/test/
|
|||||||
%dir %{_libexecdir}/cni
|
%dir %{_libexecdir}/cni
|
||||||
%{_libexecdir}/cni/dnsname
|
%{_libexecdir}/cni/dnsname
|
||||||
|
|
||||||
|
%if %{defined gvproxy_subpackage}
|
||||||
%files gvproxy
|
%files gvproxy
|
||||||
%license %{repo_gvproxy}-%{commit_gvproxy}/LICENSE
|
%license %{repo_gvproxy}-%{commit_gvproxy}/LICENSE
|
||||||
%doc %{repo_gvproxy}-%{commit_gvproxy}/README.md
|
%doc %{repo_gvproxy}-%{commit_gvproxy}/README.md
|
||||||
%dir %{_libexecdir}/%{name}
|
%dir %{_libexecdir}/%{name}
|
||||||
%{_libexecdir}/%{name}/gvproxy
|
%{_libexecdir}/%{name}/gvproxy
|
||||||
%{_libexecdir}/%{name}/gvforwarder
|
%{_libexecdir}/%{name}/gvforwarder
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n %{name}sh
|
%files -n %{name}sh
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
|
Reference in New Issue
Block a user