代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/lxcfs-tools 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#Basic Information
Name: lxcfs-tools
Version: 0.3
Release: 29
Summary: toolkit for lxcfs to remount a running isulad
License: Mulan PSL v2
URL: https://gitee.com/openeuler/lxcfs-tools
Source0: https://gitee.com/openeuler/lxcfs-tools/repository/archive/v%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-root
Patch1: 0001-lxcfs-tools-build-security-option.patch
Patch2: 0002-enable-external-linkmode-for-cgo-build.patch
Patch3: 0003-retry-10-times-to-avoid-isulad-unavailable.patch
Patch4: 0004-add-dt-test.patch
Patch5: lxcfs-tools-sw.patch
#Dependency
BuildRequires: golang > 1.7
BuildRequires: glibc-static
Requires: iSulad
%description
A toolkit for lxcfs to remount a running isulad when crashes recover
#Build sections
%prep
%autosetup -n %{name}-v%{version} -p1
%ifnarch sw_64
%patch5 -R -p1
%endif
%build
make
%install
HOOK_DIR=$RPM_BUILD_ROOT/var/lib/isulad/hooks
LXCFS_TOOLS_DIR=$RPM_BUILD_ROOT/usr/local/bin
mkdir -p -m 0700 ${HOOK_DIR}
mkdir -p -m 0700 ${LXCFS_TOOLS_DIR}
install -m 0750 build/lxcfs-hook ${HOOK_DIR}
install -m 0750 build/lxcfs-tools ${LXCFS_TOOLS_DIR}
%check
make tests
#Install and uninstall scripts
%pre
%preun
%post
GRAPH=`isula info | grep -Eo "iSulad Root Dir:.+" | grep -Eo "\/.*"`
if [ "$GRAPH" == "" ]; then
GRAPH="/var/lib/isulad"
fi
if [[ ("$GRAPH" != "/var/lib/isulad") ]]; then
mkdir -p -m 0550 $GRAPH/hooks
install -m 0550 -p /var/lib/isulad/hooks/lxcfs-hook $GRAPH/hooks
echo
echo "=================== WARNING! ================================================"
echo " 'iSulad Root Dir' is $GRAPH, move /var/lib/isulad/hooks/lxcfs-hook to $GRAPH/hooks"
echo "============================================================================="
echo
fi
HOOK_SPEC=${GRAPH}/hooks
HOOK_DIR=${GRAPH}/hooks
touch ${HOOK_SPEC}/hookspec.json
cat << EOF > ${HOOK_SPEC}/hookspec.json
{
"prestart": [
{
"path": "${HOOK_DIR}/lxcfs-hook",
"args": ["lxcfs-hook"],
"env": []
}
],
"poststart":[],
"poststop":[]
}
EOF
chmod 0640 ${HOOK_SPEC}/hookspec.json
%postun
#Files list
%files
%defattr(0550,root,root,0550)
/usr/local/bin/lxcfs-tools
%attr(0550,root,root) /var/lib/isulad/hooks
%attr(0550,root,root) /var/lib/isulad/hooks/lxcfs-hook
#Clean section
%clean
rm -rfv %{buildroot}
%changelog
* Thu Nov 17 2022 yangjiaqi<yangjiaqi16@huawei.com> - 0.3-29
- fix source
* Mon Oct 24 2022 wuzx<wuzx1226@qq.com> - 0.3-28
- Add sw64 architecture
* Mon Oct 17 2022 vegbir <yangjiaqi16@huawei.com> - 0.3-27
- add dt-test
* Wed Aug 17 2022 vegbir <yangjiaqi16@huawei.com> - 0.3-26
- retry 10 times to avoid isulad unavailable
* Thu Sep 02 2021 zhangsong234 <zhangsong34@huawei.com> - 0.3-25
- enable external linkmode for cgo build
* Mon Feb 08 2021 zhangsong234 <zhangsong34@huawei.com> - 0.3-24
- update version to 0.3-24
* Mon Sep 07 2020 wangkang101 <873229877@qq.com> - 0.3-2
- modify url of source0
* Fri Jul 03 2020 Zhangsong <zhangsong34@huawei.com> - 0.3-1
- release version 0.3
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。