monero-project/kovri

CMakeLists.txt: use /etc/os-release to detect distro

Wuodan opened this issue · 2 comments


By submitting this issue, I confirm the following:

  • I have read and understood the developer guide in kovri-docs.
  • I have checked that the issue I am reporting can be replicated or that the feature I am suggesting is not present.
  • I have checked opened or recently closed pull requests for existing solutions/implementations to my issue/suggestion.

CMakeLists.txt has a function Uname(), which I would like to replace.
Reason:
uname -a will never work here! I suggest using /etc/os-release to detect distro. My research shows that /etc/os-release should be available on recent versions of the currently supported distros Arch and Ubuntu plus many others.

uname -a will never work here!

What do you mean by this? What is gentoo's output?

/etc/os-release

This is far less portable than uname so I would like to avoid this if possible.

NOTICE: THIS ISSUE HAS BEEN MOVED TO GitLab. Please continue the discussion there. See #1013 for details.