2019-09-30 10:53:51 -04:00
|
|
|
#Basic Information
|
2020-01-21 17:00:00 +08:00
|
|
|
Name: syscontainer-tools
|
2020-08-18 16:04:18 +08:00
|
|
|
Version: 0.9
|
2024-09-20 13:36:18 +08:00
|
|
|
Release: 67
|
2020-01-21 17:00:00 +08:00
|
|
|
Summary: syscontainer tools for IT, work with iSulad
|
2020-04-27 10:42:10 +08:00
|
|
|
License: Mulan PSL v2
|
2020-07-03 18:51:04 +08:00
|
|
|
URL: https://gitee.com/openeuler/syscontainer-tools
|
2020-09-07 15:31:01 +08:00
|
|
|
Source0: https://gitee.com/openeuler/syscontainer-tools/repository/archive/v%{version}.tar.gz
|
2019-09-30 10:53:51 -04:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-root
|
|
|
|
|
|
2021-02-08 20:36:08 +08:00
|
|
|
Patch1: 0001-fix-failed-build-with-golang-1.15.5.patch
|
|
|
|
|
Patch2: 0002-syscontainer-tools-build-security-option.patch
|
2021-09-02 20:59:24 +08:00
|
|
|
Patch3: 0003-enable-external-linkmode-for-cgo-build.patch
|
2022-10-17 17:11:39 +08:00
|
|
|
Patch4: 0004-add-dt-test.patch
|
2023-06-30 11:09:55 +08:00
|
|
|
Patch5: 0005-add-riscv64-to-syscall-build.patch
|
2023-12-25 11:10:09 +08:00
|
|
|
Patch6: 0006-support-ipv6.patch
|
|
|
|
|
Patch7: 0007-use-file-locks-to-avoid-remounting-the-sharepath-mas.patch
|
|
|
|
|
Patch8: 0008-clean-up-run-syscontainer-tools-netns-containerid-di.patch
|
|
|
|
|
Patch9: 0009-drop-useless-function-error-and-info.patch
|
|
|
|
|
Patch10: 0010-fix-log-of-removeUdevRule.patch
|
2024-05-10 15:39:01 +08:00
|
|
|
Patch11: 0011-static-compilation-for-cross-version-use.patch
|
2024-08-29 09:17:59 +08:00
|
|
|
Patch12: 0012-support-Vnic-specifying-network-namespace.patch
|
2023-12-25 11:10:09 +08:00
|
|
|
|
2023-08-31 07:21:44 +00:00
|
|
|
%ifarch sw_64
|
2023-12-25 11:10:09 +08:00
|
|
|
Patch1000: 1000-add-sw_64-support-not-upstream-modified-files.patch
|
2023-08-31 07:21:44 +00:00
|
|
|
%endif
|
2023-12-25 07:07:09 +00:00
|
|
|
%ifarch loongarch64
|
|
|
|
|
Patch1001: 1001-add-loongarch64-support-not-upstream-modified-files.patch
|
|
|
|
|
%endif
|
2020-12-23 15:40:06 +08:00
|
|
|
|
2019-09-30 10:53:51 -04:00
|
|
|
#Dependency
|
|
|
|
|
BuildRequires: glibc-static
|
|
|
|
|
BuildRequires: golang > 1.6
|
|
|
|
|
Requires: iSulad
|
|
|
|
|
Requires: util-linux
|
|
|
|
|
|
|
|
|
|
%description
|
2020-01-21 17:00:00 +08:00
|
|
|
This is syscontainer tools, to make it work, you need a isulad and util-linux
|
2019-09-30 10:53:51 -04:00
|
|
|
|
|
|
|
|
#Build sections
|
|
|
|
|
%prep
|
2022-11-17 20:09:05 +08:00
|
|
|
%autosetup -n %{name}-v%{version} -p1
|
2024-09-20 13:36:18 +08:00
|
|
|
%ifarch riscv64
|
|
|
|
|
# not support -static-pie until glibc2.39, gcc14
|
|
|
|
|
%patch11 -R -p1
|
|
|
|
|
%endif
|
2019-09-30 10:53:51 -04:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
make init && make
|
|
|
|
|
|
|
|
|
|
%install
|
2020-01-21 14:26:07 +08:00
|
|
|
HOOK_DIR=$RPM_BUILD_ROOT/var/lib/isulad/hooks
|
2019-09-30 10:53:51 -04:00
|
|
|
ISULAD_TOOLS_DIR=$RPM_BUILD_ROOT/usr/local/bin
|
|
|
|
|
ISULAD_TOOLS_WRAPPER=$RPM_BUILD_ROOT/lib/udev
|
|
|
|
|
|
|
|
|
|
mkdir -p -m 0700 ${HOOK_DIR}
|
|
|
|
|
mkdir -p -m 0750 ${ISULAD_TOOLS_DIR}
|
|
|
|
|
mkdir -p -m 0750 ${ISULAD_TOOLS_WRAPPER}
|
|
|
|
|
|
2020-01-21 17:00:00 +08:00
|
|
|
install -m 0750 build/syscontainer-hooks ${HOOK_DIR}
|
|
|
|
|
install -m 0750 build/syscontainer-tools ${ISULAD_TOOLS_DIR}
|
|
|
|
|
install -m 0750 hack/syscontainer-tools_wrapper ${ISULAD_TOOLS_WRAPPER}/syscontainer-tools_wrapper
|
2019-09-30 10:53:51 -04:00
|
|
|
|
2022-10-17 17:11:39 +08:00
|
|
|
%check
|
|
|
|
|
make localtest
|
|
|
|
|
|
2019-09-30 10:53:51 -04:00
|
|
|
#Install and uninstall scripts
|
|
|
|
|
%pre
|
|
|
|
|
|
|
|
|
|
%preun
|
|
|
|
|
|
|
|
|
|
%post
|
2023-12-25 11:10:09 +08:00
|
|
|
GRAPH=`isula info 2>/dev/null | grep -Eo "iSulad Root Dir:.+" | grep -Eo "/.*"`
|
|
|
|
|
if [ x"$GRAPH" == "x" ]; then
|
2020-01-21 14:26:07 +08:00
|
|
|
GRAPH="/var/lib/isulad"
|
2019-09-30 10:53:51 -04:00
|
|
|
fi
|
|
|
|
|
|
2020-01-21 14:26:07 +08:00
|
|
|
if [[ "$GRAPH" != "/var/lib/isulad" ]]; then
|
2019-09-30 10:53:51 -04:00
|
|
|
mkdir -p -m 0550 $GRAPH/hooks
|
2020-01-21 17:00:00 +08:00
|
|
|
install -m 0550 -p /var/lib/isulad/hooks/syscontainer-hooks $GRAPH/hooks
|
2019-09-30 10:53:51 -04:00
|
|
|
|
|
|
|
|
echo
|
|
|
|
|
echo "=================== WARNING! ================================================"
|
2020-01-21 17:00:00 +08:00
|
|
|
echo " 'iSulad Root Dir' is $GRAPH, move /var/lib/isulad/hooks/syscontainer-hooks to $GRAPH/hooks"
|
2019-09-30 10:53:51 -04:00
|
|
|
echo "============================================================================="
|
|
|
|
|
echo
|
|
|
|
|
fi
|
2020-01-21 17:00:00 +08:00
|
|
|
HOOK_SPEC=/etc/syscontainer-tools
|
2019-09-30 10:53:51 -04:00
|
|
|
HOOK_DIR=${GRAPH}/hooks
|
|
|
|
|
mkdir -p -m 0750 ${HOOK_SPEC}
|
|
|
|
|
mkdir -p -m 0550 ${HOOK_DIR}
|
|
|
|
|
cat << EOF > ${HOOK_SPEC}/hookspec.json
|
|
|
|
|
{
|
|
|
|
|
"prestart": [
|
|
|
|
|
{
|
2020-01-21 17:00:00 +08:00
|
|
|
"path": "${HOOK_DIR}/syscontainer-hooks",
|
|
|
|
|
"args": ["syscontainer-hooks", "--state", "prestart"],
|
2019-09-30 10:53:51 -04:00
|
|
|
"env": []
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"poststart":[
|
|
|
|
|
{
|
2020-01-21 17:00:00 +08:00
|
|
|
"path": "${HOOK_DIR}/syscontainer-hooks",
|
|
|
|
|
"args": ["syscontainer-hooks", "--state", "poststart"],
|
2019-09-30 10:53:51 -04:00
|
|
|
"env": []
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"poststop":[
|
|
|
|
|
{
|
2020-01-21 17:00:00 +08:00
|
|
|
"path": "${HOOK_DIR}/syscontainer-hooks",
|
|
|
|
|
"args": ["syscontainer-hooks", "--state", "poststop"],
|
2019-09-30 10:53:51 -04:00
|
|
|
"env": []
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
EOF
|
|
|
|
|
chmod 0640 ${HOOK_SPEC}/hookspec.json
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
|
|
|
|
|
#Files list
|
|
|
|
|
%files
|
|
|
|
|
%defattr(0550,root,root,0550)
|
2020-01-21 17:00:00 +08:00
|
|
|
/usr/local/bin/syscontainer-tools
|
2020-01-21 14:26:07 +08:00
|
|
|
%attr(0550,root,root) /var/lib/isulad/hooks
|
2020-01-21 17:00:00 +08:00
|
|
|
%attr(0550,root,root) /var/lib/isulad/hooks/syscontainer-hooks
|
|
|
|
|
%attr(0550,root,root) /lib/udev/syscontainer-tools_wrapper
|
2019-09-30 10:53:51 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
#Clean section
|
|
|
|
|
%clean
|
|
|
|
|
rm -rfv %{buildroot}
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-09-20 13:36:18 +08:00
|
|
|
* Fri Sep 20 2024 laokz <zhangkai@iscas.ac.cn> - 0.9-67
|
|
|
|
|
- Type:fix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:riscv64: reverse -static-pie patch due to unsupported tool-chains
|
|
|
|
|
|
2024-08-29 09:17:59 +08:00
|
|
|
* Thu Aug 29 2024 wujichao <wujichao1@huawei.com> - 0.9-66
|
|
|
|
|
- Type:patch
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:support-Vnic-specifying-network-namespace
|
|
|
|
|
|
2024-05-10 15:39:01 +08:00
|
|
|
* Fri May 10 2024 yangjiaqi <yangjiaqi16@huawei.com> - 0.9-65
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:static compilation for cross-version use
|
|
|
|
|
|
2024-03-11 17:44:32 +08:00
|
|
|
* Mon Mar 11 2024 zhangxianting <zhangxianting@uniontech.com> - 0.9-64
|
|
|
|
|
- Type:patch
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:patch hunk FAILED bacause of the arch judgement of sw_64 and loongarch64
|
|
|
|
|
|
2023-12-25 07:07:09 +00:00
|
|
|
* Mon Dec 25 2023 yangjiaqi <yangjiaqi16@huawei.com> - 0.9-63
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:add loongarch64 support
|
|
|
|
|
|
2023-12-25 11:10:09 +08:00
|
|
|
* Mon Dec 25 2023 yangjiaqi <yangjiaqi16@huawei.com> - 0.9-62
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC:hide error when isula info is abnormal
|
|
|
|
|
|
2023-09-21 11:16:54 +08:00
|
|
|
* Thu Sep 21 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-61
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:fix log of removeUdevRule
|
|
|
|
|
|
2023-08-31 07:21:44 +00:00
|
|
|
* Thu Aug 31 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-60
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:adjust the position of Shenwei patch
|
|
|
|
|
|
2023-08-29 09:07:23 +00:00
|
|
|
* Tue Aug 29 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-59
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:drop useless function error and info
|
|
|
|
|
|
2023-08-29 02:19:30 +00:00
|
|
|
* Tue Aug 29 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-58
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:remove redundant symbol
|
|
|
|
|
|
2023-08-17 20:21:04 +08:00
|
|
|
* Thu Aug 17 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-57
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:clean up run/syscontainer-tools/netns/container_id directory residues in the prestart phase
|
|
|
|
|
|
2023-08-15 15:15:03 +08:00
|
|
|
* Tue Aug 15 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-56
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:use file locks to avoid remounting the sharepath/master dir
|
|
|
|
|
|
2023-08-10 02:56:26 +00:00
|
|
|
* Thu Aug 10 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-55
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- CVE:NA
|
|
|
|
|
- SUG:restart
|
|
|
|
|
- DESC:support ip6
|
|
|
|
|
|
2023-08-09 07:39:39 +00:00
|
|
|
* Wed Aug 09 2023 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-54
|
|
|
|
|
- isolate sw patch by code to avoid rolling back patch
|
|
|
|
|
|
2023-06-30 11:09:55 +08:00
|
|
|
* Fri Jun 30 2023 wujie <wujie@nj.iscas.ac.cn> - 0.9-53
|
|
|
|
|
- add riscv64 to syscall_linux_64.go build
|
|
|
|
|
|
2022-11-17 20:09:05 +08:00
|
|
|
* Thu Nov 17 2022 yangjiaqi<yangjiaqi16@huawei.com> - 0.9-52
|
|
|
|
|
- fix source
|
|
|
|
|
|
2022-10-27 09:39:18 +08:00
|
|
|
* Thu Oct 27 2022 wuzx<wuzx1226@qq.com> - 0.9-51
|
|
|
|
|
- Add sw64 architecture
|
|
|
|
|
|
2022-10-17 17:11:39 +08:00
|
|
|
* Mon Oct 17 2022 vegbir <yangjiaqi16@huawei.com> - 0.9-50
|
|
|
|
|
- add dt-test
|
|
|
|
|
|
2021-09-02 20:59:24 +08:00
|
|
|
* Thu Sep 02 2021 zhangsong234 <zhangsong34@huawei.com> - 0.9-49
|
|
|
|
|
- DESC: enable external linkmode for cgo build
|
|
|
|
|
|
2021-07-30 23:37:01 +08:00
|
|
|
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 0.9-48
|
|
|
|
|
- DESC: delete -Sgit from %autosetup
|
|
|
|
|
|
2021-02-08 20:36:08 +08:00
|
|
|
* Mon Feb 08 2021 zhangsong234<zhangsong34@huawei.com> - 0.9-47
|
|
|
|
|
- update version to 0.9-47
|
|
|
|
|
|
2020-12-23 15:40:06 +08:00
|
|
|
* Wed Dec 23 2020 wangkang101<873229877@qq.com> - 0.9-3
|
|
|
|
|
- fix failed build with golang 1.15.5
|
|
|
|
|
|
2020-09-07 15:31:01 +08:00
|
|
|
* Mon Sep 07 2020 wangkang101<873229877@qq.com> - 0.9-2
|
|
|
|
|
- modify url of source0
|
|
|
|
|
|
2020-08-18 16:04:18 +08:00
|
|
|
* Tue Apr 26 2020 Zhangsong<zhangsong34@huawei.com> - 0.9-1
|
|
|
|
|
- release version 0.9
|