crobinso pushed to qemu (f22). "CVE-2015-5255: heap memory corruption
in vnc_refresh_server_surface (bz #1255899)"
by notificationsï¼ fedoraproject.org
From ab42d9f7d69736b16cf4d55feaad496ee45c5056 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso(a)redhat.com>
Date: Mon, 31 Aug 2015 19:59:32 -0400
Subject: CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface
(bz #1255899)
diff --git a/0006-vnc-fix-memory-corruption-CVE-2015-5225.patch b/0006-vnc-fix-memory-corruption-CVE-2015-5225.patch
new file mode 100644
index 0000000..f19a9ce
--- /dev/null
+++ b/0006-vnc-fix-memory-corruption-CVE-2015-5225.patch
@@ -0,0 +1,79 @@
+From: Gerd Hoffmann <kraxel(a)redhat.com>
+Date: Mon, 17 Aug 2015 19:56:53 +0200
+Subject: [PATCH] vnc: fix memory corruption (CVE-2015-5225)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The _cmp_bytes variable added by commit "bea60dd ui/vnc: fix potential
+memory corruption issues" can become negative. Result is (possibly
+exploitable) memory corruption. Reason for that is it uses the stride
+instead of bytes per scanline to apply limits.
+
+For the server surface is is actually fine. vnc creates that itself,
+there is never any padding and thus scanline length always equals stride.
+
+For the guest surface scanline length and stride are typically identical
+too, but it doesn't has to be that way. So add and use a new variable
+(guest_ll) for the guest scanline length. Also rename min_stride to
+line_bytes to make more clear what it actually is. Finally sprinkle
+in an assert() to make sure we never use a negative _cmp_bytes again.
+
+Reported-by: 范祚至(库特) <zuozhi.fzz(a)alibaba-inc.com>
+Reviewed-by: P J P <ppandit(a)redhat.com>
+Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
+(cherry picked from commit eb8934b0418b3b1d125edddc4fc334a54334a49b)
+---
+ ui/vnc.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/ui/vnc.c b/ui/vnc.c
+index f989dfb..472c30e 100644
+--- a/ui/vnc.c
++++ b/ui/vnc.c
+@@ -2863,7 +2863,7 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
+ pixman_image_get_width(vd->server));
+ int height = MIN(pixman_image_get_height(vd->guest.fb),
+ pixman_image_get_height(vd->server));
+- int cmp_bytes, server_stride, min_stride, guest_stride, y = 0;
++ int cmp_bytes, server_stride, line_bytes, guest_ll, guest_stride, y = 0;
+ uint8_t *guest_row0 = NULL, *server_row0;
+ VncState *vs;
+ int has_dirty = 0;
+@@ -2882,17 +2882,21 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
+ * Update server dirty map.
+ */
+ server_row0 = (uint8_t *)pixman_image_get_data(vd->server);
+- server_stride = guest_stride = pixman_image_get_stride(vd->server);
++ server_stride = guest_stride = guest_ll =
++ pixman_image_get_stride(vd->server);
+ cmp_bytes = MIN(VNC_DIRTY_PIXELS_PER_BIT * VNC_SERVER_FB_BYTES,
+ server_stride);
+ if (vd->guest.format != VNC_SERVER_FB_FORMAT) {
+ int width = pixman_image_get_width(vd->server);
+ tmpbuf = qemu_pixman_linebuf_create(VNC_SERVER_FB_FORMAT, width);
+ } else {
++ int guest_bpp =
++ PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb));
+ guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb);
+ guest_stride = pixman_image_get_stride(vd->guest.fb);
++ guest_ll = pixman_image_get_width(vd->guest.fb) * ((guest_bpp + 7) / 8);
+ }
+- min_stride = MIN(server_stride, guest_stride);
++ line_bytes = MIN(server_stride, guest_ll);
+
+ for (;;) {
+ int x;
+@@ -2923,9 +2927,10 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
+ if (!test_and_clear_bit(x, vd->guest.dirty[y])) {
+ continue;
+ }
+- if ((x + 1) * cmp_bytes > min_stride) {
+- _cmp_bytes = min_stride - x * cmp_bytes;
++ if ((x + 1) * cmp_bytes > line_bytes) {
++ _cmp_bytes = line_bytes - x * cmp_bytes;
+ }
++ assert(_cmp_bytes >= 0);
+ if (memcmp(server_ptr, guest_ptr, _cmp_bytes) == 0) {
+ continue;
+ }
diff --git a/qemu.spec b/qemu.spec
index bad8a5c..d7e6c24 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -43,7 +43,7 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 2.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
Group: Development/Tools
@@ -84,6 +84,9 @@ Patch0003: 0003-raw-posix-Fix-.bdrv_co_get_block_status-for-unaligne.patch
Patch0004: 0004-pcnet-force-the-buffer-access-to-be-in-bounds-during.patch
# CVE-2015-5745: buffer overflow in virtio-serial (bz #1251160)
Patch0005: 0005-virtio-serial-fix-ANY_LAYOUT.patch
+# CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface
+# (bz #1255899)
+Patch0006: 0006-vnc-fix-memory-corruption-CVE-2015-5225.patch
BuildRequires: SDL2-devel
BuildRequires: zlib-devel
@@ -1186,6 +1189,10 @@ getent passwd qemu >/dev/null || \
%changelog
+* Mon Aug 31 2015 Cole Robinson <crobinso(a)redhat.com> - 2:2.3.1-2
+- CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface (bz
+ #1255899)
+
* Tue Aug 11 2015 Cole Robinson <crobinso(a)redhat.com> - 2:2.3.1-1
- Rebased to version 2.3.1
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/qemu.git/commit/?h=f22&id=ab42d9f7d697...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
crobinso pushed to qemu (f21). "CVE-2015-5255: heap memory corruption
in vnc_refresh_server_surface (bz #1255899)"
by notificationsï¼ fedoraproject.org
From dedc591ecb776fcab13638811e98706b3f562329 Mon Sep 17 00:00:00 2001
From: Cole Robinson <crobinso(a)redhat.com>
Date: Mon, 31 Aug 2015 19:43:11 -0400
Subject: CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface
(bz #1255899)
diff --git a/0101-vnc-fix-memory-corruption-CVE-2015-5225.patch b/0101-vnc-fix-memory-corruption-CVE-2015-5225.patch
new file mode 100644
index 0000000..9755b43
--- /dev/null
+++ b/0101-vnc-fix-memory-corruption-CVE-2015-5225.patch
@@ -0,0 +1,79 @@
+From: Gerd Hoffmann <kraxel(a)redhat.com>
+Date: Mon, 17 Aug 2015 19:56:53 +0200
+Subject: [PATCH] vnc: fix memory corruption (CVE-2015-5225)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The _cmp_bytes variable added by commit "bea60dd ui/vnc: fix potential
+memory corruption issues" can become negative. Result is (possibly
+exploitable) memory corruption. Reason for that is it uses the stride
+instead of bytes per scanline to apply limits.
+
+For the server surface is is actually fine. vnc creates that itself,
+there is never any padding and thus scanline length always equals stride.
+
+For the guest surface scanline length and stride are typically identical
+too, but it doesn't has to be that way. So add and use a new variable
+(guest_ll) for the guest scanline length. Also rename min_stride to
+line_bytes to make more clear what it actually is. Finally sprinkle
+in an assert() to make sure we never use a negative _cmp_bytes again.
+
+Reported-by: 范祚至(库特) <zuozhi.fzz(a)alibaba-inc.com>
+Reviewed-by: P J P <ppandit(a)redhat.com>
+Signed-off-by: Gerd Hoffmann <kraxel(a)redhat.com>
+(cherry picked from commit eb8934b0418b3b1d125edddc4fc334a54334a49b)
+---
+ ui/vnc.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/ui/vnc.c b/ui/vnc.c
+index 87e34ae..dec86da 100644
+--- a/ui/vnc.c
++++ b/ui/vnc.c
+@@ -2689,7 +2689,7 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
+ pixman_image_get_width(vd->server));
+ int height = MIN(pixman_image_get_height(vd->guest.fb),
+ pixman_image_get_height(vd->server));
+- int cmp_bytes, server_stride, min_stride, guest_stride, y = 0;
++ int cmp_bytes, server_stride, line_bytes, guest_ll, guest_stride, y = 0;
+ uint8_t *guest_row0 = NULL, *server_row0;
+ VncState *vs;
+ int has_dirty = 0;
+@@ -2708,17 +2708,21 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
+ * Update server dirty map.
+ */
+ server_row0 = (uint8_t *)pixman_image_get_data(vd->server);
+- server_stride = guest_stride = pixman_image_get_stride(vd->server);
++ server_stride = guest_stride = guest_ll =
++ pixman_image_get_stride(vd->server);
+ cmp_bytes = MIN(VNC_DIRTY_PIXELS_PER_BIT * VNC_SERVER_FB_BYTES,
+ server_stride);
+ if (vd->guest.format != VNC_SERVER_FB_FORMAT) {
+ int width = pixman_image_get_width(vd->server);
+ tmpbuf = qemu_pixman_linebuf_create(VNC_SERVER_FB_FORMAT, width);
+ } else {
++ int guest_bpp =
++ PIXMAN_FORMAT_BPP(pixman_image_get_format(vd->guest.fb));
+ guest_row0 = (uint8_t *)pixman_image_get_data(vd->guest.fb);
+ guest_stride = pixman_image_get_stride(vd->guest.fb);
++ guest_ll = pixman_image_get_width(vd->guest.fb) * ((guest_bpp + 7) / 8);
+ }
+- min_stride = MIN(server_stride, guest_stride);
++ line_bytes = MIN(server_stride, guest_ll);
+
+ for (;;) {
+ int x;
+@@ -2749,9 +2753,10 @@ static int vnc_refresh_server_surface(VncDisplay *vd)
+ if (!test_and_clear_bit(x, vd->guest.dirty[y])) {
+ continue;
+ }
+- if ((x + 1) * cmp_bytes > min_stride) {
+- _cmp_bytes = min_stride - x * cmp_bytes;
++ if ((x + 1) * cmp_bytes > line_bytes) {
++ _cmp_bytes = line_bytes - x * cmp_bytes;
+ }
++ assert(_cmp_bytes >= 0);
+ if (memcmp(server_ptr, guest_ptr, _cmp_bytes) == 0) {
+ continue;
+ }
diff --git a/qemu.spec b/qemu.spec
index 5b8ab9c..2315373 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -152,7 +152,7 @@
Summary: QEMU is a FAST! processor emulator
Name: qemu
Version: 2.1.3
-Release: 9%{?dist}
+Release: 10%{?dist}
Epoch: 2
License: GPLv2+ and LGPLv2+ and BSD
Group: Development/Tools
@@ -257,6 +257,10 @@ Patch0034: 0034-rtl8139-check-IP-Total-Length-field-CVE-2015-5165.patch
Patch0035: 0035-rtl8139-skip-offload-on-short-TCP-header-CVE-2015-51.patch
Patch0036: 0036-rtl8139-check-TCP-Data-Offset-field-CVE-2015-5165.patch
+# CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface
+# (bz #1255899)
+Patch0101: 0101-vnc-fix-memory-corruption-CVE-2015-5225.patch
+
BuildRequires: SDL2-devel
BuildRequires: zlib-devel
BuildRequires: which
@@ -847,6 +851,10 @@ CAC emulation development files.
%patch0035 -p1
%patch0036 -p1
+# CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface
+# (bz #1255899)
+%patch0101 -p1
+
%build
%if %{with kvmonly}
@@ -1626,6 +1634,10 @@ getent passwd qemu >/dev/null || \
%endif
%changelog
+* Mon Aug 31 2015 Cole Robinson <crobinso(a)redhat.com> - 2:2.1.3-10
+- CVE-2015-5255: heap memory corruption in vnc_refresh_server_surface (bz
+ #1255899)
+
* Tue Aug 11 2015 Cole Robinson <crobinso(a)redhat.com> - 2:2.1.3-9
- Fix crash in qemu_spice_create_display (bz #1163047)
- CVE-2015-3209: pcnet: multi-tmd buffer overflow in the tx path (bz #1230536)
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/qemu.git/commit/?h=f21&id=dedc591ecb77...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (el6). "Add missing
patch"
by notificationsï¼ fedoraproject.org
From 3e33aafeeca41ae01a90c95cedc08cc41cfc934c Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)redhat.com>
Date: Tue, 1 Sep 2015 01:13:51 +0200
Subject: Add missing patch
diff --git a/change-default-ports.patch b/change-default-ports.patch
new file mode 100644
index 0000000..0674c4a
--- /dev/null
+++ b/change-default-ports.patch
@@ -0,0 +1,93 @@
+From 7bc1b967d249695cb96974a04314f5b258a83abd Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup(a)redhat.com>
+Date: Mon, 31 Aug 2015 21:36:58 +0200
+Subject: [PATCH] change default ports
+
+---
+ etcd/client.go | 2 +-
+ etcd/client_test.go | 8 ++++----
+ etcd/cluster.go | 2 +-
+ etcd/member_test.go | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/etcd/client.go b/etcd/client.go
+index 727e5df..7ed6388 100644
+--- a/etcd/client.go
++++ b/etcd/client.go
+@@ -95,7 +95,7 @@ func NewClient(machines []string) *Client {
+ func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) {
+ // overwrite the default machine to use https
+ if len(machines) == 0 {
+- machines = []string{"https://127.0.0.1:4001"}
++ machines = []string{"https://127.0.0.1:2379"}
+ }
+
+ config := Config{
+diff --git a/etcd/client_test.go b/etcd/client_test.go
+index 4720d8d..052114e 100644
+--- a/etcd/client_test.go
++++ b/etcd/client_test.go
+@@ -10,13 +10,13 @@ import (
+ )
+
+ // To pass this test, we need to create a cluster of 3 machines
+-// The server should be listening on localhost:4001, 4002, 4003
++// The server should be listening on localhost:2379, 4002, 4003
+ func TestSync(t *testing.T) {
+- fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003")
++ fmt.Println("Make sure there are three nodes at 0.0.0.0:2379-4003")
+
+ // Explicit trailing slash to ensure this doesn't reproduce:
+ // https://github.com/coreos/go-etcd/issues/82
+- c := NewClient([]string{"http://127.0.0.1:4001/"})
++ c := NewClient([]string{"http://127.0.0.1:2379/"})
+
+ success := c.SyncCluster()
+ if !success {
+@@ -96,7 +96,7 @@ func TestPersistence(t *testing.T) {
+ }
+
+ func TestClientRetry(t *testing.T) {
+- c := NewClient([]string{"http://strange", "http://127.0.0.1:4001"})
++ c := NewClient([]string{"http://strange", "http://127.0.0.1:2379"})
+ // use first endpoint as the picked url
+ c.cluster.picked = 0
+ if _, err := c.Set("foo", "bar", 5); err != nil {
+diff --git a/etcd/cluster.go b/etcd/cluster.go
+index 1ad3e15..fe33275 100644
+--- a/etcd/cluster.go
++++ b/etcd/cluster.go
+@@ -14,7 +14,7 @@ type Cluster struct {
+ func NewCluster(machines []string) *Cluster {
+ // if an empty slice was sent in then just assume HTTP 4001 on localhost
+ if len(machines) == 0 {
+- machines = []string{"http://127.0.0.1:4001"}
++ machines = []string{"http://127.0.0.1:2379"}
+ }
+
+ // default leader and machines
+diff --git a/etcd/member_test.go b/etcd/member_test.go
+index 53ebdd4..b3439a7 100644
+--- a/etcd/member_test.go
++++ b/etcd/member_test.go
+@@ -16,7 +16,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ want: memberCollection([]Member{}),
+ },
+ {
+- body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
++ body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:2379"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+ want: memberCollection(
+ []Member{
+ {
+@@ -38,7 +38,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ },
+ ClientURLs: []string{
+ "http://127.0.0.1:2379",
+- "http://127.0.0.1:4001",
++ "http://127.0.0.1:2379",
+ },
+ },
+ {
+--
+1.9.3
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (master). "Add
missing patch"
by notificationsï¼ fedoraproject.org
From 3e33aafeeca41ae01a90c95cedc08cc41cfc934c Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)redhat.com>
Date: Tue, 1 Sep 2015 01:13:51 +0200
Subject: Add missing patch
diff --git a/change-default-ports.patch b/change-default-ports.patch
new file mode 100644
index 0000000..0674c4a
--- /dev/null
+++ b/change-default-ports.patch
@@ -0,0 +1,93 @@
+From 7bc1b967d249695cb96974a04314f5b258a83abd Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup(a)redhat.com>
+Date: Mon, 31 Aug 2015 21:36:58 +0200
+Subject: [PATCH] change default ports
+
+---
+ etcd/client.go | 2 +-
+ etcd/client_test.go | 8 ++++----
+ etcd/cluster.go | 2 +-
+ etcd/member_test.go | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/etcd/client.go b/etcd/client.go
+index 727e5df..7ed6388 100644
+--- a/etcd/client.go
++++ b/etcd/client.go
+@@ -95,7 +95,7 @@ func NewClient(machines []string) *Client {
+ func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) {
+ // overwrite the default machine to use https
+ if len(machines) == 0 {
+- machines = []string{"https://127.0.0.1:4001"}
++ machines = []string{"https://127.0.0.1:2379"}
+ }
+
+ config := Config{
+diff --git a/etcd/client_test.go b/etcd/client_test.go
+index 4720d8d..052114e 100644
+--- a/etcd/client_test.go
++++ b/etcd/client_test.go
+@@ -10,13 +10,13 @@ import (
+ )
+
+ // To pass this test, we need to create a cluster of 3 machines
+-// The server should be listening on localhost:4001, 4002, 4003
++// The server should be listening on localhost:2379, 4002, 4003
+ func TestSync(t *testing.T) {
+- fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003")
++ fmt.Println("Make sure there are three nodes at 0.0.0.0:2379-4003")
+
+ // Explicit trailing slash to ensure this doesn't reproduce:
+ // https://github.com/coreos/go-etcd/issues/82
+- c := NewClient([]string{"http://127.0.0.1:4001/"})
++ c := NewClient([]string{"http://127.0.0.1:2379/"})
+
+ success := c.SyncCluster()
+ if !success {
+@@ -96,7 +96,7 @@ func TestPersistence(t *testing.T) {
+ }
+
+ func TestClientRetry(t *testing.T) {
+- c := NewClient([]string{"http://strange", "http://127.0.0.1:4001"})
++ c := NewClient([]string{"http://strange", "http://127.0.0.1:2379"})
+ // use first endpoint as the picked url
+ c.cluster.picked = 0
+ if _, err := c.Set("foo", "bar", 5); err != nil {
+diff --git a/etcd/cluster.go b/etcd/cluster.go
+index 1ad3e15..fe33275 100644
+--- a/etcd/cluster.go
++++ b/etcd/cluster.go
+@@ -14,7 +14,7 @@ type Cluster struct {
+ func NewCluster(machines []string) *Cluster {
+ // if an empty slice was sent in then just assume HTTP 4001 on localhost
+ if len(machines) == 0 {
+- machines = []string{"http://127.0.0.1:4001"}
++ machines = []string{"http://127.0.0.1:2379"}
+ }
+
+ // default leader and machines
+diff --git a/etcd/member_test.go b/etcd/member_test.go
+index 53ebdd4..b3439a7 100644
+--- a/etcd/member_test.go
++++ b/etcd/member_test.go
+@@ -16,7 +16,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ want: memberCollection([]Member{}),
+ },
+ {
+- body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
++ body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:2379"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+ want: memberCollection(
+ []Member{
+ {
+@@ -38,7 +38,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ },
+ ClientURLs: []string{
+ "http://127.0.0.1:2379",
+- "http://127.0.0.1:4001",
++ "http://127.0.0.1:2379",
+ },
+ },
+ {
+--
+1.9.3
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (f23). "Add missing
patch"
by notificationsï¼ fedoraproject.org
From 3e33aafeeca41ae01a90c95cedc08cc41cfc934c Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)redhat.com>
Date: Tue, 1 Sep 2015 01:13:51 +0200
Subject: Add missing patch
diff --git a/change-default-ports.patch b/change-default-ports.patch
new file mode 100644
index 0000000..0674c4a
--- /dev/null
+++ b/change-default-ports.patch
@@ -0,0 +1,93 @@
+From 7bc1b967d249695cb96974a04314f5b258a83abd Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup(a)redhat.com>
+Date: Mon, 31 Aug 2015 21:36:58 +0200
+Subject: [PATCH] change default ports
+
+---
+ etcd/client.go | 2 +-
+ etcd/client_test.go | 8 ++++----
+ etcd/cluster.go | 2 +-
+ etcd/member_test.go | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/etcd/client.go b/etcd/client.go
+index 727e5df..7ed6388 100644
+--- a/etcd/client.go
++++ b/etcd/client.go
+@@ -95,7 +95,7 @@ func NewClient(machines []string) *Client {
+ func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) {
+ // overwrite the default machine to use https
+ if len(machines) == 0 {
+- machines = []string{"https://127.0.0.1:4001"}
++ machines = []string{"https://127.0.0.1:2379"}
+ }
+
+ config := Config{
+diff --git a/etcd/client_test.go b/etcd/client_test.go
+index 4720d8d..052114e 100644
+--- a/etcd/client_test.go
++++ b/etcd/client_test.go
+@@ -10,13 +10,13 @@ import (
+ )
+
+ // To pass this test, we need to create a cluster of 3 machines
+-// The server should be listening on localhost:4001, 4002, 4003
++// The server should be listening on localhost:2379, 4002, 4003
+ func TestSync(t *testing.T) {
+- fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003")
++ fmt.Println("Make sure there are three nodes at 0.0.0.0:2379-4003")
+
+ // Explicit trailing slash to ensure this doesn't reproduce:
+ // https://github.com/coreos/go-etcd/issues/82
+- c := NewClient([]string{"http://127.0.0.1:4001/"})
++ c := NewClient([]string{"http://127.0.0.1:2379/"})
+
+ success := c.SyncCluster()
+ if !success {
+@@ -96,7 +96,7 @@ func TestPersistence(t *testing.T) {
+ }
+
+ func TestClientRetry(t *testing.T) {
+- c := NewClient([]string{"http://strange", "http://127.0.0.1:4001"})
++ c := NewClient([]string{"http://strange", "http://127.0.0.1:2379"})
+ // use first endpoint as the picked url
+ c.cluster.picked = 0
+ if _, err := c.Set("foo", "bar", 5); err != nil {
+diff --git a/etcd/cluster.go b/etcd/cluster.go
+index 1ad3e15..fe33275 100644
+--- a/etcd/cluster.go
++++ b/etcd/cluster.go
+@@ -14,7 +14,7 @@ type Cluster struct {
+ func NewCluster(machines []string) *Cluster {
+ // if an empty slice was sent in then just assume HTTP 4001 on localhost
+ if len(machines) == 0 {
+- machines = []string{"http://127.0.0.1:4001"}
++ machines = []string{"http://127.0.0.1:2379"}
+ }
+
+ // default leader and machines
+diff --git a/etcd/member_test.go b/etcd/member_test.go
+index 53ebdd4..b3439a7 100644
+--- a/etcd/member_test.go
++++ b/etcd/member_test.go
+@@ -16,7 +16,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ want: memberCollection([]Member{}),
+ },
+ {
+- body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
++ body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:2379"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+ want: memberCollection(
+ []Member{
+ {
+@@ -38,7 +38,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ },
+ ClientURLs: []string{
+ "http://127.0.0.1:2379",
+- "http://127.0.0.1:4001",
++ "http://127.0.0.1:2379",
+ },
+ },
+ {
+--
+1.9.3
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (f22). "Add missing
patch"
by notificationsï¼ fedoraproject.org
From 3e33aafeeca41ae01a90c95cedc08cc41cfc934c Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)redhat.com>
Date: Tue, 1 Sep 2015 01:13:51 +0200
Subject: Add missing patch
diff --git a/change-default-ports.patch b/change-default-ports.patch
new file mode 100644
index 0000000..0674c4a
--- /dev/null
+++ b/change-default-ports.patch
@@ -0,0 +1,93 @@
+From 7bc1b967d249695cb96974a04314f5b258a83abd Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup(a)redhat.com>
+Date: Mon, 31 Aug 2015 21:36:58 +0200
+Subject: [PATCH] change default ports
+
+---
+ etcd/client.go | 2 +-
+ etcd/client_test.go | 8 ++++----
+ etcd/cluster.go | 2 +-
+ etcd/member_test.go | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/etcd/client.go b/etcd/client.go
+index 727e5df..7ed6388 100644
+--- a/etcd/client.go
++++ b/etcd/client.go
+@@ -95,7 +95,7 @@ func NewClient(machines []string) *Client {
+ func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) {
+ // overwrite the default machine to use https
+ if len(machines) == 0 {
+- machines = []string{"https://127.0.0.1:4001"}
++ machines = []string{"https://127.0.0.1:2379"}
+ }
+
+ config := Config{
+diff --git a/etcd/client_test.go b/etcd/client_test.go
+index 4720d8d..052114e 100644
+--- a/etcd/client_test.go
++++ b/etcd/client_test.go
+@@ -10,13 +10,13 @@ import (
+ )
+
+ // To pass this test, we need to create a cluster of 3 machines
+-// The server should be listening on localhost:4001, 4002, 4003
++// The server should be listening on localhost:2379, 4002, 4003
+ func TestSync(t *testing.T) {
+- fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003")
++ fmt.Println("Make sure there are three nodes at 0.0.0.0:2379-4003")
+
+ // Explicit trailing slash to ensure this doesn't reproduce:
+ // https://github.com/coreos/go-etcd/issues/82
+- c := NewClient([]string{"http://127.0.0.1:4001/"})
++ c := NewClient([]string{"http://127.0.0.1:2379/"})
+
+ success := c.SyncCluster()
+ if !success {
+@@ -96,7 +96,7 @@ func TestPersistence(t *testing.T) {
+ }
+
+ func TestClientRetry(t *testing.T) {
+- c := NewClient([]string{"http://strange", "http://127.0.0.1:4001"})
++ c := NewClient([]string{"http://strange", "http://127.0.0.1:2379"})
+ // use first endpoint as the picked url
+ c.cluster.picked = 0
+ if _, err := c.Set("foo", "bar", 5); err != nil {
+diff --git a/etcd/cluster.go b/etcd/cluster.go
+index 1ad3e15..fe33275 100644
+--- a/etcd/cluster.go
++++ b/etcd/cluster.go
+@@ -14,7 +14,7 @@ type Cluster struct {
+ func NewCluster(machines []string) *Cluster {
+ // if an empty slice was sent in then just assume HTTP 4001 on localhost
+ if len(machines) == 0 {
+- machines = []string{"http://127.0.0.1:4001"}
++ machines = []string{"http://127.0.0.1:2379"}
+ }
+
+ // default leader and machines
+diff --git a/etcd/member_test.go b/etcd/member_test.go
+index 53ebdd4..b3439a7 100644
+--- a/etcd/member_test.go
++++ b/etcd/member_test.go
+@@ -16,7 +16,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ want: memberCollection([]Member{}),
+ },
+ {
+- body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
++ body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:2379"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+ want: memberCollection(
+ []Member{
+ {
+@@ -38,7 +38,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ },
+ ClientURLs: []string{
+ "http://127.0.0.1:2379",
+- "http://127.0.0.1:4001",
++ "http://127.0.0.1:2379",
+ },
+ },
+ {
+--
+1.9.3
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (f21). "Add missing
patch"
by notificationsï¼ fedoraproject.org
From 3e33aafeeca41ae01a90c95cedc08cc41cfc934c Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)redhat.com>
Date: Tue, 1 Sep 2015 01:13:51 +0200
Subject: Add missing patch
diff --git a/change-default-ports.patch b/change-default-ports.patch
new file mode 100644
index 0000000..0674c4a
--- /dev/null
+++ b/change-default-ports.patch
@@ -0,0 +1,93 @@
+From 7bc1b967d249695cb96974a04314f5b258a83abd Mon Sep 17 00:00:00 2001
+From: Jan Chaloupka <jchaloup(a)redhat.com>
+Date: Mon, 31 Aug 2015 21:36:58 +0200
+Subject: [PATCH] change default ports
+
+---
+ etcd/client.go | 2 +-
+ etcd/client_test.go | 8 ++++----
+ etcd/cluster.go | 2 +-
+ etcd/member_test.go | 4 ++--
+ 4 files changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/etcd/client.go b/etcd/client.go
+index 727e5df..7ed6388 100644
+--- a/etcd/client.go
++++ b/etcd/client.go
+@@ -95,7 +95,7 @@ func NewClient(machines []string) *Client {
+ func NewTLSClient(machines []string, cert, key, caCert string) (*Client, error) {
+ // overwrite the default machine to use https
+ if len(machines) == 0 {
+- machines = []string{"https://127.0.0.1:4001"}
++ machines = []string{"https://127.0.0.1:2379"}
+ }
+
+ config := Config{
+diff --git a/etcd/client_test.go b/etcd/client_test.go
+index 4720d8d..052114e 100644
+--- a/etcd/client_test.go
++++ b/etcd/client_test.go
+@@ -10,13 +10,13 @@ import (
+ )
+
+ // To pass this test, we need to create a cluster of 3 machines
+-// The server should be listening on localhost:4001, 4002, 4003
++// The server should be listening on localhost:2379, 4002, 4003
+ func TestSync(t *testing.T) {
+- fmt.Println("Make sure there are three nodes at 0.0.0.0:4001-4003")
++ fmt.Println("Make sure there are three nodes at 0.0.0.0:2379-4003")
+
+ // Explicit trailing slash to ensure this doesn't reproduce:
+ // https://github.com/coreos/go-etcd/issues/82
+- c := NewClient([]string{"http://127.0.0.1:4001/"})
++ c := NewClient([]string{"http://127.0.0.1:2379/"})
+
+ success := c.SyncCluster()
+ if !success {
+@@ -96,7 +96,7 @@ func TestPersistence(t *testing.T) {
+ }
+
+ func TestClientRetry(t *testing.T) {
+- c := NewClient([]string{"http://strange", "http://127.0.0.1:4001"})
++ c := NewClient([]string{"http://strange", "http://127.0.0.1:2379"})
+ // use first endpoint as the picked url
+ c.cluster.picked = 0
+ if _, err := c.Set("foo", "bar", 5); err != nil {
+diff --git a/etcd/cluster.go b/etcd/cluster.go
+index 1ad3e15..fe33275 100644
+--- a/etcd/cluster.go
++++ b/etcd/cluster.go
+@@ -14,7 +14,7 @@ type Cluster struct {
+ func NewCluster(machines []string) *Cluster {
+ // if an empty slice was sent in then just assume HTTP 4001 on localhost
+ if len(machines) == 0 {
+- machines = []string{"http://127.0.0.1:4001"}
++ machines = []string{"http://127.0.0.1:2379"}
+ }
+
+ // default leader and machines
+diff --git a/etcd/member_test.go b/etcd/member_test.go
+index 53ebdd4..b3439a7 100644
+--- a/etcd/member_test.go
++++ b/etcd/member_test.go
+@@ -16,7 +16,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ want: memberCollection([]Member{}),
+ },
+ {
+- body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:4001"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
++ body: []byte(`{"members":[{"id":"2745e2525fce8fe","peerURLs":["http://127.0.0.1:7003"],"name":"node3","clientURLs":["http://127.0.0.1:4003"]},{"id":"42134f434382925","peerURLs":["http://127.0.0.1:2380","http://127.0.0.1:7001"],"name":"node1","clientURLs":["http://127.0.0.1:2379","http://127.0.0.1:2379"]},{"id":"94088180e21eb87b","peerURLs":["http://127.0.0.1:7002"],"name":"node2","clientURLs":["http://127.0.0.1:4002"]}]}`),
+ want: memberCollection(
+ []Member{
+ {
+@@ -38,7 +38,7 @@ func TestMemberCollectionUnmarshal(t *testing.T) {
+ },
+ ClientURLs: []string{
+ "http://127.0.0.1:2379",
+- "http://127.0.0.1:4001",
++ "http://127.0.0.1:2379",
+ },
+ },
+ {
+--
+1.9.3
+
--
cgit v0.10.2
http://pkgs.fedoraproject.org/cgit/golang-github-coreos-go-etcd.git/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (el6). "Bump to
upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5 (..more)"
by notificationsï¼ fedoraproject.org
From 975fc257a16dcdfb2c8d6e82a56de027e815e1c3 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)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(a)redhat.com> - 2.0.0-0.3.git4cceaf7
+- Bump to upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5
+ resolves: #1246214
+
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)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/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (master). "Bump to
upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5 (..more)"
by notificationsï¼ fedoraproject.org
From 975fc257a16dcdfb2c8d6e82a56de027e815e1c3 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)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(a)redhat.com> - 2.0.0-0.3.git4cceaf7
+- Bump to upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5
+ resolves: #1246214
+
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)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/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months
jchaloup pushed to golang-github-coreos-go-etcd (f23). "Bump to
upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5 (..more)"
by notificationsï¼ fedoraproject.org
From 975fc257a16dcdfb2c8d6e82a56de027e815e1c3 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup(a)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(a)redhat.com> - 2.0.0-0.3.git4cceaf7
+- Bump to upstream 4cceaf7283b76f27c4a732b20730dcdb61053bf5
+ resolves: #1246214
+
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng(a)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/commi...
--
scm-commits mailing list
scm-commits(a)lists.fedoraproject.org
http://lists.fedoraproject.org/postorius/scm-commits@lists.fedoraproject.org
8Â years, 3Â months