From 635277447b7a73e057ea50b9030f4a1c4e967997 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 23 Feb 2012 00:07:42 -0500 Subject: [PATCH 1/2] Fix distribution detection - Fixes Gentoo Linux detection, based on commit zfsonlinux/zfs:d9bfe0f57a82fd1a02e93309912008ed1aa83e04 - Implements detection for Lunar Linux - Rearranges distribution lists to match those in zfsonlinux/zfs --- config/spl-build.m4 | 20 ++++++++++++-------- configure | 14 ++++++++------ 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 205eb6bc..7d6da9d3 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -375,18 +375,20 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ VENDOR=redhat ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; elif test -f /etc/debian_version ; then VENDOR=debian ; elif test -f /etc/SuSE-release ; then VENDOR=sles ; elif test -f /etc/slackware-version ; then VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; else VENDOR= ; fi @@ -395,12 +397,14 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ AC_MSG_CHECKING([default package type]) case "$VENDOR" in - fedora) DEFAULT_PACKAGE=rpm ;; redhat) DEFAULT_PACKAGE=rpm ;; - sles) DEFAULT_PACKAGE=rpm ;; + fedora) DEFAULT_PACKAGE=rpm ;; ubuntu) DEFAULT_PACKAGE=deb ;; debian) DEFAULT_PACKAGE=deb ;; + sles) DEFAULT_PACKAGE=rpm ;; slackware) DEFAULT_PACKAGE=tgz ;; + gentoo) DEFAULT_PACKAGE=tgz ;; + lunar) DEFAULT_PACKAGE=tgz ;; arch) DEFAULT_PACKAGE=arch;; *) DEFAULT_PACKAGE=rpm ;; esac diff --git a/configure b/configure index 3b3439ad..06b09f50 100755 --- a/configure +++ b/configure @@ -11493,18 +11493,20 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=redhat ; elif test -f /etc/fedora-release ; then VENDOR=fedora ; - elif test -f /etc/arch-release ; then - VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; + elif test -f /etc/gentoo-release ; then + VENDOR=gentoo ; elif test -f /etc/debian_version ; then VENDOR=debian ; elif test -f /etc/SuSE-release ; then VENDOR=sles ; elif test -f /etc/slackware-version ; then VENDOR=slackware ; - elif test -f /etc/gentoo-release ; then - VENDOR=gentoo ; + elif test -f /etc/arch-release ; then + VENDOR=arch ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; + elif test -f /etc/lunar.release ; then + VENDOR=lunar ; else VENDOR= ; fi From b0065fd03d92a56ded237c128c206b907899c22e Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Sat, 25 Feb 2012 18:18:14 -0500 Subject: [PATCH 2/2] Fix distribution detection so that Ubuntu does not identify as Debian --- config/spl-build.m4 | 4 ++-- configure | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/spl-build.m4 b/config/spl-build.m4 index 7d6da9d3..9fb5a2ae 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -377,6 +377,8 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ VENDOR=fedora ; elif test -f /etc/gentoo-release ; then VENDOR=gentoo ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; elif test -f /etc/debian_version ; then VENDOR=debian ; elif test -f /etc/SuSE-release ; then @@ -385,8 +387,6 @@ AC_DEFUN([SPL_AC_DEFAULT_PACKAGE], [ VENDOR=slackware ; elif test -f /etc/arch-release ; then VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; elif test -f /etc/lunar.release ; then VENDOR=lunar ; else diff --git a/configure b/configure index 06b09f50..ee0835a6 100755 --- a/configure +++ b/configure @@ -11495,6 +11495,8 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=fedora ; elif test -f /etc/gentoo-release ; then VENDOR=gentoo ; + elif test -f /etc/lsb-release ; then + VENDOR=ubuntu ; elif test -f /etc/debian_version ; then VENDOR=debian ; elif test -f /etc/SuSE-release ; then @@ -11503,8 +11505,6 @@ $as_echo_n "checking linux distribution... " >&6; } VENDOR=slackware ; elif test -f /etc/arch-release ; then VENDOR=arch ; - elif test -f /etc/lsb-release ; then - VENDOR=ubuntu ; elif test -f /etc/lunar.release ; then VENDOR=lunar ; else