diff --git a/ceph-deploy-2.0.1.tar.bz2 b/ceph-deploy-2.0.1.tar.bz2 new file mode 100644 index 0000000000000000000000000000000000000000..21696480bca43d12afa6bce27671bd8cd2113335 Binary files /dev/null and b/ceph-deploy-2.0.1.tar.bz2 differ diff --git a/ceph-deploy-zzh-20200922.patch b/ceph-deploy-zzh-20200922.patch new file mode 100644 index 0000000000000000000000000000000000000000..cb9ec7438eeef9cefdd1a27e4f410286ed30eba2 --- /dev/null +++ b/ceph-deploy-zzh-20200922.patch @@ -0,0 +1,20 @@ +diff -uNr a/ceph_deploy/hosts/__init__.py b/ceph_deploy/hosts/__init__.py +--- a/ceph_deploy/hosts/__init__.py 2018-06-20 01:54:37.000000000 +0800 ++++ b/ceph_deploy/hosts/__init__.py 2020-09-22 11:11:28.723059554 +0800 +@@ -96,6 +96,7 @@ + 'scientific': centos, + 'oracle': centos, + 'redhat': centos, ++ 'openeuler': centos, + 'fedora': fedora, + 'suse': suse, + 'virtuozzo': centos, +diff -uNr a/scripts/ceph-deploy b/scripts/ceph-deploy +--- a/scripts/ceph-deploy 2018-06-20 01:54:37.000000000 +0800 ++++ b/scripts/ceph-deploy 2020-09-22 11:11:05.894842445 +0800 +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/env python3 + import os + import platform + import sys diff --git a/ceph-deploy.spec b/ceph-deploy.spec new file mode 100644 index 0000000000000000000000000000000000000000..95342128b78d5f847a444c613559466a5ebb625f --- /dev/null +++ b/ceph-deploy.spec @@ -0,0 +1,71 @@ +# +# spec file for package ceph-deploy +# + +%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5) +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} +%endif + +################################################################################# +# common +################################################################################# +Name: ceph-deploy +Version: 2.0.1 +Release: 0 +Summary: Admin and deploy tool for Ceph +License: MIT +Group: System/Filesystems +URL: http://ceph.com/ +Source0: %{name}-%{version}.tar.bz2 +Patch: ceph-deploy-zzh-20200922.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-virtualenv +BuildRequires: python3-mock +BuildRequires: python3-tox +BuildRequires: python3-pytest +BuildRequires: python3-apipkg +BuildRequires: git +#Requires: python-argparse +#Requires: lsb-release +#Requires: ceph +%if 0%{?suse_version} && 0%{?suse_version} <= 1110 +%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%else +BuildArch: noarch +%endif + +################################################################################# +# specific +################################################################################# +%if 0%{defined suse_version} +%py_requires +%endif + +%description +An easy to use admin tool for deploy ceph storage clusters. + +%prep +#%%setup -q -n %%{name} +%setup -q +%patch -p1 + +%build +#python setup.py build + +%install +python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +install -m 0755 -D scripts/ceph-deploy $RPM_BUILD_ROOT/usr/bin + +%clean +[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT" + +%files +%defattr(-,root,root) +%doc LICENSE README.rst +%{_bindir}/ceph-deploy +%{python3_sitelib}/* + +%changelog