Compare commits

..

No commits in common. "f080e2c5b00b8b6c769b5e1d0c20cc6475c792b1" and "074107ed066790c8d642d950f664f3566d26e176" have entirely different histories.

6 changed files with 106 additions and 70 deletions

View File

@ -0,0 +1,58 @@
From d4da0320234814ec17a817d049440cfd17833ecf Mon Sep 17 00:00:00 2001
From: duyiwei <duyiwei@kylinos.cn>
Date: Thu, 15 Sep 2022 15:32:58 +0800
Subject: [PATCH] fix-wrong-path-of-os-release
Signed-off-by: duyiwei <duyiwei@kylinos.cn>
---
profile.d/toolbox.sh | 2 +-
toolbox | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/profile.d/toolbox.sh b/profile.d/toolbox.sh
index d43f6c7..5489cda 100644
--- a/profile.d/toolbox.sh
+++ b/profile.d/toolbox.sh
@@ -8,7 +8,7 @@ toolbox_welcome_stub="$toolbox_config/toolbox-welcome-shown"
# shellcheck disable=2046
# shellcheck disable=SC1091
eval $(
- . /usr/lib/os-release
+ . /etc/os-release
echo ID="$ID"
echo VARIANT_ID="$VARIANT_ID"
diff --git a/toolbox b/toolbox
index c6ae396..2848c19 100755
--- a/toolbox
+++ b/toolbox
@@ -531,7 +531,7 @@ get_group_for_sudo()
get_host_id()
(
# shellcheck disable=SC1091
- . /usr/lib/os-release
+ . /etc/os-release
echo "$ID"
)
@@ -539,7 +539,7 @@ get_host_id()
get_host_variant_id()
(
# shellcheck disable=SC1091
- . /usr/lib/os-release
+ . /etc/os-release
echo "$VARIANT_ID"
)
@@ -547,7 +547,7 @@ get_host_variant_id()
get_host_version_id()
(
# shellcheck disable=SC1091
- . /usr/lib/os-release
+ . /etc/os-release
echo "$VERSION_ID"
)
--
2.33.0

View File

@ -1,25 +0,0 @@
From 91352497429d404e3c4f4af45cd0b1985d82a923 Mon Sep 17 00:00:00 2001
From: Pengda Dou <doupengda@loongson.cn>
Date: Tue, 23 Apr 2024 15:25:25 +0800
Subject: [PATCH] toolbox-0.0.99.5 add support for loongarch64
---
src/meson.build | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/meson.build b/src/meson.build
index 098c692..f7c9b95 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -52,6 +52,8 @@ elif cpu_family == 'x86_64' and endian == 'little'
dynamic_linker = '/lib64/ld-linux-x86-64.so.2'
elif cpu_family == 'riscv64' and endian == 'little'
dynamic_linker = '/lib/ld-linux-riscv64-lp64d.so.1'
+elif cpu_family == 'loongarch64' and endian == 'little'
+ dynamic_linker = '/lib64/ld-linux-loongarch-lp64d.so.1'
else
host_machine_description = cpu_family + ' (' + endian + ' endian)'
error('Please specify dynamic linker for:', host_machine_description)
--
2.38.1

37
README.md Normal file
View File

@ -0,0 +1,37 @@
# toolbox
#### 介绍
Tool for containerized command line environments on Linux
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

BIN
toolbox-0.0.99.3.tar.xz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,43 +1,33 @@
%define debug_package %{nil}
Name: toolbox Name: toolbox
Version: 0.0.99.5 Version: 0.0.99
%global goipath github.com/containers/%{name} %global goipath github.com/containers/%{name}
Release: 4 Release: 4
Summary: Tool for interactive command line environments on Linux Summary: Unprivileged development environment
License: Apache-2.0 License: Apache-2.0
URL: https://github.com/containers/toolbox URL: https://github.com/containers/toolbox
Source0: toolbox-0.0.99.5-vendored.tar.xz Source0: toolbox-0.0.99.3.tar.xz
Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz Source1: https://github.com/cpuguy83/go-md2man/archive/v1.0.10.tar.gz
Patch0: 0001-toolbox-0.0.99.5-add-support-for-loongarch64.patch Patch0: 0001-fix-wrong-path-of-os-release.patch
BuildRequires: golang >= 1.13 meson
BuildRequires: golang >= 1.20 meson >= 0.58.0
BuildRequires: pkgconfig(bash-completion) systemd BuildRequires: pkgconfig(bash-completion) systemd
BuildRequires: gcc shadow chrpath
Requires: podman >= 1.4.0
Recommends: skopeo
Requires: podman >= 1.4.0 containers-common
%description %description
Toolbox is a tool for Linux operating systems, which allows the use of Toolbox is a tool for Linux operating systems, which allows the use of
containerized command line environments. It is built on top of Podman and containerized command line environments. It is built on top of Podman and
other standard container technologies from OCI. other standard container technologies from OCI.
%package tests %package tests
Summary: Tests for toolbox. Summary: Tests for toolbox.
Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: coreutils
Requires: grep
Requires: bats >= 1.7.0
# for htpasswd
Requires: httpd-tools
Requires: openssl
Requires: skopeo
%description tests %description tests
The toolbox-tests package contains system tests for toolbox. The toolbox-tests package contains system tests for toolbox.
@ -45,7 +35,7 @@ The toolbox-tests package contains system tests for toolbox.
%prep %prep
%setup -q %setup -q
%patch0 -p1 %patch0 -p 1
GOBUILDDIR="$(pwd)/_build" GOBUILDDIR="$(pwd)/_build"
GOSOURCEDIR="$(pwd)" GOSOURCEDIR="$(pwd)"
@ -76,30 +66,21 @@ export CGO_CFLAGS="%{optflags} -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_LARGEFILE64_
ln -s src/cmd cmd ln -s src/cmd cmd
ln -s src/pkg pkg ln -s src/pkg pkg
ln -s src/vendor vendor ln -s src/vendor vendor
%meson \ %meson --buildtype=plain -Dprofile_dir=%{_sysconfdir}/profile.d
-Dprofile_dir=%{_sysconfdir}/profile.d \
-Dtmpfiles_dir=%{_tmpfilesdir} \
-Dzsh_completions_dir=%{_datadir}/zsh/site-functions
%meson_build %meson_build
%install %install
%meson_install %meson_install
if [ -f %{buildroot}/usr/bin/toolbox ]; then
chrpath --delete %{buildroot}/usr/bin/toolbox
fi
%files %files
%doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md %doc CODE-OF-CONDUCT.md NEWS README.md SECURITY.md
%license COPYING %license COPYING
%{_bindir}/%{name} %{_bindir}/%{name}
%{_datadir}/bash-completion %{_datadir}/bash-completion
%{_datadir}/zsh
%{_mandir}/man1/%{name}.1* %{_mandir}/man1/%{name}.1*
%{_mandir}/man1/%{name}-*.1* %{_mandir}/man1/%{name}-*.1*
%{_mandir}/man5/%{name}.conf.5*
%config(noreplace) %{_sysconfdir}/containers/%{name}.conf
%{_sysconfdir}/profile.d/%{name}.sh %{_sysconfdir}/profile.d/%{name}.sh
%{_tmpfilesdir}/%{name}.conf %{_tmpfilesdir}/%{name}.conf
@ -107,21 +88,6 @@ fi
%{_datadir}/%{name} %{_datadir}/%{name}
%changelog %changelog
* Tue Apr 23 2024 Pengda Dou <doupengda@loongson.cn> - 0.0.99.5-4
- add support for loongarch64
* Wed Apr 10 2024 shafeipaozi <sunbo.oerv@isrc.iscas.ac.cn> - 0.0.99.5-3
- fix riscv spec
* Tue Apr 2 2024 shafeipaozi <sunbo.oerv@isrc.iscas.ac.cn> - 0.0.99.5-2
- rebase patch and fix
* Thu Jan 04 2024 duyiwei <duyiwei@kylinos.cn> - 0.0.99.5-1
- upgrade version to 0.0.99.5
* Fri Jul 14 2023 zhangxiang <zhangxiang@iscas.ac.cn> - 0.0.99-5
- add riscv64 support
* Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.0.99-4 * Fri Dec 09 2022 liukuo <liukuo@kylinos.cn> - 0.0.99-4
- License compliance rectification - License compliance rectification