Files
etcd/etcd.spec
T
2026-10-31 17:55:03 +01:00

92 lines
2.5 KiB
RPMSpec

# Prebuilt upstream binaries: no debuginfo to extract
%global debug_package %{nil}
Name: etcd
Version: 3.7.3
Release: 1%{?dist}
Summary: Distributed reliable key-value store for the most critical data of a distributed system
License: Apache-2.0
URL: https://etcd.io
Source0: https://github.com/etcd-io/etcd/releases/download/v%{version}/etcd-v%{version}-linux-amd64.tar.gz
Source1: https://github.com/etcd-io/etcd/releases/download/v%{version}/etcd-v%{version}-linux-arm64.tar.gz
# Release tarballs do not ship the license text
Source2: https://raw.githubusercontent.com/etcd-io/etcd/v%{version}/LICENSE
Source10: %{name}.service
Source11: %{name}.conf
ExclusiveArch: x86_64 aarch64
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%description
Distributed reliable key-value store for the most critical data of a distributed
system.
This package ships the official upstream release binaries (etcd, etcdctl and
etcdutl).
%prep
%ifarch x86_64
%setup -q -T -b 0 -n etcd-v%{version}-linux-amd64
%endif
%ifarch aarch64
%setup -q -T -b 1 -n etcd-v%{version}-linux-arm64
%endif
cp -p %{SOURCE2} LICENSE
# Create a sysusers.d config file
cat >etcd.sysusers.conf <<EOF
u etcd - 'etcd user' %{_sharedstatedir}/%{name} -
EOF
%build
%install
install -Dpm 0755 -t %{buildroot}%{_bindir} etcd etcdctl etcdutl
install -Dpm 0644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}.service
install -dm 0755 %{buildroot}%{_sysconfdir}/%{name}
install -pm 0644 -t %{buildroot}%{_sysconfdir}/%{name} %{SOURCE11}
# And create /var/lib/etcd
install -dm 0755 %{buildroot}%{_sharedstatedir}/%{name}
install -Dpm 0644 etcd.sysusers.conf %{buildroot}%{_sysusersdir}/etcd.conf
%check
%{buildroot}%{_bindir}/etcd --version
%{buildroot}%{_bindir}/etcdctl version
%{buildroot}%{_bindir}/etcdutl version
%post
%systemd_post %{name}.service
%preun
%systemd_preun %{name}.service
%postun
%systemd_postun_with_restart %{name}.service
%files
%license LICENSE
%doc README.md README-etcdctl.md README-etcdutl.md READMEv2-etcdctl.md
%doc Documentation
%{_bindir}/etcd
%{_bindir}/etcdctl
%{_bindir}/etcdutl
%config(noreplace) %{_sysconfdir}/%{name}
%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name}
%{_unitdir}/%{name}.service
%{_sysusersdir}/etcd.conf
%changelog
* Sat Oct 31 2026 Zoran Pericic <zpericic@netst.org> - 3.7.3-1
- Update to 3.7.3
* Fri Sep 18 2026 Zoran Pericic <zpericic@netst.org> - 3.7.1-1
- Update to 3.7.1
- Repackage official upstream release binaries instead of building from source
- Drop golang devel subpackage