forked from pool/libguestfs
e7da7e37ad
- Fix python binding for python3 add patches: * 9d25b4e5-python-add-simple-wrappers-for-PyObject-string-funct.patch * f3f99a09-python-use-right-func-when-PyString_FromStringAndSiz.patch - Better fix for SUSE distro detection using ID_LIKE as fallback: * use-idlike.patch OBS-URL: https://build.opensuse.org/request/show/520153 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libguestfs?expand=0&rev=401
20 lines
869 B
Diff
20 lines
869 B
Diff
Index: libguestfs-1.36.5/m4/guestfs_appliance.m4
|
|
===================================================================
|
|
--- libguestfs-1.36.5.orig/m4/guestfs_appliance.m4
|
|
+++ libguestfs-1.36.5/m4/guestfs_appliance.m4
|
|
@@ -101,6 +101,14 @@ if test -f /etc/os-release; then
|
|
[FEDORA | RHEL | CENTOS],[DISTRO=REDHAT],
|
|
[OPENSUSE | SLED | SLES],[DISTRO=SUSE],
|
|
[ARCH],[DISTRO=ARCHLINUX])
|
|
+ dnl All SUSE-based distros have ID_LIKE containing 'suse', check for it if
|
|
+ dnl ID wasn't helpful.
|
|
+ if test -z "$DISTRO"; then
|
|
+ DISTRO_LIKE="`. /etc/os-release && echo $ID_LIKE`"
|
|
+ if echo $DISTRO_LIKE | tr " " "\n" | grep -i "^SUSE$"; then
|
|
+ DISTRO=SUSE
|
|
+ fi
|
|
+ fi
|
|
elif test -f /etc/debian_version; then
|
|
DISTRO=DEBIAN
|
|
if grep -q 'DISTRIB_ID=Ubuntu' /etc/lsb-release 2>&AS_MESSAGE_LOG_FD; then
|