zfsonlinux/spl — Issue #72: Incorrect linux distribution is detected on Arch Linux
Author: Prakash-Surya
Created: 2011-12-16 06:05:08+00:00
State: open

During the configure step on an Arch Linux system, the linux distribution is incorrectly being detected as 'ubuntu' and the default package to be 'deb'.

$ ./configure
...
checking linux distribution... ubuntu
checking default package type... deb
...

The linux distribution is determined by the `SPL_AC_DEFAULT_PACKAGE` autoconf macro as such:

...
elif test -f /etc/lsb-release ; then
VENDOR=ubuntu ;
...
elif test -f /etc/arch-release ; then
VENDOR=arch ;
...

The problem lies in the fact that Arch Linux provides an `/etc/lsb-release` file:

$ cat /etc/lsb-release
DISTRIB_DESCRIPTION="Arch Linux"

I _think_ simply moving the test for arch, above the test for ubuntu would solve the issue. Although I haven't yet tested that theory. Perhaps there's a more appropriate file to test against for the ubuntu distro? `/etc/lsb-release` doesn't seem too specific to ubuntu, perhaps this issue is even present under distributions other than arch.