Fedora retired etcd in rawhide, so recreate it. Instead of building from
source with the Go packaging macros, repackage the official upstream
release tarballs (x86_64 and aarch64), fetched via spectool.
Stays drop-in compatible with the former Fedora package: same package
name, /usr/bin/{etcd,etcdctl,etcdutl}, /etc/etcd/etcd.conf, /var/lib/etcd,
etcd.service and the etcd system user (sysusers.d).
Differences from the Fedora package:
- no golang-go.etcd.io-etcd-devel subpackage
- etcd.service runs /usr/bin/etcd directly (no GOMAXPROCS bash wrapper)
- etcd.conf: drop options removed upstream (proxy, debug,
log-package-levels), add ETCD_LOG_LEVEL
- LICENSE taken from the upstream tag, release tarballs do not ship it
89 lines
2.5 KiB
RPMSpec
89 lines
2.5 KiB
RPMSpec
# Prebuilt upstream binaries: no debuginfo to extract
|
|
%global debug_package %{nil}
|
|
|
|
Name: etcd
|
|
Version: 3.7.1
|
|
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
|
|
* 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
|