Blame SPECS/kubernetes.spec

b097a7
#debuginfo not supported with Go
b097a7
%global debug_package	%{nil}
b097a7
%global import_path	github.com/GoogleCloudPlatform/kubernetes
b097a7
%global commit		8e1d41670783cb75cf0c5088f199961a7d8e05e5
b097a7
%global shortcommit	%(c=%{commit}; echo ${c:0:7})
b097a7
b097a7
#binaries which should be called kube-*
b097a7
%global prefixed_binaries proxy apiserver controller-manager scheduler
b097a7
#binaries which should not be renamed at all
b097a7
%global nonprefixed_binaries kubelet kubectl
b097a7
#all of the above
b097a7
%global binaries	%{prefixed_binaries} %{nonprefixed_binaries}
b097a7
b097a7
#I really need this, otherwise "version_ldflags=$(kube::version_ldflags)"
b097a7
# does not work
b097a7
%global _buildshell	/bin/bash
b097a7
%global _checkshell	/bin/bash
b097a7
b097a7
Name:		kubernetes
b097a7
Version:	0.4
b097a7
Release:	368.0.git%{shortcommit}%{?dist}
b097a7
Summary:	Container cluster management
b097a7
License:	ASL 2.0
b097a7
URL:		https://github.com/GoogleCloudPlatform/kubernetes
b097a7
ExclusiveArch:	x86_64
b097a7
Source0:	https://github.com/GoogleCloudPlatform/kubernetes/archive/%{commit}/kubernetes-%{shortcommit}.tar.gz
b097a7
b097a7
%if 0%{?fedora} >= 21 || 0%{?rhel}
b097a7
Requires:	docker
b097a7
%else
b097a7
Requires:	docker-io
b097a7
%endif
b097a7
b097a7
Requires:	etcd
b097a7
Requires:	cadvisor
b097a7
b097a7
Requires(pre):	shadow-utils
b097a7
b097a7
BuildRequires:	git
b097a7
BuildRequires:	golang >= 1.2-7
b097a7
BuildRequires:	systemd
b097a7
BuildRequires:	etcd
b097a7
b097a7
%description
b097a7
%{summary}
b097a7
b097a7
%prep
b097a7
%autosetup -Sgit -n %{name}-%{commit}
b097a7
b097a7
%build
b097a7
export KUBE_GIT_COMMIT=%{commit}
b097a7
export KUBE_GIT_TREE_STATE="clean"
b097a7
export KUBE_GIT_VERSION=v0.4-368-g8e1d41670783cb
b097a7
b097a7
hack/build-go.sh
b097a7
b097a7
%check
b097a7
echo "******Testing the commands*****"
b097a7
hack/test-cmd.sh
b097a7
# In Fedora 20 and RHEL7 the go cover tools isn't available correctly
b097a7
%if 0%{?fedora} >= 21
b097a7
echo "******Testing the go code******"
b097a7
hack/test-go.sh
b097a7
echo "******Testing integration******"
b097a7
hack/test-integration.sh
b097a7
%endif
b097a7
echo "******Benchmarking kube********"
b097a7
hack/benchmark-go.sh
b097a7
b097a7
%install
b097a7
install -m 755 -d %{buildroot}%{_bindir}
b097a7
for bin in %{prefixed_binaries}; do
b097a7
  echo "+++ INSTALLING ${bin}"
b097a7
  install -p -m 755 _output/go/bin/${bin} %{buildroot}%{_bindir}/kube-${bin}
b097a7
done
b097a7
for bin in %{nonprefixed_binaries}; do
b097a7
  echo "+++ INSTALLING ${bin}"
b097a7
  install -p -m 755 _output/go/bin/${bin} %{buildroot}%{_bindir}/${bin}
b097a7
done
b097a7
b097a7
# install the bash completion
b097a7
install -d -m 0755 %{buildroot}%{_datadir}/bash-completion/completions/
b097a7
install -t %{buildroot}%{_datadir}/bash-completion/completions/ contrib/completions/bash/kubectl
b097a7
b097a7
# install config files
b097a7
install -d -m 0755 %{buildroot}%{_sysconfdir}/%{name}
b097a7
install -m 644 -t %{buildroot}%{_sysconfdir}/%{name} contrib/init/systemd/environ/*
b097a7
b097a7
# install service files
b097a7
install -d -m 0755 %{buildroot}%{_unitdir}
b097a7
install -m 0644 -t %{buildroot}%{_unitdir} contrib/init/systemd/*.service
b097a7
b097a7
# install manpages
b097a7
install -d %{buildroot}%{_mandir}/man1
b097a7
install -p -m 644 docs/man/man1/* %{buildroot}%{_mandir}/man1
b097a7
b097a7
# install the place the kubelet defaults to put volumes
b097a7
install -d %{buildroot}/var/lib/kubelet
b097a7
b097a7
%files
b097a7
%doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md
b097a7
%{_mandir}/man1/*
b097a7
%{_bindir}/kube-apiserver
b097a7
%{_bindir}/kubectl
b097a7
%{_bindir}/kube-controller-manager
b097a7
%{_bindir}/kubelet
b097a7
%{_bindir}/kube-proxy
b097a7
%{_bindir}/kube-scheduler
b097a7
%{_unitdir}/kube-apiserver.service
b097a7
%{_unitdir}/kubelet.service
b097a7
%{_unitdir}/kube-scheduler.service
b097a7
%{_unitdir}/kube-controller-manager.service
b097a7
%{_unitdir}/kube-proxy.service
b097a7
%dir %{_sysconfdir}/%{name}
b097a7
%{_datadir}/bash-completion/completions/kubectl
b097a7
%dir /var/lib/kubelet
b097a7
%config(noreplace) %{_sysconfdir}/%{name}/config
b097a7
%config(noreplace) %{_sysconfdir}/%{name}/apiserver
b097a7
%config(noreplace) %{_sysconfdir}/%{name}/controller-manager
b097a7
%config(noreplace) %{_sysconfdir}/%{name}/proxy
b097a7
%config(noreplace) %{_sysconfdir}/%{name}/kubelet
b097a7
%config(noreplace) %{_sysconfdir}/%{name}/scheduler
b097a7
b097a7
%pre
b097a7
getent group kube >/dev/null || groupadd -r kube
b097a7
getent passwd kube >/dev/null || useradd -r -g kube -d / -s /sbin/nologin \
b097a7
        -c "Kubernetes user" kube
b097a7
%post
b097a7
%systemd_post kube-apiserver kube-scheduler kube-controller-manager kubelet kube-proxy
b097a7
b097a7
%preun
b097a7
%systemd_preun kube-apiserver kube-scheduler kube-controller-manager kubelet kube-proxy
b097a7
b097a7
%postun
b097a7
%systemd_postun
b097a7
b097a7
%changelog
b097a7
* Fri Oct 31 2014 Eric Paris 
b097a7
- Remove + from versioning.
b097a7
b097a7
* Wed Oct 29 2014 Eric Paris 
b097a7
- Bump to upstream 8e1d41670783cb75cf0c5088f199961a7d8e05e5
b097a7
b097a7
* Tue Oct 28 2014 Eric Paris 
b097a7
- Bump to upstream 1c61486ec343246a81f62b4297671217c9576df7
b097a7
b097a7
* Mon Oct 27 2014 Eric Paris 
b097a7
- Bump to upstream dc7e3d6601a89e9017ca9db42c09fd0ecb36bb36
b097a7
b097a7
* Fri Oct 24 2014 Eric Paris 
b097a7
- Bump to upstream e46af6e37f6e6965a63edb8eb8f115ae8ef41482
b097a7
b097a7
* Thu Oct 23 2014 Eric Paris 
b097a7
- Bump to upstream 77d2815b86e9581393d7de4379759c536df89edc
b097a7
b097a7
* Wed Oct 22 2014 Eric Paris 
b097a7
- Bump to upstream 97dd7302ac2c2b9458a9348462a614ebf394b1ed
b097a7
- Use upstream kubectl bash completion instead of in-repo
b097a7
- Fix systemd_post and systemd_preun since we are using upstream service files
b097a7
b097a7
* Tue Oct 21 2014 Eric Paris 
b097a7
- Bump to upstream e8686429c4aa63fc73401259c8818da168a7b85e
b097a7
b097a7
* Mon Oct 20 2014 Eric Paris 
b097a7
- Bump to upstream d5377e4a394b4fc6e3088634729b538eac124b1b
b097a7
- Use in tree systemd unit and Environment files
b097a7
- Include kubectl bash completion from outside tree
b097a7
b097a7
* Fri Oct 17 2014 Eric Paris 
b097a7
- Bump to upstream b01126322b826a15db06f6eeefeeb56dc06db7af
b097a7
- This is a major non backward compatible change.
b097a7
b097a7
* Thu Oct 16 2014 Eric Paris <eparis@redhat.com> - 0.4-0.0.git4452163
b097a7
- rebase to v0.4
b097a7
- include man pages
b097a7
b097a7
* Tue Oct 14 2014 jchaloup <jchaloup@redhat.com> - 0.3-0.3.git98ac8e1
b097a7
- create /var/lib/kubelet
b097a7
- Use bash completions from upstream
b097a7
- Bump to upstream 98ac8e178fcf1627399d659889bcb5fe25abdca4
b097a7
- all by Eric Paris
b097a7
b097a7
* Mon Sep 29 2014 Jan Chaloupka <jchaloup@redhat.com> - 0.3-0.2.git88fdb65
b097a7
- replace * with coresponding files
b097a7
- remove dependency on gcc
b097a7
b097a7
* Wed Sep 24 2014 Eric Paris 
b097a7
- Bump to upstream 88fdb659bc44cf2d1895c03f8838d36f4d890796
b097a7
b097a7
* Tue Sep 23 2014 Eric Paris 
b097a7
- Bump to upstream bab5082a852218bb65aaacb91bdf599f9dd1b3ac
b097a7
b097a7
* Fri Sep 19 2014 Eric Paris 
b097a7
- Bump to upstream 06316f486127697d5c2f5f4c82963dec272926cf
b097a7
b097a7
* Thu Sep 18 2014 Eric Paris 
b097a7
- Bump to upstream f7a5ec3c36bd40cc2216c1da331ab647733769dd
b097a7
b097a7
* Wed Sep 17 2014 Eric Paris 
b097a7
- Try to intelligently determine the deps
b097a7
b097a7
* Wed Sep 17 2014 Eric Paris 
b097a7
- Bump to upstream ac8ee45f4fc4579b3ed65faafa618de9c0f8fb26
b097a7
b097a7
* Mon Sep 15 2014 Eric Paris 
b097a7
- Bump to upstream 24b5b7e8d3a8af1eecf4db40c204e3c15ae955ba
b097a7
b097a7
* Thu Sep 11 2014 Eric Paris 
b097a7
- Bump to upstream cc7999c00a40df21bd3b5e85ecea3b817377b231
b097a7
b097a7
* Wed Sep 10 2014 Eric Paris 
b097a7
- Add bash completions
b097a7
b097a7
* Wed Sep 10 2014 Eric Paris 
b097a7
- Bump to upstream 60d4770127d22e51c53e74ca94c3639702924bd2
b097a7
b097a7
* Mon Sep 08 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0.1-0.4.git6ebe69a
b097a7
- prefer autosetup instead of setup (revert setup change in 0-0.3.git)
b097a7
https://fedoraproject.org/wiki/Autosetup_packaging_draft
b097a7
- revert version number to 0.1
b097a7
b097a7
* Mon Sep 08 2014 Lokesh Mandvekar <lsm5@fedoraproject.org> - 0-0.3.git6ebe69a
b097a7
- gopath defined in golang package already
b097a7
- package owns /etc/kubernetes
b097a7
- bash dependency implicit
b097a7
- keep buildroot/$RPM_BUILD_ROOT macros consistent
b097a7
- replace with macros wherever possible
b097a7
- set version, release and source tarball prep as per
b097a7
https://fedoraproject.org/wiki/Packaging:SourceURL#Github
b097a7
b097a7
* Mon Sep 08 2014 Eric Paris <eparis@redhat.com>
b097a7
- make services restart automatically on error
b097a7
b097a7
* Sat Sep 06 2014 Eric Paris 
b097a7
- Bump to upstream 6ebe69a8751508c11d0db4dceb8ecab0c2c7314a
b097a7
b097a7
* Wed Aug 13 2014 Eric Paris <eparis@redhat.com>
b097a7
- update to upstream
b097a7
- redo build to use project scripts
b097a7
- use project scripts in %check
b097a7
- rework deletion of third_party packages to easily detect changes
b097a7
- run apiserver and controller-manager as non-root
b097a7
b097a7
* Mon Aug 11 2014 Adam Miller <maxamillion@redhat.com>
b097a7
- update to upstream
b097a7
- decouple the rest of third_party
b097a7
b097a7
* Thu Aug 7 2014 Eric Paris <eparis@redhat.com>
b097a7
- update to head
b097a7
- update package to include config files
b097a7
b097a7
* Wed Jul 16 2014 Colin Walters <walters@redhat.com>
b097a7
- Initial package