diff --git a/fix-qemu-4.1-size-check-error.patch b/fix-qemu-4.1-size-check-error.patch new file mode 100644 index 0000000000000000000000000000000000000000..d9310dcc22e688767d0a69f1621e4a8ec5369a89 --- /dev/null +++ b/fix-qemu-4.1-size-check-error.patch @@ -0,0 +1,24 @@ +diff -urN oslo.utils-3.36.5/oslo_utils/imageutils.py oslo.utils-3.36.5-new/oslo_utils/imageutils.py +--- oslo.utils-3.36.5/oslo_utils/imageutils.py 2020-01-10 04:29:32.000000000 +0800 ++++ oslo.utils-3.36.5-new/oslo_utils/imageutils.py 2021-06-16 15:15:27.739805329 +0800 +@@ -44,7 +44,7 @@ + BACKING_FILE_RE = re.compile((r"^(.*?)\s*\(actual\s+path\s*:" + r"\s+(.*?)\)\s*$"), re.I) + TOP_LEVEL_RE = re.compile(r"^([\w\d\s\_\-]+):(.*)$") +- SIZE_RE = re.compile(r"(\d*\.?\d+)(\w+)?(\s*\(\s*(\d+)\s+bytes\s*\))?", ++ SIZE_RE = re.compile(r"(\d*\.?\d+)\s*(\w+)?(\s*\(\s*(\d+)\s+bytes\s*\))?", + re.I) + + def __init__(self, cmd_output=None, format='human'): +@@ -106,7 +106,10 @@ + return int(real_size.group(4)) + elif not unit_of_measure: + return int(magnitude) +- return strutils.string_to_bytes('%s%sB' % (magnitude, unit_of_measure), ++ # Allow abbreviated unit such as K to mean KB for compatibility. ++ if len(unit_of_measure) == 1 and unit_of_measure != 'B': ++ unit_of_measure += 'B' ++ return strutils.string_to_bytes('%s%s' % (magnitude, unit_of_measure), + return_int=True) + + def _extract_details(self, root_cmd, root_details, lines_after): diff --git a/oslo.utils-3.36.5.tar.gz b/oslo.utils-3.36.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..b131b1883cc263d93730ab6af3da25aa986deb02 Binary files /dev/null and b/oslo.utils-3.36.5.tar.gz differ diff --git a/oslo.utils-4.7.0.tar.gz b/oslo.utils-4.7.0.tar.gz deleted file mode 100644 index d3d53940ab758676b9f51b320083e5fac63a37ba..0000000000000000000000000000000000000000 Binary files a/oslo.utils-4.7.0.tar.gz and /dev/null differ diff --git a/python-oslo.utils.spec b/python-oslo-utils.spec similarity index 43% rename from python-oslo.utils.spec rename to python-oslo-utils.spec index 77d8f63a302bde2c381f15324d3078f7477c8d9b..f89f483fcc643f57645a94bfef33e3c966f3d412 100644 --- a/python-oslo.utils.spec +++ b/python-oslo-utils.spec @@ -1,53 +1,53 @@ %global _empty_manifest_terminate_build 0 Name: python-oslo-utils -Version: 4.7.0 -Release: 2 +Version: 3.36.5 +Release: 3 Summary: Oslo Utility library License: Apache-2.0 -URL: https://opendev.org/openstack/oslo.utils -Source0: https://files.pythonhosted.org/packages/a2/ac/7539cc1dc182abcd7fb3c4721d35203bc365415dff2b201f5de72e4fa6f6/oslo.utils-4.7.0.tar.gz +URL: https://docs.openstack.org/oslo.utils/latest/ +Source0: https://files.pythonhosted.org/packages/bc/6a/1353f59a99867a1998f866c0675362f1bc64540f3565249586769c4b9c38/oslo.utils-3.36.5.tar.gz +Patch6001: fix-qemu-4.1-size-check-error.patch BuildArch: noarch - -Requires: python3-debtcollector -Requires: python3-iso8601 -Requires: python3-netaddr -Requires: python3-netifaces -Requires: python3-packaging -Requires: python3-pbr -Requires: python3-pyparsing -Requires: python3-pytz -Requires: python3-six - %description -OpenStack library utils - +The oslo.utils library provides support for common utility type functions, +such as encoding, exception handling, string manipulation, and time handling. -%package -n python3-oslo-utils +%package -n python2-oslo-utils Summary: Oslo Utility library -Provides: python-oslo-utils -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pip -BuildRequires: python3-pbr -%description -n python3-oslo-utils -OpenStack library utils - +Provides: python2-oslo-utils +BuildRequires: python2-pbr +BuildRequires: python2-devel +BuildRequires: python2-setuptools +Requires: python2-pbr +Requires: python2-six +Requires: python2-iso8601 +Requires: python2-oslo-i18n +Requires: python2-monotonic +Requires: python2-pytz +Requires: python2-netaddr +Requires: python2-netifaces +Requires: python2-debtcollector +Requires: python2-pyparsing +Requires: python2-funcsigs +%description -n python2-oslo-utils +The oslo.utils library provides support for common utility type functions, +such as encoding, exception handling, string manipulation, and time handling. %package help Summary: Development documents and examples for oslo.utils -Provides: python3-oslo-utils-doc +Provides: python2-oslo-utils-doc %description help -OpenStack library utils - +The oslo.utils library provides support for common utility type functions, +such as encoding, exception handling, string manipulation, and time handling. %prep -%autosetup -n oslo.utils-4.7.0 +%autosetup -n oslo.utils-3.36.5 -p1 %build -%py3_build +%py2_build %install -%py3_install +%py2_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi @@ -74,14 +74,16 @@ popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . -%files -n python3-oslo-utils -f filelist.lst -%dir %{python3_sitelib}/* +%files -n python2-oslo-utils -f filelist.lst +%dir %{python2_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog -* Sat Jan 30 2021 zhangy -- Add buildrequires -* Fri Jan 08 2021 Python_Bot +* Wed Jun 16 2021 liusheng +- Fix Qemu 4.1 image size check error +* Sat May 29 2021 huangtianhua +- Adds BuildRequires python2-pbr to make obs success +* Fri May 07 2021 OpenStack_SIG - Package Spec generated