Compare commits

..

No commits in common. "5a360d648ea665c1992b8b825c9c470a9dcbfba4" and "3cfd99c4f663ff3d9aa860d0bca061c06083d79e" have entirely different histories.

7 changed files with 31 additions and 62 deletions

View File

@ -1,50 +1,30 @@
# slirp4netns # slirp4netns
#### 介绍 #### 介绍
slirp4netns provides user-mode networking ("slirp") for unprivileged network namespaces. User-mode networking for unprivileged network namespaces.
#### 软件架构
软件架构说明
#### 安装教程 #### 安装教程
Install slirp4netns rpm package: 1. xxxx
2. xxxx
yum install slirp4netns 3. xxxx
#### 使用说明 #### 使用说明
**Terminal 1**: Create user/network/mount namespaces 1. xxxx
2. xxxx
```console 3. xxxx
(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
...
```
#### 参与贡献 #### 参与贡献
master分支使用最新的上游版本如果检测到上游有最新版本发布先形成issue后再提交对应PR更新流程如下。 1. Fork 本仓库
1. 提交issue 2. 新建 Feat_xxx 分支
2. Fork 本仓库 3. 提交代码
3. 新建 Feat_xxx 分支 4. 新建 Pull Request
4. 提交代码
5. 新建 Pull Request
#### 特技 #### 特技

BIN
slirp4netns-6dc0186.tar.gz Normal file

Binary file not shown.

View File

@ -1,14 +1,19 @@
%global built_tag v1.2.3 %global git0 https://github.com/rootless-containers/%{name}
%global built_tag_strip %(b=%{built_tag}; echo ${b:1}) %global commit0 6dc0186e020232ae1a6fcc1f7afbc3ea02fd3876
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
# Used for comparing with latest upstream tag
# to decide whether to autobuild (non-rawhide only)
%define built_tag v1.1.9
Name: slirp4netns Name: slirp4netns
Version: 1.2.3 Version: 1.1.9
Release: 1 Release: 1
Summary: slirp for network namespaces Summary: slirp for network namespaces
License: GPL-2.0-only License: GPLv2
URL: https://github.com/rootless-containers/slirp4netns URL: https://github.com/rootless-containers/slirp4netns
Source0: %{url}/archive/%{built_tag}.tar.gz Source0: %{git0}/archive/%{commit0}/%{name}-%{shortcommit0}.tar.gz
Source1: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v2.0.3.tar.gz Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz
BuildRequires: autoconf automake gcc glib2-devel BuildRequires: autoconf automake gcc glib2-devel
BuildRequires: git libcap-devel golang BuildRequires: git libcap-devel golang
BuildRequires: libseccomp-devel libslirp-devel make BuildRequires: libseccomp-devel libslirp-devel make
@ -28,7 +33,7 @@ building other packages which use import path with
%{import_path} prefix. %{import_path} prefix.
%prep %prep
%autosetup -Sgit -n %{name}-%{built_tag_strip} %autosetup -Sgit -n %{name}-%{commit0}
tar -xf %SOURCE1 tar -xf %SOURCE1
%build %build
@ -59,17 +64,5 @@ make DESTDIR=%{buildroot} install install-man
%{_mandir}/man1/%{name}.1.gz %{_mandir}/man1/%{name}.1.gz
%changelog %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 * Wed Jan 26 2022 duyiwei <duyiwei@kylinos.cn> - 1.1.9-1
- Package init - Package init

View File

@ -1,4 +0,0 @@
version_control: github
src_repo: rootless-containers/slirp4netns
tag_prefix: "^v"
separator: "."

BIN
v1.0.10.tar.gz Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.