From 087ee4d45818ea8e1bdea2cbc1f4ef013369a4f8 Mon Sep 17 00:00:00 2001 From: wang--ge Date: Thu, 14 Oct 2021 14:28:59 +0800 Subject: [PATCH] Add get uuid method for arm --- 0002-add-get-uuid-method-for-arm.patch | 53 ++++++++++++++++++++++++++ vdsm.spec | 9 ++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 0002-add-get-uuid-method-for-arm.patch diff --git a/0002-add-get-uuid-method-for-arm.patch b/0002-add-get-uuid-method-for-arm.patch new file mode 100644 index 0000000..fbcd474 --- /dev/null +++ b/0002-add-get-uuid-method-for-arm.patch @@ -0,0 +1,53 @@ +From 441cda8a132876dac91bd81b26efd3057305afbb Mon Sep 17 00:00:00 2001 +From: wang--ge +Date: Wed, 13 Oct 2021 14:48:02 +0800 +Subject: [PATCH] add get uuid method for arm + +--- + lib/vdsm/host/__init__.py | 5 +++++ + lib/vdsm/osinfo.py | 6 ++++-- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/lib/vdsm/host/__init__.py b/lib/vdsm/host/__init__.py +index 9d529d7..fbdea70 100644 +--- a/lib/vdsm/host/__init__.py ++++ b/lib/vdsm/host/__init__.py +@@ -55,6 +55,11 @@ def uuid(): + host_UUID = systemId.rstrip('\0').replace(',', '') + except IOError: + logging.warning('Could not find host UUID.') ++ elif cpuarch.is_arm(arch): ++ try: ++ host_UUID = os.popen('dmidecode -s system-uuid').read().strip() ++ except KeyError: ++ logging.warning('Could not find host UUID.') + + except: + logging.error("Error retrieving host UUID", exc_info=True) +diff --git a/lib/vdsm/osinfo.py b/lib/vdsm/osinfo.py +index deae299..8dccae9 100644 +--- a/lib/vdsm/osinfo.py ++++ b/lib/vdsm/osinfo.py +@@ -118,6 +118,8 @@ def _release_name(): + return OSName.RHEL + elif os.path.exists('/etc/debian_version'): + return OSName.DEBIAN ++ elif os.path.exists('/etc/openEuler-release'): ++ return OSName.RHEL + else: + return OSName.UNKNOWN + +@@ -282,8 +284,8 @@ def package_versions(): + KEY_PACKAGES[pkg]) + else: + pkgs[pkg] = { +- 'version': mi['version'].decode('utf-8'), +- 'release': mi['release'].decode('utf-8'), ++ 'version': mi['version'], ++ 'release': mi['release'], + } + except Exception: + logging.error('', exc_info=True) +-- +2.27.0 + diff --git a/vdsm.spec b/vdsm.spec index bc6f4db..f043e04 100644 --- a/vdsm.spec +++ b/vdsm.spec @@ -50,7 +50,7 @@ Name: %{vdsm_name} Version: 4.40.60.7 -Release: 2 +Release: 3 Summary: Virtual Desktop Server Manager Group: Applications/System @@ -58,6 +58,7 @@ License: GPLv2+ Url: http://www.ovirt.org/develop/developer-guide/vdsm/vdsm/ Source0: %{vdsm_name}-%{version}.tar.gz Patch1: 0001-add-aarch64-cpu-value.patch +Patch2: 0002-add-get-uuid-method-for-arm.patch %{!?_licensedir:%global license %%doc} BuildRequires: openssl @@ -575,6 +576,9 @@ Gluster plugin enables VDSM to serve Gluster functionalities. %prep %setup -q %patch1 -p1 +%patch2 -p1 +sed -i 's/1048576/524288/g' static/usr/lib/systemd/system/dev-hugepages1G.mount +sed -i 's/pagesize=1G/pagesize=512M/g' static/usr/lib/systemd/system/dev-hugepages1G.mount %build %if 0%{?enable_autotools} @@ -1115,6 +1119,9 @@ exit 0 %endif %changelog +* Wed Oct 13 2021 Ge Wang - 4.40.60.7-3 +- Add get uuid method for arm + * Sep 14 2021 huanghaitao - 4.40.60.7-2 - Remove the restriction on the kernel version