Compare commits

..

No commits in common. "rawhide" and "f25" have entirely different histories.

25 changed files with 961 additions and 983 deletions

21
.gitignore vendored
View file

@ -1,20 +1 @@
/etcd-3.2.16.tar.gz
/man-3.2.16.tar.gz
/etcd-e1ca3b4434945e57e8e3a451cdbde74a903cc8e1.tar.gz
/man-3.3.12.tar.gz
/etcd-f29b1ada19713544b698dab8c94c97cfa1e83dac.tar.gz
/etcd-cca0d5c1bed134ac30e1354241f7655d2a118db4.tar.gz
/etcd-3.3.13.tar.gz
/man-3.3.13.tar.gz
/etcd-3.4.3.tar.gz
/man-3.4.3.tar.gz
/etcd-3.4.7.tar.gz
/man-3.4.7.tar.gz
/etcd-3.4.13.tar.gz
/man-3.4.13.tar.gz
/etcd-3.4.14.tar.gz
/man-3.4.14.tar.gz
/etcd-3.5.0.tar.gz
/etcd-3.5.5.tar.gz
/etcd-3.5.11.tar.gz
/etcd-3.5.13.tar.gz
/etcd-21fdcc6.tar.gz

View file

@ -1,18 +0,0 @@
etcdctl*.1 to etcdctl3*.1
for line in $(ls *.1); do mv $line $(echo $line | sed "s/etcdctl/etcdctl3/"); done
rename refs in man pages
sed -i "s/\\\fBetcdctl\\\-/\\\fBetcdctl3\\\-/g" *.1
sed -i s"/^etcdctl/ETCDCTL=3 etcdctl/" etcdctl3*.1
etcdctl*.1 to etcdctl2*.1
for line in $(ls *.1); do mv $line $(echo $line | sed "s/etcdctl/etcdctl3/"); done
rename refs in man pages
sed -i "s/\\\fBetcdctl-/\\\fBetcdctl2-/g" *.1

123
change-import-path.patch Normal file
View file

@ -0,0 +1,123 @@
From 71992717744ac018f5551289ca5bb2f0aafe477d Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Mon, 23 Jan 2017 12:54:00 +0100
Subject: [PATCH] change import path
---
tools/benchmark/cmd/lease.go | 2 +-
tools/benchmark/cmd/put.go | 2 +-
tools/benchmark/cmd/range.go | 2 +-
tools/benchmark/cmd/root.go | 2 +-
tools/benchmark/cmd/stm.go | 2 +-
tools/benchmark/cmd/watch.go | 2 +-
tools/benchmark/cmd/watch_get.go | 2 +-
tools/benchmark/cmd/watch_latency.go | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/benchmark/cmd/lease.go b/tools/benchmark/cmd/lease.go
index 4c21f9f..b057105 100644
--- a/tools/benchmark/cmd/lease.go
+++ b/tools/benchmark/cmd/lease.go
@@ -23,7 +23,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
var leaseKeepaliveCmd = &cobra.Command{
diff --git a/tools/benchmark/cmd/put.go b/tools/benchmark/cmd/put.go
index 57d8564..6896af2 100644
--- a/tools/benchmark/cmd/put.go
+++ b/tools/benchmark/cmd/put.go
@@ -28,7 +28,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
"golang.org/x/time/rate"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// putCmd represents the put command
diff --git a/tools/benchmark/cmd/range.go b/tools/benchmark/cmd/range.go
index 1a83d22..cf1eb31 100644
--- a/tools/benchmark/cmd/range.go
+++ b/tools/benchmark/cmd/range.go
@@ -26,7 +26,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
"golang.org/x/time/rate"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// rangeCmd represents the range command
diff --git a/tools/benchmark/cmd/root.go b/tools/benchmark/cmd/root.go
index e37e87c..2659966 100644
--- a/tools/benchmark/cmd/root.go
+++ b/tools/benchmark/cmd/root.go
@@ -21,7 +21,7 @@ import (
"github.com/coreos/etcd/pkg/transport"
"github.com/spf13/cobra"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// This represents the base command when called without any subcommands
diff --git a/tools/benchmark/cmd/stm.go b/tools/benchmark/cmd/stm.go
index 7f98ed1..b816ad2 100644
--- a/tools/benchmark/cmd/stm.go
+++ b/tools/benchmark/cmd/stm.go
@@ -27,7 +27,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// stmCmd represents the STM benchmark command
diff --git a/tools/benchmark/cmd/watch.go b/tools/benchmark/cmd/watch.go
index b73e4f2..c60af37 100644
--- a/tools/benchmark/cmd/watch.go
+++ b/tools/benchmark/cmd/watch.go
@@ -27,7 +27,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// watchCmd represents the watch command
diff --git a/tools/benchmark/cmd/watch_get.go b/tools/benchmark/cmd/watch_get.go
index 3eb4a1b..1c0fd16 100644
--- a/tools/benchmark/cmd/watch_get.go
+++ b/tools/benchmark/cmd/watch_get.go
@@ -24,7 +24,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// watchGetCmd represents the watch command
diff --git a/tools/benchmark/cmd/watch_latency.go b/tools/benchmark/cmd/watch_latency.go
index 0f1f5db..a2cb806 100644
--- a/tools/benchmark/cmd/watch_latency.go
+++ b/tools/benchmark/cmd/watch_latency.go
@@ -25,7 +25,7 @@ import (
"github.com/spf13/cobra"
"golang.org/x/net/context"
"golang.org/x/time/rate"
- "gopkg.in/cheggaaa/pb.v1"
+ "github.com/cheggaaa/pb"
)
// watchLatencyCmd represents the watch latency command
--
2.7.4

426
changelog
View file

@ -1,426 +0,0 @@
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.14-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sat Dec 26 16:38:31 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 3.4.14-1
- Update to 3.4.14
- Close: rhbz#1901781
* Fri Sep 04 00:08:52 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 3.4.13-1
- Update to 3.4.13
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.7-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sun Apr 05 15:36:23 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 3.4.7-1
- Update to 3.4.7
* Mon Feb 17 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.3.13-5
- Rebuilt for GHSA-jf24-p9p9-4rjh
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 10 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.3.13-2
- Add Obsoletes for old name
* Wed May 08 01:20:48 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.3.13-1
- Release 3.3.13
* Tue Apr 16 15:51:11 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.3.12-4.20190413gitf29b1ad
- etcd.service: do not pass command line flags already defined in environment
* Mon Apr 15 15:11:24 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.3.12-3.20190413gitf29b1ad
- Fix building of etcd
* Sat Apr 13 22:31:30 CET 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.3.12-2.20190413gitf29b1ad
- Bump to commit f29b1ada19713544b698dab8c94c97cfa1e83dac
* Thu Mar 14 2019 Robert-André Mauchin <zebob.m@gmail.com> - 3.3.12-1.20190314gite1ca3b4
- Bump to commit e1ca3b4434945e57e8e3a451cdbde74a903cc8e1
- Add new goipath
- Updated patches
- Updated man pages
* Sun Feb 17 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 3.2.16-6
- Fix broken version specification
- Backport variadic parameter fix
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.16-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Oct 23 2018 Nicolas Mailhot <nim@fedoraproject.org> - 3.2.16-4
- redhat-rpm-config-123 triggers bugs in gosetup, remove it from Go spec files as its just an alias
- https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/RWD5YATAYAFWKIDZBB7EB6N5DAO4ZKFM/
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.16-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Mar 20 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.16-2
- Put back the missing prep, post, preun and postun scripts
resolves: #1557356
* Fri Mar 09 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.16-1.git121edf0
- Update to 3.2.16
* Tue Mar 06 2018 Jan Chaloupka <jchaloup@redhat.com> - 3.2.7-5.gitbb66589
- Update to spec 3.0
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Nov 30 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.7-3
- Polish the spec file
* Tue Nov 07 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.7-2
- Generate man pages
* Sun Sep 24 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.7-1
- Update to 3.2.7
related: #1448611
* Tue Aug 15 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.2.5-1
- Update to 3.2.5
resolves: #1448611
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sun Jun 11 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.9-1
- Update to 3.1.9
resolves: #1460496
* Mon Jun 05 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.8-1
Update to 3.1.8
resolves: #1458717
* Tue May 02 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.7-1
- Update to 3.1.7
resolves: #1447232
* Thu Apr 20 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.6-1
- Update to 3.1.6
resolves: #1444068
* Tue Mar 28 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.5-1
- Update to 3.1.5
resolves: #1436452
* Mon Mar 27 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.4-1
- Update to 3.1.4
resolves: #1435028
* Mon Mar 20 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.3-1
- Update to v3.1.3
related: #1415341
* Tue Mar 14 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.0-1
- Update to v3.1.0
related: #1415341
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 23 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.0.17-1
- Update to v3.0.17
etcd-top removed by upstream
resolves: #1415622
* Fri Nov 18 2016 jchaloup <jchaloup@redhat.com> - 3.0.15-2
- Remove ppc64le architecture restriction
resolves: #1396463
* Tue Nov 15 2016 jchaloup <jchaloup@redhat.com> - 3.0.15-1
- Update to v3.0.15
related: #1382965
* Mon Nov 07 2016 jchaloup <jchaloup@redhat.com> - 3.0.14-1
- Update to v3.0.14
related: #1382965
* Thu Oct 27 2016 jchaloup <jchaloup@redhat.com> - 3.0.13-1
- Update to v3.0.13
related: #1382965
* Mon Oct 24 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-2
- Extend supported architectures with s390x
* Thu Oct 13 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-1
- Update to v3.0.12
related: #1382965
* Fri Sep 16 2016 jchaloup <jchaloup@redhat.com> - 3.0.9-1
- Update to v3.0.9
related: #1374880
* Wed Sep 14 2016 jchaloup <jchaloup@redhat.com> - 3.0.8-1
- Update to v3.0.8
resolves: #1374880
* Fri Sep 09 2016 jchaloup <jchaloup@redhat.com> - 3.0.7-1
- Update to v3.0.7
resolves: #1370678
* Tue Aug 16 2016 jchaloup <jchaloup@redhat.com> - 3.0.4-2
- Hack test to provide ability to run unit-tests and integration tests
Still, keeping it disabled by default as it keeps failing
related: #1351818
* Tue Aug 02 2016 jchaloup <jchaloup@redhat.com> - 3.0.4-1
- Update to 3.0.4
related: #1351818
* Thu Jul 28 2016 jchaloup <jchaloup@redhat.com> - 3.0.2-1
- Update to 3.0.2
resolves: #1351818
* Thu Jul 21 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-0.2.beta0
- https://fedoraproject.org/wiki/Changes/golang1.7
* Sun May 15 2016 jchaloup <jchaloup@redhat.com> - 3.0.0-0.1.beta0
- Update to v3.0.0-beta0 (build from bundled until new deps appear in dist-git)
resolves: #1333988
* Sat Apr 30 2016 jchaloup <jchaloup@redhat.com> - 2.3.3-1
- Update to v2.3.3
resolves: #1331896
* Fri Apr 22 2016 jchaloup <jchaloup@redhat.com> - 2.3.2-1
- Update to v2.3.2
resolves: #1329438
* Sat Apr 9 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.3.1-3
- Enable aarch64
* Wed Apr 06 2016 jchaloup <jchaloup@redhat.com> - 2.3.1-2
- Don't apply patch (for tests only which are disabled atm)
* Mon Apr 04 2016 jchaloup <jchaloup@redhat.com> - 2.3.1-1
- Update to v.2.3.1
resolves: #1323375
* Sun Mar 20 2016 jchaloup <jchaloup@redhat.com> - 2.3.0-1
- Update to v2.3.0
resolves: #1314441
* Wed Mar 09 2016 jchaloup <jchaloup@redhat.com> - 2.2.5-4
- Only ppc64le is supported, ppc64 not
related: #1315419
* Tue Mar 08 2016 jchaloup <jchaloup@redhat.com> - 2.2.5-3
- Extend archs to all supported
resolves: #1315419
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
- https://fedoraproject.org/wiki/Changes/golang1.6
* Thu Feb 18 2016 jchaloup <jchaloup@redhat.com> - 2.2.5-1
- Update to v2.2.5
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 21 2016 jchaloup <jchaloup@redhat.com> - 2.2.4-1
- Update to v2.2.4
resolves: #1300558
* Fri Jan 08 2016 jchaloup <jchaloup@redhat.com> - 2.2.3-1
- Update to v2.2.3
resolves: #1296809
* Tue Dec 29 2015 jchaloup <jchaloup@redhat.com> - 2.2.2-2
- add missing options to etcd help (thanks to Joy Pu ypu@redhat.com)
- add more information when running etcd as a service
* Mon Dec 07 2015 jchaloup <jchaloup@redhat.com> - 2.2.2-1
- Update to v2.2.2
* Mon Nov 16 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-4
- Update etcd.conf: add new options, fix current
* Fri Oct 30 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-3
- Add After=network-online.target and Wants=network-online.target
to etcd.service
* Tue Oct 20 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-2
- Set Type=notify instead of simple in etcd.service (upstream #1576)
related: #1272438
* Fri Oct 16 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-1
- Update to v2.2.1
resolves: #1272438
* Fri Sep 11 2015 jchaloup <jchaloup@redhat.com> - 2.2.0-1
- Update to v2.2.0 (etcd-migrate gone)
- Update to spec-2.1
resolves: #1253864
* Mon Aug 31 2015 jchaloup <jchaloup@redhat.com> - 2.1.2-1
- Update to v2.1.2
resolves: #1258599
* Thu Jul 30 2015 jchaloup <jchaloup@redhat.com> - 2.1.1-2
- Enable debug info again
related: #1214958
* Mon Jul 20 2015 jchaloup <jchaloup@redhat.com> - 2.1.1-1
- fix definition of GOPATH for go1.5
- fix definition of gobuild function for non-debug way
- Update to v2.1.1
resolves: #1214958
* Fri Jul 10 2015 jchaloup <jchaloup@redhat.com> - 2.0.13-3
- set GOMAXPROCS to use all processors available
* Mon Jun 29 2015 jchaloup <jchaloup@redhat.com> - 2.0.13-2
- Remove -s option from -ldflags string as it removes symbol table
'go tool l6' gives explanation of all available options
resolves: #1236320
* Fri Jun 26 2015 jchaloup <jchaloup@redhat.com> - 2.0.13-1
- Update to v2.0.13
* Thu Jun 25 2015 jchaloup <jchaloup@redhat.com> - 2.0.12-2
- Add restart policy and set LimitNOFILE to/in etcd.service file
- Update etcd.config file: add new flags and remove depricated
- Update 'go build' flags for GIT_SHA (used in build script)
- Don't use 4001 and 7001 ports in etcd.conf, they are replaced with 2379 and 2380
* Wed Jun 24 2015 jchaloup <jchaloup@redhat.com> - 2.0.12-1
- Update to v2.0.12
- Polish spec file
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 22 2015 jchaloup <jchaloup@redhat.com> - 2.0.11-2
- ETCD_ADVERTISE_CLIENT_URLS has to be set if ETCD_LISTEN_CLIENT_URLS is
related: #1222416
* Mon May 18 2015 jchaloup <jchaloup@redhat.com> - 2.0.11-1
- Update to v2.0.11
resolves: #1222416
* Thu Apr 23 2015 jchaloup <jchaloup@redhat.com> - 2.0.10-1
- Update to v2.0.10
resolves: #1214705
* Wed Apr 08 2015 jchaloup <jchaloup@redhat.com> - 2.0.9-1
- Update to v2.0.9
resolves: #1209666
* Fri Apr 03 2015 jchaloup <jchaloup@redhat.com> - 2.0.8-0.2
- Update spec file to fit for rhel too (thanks to eparis)
related: #1207881
* Wed Apr 01 2015 jchaloup <jchaloup@redhat.com> - 2.0.8-0.1
- Update to v2.0.8
resolves: #1207881
* Tue Mar 31 2015 jchaloup <jchaloup@redhat.com> - 2.0.7-0.1
- Update to v2.0.7
Add Godeps.json to doc
related: #1191441
* Thu Mar 12 2015 jchaloup <jchaloup@redhat.com> - 2.0.5-0.1
- Bump to 9481945228b97c5d019596b921d8b03833964d9e (v2.0.5)
* Tue Mar 10 2015 Eric Paris <eparis@redhat.com> - 2.0.3-0.2
- Fix .service files to work if no config file
* Fri Feb 20 2015 jchaloup <jchaloup@redhat.com> - 2.0.3-0.1
- Bump to upstream 4d728cc8c488a545a8bdeafd054d9ccc2bfb6876
* Wed Feb 18 2015 jchaloup <jchaloup@redhat.com> - 2.0.1-0.2
- Update configuration and service file
Fix depricated ErrWrongType after update of gogo/protobuf
related: #1191441
* Wed Feb 11 2015 jchaloup <jchaloup@redhat.com> - 2.0.1-0.1
- Update to 2.0.1
resolves: #1191441
* Mon Feb 09 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.5
- Add missing debug info to binaries (patch from Jan Kratochvil)
resolves: #1184257
* Fri Jan 30 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.4
- Update to etcd-2.0.0
- use gopath as the last directory to search for source code
related: #1176138
* Mon Jan 26 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.3.rc1
- default to /var/lib/etcd/default.etcd as 2.0 uses that default (f21 commit byt eparis)
related: #1176138
fix /etc/etcd/etcd.conf path
* Tue Jan 20 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.2.rc1
- Update of BuildRequires/Requires, Provides and test
Add BuildRequire on jonboulle/clockwork
related: #1176138
* Tue Dec 23 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 2.0.0-0.1.rc1
- Resolves: rhbz#1176138 - update to v2.0.0-rc1
- do not redefine gopath
- use jonboulle/clockwork from within Godeps
* Fri Oct 17 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-7
- Add ExclusiveArch for go_arches
* Mon Oct 06 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-6
- related: #1047194
Remove dependency on go.net
* Mon Oct 06 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-5
- Fix the .service file so it can launch!
related: #1047194
* 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

View file

@ -10,7 +10,7 @@ WorkingDirectory=/var/lib/etcd/
EnvironmentFile=-/etc/etcd/etcd.conf
User=etcd
# set GOMAXPROCS to number of processors
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/bin/etcd"
ExecStart=/bin/bash -c "GOMAXPROCS=$(nproc) /usr/bin/etcd --name=\"${ETCD_NAME}\" --data-dir=\"${ETCD_DATA_DIR}\" --listen-client-urls=\"${ETCD_LISTEN_CLIENT_URLS}\""
Restart=on-failure
LimitNOFILE=65536

800
etcd.spec
View file

@ -1,131 +1,397 @@
# Generated by go2rpm 1.8.2
%bcond_without check
%bcond_with bootstrap
%if %{with bootstrap}
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
%if 0%{?fedora}
%global with_devel 1
%global with_bundled 0
%global with_debug 1
# Some tests fails and it takes a lot of time to investigate
# what is wrong
%global with_check 0
%global with_unit_test 1
%else
%global with_devel 0
%global with_bundled 1
%global with_debug 0
%global with_check 0
%global with_unit_test 0
%endif
# https://github.com/etcd-io/etcd
%global goipath go.etcd.io/etcd
%global forgeurl https://github.com/etcd-io/etcd
Version: 3.5.13
%if 0%{?with_debug}
%global _dwz_low_mem_die_limit 0
%else
%global debug_package %{nil}
%endif
%gometa
%if ! 0%{?gobuild:1}
%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
%endif
%global common_description %{expand:
Distributed reliable key-value store for the most critical data of a distributed
system.}
%global provider github
%global provider_tld com
%global project coreos
%global repo etcd
# https://github.com/coreos/etcd
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path %{provider_prefix}
%global commit 21fdcc6443f3267111051240f0eca839acc96a39
%global shortcommit %(c=%{commit}; echo ${c:0:7})
%global golicenses LICENSE NOTICE
%global godocs CONTRIBUTING.md README.md Documentation\\\
README-*.md READMEv2-etcdctl.md
Name: %{repo}
Version: 3.1.3
Release: 1%{?dist}
Summary: A highly-available key value store for shared configuration
License: ASL 2.0
URL: https://%{provider_prefix}
Source0: https://%{provider_prefix}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz
Source1: %{name}.service
Source2: %{name}.conf
Patch2: change-import-path.patch
Patch3: run-etcd-on-ppc64le-by-default.patch
%global gosupfiles client/v2/example_keys_test.go\\\
client/v3/clientv3util/example_key_test.go\\\
client/v3/concurrency/example_election_test.go\\\
client/v3/concurrency/example_mutex_test.go\\\
client/v3/concurrency/example_stm_test.go\\\
client/v3/example_auth_test.go\\\
client/v3/example_cluster_test.go\\\
client/v3/example_kv_test.go\\\
client/v3/example_lease_test.go\\\
client/v3/example_maintenance_test.go\\\
client/v3/example_metrics_test.go\\\
client/v3/example_test.go\\\
client/v3/example_watch_test.go
# e.g. el6 has ppc64 arch without gcc-go, so EA tag is required
ExclusiveArch: %{ix86} x86_64 %{arm} aarch64 ppc64le s390x
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
Name: etcd
Release: %autorelease
Summary: Distributed reliable key-value store for the most critical data of a distributed system
%if ! 0%{?with_bundled}
BuildRequires: golang(github.com/bgentry/speakeasy)
BuildRequires: golang(github.com/boltdb/bolt)
BuildRequires: golang(github.com/cheggaaa/pb)
BuildRequires: golang(github.com/cockroachdb/cmux)
BuildRequires: golang(github.com/coreos/go-semver/semver)
BuildRequires: golang(github.com/coreos/go-systemd/daemon)
BuildRequires: golang(github.com/coreos/go-systemd/util)
BuildRequires: golang(github.com/coreos/pkg/capnslog)
BuildRequires: golang(github.com/dustin/go-humanize)
BuildRequires: golang(github.com/ghodss/yaml)
BuildRequires: golang(github.com/gogo/protobuf/proto)
BuildRequires: golang(github.com/golang/protobuf/proto)
BuildRequires: golang(github.com/google/btree)
BuildRequires: golang(github.com/grpc-ecosystem/go-grpc-prometheus)
BuildRequires: golang(github.com/grpc-ecosystem/grpc-gateway/runtime)
BuildRequires: golang(github.com/grpc-ecosystem/grpc-gateway/utilities)
BuildRequires: golang(github.com/jonboulle/clockwork)
BuildRequires: golang(github.com/karlseguin/ccache)
BuildRequires: golang(github.com/kr/pty)
BuildRequires: golang(github.com/olekukonko/tablewriter)
BuildRequires: golang(github.com/prometheus/client_golang/prometheus)
BuildRequires: golang(github.com/spf13/cobra)
BuildRequires: golang(github.com/spf13/pflag)
BuildRequires: golang(github.com/ugorji/go/codec)
BuildRequires: golang(github.com/urfave/cli)
BuildRequires: golang(github.com/xiang90/probing)
BuildRequires: golang(golang.org/x/crypto/bcrypt)
BuildRequires: golang(golang.org/x/net/context)
BuildRequires: golang(golang.org/x/net/http2)
BuildRequires: golang(golang.org/x/time/rate)
BuildRequires: golang(google.golang.org/grpc)
BuildRequires: golang(google.golang.org/grpc/codes)
BuildRequires: golang(google.golang.org/grpc/credentials)
BuildRequires: golang(google.golang.org/grpc/grpclog)
BuildRequires: golang(google.golang.org/grpc/metadata)
BuildRequires: golang(google.golang.org/grpc/naming)
BuildRequires: golang(google.golang.org/grpc/transport)
%endif
License: Apache-2.0
URL: %{gourl}
Source0: %{gosource}
Source1: %{name}.service
Source2: %{name}.conf
BuildRequires: systemd
BuildRequires: python3-devel
BuildRequires: systemd-rpm-macros
Requires(pre): shadow-utils
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%description %{common_description}
%description
A highly-available key value store for shared configuration.
%gopkg
%if 0%{?with_devel}
%package devel
Summary: etcd golang devel libraries
BuildArch: noarch
%if 0%{?with_check}
BuildRequires: golang(github.com/bgentry/speakeasy)
BuildRequires: golang(github.com/boltdb/bolt)
BuildRequires: golang(github.com/cheggaaa/pb)
BuildRequires: golang(github.com/cockroachdb/cmux)
BuildRequires: golang(github.com/coreos/go-semver/semver)
BuildRequires: golang(github.com/coreos/go-systemd/daemon)
BuildRequires: golang(github.com/coreos/go-systemd/util)
BuildRequires: golang(github.com/coreos/pkg/capnslog)
BuildRequires: golang(github.com/dustin/go-humanize)
BuildRequires: golang(github.com/ghodss/yaml)
BuildRequires: golang(github.com/gogo/protobuf/proto)
BuildRequires: golang(github.com/golang/protobuf/proto)
BuildRequires: golang(github.com/google/btree)
BuildRequires: golang(github.com/grpc-ecosystem/go-grpc-prometheus)
BuildRequires: golang(github.com/grpc-ecosystem/grpc-gateway/runtime)
BuildRequires: golang(github.com/grpc-ecosystem/grpc-gateway/utilities)
BuildRequires: golang(github.com/jonboulle/clockwork)
BuildRequires: golang(github.com/karlseguin/ccache)
BuildRequires: golang(github.com/kr/pty)
BuildRequires: golang(github.com/olekukonko/tablewriter)
BuildRequires: golang(github.com/prometheus/client_golang/prometheus)
BuildRequires: golang(github.com/spf13/cobra)
BuildRequires: golang(github.com/spf13/pflag)
BuildRequires: golang(github.com/ugorji/go/codec)
BuildRequires: golang(github.com/urfave/cli)
BuildRequires: golang(github.com/xiang90/probing)
BuildRequires: golang(golang.org/x/crypto/bcrypt)
BuildRequires: golang(golang.org/x/net/context)
BuildRequires: golang(golang.org/x/net/http2)
BuildRequires: golang(golang.org/x/time/rate)
BuildRequires: golang(google.golang.org/grpc)
BuildRequires: golang(google.golang.org/grpc/codes)
BuildRequires: golang(google.golang.org/grpc/credentials)
BuildRequires: golang(google.golang.org/grpc/grpclog)
BuildRequires: golang(google.golang.org/grpc/metadata)
BuildRequires: golang(google.golang.org/grpc/naming)
%endif
Requires: golang(github.com/bgentry/speakeasy)
Requires: golang(github.com/boltdb/bolt)
Requires: golang(github.com/cheggaaa/pb)
Requires: golang(github.com/cockroachdb/cmux)
Requires: golang(github.com/coreos/go-semver/semver)
Requires: golang(github.com/coreos/go-systemd/daemon)
Requires: golang(github.com/coreos/go-systemd/util)
Requires: golang(github.com/coreos/pkg/capnslog)
Requires: golang(github.com/dustin/go-humanize)
Requires: golang(github.com/ghodss/yaml)
Requires: golang(github.com/gogo/protobuf/proto)
Requires: golang(github.com/golang/protobuf/proto)
Requires: golang(github.com/google/btree)
Requires: golang(github.com/grpc-ecosystem/go-grpc-prometheus)
Requires: golang(github.com/grpc-ecosystem/grpc-gateway/runtime)
Requires: golang(github.com/grpc-ecosystem/grpc-gateway/utilities)
Requires: golang(github.com/jonboulle/clockwork)
Requires: golang(github.com/karlseguin/ccache)
Requires: golang(github.com/kr/pty)
Requires: golang(github.com/olekukonko/tablewriter)
Requires: golang(github.com/prometheus/client_golang/prometheus)
Requires: golang(github.com/spf13/cobra)
Requires: golang(github.com/spf13/pflag)
Requires: golang(github.com/ugorji/go/codec)
Requires: golang(github.com/urfave/cli)
Requires: golang(github.com/xiang90/probing)
Requires: golang(golang.org/x/crypto/bcrypt)
Requires: golang(golang.org/x/net/context)
Requires: golang(golang.org/x/net/http2)
Requires: golang(golang.org/x/time/rate)
Requires: golang(google.golang.org/grpc)
Requires: golang(google.golang.org/grpc/codes)
Requires: golang(google.golang.org/grpc/credentials)
Requires: golang(google.golang.org/grpc/grpclog)
Requires: golang(google.golang.org/grpc/metadata)
Requires: golang(google.golang.org/grpc/naming)
Provides: golang(%{import_path}/alarm) = %{version}-%{release}
Provides: golang(%{import_path}/auth) = %{version}-%{release}
Provides: golang(%{import_path}/auth/authpb) = %{version}-%{release}
Provides: golang(%{import_path}/client) = %{version}-%{release}
Provides: golang(%{import_path}/clientv3) = %{version}-%{release}
Provides: golang(%{import_path}/clientv3/concurrency) = %{version}-%{release}
Provides: golang(%{import_path}/clientv3/integration) = %{version}-%{release}
Provides: golang(%{import_path}/clientv3/mirror) = %{version}-%{release}
Provides: golang(%{import_path}/compactor) = %{version}-%{release}
Provides: golang(%{import_path}/contrib/recipes) = %{version}-%{release}
Provides: golang(%{import_path}/discovery) = %{version}-%{release}
Provides: golang(%{import_path}/e2e) = %{version}-%{release}
Provides: golang(%{import_path}/error) = %{version}-%{release}
Provides: golang(%{import_path}/etcdctl/ctlv2) = %{version}-%{release}
Provides: golang(%{import_path}/etcdctl/ctlv2/command) = %{version}-%{release}
Provides: golang(%{import_path}/etcdctl/ctlv3) = %{version}-%{release}
Provides: golang(%{import_path}/etcdctl/ctlv3/command) = %{version}-%{release}
Provides: golang(%{import_path}/etcdmain) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/api) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/api/v2http) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/api/v2http/httptypes) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/api/v3rpc) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/api/v3rpc/rpctypes) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/auth) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/etcdserverpb) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/membership) = %{version}-%{release}
Provides: golang(%{import_path}/etcdserver/stats) = %{version}-%{release}
Provides: golang(%{import_path}/integration) = %{version}-%{release}
Provides: golang(%{import_path}/lease) = %{version}-%{release}
Provides: golang(%{import_path}/lease/leasehttp) = %{version}-%{release}
Provides: golang(%{import_path}/lease/leasepb) = %{version}-%{release}
Provides: golang(%{import_path}/mvcc) = %{version}-%{release}
Provides: golang(%{import_path}/mvcc/backend) = %{version}-%{release}
Provides: golang(%{import_path}/mvcc/mvccpb) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/adt) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/contention) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/cors) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/crc) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/expect) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/fileutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/flags) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/httputil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/idutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/ioutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/logutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/mock/mockstorage) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/mock/mockstore) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/mock/mockwait) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/netutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/osutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/pathutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/pbutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/runtime) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/schedule) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/testutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/tlsutil) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/transport) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/types) = %{version}-%{release}
Provides: golang(%{import_path}/pkg/wait) = %{version}-%{release}
Provides: golang(%{import_path}/proxy/grpcproxy) = %{version}-%{release}
Provides: golang(%{import_path}/proxy/grpcproxy/cache) = %{version}-%{release}
Provides: golang(%{import_path}/proxy/httpproxy) = %{version}-%{release}
Provides: golang(%{import_path}/proxy/tcpproxy) = %{version}-%{release}
Provides: golang(%{import_path}/raft) = %{version}-%{release}
Provides: golang(%{import_path}/raft/raftpb) = %{version}-%{release}
Provides: golang(%{import_path}/raft/rafttest) = %{version}-%{release}
Provides: golang(%{import_path}/rafthttp) = %{version}-%{release}
Provides: golang(%{import_path}/snap) = %{version}-%{release}
Provides: golang(%{import_path}/snap/snappb) = %{version}-%{release}
Provides: golang(%{import_path}/store) = %{version}-%{release}
Provides: golang(%{import_path}/tools/benchmark/cmd) = %{version}-%{release}
Provides: golang(%{import_path}/tools/functional-tester/etcd-agent/client) = %{version}-%{release}
Provides: golang(%{import_path}/version) = %{version}-%{release}
Provides: golang(%{import_path}/wal) = %{version}-%{release}
Provides: golang(%{import_path}/wal/walpb) = %{version}-%{release}
%description devel
golang development libraries for etcd, a highly-available key value store for
shared configuration.
%endif
%if 0%{?with_unit_test} && 0%{?with_devel}
%package unit-test
Summary: Unit tests for %{name} package
# If go_compiler is not set to 1, there is no virtual provide. Use golang instead.
BuildRequires: %{?go_compiler:compiler(go-compiler)}%{!?go_compiler:golang}
%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
%goprep -k
rm -rf vendor/
rm -rf cmd/vendor
rm -rf raft/rafttest
%setup -q -n %{name}-%{commit}
# move content of vendor under Godeps as has been so far
mkdir -p Godeps/_workspace/src
mv cmd/vendor/* Godeps/_workspace/src/.
for d in contrib etcdctl etcdutl pkg raft hack security; do
mv $d/README.md README-$d.md
done
mv etcdctl/READMEv2.md READMEv2-etcdctl.md
mv client/v2/README.md README-clientv2.md
mv client/v3/README.md README-clientv3.md
mkdir -p api/v3/ client/pkg/v3 etcdctl/v3 etcdutl/v3 pkg/v3 raft/v3 server/v3 tools/v3
shopt -s extglob
mv api/!(v3) api/v3/.
mv client/pkg/!(v3) client/pkg/v3/.
mv etcdctl/!(v3) etcdctl/v3/.
mv etcdutl/!(v3) etcdutl/v3/.
mv pkg/!(v3) pkg/v3/.
mv raft/!(v3) raft/v3/.
mv server/!(v3) server/v3/.
mv tools/!(v3) tools/v3/.
shopt -u extglob
%if %{without bootstrap}
%generate_buildrequires
%go_generate_buildrequires
# Create a sysusers.d config file
cat >etcd.sysusers.conf <<EOF
u etcd - 'etcd user' %{_sharedstatedir}/%{name} -
EOF
%patch2 -p1
%patch3 -p1
%build
%gobuild -o %{gobuilddir}/bin/etcd %{goipath}/server/v3
%gobuild -o %{gobuilddir}/bin/etcdctl %{goipath}/etcdctl/v3
%gobuild -o %{gobuilddir}/bin/etcdutl %{goipath}/etcdutl/v3
mkdir -p src/github.com/coreos
ln -s ../../../ src/github.com/coreos/etcd
%if ! 0%{?with_bundled}
export GOPATH=$(pwd):%{gopath}
%else
export GOPATH=$(pwd):$(pwd)/Godeps/_workspace:%{gopath}
%endif
export LDFLAGS="-X %{import_path}/version.GitSHA=%{shortcommit}"
%gobuild -o bin/etcd %{import_path}/cmd/etcd
%gobuild -o bin/etcdctl %{import_path}/etcdctl
%install
%gopkginstall
%if %{without bootstrap}
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/
install -Dpm 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -dm 0755 %{buildroot}%{_sysconfdir}/%{name}
install -pm 644 -t %{buildroot}%{_sysconfdir}/%{name} %{SOURCE2}
install -D -p -m 0755 bin/%{name} %{buildroot}%{_bindir}/%{name}
install -D -p -m 0755 bin/%{name}ctl %{buildroot}%{_bindir}/%{name}ctl
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}
install -m 644 -t %{buildroot}%{_sysconfdir}/%{name} %{SOURCE2}
# And create /var/lib/etcd
install -dm 0755 %{buildroot}%{_sharedstatedir}/%{name}
install -d -m 0755 %{buildroot}%{_sharedstatedir}/%{name}
install -m0644 -D etcd.sysusers.conf %{buildroot}%{_sysusersdir}/etcd.conf
%if %{with check}
%check
%gocheck -d client/v2 \
-d client/v3 \
-d raft/v3 \
-d server/v3/auth \
-d server/v3/wal/walpb \
-d tests/e2ev \
-d tests/integration \
-d tests/e2e \
-d tests/integration/client \
-t tests/integration/clientv3 \
-d server/v3/etcdserver/api/membership \
-d server/v3/mvcc/backend \
-d pkg/v3/proxy
# source codes for building projects
%if 0%{?with_devel}
install -d -p %{buildroot}/%{gopath}/src/%{import_path}/
echo "%%dir %%{gopath}/src/%%{import_path}/." >> devel.file-list
# 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
install -dp %{buildroot}/%{gopath}/src/%{import_path}/integration/
cp -rpav integration/fixtures %{buildroot}/%{gopath}/src/%{import_path}/integration/.
echo "%%{gopath}/src/%%{import_path}/integration/fixtures" >> unit-test.file-list
install -dp %{buildroot}/%{gopath}/src/%{import_path}/etcdserver/api/v2http/testdata
cp -rpav etcdserver/api/v2http/testdata %{buildroot}/%{gopath}/src/%{import_path}/etcdserver/api/v2http/.
echo "%%{gopath}/src/%%{import_path}/etcdserver/api/v2http/testdata" >> unit-test.file-list
%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 ! 0%{?with_bundled}
export GOPATH=%{buildroot}/%{gopath}:%{gopath}
%else
export GOPATH=%{buildroot}/%{gopath}:$(pwd)/Godeps/_workspace:%{gopath}
%endif
%if ! 0%{?gotest:1}
%global gotest go test
%endif
%ifarch x86_64
RACE="--race"
%else
RACE=""
%endif
# unit-tests
# TODO(jchaloup): read all the envs from test file
export IGNORE_PKGS="(cmd|vendor|etcdserverpb|rafttest)"
export INTEGRATION_PKGS="(integration|e2e|contrib|functional-tester)"
export TEST_PKGS=`find . -name \*_test.go | while read a; do dirname $a; done | sort | uniq | egrep -v "$IGNORE_PKGS" | sed "s|\./||g"`
export TESTS=`echo "$TEST_PKGS" | egrep -v "$INTEGRATION_PKGS"`
for test in ${TESTS}; do
%gotest -timeout 3m -cover ${RACE} -cpu 1,2,4 -run=Test github.com/coreos/etcd/${test}
done
./test
%endif
%pre
getent group %{name} >/dev/null || groupadd -r %{name}
getent passwd %{name} >/dev/null || useradd -r -g %{name} -d %{_sharedstatedir}/%{name} \
-s /sbin/nologin -c "etcd user" %{name}
%post
%systemd_post %{name}.service
@ -136,18 +402,332 @@ install -m0644 -D etcd.sysusers.conf %{buildroot}%{_sysusersdir}/etcd.conf
%postun
%systemd_postun %{name}.service
#define license tag if not already defined
%{!?_licensedir:%global license %doc}
%files
%license LICENSE
%doc CONTRIBUTING.md README.md
%doc Documentation README-*.md READMEv2-etcdctl.md
%{_bindir}/*
%doc *.md
%config(noreplace) %{_sysconfdir}/%{name}
%{_bindir}/%{name}
%{_bindir}/%{name}ctl
%dir %attr(-,%{name},%{name}) %{_sharedstatedir}/%{name}
%{_unitdir}/%{name}.service
%if 0%{?with_devel}
%files devel -f devel.file-list
%license LICENSE
%doc *.md
%doc glide.lock
%dir %{gopath}/src/%{provider}.%{provider_tld}/%{project}
%endif
%gopkgfiles
%{_sysusersdir}/etcd.conf
%if 0%{?with_unit_test}
%files unit-test -f unit-test.file-list
%license LICENSE
%doc *.md
%endif
%changelog
%autochangelog
* Mon Mar 20 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.3-1
- Update to v3.1.3
related: #1415341
* Tue Mar 14 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.1.0-1
- Update to v3.1.0
related: #1415341
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Jan 23 2017 Jan Chaloupka <jchaloup@redhat.com> - 3.0.17-1
- Update to v3.0.17
etcd-top removed by upstream
resolves: #1415622
* Fri Nov 18 2016 jchaloup <jchaloup@redhat.com> - 3.0.15-2
- Remove ppc64le architecture restriction
resolves: #1396463
* Tue Nov 15 2016 jchaloup <jchaloup@redhat.com> - 3.0.15-1
- Update to v3.0.15
related: #1382965
* Mon Nov 07 2016 jchaloup <jchaloup@redhat.com> - 3.0.14-1
- Update to v3.0.14
related: #1382965
* Thu Oct 27 2016 jchaloup <jchaloup@redhat.com> - 3.0.13-1
- Update to v3.0.13
related: #1382965
* Mon Oct 24 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-2
- Extend supported architectures with s390x
* Thu Oct 13 2016 jchaloup <jchaloup@redhat.com> - 3.0.12-1
- Update to v3.0.12
related: #1382965
* Fri Sep 16 2016 jchaloup <jchaloup@redhat.com> - 3.0.9-1
- Update to v3.0.9
related: #1374880
* Wed Sep 14 2016 jchaloup <jchaloup@redhat.com> - 3.0.8-1
- Update to v3.0.8
resolves: #1374880
* Fri Sep 09 2016 jchaloup <jchaloup@redhat.com> - 3.0.7-1
- Update to v3.0.7
resolves: #1370678
* Tue Aug 16 2016 jchaloup <jchaloup@redhat.com> - 3.0.4-2
- Hack test to provide ability to run unit-tests and integration tests
Still, keeping it disabled by default as it keeps failing
related: #1351818
* Tue Aug 02 2016 jchaloup <jchaloup@redhat.com> - 3.0.4-1
- Update to 3.0.4
related: #1351818
* Thu Jul 28 2016 jchaloup <jchaloup@redhat.com> - 3.0.2-1
- Update to 3.0.2
resolves: #1351818
* Thu Jul 21 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.0.0-0.2.beta0
- https://fedoraproject.org/wiki/Changes/golang1.7
* Sun May 15 2016 jchaloup <jchaloup@redhat.com> - 3.0.0-0.1.beta0
- Update to v3.0.0-beta0 (build from bundled until new deps appear in dist-git)
resolves: #1333988
* Sat Apr 30 2016 jchaloup <jchaloup@redhat.com> - 2.3.3-1
- Update to v2.3.3
resolves: #1331896
* Fri Apr 22 2016 jchaloup <jchaloup@redhat.com> - 2.3.2-1
- Update to v2.3.2
resolves: #1329438
* Sat Apr 9 2016 Peter Robinson <pbrobinson@fedoraproject.org> 2.3.1-3
- Enable aarch64
* Wed Apr 06 2016 jchaloup <jchaloup@redhat.com> - 2.3.1-2
- Don't apply patch (for tests only which are disabled atm)
* Mon Apr 04 2016 jchaloup <jchaloup@redhat.com> - 2.3.1-1
- Update to v.2.3.1
resolves: #1323375
* Sun Mar 20 2016 jchaloup <jchaloup@redhat.com> - 2.3.0-1
- Update to v2.3.0
resolves: #1314441
* Wed Mar 09 2016 jchaloup <jchaloup@redhat.com> - 2.2.5-4
- Only ppc64le is supported, ppc64 not
related: #1315419
* Tue Mar 08 2016 jchaloup <jchaloup@redhat.com> - 2.2.5-3
- Extend archs to all supported
resolves: #1315419
* Mon Feb 22 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
- https://fedoraproject.org/wiki/Changes/golang1.6
* Thu Feb 18 2016 jchaloup <jchaloup@redhat.com> - 2.2.5-1
- Update to v2.2.5
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Jan 21 2016 jchaloup <jchaloup@redhat.com> - 2.2.4-1
- Update to v2.2.4
resolves: #1300558
* Fri Jan 08 2016 jchaloup <jchaloup@redhat.com> - 2.2.3-1
- Update to v2.2.3
resolves: #1296809
* Tue Dec 29 2015 jchaloup <jchaloup@redhat.com> - 2.2.2-2
- add missing options to etcd help (thanks to Joy Pu ypu@redhat.com)
- add more information when running etcd as a service
* Mon Dec 07 2015 jchaloup <jchaloup@redhat.com> - 2.2.2-1
- Update to v2.2.2
* Mon Nov 16 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-4
- Update etcd.conf: add new options, fix current
* Fri Oct 30 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-3
- Add After=network-online.target and Wants=network-online.target
to etcd.service
* Tue Oct 20 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-2
- Set Type=notify instead of simple in etcd.service (upstream #1576)
related: #1272438
* Fri Oct 16 2015 jchaloup <jchaloup@redhat.com> - 2.2.1-1
- Update to v2.2.1
resolves: #1272438
* Fri Sep 11 2015 jchaloup <jchaloup@redhat.com> - 2.2.0-1
- Update to v2.2.0 (etcd-migrate gone)
- Update to spec-2.1
resolves: #1253864
* Mon Aug 31 2015 jchaloup <jchaloup@redhat.com> - 2.1.2-1
- Update to v2.1.2
resolves: #1258599
* Thu Jul 30 2015 jchaloup <jchaloup@redhat.com> - 2.1.1-2
- Enable debug info again
related: #1214958
* Mon Jul 20 2015 jchaloup <jchaloup@redhat.com> - 2.1.1-1
- fix definition of GOPATH for go1.5
- fix definition of gobuild function for non-debug way
- Update to v2.1.1
resolves: #1214958
* Fri Jul 10 2015 jchaloup <jchaloup@redhat.com> - 2.0.13-3
- set GOMAXPROCS to use all processors available
* Mon Jun 29 2015 jchaloup <jchaloup@redhat.com> - 2.0.13-2
- Remove -s option from -ldflags string as it removes symbol table
'go tool l6' gives explanation of all available options
resolves: #1236320
* Fri Jun 26 2015 jchaloup <jchaloup@redhat.com> - 2.0.13-1
- Update to v2.0.13
* Thu Jun 25 2015 jchaloup <jchaloup@redhat.com> - 2.0.12-2
- Add restart policy and set LimitNOFILE to/in etcd.service file
- Update etcd.config file: add new flags and remove depricated
- Update 'go build' flags for GIT_SHA (used in build script)
- Don't use 4001 and 7001 ports in etcd.conf, they are replaced with 2379 and 2380
* Wed Jun 24 2015 jchaloup <jchaloup@redhat.com> - 2.0.12-1
- Update to v2.0.12
- Polish spec file
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 22 2015 jchaloup <jchaloup@redhat.com> - 2.0.11-2
- ETCD_ADVERTISE_CLIENT_URLS has to be set if ETCD_LISTEN_CLIENT_URLS is
related: #1222416
* Mon May 18 2015 jchaloup <jchaloup@redhat.com> - 2.0.11-1
- Update to v2.0.11
resolves: #1222416
* Thu Apr 23 2015 jchaloup <jchaloup@redhat.com> - 2.0.10-1
- Update to v2.0.10
resolves: #1214705
* Wed Apr 08 2015 jchaloup <jchaloup@redhat.com> - 2.0.9-1
- Update to v2.0.9
resolves: #1209666
* Fri Apr 03 2015 jchaloup <jchaloup@redhat.com> - 2.0.8-0.2
- Update spec file to fit for rhel too (thanks to eparis)
related: #1207881
* Wed Apr 01 2015 jchaloup <jchaloup@redhat.com> - 2.0.8-0.1
- Update to v2.0.8
resolves: #1207881
* Tue Mar 31 2015 jchaloup <jchaloup@redhat.com> - 2.0.7-0.1
- Update to v2.0.7
Add Godeps.json to doc
related: #1191441
* Thu Mar 12 2015 jchaloup <jchaloup@redhat.com> - 2.0.5-0.1
- Bump to 9481945228b97c5d019596b921d8b03833964d9e (v2.0.5)
* Tue Mar 10 2015 Eric Paris <eparis@redhat.com> - 2.0.3-0.2
- Fix .service files to work if no config file
* Fri Feb 20 2015 jchaloup <jchaloup@redhat.com> - 2.0.3-0.1
- Bump to upstream 4d728cc8c488a545a8bdeafd054d9ccc2bfb6876
* Wed Feb 18 2015 jchaloup <jchaloup@redhat.com> - 2.0.1-0.2
- Update configuration and service file
Fix depricated ErrWrongType after update of gogo/protobuf
related: #1191441
* Wed Feb 11 2015 jchaloup <jchaloup@redhat.com> - 2.0.1-0.1
- Update to 2.0.1
resolves: #1191441
* Mon Feb 09 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.5
- Add missing debug info to binaries (patch from Jan Kratochvil)
resolves: #1184257
* Fri Jan 30 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.4
- Update to etcd-2.0.0
- use gopath as the last directory to search for source code
related: #1176138
* Mon Jan 26 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.3.rc1
- default to /var/lib/etcd/default.etcd as 2.0 uses that default (f21 commit byt eparis)
related: #1176138
fix /etc/etcd/etcd.conf path
* Tue Jan 20 2015 jchaloup <jchaloup@redhat.com> - 2.0.0-0.2.rc1
- Update of BuildRequires/Requires, Provides and test
Add BuildRequire on jonboulle/clockwork
related: #1176138
* Tue Dec 23 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 2.0.0-0.1.rc1
- Resolves: rhbz#1176138 - update to v2.0.0-rc1
- do not redefine gopath
- use jonboulle/clockwork from within Godeps
* Fri Oct 17 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-7
- Add ExclusiveArch for go_arches
* Mon Oct 06 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-6
- related: #1047194
Remove dependency on go.net
* Mon Oct 06 2014 jchaloup <jchaloup@redhat.com> - 0.4.6-5
- Fix the .service file so it can launch!
related: #1047194
* 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

View file

@ -0,0 +1,41 @@
From ddc4f8bd4501826e4c551952a96fcca6dd25bf64 Mon Sep 17 00:00:00 2001
From: Yiqiao Pu <ypu@redhat.com>
Date: Wed, 18 Nov 2015 17:54:46 +0800
Subject: [PATCH] etcdmain: Add max-snapshots and max-wals to help
Based on the configuration doc, seems these two flags are missing
in the help. So add them and the descriptions are from config.go in
the same directory.
Signed-off-by: Yiqiao Pu <ypu@redhat.com>
---
etcdmain/help.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/etcdmain/help.go b/etcdmain/help.go
index e233320..fd23d59 100644
--- a/etcdmain/help.go
+++ b/etcdmain/help.go
@@ -14,6 +14,8 @@
package etcdmain
+import "strconv"
+
var (
usageline = `usage: etcd [flags]
start an etcd server
@@ -43,6 +45,10 @@ member flags:
list of URLs to listen on for peer traffic.
--listen-client-urls 'http://localhost:2379,http://localhost:4001'
list of URLs to listen on for client traffic.
+ --max-snapshots '` + strconv.Itoa(defaultMaxSnapshots) + `'
+ maximum number of snapshot files to retain (0 is unlimited).
+ --max-wals '` + strconv.Itoa(defaultMaxWALs) + `'
+ maximum number of wal files to retain (0 is unlimited).
-cors ''
comma-separated whitelist of origins for CORS (cross-origin resource sharing).
--
1.9.3

73
hack-test.patch Normal file
View file

@ -0,0 +1,73 @@
From a144093e502d4529d598ecf997fea9e261ac595d Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Mon, 15 Aug 2016 16:09:52 +0200
Subject: [PATCH] hack test
---
test | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/test b/test
index 4f24606..deaa527 100755
--- a/test
+++ b/test
@@ -53,7 +53,7 @@ fi
function unit_tests {
echo "Running tests..."
# only -run=Test so examples can run in integration tests
- go test -timeout 3m ${COVER} ${RACE} -cpu 1,2,4 -run=Test $@ ${TEST}
+ ${GOTEST:-go test} -timeout 3m ${COVER} ${RACE} -cpu 1,2,4 -run=Test $@ ${TEST}
}
function integration_tests {
@@ -69,16 +69,16 @@ function integration_tests {
mv /tmp/etcd ./bin/etcd-last-release
fi;
- go test -timeout 10m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e &
+ ${GOTEST:-go test} -timeout 10m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e &
e2epid="$!"
- go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration &
+ ${GOTEST:-go test} -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration &
intpid="$!"
wait $e2epid
wait $intpid
- go test -timeout 1m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/client/integration
- go test -timeout 10m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/clientv3/integration
- go test -timeout 1m -v -cpu 1,2,4 $@ ${REPO_PATH}/contrib/raftexample
- go test -timeout 1m -v ${RACE} -cpu 1,2,4 -run=Example $@ ${TEST}
+ ${GOTEST:-go test} -timeout 1m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/client/integration
+ ${GOTEST:-go test} -timeout 10m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/clientv3/integration
+ ${GOTEST:-go test} -timeout 1m -v -cpu 1,2,4 $@ ${REPO_PATH}/contrib/raftexample
+ ${GOTEST:-go test} -timeout 1m -v ${RACE} -cpu 1,2,4 -run=Example $@ ${TEST}
}
function fmt_tests {
@@ -197,18 +197,18 @@ function dep_tests {
}
# Set up gopath so tests use vendored dependencies
-export GOPATH=${PWD}/gopath
-rm -rf $GOPATH/src
-mkdir -p $GOPATH
-ln -s ${PWD}/cmd/vendor $GOPATH/src
+#export GOPATH=${PWD}/Godeps/_workspace
+#rm -rf $GOPATH/src
+#mkdir -p $GOPATH
+#ln -s ${PWD}/cmd/vendor $GOPATH/src
# fail fast on static tests
toggle_failpoints disable
-fmt_tests
+#fmt_tests
dep_tests
# fail fast on static tests
-GO_BUILD_FLAGS="-a -v" etcd_build
+#GO_BUILD_FLAGS="-a -v" etcd_build
unit_tests
if [ -n "$INTEGRATION" ]; then
--
1.9.3

View file

@ -0,0 +1,31 @@
From 5f8e74959f19f19018ab0e6400e0f5daba3567e5 Mon Sep 17 00:00:00 2001
From: Jan Chaloupka <jchaloup@redhat.com>
Date: Sat, 26 Nov 2016 13:46:29 +0100
Subject: [PATCH] run etcd on ppc64le by default
---
etcdmain/etcd.go | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/etcdmain/etcd.go b/etcdmain/etcd.go
index 950513e..7225303 100644
--- a/etcdmain/etcd.go
+++ b/etcdmain/etcd.go
@@ -636,6 +636,14 @@ func checkSupportArch() {
if runtime.GOARCH == "amd64" {
return
}
+
+ if runtime.GOARCH == "ppc64le" {
+ plog.Warningf("Running etcd on ppc64le architecture is not supported.")
+ plog.Warningf("Be aware you are running the etcd at your own risk.")
+ plog.Warningf("For more information visit https://bugzilla.redhat.com/show_bug.cgi?id=1396463")
+ return
+ }
+
if env, ok := os.LookupEnv("ETCD_UNSUPPORTED_ARCH"); ok && env == runtime.GOARCH {
plog.Warningf("running etcd on unsupported architecture %q since ETCD_UNSUPPORTED_ARCH is set", env)
return
--
1.9.3

View file

@ -1 +1 @@
SHA512 (etcd-3.5.13.tar.gz) = dc85d80079b61e96eb06eb573d41d8972060392e49140a2414c283ea9edfef7b01d5554e50c7ab37c6ad079b373ae12a1b84dbcc533addc1d4d30a2a5abf7b7b
SHA512 (etcd-21fdcc6.tar.gz) = e97955d5280710d4bf477c623976d77a6a11daac6f79960f328141197ccd9aabca4b58356bf27595a6ec1495aa623f121574742fdd8e83131bedd57a77354d03

View file

@ -1,39 +0,0 @@
- hosts: localhost
tags:
- classic
tasks:
- include_tasks: tasks/update_os_vars.yml
- include_tasks: tasks/install_etcd_src.yml
- include_tasks: tasks/prepare_e2e.yml
- name: Run e2e test
shell: go test -timeout 10m -v ./e2e &> /var/tmp/test.log
args:
chdir: "{{ src_dir }}"
ignore_errors: true
environment:
GOPATH: "{{ src_dir }}/gopath:{{ go_path }}"
EXPECT_DEBUG: true
- always:
- name: Pull out the logs
fetch:
dest: "{{ artifacts }}/"
src: "/var/tmp/test.log"
flat: yes
- include_role:
name: remove_req_dir
vars:
path: "{{ item.path }}"
patterns: "{{ item.patterns }}"
file_type: directory
with_items:
- { path: "{{src_dir}}", patterns: ""}
- { path: "/var/tmp/cafile", patterns: ""}
- { path: "/tmp", patterns: "test*"}
- name: Check the results
shell: grep "^\-\-\- FAIL" "{{ artifacts}}"/test.log | awk '{print $3}'
register: failed_cases
ignore_errors: true
- name: Store failed cases
local_action: copy content={{ failed_cases.stdout }} dest={{ artifacts }}/failed_cases.log
when: failed_cases.stdout != ""
failed_when: failed_cases.stdout

View file

@ -1,53 +0,0 @@
#!/usr/bin/python
import logging
import re
import yum
from optparse import OptionParser
def get_pkg_name(req_line, rpm_list):
kws = re.split("[() /]", req_line.strip())[2:5]
kws.reverse()
compare_str = "devel"
tmp_list = rpm_list
for kw in kws:
tmp_list = [_ for _ in tmp_list if re.findall("%s" % compare_str, _)]
if len(tmp_list) > 1:
compare_str = "%s-%s" % (kw, compare_str)
else:
break
if not tmp_list:
if kws[-1] == "github.com":
compare_str = "github-.*-%s-devel" % kws[0]
tmp_list = [_ for _ in rpm_list if re.findall("%s" % compare_str, _)]
if kws[-1] == "golang.org":
compare_str = "golangorg-%s-devel" % kws[0]
tmp_list = [_ for _ in rpm_list if re.findall("%s" % compare_str, _)]
if kws[-1] == "google.golang.org":
compare_str = "-%s-.*-devel" % kws[1]
tmp_list = [_ for _ in rpm_list if re.findall("%s" % compare_str, _)]
return tmp_list
if __name__ == '__main__':
parser = OptionParser()
parser.add_option("-f", "--spec_file", dest="sfile",
default="")
(options, args) = parser.parse_args()
sfile = options.sfile
yb = yum.YumBase()
yum_list = yb.doPackageLists()
alist = sorted(yum_list.available)
source_rpms = [_.name for _ in alist if re.match("golang", _.name)]
install_pkgs = []
with open(sfile) as f:
for line in f:
install_pkgs += get_pkg_name(line, source_rpms)
for pkg in set(install_pkgs):
print pkg

View file

@ -1,8 +0,0 @@
artifacts: ./artifacts
rpm_base_url: https://kojipkgs.fedoraproject.org/packages
go_path: /root/golang
debug: false
req_packages: ['git', 'golang', 'rpm-build', 'yum', 'libselinux-python']
fedora_req_packages: ['go-compilers-golang-compiler']
is_fedora: false
is_rhel: false

View file

@ -1,30 +0,0 @@
---
- name: Create cafile directory
file:
path: "/var/tmp/cafile"
state: directory
- name: Get cfssl from github
shell: go get -u github.com/cloudflare/cfssl/cmd/...
- name:
template:
src: "{{ item }}.j2"
dest: "/var/tmp/cafile/{{ item }}"
with_items:
- ca-csr.json
- ca-config.json
- req-csr.json
- name: Generate CA certificate
shell: cfssl genkey -initca ca-csr.json | cfssljson -bare ca
args:
chdir: /var/tmp/cafile
- name: Generate certificate and private key with CA
shell: cfssl gencert -ca ca.pem -ca-key ca-key.pem -config ca-config.json req-csr.json | cfssljson -bare {{ item }}
args:
chdir: /var/tmp/cafile
with_items:
- "{{ cert_names }}"
- name: Copy needed certificates and private keys to destination
shell: cp -f /var/tmp/cafile/{{ item.src }} {{ src_dir }}/integration/fixtures/{{ item.dst }}
with_items:
- "{{ cert_srcs_dsts }}"

View file

@ -1,65 +0,0 @@
---
- name: Create bin
file:
path: "{{ bin_dir }}"
state: directory
- name: Create src code directory
file:
path: "{{ repo_path }}/{{ repo_name }}"
state: directory
- name: Clone repo to /var/tmp
shell: git clone "{{ git_repo }}"
args:
chdir: "{{ repo_path }}"
- name: Determine if use make
shell: ls "{{ repo_path }}/{{ repo_name }}" | grep -i makefile
ignore_errors: true
register: output
- name: Set compile with make
set_fact:
compile_method: make
when: output.rc == 0
- name: Determine if use build
shell: ls "{{ repo_path }}/{{ repo_name }}" | grep -i build
ignore_errors: true
register: output
- name: Set compile with build
set_fact:
compile_method: build
when: output.rc == 0
- name: Build with make
shell: make
args:
chdir: "{{ repo_path }}/{{ repo_name }}"
when: "compile_method == 'make'"
- name: Build with ./build
shell: ./build
args:
chdir: "{{ repo_path }}/{{ repo_name }}"
when: "compile_method == 'build'"
- name: Determine if bin dir is generated
shell: ls "{{ repo_path }}/{{ repo_name }}"/bin
ignore_errors: true
register: output
- name: Set compiled binary dir
set_fact:
c_bin_dir: "{{ repo_path }}/{{ repo_name }}/bin"
when: output.rc == 0
- name: Set compiled binary dir
set_fact:
c_bin_dir: "{{ repo_path }}/{{ repo_name }}"
when: output.rc != 0
- name: Copy generated binary to customer bin dir
shell: cp {{ c_bin_dir }}/{{ item }} {{ bin_dir }}
with_items:
"{{ compiled_binary }}"
- name: Clean up source directory
file:
path: "{{ repo_path }}/{{ repo_name }}"
state: absent

View file

@ -1,13 +0,0 @@
---
- name: Get depended golang lines from spec
shell: "{% raw %} grep '^BuildRequires: golang' {% endraw %} /root/rpmbuild/SPECS/{{ package_name }}.spec | sort |uniq > /var/tmp/br"
- name: Turned the spec lines into packages
shell: python "{{ role_path }}"/../../files/get_golang_pkgs.py -f /var/tmp/br
register: reqs
- name: Install the packages required
package:
name: "{{ item }}"
state: present
with_items:
- "{{ reqs.stdout_lines }}"

View file

@ -1,29 +0,0 @@
---
- name: Get installed rpm information
yum:
list: "{{ package_name }}"
register: etcd_info_output
- name: Set up src url
set_fact:
etcd_src_url: "{{ rpm_base_url }}/etcd/{{ item['version'] }}/{{ item['release'] }}/src/etcd-{{ item['version'] }}-{{ item['release'] }}.src.rpm"
package_path: "/var/tmp/{{ package_name }}.src.rpm"
when: item ['yumstate'] == 'installed'
with_items:
- "{{ etcd_info_output.results }}"
- name: Remove the exist target file
file:
path: "{{ package_path }}"
state: absent
- name: Download src package
get_url:
url: "{{ etcd_src_url }}"
dest: "{{ package_path }}"
- name: Install src package with rpm
shell: rpm -ivh {{ package_path }}
- name: Get commit from SPEC file
shell: awk '/^%global\scommit/{print $3}' /root/rpmbuild/SPECS/{{ package_name }}.spec
register: commit
- name: Set src directory
set_fact:
src_dir: /root/rpmbuild/BUILD/{{ package_name }}-{{ commit.stdout}}

View file

@ -1,23 +0,0 @@
---
- name: Get files or directories fit for the patterns
find:
paths: "{{ path }}"
patterns: "{{ patterns }}"
file_type: "{{ file_type| default('file')}}"
register: remove_paths
when: (patterns is defined) and (patterns != "")
- name: Remove the files or directories
file:
path: "{{ item_path.path }}"
state: absent
with_items:
- "{{ remove_paths.files }}"
loop_control:
loop_var: item_path
when: (patterns is defined) and (patterns != "")
- name: Remove target files or diredctories
file:
path: "{{ path }}"
state: absent
when: (patterns is undefined) or (patterns == "")

View file

@ -1,19 +0,0 @@
---
- name: Install request packages
package:
name: "{{ item }}"
state: latest
with_items:
- "{{ req_packages }}"
- include_role:
name: install_src_rpm
vars:
package_name: etcd
- include_role:
name: install_golang_dep_from_spec
vars:
package_name: etcd
when: is_fedora
- name: Install etcd source code
shell: rpmbuild -bp /root/rpmbuild/SPECS/etcd.spec

View file

@ -1,58 +0,0 @@
---
- name: Check Ca files
shell: openssl verify -CAfile ca.crt server.crt
args:
chdir: "{{ src_dir}}/integration/fixtures"
ignore_errors: true
register: ca_ok
- name: Replace ca files
environment:
GOPATH: "{{ go_path }}"
PATH: "{{ ansible_env.PATH }}:{{ go_path }}/bin"
include_role:
name: create_ca_files_with_cfssl
vars:
cert_names: server
cert_srcs_dsts: [{ src: "ca.pem", dst: "ca.crt" }, { src: "server.pem", dst: "server.crt" }, { src: "server-key.pem", dst: "server.key.insecure" }]
when: ca_ok.rc != 0
- name: Check if Godeps exist under src
find:
paths: "{{ src_dir }}"
patterns: Godeps
file_type: directory
register: godeps
- name: Install glide
include_role:
name: install_go_repo_from_github
vars:
bin_dir: "{{ go_path }}/bin"
git_repo: https://github.com/Masterminds/glide.git
repo_path: "{{go_path}}/src/github.com/Masterminds"
repo_name: glide
compiled_binary: ['glide']
environment:
GOPATH: "{{ go_path }}"
when: godeps.matched == 0
- name: Set up golang path
environment:
GOPATH: "{{ go_path }}"
PATH: "{{ ansible_env.PATH }}:{{ go_path }}/bin"
block:
- shell: mkdir gopath; ln -s {{ src_dir }}/Godeps/_workspace/src gopath/src; rm gopath/src/github.com/coreos/etcd; ln -s {{ src_dir }} gopath/src/github.com/coreos/etcd
args:
chdir: "{{ src_dir }}"
when: godeps.matched != 0
- shell: mkdir gopath; cp -r vendor/* cmd/vendor/; ln -s {{ src_dir }}/cmd/vendor {{ src_dir }}/gopath/src; ln -s {{ src_dir }} gopath/src/github.com/coreos/etcd
args:
chdir: "{{ src_dir }}"
when: godeps.matched == 0
- name: Create bin under etcd src
file:
path: "{{ src_dir }}/bin"
state: directory
- name: Copy exec file to src directory
shell: cp -f `which {{ item }}` {{ src_dir }}/bin/{{ item }}
with_items:
- etcd
- etcdctl

View file

@ -1,21 +0,0 @@
---
- name: Get distro name from /etc/os-release
raw: "grep '^NAME=' /etc/os-release | sed s'/NAME=//'"
register: distro
- name: Set the is_fedora fact
set_fact:
is_fedora: true
when: "'Fedora' in distro.stdout"
- name: Set the is_rhel fact
set_fact:
is_rhel: true
when: "'Red Hat Enterprise Linux' in distro.stdout"
- name: Update request packages for Fedora
set_fact:
req_packages: "{{ req_packages }} + {{ fedora_req_packages }}"
when: is_fedora and fedora_req_packages is defined
- name: Update request packages for RHEL
set_fact:
req_packages: "{{ req_packages }} + {{ rhel_req_packages }}"
when: is_rhel and rhel_req_packages is defined

View file

@ -1,13 +0,0 @@
{
"signing": {
"default": {
"usages": [
"signing",
"key encipherment",
"server auth",
"client auth"
],
"expiry": "8760h"
}
}
}

View file

@ -1,16 +0,0 @@
{
"CN": "Autogenerated CA",
"key": {
"algo": "ecdsa",
"size": 384
},
"names": [
{
"O": "Honest Achmed's Used Certificates",
"OU": "Hastily-Generated Values Divison",
"L": "San Francisco",
"ST": "California",
"C": "US"
}
]
}

View file

@ -1,17 +0,0 @@
{
"CN": "etcd",
"hosts": [
"localhost"
],
"key": {
"algo": "ecdsa",
"size": 384
},
"names": [
{
"O": "autogenerated",
"OU": "etcd cluster",
"L": "the internet"
}
]
}

View file

@ -1,3 +0,0 @@
---
# Tests for classic environment
- import_playbook: e2e_test_from_src_include.yml