Gentoo Linux is detected as Ubuntu Linux #86

Closed
wants to merge 2 commits into
from

3 participants

@ryao
ZFS on Linux member

Currently, SPL's build system detects Gentoo Linux as Ubuntu Linux.

I have written a patch that synchronizes the behavior with that of the ZFS build system to correct this.

@ryao ryao 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
6352774
@dajhorn
ZFS on Linux member

This branch causes a regression on deb systems because they all ship a /etc/debian_version file. (eg: Ubuntu and Mint are detected as Debian if this test happens too early.)

Perhaps calling lsb_release and testing the Distributor ID field is a better way to do this check. The existing elif logic for can be kept for distributions that do not subscribe to the LSB standard.

@ryao
ZFS on Linux member

This patch makes the build system detection behave identically to build system for zfsonlinux/zfs. Is there misdetection there too?

@dajhorn
ZFS on Linux member

Yes. For example, I get this in the config.log for zfs on Ubuntu:

 configure:11731: checking linux distribution
 configure:11754: result: debian

I thought this was fixed earlier. It is currently a cosmetic glitch.

@dajhorn
ZFS on Linux member

git-blame says that the regression happened at commit zfsonlinux/zfs@d9bfe0f.

It looks like the detection logic needs to be improved because Gentoo matches more than one distro signature.

@ryao
ZFS on Linux member

The distribution detection logic appears to have diverged in the two build systems. In my opinion, that is something that should be fixed.

What is the nature of the regression that occurs on Ubuntu with this patch? Is it purely cosmetic or is there anything substantial that happens that would merit maintaining the current situation until a more comprehensive solution can be found?

@dajhorn
ZFS on Linux member

Only local installations are affected because this logic is disabled in the PPA.

Given that nobody complained about it during the last ten months, this is a minor cosmetic bug, but it could cause problems later if something is written that depends on an accurate VENDOR value.

The lsb_release utility is a Python program, which explains why it isn't part of something universal like the util-linux package.

@ryao
ZFS on Linux member

dajhorn, I reordered the distribution detection list, which should address both the original issue and the Ubuntu regression. If it works, then a similar pull request should be made for zfsonlinux/zfs.

Please test this and report whether or not it fixed your problem.

@dajhorn
ZFS on Linux member

@gentoofan: Yes, this works properly.

@behlendorf
ZFS on Linux member

Yes, the effect of this are largely cosmetic. The distribution is just used to automatically detect which packaging system should be used for things like the make pkg build target. Still, I'm all for fixing. Once I see a pull request for both the spl and zfs code which systems them up I'll merge it.

@behlendorf
ZFS on Linux member

Merged with some additional cleanup as a3a69b7

@behlendorf behlendorf closed this Mar 5, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment