Change-Id: I92c54abe54924c11262242f8aa9a3a4650a0667c
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/6806
Reviewed-by: Ajay Kaher <akaher@vmware.com>
Tested-by: michellew <michellew@vmware.com>
| ... | ... |
@@ -1,7 +1,14 @@ |
| 1 |
+%ifarch x86_64 |
|
| 2 |
+%define archname amd64 |
|
| 3 |
+%endif |
|
| 4 |
+%ifarch aarch64 |
|
| 5 |
+%define archname arm64 |
|
| 6 |
+%endif |
|
| 7 |
+ |
|
| 1 | 8 |
Summary: Kubernetes cluster management |
| 2 | 9 |
Name: kubernetes |
| 3 | 10 |
Version: 1.12.5 |
| 4 |
-Release: 1%{?dist}
|
|
| 11 |
+Release: 2%{?dist}
|
|
| 5 | 12 |
License: ASL 2.0 |
| 6 | 13 |
URL: https://github.com/kubernetes/kubernetes/archive/v%{version}.tar.gz
|
| 7 | 14 |
Source0: kubernetes-%{version}.tar.gz
|
| ... | ... |
@@ -66,34 +73,41 @@ popd |
| 66 | 66 |
make |
| 67 | 67 |
pushd build/pause |
| 68 | 68 |
mkdir -p bin |
| 69 |
-gcc -Os -Wall -Werror -static -o bin/pause-amd64 pause.c |
|
| 70 |
-strip bin/pause-amd64 |
|
| 69 |
+gcc -Os -Wall -Werror -static -o bin/pause-%{archname} pause.c
|
|
| 70 |
+strip bin/pause-%{archname}
|
|
| 71 | 71 |
popd |
| 72 |
-make WHAT="cmd/kubectl" KUBE_BUILD_PLATFORMS="darwin/amd64 windows/amd64" |
|
| 72 |
+ |
|
| 73 |
+%ifarch x86_64 |
|
| 74 |
+make WHAT="cmd/kubectl" KUBE_BUILD_PLATFORMS="darwin/%{archname} windows/%{archname}"
|
|
| 75 |
+%endif |
|
| 73 | 76 |
|
| 74 | 77 |
%install |
| 75 | 78 |
install -vdm644 %{buildroot}/etc/profile.d
|
| 76 | 79 |
install -m 755 -d %{buildroot}%{_bindir}
|
| 77 | 80 |
install -m 755 -d %{buildroot}/opt/vmware/kubernetes
|
| 78 |
-install -m 755 -d %{buildroot}/opt/vmware/kubernetes/darwin/amd64
|
|
| 79 |
-install -m 755 -d %{buildroot}/opt/vmware/kubernetes/linux/amd64
|
|
| 80 |
-install -m 755 -d %{buildroot}/opt/vmware/kubernetes/windows/amd64
|
|
| 81 |
+install -m 755 -d %{buildroot}/opt/vmware/kubernetes/linux/%{archname}
|
|
| 82 |
+%ifarch x86_64 |
|
| 83 |
+install -m 755 -d %{buildroot}/opt/vmware/kubernetes/darwin/%{archname}
|
|
| 84 |
+install -m 755 -d %{buildroot}/opt/vmware/kubernetes/windows/%{archname}
|
|
| 85 |
+%endif |
|
| 81 | 86 |
|
| 82 | 87 |
binaries=(cloud-controller-manager hyperkube kube-apiserver kube-controller-manager kubelet kube-proxy kube-scheduler kubectl) |
| 83 | 88 |
for bin in "${binaries[@]}"; do
|
| 84 | 89 |
echo "+++ INSTALLING ${bin}"
|
| 85 |
- install -p -m 755 -t %{buildroot}%{_bindir} _output/local/bin/linux/amd64/${bin}
|
|
| 90 |
+ install -p -m 755 -t %{buildroot}%{_bindir} _output/local/bin/linux/%{archname}/${bin}
|
|
| 86 | 91 |
done |
| 87 |
-install -p -m 755 -t %{buildroot}%{_bindir} build/pause/bin/pause-amd64
|
|
| 92 |
+install -p -m 755 -t %{buildroot}%{_bindir} build/pause/bin/pause-%{archname}
|
|
| 88 | 93 |
|
| 89 | 94 |
# kubectl-extras |
| 90 |
-install -p -m 755 -t %{buildroot}/opt/vmware/kubernetes/darwin/amd64/ _output/local/bin/darwin/amd64/kubectl
|
|
| 91 |
-install -p -m 755 -t %{buildroot}/opt/vmware/kubernetes/linux/amd64/ _output/local/bin/linux/amd64/kubectl
|
|
| 92 |
-install -p -m 755 -t %{buildroot}/opt/vmware/kubernetes/windows/amd64/ _output/local/bin/windows/amd64/kubectl.exe
|
|
| 95 |
+install -p -m 755 -t %{buildroot}/opt/vmware/kubernetes/linux/%{archname}/ _output/local/bin/linux/%{archname}/kubectl
|
|
| 96 |
+%ifarch x86_64 |
|
| 97 |
+install -p -m 755 -t %{buildroot}/opt/vmware/kubernetes/darwin/%{archname}/ _output/local/bin/darwin/%{archname}/kubectl
|
|
| 98 |
+install -p -m 755 -t %{buildroot}/opt/vmware/kubernetes/windows/%{archname}/ _output/local/bin/windows/%{archname}/kubectl.exe
|
|
| 99 |
+%endif |
|
| 93 | 100 |
|
| 94 | 101 |
# kubeadm install |
| 95 | 102 |
install -vdm644 %{buildroot}/etc/systemd/system/kubelet.service.d
|
| 96 |
-install -p -m 755 -t %{buildroot}%{_bindir} _output/local/bin/linux/amd64/kubeadm
|
|
| 103 |
+install -p -m 755 -t %{buildroot}%{_bindir} _output/local/bin/linux/%{archname}/kubeadm
|
|
| 97 | 104 |
install -p -m 755 -t %{buildroot}/etc/systemd/system build/rpms/kubelet.service
|
| 98 | 105 |
install -p -m 755 -t %{buildroot}/etc/systemd/system/kubelet.service.d build/rpms/10-kubeadm.conf
|
| 99 | 106 |
sed -i '/KUBELET_CGROUP_ARGS=--cgroup-driver=systemd/d' %{buildroot}/etc/systemd/system/kubelet.service.d/10-kubeadm.conf
|
| ... | ... |
@@ -203,14 +217,18 @@ fi |
| 203 | 203 |
|
| 204 | 204 |
%files pause |
| 205 | 205 |
%defattr(-,root,root) |
| 206 |
-%{_bindir}/pause-amd64
|
|
| 206 |
+%{_bindir}/pause-%{archname}
|
|
| 207 | 207 |
|
| 208 | 208 |
%files kubectl-extras |
| 209 | 209 |
%defattr(-,root,root) |
| 210 |
-/opt/vmware/kubernetes/darwin/amd64/kubectl |
|
| 211 |
-/opt/vmware/kubernetes/linux/amd64/kubectl |
|
| 212 |
-/opt/vmware/kubernetes/windows/amd64/kubectl.exe |
|
| 210 |
+/opt/vmware/kubernetes/linux/%{archname}/kubectl
|
|
| 211 |
+%ifarch x86_64 |
|
| 212 |
+/opt/vmware/kubernetes/darwin/%{archname}/kubectl
|
|
| 213 |
+/opt/vmware/kubernetes/windows/%{archname}/kubectl.exe
|
|
| 214 |
+%endif |
|
| 213 | 215 |
|
| 214 | 216 |
%changelog |
| 217 |
+* Thu Feb 28 2019 Ashwin H <ashwinh@vmware.com> 1.12.5-2 |
|
| 218 |
+- Fix build error for ARM. |
|
| 215 | 219 |
* Thu Feb 21 2019 Ashwin H <ashwinh@vmware.com> 1.12.5-1 |
| 216 | 220 |
- Update to 1.12.5-1 |