13 Star 0 Fork 21

src-openEuler/etcd

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
etcd.spec 7.02 KB
一键复制 编辑 原始数据 按行查看 历史
# Generated by go2rpm
%bcond_without check
%bcond_with bootstrap
%define debug_package %{nil}
# https://github.com/etcd-io/etcd
%global goipath go.etcd.io/etcd
%global forgeurl https://github.com/etcd-io/etcd
Version: 3.4.14
%global goipaths0 go.etcd.io/etcd
%global goipathsex0 go.etcd.io/etcd/etcdserver/api/v3rpc/
%if %{without bootstrap}
%global goipaths1 go.etcd.io/etcd/etcdserver/api/v3rpc/
%endif
%global goaltipaths github.com/coreos/etcd go.etcd.io/etcd/v3
%global man_version 3.4.14
%global common_description %{expand:
Distributed reliable key-value store for the most critical data of a distributed
system.}
%global golicenses LICENSE NOTICE
%global godocs CONTRIBUTING.md README.md Documentation\\\
README-*.md READMEv2-etcdctl.md
%global gosupfiles integration/fixtures/* etcdserver/api/v2http/testdata/*
Name: etcd
Release: 15
Summary: Distributed reliable key-value store for the most critical data of a distributed system
# Upstream license specification: Apache-2.0
License: ASL 2.0 and MIT
URL: https://github.com/etcd-io/etcd
Source0: etcd-%{version}.tar.gz
Source1: %{name}.service
Source2: %{name}.conf
Source3: man-%{man_version}.tar.gz
# sh genmanpages.sh path_to_built_source
Source10: genmanpages.sh
# update grpc-go version to v1.32.0
Patch1: 0001-Convert-int-to-string-using-strconv.Itoa.patch
Patch2: 0002-Etcd-on-unsupported-platform-without-ETCD_UNSUPPORTED_ARCH=arm64-set.patch
Patch3: 0003-etcd-Add-sw64-architecture.patch
Patch4: 0004-fix-CVE-2023-45288.patch
Patch5: 0005-fix-CVE-2022-41723.patch
Patch6: 0006-fix-CVE-2023-39325.patch
Patch7: 0007-fix-CVE-2022-34038.patch
Patch8: 0008-fix-CVE-2023-32082.patch
Patch9: 0009-fix-CVE-2021-28235.patch
Patch10: 0010-backport-Suppress-noisy-basic-auth-token-deletion-log.patch
Patch11: 0011-backport-Fix-wait-time-docs-tests-to-indicate-trigger-deadline.patch
Patch12: 0012-backport-ignore-raft-messages-if-member-id-mismatch.patch
Patch13: 0013-backport-Update-the-compaction-log-when-bootstrap-and-update-compacts-signature.patch
BuildRequires: golang
BuildRequires: python3-devel
%{?systemd_requires}
BuildRequires: systemd
Requires(pre): shadow-utils
%description
%{common_description}
%gopkg
%prep
%setup -q -n man-%{man_version} -T -b 3
%forgesetup
%patch1 -p1
%patch2 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%ifarch sw_64
%patch3 -p1
%endif
# For compatibility
cp -aR etcdserver/api/snap snap
cp -aR etcdserver/api/membership etcdserver/membership
cp -aR etcdserver/api/v2store store
for d in client clientv3 contrib etcdctl functional hack; do
mv $d/README.md README-$d.md
done
mv etcdctl/READMEv2.md READMEv2-etcdctl.md
mkdir -p man/man1
cp ../man-%{man_version}/*.1 man/man1/.
%if %{without bootstrap}
%build
CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
CGO_LDFLAGS_ALLOW="-Wl,-z,relro,-z,now" \
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
GO111MODULE=on GOFLAGS=-mod=vendor \
go build -buildmode=pie -ldflags "-linkmode=external -w -s" \
-o %{gobuilddir}/bin/etcd %{goipath}
for cmd in etcdctl; do
CGO_CFLAGS="-fstack-protector-strong -fPIE -D_FORTIFY_SOURCE=2 -O2" \
CGO_LDFLAGS_ALLOW="-Wl,-z,relro,-z,now" \
CGO_LDFLAGS="-Wl,-z,relro,-z,now -Wl,-z,noexecstack" \
GO111MODULE=on GOFLAGS=-mod=vendor \
go build -buildmode=pie -ldflags "-linkmode=external -w -s" \
-o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd
done
%endif
# make -C docs help
# make -C docs html
%install
%if %{without bootstrap}
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -dm 0755 %{buildroot}%{_sysconfdir}/%{name}
install -pm 644 -t %{buildroot}%{_sysconfdir}/%{name} %{SOURCE2}
# install manpages
install -d %{buildroot}%{_mandir}/man1
install -pm 644 man/man1/* %{buildroot}%{_mandir}/man1
# And create /var/lib/etcd
install -dm 0755 %{buildroot}%{_sharedstatedir}/%{name}
%endif
%if %{without bootstrap}
%if %{with check}
%check
GO111MODULE=on GOFLAGS=-mod=vendor go test $( GO111MODULE=on GOFLAGS=-mod=vendor go list ./... | grep -v -E "tlsutil|expect|tester|integration|e2e|backend|auth|ordering|snapshot|etcdserver|mvcc")
%endif
%endif
%if %{without bootstrap}
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/%{name} \
-s /sbin/nologin -c "etcd user" %{name}
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun %{name}.service
%files
%license LICENSE NOTICE
%doc CONTRIBUTING.md README.md
%doc Documentation README-*.md READMEv2-etcdctl.md
%{_bindir}/*
%config(noreplace) %{_sysconfdir}/%{name}
%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name}
%{_unitdir}/%{name}.service
%{_mandir}/man1/*.1*
%endif
%changelog
* Tue Sep 3 2024 guojunding <guojunding@kylinos.cn> - 3.4.14-15
- Fix server: ignore raft messages if member id
- Update the compaction log when bootstrap and update compact's signature
* Tue Sep 3 2024 guojunding <guojunding@kylinos.cn> - 3.4.14-14
- Fix wait_time docs, tests for trigger deadline greater than
- or equal to wait deadline
* Fri Jul 5 2024 guojunding <guojunding@kylinos.cn> - 3.4.14-13
- Suppress noisy basic auth token deletion log
* Wed Apr 24 2024 zhangbowei <zhangbowei@kylinos.cn> - 3.4.14-12
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2021-28235
* Tue Apr 23 2024 laokz <zhangkai@iscas.ac.cn> - 3.4.14-11
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: add riscv64 to avoid unsupported arch error
* Mon Apr 22 2024 zhangbowei <zhangbowei@kylinos.cn> - 3.4.14-10
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2023-32082
* Fri Apr 19 2024 zhangbowei <zhangbowei@kylinos.cn> - 3.4.14-9
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2022-34038
* Wed Apr 17 2024 zhangbowei <zhangbowei@kylinos.cn> - 3.4.14-8
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2023-39325
* Wed Apr 17 2024 zhangbowei <zhangbowei@kylinos.cn> - 3.4.14-7
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2022-41723
* Wed Apr 17 2024 zhangbowei <zhangbowei@kylinos.cn> - 3.4.14-6
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC: fix CVE-2023-45288
* Wed Oct 19 2022 wuzx<wuzx1226@qq.com> - 3.4.14-5
- add sw64 patch
* Wed Sep 2021 jikui <jikui2@huawei.com> - 3.4.14-4
- modify build flags for secure compilation options
* Wed Jun 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 3.4.14-3
- Solve the problem of etcd on unsupported platform without ETCD_UNSUPPORTED_ARCH=arm64 set
* Thu Mar 04 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 3.4.14-2
- Remove the BuildRequires: go-compilers package
* Thu Jan 21 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 3.4.14-1
- Update to 3.4.14
* Thu Aug 13 2020 jiangxinyu <jiangxinyu@kylinos.cn> - 3.4.7-1
- Init etcd project
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/etcd.git
git@gitee.com:src-openeuler/etcd.git
src-openeuler
etcd
etcd
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385