Compare commits
No commits in common. "5a360d648ea665c1992b8b825c9c470a9dcbfba4" and "3cfd99c4f663ff3d9aa860d0bca061c06083d79e" have entirely different histories.
5a360d648e
...
3cfd99c4f6
48
README.md
48
README.md
@ -1,50 +1,30 @@
|
||||
# slirp4netns
|
||||
|
||||
#### 介绍
|
||||
slirp4netns provides user-mode networking ("slirp") for unprivileged network namespaces.
|
||||
User-mode networking for unprivileged network namespaces.
|
||||
|
||||
#### 软件架构
|
||||
软件架构说明
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
Install slirp4netns rpm package:
|
||||
|
||||
yum install slirp4netns
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 使用说明
|
||||
|
||||
**Terminal 1**: Create user/network/mount namespaces
|
||||
|
||||
```console
|
||||
(host)$ unshare --user --map-root-user --net --mount
|
||||
(namespace)$ echo $$ > /tmp/pid
|
||||
```
|
||||
|
||||
In this documentation, we use `(host)$` as the prompt of the host shell, `(namespace)$` as the prompt of the shell running in the namespaces.
|
||||
|
||||
If `unshare` fails, try the following commands (known to be needed on Debian, Arch, and old CentOS 7.X):
|
||||
|
||||
```console
|
||||
(host)$ sudo sh -c 'echo "user.max_user_namespaces=28633" >> /etc/sysctl.d/userns.conf'
|
||||
(host)$ [ -f /proc/sys/kernel/unprivileged_userns_clone ] && sudo sh -c 'echo "kernel.unprivileged_userns_clone=1" >> /etc/sysctl.d/userns.conf'
|
||||
(host)$ sudo sysctl --system
|
||||
```
|
||||
|
||||
**Terminal 2**: Start slirp4netns
|
||||
|
||||
```console
|
||||
(host)$ slirp4netns --configure --mtu=65520 --disable-host-loopback $(cat /tmp/pid) tap0
|
||||
starting slirp, MTU=65520
|
||||
...
|
||||
```
|
||||
1. xxxx
|
||||
2. xxxx
|
||||
3. xxxx
|
||||
|
||||
#### 参与贡献
|
||||
|
||||
master分支使用最新的上游版本,如果检测到上游有最新版本发布,先形成issue后再提交对应PR更新,流程如下。
|
||||
1. 提交issue
|
||||
2. Fork 本仓库
|
||||
3. 新建 Feat_xxx 分支
|
||||
4. 提交代码
|
||||
5. 新建 Pull Request
|
||||
1. Fork 本仓库
|
||||
2. 新建 Feat_xxx 分支
|
||||
3. 提交代码
|
||||
4. 新建 Pull Request
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
BIN
slirp4netns-6dc0186.tar.gz
Normal file
BIN
slirp4netns-6dc0186.tar.gz
Normal file
Binary file not shown.
@ -1,14 +1,19 @@
|
||||
%global built_tag v1.2.3
|
||||
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
||||
%global git0 https://github.com/rootless-containers/%{name}
|
||||
%global commit0 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
|
||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||
|
||||
Name: slirp4netns
|
||||
Version: 1.2.3
|
||||
Release: 1
|
||||
Summary: slirp for network namespaces
|
||||
License: GPL-2.0-only
|
||||
URL: https://github.com/rootless-containers/slirp4netns
|
||||
Source0: %{url}/archive/%{built_tag}.tar.gz
|
||||
Source1: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v2.0.3.tar.gz
|
||||
# Used for comparing with latest upstream tag
|
||||
# to decide whether to autobuild (non-rawhide only)
|
||||
%define built_tag v1.1.9
|
||||
|
||||
Name: slirp4netns
|
||||
Version: 1.1.9
|
||||
Release: 1
|
||||
Summary: slirp for network namespaces
|
||||
License: GPLv2
|
||||
URL: https://github.com/rootless-containers/slirp4netns
|
||||
Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
|
||||
Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz
|
||||
BuildRequires: autoconf automake gcc glib2-devel
|
||||
BuildRequires: git libcap-devel golang
|
||||
BuildRequires: libseccomp-devel libslirp-devel make
|
||||
@ -28,7 +33,7 @@ building other packages which use import path with
|
||||
%{import_path} prefix.
|
||||
|
||||
%prep
|
||||
%autosetup -Sgit -n %{name}-%{built_tag_strip}
|
||||
%autosetup -Sgit -n %{name}-%{commit0}
|
||||
tar -xf %SOURCE1
|
||||
|
||||
%build
|
||||
@ -59,17 +64,5 @@ make DESTDIR=%{buildroot} install install-man
|
||||
%{_mandir}/man1/%{name}.1.gz
|
||||
|
||||
%changelog
|
||||
* Fri Apr 12 2024 duyiwei <duyiwei@kylinos.cn> - 1.2.3-1
|
||||
- upgrade version to 1.2.3
|
||||
|
||||
* Wed Jan 03 2024 lijian <lijian2@kylinos.cn> - 1.2.2-1
|
||||
- upgrade to 1.2.2
|
||||
|
||||
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 1.2.0-2
|
||||
- License compliance rectification
|
||||
|
||||
* Tue Jun 07 2022 duyiwei <duyiwei@kylinos.cn> - 1.2.0-1
|
||||
- upgrade to v1.2.0
|
||||
|
||||
* Wed Jan 26 2022 duyiwei <duyiwei@kylinos.cn> - 1.1.9-1
|
||||
- Package init
|
||||
@ -1,4 +0,0 @@
|
||||
version_control: github
|
||||
src_repo: rootless-containers/slirp4netns
|
||||
tag_prefix: "^v"
|
||||
separator: "."
|
||||
BIN
v1.0.10.tar.gz
Normal file
BIN
v1.0.10.tar.gz
Normal file
Binary file not shown.
BIN
v1.2.3.tar.gz
BIN
v1.2.3.tar.gz
Binary file not shown.
BIN
v2.0.3.tar.gz
BIN
v2.0.3.tar.gz
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user