1 Star 0 Fork 13

Jingwiw/cri-tools

forked from src-openEuler/cri-tools 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
cri-tools.spec 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
Jingwiw 提交于 2024-05-24 14:40 . enable riscv64 build
%global goipath github.com/kubernetes-sigs/cri-tools
%define gobuild(o:) %{expand:
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
%global _dwz_low_mem_die_limit 0
%ifnarch ppc64
go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}' -compressdwarf=false" -a -v -x %{?**};
%else
go build -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-}%{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}' -compressdwarf=false" -a -v -x %{?**};
%endif
}
%bcond_with check
%global built_tag v%{version}
Name: cri-tools
Version: 1.29.0
Release: 3
Summary: CLI and validation tools for Container Runtime Interface
License: ASL 2.0
URL: https://%{goipath}
Source0: https://github.com/kubernetes-sigs/cri-tools/archive/refs/tags/v%{version}.tar.gz
Source1: https://github.com/cpuguy83/go-md2man/archive/refs/tags/v2.0.3.tar.gz
Patch0001: 0001-fix-CVE-2024-24786.patch
ExclusiveArch: %{?go_arches:%{go_arches}}%{!?go_arches:%{ix86} x86_64 aarch64 %{arm} ppc64le s390x riscv64}
BuildRequires: golang, glibc-static, git
Provides: crictl = %{version}-%{release}
%description
%{summary}
%prep
%autosetup -p1 -n %{name}-%{version}
tar -xf %SOURCE1
%build
GO_MD2MAN_PATH="$(pwd)%{_bindir}"
mkdir -p _build/bin $GO_MD2MAN_PATH
cd go-md2man-*
go build -mod=vendor -o ../_build/bin/go-md2man .
cp ../_build/bin/go-md2man $GO_MD2MAN_PATH/go-md2man
export PATH=$GO_MD2MAN_PATH:$PATH
cd -
export LDFLAGS='-X %{goipath}/pkg/version.Version=v%{version}'
%gobuild -o bin/crictl %{goipath}/cmd/crictl
go-md2man -in docs/crictl.md -out docs/crictl.1
%install
# install binaries
install -dp %{buildroot}%{_bindir}
install -p -m 755 ./bin/crictl %{buildroot}%{_bindir}
# install manpage
install -dp %{buildroot}%{_mandir}/man1
install -p -m 644 docs/crictl.1 %{buildroot}%{_mandir}/man1
%files
%license LICENSE
%doc CHANGELOG.md CONTRIBUTING.md OWNERS README.md RELEASE.md code-of-conduct.md
%doc docs/{benchmark.md,roadmap.md,validation.md}
%{_bindir}/crictl
%{_mandir}/man1/crictl*
%changelog
* Fri May 24 2024 Jingwiw <wangjingwei@iscas.ac.cn> - 1.29.0-3
- Type:enhancement
- CVE:NA
- SUG:NA
- DESC: enable riscv64
* Mon Apr 08 2024 zhangbowei <zhangbowei@kylinos.cn> - 1.29.0-2
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2024-24786
* Wed Feb 28 2024 lijian <lijian2@kylinos.cn> - 1.29.0-1
- update to 1.29.0
* Tue Nov 21 2023 suoxiaocong <suoxiaocong@kylinos.cn> - 1.24.2-2
- fix bug unknown version
* Sat Jul 30 2022 tianlijing <tianlijing@kylinos.cn> - 1.24.2-1
- update to 1.24.2
* Tue Jun 07 2022 fushanqing <fushanqing@kylinos.cn> - 1.22.0-2
- update Source0
* Mon Mar 21 2022 fushanqing <fushanqing@kylinos.cn> - 1.22.0-1
- Init Package
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/Jingwiw/cri-tools.git
git@gitee.com:Jingwiw/cri-tools.git
Jingwiw
cri-tools
cri-tools
master

搜索帮助