Blame SPECS/etcd.spec

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