diff --git a/cloud-init-no-dmidecode-on-ppc64.patch b/cloud-init-no-dmidecode-on-ppc64.patch new file mode 100644 index 0000000..5b48dcd --- /dev/null +++ b/cloud-init-no-dmidecode-on-ppc64.patch @@ -0,0 +1,26 @@ +Index: cloud-init-0.7.5/cloudinit/sources/DataSourceAltCloud.py +=================================================================== +--- cloud-init-0.7.5.orig/cloudinit/sources/DataSourceAltCloud.py ++++ cloud-init-0.7.5/cloudinit/sources/DataSourceAltCloud.py +@@ -116,7 +116,7 @@ class DataSourceAltCloud(sources.DataSou + ''' + + uname_arch = os.uname()[4] +- if uname_arch.startswith("arm") or uname_arch == "aarch64": ++ if uname_arch.startswith("arm") or uname_arch == "aarch64" or uname_arch.startswith("ppc"): + # Disabling because dmidecode in CMD_DMI_SYSTEM crashes kvm process + LOG.debug("Disabling AltCloud datasource on arm (LP: #1243287)") + return 'UNKNOWN' +Index: cloud-init-0.7.5/cloudinit/sources/DataSourceSmartOS.py +=================================================================== +--- cloud-init-0.7.5.orig/cloudinit/sources/DataSourceSmartOS.py ++++ cloud-init-0.7.5/cloudinit/sources/DataSourceSmartOS.py +@@ -175,7 +175,7 @@ class DataSourceSmartOS(sources.DataSour + return False + + uname_arch = os.uname()[4] +- if uname_arch.startswith("arm") or uname_arch == "aarch64": ++ if uname_arch.startswith("arm") or uname_arch == "aarch64" uname_arch.startswith("ppc"): + # Disabling because dmidcode in dmi_data() crashes kvm process + LOG.debug("Disabling SmartOS datasource on arm (LP: #1243287)") + return False diff --git a/cloud-init.changes b/cloud-init.changes index 5d4f748..f97155d 100644 --- a/cloud-init.changes +++ b/cloud-init.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Sat Aug 9 12:35:16 UTC 2014 - dvlaeev@suse.com + +- Make package Arch dependent otherwise package is not installable + on arcoitectures where dmidecode is not available. + +- Avoid to run dmidecode on PowerPC as well + cloud-init-no-dmidecode-on-ppc64.patch + ------------------------------------------------------------------- Mon Jul 28 15:54:32 UTC 2014 - rschweikert@suse.com diff --git a/cloud-init.spec b/cloud-init.spec index 915a822..72ad1c8 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -38,6 +38,7 @@ Patch6: dynamicInitCmd.diff # FIXME suseSetInitCmd.patch send upstream once the SUSE handlers are accepted Patch7: suseSetInitCmd.patch Patch8: cloudinit-datasources.patch +Patch9: cloud-init-no-dmidecode-on-ppc64.patch BuildRequires: fdupes BuildRequires: filesystem BuildRequires: python-devel @@ -66,8 +67,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Requires: pmtools %else +%ifarch %ix86 x86_64 Requires: dmidecode -BuildArch: noarch +%endif %endif %if 0%{?suse_version} && 0%{?suse_version} <= 1210 %define initsys sysvinit_suse @@ -128,6 +130,7 @@ Unit tests for the cloud-init tools %patch6 %patch7 %patch8 -p1 +%patch9 -p1 %if 0%{?suse_version} <= 1130 # disable ecdsa for SLE 11 (not available)