跳到主要内容

Claude Cage · 面向 Claude 的隔离开发环境,支持桌面工作台、多账号、远程部署与移动端连接。上游 Lee-xeo/Claude-Cage 完整源码镜像,非灵栈原创;主许可 MIT,第三方组件遵循各自许可。来源:https://github.com/Lee-xeo/Claude-Cage 。手动同步,不附带 Release 安装包。

浏览文件

gvisor-tap-vsock.spec

127 行 · 3.4 KB历史下载
1%global with_debug 1
2
3%if 0%{?with_debug}
4%global _find_debuginfo_dwz_opts %{nil}
5%global _dwz_low_mem_die_limit 0
6%else
7%global debug_package %{nil}
8%endif
9
10%global gomodulesmode GO111MODULE=on
11
12%global _gvisor_installdir %{_libexecdir}/podman
13
14%global desc_gvforwarder Forward traffic from a tap interface over vsock
15
16Name: gvisor-tap-vsock
17%if %{defined copr_username}
18Epoch: 103
19%else
20Epoch: 6
21%endif
22# DO NOT TOUCH the Version string!
23# The TRUE source of this specfile is:
24# https://github.com/containers/podman/blob/main/rpm/podman.spec
25# If that's what you're reading, Version must be 0, and will be updated by Packit for
26# copr and koji builds.
27# If you're reading this on dist-git, the version is automatically filled in by Packit.
28Version: 0
29License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT
30%if %{defined autorelease}
31Release: %autorelease
32%else
33Release: 1
34%endif
35%if %{defined golang_arches_future}
36ExclusiveArch: %{golang_arches_future}
37%else
38ExclusiveArch: aarch64 ppc64le s390x x86_64
39%endif
40Summary: Go replacement for libslirp and VPNKit
41URL: https://github.com/containers/%{name}
42# All SourceN files fetched from upstream
43Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
44BuildRequires: gcc
45BuildRequires: glib2-devel
46BuildRequires: glibc-devel
47BuildRequires: glibc-static
48BuildRequires: golang
49BuildRequires: git-core
50%if %{defined rhel} && 0%{?rhel} == 8
51BuildRequires: go-srpm-macros
52%else
53BuildRequires: go-rpm-macros
54%endif
55BuildRequires: make
56%if %{defined copr_username}
57Obsoletes: podman-gvproxy < 102:4.7.0-1
58%else
59Obsoletes: podman-gvproxy < 5:4.7.0-1
60%endif
61Provides: podman-gvproxy = %{epoch}:%{version}-%{release}
62Requires: %{name}-gvforwarder = %{epoch}:%{version}-%{release}
63
64%description
65A replacement for libslirp and VPNKit, written in pure Go.
66It is based on the network stack of gVisor. Compared to libslirp,
67gvisor-tap-vsock brings a configurable DNS server and
68dynamic port forwarding.
69
70%package gvforwarder
71Summary: %{desc_gvforwarder}
72Provides: gvforwarder = %{epoch}:%{version}-%{release}
73Obsoletes: %{name} < 6:0.7.0-6
74Recommends: %{name} = %{epoch}:%{version}-%{release}
75
76%description gvforwarder
77%{desc_gvforwarder}
78
79%prep
80%autosetup -Sgit -n %{name}-%{version}
81
82%build
83%set_build_flags
84export CGO_CFLAGS=$CFLAGS
85
86# These extra flags present in $CFLAGS have been skipped for now as they break the build
87CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-flto=auto//g')
88CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-Wp,D_GLIBCXX_ASSERTIONS//g')
89CGO_CFLAGS=$(echo $CGO_CFLAGS | sed 's/-specs=\/usr\/lib\/rpm\/redhat\/redhat-annobin-cc1//g')
90
91%ifarch x86_64
92export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"
93%endif
94
95# reset LDFLAGS for plugins and gvisor binaries
96LDFLAGS=''
97
98# build gvisor-tap-vsock binaries
99%gobuild -o bin/gvproxy ./cmd/gvproxy
100%gobuild -o bin/gvforwarder ./cmd/vm
101
102%install
103# install gvproxy
104install -dp %{buildroot}%{_gvisor_installdir}
105install -p -m0755 bin/gvproxy %{buildroot}%{_gvisor_installdir}
106install -p -m0755 bin/gvforwarder %{buildroot}%{_gvisor_installdir}
107
108#define license tag if not already defined
109%{!?_licensedir:%global license %doc}
110
111%files
112%license LICENSE
113%doc README.md
114%dir %{_gvisor_installdir}
115%{_gvisor_installdir}/gvproxy
116
117%files gvforwarder
118%dir %{_gvisor_installdir}
119%{_gvisor_installdir}/gvforwarder
120
121%changelog
122%if %{defined autochangelog}
123%autochangelog
124%else
125* Mon Jul 24 2023 RH Container Bot <[email protected]>
126- Placeholder changelog for envs that are not autochangelog-ready
127%endif