Change-Id: I61e20e0d81c6c82003f57482f81468a7aafd8994
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/3682
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>
... | ... |
@@ -403,7 +403,10 @@ k8s-docker-images: |
403 | 403 |
cd ./support/dockerfiles/k8s-docker-images && \ |
404 | 404 |
./build-k8s-docker-images.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) && \ |
405 | 405 |
./build-k8s-dns-docker-images.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) && \ |
406 |
- ./build-k8s-dashboard-docker-images.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) |
|
406 |
+ ./build-k8s-dashboard-docker-images.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) && \ |
|
407 |
+ ./build-flannel-docker-image.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) && \ |
|
408 |
+ ./build-calico-docker-images.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) && \ |
|
409 |
+ ./build-k8s-nginx-ingress.sh $(PHOTON_DIST_TAG) $(PHOTON_RELEASE_VERSION) $(PHOTON_SPECS_DIR) $(PHOTON_STAGE) |
|
407 | 410 |
|
408 | 411 |
install-photon-docker-image: photon-docker-image |
409 | 412 |
sudo docker build -t photon:tdnf . |
410 | 413 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,44 @@ |
0 |
+Summary: GoBGP based Calico BGP Daemon |
|
1 |
+Name: calico-bgp-daemon |
|
2 |
+Version: 0.2.2 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Group: Applications/System |
|
5 |
+Vendor: VMware, Inc. |
|
6 |
+License: Apache-2.0 |
|
7 |
+URL: https://github.com/projectcalico/calico-bgp-daemon |
|
8 |
+Source0: %{name}-%{version}.tar.gz |
|
9 |
+Distribution: Photon |
|
10 |
+BuildRequires: git |
|
11 |
+BuildRequires: glide |
|
12 |
+BuildRequires: go >= 1.7 |
|
13 |
+%define sha1 calico-bgp-daemon=d823d92d1bbb887ea885080ab2b989a75e3a338d |
|
14 |
+ |
|
15 |
+%description |
|
16 |
+GoBGP based Calico BGP Daemon, an alternative to BIRD in calico/node. |
|
17 |
+ |
|
18 |
+%prep |
|
19 |
+%setup -q |
|
20 |
+ |
|
21 |
+%build |
|
22 |
+mkdir -p /root/.glide |
|
23 |
+mkdir -p ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon |
|
24 |
+cp -r * ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon/. |
|
25 |
+pushd ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon |
|
26 |
+mkdir -p dist |
|
27 |
+glide install --strip-vendor |
|
28 |
+go get -v github.com/osrg/gobgp/gobgp |
|
29 |
+go build -v -o dist/calico-bgp-daemon -ldflags "-X main.VERSION=%{version} -s -w" main.go ipam.go |
|
30 |
+ |
|
31 |
+%install |
|
32 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
33 |
+install ${GOPATH}/bin/gobgp %{buildroot}%{_bindir}/ |
|
34 |
+install ${GOPATH}/src/github.com/projectcalico/calico-bgp-daemon/dist/calico-bgp-daemon %{buildroot}%{_bindir}/ |
|
35 |
+ |
|
36 |
+%files |
|
37 |
+%defattr(-,root,root) |
|
38 |
+%{_bindir}/gobgp |
|
39 |
+%{_bindir}/calico-bgp-daemon |
|
40 |
+ |
|
41 |
+%changelog |
|
42 |
+* Thu Aug 17 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.2.2-1 |
|
43 |
+- Calico BGP daemon for PhotonOS. |
0 | 44 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,64 @@ |
0 |
+Summary: Project Calico fork of the BIRD Internet Routing Daemon |
|
1 |
+Name: calico-bird |
|
2 |
+Version: 0.3.1 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Group: Applications/System |
|
5 |
+Vendor: VMware, Inc. |
|
6 |
+License: GPL |
|
7 |
+URL: https://github.com/projectcalico/bird |
|
8 |
+Source0: %{name}-%{version}.tar.gz |
|
9 |
+Distribution: Photon |
|
10 |
+BuildRequires: autoconf |
|
11 |
+%define sha1 calico-bird=51734c2d53fa60f06f02ba4d64c41968090f99ef |
|
12 |
+ |
|
13 |
+%description |
|
14 |
+Project Calico fork of the BIRD Internet Routing Daemon. |
|
15 |
+ |
|
16 |
+%prep |
|
17 |
+%setup -q -n bird-0.3.1 |
|
18 |
+ |
|
19 |
+%build |
|
20 |
+mkdir -p dist |
|
21 |
+autoconf |
|
22 |
+# IPv6 bird + bird client |
|
23 |
+./configure \ |
|
24 |
+ --prefix=%{_prefix} \ |
|
25 |
+ --libdir=%{_libdir} \ |
|
26 |
+ --with-protocols="bgp pipe static" \ |
|
27 |
+ --enable-ipv6=yes \ |
|
28 |
+ --enable-client=yes \ |
|
29 |
+ --enable-pthreads=yes |
|
30 |
+make |
|
31 |
+# Remove the dynmaic binaries and rerun make to create static binaries |
|
32 |
+rm bird birdcl |
|
33 |
+make CC="gcc -static" |
|
34 |
+cp bird dist/bird6 |
|
35 |
+cp birdcl dist/birdcl |
|
36 |
+# IPv4 bird |
|
37 |
+make clean |
|
38 |
+./configure \ |
|
39 |
+ --prefix=%{_prefix} \ |
|
40 |
+ --libdir=%{_libdir} \ |
|
41 |
+ --with-protocols="bgp pipe static" \ |
|
42 |
+ --enable-client=no \ |
|
43 |
+ --enable-pthreads=yes |
|
44 |
+make |
|
45 |
+rm bird |
|
46 |
+make CC="gcc -static" |
|
47 |
+cp bird dist/bird |
|
48 |
+ |
|
49 |
+%install |
|
50 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
51 |
+install -vpm 0755 -t %{buildroot}%{_bindir}/ dist/bird |
|
52 |
+install -vpm 0755 -t %{buildroot}%{_bindir}/ dist/bird6 |
|
53 |
+install -vpm 0755 -t %{buildroot}%{_bindir}/ dist/birdcl |
|
54 |
+ |
|
55 |
+%files |
|
56 |
+%defattr(-,root,root) |
|
57 |
+%{_bindir}/bird |
|
58 |
+%{_bindir}/bird6 |
|
59 |
+%{_bindir}/birdcl |
|
60 |
+ |
|
61 |
+%changelog |
|
62 |
+* Wed Aug 16 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.3.1-1 |
|
63 |
+- Calico BIRD routing daemon for PhotonOS. |
0 | 64 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,61 @@ |
0 |
+Summary: Calico networking for CNI |
|
1 |
+Name: calico-cni |
|
2 |
+Version: 1.10.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: ASL 2.0 |
|
5 |
+URL: https://github.com/projectcalico/cni-plugin |
|
6 |
+Source0: %{name}-%{version}.tar.gz |
|
7 |
+%define sha1 calico-cni=6c7f7e59e8f632e1630685f5bf092c2e4a60550f |
|
8 |
+Group: Development/Tools |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+BuildRequires: git |
|
12 |
+BuildRequires: glide |
|
13 |
+BuildRequires: go >= 1.7 |
|
14 |
+Requires: cni |
|
15 |
+%define debug_package %{nil} |
|
16 |
+ |
|
17 |
+%description |
|
18 |
+Project Calico network plugin for CNI. This allows kubernetes to use Calico networking. This repository includes a top-level CNI networking plugin, as well as a CNI IPAM plugin which makes use of Calico IPAM. |
|
19 |
+ |
|
20 |
+%prep |
|
21 |
+%setup -n cni-plugin-%{version} |
|
22 |
+ |
|
23 |
+%build |
|
24 |
+cd .. |
|
25 |
+mkdir -p build/src/github.com/projectcalico/cni-plugin |
|
26 |
+cp -r cni-plugin-%{version}/* build/src/github.com/projectcalico/cni-plugin/. |
|
27 |
+cd build |
|
28 |
+mkdir bin |
|
29 |
+export GOPATH=`pwd` |
|
30 |
+cd bin |
|
31 |
+export GOBIN=`pwd` |
|
32 |
+export PATH=$PATH:$GOBIN |
|
33 |
+cd ../src/github.com/projectcalico/cni-plugin |
|
34 |
+glide install --strip-vendor |
|
35 |
+mkdir -p dist |
|
36 |
+make dist/portmap |
|
37 |
+CGO_ENABLED=0 go build -v -i -o dist/calico -ldflags "-X main.VERSION= -s -w" calico.go |
|
38 |
+CGO_ENABLED=0 go build -v -i -o dist/calico-ipam -ldflags "-X main.VERSION= -s -w" ipam/calico-ipam.go |
|
39 |
+ |
|
40 |
+%install |
|
41 |
+cd ../build/src/github.com/projectcalico/cni-plugin |
|
42 |
+install -vdm 755 %{buildroot}/opt/cni/bin |
|
43 |
+install -vpm 0755 -t %{buildroot}/opt/cni/bin/ dist/calico |
|
44 |
+install -vpm 0755 -t %{buildroot}/opt/cni/bin/ dist/calico-ipam |
|
45 |
+install -vpm 0755 -t %{buildroot}/opt/cni/bin/ dist/portmap |
|
46 |
+install -vdm 0755 %{buildroot}/usr/share/calico-cni/k8s |
|
47 |
+install -vpm 0755 -t %{buildroot}/usr/share/calico-cni/k8s/ k8s-install/scripts/install-cni.sh |
|
48 |
+install -vpm 0755 -t %{buildroot}/usr/share/calico-cni/k8s/ k8s-install/scripts/calico.conf.default |
|
49 |
+ |
|
50 |
+%files |
|
51 |
+%defattr(-,root,root) |
|
52 |
+/opt/cni/bin/calico |
|
53 |
+/opt/cni/bin/calico-ipam |
|
54 |
+/opt/cni/bin/portmap |
|
55 |
+/usr/share/calico-cni/k8s/install-cni.sh |
|
56 |
+/usr/share/calico-cni/k8s/calico.conf.default |
|
57 |
+ |
|
58 |
+%changelog |
|
59 |
+* Mon Aug 14 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.10.0-1 |
|
60 |
+- calico-cni for PhotonOS. |
0 | 61 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,39 @@ |
0 |
+Summary: confd is a lightweight configuration management tool |
|
1 |
+Name: calico-confd |
|
2 |
+Version: 0.12.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Group: Applications/System |
|
5 |
+Vendor: VMware, Inc. |
|
6 |
+License: MIT |
|
7 |
+URL: https://github.com/kelseyhightower/confd/releases |
|
8 |
+Source0: %{name}-%{version}.tar.gz |
|
9 |
+Distribution: Photon |
|
10 |
+BuildRequires: glide |
|
11 |
+BuildRequires: go >= 1.7 |
|
12 |
+%define sha1 calico-confd=61b15d926ebb87b466b7355d31e542109f0fad2a |
|
13 |
+ |
|
14 |
+%description |
|
15 |
+confd is a lightweight configuration management tool that keeps local configuration files up-to-date, and reloading applications to pick up new config file changes. |
|
16 |
+ |
|
17 |
+%prep |
|
18 |
+%setup -q -n confd-%{version} |
|
19 |
+ |
|
20 |
+%build |
|
21 |
+#mkdir -p /root/.glide |
|
22 |
+mkdir -p ${GOPATH}/src/github.com/kelseyhightower/confd |
|
23 |
+cp -r * ${GOPATH}/src/github.com/kelseyhightower/confd/. |
|
24 |
+pushd ${GOPATH}/src/github.com/kelseyhightower/confd |
|
25 |
+./build |
|
26 |
+ |
|
27 |
+%install |
|
28 |
+pushd ${GOPATH}/src/github.com/kelseyhightower/confd |
|
29 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
30 |
+install -vpm 0755 -t %{buildroot}%{_bindir}/ bin/confd |
|
31 |
+ |
|
32 |
+%files |
|
33 |
+%defattr(-,root,root) |
|
34 |
+%{_bindir}/confd |
|
35 |
+ |
|
36 |
+%changelog |
|
37 |
+* Fri Aug 18 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.12.0-1 |
|
38 |
+- Calico confd for PhotonOS. |
0 | 39 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,52 @@ |
0 |
+Summary: A per-host daemon for Calico |
|
1 |
+Name: calico-felix |
|
2 |
+Version: 2.4.1 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Group: Applications/System |
|
5 |
+Vendor: VMware, Inc. |
|
6 |
+License: Apache-2.0 |
|
7 |
+URL: https://github.com/projectcalico/felix |
|
8 |
+Source0: %{name}-%{version}.tar.gz |
|
9 |
+Distribution: Photon |
|
10 |
+BuildRequires: git |
|
11 |
+BuildRequires: glide |
|
12 |
+BuildRequires: go >= 1.7 |
|
13 |
+BuildRequires: protobuf |
|
14 |
+%define sha1 calico-felix=4408e0b30fee66d8813bf0351094f4b4af7d6813 |
|
15 |
+ |
|
16 |
+%description |
|
17 |
+A per-host daemon for Calico. |
|
18 |
+ |
|
19 |
+%prep |
|
20 |
+%setup -q -n felix-%{version} |
|
21 |
+ |
|
22 |
+%build |
|
23 |
+mkdir -p /root/.glide |
|
24 |
+mkdir -p ${GOPATH}/src/github.com/projectcalico/felix |
|
25 |
+cp -r * ${GOPATH}/src/github.com/projectcalico/felix/. |
|
26 |
+pushd ${GOPATH}/src/github.com/projectcalico/felix |
|
27 |
+go get -u github.com/onsi/ginkgo/ginkgo |
|
28 |
+go get -u github.com/gogo/protobuf/protoc-gen-gogofaster |
|
29 |
+go install github.com/gogo/protobuf/protoc-gen-gogofaster |
|
30 |
+glide install --strip-vendor |
|
31 |
+mkdir -p bin |
|
32 |
+cd proto |
|
33 |
+protoc --plugin=/usr/share/gocode/bin/protoc-gen-gogofaster \ |
|
34 |
+ --gogofaster_out=. felixbackend.proto |
|
35 |
+cd .. |
|
36 |
+CGO_ENABLED=0 GOOS=linux go build -v -i -o bin/calico-felix -v \ |
|
37 |
+ -ldflags " -X github.com/projectcalico/felix/buildinfo.GitVersion=<unknown> \ |
|
38 |
+ -X github.com/projectcalico/felix/buildinfo.GitRevision=<unknown>" \ |
|
39 |
+ "github.com/projectcalico/felix" |
|
40 |
+ |
|
41 |
+%install |
|
42 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
43 |
+install ${GOPATH}/src/github.com/projectcalico/felix/bin/calico-felix %{buildroot}%{_bindir}/ |
|
44 |
+ |
|
45 |
+%files |
|
46 |
+%defattr(-,root,root) |
|
47 |
+%{_bindir}/calico-felix |
|
48 |
+ |
|
49 |
+%changelog |
|
50 |
+* Sat Aug 19 2017 Vinay Kulkarni <kulkarniv@vmware.com> 2.4.1-1 |
|
51 |
+- Calico Felix for PhotonOS. |
0 | 52 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,76 @@ |
0 |
+Summary: Calico Network Policy for Kubernetes |
|
1 |
+Name: calico-k8s-policy |
|
2 |
+Version: 0.5.4 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Apache-2.0 |
|
5 |
+URL: https://github.com/projectcalico/k8s-policy |
|
6 |
+Source0: %{name}-%{version}.tar.gz |
|
7 |
+%define sha1 calico-k8s-policy=83623f81e50d81dc1dd858c9ae340a10ba3670e3 |
|
8 |
+Group: Development/Tools |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+BuildRequires: git |
|
12 |
+BuildRequires: libcalico |
|
13 |
+BuildRequires: libffi-devel |
|
14 |
+BuildRequires: openssl-devel |
|
15 |
+BuildRequires: procps-ng |
|
16 |
+BuildRequires: python2 |
|
17 |
+BuildRequires: python2-devel |
|
18 |
+BuildRequires: python2-libs |
|
19 |
+BuildRequires: python-asn1crypto |
|
20 |
+BuildRequires: python-backports.ssl_match_hostname |
|
21 |
+BuildRequires: python-ConcurrentLogHandler |
|
22 |
+BuildRequires: python-cffi |
|
23 |
+BuildRequires: pycrypto |
|
24 |
+BuildRequires: python-cryptography |
|
25 |
+BuildRequires: python-dnspython |
|
26 |
+BuildRequires: python-docopt |
|
27 |
+BuildRequires: python-enum34 |
|
28 |
+BuildRequires: python-etcd |
|
29 |
+BuildRequires: python-idna |
|
30 |
+BuildRequires: python-ipaddress |
|
31 |
+BuildRequires: python-netaddr |
|
32 |
+BuildRequires: python-ndg-httpsclient |
|
33 |
+BuildRequires: python-pyOpenSSL |
|
34 |
+BuildRequires: python-pip |
|
35 |
+BuildRequires: python-prettytable |
|
36 |
+BuildRequires: python-prometheus_client |
|
37 |
+BuildRequires: python-pyasn1 |
|
38 |
+BuildRequires: python-pycparser |
|
39 |
+BuildRequires: python-pyinstaller |
|
40 |
+BuildRequires: PyYAML |
|
41 |
+BuildRequires: python-requests |
|
42 |
+BuildRequires: python-setuptools |
|
43 |
+BuildRequires: python-simplejson |
|
44 |
+BuildRequires: python-six |
|
45 |
+BuildRequires: python-subprocess32 |
|
46 |
+BuildRequires: python-urllib3 |
|
47 |
+BuildRequires: python-websocket-client |
|
48 |
+BuildRequires: python-virtualenv |
|
49 |
+BuildRequires: python3 |
|
50 |
+Requires: python2 |
|
51 |
+Requires: python2-libs |
|
52 |
+Requires: python-setuptools |
|
53 |
+%define debug_package %{nil} |
|
54 |
+ |
|
55 |
+%description |
|
56 |
+Calico Network Policy enables Calico to enforce network policy on top of Calico BGP, Flannel, or GCE native. |
|
57 |
+ |
|
58 |
+%prep |
|
59 |
+%setup -n k8s-policy-%{version} |
|
60 |
+echo "VERSION='`git describe --tags --dirty`'" > version.py |
|
61 |
+ |
|
62 |
+%build |
|
63 |
+pyinstaller controller.py -ayF |
|
64 |
+ |
|
65 |
+%install |
|
66 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
67 |
+install -vpm 0755 -t %{buildroot}%{_bindir}/ dist/controller |
|
68 |
+ |
|
69 |
+%files |
|
70 |
+%defattr(-,root,root) |
|
71 |
+%{_bindir}/controller |
|
72 |
+ |
|
73 |
+%changelog |
|
74 |
+* Tue Aug 22 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.5.4-1 |
|
75 |
+- Calico kubernetes policy for PhotonOS. |
0 | 76 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,43 @@ |
0 |
+Summary: Docker libnetwork plugin for Calico |
|
1 |
+Name: calico-libnetwork |
|
2 |
+Version: 1.1.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+Group: Applications/System |
|
5 |
+Vendor: VMware, Inc. |
|
6 |
+License: Apache-2.0 |
|
7 |
+URL: https://github.com/projectcalico/libnetwork-plugin |
|
8 |
+Source0: %{name}-%{version}.tar.gz |
|
9 |
+Distribution: Photon |
|
10 |
+BuildRequires: git |
|
11 |
+BuildRequires: glide |
|
12 |
+BuildRequires: go >= 1.7 |
|
13 |
+%define sha1 calico-libnetwork=bed540d714a7b2e0d0138556894541109dc7b792 |
|
14 |
+%define debug_package %{nil} |
|
15 |
+ |
|
16 |
+%description |
|
17 |
+Docker libnetwork plugin for Calico. |
|
18 |
+ |
|
19 |
+%prep |
|
20 |
+%setup -q -n libnetwork-plugin-1.1.0 |
|
21 |
+ |
|
22 |
+%build |
|
23 |
+mkdir -p /root/.glide |
|
24 |
+mkdir -p ${GOPATH}/src/github.com/projectcalico/libnetwork-plugin |
|
25 |
+cp -r * ${GOPATH}/src/github.com/projectcalico/libnetwork-plugin/. |
|
26 |
+pushd ${GOPATH}/src/github.com/projectcalico/libnetwork-plugin |
|
27 |
+mkdir -p dist |
|
28 |
+glide install --strip-vendor |
|
29 |
+CGO_ENABLED=0 go build -v -i -o dist/libnetwork-plugin -ldflags "-X main.VERSION=%{version} -s -w" main.go |
|
30 |
+ |
|
31 |
+%install |
|
32 |
+pushd ${GOPATH}/src/github.com/projectcalico/libnetwork-plugin |
|
33 |
+install -vdm 0755 %{buildroot}/usr/share/calico/docker |
|
34 |
+install -vpm 0755 -t %{buildroot}/usr/share/calico/docker/ dist/libnetwork-plugin |
|
35 |
+ |
|
36 |
+%files |
|
37 |
+%defattr(-,root,root) |
|
38 |
+/usr/share/calico/docker/libnetwork-plugin |
|
39 |
+ |
|
40 |
+%changelog |
|
41 |
+* Fri Aug 18 2017 Vinay Kulkarni <kulkarniv@vmware.com> 1.1.0-1 |
|
42 |
+- Calico libnetwork plugin for PhotonOS. |
0 | 43 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,54 @@ |
0 |
+Summary: Calico node and documentation for project calico. |
|
1 |
+Name: calico |
|
2 |
+Version: 2.4.1 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Apache-2.0 |
|
5 |
+URL: https://github.com/projectcalico/calico |
|
6 |
+Source0: %{name}-%{version}.tar.gz |
|
7 |
+%define sha1 calico=2d26dbc187819231ec0d0e0fe096d5eb78aee691 |
|
8 |
+Group: Development/Tools |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+BuildRequires: git |
|
12 |
+BuildRequires: glide |
|
13 |
+BuildRequires: go >= 1.7 |
|
14 |
+BuildRequires: make |
|
15 |
+ |
|
16 |
+%description |
|
17 |
+Calico node is a container that bundles together various components reqiured for networking containers using project calico. This includes key components such as felix agent for programming routes and ACLs, BIRD routing daemon, and confd datastore monitor engine. |
|
18 |
+ |
|
19 |
+%prep |
|
20 |
+%setup |
|
21 |
+ |
|
22 |
+%build |
|
23 |
+mkdir -p /root/.glide |
|
24 |
+mkdir -p ${GOPATH}/src/github.com/projectcalico/calico |
|
25 |
+cp -r * ${GOPATH}/src/github.com/projectcalico/calico/. |
|
26 |
+pushd ${GOPATH}/src/github.com/projectcalico/calico |
|
27 |
+cd calico_node |
|
28 |
+glide install --strip-vendor |
|
29 |
+mkdir -p dist |
|
30 |
+mkdir -p .go-pkg-cache |
|
31 |
+make CALICO_GIT_VER=%{version} allocate-ipip-addr |
|
32 |
+make CALICO_GIT_VER=%{version} startup |
|
33 |
+ |
|
34 |
+%install |
|
35 |
+pushd ${GOPATH}/src/github.com/projectcalico/calico |
|
36 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
37 |
+install calico_node/dist/allocate-ipip-addr %{buildroot}%{_bindir}/ |
|
38 |
+install calico_node/dist/startup %{buildroot}%{_bindir}/ |
|
39 |
+install -vdm 0755 %{buildroot}/usr/share/calico/docker/fs |
|
40 |
+cp -r calico_node/filesystem/etc %{buildroot}/usr/share/calico/docker/fs/ |
|
41 |
+cp -r calico_node/filesystem/sbin %{buildroot}/usr/share/calico/docker/fs/ |
|
42 |
+sed -i 's/. startup.env/source \/startup.env/g' %{buildroot}/usr/share/calico/docker/fs/etc/rc.local |
|
43 |
+sed -i 's/. startup.env/source \/startup.env/g' %{buildroot}/usr/share/calico/docker/fs/sbin/start_runit |
|
44 |
+ |
|
45 |
+%files |
|
46 |
+%defattr(-,root,root) |
|
47 |
+%{_bindir}/allocate-ipip-addr |
|
48 |
+%{_bindir}/startup |
|
49 |
+/usr/share/calico/docker/fs/* |
|
50 |
+ |
|
51 |
+%changelog |
|
52 |
+* Wed Aug 16 2017 Vinay Kulkarni <kulkarniv@vmware.com> 2.4.1-1 |
|
53 |
+- Calico Node for PhotonOS. |
... | ... |
@@ -1,11 +1,11 @@ |
1 | 1 |
Summary: Overlay network for containers based on etcd |
2 | 2 |
Name: flannel |
3 |
-Version: 0.7.1 |
|
3 |
+Version: 0.8.0 |
|
4 | 4 |
Release: 1%{?dist} |
5 | 5 |
License: ASL 2.0 |
6 | 6 |
URL: https://github.com/coreos/flannel |
7 | 7 |
Source0: https://github.com/coreos/flannel/archive/%{name}-%{version}.tar.gz |
8 |
-%define sha1 flannel=3626430734a705f3a907f05f0c9a0ac33f5397dc |
|
8 |
+%define sha1 flannel=d8eb057233de1babd306297d4fc3af098ccbea16 |
|
9 | 9 |
Group: Development/Tools |
10 | 10 |
Vendor: VMware, Inc. |
11 | 11 |
Distribution: Photon |
... | ... |
@@ -14,6 +14,7 @@ BuildRequires: gcc |
14 | 14 |
BuildRequires: unzip |
15 | 15 |
BuildRequires: go |
16 | 16 |
Requires: etcd >= 2.0.0 |
17 |
+%define debug_package %{nil} |
|
17 | 18 |
|
18 | 19 |
%description |
19 | 20 |
flannel is a virtual network that provides a subnet to a container runtime |
... | ... |
@@ -35,12 +36,54 @@ popd |
35 | 35 |
install -vdm 755 %{buildroot}%{_bindir} |
36 | 36 |
install -vpm 0755 -t %{buildroot}%{_bindir}/ %{name}/dist/flanneld |
37 | 37 |
|
38 |
+install -vdm 0755 %{buildroot}/usr/share/flannel/docker |
|
39 |
+install -vpm 0755 -t %{buildroot}/usr/share/flannel/docker/ %{name}/dist/mk-docker-opts.sh |
|
40 |
+ |
|
41 |
+install -vdm 0755 %{buildroot}%{_sysconfdir}/flannel |
|
42 |
+cat << EOF >> %{buildroot}%{_sysconfdir}/flannel/flanneld.conf |
|
43 |
+### |
|
44 |
+# flanneld configuration |
|
45 |
+# |
|
46 |
+ |
|
47 |
+# etcd endpoints |
|
48 |
+ETCD_ENDPOINTS="http://127.0.0.1:4001,http://127.0.0.1:2379" |
|
49 |
+ |
|
50 |
+# flannel network config |
|
51 |
+FLANNEL_NETWORK_CONF='{"Network": "172.17.0.0/16"}' |
|
52 |
+ |
|
53 |
+# kubernetes api server URL |
|
54 |
+KUBE_API_URL="http://localhost:8080" |
|
55 |
+ |
|
56 |
+# additional flannel options |
|
57 |
+FLANNEL_OPTIONS="" |
|
58 |
+EOF |
|
59 |
+ |
|
60 |
+mkdir -p %{buildroot}/usr/lib/systemd/system |
|
61 |
+cat << EOF >> %{buildroot}/usr/lib/systemd/system/flanneld.service |
|
62 |
+[Unit] |
|
63 |
+Description=flanneld overlay network service |
|
64 |
+After=network.target etcd.service |
|
65 |
+Before=docker.service |
|
66 |
+ |
|
67 |
+[Service] |
|
68 |
+Type=notify |
|
69 |
+EnvironmentFile=-/etc/flannel/flanneld.conf |
|
70 |
+ExecStartPre=-/usr/bin/etcdctl mk /vmware/network/config \${FLANNEL_NETWORK_CONF} |
|
71 |
+ExecStart=/usr/bin/flanneld -etcd-prefix=/vmware/network -etcd-endpoints=\${ETCD_ENDPOINTS} --kube-api-url=\${KUBE_API_URL} \${FLANNEL_OPTIONS} |
|
72 |
+Restart=on-failure |
|
73 |
+ |
|
74 |
+[Install] |
|
75 |
+WantedBy=multi-user.target |
|
76 |
+RequiredBy=docker.service |
|
77 |
+EOF |
|
78 |
+ |
|
38 | 79 |
%check |
39 | 80 |
pushd %{name} |
40 | 81 |
go get golang.org/x/tools/cmd/cover |
41 | 82 |
sed -e 's:^func TestRemote:func _TestRemote:' -i remote/remote_test.go || die |
42 | 83 |
./test |
43 | 84 |
popd |
85 |
+ |
|
44 | 86 |
%post |
45 | 87 |
|
46 | 88 |
%postun |
... | ... |
@@ -48,15 +91,20 @@ popd |
48 | 48 |
%files |
49 | 49 |
%defattr(-,root,root) |
50 | 50 |
%{_bindir}/flanneld |
51 |
+%{_libdir}/systemd/system/flanneld.service |
|
52 |
+/usr/share/flannel/docker/mk-docker-opts.sh |
|
53 |
+%config(noreplace) %{_sysconfdir}/flannel/flanneld.conf |
|
51 | 54 |
|
52 | 55 |
%changelog |
53 |
-* Fri May 05 2017 Chang Lee <changlee@vmware.com> 0.7.1-1 |
|
54 |
-- Updated to version 0.7.1 |
|
55 |
-* Tue Apr 04 2017 Chang Lee <changlee@vmware.com> 0.7.0-1 |
|
56 |
-- Updated to version 0.7.0 |
|
57 |
-* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.5.5-2 |
|
58 |
-- GA - Bump release of all rpms |
|
59 |
-* Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.5.5-1 |
|
60 |
-- Upgraded to version 0.5.5 |
|
61 |
-* Mon Aug 03 2015 Vinay Kulkarni <kulkarniv@vmware.com> 0.5.2-1 |
|
62 |
-- Add flannel package to photon. |
|
56 |
+* Tue Aug 08 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.8.0-1 |
|
57 |
+- Flannel 0.8.0 and systemd service file. |
|
58 |
+* Fri May 05 2017 Chang Lee <changlee@vmware.com> 0.7.1-1 |
|
59 |
+- Updated to version 0.7.1 |
|
60 |
+* Tue Apr 04 2017 Chang Lee <changlee@vmware.com> 0.7.0-1 |
|
61 |
+- Updated to version 0.7.0 |
|
62 |
+* Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 0.5.5-2 |
|
63 |
+- GA - Bump release of all rpms |
|
64 |
+* Tue Feb 23 2016 Harish Udaiya Kumar <hudaiyakumar@vmware.com> 0.5.5-1 |
|
65 |
+- Upgraded to version 0.5.5 |
|
66 |
+* Mon Aug 03 2015 Vinay Kulkarni <kulkarniv@vmware.com> 0.5.2-1 |
|
67 |
+- Add flannel package to photon. |
63 | 68 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,40 @@ |
0 |
+Summary: Vendor Package Management for Goland |
|
1 |
+Name: glide |
|
2 |
+Version: 0.12.3 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: MIT |
|
5 |
+URL: https://github.com/Masterminds/glide |
|
6 |
+Source0: %{name}-%{version}.tar.gz |
|
7 |
+%define sha1 glide=259cfe5a4d598434865c9bb95ed5a98bfd2d8e77 |
|
8 |
+Group: Development/Tools |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+BuildRequires: git |
|
12 |
+BuildRequires: go >= 1.7 |
|
13 |
+BuildRequires: perl |
|
14 |
+ |
|
15 |
+%description |
|
16 |
+Glide is a tool for managing the vendor directory within a Go package. |
|
17 |
+ |
|
18 |
+%prep |
|
19 |
+%setup |
|
20 |
+ |
|
21 |
+%build |
|
22 |
+mkdir -p ${GOPATH}/src/github.com/Masterminds/glide |
|
23 |
+cp -r * ${GOPATH}/src/github.com/Masterminds/glide/. |
|
24 |
+pushd ${GOPATH}/src/github.com/Masterminds/glide |
|
25 |
+make VERSION=%{version} build |
|
26 |
+ |
|
27 |
+%install |
|
28 |
+pushd ${GOPATH}/src/github.com/Masterminds/glide |
|
29 |
+make install |
|
30 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
31 |
+install -vpm 0755 -t %{buildroot}%{_bindir}/ ./glide |
|
32 |
+ |
|
33 |
+%files |
|
34 |
+%defattr(-,root,root) |
|
35 |
+%{_bindir}/glide |
|
36 |
+ |
|
37 |
+%changelog |
|
38 |
+* Mon Aug 14 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.12.3-1 |
|
39 |
+- glide for PhotonOS. |
0 | 40 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,75 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+ |
|
2 |
+Summary: Library for interacting with Calico data model. |
|
3 |
+Name: libcalico |
|
4 |
+Version: 0.19.0 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+License: Apache-2.0 |
|
7 |
+URL: https://github.com/projectcalico/libcalico |
|
8 |
+Source0: %{name}-%{version}.tar.gz |
|
9 |
+%define sha1 libcalico=c3d0f9f36930389fc3b6f1f2222ebc85440a50ee |
|
10 |
+Group: Development/Tools |
|
11 |
+Vendor: VMware, Inc. |
|
12 |
+Distribution: Photon |
|
13 |
+BuildRequires: git |
|
14 |
+BuildRequires: libffi-devel |
|
15 |
+BuildRequires: openssl-devel |
|
16 |
+BuildRequires: procps-ng |
|
17 |
+BuildRequires: python2 |
|
18 |
+BuildRequires: python2-devel |
|
19 |
+BuildRequires: python2-libs |
|
20 |
+BuildRequires: python-asn1crypto |
|
21 |
+BuildRequires: python-backports.ssl_match_hostname |
|
22 |
+BuildRequires: python-ConcurrentLogHandler |
|
23 |
+BuildRequires: python-cffi |
|
24 |
+BuildRequires: pycrypto |
|
25 |
+BuildRequires: python-cryptography |
|
26 |
+BuildRequires: python-dnspython |
|
27 |
+BuildRequires: python-docopt |
|
28 |
+BuildRequires: python-enum34 |
|
29 |
+BuildRequires: python-etcd |
|
30 |
+BuildRequires: python-idna |
|
31 |
+BuildRequires: python-ipaddress |
|
32 |
+BuildRequires: python-netaddr |
|
33 |
+BuildRequires: python-ndg-httpsclient |
|
34 |
+BuildRequires: python-pyOpenSSL |
|
35 |
+BuildRequires: python-pip |
|
36 |
+BuildRequires: python-prettytable |
|
37 |
+BuildRequires: python-prometheus_client |
|
38 |
+BuildRequires: python-pyasn1 |
|
39 |
+BuildRequires: python-pycparser |
|
40 |
+BuildRequires: python-pyinstaller |
|
41 |
+BuildRequires: PyYAML |
|
42 |
+BuildRequires: python-requests |
|
43 |
+BuildRequires: python-setuptools |
|
44 |
+BuildRequires: python-simplejson |
|
45 |
+BuildRequires: python-six |
|
46 |
+BuildRequires: python-subprocess32 |
|
47 |
+BuildRequires: python-urllib3 |
|
48 |
+BuildRequires: python-websocket-client |
|
49 |
+BuildRequires: python-virtualenv |
|
50 |
+BuildRequires: python3 |
|
51 |
+Requires: python2 |
|
52 |
+Requires: python2-libs |
|
53 |
+Requires: python-setuptools |
|
54 |
+%define debug_package %{nil} |
|
55 |
+ |
|
56 |
+%description |
|
57 |
+Library for interacting with Calico data model. |
|
58 |
+ |
|
59 |
+%prep |
|
60 |
+%setup |
|
61 |
+ |
|
62 |
+%build |
|
63 |
+python2 setup.py build |
|
64 |
+ |
|
65 |
+%install |
|
66 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
67 |
+ |
|
68 |
+%files |
|
69 |
+%defattr(-,root,root) |
|
70 |
+%{python2_sitelib}/* |
|
71 |
+ |
|
72 |
+%changelog |
|
73 |
+* Wed Aug 23 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.19.0-1 |
|
74 |
+- libcalico for PhotonOS. |
0 | 75 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,41 @@ |
0 |
+Summary: NGINX Ingress Controller for Kubernetes |
|
1 |
+Name: nginx-ingress |
|
2 |
+Version: 0.9.0 |
|
3 |
+Release: 1%{?dist} |
|
4 |
+License: Apache-2.0 |
|
5 |
+URL: https://github.com/nginxinc/kubernetes-ingress |
|
6 |
+Source0: %{name}-%{version}.tar.gz |
|
7 |
+%define sha1 nginx-ingress=ea71044b1c8298c85cf5f0971100f735f99240ce |
|
8 |
+Group: Development/Tools |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+BuildRequires: go >= 1.7 |
|
12 |
+ |
|
13 |
+%description |
|
14 |
+This is an implementation of kubernetes ingress controller for NGINX. |
|
15 |
+ |
|
16 |
+%prep |
|
17 |
+%setup -n kubernetes-ingress-%{version} |
|
18 |
+ |
|
19 |
+%build |
|
20 |
+mkdir -p ${GOPATH}/src/github.com/nginxinc/kubernetes-ingress |
|
21 |
+cp -r * ${GOPATH}/src/github.com/nginxinc/kubernetes-ingress/. |
|
22 |
+pushd ${GOPATH}/src/github.com/nginxinc/kubernetes-ingress/nginx-controller |
|
23 |
+CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-w -X main.version=%{version}" -o nginx-ingress *.go |
|
24 |
+ |
|
25 |
+%install |
|
26 |
+pushd ${GOPATH}/src/github.com/nginxinc/kubernetes-ingress/nginx-controller |
|
27 |
+install -vdm 755 %{buildroot}%{_bindir} |
|
28 |
+install -vpm 0755 -t %{buildroot}%{_bindir} nginx-ingress |
|
29 |
+install -vdm 0755 %{buildroot}/usr/share/nginx-ingress/docker |
|
30 |
+install -vpm 0755 -t %{buildroot}/usr/share/nginx-ingress/docker/ nginx/templates/nginx.ingress.tmpl |
|
31 |
+install -vpm 0755 -t %{buildroot}/usr/share/nginx-ingress/docker/ nginx/templates/nginx.tmpl |
|
32 |
+ |
|
33 |
+%files |
|
34 |
+%defattr(-,root,root) |
|
35 |
+%{_bindir}/nginx-ingress |
|
36 |
+/usr/share/nginx-ingress/docker/nginx.* |
|
37 |
+ |
|
38 |
+%changelog |
|
39 |
+* Mon Aug 28 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.9.0-1 |
|
40 |
+- K8S NGINX Ingress Controller for PhotonOS. |
0 | 41 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,81 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+ |
|
3 |
+Name: python-ConcurrentLogHandler |
|
4 |
+Version: 0.9.1 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+Summary: Concurrent logging handler (drop-in replacement for RotatingFileHandler) Python 2.6+ |
|
7 |
+License: Apache-2.0 |
|
8 |
+Group: Development/Languages/Python |
|
9 |
+Url: https://pypi.python.org/pypi/ConcurrentLogHandler/0.9.1 |
|
10 |
+Source0: ConcurrentLogHandler-%{version}.tar.gz |
|
11 |
+%define sha1 ConcurrentLogHandler=9afcd87b6eb0f37f65b8d7eb928c6d20415692ab |
|
12 |
+Vendor: VMware, Inc. |
|
13 |
+Distribution: Photon |
|
14 |
+ |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-libs |
|
17 |
+BuildRequires: python-setuptools |
|
18 |
+BuildRequires: python-pytest |
|
19 |
+Requires: python2 |
|
20 |
+Requires: python2-libs |
|
21 |
+Requires: python-setuptools |
|
22 |
+ |
|
23 |
+BuildArch: noarch |
|
24 |
+ |
|
25 |
+%description |
|
26 |
+ConcurrentLogHandler is a module that provides an additional log handler for Python’s standard logging package (PEP 282). This handler will write log events to log file which is rotated when the log file reaches a certain size. Multiple processes can safely write to the same log file concurrently. |
|
27 |
+ |
|
28 |
+%package -n python3-ConcurrentLogHandler |
|
29 |
+Summary: python-ConcurrentLogHandler |
|
30 |
+BuildRequires: python3 |
|
31 |
+BuildRequires: python3-devel |
|
32 |
+BuildRequires: python3-libs |
|
33 |
+BuildRequires: python3-setuptools |
|
34 |
+BuildRequires: python3-xml |
|
35 |
+BuildRequires: python3-pytest |
|
36 |
+Requires: python3 |
|
37 |
+Requires: python3-libs |
|
38 |
+Requires: python3-setuptools |
|
39 |
+ |
|
40 |
+%description -n python3-ConcurrentLogHandler |
|
41 |
+Python 3 version. |
|
42 |
+ |
|
43 |
+%prep |
|
44 |
+%setup -n ConcurrentLogHandler-%{version} |
|
45 |
+rm -rf ../p3dir |
|
46 |
+cp -a . ../p3dir |
|
47 |
+ |
|
48 |
+%build |
|
49 |
+python2 setup.py build |
|
50 |
+pushd ../p3dir |
|
51 |
+python3 setup.py build |
|
52 |
+popd |
|
53 |
+ |
|
54 |
+%install |
|
55 |
+pushd ../p3dir |
|
56 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
57 |
+popd |
|
58 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
59 |
+ |
|
60 |
+%check |
|
61 |
+python2 setup.py test |
|
62 |
+pushd ../p3dir |
|
63 |
+python3 setup.py test |
|
64 |
+popd |
|
65 |
+ |
|
66 |
+%files |
|
67 |
+%defattr(-,root,root,-) |
|
68 |
+%{python_sitelib}/* |
|
69 |
+%doc /usr/docs/LICENSE |
|
70 |
+%doc /usr/docs/README |
|
71 |
+%exclude /usr/tests/stresstest.py |
|
72 |
+ |
|
73 |
+%files -n python3-ConcurrentLogHandler |
|
74 |
+%defattr(-,root,root,-) |
|
75 |
+%{python3_sitelib}/* |
|
76 |
+%exclude /usr/tests/stresstest.py |
|
77 |
+ |
|
78 |
+%changelog |
|
79 |
+* Fri Aug 25 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.9.1-1 |
|
80 |
+- Initial version of python-ConcurrentLogHandler package for Photon. |
0 | 81 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,77 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+ |
|
3 |
+Name: python-docopt |
|
4 |
+Version: 0.6.2 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+Summary: Pythonic argument parser to create command line interfaces. |
|
7 |
+License: MIT |
|
8 |
+Group: Development/Languages/Python |
|
9 |
+Url: https://pypi.python.org/pypi/docopt |
|
10 |
+Source0: docopt-%{version}.tar.gz |
|
11 |
+%define sha1 docopt=224a3ec08b56445a1bd1583aad06b00692671e04 |
|
12 |
+Vendor: VMware, Inc. |
|
13 |
+Distribution: Photon |
|
14 |
+ |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-libs |
|
17 |
+BuildRequires: python-setuptools |
|
18 |
+BuildRequires: python-pytest |
|
19 |
+Requires: python2 |
|
20 |
+Requires: python2-libs |
|
21 |
+Requires: python-setuptools |
|
22 |
+ |
|
23 |
+BuildArch: noarch |
|
24 |
+ |
|
25 |
+%description |
|
26 |
+docopt helps easily create most beautiful command-line interfaces. |
|
27 |
+ |
|
28 |
+%package -n python3-docopt |
|
29 |
+Summary: python-docopt |
|
30 |
+BuildRequires: python3 |
|
31 |
+BuildRequires: python3-devel |
|
32 |
+BuildRequires: python3-libs |
|
33 |
+BuildRequires: python3-setuptools |
|
34 |
+BuildRequires: python3-xml |
|
35 |
+BuildRequires: python3-pytest |
|
36 |
+Requires: python3 |
|
37 |
+Requires: python3-libs |
|
38 |
+Requires: python3-setuptools |
|
39 |
+ |
|
40 |
+%description -n python3-docopt |
|
41 |
+Python 3 version. |
|
42 |
+ |
|
43 |
+%prep |
|
44 |
+%setup -n docopt-%{version} |
|
45 |
+rm -rf ../p3dir |
|
46 |
+cp -a . ../p3dir |
|
47 |
+ |
|
48 |
+%build |
|
49 |
+python2 setup.py build |
|
50 |
+pushd ../p3dir |
|
51 |
+python3 setup.py build |
|
52 |
+popd |
|
53 |
+ |
|
54 |
+%install |
|
55 |
+pushd ../p3dir |
|
56 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
57 |
+popd |
|
58 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
59 |
+ |
|
60 |
+%check |
|
61 |
+python2 setup.py test |
|
62 |
+pushd ../p3dir |
|
63 |
+python3 setup.py test |
|
64 |
+popd |
|
65 |
+ |
|
66 |
+%files |
|
67 |
+%defattr(-,root,root,-) |
|
68 |
+%{python_sitelib}/* |
|
69 |
+ |
|
70 |
+%files -n python3-docopt |
|
71 |
+%defattr(-,root,root,-) |
|
72 |
+%{python3_sitelib}/* |
|
73 |
+ |
|
74 |
+%changelog |
|
75 |
+* Fri Aug 25 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.6.2-1 |
|
76 |
+- Initial version of python-docopt package for Photon. |
0 | 77 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,67 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+ |
|
3 |
+Name: python-etcd |
|
4 |
+Version: 0.4.5 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+Summary: Python API for etcd |
|
7 |
+License: MIT |
|
8 |
+Group: Development/Languages/Python |
|
9 |
+Url: https://pypi.python.org/pypi/python-etcd |
|
10 |
+Source0: %{name}-%{version}.tar.gz |
|
11 |
+%define sha1 python-etcd=9e79ae82429cf2ffbe2b5647e14bc29571afd766 |
|
12 |
+Vendor: VMware, Inc. |
|
13 |
+Distribution: Photon |
|
14 |
+ |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-devel |
|
17 |
+BuildRequires: python2-libs |
|
18 |
+BuildRequires: python-pip |
|
19 |
+BuildRequires: python-setuptools |
|
20 |
+Requires: python2 |
|
21 |
+Requires: python2-libs |
|
22 |
+Requires: python-setuptools |
|
23 |
+BuildArch: noarch |
|
24 |
+ |
|
25 |
+%description |
|
26 |
+Python API for etcd |
|
27 |
+ |
|
28 |
+%package -n python3-etcd |
|
29 |
+Summary: Python3 API for etcd |
|
30 |
+BuildRequires: python3 |
|
31 |
+BuildRequires: python3-devel |
|
32 |
+BuildRequires: python3-libs |
|
33 |
+BuildRequires: python3-pip |
|
34 |
+BuildRequires: python3-setuptools |
|
35 |
+ |
|
36 |
+%description -n python3-etcd |
|
37 |
+Python3 API for etcd |
|
38 |
+ |
|
39 |
+%prep |
|
40 |
+%setup -n %{name}-%{version} |
|
41 |
+rm -rf ../p3dir |
|
42 |
+cp -a . ../p3dir |
|
43 |
+ |
|
44 |
+%build |
|
45 |
+python2 setup.py build |
|
46 |
+pushd ../p3dir |
|
47 |
+python3 setup.py build |
|
48 |
+popd |
|
49 |
+ |
|
50 |
+%install |
|
51 |
+pushd ../p3dir |
|
52 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
53 |
+popd |
|
54 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
55 |
+ |
|
56 |
+%files |
|
57 |
+%defattr(-,root,root,-) |
|
58 |
+%{python2_sitelib}/* |
|
59 |
+ |
|
60 |
+%files -n python3-etcd |
|
61 |
+%defattr(-,root,root,-) |
|
62 |
+%{python3_sitelib}/* |
|
63 |
+ |
|
64 |
+%changelog |
|
65 |
+* Sat Aug 26 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.4.5-1 |
|
66 |
+- Initial version of python etcd for PhotonOS. |
0 | 67 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,68 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+ |
|
3 |
+Name: python-ndg-httpsclient |
|
4 |
+Version: 0.4.2 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+Summary: Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL. |
|
7 |
+License: BSD |
|
8 |
+Group: Development/Languages/Python |
|
9 |
+Url: https://pypi.python.org/pypi/ndg-httpsclient |
|
10 |
+Source0: ndg_httpsclient-%{version}.tar.gz |
|
11 |
+%define sha1 ndg_httpsclient=03396d0b960c414e92ff355b4fe0fe210855fd58 |
|
12 |
+Vendor: VMware, Inc. |
|
13 |
+Distribution: Photon |
|
14 |
+ |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-devel |
|
17 |
+BuildRequires: python2-libs |
|
18 |
+BuildRequires: python-pip |
|
19 |
+BuildRequires: python-setuptools |
|
20 |
+Requires: python2 |
|
21 |
+Requires: python2-libs |
|
22 |
+Requires: python-setuptools |
|
23 |
+BuildArch: noarch |
|
24 |
+ |
|
25 |
+%description |
|
26 |
+Enhanced HTTPS support for httplib and urllib2 using PyOpenSSL. |
|
27 |
+ |
|
28 |
+%package -n python3-ndg-httpsclient |
|
29 |
+Summary: Python3 version of ndg-httpsclient. |
|
30 |
+BuildRequires: python3 |
|
31 |
+BuildRequires: python3-devel |
|
32 |
+BuildRequires: python3-libs |
|
33 |
+BuildRequires: python3-pip |
|
34 |
+BuildRequires: python3-setuptools |
|
35 |
+ |
|
36 |
+%description -n python3-ndg-httpsclient |
|
37 |
+Python3 version of ndg-httpsclient. |
|
38 |
+ |
|
39 |
+%prep |
|
40 |
+%setup -n ndg_httpsclient-%{version} |
|
41 |
+rm -rf ../p3dir |
|
42 |
+cp -a . ../p3dir |
|
43 |
+ |
|
44 |
+%build |
|
45 |
+python2 setup.py build |
|
46 |
+pushd ../p3dir |
|
47 |
+python3 setup.py build |
|
48 |
+popd |
|
49 |
+ |
|
50 |
+%install |
|
51 |
+pushd ../p3dir |
|
52 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
53 |
+popd |
|
54 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
55 |
+ |
|
56 |
+%files |
|
57 |
+%defattr(-,root,root,-) |
|
58 |
+%{_bindir}/ndg_httpclient |
|
59 |
+%{python2_sitelib}/* |
|
60 |
+ |
|
61 |
+%files -n python3-ndg-httpsclient |
|
62 |
+%defattr(-,root,root,-) |
|
63 |
+%{python3_sitelib}/* |
|
64 |
+ |
|
65 |
+%changelog |
|
66 |
+* Tue Aug 29 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.4.2-1 |
|
67 |
+- Initial version of python ndg-httpsclient for PhotonOS. |
0 | 68 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,76 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+ |
|
3 |
+Name: python-prometheus_client |
|
4 |
+Version: 0.0.20 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+Summary: Python client for the Prometheus monitoring system. |
|
7 |
+License: Apache-2.0 |
|
8 |
+Group: Development/Languages/Python |
|
9 |
+Url: https://pypi.python.org/pypi/prometheus_client |
|
10 |
+Source0: prometheus_client-%{version}.tar.gz |
|
11 |
+%define sha1 prometheus_client=f153df2466d4ccbd877c61107ba4b48115a2b7d5 |
|
12 |
+Vendor: VMware, Inc. |
|
13 |
+Distribution: Photon |
|
14 |
+ |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-libs |
|
17 |
+BuildRequires: python-setuptools |
|
18 |
+BuildRequires: python-pytest |
|
19 |
+Requires: python2 |
|
20 |
+Requires: python2-libs |
|
21 |
+Requires: python-setuptools |
|
22 |
+BuildArch: noarch |
|
23 |
+ |
|
24 |
+%description |
|
25 |
+Python client for the Prometheus monitoring system. |
|
26 |
+ |
|
27 |
+%package -n python3-prometheus_client |
|
28 |
+Summary: python-prometheus_client |
|
29 |
+BuildRequires: python3 |
|
30 |
+BuildRequires: python3-devel |
|
31 |
+BuildRequires: python3-libs |
|
32 |
+BuildRequires: python3-setuptools |
|
33 |
+BuildRequires: python3-xml |
|
34 |
+BuildRequires: python3-pytest |
|
35 |
+Requires: python3 |
|
36 |
+Requires: python3-libs |
|
37 |
+Requires: python3-setuptools |
|
38 |
+ |
|
39 |
+%description -n python3-prometheus_client |
|
40 |
+Python 3 version. |
|
41 |
+ |
|
42 |
+%prep |
|
43 |
+%setup -n prometheus_client-%{version} |
|
44 |
+rm -rf ../p3dir |
|
45 |
+cp -a . ../p3dir |
|
46 |
+ |
|
47 |
+%build |
|
48 |
+python2 setup.py build |
|
49 |
+pushd ../p3dir |
|
50 |
+python3 setup.py build |
|
51 |
+popd |
|
52 |
+ |
|
53 |
+%install |
|
54 |
+pushd ../p3dir |
|
55 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
56 |
+popd |
|
57 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
58 |
+ |
|
59 |
+%check |
|
60 |
+python2 setup.py test |
|
61 |
+pushd ../p3dir |
|
62 |
+python3 setup.py test |
|
63 |
+popd |
|
64 |
+ |
|
65 |
+%files |
|
66 |
+%defattr(-,root,root,-) |
|
67 |
+%{python_sitelib}/* |
|
68 |
+ |
|
69 |
+%files -n python3-prometheus_client |
|
70 |
+%defattr(-,root,root,-) |
|
71 |
+%{python3_sitelib}/* |
|
72 |
+ |
|
73 |
+%changelog |
|
74 |
+* Fri Aug 25 2017 Vinay Kulkarni <kulkarniv@vmware.com> 0.0.20-1 |
|
75 |
+- Initial version of python-prometheus_client package for Photon. |
0 | 76 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,120 @@ |
0 |
+%define debug_package %{nil} |
|
1 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
3 |
+Summary: PyInstaller bundles a Python application and all its dependencies into a single package. |
|
4 |
+Name: python-pyinstaller |
|
5 |
+Version: 3.2.1 |
|
6 |
+Release: 1%{?dist} |
|
7 |
+Url: https://pypi.python.org/pypi/PyInstaller/3.2.1 |
|
8 |
+License: GPLv2+ |
|
9 |
+Group: Development/Languages/Python |
|
10 |
+Vendor: VMware, Inc. |
|
11 |
+Distribution: Photon |
|
12 |
+Source0: https://files.pythonhosted.org/packages/source/P/PyInstaller/PyInstaller-%{version}.tar.bz2 |
|
13 |
+%define sha1 PyInstaller=6e8bc52d325a5527402ad574f774ed64c70bf03f |
|
14 |
+Patch0: python2-unit-tests.patch |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-libs |
|
17 |
+BuildRequires: python2-devel |
|
18 |
+BuildRequires: python-setuptools |
|
19 |
+%if %{with_check} |
|
20 |
+BuildRequires: python-six |
|
21 |
+BuildRequires: python-pytest |
|
22 |
+BuildRequires: python-psutil |
|
23 |
+%endif |
|
24 |
+Requires: python2 |
|
25 |
+Requires: python2-libs |
|
26 |
+Requires: python-setuptools |
|
27 |
+Requires: python-xml |
|
28 |
+ |
|
29 |
+%description |
|
30 |
+PyInstaller bundles a Python application and all its dependencies into a single package. The user can run the packaged app without installing a Python interpreter or any modules. |
|
31 |
+PyInstaller reads a Python script written by you. It analyzes your code to discover every other module and library your script needs in order to execute. Then it collects copies of all those files – including the active Python interpreter! – and puts them with your script in a single folder, or optionally in a single executable file. |
|
32 |
+ |
|
33 |
+PyInstaller is tested against Windows, Mac OS X, and Linux. However, it is not a cross-compiler: to make a Windows app you run PyInstaller in Windows; to make a Linux app you run it in Linux, etc. PyInstaller has been used successfully with AIX, Solaris, and FreeBSD, but is not tested against them. |
|
34 |
+%package -n python3-pyinstaller |
|
35 |
+Summary: Python 3 version |
|
36 |
+BuildRequires: python3 |
|
37 |
+BuildRequires: python3-devel |
|
38 |
+BuildRequires: python3-libs |
|
39 |
+BuildRequires: python3-setuptools |
|
40 |
+BuildRequires: python3-xml |
|
41 |
+BuildRequires: zlib-devel |
|
42 |
+%if %{with_check} |
|
43 |
+BuildRequires: python3-pytest |
|
44 |
+%endif |
|
45 |
+Requires: python3 |
|
46 |
+Requires: python3-libs |
|
47 |
+Requires: zlib |
|
48 |
+Requires: python3-setuptools |
|
49 |
+Requires: python3-xml |
|
50 |
+ |
|
51 |
+%description -n python3-pyinstaller |
|
52 |
+Python 3 version. |
|
53 |
+ |
|
54 |
+%prep |
|
55 |
+%setup -q -n PyInstaller-%{version} |
|
56 |
+ |
|
57 |
+rm -rf ../p3dir |
|
58 |
+cp -a . ../p3dir |
|
59 |
+%patch0 -p1 |
|
60 |
+ |
|
61 |
+%build |
|
62 |
+python2 setup.py build |
|
63 |
+pushd ../p3dir |
|
64 |
+python3 setup.py build |
|
65 |
+popd |
|
66 |
+ |
|
67 |
+%install |
|
68 |
+pushd ../p3dir |
|
69 |
+python3 setup.py install --single-version-externally-managed -O1 --root=%{buildroot} |
|
70 |
+mv %{buildroot}/%{_bindir}/pyi-archive_viewer %{buildroot}/%{_bindir}/pyi-archive_viewer3 |
|
71 |
+mv %{buildroot}/%{_bindir}/pyi-bindepend %{buildroot}/%{_bindir}/pyi-bindepend3 |
|
72 |
+mv %{buildroot}/%{_bindir}/pyi-grab_version %{buildroot}/%{_bindir}/pyi-grab_version3 |
|
73 |
+mv %{buildroot}/%{_bindir}/pyi-makespec %{buildroot}/%{_bindir}/pyi-makespec3 |
|
74 |
+mv %{buildroot}/%{_bindir}/pyi-set_version %{buildroot}/%{_bindir}/pyi-set_version3 |
|
75 |
+mv %{buildroot}/%{_bindir}/pyinstaller %{buildroot}/%{_bindir}/pyinstaller3 |
|
76 |
+ |
|
77 |
+popd |
|
78 |
+python2 setup.py install --single-version-externally-managed -O1 --root=%{buildroot} |
|
79 |
+ |
|
80 |
+ |
|
81 |
+%check |
|
82 |
+py.test2 tests/unit tests/functional |
|
83 |
+pushd ../p3dir |
|
84 |
+python3 setup.py test |
|
85 |
+popd |
|
86 |
+ |
|
87 |
+%files |
|
88 |
+%defattr(-,root,root) |
|
89 |
+%{_bindir}/pyi-archive_viewer |
|
90 |
+%{_bindir}/pyi-bindepend |
|
91 |
+%{_bindir}/pyi-grab_version |
|
92 |
+%{_bindir}/pyi-makespec |
|
93 |
+%{_bindir}/pyi-set_version |
|
94 |
+%{_bindir}/pyinstaller |
|
95 |
+ |
|
96 |
+%{python2_sitelib}/* |
|
97 |
+%{_bindir}/pyi-archive_viewer3 |
|
98 |
+%{_bindir}/pyi-bindepend3 |
|
99 |
+%{_bindir}/pyi-grab_version3 |
|
100 |
+%{_bindir}/pyi-makespec3 |
|
101 |
+%{_bindir}/pyi-set_version3 |
|
102 |
+%{_bindir}/pyinstaller3 |
|
103 |
+%exclude %{python2_sitelib}/PyInstaller/bootloader/Darwin-64bit |
|
104 |
+%exclude %{python2_sitelib}/PyInstaller/bootloader/Linux-32bit |
|
105 |
+%exclude %{python2_sitelib}/PyInstaller/bootloader/Windows-32bit |
|
106 |
+%exclude %{python2_sitelib}/PyInstaller/bootloader/Windows-64bit |
|
107 |
+ |
|
108 |
+%files -n python3-pyinstaller |
|
109 |
+%defattr(-,root,root,-) |
|
110 |
+%{_bindir}/* |
|
111 |
+%{python3_sitelib}/* |
|
112 |
+%exclude %{python3_sitelib}/PyInstaller/bootloader/Darwin-64bit |
|
113 |
+%exclude %{python3_sitelib}/PyInstaller/bootloader/Linux-32bit |
|
114 |
+%exclude %{python3_sitelib}/PyInstaller/bootloader/Windows-32bit |
|
115 |
+%exclude %{python3_sitelib}/PyInstaller/bootloader/Windows-64bit |
|
116 |
+ |
|
117 |
+%changelog |
|
118 |
+* Tue Feb 14 2017 Xiaolin Li <xiaolinl@vmware.com> 3.2.1-1 |
|
119 |
+- Initial packaging for Photon |
0 | 120 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,27 @@ |
0 |
+diff --git a/tests/unit/test_hookutils.py b/tests/unit/test_hookutils.py |
|
1 |
+index a33f5e5..f8908e7 |
|
2 |
+--- a/tests/unit/test_hookutils.py |
|
3 |
+@@ -13,7 +13,7 @@ import pytest |
|
4 |
+ import shutil |
|
5 |
+ from os.path import join |
|
6 |
+ from threading import Thread |
|
7 |
+-from queue import Queue |
|
8 |
++from multiprocessing import Queue |
|
9 |
+ |
|
10 |
+ from PyInstaller.utils.hooks import collect_data_files, collect_submodules, \ |
|
11 |
+ get_module_file_attribute, remove_prefix, remove_suffix, \ |
|
12 |
+ |
|
13 |
+diff --git a/tests/unit/test_loader.py b/tests/unit/test_loader.py |
|
14 |
+index 67ad04b..127d9ec |
|
15 |
+--- a/tests/unit/test_loader.py |
|
16 |
+@@ -10,7 +10,7 @@ |
|
17 |
+ |
|
18 |
+ import pytest |
|
19 |
+ from threading import Thread |
|
20 |
+-from queue import Queue |
|
21 |
++from multiprocessing import Queue |
|
22 |
+ |
|
23 |
+ from PyInstaller.loader.pyimod02_archive import ArchiveFile |
|
24 |
+ |
0 | 25 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,42 @@ |
0 |
+Name: python-subprocess32 |
|
1 |
+Version: 3.2.7 |
|
2 |
+Release: 1%{?dist} |
|
3 |
+Summary: A backport of the subprocess module from Python 3.2/3.3 for use on 2.x |
|
4 |
+License: PSF |
|
5 |
+Group: Development/Languages/Python |
|
6 |
+Url: https://pypi.python.org/pypi/subprocess32 |
|
7 |
+Source0: subprocess32-%{version}.tar.gz |
|
8 |
+%define sha1 subprocess32=75a8664ba54663016315dae17510af97c5a96953 |
|
9 |
+Vendor: VMware, Inc. |
|
10 |
+Distribution: Photon |
|
11 |
+ |
|
12 |
+BuildRequires: python2 |
|
13 |
+BuildRequires: python2-libs |
|
14 |
+BuildRequires: python-setuptools |
|
15 |
+BuildRequires: python-pytest |
|
16 |
+Requires: python2 |
|
17 |
+Requires: python2-libs |
|
18 |
+Requires: python-setuptools |
|
19 |
+ |
|
20 |
+%description |
|
21 |
+A backport of the subprocess module from Python 3.2/3.3 for use on 2.x |
|
22 |
+ |
|
23 |
+%prep |
|
24 |
+%setup -n subprocess32-%{version} |
|
25 |
+ |
|
26 |
+%build |
|
27 |
+python2 setup.py build |
|
28 |
+ |
|
29 |
+%install |
|
30 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
31 |
+ |
|
32 |
+%check |
|
33 |
+python2 setup.py test |
|
34 |
+ |
|
35 |
+%files |
|
36 |
+%defattr(-,root,root,-) |
|
37 |
+%{python_sitelib}/* |
|
38 |
+ |
|
39 |
+%changelog |
|
40 |
+* Fri Aug 25 2017 Vinay Kulkarni <kulkarniv@vmware.com> 3.2.7-1 |
|
41 |
+- Initial version of python-subprocess32 package for Photon. |
0 | 42 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,78 @@ |
0 |
+%{!?python2_sitelib: %define python2_sitelib %(python2 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
1 |
+%{!?python3_sitelib: %define python3_sitelib %(python3 -c "from distutils.sysconfig import get_python_lib;print(get_python_lib())")} |
|
2 |
+ |
|
3 |
+Name: python-virtualenv |
|
4 |
+Version: 15.1.0 |
|
5 |
+Release: 1%{?dist} |
|
6 |
+Summary: Virtual Python Environment builder |
|
7 |
+License: MIT |
|
8 |
+Group: Development/Languages/Python |
|
9 |
+Url: https://pypi.python.org/pypi/virtualenv |
|
10 |
+Source0: virtualenv-%{version}.tar.gz |
|
11 |
+%define sha1 virtualenv=995ce0fa007210ac2f10258999d06813ecdd6eeb |
|
12 |
+Vendor: VMware, Inc. |
|
13 |
+Distribution: Photon |
|
14 |
+ |
|
15 |
+BuildRequires: python2 |
|
16 |
+BuildRequires: python2-libs |
|
17 |
+BuildRequires: python-setuptools |
|
18 |
+BuildRequires: python-pytest |
|
19 |
+Requires: python2 |
|
20 |
+Requires: python2-libs |
|
21 |
+BuildRequires: python-setuptools |
|
22 |
+ |
|
23 |
+BuildArch: noarch |
|
24 |
+ |
|
25 |
+%description |
|
26 |
+virtualenv is a tool to create isolated Python environment. |
|
27 |
+ |
|
28 |
+%package -n python3-virtualenv |
|
29 |
+Summary: Virtual Python Environment builder |
|
30 |
+BuildRequires: python3 |
|
31 |
+BuildRequires: python3-devel |
|
32 |
+BuildRequires: python3-libs |
|
33 |
+BuildRequires: python3-setuptools |
|
34 |
+BuildRequires: python3-xml |
|
35 |
+BuildRequires: python3-pytest |
|
36 |
+Requires: python3 |
|
37 |
+Requires: python3-libs |
|
38 |
+BuildRequires: python3-setuptools |
|
39 |
+ |
|
40 |
+%description -n python3-virtualenv |
|
41 |
+Python 3 version. |
|
42 |
+ |
|
43 |
+%prep |
|
44 |
+%setup -n virtualenv-%{version} |
|
45 |
+rm -rf ../p3dir |
|
46 |
+cp -a . ../p3dir |
|
47 |
+ |
|
48 |
+%build |
|
49 |
+python2 setup.py build |
|
50 |
+pushd ../p3dir |
|
51 |
+python3 setup.py build |
|
52 |
+popd |
|
53 |
+ |
|
54 |
+%install |
|
55 |
+pushd ../p3dir |
|
56 |
+python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
57 |
+popd |
|
58 |
+python2 setup.py install --prefix=%{_prefix} --root=%{buildroot} |
|
59 |
+ |
|
60 |
+%check |
|
61 |
+python2 setup.py test |
|
62 |
+pushd ../p3dir |
|
63 |
+python3 setup.py test |
|
64 |
+popd |
|
65 |
+ |
|
66 |
+%files |
|
67 |
+%defattr(-,root,root,-) |
|
68 |
+%{_bindir}/virtualenv |
|
69 |
+%{python_sitelib}/* |
|
70 |
+ |
|
71 |
+%files -n python3-virtualenv |
|
72 |
+%defattr(-,root,root,-) |
|
73 |
+%{python3_sitelib}/* |
|
74 |
+ |
|
75 |
+%changelog |
|
76 |
+* Fri Aug 25 2017 Vinay Kulkarni <kulkarniv@vmware.com> 15.1.0-1 |
|
77 |
+- Initial version of python-virtualenv package for Photon. |
0 | 78 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,19 @@ |
0 |
+FROM vmware/photon |
|
1 |
+ |
|
2 |
+MAINTAINER kulkarniv@vmware.com |
|
3 |
+ |
|
4 |
+RUN tdnf install -y sed net-tools |
|
5 |
+COPY [ "./tmp/calico/opt/cni/bin/calico", \ |
|
6 |
+ "./tmp/calico/opt/cni/bin/calico-ipam", \ |
|
7 |
+ "./tmp/calico/opt/cni/bin/portmap", \ |
|
8 |
+ "./tmp/calico/opt/cni/bin/flannel", \ |
|
9 |
+ "./tmp/calico/opt/cni/bin/host-local", \ |
|
10 |
+ "./tmp/calico/opt/cni/bin/loopback", \ |
|
11 |
+ "/opt/cni/bin/" ] |
|
12 |
+COPY ./tmp/calico/usr/share/calico-cni/k8s/install-cni.sh /install-cni.sh |
|
13 |
+COPY ./tmp/calico/usr/share/calico-cni/k8s/calico.conf.default /calico.conf.tmp |
|
14 |
+ |
|
15 |
+ENV PATH=$PATH:/opt/cni/bin |
|
16 |
+VOLUME /opt/cni |
|
17 |
+WORKDIR /opt/cni/bin |
|
18 |
+CMD ["/opt/cni/bin/calico"] |
0 | 7 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,29 @@ |
0 |
+FROM vmware/photon |
|
1 |
+ |
|
2 |
+MAINTAINER kulkarniv@vmware.com |
|
3 |
+ |
|
4 |
+# Minimum Docker API version required for libnetwork. |
|
5 |
+ENV DOCKER_API_VERSION 1.21 |
|
6 |
+ |
|
7 |
+# Install required packages |
|
8 |
+RUN tdnf install -y initscripts iproute2 ipset iptables iputils net-tools runit |
|
9 |
+ |
|
10 |
+# Copy binaries needed by calico/node |
|
11 |
+COPY [ "./tmp/calico/usr/share/calico/docker/fs/etc", "/etc/" ] |
|
12 |
+COPY [ "./tmp/calico/usr/share/calico/docker/fs/sbin/restart-calico-confd", \ |
|
13 |
+ "./tmp/calico/usr/share/calico/docker/fs/sbin/start_runit", \ |
|
14 |
+ "./tmp/calico/usr/share/calico/docker/fs/sbin/versions", \ |
|
15 |
+ "/usr/sbin/" ] |
|
16 |
+COPY [ "./tmp/calico/usr/bin/allocate-ipip-addr", \ |
|
17 |
+ "./tmp/calico/usr/bin/startup", \ |
|
18 |
+ "./tmp/calico/usr/bin/calico-bgp-daemon", \ |
|
19 |
+ "./tmp/calico/usr/bin/gobgp", \ |
|
20 |
+ "./tmp/calico/usr/bin/bird", \ |
|
21 |
+ "./tmp/calico/usr/bin/bird6", \ |
|
22 |
+ "./tmp/calico/usr/bin/birdcl", \ |
|
23 |
+ "./tmp/calico/usr/bin/confd", \ |
|
24 |
+ "./tmp/calico/usr/bin/calico-felix", \ |
|
25 |
+ "./tmp/calico/usr/share/calico/docker/libnetwork-plugin", \ |
|
26 |
+ "/usr/bin/" ] |
|
27 |
+ |
|
28 |
+CMD ["start_runit"] |
0 | 29 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,12 @@ |
0 |
+FROM vmware/photon |
|
1 |
+ |
|
2 |
+MAINTAINER kulkarniv@vmware.com |
|
3 |
+ |
|
4 |
+ENV FLANNEL_ARCH=amd64 |
|
5 |
+ |
|
6 |
+RUN tdnf install -y iproute2 net-tools iptables |
|
7 |
+ADD tmp/flannel/usr/bin/flanneld /opt/bin/flanneld |
|
8 |
+COPY tmp/flannel/usr/share/flannel/docker/mk-docker-opts.sh /opt/bin/ |
|
9 |
+RUN ln -s /usr/sbin/iptables /usr/local/bin/iptables |
|
10 |
+ |
|
11 |
+ENTRYPOINT ["/opt/bin/flanneld"] |
0 | 12 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,24 @@ |
0 |
+FROM vmware/photon |
|
1 |
+ |
|
2 |
+MAINTAINER kulkarniv@vmware.com |
|
3 |
+ |
|
4 |
+RUN tdnf install -y shadow openssl nginx |
|
5 |
+RUN useradd --system --no-create-home -U -s /bin/false nginx |
|
6 |
+ |
|
7 |
+# forward nginx access and error logs to stdout and stderr |
|
8 |
+RUN ln -sf /proc/1/fd/1 /var/log/nginx/access.log && \ |
|
9 |
+ ln -sf /proc/1/fd/2 /var/log/nginx/error.log |
|
10 |
+ |
|
11 |
+COPY [ "./tmp/nginxinc/usr/share/nginx-ingress/docker/nginx.ingress.tmpl", \ |
|
12 |
+ "./tmp/nginxinc/usr/share/nginx-ingress/docker/nginx.tmpl", \ |
|
13 |
+ "./tmp/nginxinc/usr/bin/nginx-ingress", \ |
|
14 |
+ "/" ] |
|
15 |
+ |
|
16 |
+RUN mkdir -p /etc/nginx/secrets && \ |
|
17 |
+ mkdir -p /etc/nginx/conf.d && \ |
|
18 |
+ cd /etc/nginx/secrets && \ |
|
19 |
+ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout default.key -out default.crt -subj "/CN=NGINXIngressController" && \ |
|
20 |
+ cat default.key default.crt > default.pem && \ |
|
21 |
+ rm default.key default.crt |
|
22 |
+ |
|
23 |
+ENTRYPOINT ["/nginx-ingress"] |
0 | 24 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,165 @@ |
0 |
+#!/bin/bash -e |
|
1 |
+ |
|
2 |
+DIST_TAG=$1 |
|
3 |
+DIST_VER=$2 |
|
4 |
+SPEC_DIR=$3 |
|
5 |
+STAGE_DIR=$4 |
|
6 |
+ARCH=x86_64 |
|
7 |
+ |
|
8 |
+CALICO_NODE_TAR=calico-node.tar |
|
9 |
+CALICO_CNI_TAR=calico-cni.tar |
|
10 |
+CALICO_K8S_POLICY_TAR=calico-k8s-policy.tar |
|
11 |
+ |
|
12 |
+# |
|
13 |
+# Docker images for calico-node, calico-cni |
|
14 |
+# |
|
15 |
+CALICO_VER=`cat ${SPEC_DIR}/calico/calico.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
16 |
+CALICO_VER_REL=${CALICO_VER}-`cat ${SPEC_DIR}/calico/calico.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
17 |
+CALICO_RPM=calico-${CALICO_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
18 |
+CALICO_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_RPM} |
|
19 |
+ |
|
20 |
+CALICO_BGP_VER=`cat ${SPEC_DIR}/calico-bgp-daemon/calico-bgp-daemon.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
21 |
+CALICO_BGP_VER_REL=${CALICO_BGP_VER}-`cat ${SPEC_DIR}/calico-bgp-daemon/calico-bgp-daemon.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
22 |
+CALICO_BGP_RPM=calico-bgp-daemon-${CALICO_BGP_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
23 |
+CALICO_BGP_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_BGP_RPM} |
|
24 |
+ |
|
25 |
+CALICO_BIRD_VER=`cat ${SPEC_DIR}/calico-bird/calico-bird.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
26 |
+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` |
|
27 |
+CALICO_BIRD_RPM=calico-bird-${CALICO_BIRD_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
28 |
+CALICO_BIRD_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_BIRD_RPM} |
|
29 |
+ |
|
30 |
+CALICO_CONFD_VER=`cat ${SPEC_DIR}/calico-confd/calico-confd.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
31 |
+CALICO_CONFD_VER_REL=${CALICO_CONFD_VER}-`cat ${SPEC_DIR}/calico-confd/calico-confd.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
32 |
+CALICO_CONFD_RPM=calico-confd-${CALICO_CONFD_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
33 |
+CALICO_CONFD_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_CONFD_RPM} |
|
34 |
+ |
|
35 |
+CALICO_FELIX_VER=`cat ${SPEC_DIR}/calico-felix/calico-felix.spec | grep ^Version | cut -d: -f2 | tr -d ' '` |
|
36 |
+CALICO_FELIX_VER_REL=${CALICO_FELIX_VER}-`cat ${SPEC_DIR}/calico-felix/calico-felix.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
37 |
+CALICO_FELIX_RPM=calico-felix-${CALICO_FELIX_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
38 |
+CALICO_FELIX_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_FELIX_RPM} |
|
39 |
+ |
|
40 |
+CALICO_LIBNET_VER=`cat ${SPEC_DIR}/calico-libnetwork/calico-libnetwork.spec | grep ^Version | cut -d: -f2 | tr -d ' '` |
|
41 |
+CALICO_LIBNET_VER_REL=${CALICO_LIBNET_VER}-`cat ${SPEC_DIR}/calico-libnetwork/calico-libnetwork.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
42 |
+CALICO_LIBNET_RPM=calico-libnetwork-${CALICO_LIBNET_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
43 |
+CALICO_LIBNET_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_LIBNET_RPM} |
|
44 |
+ |
|
45 |
+CALICO_CNI_VER=`cat ${SPEC_DIR}/calico-cni/calico-cni.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
46 |
+CALICO_CNI_VER_REL=${CALICO_CNI_VER}-`cat ${SPEC_DIR}/calico-cni/calico-cni.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
47 |
+CALICO_CNI_RPM=calico-cni-${CALICO_CNI_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
48 |
+CALICO_CNI_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_CNI_RPM} |
|
49 |
+ |
|
50 |
+K8S_CNI_VER=`cat ${SPEC_DIR}/cni/cni.spec | grep ^Version | cut -d: -f2 | tr -d ' '` |
|
51 |
+K8S_CNI_VER_REL=${K8S_CNI_VER}-`cat ${SPEC_DIR}/cni/cni.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
52 |
+K8S_CNI_RPM=cni-${K8S_CNI_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
53 |
+K8S_CNI_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${K8S_CNI_RPM} |
|
54 |
+ |
|
55 |
+CALICO_K8S_POLICY_VER=`cat ${SPEC_DIR}/calico-k8s-policy/calico-k8s-policy.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
56 |
+CALICO_K8S_POLICY_VER_REL=${CALICO_K8S_POLICY_VER}-`cat ${SPEC_DIR}/calico-k8s-policy/calico-k8s-policy.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
57 |
+CALICO_K8S_POLICY_RPM=calico-k8s-policy-${CALICO_K8S_POLICY_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
58 |
+CALICO_K8S_POLICY_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${CALICO_K8S_POLICY_RPM} |
|
59 |
+ |
|
60 |
+if [ ! -f ${CALICO_RPM_FILE} ] |
|
61 |
+then |
|
62 |
+ echo "Calico RPM ${CALICO_RPM_FILE} not found. Exiting.." |
|
63 |
+ exit 1 |
|
64 |
+fi |
|
65 |
+ |
|
66 |
+if [ ! -f ${CALICO_BGP_RPM_FILE} ] |
|
67 |
+then |
|
68 |
+ echo "Calico BGP RPM ${CALICO_BGP_RPM_FILE} not found. Exiting.." |
|
69 |
+ exit 1 |
|
70 |
+fi |
|
71 |
+ |
|
72 |
+if [ ! -f ${CALICO_BIRD_RPM_FILE} ] |
|
73 |
+then |
|
74 |
+ echo "Calico BIRD RPM ${CALICO_BIRD_RPM_FILE} not found. Exiting.." |
|
75 |
+ exit 1 |
|
76 |
+fi |
|
77 |
+ |
|
78 |
+if [ ! -f ${CALICO_CONFD_RPM_FILE} ] |
|
79 |
+then |
|
80 |
+ echo "Calico confd RPM ${CALICO_CONFD_RPM_FILE} not found. Exiting.." |
|
81 |
+ exit 1 |
|
82 |
+fi |
|
83 |
+ |
|
84 |
+if [ ! -f ${CALICO_FELIX_RPM_FILE} ] |
|
85 |
+then |
|
86 |
+ echo "Calico felix RPM ${CALICO_FELIX_RPM_FILE} not found. Exiting.." |
|
87 |
+ exit 1 |
|
88 |
+fi |
|
89 |
+ |
|
90 |
+if [ ! -f ${CALICO_LIBNET_RPM_FILE} ] |
|
91 |
+then |
|
92 |
+ echo "Calico libnetwork RPM ${CALICO_LIBNET_RPM_FILE} not found. Exiting.." |
|
93 |
+ exit 1 |
|
94 |
+fi |
|
95 |
+ |
|
96 |
+if [ ! -f ${CALICO_CNI_RPM_FILE} ] |
|
97 |
+then |
|
98 |
+ echo "Calico CNI RPM ${CALICO_CNI_RPM_FILE} not found. Exiting.." |
|
99 |
+ exit 1 |
|
100 |
+fi |
|
101 |
+ |
|
102 |
+if [ ! -f ${K8S_CNI_RPM_FILE} ] |
|
103 |
+then |
|
104 |
+ echo "K8S CNI RPM ${K8S_CNI_RPM_FILE} not found. Exiting.." |
|
105 |
+ exit 1 |
|
106 |
+fi |
|
107 |
+ |
|
108 |
+if [ ! -f ${CALICO_K8S_POLICY_RPM_FILE} ] |
|
109 |
+then |
|
110 |
+ echo "Calico k8s policy RPM ${CALICO_K8S_POLICY_RPM_FILE} not found. Exiting.." |
|
111 |
+ exit 1 |
|
112 |
+fi |
|
113 |
+ |
|
114 |
+CALICO_NODE_IMG_NAME=vmware_photon2/calico-node:v${CALICO_VER} |
|
115 |
+CALICO_CNI_IMG_NAME=vmware_photon2/calico-cni:v${CALICO_CNI_VER} |
|
116 |
+CALICO_K8S_POLICY_IMG_NAME=vmware_photon2/calico-kube-policy-controller:v${CALICO_K8S_POLICY_VER} |
|
117 |
+ |
|
118 |
+NODE_IMG_ID=`docker images -q ${CALICO_NODE_IMG_NAME} 2> /dev/null` |
|
119 |
+if [[ ! -z "${NODE_IMG_ID}" ]]; then |
|
120 |
+ echo "Removing image ${CALICO_NODE_IMG_NAME}" |
|
121 |
+ docker rmi -f ${CALICO_NODE_IMG_NAME} |
|
122 |
+fi |
|
123 |
+ |
|
124 |
+CNI_IMG_ID=`docker images -q ${CALICO_CNI_IMG_NAME} 2> /dev/null` |
|
125 |
+if [[ ! -z "${CNI_IMG_ID}" ]]; then |
|
126 |
+ echo "Removing image ${CALICO_CNI_IMG_NAME}" |
|
127 |
+ docker rmi -f ${CALICO_CNI_IMG_NAME} |
|
128 |
+fi |
|
129 |
+ |
|
130 |
+mkdir -p tmp/calico |
|
131 |
+cp ${CALICO_RPM_FILE} tmp/calico/ |
|
132 |
+cp ${CALICO_BGP_RPM_FILE} tmp/calico/ |
|
133 |
+cp ${CALICO_BIRD_RPM_FILE} tmp/calico/ |
|
134 |
+cp ${CALICO_CONFD_RPM_FILE} tmp/calico/ |
|
135 |
+cp ${CALICO_FELIX_RPM_FILE} tmp/calico/ |
|
136 |
+cp ${CALICO_LIBNET_RPM_FILE} tmp/calico/ |
|
137 |
+cp ${CALICO_CNI_RPM_FILE} tmp/calico/ |
|
138 |
+cp ${K8S_CNI_RPM_FILE} tmp/calico/ |
|
139 |
+cp ${CALICO_K8S_POLICY_RPM_FILE} tmp/calico/ |
|
140 |
+pushd ./tmp/calico |
|
141 |
+rpm2cpio ${CALICO_RPM} | cpio -vid |
|
142 |
+rpm2cpio ${CALICO_BGP_RPM} | cpio -vid |
|
143 |
+rpm2cpio ${CALICO_BIRD_RPM} | cpio -vid |
|
144 |
+rpm2cpio ${CALICO_CONFD_RPM} | cpio -vid |
|
145 |
+rpm2cpio ${CALICO_FELIX_RPM} | cpio -vid |
|
146 |
+rpm2cpio ${CALICO_LIBNET_RPM} | cpio -vid |
|
147 |
+rpm2cpio ${CALICO_CNI_RPM} | cpio -vid |
|
148 |
+rpm2cpio ${K8S_CNI_RPM} | cpio -vid |
|
149 |
+rpm2cpio ${CALICO_K8S_POLICY_RPM} | cpio -vid |
|
150 |
+popd |
|
151 |
+ |
|
152 |
+docker build --rm -t ${CALICO_NODE_IMG_NAME} -f Dockerfile.calico-node . |
|
153 |
+docker save -o ${CALICO_NODE_TAR} ${CALICO_NODE_IMG_NAME} |
|
154 |
+mv -f ${CALICO_NODE_TAR} ${STAGE_DIR}/ |
|
155 |
+ |
|
156 |
+docker build --rm -t ${CALICO_CNI_IMG_NAME} -f Dockerfile.calico-cni . |
|
157 |
+docker save -o ${CALICO_CNI_TAR} ${CALICO_CNI_IMG_NAME} |
|
158 |
+mv -f ${CALICO_CNI_TAR} ${STAGE_DIR}/ |
|
159 |
+ |
|
160 |
+docker build --rm -t ${CALICO_K8S_POLICY_IMG_NAME} -f Dockerfile.calico-k8s-policy . |
|
161 |
+docker save -o ${CALICO_K8S_POLICY_TAR} ${CALICO_K8S_POLICY_IMG_NAME} |
|
162 |
+mv -f ${CALICO_K8S_POLICY_TAR} ${STAGE_DIR}/ |
|
163 |
+ |
|
164 |
+rm -rf ./tmp |
0 | 165 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,41 @@ |
0 |
+#!/bin/bash -e |
|
1 |
+ |
|
2 |
+DIST_TAG=$1 |
|
3 |
+DIST_VER=$2 |
|
4 |
+SPEC_DIR=$3 |
|
5 |
+STAGE_DIR=$4 |
|
6 |
+ARCH=x86_64 |
|
7 |
+ |
|
8 |
+# |
|
9 |
+# Docker image for flannel |
|
10 |
+# |
|
11 |
+FLANNEL_VER=`cat ${SPEC_DIR}/flannel/flannel.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
12 |
+FLANNEL_VER_REL=${FLANNEL_VER}-`cat ${SPEC_DIR}/flannel/flannel.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
13 |
+FLANNEL_RPM=flannel-${FLANNEL_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
14 |
+FLANNEL_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${FLANNEL_RPM} |
|
15 |
+FLANNEL_TAR=flannel.tar |
|
16 |
+ |
|
17 |
+if [ ! -f ${FLANNEL_RPM_FILE} ] |
|
18 |
+then |
|
19 |
+ echo "flannel RPM ${FLANNEL_RPM_FILE} not found. Exiting.." |
|
20 |
+ exit 1 |
|
21 |
+fi |
|
22 |
+ |
|
23 |
+IMG_NAME=vmware_photon2/flannel:v${FLANNEL_VER} |
|
24 |
+ |
|
25 |
+IMG_ID=`docker images -q ${IMG_NAME} 2> /dev/null` |
|
26 |
+if [[ ! -z "${IMG_ID}" ]]; then |
|
27 |
+ echo "Removing image ${IMG_NAME}" |
|
28 |
+ docker rmi -f ${IMG_NAME} |
|
29 |
+fi |
|
30 |
+ |
|
31 |
+mkdir -p tmp/flannel |
|
32 |
+cp ${FLANNEL_RPM_FILE} tmp/flannel/ |
|
33 |
+pushd ./tmp/flannel |
|
34 |
+rpm2cpio ${FLANNEL_RPM} | cpio -vid |
|
35 |
+popd |
|
36 |
+docker build --rm -t ${IMG_NAME} -f Dockerfile.flannel . |
|
37 |
+docker save -o ${FLANNEL_TAR} ${IMG_NAME} |
|
38 |
+mv -f ${FLANNEL_TAR} ${STAGE_DIR}/ |
|
39 |
+ |
|
40 |
+rm -rf ./tmp |
0 | 41 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,41 @@ |
0 |
+#!/bin/bash -e |
|
1 |
+ |
|
2 |
+DIST_TAG=$1 |
|
3 |
+DIST_VER=$2 |
|
4 |
+SPEC_DIR=$3 |
|
5 |
+STAGE_DIR=$4 |
|
6 |
+ARCH=x86_64 |
|
7 |
+ |
|
8 |
+# |
|
9 |
+# Docker image for kubernetes nginx ingress controller |
|
10 |
+# |
|
11 |
+NGINX_INC_VER=`cat ${SPEC_DIR}/nginx-ingress/nginx-ingress.spec | grep Version | cut -d: -f2 | tr -d ' '` |
|
12 |
+NGINX_INC_VER_REL=${NGINX_INC_VER}-`cat ${SPEC_DIR}/nginx-ingress/nginx-ingress.spec | grep Release | cut -d: -f2 | tr -d ' ' | cut -d% -f1` |
|
13 |
+NGINX_INC_RPM=nginx-ingress-${NGINX_INC_VER_REL}${DIST_TAG}.${ARCH}.rpm |
|
14 |
+NGINX_INC_RPM_FILE=${STAGE_DIR}/RPMS/x86_64/${NGINX_INC_RPM} |
|
15 |
+NGINX_INC_TAR=nginx-ingress.tar |
|
16 |
+ |
|
17 |
+if [ ! -f ${NGINX_INC_RPM_FILE} ] |
|
18 |
+then |
|
19 |
+ echo "nginx ingress RPM ${NGINX_INC_RPM_FILE} not found. Exiting.." |
|
20 |
+ exit 1 |
|
21 |
+fi |
|
22 |
+ |
|
23 |
+IMG_NAME=vmware_photon2/nginx-ingress:v${NGINX_INC_VER} |
|
24 |
+ |
|
25 |
+IMG_ID=`docker images -q ${IMG_NAME} 2> /dev/null` |
|
26 |
+if [[ ! -z "${IMG_ID}" ]]; then |
|
27 |
+ echo "Removing image ${IMG_NAME}" |
|
28 |
+ docker rmi -f ${IMG_NAME} |
|
29 |
+fi |
|
30 |
+ |
|
31 |
+mkdir -p tmp/nginxinc |
|
32 |
+cp ${NGINX_INC_RPM_FILE} tmp/nginxinc/ |
|
33 |
+pushd ./tmp/nginxinc |
|
34 |
+rpm2cpio ${NGINX_INC_RPM} | cpio -vid |
|
35 |
+popd |
|
36 |
+docker build --rm -t ${IMG_NAME} -f Dockerfile.nginx-ingress . |
|
37 |
+docker save -o ${NGINX_INC_TAR} ${IMG_NAME} |
|
38 |
+mv -f ${NGINX_INC_TAR} ${STAGE_DIR}/ |
|
39 |
+ |
|
40 |
+rm -rf ./tmp |