diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..93c04de --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/oc-92b1a3d0e5d092430b523f6541aa0c504b2222b3.tar.gz diff --git a/SPECS/openshift-clients.spec b/SPECS/openshift-clients.spec index c564fb4..505e0aa 100644 --- a/SPECS/openshift-clients.spec +++ b/SPECS/openshift-clients.spec @@ -1,3 +1,4 @@ +%global build_timestamp %(date -u +"%%Y%%m%%d%%H%%M") #debuginfo not supported with Go %global debug_package %{nil} # modifying the Go binaries breaks the DWARF debugging @@ -6,37 +7,37 @@ %global gopath %{_datadir}/gocode %global import_path github.com/openshift/oc -%global golang_version 1.13 +%global golang_version 1.19 -%{!?version: %global version 0.0.1} -%{!?release: %global release 1} +%global version_major 4 +%global version_minor 13 +%global version_patch 0 %{!?commit: -# DO NOT MODIFY: the value on the line below is sed-like replaced by openshift/doozer -%global commit e0a5699f2049372633b18c43a98a522999b1f297 +%global commit 92b1a3d0e5d092430b523f6541aa0c504b2222b3 } +%global shortcommit %(c=%{commit}; echo ${c:0:7}) + +%{!?version: %global version %{version_major}.%{version_minor}.%{version_patch}} +%{!?release: %global release %{build_timestamp}.1.git%{shortcommit}} %if ! 0%{?os_git_vars:1} -# DO NOT MODIFY: the value on the line below is sed-like replaced by openshift/doozer -%global os_git_vars OS_GIT_VERSION='' OS_GIT_COMMIT='' OS_GIT_MAJOR='' OS_GIT_MINOR='' OS_GIT_TREE_STATE='' +%global os_git_vars OS_GIT_VERSION=%{version}-%{release} OS_GIT_COMMIT=%{commit} OS_GIT_MAJOR=%{version_major} OS_GIT_MINOR=%{version_minor} OS_GIT_PATCH=%{version_patch} OS_GIT_TREE_STATE=clean %endif %if "%{os_git_vars}" == "ignore" %global make make %else -%global make %{os_git_vars} && make SOURCE_GIT_TAG:="${OS_GIT_VERSION}" SOURCE_GIT_COMMIT:="${OS_GIT_COMMIT}" SOURCE_GIT_MAJOR:="${OS_GIT_MAJOR}" SOURCE_GIT_MINOR:="${OS_GIT_MINOR}" SOURCE_GIT_TREE_STATE:="${OS_GIT_TREE_STATE}" +%global make %{os_git_vars} && make SOURCE_GIT_TAG:="${OS_GIT_VERSION}" SOURCE_GIT_COMMIT:="${OS_GIT_COMMIT}" SOURCE_GIT_MAJOR:="${OS_GIT_MAJOR}" SOURCE_GIT_MINOR:="${OS_GIT_MINOR}" SOURCE_GIT_PATCH:="${OS_GIT_PATCH}" SOURCE_GIT_TREE_STATE:="${OS_GIT_TREE_STATE}" %endif Name: openshift-clients Version: %{version} -Release: %{release}%{dist} +Release: %{release}%{?dist} Summary: OpenShift client binaries License: ASL 2.0 URL: https://%{import_path} - -%if ! 0%{?local_build:1} -Source0: https://%{import_path}/archive/%{commit}/%{name}-%{version}.tar.gz -%endif +Source0: https://%{import_path}/archive/%{commit}/oc-%{commit}.tar.gz # If go_arches not defined fall through to implicit golang archs %if 0%{?go_arches:1} @@ -52,6 +53,13 @@ BuildRequires: rsync Provides: atomic-openshift-clients = %{version} Obsoletes: atomic-openshift-clients <= %{version} +Provides: origin-clients = %{version} +Obsoletes: origin-clients <= %{version} +Provides: okd-clients = %{version} +Obsoletes: okd-clients <= %{version} +Provides: oc = %{version} +Obsoletes: oc <= %{version} + Requires: bash-completion %description @@ -61,13 +69,19 @@ Requires: bash-completion Summary: OpenShift Client binaries for Linux, Mac OSX, and Windows Provides: atomic-openshift-clients-redistributable = %{version} Obsoletes: atomic-openshift-clients-redistributable <= %{version} +Provides: origin-clients-redistributable = %{version} +Obsoletes: origin-clients-redistributable <= %{version} +Provides: okd-clients-redistributable = %{version} +Obsoletes: okd-clients-redistributable <= %{version} +Provides: oc-redistributable = %{version} +Obsoletes: oc-redistributable <= %{version} %description redistributable %{summary} %prep %if ! 0%{?local_build:1} -%setup -q +%setup -q -n oc-%{commit} %endif %build @@ -161,3 +175,5 @@ done %endif %changelog +* Fri May 26 2023 Christian Glombek - 4.14.0-1 +- Import from https://github.com/openshift/oc/blob/68c710f5c29d795a8706d1e40de9099d278c059b/oc.spec diff --git a/sources b/sources new file mode 100644 index 0000000..ca8e9e7 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (oc-92b1a3d0e5d092430b523f6541aa0c504b2222b3.tar.gz) = ca125d7c90f5d872f917b0a24ff86e1b565f92656dddc73a04d6ae65dd30d05de27b93fd34558fffb46cb6b1556a2313677e78cdd4c7e72d078ab036421300ff