Change-Id: I6476ec6240f7aa1ce0792e854498141af58cf9a9
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3752
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Xiaolin Li <xiaolinl@vmware.com>
| ... | ... |
@@ -1,7 +1,7 @@ |
| 1 | 1 |
Summary: GoBGP based Calico BGP Daemon |
| 2 | 2 |
Name: calico-bgp-daemon |
| 3 | 3 |
Version: 0.2.2 |
| 4 |
-Release: 1%{?dist}
|
|
| 4 |
+Release: 2%{?dist}
|
|
| 5 | 5 |
Group: Applications/System |
| 6 | 6 |
Vendor: VMware, Inc. |
| 7 | 7 |
License: Apache-2.0 |
| ... | ... |
@@ -12,6 +12,7 @@ BuildRequires: git |
| 12 | 12 |
BuildRequires: glide |
| 13 | 13 |
BuildRequires: go >= 1.7 |
| 14 | 14 |
%define sha1 calico-bgp-daemon=d823d92d1bbb887ea885080ab2b989a75e3a338d |
| 15 |
+%define debug_package %{nil}
|
|
| 15 | 16 |
|
| 16 | 17 |
%description |
| 17 | 18 |
GoBGP based Calico BGP Daemon, an alternative to BIRD in calico/node. |
| ... | ... |
@@ -26,19 +27,18 @@ cp -r * ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon/.
|
| 26 | 26 |
pushd ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon
|
| 27 | 27 |
mkdir -p dist |
| 28 | 28 |
glide install --strip-vendor |
| 29 |
-go get -v github.com/osrg/gobgp/gobgp |
|
| 30 | 29 |
go build -v -o dist/calico-bgp-daemon -ldflags "-X main.VERSION=%{version} -s -w" main.go ipam.go
|
| 31 | 30 |
|
| 32 | 31 |
%install |
| 33 | 32 |
install -vdm 755 %{buildroot}%{_bindir}
|
| 34 |
-install ${GOPATH}/bin/gobgp %{buildroot}%{_bindir}/
|
|
| 35 | 33 |
install ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon/dist/calico-bgp-daemon %{buildroot}%{_bindir}/
|
| 36 | 34 |
|
| 37 | 35 |
%files |
| 38 | 36 |
%defattr(-,root,root) |
| 39 |
-%{_bindir}/gobgp
|
|
| 40 | 37 |
%{_bindir}/calico-bgp-daemon
|
| 41 | 38 |
|
| 42 | 39 |
%changelog |
| 40 |
+* Mon Sep 11 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.2-2 |
|
| 41 |
+- gobgp comes from the Go BGP package. |
|
| 43 | 42 |
* Thu Aug 17 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.2-1 |
| 44 | 43 |
- Calico BGP daemon for PhotonOS. |
| ... | ... |
@@ -1,33 +1,37 @@ |
| 1 | 1 |
Summary: A per-host daemon for Calico |
| 2 | 2 |
Name: calico-felix |
| 3 | 3 |
Version: 2.4.1 |
| 4 |
-Release: 1%{?dist}
|
|
| 4 |
+Release: 2%{?dist}
|
|
| 5 | 5 |
Group: Applications/System |
| 6 | 6 |
Vendor: VMware, Inc. |
| 7 | 7 |
License: Apache-2.0 |
| 8 | 8 |
URL: https://github.com/projectcalico/felix |
| 9 | 9 |
Source0: %{name}-%{version}.tar.gz
|
| 10 |
+%define sha1 calico-felix=4408e0b30fee66d8813bf0351094f4b4af7d6813 |
|
| 11 |
+Source1: gogo-protobuf-0.4.tar.gz |
|
| 12 |
+%define sha1 gogo-protobuf-0.4=4fc5dda432ad929ce203486c861b7d3e48681150 |
|
| 10 | 13 |
Distribution: Photon |
| 11 | 14 |
BuildRequires: git |
| 12 | 15 |
BuildRequires: glide |
| 13 | 16 |
BuildRequires: go >= 1.7 |
| 14 | 17 |
BuildRequires: protobuf |
| 15 |
-%define sha1 calico-felix=4408e0b30fee66d8813bf0351094f4b4af7d6813 |
|
| 16 | 18 |
|
| 17 | 19 |
%description |
| 18 | 20 |
A per-host daemon for Calico. |
| 19 | 21 |
|
| 20 | 22 |
%prep |
| 21 | 23 |
%setup -q -n felix-%{version}
|
| 24 |
+mkdir -p ${GOPATH}/src/github.com/gogo/protobuf
|
|
| 25 |
+tar xf %{SOURCE1} --no-same-owner --strip-components 1 -C ${GOPATH}/src/github.com/gogo/protobuf/
|
|
| 22 | 26 |
|
| 23 | 27 |
%build |
| 28 |
+pushd ${GOPATH}/src/github.com/gogo/protobuf
|
|
| 29 |
+make install |
|
| 30 |
+popd |
|
| 24 | 31 |
mkdir -p /root/.glide |
| 25 | 32 |
mkdir -p ${GOPATH}/src/github.com/projectcalico/felix
|
| 26 | 33 |
cp -r * ${GOPATH}/src/github.com/projectcalico/felix/.
|
| 27 | 34 |
pushd ${GOPATH}/src/github.com/projectcalico/felix
|
| 28 |
-go get -u github.com/onsi/ginkgo/ginkgo |
|
| 29 |
-go get -u github.com/gogo/protobuf/protoc-gen-gogofaster |
|
| 30 |
-go install github.com/gogo/protobuf/protoc-gen-gogofaster |
|
| 31 | 35 |
glide install --strip-vendor |
| 32 | 36 |
mkdir -p bin |
| 33 | 37 |
cd proto |
| ... | ... |
@@ -48,5 +52,7 @@ install ${GOPATH}/src/github.com/projectcalico/felix/bin/calico-felix %{buildroo
|
| 48 | 48 |
%{_bindir}/calico-felix
|
| 49 | 49 |
|
| 50 | 50 |
%changelog |
| 51 |
+* Tue Sep 12 2017 Vinay Kulkarni <kulkarniv@vmware.com> 2.4.1-2 |
|
| 52 |
+- Build protoc-gen-gogofaster plugin from source. |
|
| 51 | 53 |
* Sat Aug 19 2017 Vinay Kulkarni <kulkarniv@vmware.com> 2.4.1-1 |
| 52 | 54 |
- Calico Felix for PhotonOS. |
| 53 | 55 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,52 @@ |
| 0 |
+Summary: BGP implementation in Go |
|
| 1 |
+Name: gobgp |
|
| 2 |
+Version: 1.23 |
|
| 3 |
+Release: 1%{?dist}
|
|
| 4 |
+Group: Applications/System |
|
| 5 |
+Vendor: VMware, Inc. |
|
| 6 |
+License: Apache-2.0 |
|
| 7 |
+URL: https://github.com/osrg/gobgp |
|
| 8 |
+Source0: %{name}-%{version}.tar.gz
|
|
| 9 |
+%define sha1 gobgp=3df002f61911cf56c33bd4350fe9d2ad39bcfca5 |
|
| 10 |
+Source1: golang-dep-0.3.0.tar.gz |
|
| 11 |
+%define sha1 golang-dep-0.3.0=e5e9952227930fe1e8632edc03d690bffc3e1132 |
|
| 12 |
+Distribution: Photon |
|
| 13 |
+BuildRequires: git |
|
| 14 |
+BuildRequires: go >= 1.7 |
|
| 15 |
+%define debug_package %{nil}
|
|
| 16 |
+ |
|
| 17 |
+%description |
|
| 18 |
+GoBGP is an open source BGP implementation designed from scratch for modern environment and implemented in a modern programming language, the Go Programming Language. |
|
| 19 |
+ |
|
| 20 |
+%prep |
|
| 21 |
+%setup -q |
|
| 22 |
+mkdir -p ${GOPATH}/src/github.com/golang/dep
|
|
| 23 |
+tar xf %{SOURCE1} --no-same-owner --strip-components 1 -C ${GOPATH}/src/github.com/golang/dep/
|
|
| 24 |
+ |
|
| 25 |
+%build |
|
| 26 |
+pushd ${GOPATH}/src/github.com/golang/dep
|
|
| 27 |
+CGO_ENABLED=0 GOOS=linux go build -v -ldflags "-s -w" -o ${GOPATH}/bin/dep ./cmd/dep/
|
|
| 28 |
+popd |
|
| 29 |
+mkdir -p ${GOPATH}/src/github.com/osrg/gobgp
|
|
| 30 |
+cp -r * ${GOPATH}/src/github.com/osrg/gobgp/.
|
|
| 31 |
+pushd ${GOPATH}/src/github.com/osrg/gobgp
|
|
| 32 |
+${GOPATH}/bin/dep ensure
|
|
| 33 |
+mkdir -p dist |
|
| 34 |
+go build -v -o dist/gobgp -ldflags "-X main.VERSION=%{version} -s -w" gobgp/main.go
|
|
| 35 |
+go build -v -o dist/gobgpd -ldflags "-X main.VERSION=%{version} -s -w" gobgpd/main.go gobgpd/util.go
|
|
| 36 |
+ |
|
| 37 |
+%install |
|
| 38 |
+pushd ${GOPATH}/src/github.com/osrg/gobgp
|
|
| 39 |
+install -vdm 755 %{buildroot}%{_bindir}
|
|
| 40 |
+install ${GOPATH}/src/github.com/osrg/gobgp/dist/gobgp %{buildroot}%{_bindir}/
|
|
| 41 |
+install ${GOPATH}/src/github.com/osrg/gobgp/dist/gobgpd %{buildroot}%{_bindir}/
|
|
| 42 |
+ |
|
| 43 |
+%files |
|
| 44 |
+%defattr(-,root,root) |
|
| 45 |
+%{_bindir}/gobgp
|
|
| 46 |
+%{_bindir}/gobgpd
|
|
| 47 |
+%doc LICENSE README.md |
|
| 48 |
+ |
|
| 49 |
+%changelog |
|
| 50 |
+* Mon Sep 11 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.23-1 |
|
| 51 |
+- Go BGP daemon for PhotonOS. |
| ... | ... |
@@ -23,6 +23,11 @@ CALICO_BGP_VER_REL=${CALICO_BGP_VER}-`cat ${SPEC_DIR}/calico-bgp-daemon/calico-b
|
| 23 | 23 |
CALICO_BGP_RPM=calico-bgp-daemon-${CALICO_BGP_VER_REL}${DIST_TAG}.${ARCH}.rpm
|
| 24 | 24 |
CALICO_BGP_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_BGP_RPM}
|
| 25 | 25 |
|
| 26 |
+GO_BGP_VER=`cat ${SPEC_DIR}/gobgp/gobgp.spec | grep Version | cut -d: -f2 | tr -d ' '`
|
|
| 27 |
+GO_BGP_VER_REL=${GO_BGP_VER}-`cat ${SPEC_DIR}/gobgp/gobgp.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1`
|
|
| 28 |
+GO_BGP_RPM=gobgp-${GO_BGP_VER_REL}${DIST_TAG}.${ARCH}.rpm
|
|
| 29 |
+GO_BGP_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${GO_BGP_RPM}
|
|
| 30 |
+ |
|
| 26 | 31 |
CALICO_BIRD_VER=`cat ${SPEC_DIR}/calico-bird/calico-bird.spec | grep Version | cut -d: -f2 | tr -d ' '`
|
| 27 | 32 |
CALICO_BIRD_VER_REL=${CALICO_BIRD_VER}-`cat ${SPEC_DIR}/calico-bird/calico-bird.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1`
|
| 28 | 33 |
CALICO_BIRD_RPM=calico-bird-${CALICO_BIRD_VER_REL}${DIST_TAG}.${ARCH}.rpm
|
| ... | ... |
@@ -70,6 +75,12 @@ then |
| 70 | 70 |
exit 1 |
| 71 | 71 |
fi |
| 72 | 72 |
|
| 73 |
+if [ ! -f ${GO_BGP_RPM_FILE} ]
|
|
| 74 |
+then |
|
| 75 |
+ echo "GoBGP RPM ${GO_BGP_RPM_FILE} not found. Exiting.."
|
|
| 76 |
+ exit 1 |
|
| 77 |
+fi |
|
| 78 |
+ |
|
| 73 | 79 |
if [ ! -f ${CALICO_BIRD_RPM_FILE} ]
|
| 74 | 80 |
then |
| 75 | 81 |
echo "Calico BIRD RPM ${CALICO_BIRD_RPM_FILE} not found. Exiting.."
|
| ... | ... |
@@ -131,6 +142,7 @@ fi |
| 131 | 131 |
mkdir -p tmp/calico |
| 132 | 132 |
cp ${CALICO_RPM_FILE} tmp/calico/
|
| 133 | 133 |
cp ${CALICO_BGP_RPM_FILE} tmp/calico/
|
| 134 |
+cp ${GO_BGP_RPM_FILE} tmp/calico/
|
|
| 134 | 135 |
cp ${CALICO_BIRD_RPM_FILE} tmp/calico/
|
| 135 | 136 |
cp ${CALICO_CONFD_RPM_FILE} tmp/calico/
|
| 136 | 137 |
cp ${CALICO_FELIX_RPM_FILE} tmp/calico/
|
| ... | ... |
@@ -141,6 +153,7 @@ cp ${CALICO_K8S_POLICY_RPM_FILE} tmp/calico/
|
| 141 | 141 |
pushd ./tmp/calico |
| 142 | 142 |
rpm2cpio ${CALICO_RPM} | cpio -vid
|
| 143 | 143 |
rpm2cpio ${CALICO_BGP_RPM} | cpio -vid
|
| 144 |
+rpm2cpio ${GO_BGP_RPM} | cpio -vid
|
|
| 144 | 145 |
rpm2cpio ${CALICO_BIRD_RPM} | cpio -vid
|
| 145 | 146 |
rpm2cpio ${CALICO_CONFD_RPM} | cpio -vid
|
| 146 | 147 |
rpm2cpio ${CALICO_FELIX_RPM} | cpio -vid
|