From d2fd77a2796ea732ae8bc3124cc36b300bbda610 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Jun 23 2015 09:22:54 +0000 Subject: import kubernetes-0.17.1-4.el7 --- diff --git a/.gitignore b/.gitignore index e99b77e..a0723de 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/kubernetes-0ea87e4.tar.gz +SOURCES/kubernetes-01fcb58.tar.gz diff --git a/.kubernetes.metadata b/.kubernetes.metadata index 382570f..8d0f8fb 100644 --- a/.kubernetes.metadata +++ b/.kubernetes.metadata @@ -1 +1 @@ -8f43f3a2772e12b8ad5cb7517a584c348fd1d3be SOURCES/kubernetes-0ea87e4.tar.gz +828053ede0cadd1f93474e31c27d44eed878b529 SOURCES/kubernetes-01fcb58.tar.gz diff --git a/SOURCES/No-Nicer-error-msg-if-stdlib-pkg-with-cgo-flag-is-no.patch b/SOURCES/No-Nicer-error-msg-if-stdlib-pkg-with-cgo-flag-is-no.patch deleted file mode 100644 index 8f91c3a..0000000 --- a/SOURCES/No-Nicer-error-msg-if-stdlib-pkg-with-cgo-flag-is-no.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 9e1cf168d92f155e478cd56c3b78ac4dee155237 Mon Sep 17 00:00:00 2001 -From: Jan Chaloupka -Date: Tue, 7 Apr 2015 16:06:19 +0200 -Subject: [PATCH] No Nicer error msg if stdlib pkg with cgo flag is not - installed - ---- - hack/lib/golang.sh | 2 -- - 1 file changed, 2 deletions(-) - -diff --git a/hack/lib/golang.sh b/hack/lib/golang.sh -index 5dc923f..588992b 100644 ---- a/hack/lib/golang.sh -+++ b/hack/lib/golang.sh -@@ -276,7 +276,6 @@ kube::golang::build_binaries_for_platform() { - local -a nonstatics=() - for binary in "${binaries[@]}"; do - if kube::golang::is_statically_linked_library "${binary}"; then -- kube::golang::exit_if_stdlib_not_installed; - statics+=($binary) - else - nonstatics+=($binary) -@@ -298,7 +297,6 @@ kube::golang::build_binaries_for_platform() { - fi - - if kube::golang::is_statically_linked_library "${binary}"; then -- kube::golang::exit_if_stdlib_not_installed; - CGO_ENABLED=0 go build -installsuffix cgo -o "${output_path}/${bin}" \ - "${goflags[@]:+${goflags[@]}}" \ - -ldflags "${version_ldflags}" \ --- -1.9.3 - diff --git a/SPECS/kubernetes.spec b/SPECS/kubernetes.spec index 650d5b8..9020ca3 100644 --- a/SPECS/kubernetes.spec +++ b/SPECS/kubernetes.spec @@ -1,11 +1,12 @@ #debuginfo not supported with Go -%global debug_package %{nil} +%global debug_package %{nil} %global provider github %global provider_tld com %global project GoogleCloudPlatform %global repo kubernetes +# https://github.com/GoogleCloudPlatform/kubernetes %global import_path %{provider}.%{provider_tld}/%{project}/%{repo} -%global commit 0ea87e486407298dc1e3126c47f4076b9022fb09 +%global commit 01fcb58673001e56c69e128ab57e0c3f701aeea5 %global shortcommit %(c=%{commit}; echo ${c:0:7}) #I really need this, otherwise "version_ldflags=$(kube::version_ldflags)" @@ -14,35 +15,25 @@ %global _checkshell /bin/bash Name: kubernetes -Version: 0.15.0 -Release: 0.3.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 -Patch0: No-Nicer-error-msg-if-stdlib-pkg-with-cgo-flag-is-no.patch - -# cadvisor is integrated into kubelet +Version: 0.17.1 +Release: 4%{?dist} +Summary: Container cluster management +License: ASL 2.0 +URL: %{import_path} +ExclusiveArch: x86_64 +Source0: https://%{import_path}/archive/%{commit}/%{repo}-%{shortcommit}.tar.gz + +# It obsoletes cadvisor but needs its source code (literally integrated) Obsoletes: cadvisor -%if 0%{?fedora} >= 21 || 0%{?rhel} -Requires: docker -%else -Requires: docker-io -%endif - -Requires(pre): shadow-utils - -BuildRequires: golang >= 1.2-7 -BuildRequires: systemd -BuildRequires: etcd >= 2.0.8 -BuildRequires: hostname -BuildRequires: rsync +# kubernetes is decomposed into master and node subpackages +# require both of them for updates +Requires: kubernetes-master = %{version}-%{release} +Requires: kubernetes-node = %{version}-%{release} %if 0%{?fedora} # needed for go cover. Not available in RHEL/CentOS (available in Fedora/EPEL) -BuildRequires: golang-cover +BuildRequires: golang-cover %endif %description @@ -50,12 +41,10 @@ BuildRequires: golang-cover %if 0%{?fedora} %package devel -Summary: %{summary} -BuildRequires: golang >= 1.2.1-3 - -%description devel -%{summary} +Summary: %{summary} +BuildRequires: golang >= 1.2.1-3 +Provides: golang(%{import_path}/cmd/genutils) = %{version}-%{release} Provides: golang(%{import_path}/cmd/kube-apiserver/app) = %{version}-%{release} Provides: golang(%{import_path}/cmd/kube-controller-manager/app) = %{version}-%{release} Provides: golang(%{import_path}/cmd/kube-proxy/app) = %{version}-%{release} @@ -67,11 +56,13 @@ Provides: golang(%{import_path}/pkg/api/errors) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/errors/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/latest) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/meta) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/api/registered) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/resource) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/rest) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/rest/resttest) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/testapi) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/testing) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/api/v1) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/v1beta1) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/v1beta2) = %{version}-%{release} Provides: golang(%{import_path}/pkg/api/v1beta3) = %{version}-%{release} @@ -86,6 +77,7 @@ Provides: golang(%{import_path}/pkg/auth/user) = %{version}-%{release} Provides: golang(%{import_path}/pkg/capabilities) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/cache) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/client/chaosclient) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/clientcmd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/clientcmd/api) = %{version}-%{release} Provides: golang(%{import_path}/pkg/client/clientcmd/api/latest) = %{version}-%{release} @@ -98,19 +90,24 @@ Provides: golang(%{import_path}/pkg/client/testclient) = %{version}-%{release} Provides: golang(%{import_path}/pkg/clientauth) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/aws) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/cloudprovider/controller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/fake) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/gce) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/mesos) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/nodecontroller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/openstack) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/ovirt) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/rackspace) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/routecontroller) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/cloudprovider/servicecontroller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/cloudprovider/vagrant) = %{version}-%{release} Provides: golang(%{import_path}/pkg/config) = %{version}-%{release} Provides: golang(%{import_path}/pkg/controller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/controller/framework) = %{version}-%{release} Provides: golang(%{import_path}/pkg/conversion) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/conversion/queryparams) = %{version}-%{release} Provides: golang(%{import_path}/pkg/credentialprovider) = %{version}-%{release} Provides: golang(%{import_path}/pkg/credentialprovider/gcp) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/fieldpath) = %{version}-%{release} Provides: golang(%{import_path}/pkg/fields) = %{version}-%{release} Provides: golang(%{import_path}/pkg/healthz) = %{version}-%{release} Provides: golang(%{import_path}/pkg/httplog) = %{version}-%{release} @@ -127,9 +124,13 @@ Provides: golang(%{import_path}/pkg/kubelet/container) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/dockertools) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/envvars) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/leaky) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/kubelet/lifecycle) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/metrics) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/network) = %{version}-%{release} Provides: golang(%{import_path}/pkg/kubelet/network/exec) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/kubelet/prober) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/kubelet/rkt) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/kubelet/types) = %{version}-%{release} Provides: golang(%{import_path}/pkg/labels) = %{version}-%{release} Provides: golang(%{import_path}/pkg/master) = %{version}-%{release} Provides: golang(%{import_path}/pkg/master/ports) = %{version}-%{release} @@ -141,6 +142,7 @@ Provides: golang(%{import_path}/pkg/probe/tcp) = %{version}-%{release} Provides: golang(%{import_path}/pkg/proxy) = %{version}-%{release} Provides: golang(%{import_path}/pkg/proxy/config) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/componentstatus) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/controller) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/controller/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/endpoint) = %{version}-%{release} @@ -161,16 +163,30 @@ Provides: golang(%{import_path}/pkg/registry/persistentvolumeclaim) = %{version} Provides: golang(%{import_path}/pkg/registry/persistentvolumeclaim/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/pod) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/pod/etcd) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/podtemplate) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/podtemplate/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/registrytest) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/resourcequota) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/resourcequota/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/secret) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/secret/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/registry/service) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/allocator) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/allocator/etcd) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/ipallocator) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/ipallocator/controller) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/ipallocator/etcd) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/portallocator) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/service/portallocator/controller) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/serviceaccount) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/registry/serviceaccount/etcd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/resourcequota) = %{version}-%{release} Provides: golang(%{import_path}/pkg/runtime) = %{version}-%{release} -Provides: golang(%{import_path}/pkg/scheduler) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/securitycontext) = %{version}-%{release} Provides: golang(%{import_path}/pkg/service) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/serviceaccount) = %{version}-%{release} Provides: golang(%{import_path}/pkg/tools) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/tools/etcdtest) = %{version}-%{release} Provides: golang(%{import_path}/pkg/types) = %{version}-%{release} Provides: golang(%{import_path}/pkg/ui) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util) = %{version}-%{release} @@ -183,13 +199,16 @@ Provides: golang(%{import_path}/pkg/util/httpstream) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/httpstream/spdy) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/iptables) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/mount) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/proxy) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/slice) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/strategicpatch) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/wait) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/util/workqueue) = %{version}-%{release} Provides: golang(%{import_path}/pkg/util/yaml) = %{version}-%{release} Provides: golang(%{import_path}/pkg/version) = %{version}-%{release} Provides: golang(%{import_path}/pkg/version/verflag) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/volume/aws_ebs) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/empty_dir) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/gce_pd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/git_repo) = %{version}-%{release} @@ -197,27 +216,38 @@ Provides: golang(%{import_path}/pkg/volume/glusterfs) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/host_path) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/iscsi) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/nfs) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/volume/persistent_claim) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/volume/rbd) = %{version}-%{release} Provides: golang(%{import_path}/pkg/volume/secret) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/volume/util) = %{version}-%{release} +Provides: golang(%{import_path}/pkg/volumeclaimbinder) = %{version}-%{release} Provides: golang(%{import_path}/pkg/watch) = %{version}-%{release} Provides: golang(%{import_path}/pkg/watch/json) = %{version}-%{release} Provides: golang(%{import_path}/plugin/cmd/kube-scheduler/app) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/admit) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/deny) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/admission/exec/denyprivileged) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/limitranger) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/namespace/autoprovision) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/namespace/exists) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/namespace/lifecycle) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/admission/resourcequota) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/admission/securitycontext/scdeny) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/admission/serviceaccount) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/password) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/password/allow) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/password/passwordfile) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/basicauth) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/union) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/request/x509) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/token/tokenfile) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/auth/authenticator/token/tokentest) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/scheduler) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/scheduler/algorithm) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/scheduler/algorithm/predicates) = %{version}-%{release} +Provides: golang(%{import_path}/plugin/pkg/scheduler/algorithm/priorities) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/scheduler/algorithmprovider) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/scheduler/algorithmprovider/defaults) = %{version}-%{release} Provides: golang(%{import_path}/plugin/pkg/scheduler/api) = %{version}-%{release} @@ -228,21 +258,79 @@ Provides: golang(%{import_path}/plugin/pkg/scheduler/factory) = %{version}-%{rel Provides: golang(%{import_path}/plugin/pkg/scheduler/metrics) = %{version}-%{release} Provides: golang(%{import_path}/test/e2e) = %{version}-%{release} Provides: golang(%{import_path}/test/integration) = %{version}-%{release} -Provides: golang(%{import_path}/third_party/forked/json) = %{version}-%{release} -Provides: golang(%{import_path}/third_party/forked/reflect) = %{version}-%{release} -Provides: golang(%{import_path}/third_party/golang/netutil) = %{version}-%{release} +Provides: golang(%{import_path}/test/integration/framework) = %{version}-%{release} + +%description devel +%{summary} This package contains library source intended for building other packages which use %{project}/%{repo}. %endif +%package unit-test +Summary: %{summary} - for running unit tests + +# below Rs used for testing +Requires: golang >= 1.2-7 +Requires: etcd >= 2.0.9 +Requires: hostname +Requires: rsync +Requires: NetworkManager + +%description unit-test +%{summary} - for running unit tests + +%package master +Summary: Kubernetes services for master host + +BuildRequires: golang >= 1.2-7 +BuildRequires: systemd +# below BRs used for testing +BuildRequires: etcd >= 2.0.9 +BuildRequires: hostname +BuildRequires: rsync + +Requires(pre): shadow-utils + +# if node is installed with node, version and release must be the same +Conflicts: kubernetes-node < %{version}-%{release} +Conflicts: kubernetes-node > %{version}-%{release} + +%description master +Kubernetes services for master host + +%package node +Summary: Kubernetes services for node host + +%if 0%{?fedora} >= 21 || 0%{?rhel} +Requires: docker +%else +Requires: docker-io +%endif + +BuildRequires: golang >= 1.2-7 +BuildRequires: systemd +# below BRs used for testing +BuildRequires: etcd >= 2.0.9 +BuildRequires: hostname +BuildRequires: rsync + +Requires(pre): shadow-utils + +# if master is installed with node, version and release must be the same +Conflicts: kubernetes-master < %{version}-%{release} +Conflicts: kubernetes-master > %{version}-%{release} + +%description node +Kubernetes services for node host + %prep %autosetup -n %{name}-%{commit} -p1 %build export KUBE_GIT_TREE_STATE="clean" export KUBE_GIT_COMMIT=%{commit} -export KUBE_GIT_VERSION=v0.15.0-123-g0ea87e48640729 +export KUBE_GIT_VERSION=v0.17.1-748-g01fcb58673001e %if 0%{?fedora} #export KUBE_GIT_TREE_STATE="dirty" @@ -250,29 +338,7 @@ export KUBE_GIT_VERSION=v0.15.0-123-g0ea87e48640729 #export KUBE_NO_GODEPS="true" %endif -hack/build-go.sh --use_go_build - -%check -%if 0%{?fedora} -#export KUBE_EXTRA_GOPATH=%{gopath} -#export KUBE_NO_GODEPS="true" -%endif - -echo "******Testing the commands*****" -# run the test only if /fs/sys/cgroup is mounted -if [ -d /sys/fs/cgroup ]; then - hack/test-cmd.sh -fi -echo "******Benchmarking kube********" -hack/benchmark-go.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 --use_go_build -%endif +hack/build-go.sh --use_go_build cmd/kube-apiserver cmd/kube-controller-manager plugin/cmd/kube-scheduler cmd/kube-proxy cmd/kubelet cmd/kubectl cmd/kube-version-change %install . hack/lib/init.sh @@ -280,7 +346,7 @@ kube::golang::setup_env output_path="${KUBE_OUTPUT_BINPATH}/$(kube::golang::current_platform)" -binaries=(kube-apiserver kube-controller-manager kube-scheduler kube-proxy kubelet kubectl) +binaries=(kube-apiserver kube-controller-manager kube-scheduler kube-proxy kubelet kubectl kube-version-change) install -m 755 -d %{buildroot}%{_bindir} for bin in "${binaries[@]}"; do echo "+++ INSTALLING ${bin}" @@ -304,7 +370,7 @@ 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 +install -d %{buildroot}%{_sharedstatedir}/kubelet # place contrib/init/systemd/tmpfiles.d/kubernetes.conf to /usr/lib/tmpfiles.d/kubernetes.conf install -d -m 0755 %{buildroot}%{_tmpfilesdir} @@ -318,31 +384,82 @@ for d in build cluster cmd contrib examples hack pkg plugin test; do done %endif +# place files for unit-test rpm +install -d -m 0755 %{buildroot}%{_sharedstatedir}/kubernetes-unit-test/ +cp -pav README.md %{buildroot}%{_sharedstatedir}/kubernetes-unit-test/. +for d in _output Godeps api cmd docs examples hack pkg plugin third_party test; do + cp -a $d %{buildroot}%{_sharedstatedir}/kubernetes-unit-test/ +done + +%check +# RHEL7 and CentOS are tested via unit-test subpackage +%if 0%{?fedora} +#export KUBE_EXTRA_GOPATH=%{gopath} +#export KUBE_NO_GODEPS="true" + +echo "******Testing the commands*****" +hack/test-cmd.sh +echo "******Benchmarking kube********" +hack/benchmark-go.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 --use_go_build +%endif +%endif + %files +# empty as it depends on master and node + +%files master %doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md -%{_mandir}/man1/* +%{_mandir}/man1/kube-apiserver.1* +%{_mandir}/man1/kube-controller-manager.1* +%{_mandir}/man1/kube-scheduler.1* +%{_mandir}/man1/kubectl.1* +%{_mandir}/man1/kubectl-* %{_bindir}/kube-apiserver -%{_bindir}/kubectl %{_bindir}/kube-controller-manager -%{_bindir}/kubelet -%{_bindir}/kube-proxy %{_bindir}/kube-scheduler +%{_bindir}/kube-version-change +%{_bindir}/kubectl +%{_datadir}/bash-completion/completions/kubectl %{_unitdir}/kube-apiserver.service -%{_unitdir}/kubelet.service -%{_unitdir}/kube-scheduler.service %{_unitdir}/kube-controller-manager.service -%{_unitdir}/kube-proxy.service +%{_unitdir}/kube-scheduler.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}/scheduler +%config(noreplace) %{_sysconfdir}/%{name}/config %config(noreplace) %{_sysconfdir}/%{name}/controller-manager -%config(noreplace) %{_sysconfdir}/%{name}/proxy +%{_tmpfilesdir}/kubernetes.conf + +%files node +%doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md +%{_mandir}/man1/kubelet.1* +%{_mandir}/man1/kube-proxy.1* +%{_mandir}/man1/kubectl.1* +%{_mandir}/man1/kubectl-* +%{_bindir}/kubelet +%{_bindir}/kube-proxy +%{_bindir}/kube-version-change +%{_bindir}/kubectl +%{_datadir}/bash-completion/completions/kubectl +%{_unitdir}/kube-proxy.service +%{_unitdir}/kubelet.service +%dir %{_sharedstatedir}/kubelet +%dir %{_sysconfdir}/%{name} +%config(noreplace) %{_sysconfdir}/%{name}/config %config(noreplace) %{_sysconfdir}/%{name}/kubelet -%config(noreplace) %{_sysconfdir}/%{name}/scheduler +%config(noreplace) %{_sysconfdir}/%{name}/proxy %{_tmpfilesdir}/kubernetes.conf +%files unit-test +%{_sharedstatedir}/kubernetes-unit-test/ + %if 0%{?fedora} %files devel %doc README.md LICENSE CONTRIB.md CONTRIBUTING.md DESIGN.md @@ -350,23 +467,178 @@ done %{gopath}/src/%{import_path} %endif -%pre +%pre master +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 master +%systemd_post kube-apiserver kube-scheduler kube-controller-manager + +%preun master +%systemd_preun kube-apiserver kube-scheduler kube-controller-manager + +%postun master +%systemd_postun + + +%pre node 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 +%post node +%systemd_post kubelet kube-proxy -%postun +%preun node +%systemd_preun kubelet kube-proxy + +%postun node %systemd_postun %changelog -* Fri Apr 17 2015 jchaloup - 0.15.0-0.3.git0ea87e4 -- Obsolete cadvisor - related: #1199219 +* Tue May 26 2015 jchaloup - 0.17.1-4 +- Bump to upstream 01fcb58673001e56c69e128ab57e0c3f701aeea5 + related: #1222943 + +* Mon May 25 2015 jchaloup - 0.17.1-3 +- Decompose package into master and node subpackage. + Thanks to Avesh for testing and patience. + related: #1211266 + +* Mon May 25 2015 jchaloup - 0.17.1-2 +- Bump to upstream cf7b0bdc2a41d38613ac7f8eeea91cae23553fa2 + related: #1211266 + +* Fri May 22 2015 jchaloup - 0.17.1-1 +- Update to 0.17.1 + resolves: #1222943 + +* Wed May 20 2015 jchaloup - 0.17.0-12 +- Bump to upstream a76bdd97100c66a46e2b49288540dcec58a954c4 + related: #1211266 + +* Tue May 19 2015 jchaloup - 0.17.0-11 +- Bump to upstream 10339d72b66a31592f73797a9983e7c207481b22 + related: #1211266 + +* Mon May 18 2015 jchaloup - 0.17.0-10 +- Bump to upstream efb42b302d871f7217394205d84e5ae82335d786 + related: #1211266 + +* Sat May 16 2015 jchaloup - 0.17.0-9 +- Bump to upstream d51e131726b925e7088b90915e99042459b628e0 + related: #1211266 + +* Fri May 15 2015 jchaloup - 0.17.0-8 +- Bump to upstream 1ee33ac481a14db7b90e3bbac8cec4ceea822bfb + related: #1211266 + +* Fri May 15 2015 jchaloup - 0.17.0-7 +- Bump to upstream d3c6fb0d6a13c0177dcd67556d72963c959234ea + related: #1211266 + +* Fri May 15 2015 jchaloup - 0.17.0-6 +- Bump to upstream f57f31783089f41c0bdca8cb87a1001ca94e1a45 + related: #1211266 + +* Thu May 14 2015 jchaloup - 0.17.0-5 +- Bump to upstream c90d381d0d5cf8ab7b8412106f5a6991d7e13c7d + related: #1211266 + +* Thu May 14 2015 jchaloup - 0.17.0-4 +- Bump to upstream 5010b2dde0f9b9eb820fe047e3b34bc9fa6324de +- Add debug info + related: #1211266 + +* Wed May 13 2015 jchaloup - 0.17.0-3 +- Bump to upstream ec19d41b63f5fe7b2c939e7738a41c0fbe65d796 + related: #1211266 + +* Tue May 12 2015 jchaloup - 0.17.0-2 +- Provide /usr/bin/kube-version-change binary + related: #1211266 + +* Tue May 12 2015 jchaloup - 0.17.0-1 +- Bump to upstream 962f10ee580eea30e5f4ea725c4e9e3743408a58 + related: #1211266 + +* Mon May 11 2015 jchaloup - 0.16.2-7 +- Bump to upstream 63182318c5876b94ac9b264d1224813b2b2ab541 + related: #1211266 + +* Fri May 08 2015 jchaloup - 0.16.2-6 +- Bump to upstream d136728df7e2694df9e082902f6239c11b0f2b00 +- Add NetworkManager as dependency for /etc/resolv.conf + related: #1211266 + +* Thu May 07 2015 jchaloup - 0.16.2-5 +- Bump to upstream ca0f678b9a0a6dc795ac7a595350d0dbe9d0ac3b + related: #1211266 + +* Wed May 06 2015 jchaloup - 0.16.2-4 +- Add docs to kubernetes-unit-test + related: #1211266 + +* Wed May 06 2015 jchaloup - 0.16.2-3 +- Bump to upstream 3a24c0e898cb3060d7905af6df275a3be562451d + related: #1211266 + +* Tue May 05 2015 jchaloup - 0.16.2-2 +- Add api and README.md to kubernetes-unit-test (must not be shipped) + related: #1211266 + +* Tue May 05 2015 jchaloup - 0.16.2-1 +- Bump to upstream 72048a824ca16c3921354197953fabecede5af47 + related: #1211266 + +* Mon May 04 2015 jchaloup - 0.16.1-2 +- Bump to upstream 1dcd80cdf3f00409d55cea1ef0e7faef0ae1d656 + related: #1211266 + +* Sun May 03 2015 jchaloup - 0.16.1-1 +- Bump to upstream 86751e8c90a3c0e852afb78d26cb6ba8cdbc37ba + related: #1211266 + +* Fri May 01 2015 jchaloup - 0.16.0-2 +- Bump to upstream 72708d74b9801989ddbdc8403fc5ba4aafb7c1ef + related: #1211266 + +* Wed Apr 29 2015 jchaloup - 0.16.0-1 +- Bump to upstream 7dcce2eeb7f28643d599c8b6a244523670d17c93 + related: #1211266 + +* Tue Apr 28 2015 jchaloup - 0.15.0-10 +- Add unit-test subpackage + related: #1211266 + +* Tue Apr 28 2015 jchaloup - 0.15.0-9 +- Bump to upstream 99fc906f78cd2bcb08536c262867fa6803f816d5 + related: #1211266 + +* Mon Apr 27 2015 jchaloup - 0.15.0-8 +- Bump to upstream 051dd96c542799dfab39184d2a7c8bacf9e88d85 + related: #1211266 + +* Fri Apr 24 2015 jchaloup - 0.15.0-7 +- Bump to upstream 9f753c2592481a226d72cea91648db8fb97f0da8 + related: #1211266 + +* Thu Apr 23 2015 jchaloup - 0.15.0-6 +- Bump to upstream cf824ae5e07965ba0b4b15ee88e08e2679f36978 + related: #1211266 + +* Tue Apr 21 2015 jchaloup - 0.15.0-5 +- Bump to upstream 21788d8e6606038a0a465c97f5240b4e66970fbb + related: #1211266 + +* Mon Apr 20 2015 jchaloup - 0.15.0-4 +- Bump to upstream eb1ea269954da2ce557f3305fa88d42e3ade7975 + related: #1211266 + +* Fri Apr 17 2015 jchaloup - 0.15.0-3 +- Obsolete cadvisor as it is integrated in kubelet + related: #1211266 * Wed Apr 15 2015 jchaloup - 0.15.0-0.2.git0ea87e4 - Bump to upstream 0ea87e486407298dc1e3126c47f4076b9022fb09