From b097a78e00d88c0daeaa9277fd11c1012bac40b6 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Nov 11 2014 02:53:29 +0000 Subject: import kubernetes-0.4-368.0.git8e1d416.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3786115 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/kubernetes-8e1d416.tar.gz diff --git a/.kubernetes.metadata b/.kubernetes.metadata new file mode 100644 index 0000000..7b2bd84 --- /dev/null +++ b/.kubernetes.metadata @@ -0,0 +1 @@ +aff9381bbf60a15fb17262f46779973a4d8bee6c SOURCES/kubernetes-8e1d416.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SPECS/kubernetes.spec b/SPECS/kubernetes.spec new file mode 100644 index 0000000..d0810a7 --- /dev/null +++ b/SPECS/kubernetes.spec @@ -0,0 +1,253 @@ +#debuginfo not supported with Go +%global debug_package %{nil} +%global import_path github.com/GoogleCloudPlatform/kubernetes +%global commit 8e1d41670783cb75cf0c5088f199961a7d8e05e5 +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +#binaries which should be called kube-* +%global prefixed_binaries proxy apiserver controller-manager scheduler +#binaries which should not be renamed at all +%global nonprefixed_binaries kubelet kubectl +#all of the above +%global binaries %{prefixed_binaries} %{nonprefixed_binaries} + +#I really need this, otherwise "version_ldflags=$(kube::version_ldflags)" +# does not work +%global _buildshell /bin/bash +%global _checkshell /bin/bash + +Name: kubernetes +Version: 0.4 +Release: 368.0.git%{shortcommit}%{?dist} +Summary: Container cluster management +License: ASL 2.0 +URL: https://github.com/GoogleCloudPlatform/kubernetes +ExclusiveArch: x86_64 +Source0: https://github.com/GoogleCloudPlatform/kubernetes/archive/%{commit}/kubernetes-%{shortcommit}.tar.gz + +%if 0%{?fedora} >= 21 || 0%{?rhel} +Requires: docker +%else +Requires: docker-io +%endif + +Requires: etcd +Requires: cadvisor + +Requires(pre): shadow-utils + +BuildRequires: git +BuildRequires: golang >= 1.2-7 +BuildRequires: systemd +BuildRequires: etcd + +%description +%{summary} + +%prep +%autosetup -Sgit -n %{name}-%{commit} + +%build +export KUBE_GIT_COMMIT=%{commit} +export KUBE_GIT_TREE_STATE="clean" +export KUBE_GIT_VERSION=v0.4-368-g8e1d41670783cb + +hack/build-go.sh + +%check +echo "******Testing the commands*****" +hack/test-cmd.sh +# In Fedora 20 and RHEL7 the go cover tools isn't available correctly +%if 0%{?fedora} >= 21 +echo "******Testing the go code******" +hack/test-go.sh +echo "******Testing integration******" +hack/test-integration.sh +%endif +echo "******Benchmarking kube********" +hack/benchmark-go.sh + +%install +install -m 755 -d %{buildroot}%{_bindir} +for bin in %{prefixed_binaries}; do + echo "+++ INSTALLING ${bin}" + install -p -m 755 _output/go/bin/${bin} %{buildroot}%{_bindir}/kube-${bin} +done +for bin in %{nonprefixed_binaries}; do + echo "+++ INSTALLING ${bin}" + install -p -m 755 _output/go/bin/${bin} %{buildroot}%{_bindir}/${bin} +done + +# install the bash completion +install -d -m 0755 %{buildroot}%{_datadir}/bash-completion/completions/ +install -t %{buildroot}%{_datadir}/bash-completion/completions/ contrib/completions/bash/kubectl + +# install config files +install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name} +install -m 644 -t %{buildroot}%{_sysconfdir}/%{name} contrib/init/systemd/environ/* + +# install service files +install -d -m 0755 %{buildroot}%{_unitdir} +install -m 0644 -t %{buildroot}%{_unitdir} contrib/init/systemd/*.service + +# install manpages +install -d %{buildroot}%{_mandir}/man1 +install -p -m 644 docs/man/man1/* %{buildroot}%{_mandir}/man1 + +# install the place the kubelet defaults to put volumes +install -d %{buildroot}/var/lib/kubelet + +%files +%doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md +%{_mandir}/man1/* +%{_bindir}/kube-apiserver +%{_bindir}/kubectl +%{_bindir}/kube-controller-manager +%{_bindir}/kubelet +%{_bindir}/kube-proxy +%{_bindir}/kube-scheduler +%{_unitdir}/kube-apiserver.service +%{_unitdir}/kubelet.service +%{_unitdir}/kube-scheduler.service +%{_unitdir}/kube-controller-manager.service +%{_unitdir}/kube-proxy.service +%dir %{_sysconfdir}/%{name} +%{_datadir}/bash-completion/completions/kubectl +%dir /var/lib/kubelet +%config(noreplace) %{_sysconfdir}/%{name}/config +%config(noreplace) %{_sysconfdir}/%{name}/apiserver +%config(noreplace) %{_sysconfdir}/%{name}/controller-manager +%config(noreplace) %{_sysconfdir}/%{name}/proxy +%config(noreplace) %{_sysconfdir}/%{name}/kubelet +%config(noreplace) %{_sysconfdir}/%{name}/scheduler + +%pre +getent group kube >/dev/null || groupadd -r kube +getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \ + -c "Kubernetes user" kube +%post +%systemd_post kube-apiserver kube-scheduler kube-controller-manager kubelet kube-proxy + +%preun +%systemd_preun kube-apiserver kube-scheduler kube-controller-manager kubelet kube-proxy + +%postun +%systemd_postun + +%changelog +* Fri Oct 31 2014 Eric Paris - 0.4-0.0.git4452163 +- rebase to v0.4 +- include man pages + +* Tue Oct 14 2014 jchaloup - 0.3-0.3.git98ac8e1 +- create /var/lib/kubelet +- Use bash completions from upstream +- Bump to upstream 98ac8e178fcf1627399d659889bcb5fe25abdca4 +- all by Eric Paris + +* Mon Sep 29 2014 Jan Chaloupka - 0.3-0.2.git88fdb65 +- replace * with coresponding files +- remove dependency on gcc + +* Wed Sep 24 2014 Eric Paris - 0.1-0.4.git6ebe69a +- prefer autosetup instead of setup (revert setup change in 0-0.3.git) +https://fedoraproject.org/wiki/Autosetup_packaging_draft +- revert version number to 0.1 + +* Mon Sep 08 2014 Lokesh Mandvekar - 0-0.3.git6ebe69a +- gopath defined in golang package already +- package owns /etc/kubernetes +- bash dependency implicit +- keep buildroot/$RPM_BUILD_ROOT macros consistent +- replace with macros wherever possible +- set version, release and source tarball prep as per +https://fedoraproject.org/wiki/Packaging:SourceURL#Github + +* Mon Sep 08 2014 Eric Paris +- make services restart automatically on error + +* Sat Sep 06 2014 Eric Paris +- update to upstream +- redo build to use project scripts +- use project scripts in %check +- rework deletion of third_party packages to easily detect changes +- run apiserver and controller-manager as non-root + +* Mon Aug 11 2014 Adam Miller +- update to upstream +- decouple the rest of third_party + +* Thu Aug 7 2014 Eric Paris +- update to head +- update package to include config files + +* Wed Jul 16 2014 Colin Walters +- Initial package