#debuginfo not supported with Go %global debug_package %{nil} # modifying the Go binaries breaks the DWARF debugging %global __os_install_post %{_rpmconfigdir}/brp-compress %global gopath %{_datadir}/gocode %global import_path github.com/openshift/origin %global golang_version 1.12 # commit and os_git_vars are intended to be set by the build system. # NOTE: The values in this spec file will not be kept up to date. %{!?commit: %global commit 3f6f40de4afceaef12eed83ce8f425666f9e26ad } %global shortcommit %(c=%{commit}; echo ${c:0:7}) # os_git_vars needed to run hack scripts during rpm builds %{!?os_git_vars: %global os_git_vars OS_GIT_VERSION=4.4.0-202006061254-3f6f40d OS_GIT_MAJOR=4 OS_GIT_MINOR=4 OS_GIT_PATCH=0 OS_GIT_COMMIT=3f6f40de4afceaef12eed83ce8f425666f9e26ad OS_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.17.1+3f6f40d KUBE_GIT_COMMIT=2f054b7646dc9e98f6dea458d2fb65e1d2c1f731 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=17+ } %if 0%{?skip_build} %global do_build 0 %else %global do_build 1 %endif %if 0%{?skip_prep} %global do_prep 0 %else %global do_prep 1 %endif %if 0%{?skip_dist} %global package_dist %{nil} %else %global package_dist %{dist} %endif %if 0%{?fedora} || 0%{?epel} %global need_redistributable_set 0 %else # Due to library availability, redistributable builds only work on x86_64 %ifarch x86_64 %global need_redistributable_set 1 %else %global need_redistributable_set 0 %endif %endif %{!?make_redistributable: %global make_redistributable %{need_redistributable_set}} %{!?version: %global version 4.0.0} %{!?release: %global release 1} Name: openshift Version: 4.4.0 Release: 202006061254.git.1.dc84fb4%{?dist} Summary: Open Source Container Management by Red Hat License: ASL 2.0 URL: https://%{import_path} # If go_arches not defined fall through to implicit golang archs %if 0%{?go_arches:1} ExclusiveArch: %{go_arches} %else ExclusiveArch: x86_64 aarch64 ppc64le s390x %endif Source0: openshift-git-1.dc84fb4.tar.gz BuildRequires: systemd BuildRequires: bsdtar BuildRequires: golang >= %{golang_version} BuildRequires: krb5-devel BuildRequires: rsync # TODO: Add alternative to tito here to gather and inject Bundled Provides into specfile. # The following Bundled Provides entries are populated automatically by the # OpenShift tito custom builder found here: # https://github.com/openshift/origin/blob/master/.tito/lib/origin/builder/ # # These are defined as per: # https://fedoraproject.org/wiki/Packaging:Guidelines#Bundling_and_Duplication_of_system_libraries # ### AUTO-BUNDLED-GEN-ENTRY-POINT %description [Maintainer] product: OpenShift Container Platform OpenShift is a distribution of Kubernetes optimized for enterprise application development and deployment. OpenShift adds developer and operational centric tools on top of Kubernetes to enable rapid application development, easy deployment and scaling, and long-term lifecycle maintenance for small and large teams and applications. It provides a secure and multi-tenant configuration for Kubernetes allowing you to safely host many different applications and workloads on a unified cluster. %package hyperkube Summary: OpenShift Kubernetes server commands Requires: util-linux Requires: socat Requires: iptables Provides: hyperkube = %{version} Obsoletes: atomic-openshift-hyperkube <= %{version} Obsoletes: atomic-openshift-node <= %{version} %description hyperkube [Maintainer] product: OpenShift Container Platform %{summary} %prep %if 0%{do_prep} %setup -q -n openshift-git-1.dc84fb4 %endif %build %if 0%{do_build} %if 0%{make_redistributable} # Create Binaries for all supported arches %{os_git_vars} OS_BUILD_RELEASE_ARCHIVES=n make build-cross %else # Create Binaries only for building arch %ifarch x86_64 BUILD_PLATFORM="linux/amd64" %endif %ifarch %{ix86} BUILD_PLATFORM="linux/386" %endif %ifarch ppc64le BUILD_PLATFORM="linux/ppc64le" %endif %ifarch %{arm} aarch64 BUILD_PLATFORM="linux/arm64" %endif %ifarch s390x BUILD_PLATFORM="linux/s390x" %endif OS_ONLY_BUILD_PLATFORMS="${BUILD_PLATFORM}" %{os_git_vars} OS_BUILD_RELEASE_ARCHIVES=n make build-cross %endif %endif %install PLATFORM="$(go env GOHOSTOS)/$(go env GOHOSTARCH)" install -d %{buildroot}%{_bindir} # Install linux components for bin in kube-apiserver kube-controller-manager kube-scheduler kubelet do echo "+++ INSTALLING ${bin}" install -p -m 755 _output/local/bin/${PLATFORM}/${bin} %{buildroot}%{_bindir}/${bin} done install -p -m 755 images/hyperkube/hyperkube %{buildroot}%{_bindir}/hyperkube %files hyperkube %license LICENSE %{_bindir}/hyperkube %{_bindir}/kube-apiserver %{_bindir}/kube-controller-manager %{_bindir}/kube-scheduler %{_bindir}/kubelet %defattr(-,root,root,0700) %changelog