Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Gentoo Linux is detected as Ubuntu Linux #86

Closed
wants to merge 2 commits into from
Closed

Conversation

ryao
Copy link
Contributor

@ryao ryao commented Feb 23, 2012

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.

- Fixes Gentoo Linux detection, based on commit
  zfsonlinux/zfs:d9bfe0f57a82fd1a02e93309912008ed1aa83e04
- Implements detection for Lunar Linux
- Rearranges distribution lists to match those in zfsonlinux/zfs
@dajhorn
Copy link
Contributor

dajhorn commented Feb 25, 2012

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
Copy link
Contributor Author

ryao commented Feb 25, 2012

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

@dajhorn
Copy link
Contributor

dajhorn commented Feb 25, 2012

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
Copy link
Contributor

dajhorn commented Feb 25, 2012

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

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

@ryao
Copy link
Contributor Author

ryao commented Feb 25, 2012

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
Copy link
Contributor

dajhorn commented Feb 25, 2012

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
Copy link
Contributor Author

ryao commented Feb 25, 2012

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
Copy link
Contributor

dajhorn commented Feb 26, 2012

@gentoofan: Yes, this works properly.

@behlendorf
Copy link
Contributor

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
Copy link
Contributor

Merged with some additional cleanup as a3a69b7

@behlendorf behlendorf closed this Mar 5, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants