Blob Blame History Raw
%global debug_package %{nil}

%global provider	github
%global provider_tld	com
%global project		coreos
%global repo		etcd
%global commit		4f330a9ba2097222a9add8136115f3a670dd0642

%global import_path	%{provider}.%{provider_tld}/%{project}/%{repo}
%global gopath		%{_datadir}/gocode
%global shortcommit	%(c=%{commit}; echo ${c:0:7})


Name:		etcd
Version:	0.4.6
Release:	0.11%{?dist}
Summary:	A highly-available key value store for shared configuration

License:	ASL 2.0
URL:		https://github.com/coreos/etcd/
Source0:	https://github.com/coreos/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
Source1:	etcd.service
Source2:	etcd.conf

ExclusiveArch:	x86_64

BuildRequires:	golang
BuildRequires:	systemd

Requires(pre):	shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd

%description
A highly-available key value store for shared configuration.

%prep
%setup -q -n %{name}-%{version}

# Make link for etcd itself
mkdir -p src/github.com/coreos
ln -s ../../../ src/github.com/coreos/etcd

%build
./build

%install
install -d -m 0755 %{buildroot}%{_sysconfdir}/etcd
install -m 644 -t %{buildroot}%{_sysconfdir}/etcd %{SOURCE2}
install -D -p -m 0755 bin/etcd %{buildroot}%{_bindir}/etcd
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service

# And create /var/lib/etcd
install -d -m 0755 %{buildroot}%{_localstatedir}/lib/etcd

%check
# empty for now

%pre
getent group etcd >/dev/null || groupadd -r etcd
getent passwd etcd >/dev/null || useradd -r -g etcd -d %{_localstatedir}/lib/etcd \
	-s /sbin/nologin -c "etcd user" etcd
%post
%systemd_post %{name}.service

%preun
%systemd_preun %{name}.service

%postun
%systemd_postun %{name}.service

%files
%config(noreplace) %{_sysconfdir}/etcd
%{_bindir}/etcd
%dir %attr(-,etcd,etcd) %{_localstatedir}/lib/etcd
%{_unitdir}/%{name}.service
%doc LICENSE README.md Documentation/internal-protocol-versioning.md

%changelog
* Mon Oct 06 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-0.11
- back to 0.4.6 version

* Mon Oct 06 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-0.10.git4f330a9
- replace BuildArch with ExclusiveArch

* Sun Oct 05 2014 Eric Paris <eparis@redhat.com> - 0.4.6-0.9.git378cadf
- Fix the .service file to it can launch!

* Fri Oct 03 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-0.8.git378cadf
- Bump to upstream 4f330a9ba2097222a9add8136115f3a670dd0642
- the last commit before golang-cover (not in rhel7.1 so far)

* Thu Oct 02 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-7
- upstream commit to fix the bug caused by random iteration order over map in store/store_test.go
- upstrema commit cc1df691cc7e752f1589fe796b7c1d589316a96f

* Thu Oct 02 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-6
- removing devel part in install section

* Thu Oct 02 2014 Eric Paris <eparis@redhat.com> - 0.4.6-5
- Clean up prep and build section

* Mon Sep 22 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-4
- resolves: #1047194
  Update to 0.4.6 from https://github.com/projectatomic/etcd-package

* Tue Aug 19 2014 Adam Miller <maxamillion@fedoraproject.org> - 0.4.6-3
- Add devel sub-package

* Wed Aug 13 2014 Eric Paris <eparis@redhat.com> - 0.4.6-2
- Bump to 0.4.6
- run as etcd, not root

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sun Oct 20 2013 Peter Lemenkov <lemenkov@gmail.com> - 0.1.2-5
- goprotobuf library unbundled (see rhbz #1018477)
- go-log library unbundled (see rhbz #1018478)
- go-raft library unbundled (see rhbz #1018479)
- go-systemd library unbundled (see rhbz #1018480)
- kardianos library unbundled (see rhbz #1018481)

* Sun Oct 13 2013 Peter Lemenkov <lemenkov@gmail.com> - 0.1.2-4
- go.net library unbundled (see rhbz #1018476)

* Sat Oct 12 2013 Peter Lemenkov <lemenkov@gmail.com> - 0.1.2-3
- Prepare for packages unbundling
- Verbose build

* Sat Oct 12 2013 Peter Lemenkov <lemenkov@gmail.com> - 0.1.2-2
- Fix typo in the etc.service file

* Sat Oct 12 2013 Peter Lemenkov <lemenkov@gmail.com> - 0.1.2-1
- Ver. 0.1.2
- Integrate with systemd

* Mon Aug 26 2013 Luke Cypret <cypret@fedoraproject.org> - 0.1.1-1
- Initial creation