commit 1a87989c8edf388725e7097d57df2ccc59a0b912 Author: User Date: Mon Mar 25 19:36:40 2019 +0300 Imported from SRPM diff --git a/consul.rpmlintrc b/consul.rpmlintrc new file mode 100644 index 0000000..40cef95 --- /dev/null +++ b/consul.rpmlintrc @@ -0,0 +1 @@ +addFilter("E: missing-PT_GNU_STACK-section") \ No newline at end of file diff --git a/consul.spec b/consul.spec new file mode 100644 index 0000000..26be854 --- /dev/null +++ b/consul.spec @@ -0,0 +1,65 @@ +%define getsource github.com/hashicorp/%{name} +%define debug %nil +%define debug_package %nil + +Name: consul +Version: 1.4.4 +Release: 1 +Summary: Service discovery tool +URL: https://www.consul.io/ +License: MPLv2.0 +Group: System/Cluster +Source1000: %{name}.rpmlintrc +BuildRequires: go +BuildRequires: git +BuildRequires: upx + +%description +Consul is a tool for service discovery and configuration. +Consul is distributed, highly available, and extremely scalable. + +Consul provides several key features: + + - Service Discovery - Consul makes it simple for services to register + themselves and to discover other services via a DNS or HTTP interface. + External services such as SaaS providers can be registered as well. + + - Health Checking - Health Checking enables Consul to quickly alert + operators about any issues in a cluster. The integration with service + discovery prevents routing traffic to unhealthy hosts and enables + service level circuit breakers. + + - Key/Value Storage - A flexible key/value store enables storing + dynamic configuration, feature flagging, coordination, leader + election and more. The simple HTTP API makes it easy to use anywhere. + + - Multi-Datacenter - Consul is built to be datacenter aware, + and can support any number of regions without complex configuration. + + - Service Segmentation - Consul Connect enables secure service-to-service + communication with automatic TLS encryption and identity-based authorization. + +Consul runs on Linux, Mac OS X, FreeBSD, Solaris, and Windows. +A commercial version called Consul Enterprise is also available. + +%prep +#setup -q + +%build +rm -rf $RPM_BUILD_DIR/%{name}-%{version} +install -d $RPM_BUILD_DIR/%{name}-%{version} +GOPATH=$RPM_BUILD_DIR/%{name}-%{version} go get -tags "v%{version}" %{getsource} +upx $RPM_BUILD_DIR/%{name}-%{version}/bin/%{name} + +%install +install -d %{buildroot}%{_bindir} +install -d %{buildroot}%{_docdir}/%{name} +install -Dm0755 $RPM_BUILD_DIR/%{name}-%{version}/bin/%{name} %{buildroot}%{_bindir} + +pushd $RPM_BUILD_DIR/%{name}-%{version}/src/%{getsource} +install -Dm0644 README.md LICENSE INTERNALS.md CHANGELOG.md %{buildroot}%{_docdir}/%{name} +popd + +%files +%{_bindir}/%{name} +%{_docdir}/%{name} \ No newline at end of file