[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-extras-commits
Subject:    jchaloup pushed to golang-github-coreos-go-etcd (f22). "Bump to upstream 4cceaf7283b76f27c4a732b2073
From:       notifications () fedoraproject ! org
Date:       2015-08-31 23:06:01
Message-ID: 20150831230601.6728961F2209 () bastion01 ! phx2 ! fedoraproject ! org
[Download RAW message or body]

From 975fc257a16dcdfb2c8d6e82a56de027e815e1c3 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Mon, 31 Aug 2015 21:05:27 +0200
Subject: Bump to upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5 - resolves:
 #1246214


diff --git a/.gitignore b/.gitignore
index 3661b36..ae1780e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-/go-etcd-0424b5f.tar.gz
+/go-etcd-4cceaf7.tar.gz
diff --git a/golang-github-coreos-go-etcd.spec b/golang-github-coreos-go-etcd.spec
index 13303e5..084c297 100644
--- a/golang-github-coreos-go-etcd.spec
+++ b/golang-github-coreos-go-etcd.spec
@@ -1,60 +1,195 @@
+%if 0%{?fedora} || 0%{?rhel} == 6
+%global with_devel 1
+%global with_bundled 0
+%global with_debug 0
+# needs etcd running
+%global with_check 0
+%global with_unit_test 1
+%else
+%global with_devel 0
+%global with_bundled 0
+%global with_debug 0
+%global with_check 0
+%global with_unit_test 0
+%endif
+
+%if 0%{?with_debug}
+%global _dwz_low_mem_die_limit 0
+%else
+%global debug_package   %{nil}
+%endif
+
+%define copying() \
+%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7 \
+%license %{*} \
+%else \
+%doc %{*} \
+%endif
+
+%global isgccgoarch 0
+%if 0%{?gccgo_arches:1}
+%ifarch %{gccgo_arches}
+%global isgccgoarch 1
+%endif
+%endif
+
 %global provider        github
 %global provider_tld    com
 %global project         coreos
 %global repo            go-etcd
-%global commit          0424b5f86ef0ca57a5309c599f74bbb3e97ecd9d
-
-%global import_path     %{provider}.%{provider_tld}/%{project}/%{repo}
+# https://github.com/coreos/go-etcd
+%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
+%global import_path     %{provider_prefix}
+%global commit          4cceaf7283b76f27c4a732b20730dcdb61053bf5
 %global shortcommit     %(c=%{commit}; echo ${c:0:7})
-%global debug_package   %{nil}
 
-Name:       golang-%{provider}-%{project}-%{repo}
-Version:    2.0.0
-Release:    0.2.git%{shortcommit}%{?dist}
-Summary:    The official etcd v0.2 client library for Go
-License:    ASL 2.0
-URL:        http://%{import_path}
-Source0:    https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
-%if 0%{?fedora} >= 19 || 0%{?rhel} >= 7
-BuildArch:      noarch
+Name:           golang-%{provider}-%{project}-%{repo}
+Version:        2.0.0
+Release:        0.3.git%{shortcommit}%{?dist}
+Summary:        Go client library for etcd
+License:        ASL 2.0
+URL:            https://%{provider_prefix}
+Source0:        https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
 +Patch0:         change-default-ports.patch
+
+# If go_arches not defined fall through to implicit golang archs
+%if 0%{?go_arches:1}
+ExclusiveArch:  %{go_arches}
+%else
+ExclusiveArch:   %{ix86} x86_64 %{arm}
+%endif
+# If gccgo_arches does not fit or is not defined fall through to golang
+%if %{isgccgoarch}
+BuildRequires:   gcc-go >= %{gccgo_min_vers}
 %else
-ExclusiveArch:  %{ix86} x86_64 %{arm}
+BuildRequires:   golang
 %endif
 
 %description
 %{summary}
 
+%if 0%{?with_devel}
 %package devel
-BuildRequires:  golang >= 1.2.1-3
-BuildRequires:  golang(github.com/coreos/etcd/etcdserver/etcdhttp/httptypes)
-Requires:       golang >= 1.2.1-3
-Requires:       golang(github.com/coreos/etcd/etcdserver/etcdhttp/httptypes)
-Summary:        A golang library for logging to systemd
-Provides:       golang(%{import_path}/etcd) = %{version}-%{release}
+Summary:       %{summary}
+BuildArch:     noarch
+
+%if 0%{?with_check}
+BuildRequires: golang(github.com/ugorji/go/codec)
+%endif
+
+Requires:      golang(github.com/ugorji/go/codec)
+
+Provides:      golang(%{import_path}/etcd) = %{version}-%{release}
 
 %description devel
 %{summary}
 
-This package contains library source intended for building other packages
-which use coreos/go-etcd.
+This package contains library source intended for
+building other packages which use import path with
+%{import_path} prefix.
+%endif
+
+%if 0%{?with_unit_test} && 0%{?with_devel}
+%package unit-test
+Summary:         Unit tests for %{name} package
+# If go_arches not defined fall through to implicit golang archs
+%if 0%{?go_arches:1}
+ExclusiveArch:  %{go_arches}
+%else
+ExclusiveArch:   %{ix86} x86_64 %{arm}
+%endif
+# If gccgo_arches does not fit or is not defined fall through to golang
+%if %{isgccgoarch}
+BuildRequires:   gcc-go >= %{gccgo_min_vers}
+%else
+BuildRequires:   golang
+%endif
+
+%if 0%{?with_check}
+#Here comes all BuildRequires: PACKAGE the unit tests
+#in %%check section need for running
+%endif
+
+# test subpackage tests code from devel subpackage
+Requires:        %{name}-devel = %{version}-%{release}
+
+%description unit-test
+%{summary}
+
+This package contains unit tests for project
+providing packages with %{import_path} prefix.
+%endif
 
 %prep
 %setup -q -n %{repo}-%{commit}
+%patch0 -p1
 
 %build
 
 %install
-install -d -p %{buildroot}/%{gopath}/src/%{import_path}/etcd
-cp -pav etcd/*.go  %{buildroot}/%{gopath}/src/%{import_path}/etcd
+# source codes for building projects
+%if 0%{?with_devel}
+install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
+# find all *.go but no *_test.go files and generate devel.file-list
+for file in $(find . -iname "*.go" \! -iname "*_test.go") ; do
+    echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
+    install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
+    cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
+    echo "%%{gopath}/src/%%{import_path}/$file" >> devel.file-list
+done
+%endif
+
+# testing files for this project
+%if 0%{?with_unit_test} && 0%{?with_devel}
+install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
+# find all *_test.go files and generate unit-test.file-list
+for file in $(find . -iname "*_test.go"); do
+    echo "%%dir %%{gopath}/src/%%{import_path}/$(dirname $file)" >> devel.file-list
+    install -d -p %{buildroot}/%{gopath}/src/%{import_path}/$(dirname $file)
+    cp -pav $file %{buildroot}/%{gopath}/src/%{import_path}/$file
+    echo "%%{gopath}/src/%%{import_path}/$file" >> unit-test.file-list
+done
+%endif
+
+%if 0%{?with_devel}
+sort -u -o devel.file-list devel.file-list
+%endif
+
+%check
+%if 0%{?with_check} && 0%{?with_unit_test} && 0%{?with_devel}
+%if %{isgccgoarch}
+function gotest { %{gcc_go_test} "$@"; }
+%else
+%if 0%{?golang_test:1}
+function gotest { %{golang_test} "$@"; }
+%else
+function gotest { go test "$@"; }
+%endif
+%endif
 
-%files devel
-%doc LICENSE README.md
+export GOPATH=%{buildroot}/%{gopath}:%{gopath}
+gotest %{import_path}/etcd
+%endif
+
+%if 0%{?with_devel}
+%files devel -f devel.file-list
+%copying LICENSE
+%doc README.md
 %dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
 %dir %{gopath}/src/%{import_path}
-%dir %{gopath}/src/%{import_path}/etcd
-%attr(644,-,-) %{gopath}/src/%{import_path}/etcd/*.go
+%endif
+
+%if 0%{?with_unit_test} && 0%{?with_devel}
+%files unit-test -f unit-test.file-list
+%copying LICENSE
+%doc README.md
+%endif
 
 %changelog
+* Mon Aug 31 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.3.git4cceaf7
+- Bump to upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5
+  resolves: #1246214
+
 * Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - \
                2.0.0-0.2.git0424b5f
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
 
diff --git a/sources b/sources
index 7d8b0e1..920eb8c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a155badbae16148dd45e271b4bfbdf3c  go-etcd-0424b5f.tar.gz
+3f47afe72a946ca5798468ed33b898c5  go-etcd-4cceaf7.tar.gz
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commit/?h=f22&id=975fc257a16dcdfb2c8d6e82a56de027e815e1c3
                
--
scm-commits mailing list
scm-commits@lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic