634469
%global with_debug 1
634469
634469
%if 0%{?with_debug}
634469
%global _dwz_low_mem_die_limit 0
634469
%else
634469
%global debug_package   %{nil}
634469
%endif
634469
634469
%if ! 0%{?gobuild:1}
dae001
%define gobuild(o:) go build -buildmode pie -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro,-z,now'" -a -v -x %{?**};
634469
%endif
634469
634469
%global provider        github
634469
%global provider_tld    com
e1ecd9
%global project         etcd-io
634469
%global repo            etcd
634469
# https://github.com/coreos/etcd
634469
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
e1ecd9
%global import_path     github.com/coreos/etcd
dfcfb2
%global commit          06cec40911744c0aca5d1afd69b2631b0a4879ba
634469
%global shortcommit     %(c=%{commit}; echo ${c:0:7})
634469
634469
%global system_name     etcd
dfcfb2
%global man_version     3.2.26
634469
634469
Name:		etcd
dfcfb2
Version:	3.2.26
dfcfb2
Release:	1%{?dist}
634469
Summary:	A highly-available key value store for shared configuration
634469
License:	ASL 2.0
634469
URL:		https://%{provider_prefix}
634469
Source0:	https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
634469
Source1:	%{system_name}.service
634469
Source2:	%{system_name}.conf
f40d78
Source3:        man-%{man_version}.tar.gz
634469
Patch3:         bz1350875-disaster-recovery-with-copies.patch
634469
Patch4:         expand-etcd-arch-validation.patch
634469
634469
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
634469
ExclusiveArch:  %{?go_arches:%{go_arches}}%{!?go_arches:x86_64 aarch64 ppc64le s390x}
e1ecd9
ExcludeArch:    %{ix86}
e1ecd9
BuildRequires:  go-toolset-1.10
e1ecd9
BuildRequires:  go-toolset-1.10-golang-bin
634469
634469
Obsoletes: etcd3 < 3.0.15
634469
Provides: etcd3 = %{version}-%{release}
634469
634469
BuildRequires: libpcap-devel
634469
634469
BuildRequires:	systemd
634469
634469
Requires(pre):	shadow-utils
634469
Requires(post): systemd
634469
Requires(preun): systemd
634469
Requires(postun): systemd
634469
634469
%description
634469
A highly-available key value store for shared configuration.
634469
e1ecd9
%enable_gotoolset110
e1ecd9
634469
%prep
f40d78
%setup -q -n man-%{man_version} -T -b 3
634469
%setup -q -n %{repo}-%{commit}
634469
mkdir -p man/man1
f40d78
cp ../man-%{man_version}/*.1 man/man1/.
634469
634469
# move content of vendor under Godeps as has been so far
634469
mkdir -p Godeps/_workspace/src
634469
mv cmd/vendor/* Godeps/_workspace/src/.
634469
634469
%patch3 -p1
634469
%patch4 -p1
634469
634469
%build
634469
mkdir -p src/github.com/coreos
634469
ln -s ../../../ src/github.com/coreos/etcd
634469
e1ecd9
export GOPATH=$(pwd):$(pwd)/Godeps/_workspace
634469
export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n')"
634469
634469
%gobuild -o bin/%{system_name} %{import_path}
634469
%gobuild -o bin/%{system_name}ctl %{import_path}/%{system_name}ctl
634469
634469
%install
634469
install -D -p -m 0755 bin/%{system_name} %{buildroot}%{_bindir}/%{system_name}
634469
install -D -p -m 0755 bin/%{system_name}ctl %{buildroot}%{_bindir}/%{system_name}ctl
634469
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{system_name}.service
634469
install -d -m 0755 %{buildroot}%{_sysconfdir}/%{system_name}
634469
install -m 644 -t %{buildroot}%{_sysconfdir}/%{system_name} %{SOURCE2}
634469
634469
# install manpages
634469
install -d %{buildroot}%{_mandir}/man1
634469
install -p -m 644 man/man1/* %{buildroot}%{_mandir}/man1
634469
634469
# And create /var/lib/etcd
634469
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{system_name}
634469
634469
%pre
634469
getent group %{system_name} >/dev/null || groupadd -r %{system_name}
634469
getent passwd %{system_name} >/dev/null || useradd -r -g %{system_name} -d %{_sharedstatedir}/%{system_name} \
634469
	-s /sbin/nologin -c "etcd user" %{system_name}
634469
634469
%post
634469
%systemd_post %{system_name}.service
634469
634469
%preun
634469
%systemd_preun %{system_name}.service
634469
634469
%postun
634469
%systemd_postun %{system_name}.service
634469
634469
#define license tag if not already defined
634469
%{!?_licensedir:%global license %doc}
634469
634469
%files
634469
%license LICENSE
634469
%doc *.md
634469
%doc glide.lock
634469
%config(noreplace) %{_sysconfdir}/%{system_name}
634469
%{_bindir}/%{system_name}
634469
%{_bindir}/%{system_name}ctl
634469
%dir %attr(-,%{system_name},%{system_name}) %{_sharedstatedir}/%{system_name}
634469
%{_unitdir}/%{system_name}.service
634469
%{_mandir}/man1/*.1*
634469
634469
%changelog
dfcfb2
* Wed Feb 13 2019 Jan Chaloupka <jchaloup@redhat.com> - 3.2.26-1
dfcfb2
- Downgrade to 3.2.26
dfcfb2
  related: #1665810
dfcfb2
e1ecd9
* Mon Jan 14 2019 Jan Chaloupka <jchaloup@redhat.com> - 3.3.11-2
e1ecd9
- Update to 3.3.11
e1ecd9
  resolves: #1665810
e1ecd9
e1ecd9
* Tue Jan 08 2019 Jan Chaloupka <jchaloup@redhat.com> - 3.3.10-1
e1ecd9
- Update to 3.3.10
e1ecd9
  resolves: #1664290
e1ecd9
e1ecd9
* Mon Nov 05 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.25-1
e1ecd9
- Update to 3.2.25
e1ecd9
  resolves: #1646193
e1ecd9
f40d78
* Mon Jun 11 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.22-1
f40d78
- Update to 3.2.22
f40d78
  resolves: #1541355
f40d78
f40d78
* Mon Jun 04 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.21-1
f40d78
- Update to 3.2.21
f40d78
  resolves: #1585787
f40d78
02f364
* Tue Apr 17 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.18-1
02f364
- Update to 3.2.18
02f364
  resolves: #1568389
02f364
4245ee
* Tue Feb 06 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.15-2
4245ee
- Rebuild for 7.5.0
4245ee
  resolves: #1542526
4245ee
dae001
* Mon Jan 29 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.15-1
dae001
- Update to 3.2.15
dae001
  resolves: #1539670
dae001
  resolves: #1378706
dae001
2755e6
* Wed Dec 06 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.11-1
2755e6
- Update to 3.2.11
2755e6
  related: #1514612
2755e6
2755e6
* Tue Nov 21 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.10-1
2755e6
- Update to 3.2.10
2755e6
  resolves: #1514612
2755e6
634469
* Mon Nov 20 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.9-3
634469
- Bump man-pages tarball
634469
  related: #1510480
634469
634469
* Mon Nov 20 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.9-2
634469
- Fix Synopsis of etcdctl3 man pages
634469
  related: #1510480
634469
634469
* Tue Nov 07 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.9-1
634469
- Update to 3.2.9
634469
  resolves: #1510480
634469
- Generate etcd and etcdctl man-pages
634469
  resolves: #1444336
634469
634469
* Fri Sep 29 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.7-2
634469
- Rebuild with correct hardening flags
634469
  resolves: #1420783
634469
634469
* Tue Sep 19 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.7-1
634469
- Update to 3.2.7
634469
  resolves: #1493165
634469
634469
* Tue Aug 08 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.5-1
634469
- Update to 3.2.5
634469
  resolves: #1479371
634469
634469
* Mon Jun 12 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.9-2
634469
- Build for secondary architectures as well
634469
634469
* Fri Jun 09 2017 Scott Dodson <sdodson@redhat.com> - 3.1.9-1
634469
- Update to 3.1.9
634469
  resolves: #1458941
634469
634469
* Tue Jun 06 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.8-1
634469
- Update to 3.1.8
634469
  resolves: #1459122
634469
634469
* Tue May 02 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.7-1
634469
- Update to 3.1.7
634469
  resolves: #1447235
634469
634469
* Tue Apr 04 2017 Yaakov Selkowitz <yselkowi@redhat.com> - 3.1.3-2
634469
- Circumvent runtime check of officially supported architectures
634469
  resolves: #1434973
634469
634469
* Tue Mar 21 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.3-1
634469
- Update to 3.1.3
634469
  resolves: #1434364
634469
634469
* Mon Feb 27 2017 Josh Boyer <jwboyer@redhat.com> - 3.1.0-2.1
634469
- Rebuild rebase on all architectures
634469
634469
* Tue Feb 21 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.0-2
634469
- Apply "add --keep-cluster-id and --node-id to 'etcdctl backup'"
634469
  from extras-rhel-7.2 branch
634469
  resolves: #1350875
634469
634469
* Thu Feb 16 2017 Josh Boyer <jwboyer@redhat.com> - 3.1.0-1.1
634469
- Rebuild rebase on all architectures
634469
634469
* Mon Feb 06 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.0-1
634469
- Update to 3.1.0
634469
  etcdctl-top removed by upstream
634469
  resolves: #1416440
634469
634469
* Fri Jan 20 2017 d.marlin <dmarlin@redhat.com>
634469
- Build for all archs (adding ppc64le and s390x)
634469
634469
* Tue Jan 10 2017 d.marlin <dmarlin@redhat.com> 
634469
- Add aarch64 to ExclusiveArch list.
634469
634469
* Mon Jan 09 2017 d.marlin <dmarlin@redhat.com> 
634469
- Correct 'link' warning for -X flag.
634469
634469
* Thu Dec 01 2016 jchaloup <jchaloup@redhat.com> - 3.0.15-1
634469
- Update to 3.0.15
634469
  Obsolete etcd3 < 3.0.15
634469
634469
* Fri Nov 18 2016 jchaloup <jchaloup@redhat.com> - 3.0.14-3
634469
- Build with debug-info subpackage
634469
- Until etcd3 obsoletes etcd it conflicts with it
634469
634469
* Tue Nov 15 2016 Avesh Agarwal <avagarwa@redhat.com> - 3.0.14-2
634469
- Resolves: #1395359 etcd3 should not obsolete etcd
634469
634469
* Mon Nov 07 2016 jchaloup <jchaloup@redhat.com> - 3.0.14-1
634469
- Update to v3.0.14
634469
  related: #1386963
634469
634469
* Thu Oct 27 2016 jchaloup <jchaloup@redhat.com> - 3.0.13-1
634469
- Update to v3.0.13
634469
  related: #1386963
634469
634469
* Fri Oct 21 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-3
634469
- etcdctl: fix migrate in outputing client.Node to json
634469
  resolves: #1386963
634469
634469
* Tue Oct 18 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-2
634469
- Replace etcd with etcd3 when upgrading
634469
  resolves: #1384161
634469
634469
* Thu Oct 13 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-1
634469
- Update to v3.0.12
634469
634469
* Thu Oct 06 2016 jchaloup <jchaloup@redhat.com> - 3.0.10-1
634469
- Update to v3.0.10
634469
634469
* Fri Sep 23 2016 jchaloup <jchaloup@redhat.com> - 3.0.3-2
634469
- Extend etcd.conf with new flags
634469
  resolves: #1378706
634469
634469
* Fri Jul 22 2016 jchaloup <jchaloup@redhat.com> - 3.0.2-1
634469
- Update to v3.0.3
634469
  related: #1347499
634469
634469
* Tue Jul 12 2016 jchaloup <jchaloup@redhat.com> - 3.0.2-1
634469
- Update to v3.0.2
634469
  related: #1347499
634469
634469
* Sun May 15 2016 jchaloup <jchaloup@redhat.com> - 3.0.0-0.1.beta0
634469
- Build etcd3 v3.0.0-beta0 for AH 7.3
634469
  resolves: #1347499