Repository: conan-io/conan

Issue:
[bug] tools.os_info.with_yum does not detect AlmaLinux (CentOS replacement)
AlmaLinux is the CentOS successor. Similar to CentOS it uses `yum` or `dnf`. However, `with_yum` in `system_requirement` fails:

e.g.
```
opengl/system: WARN: Don't know how to install OpenGL for your distro.
opengl/system: ERROR: while executing system_requirements(): local variable 'packages' referenced before assignment
ERROR: Error in system requirements
```

I am not sure if this is a bug in Conan or AlmaLinux. I can do further debugging as requested.

### Environment Details (include every applicable attribute)
  * Operating System+version: AlmaLinux 8.4 (Electric Cheetah)
  * Compiler+version: LLVM 10.0.1
  * Conan version: 1.38.0
  * Python version: 3.9.6


Discussion:
Hi @daravi 

yes, please, can you verify you have the latest revision of ``opengl/system`` installed? I see:

```python
def system_requirements(self):
        packages = []
        if tools.os_info.is_linux and self.settings.os == "Linux":
            if tools.os_info.with_yum:
                if tools.os_info.linux_distro == "fedora" and tools.os_info.os_version >= "32":
                    packages = ["libglvnd-devel"]
                else:
                    packages = ["mesa-libGL-devel"]
            elif tools.os_info.with_apt:
                ubuntu_20_or_later = tools.os_info.linux_distro == "ubuntu" and tools.os_info.os_version >= "20"
                debian_11_or_later = tools.os_info.linux_distro == "debian" and tools.os_info.os_version >= "11"
                pop_os_20_or_later = tools.os_info.linux_distro == "pop" and tools.os_info.os_version >= "20"
                if ubuntu_20_or_later or debian_11_or_later or pop_os_20_or_later:
                    packages = ["libgl-dev"]
                else:
                    packages = ["libgl1-mesa-dev"]
            elif tools.os_info.with_pacman:
                packages = ["libglvnd"]
            elif tools.os_info.with_zypper:
                packages = ["Mesa-libGL-devel"]
            else:
                self.output.warn("Don't know how to install OpenGL for your distro.")
        elif tools.os_info.is_freebsd and self.settings.os == "FreeBSD":
            packages = ["libglvnd"]
        if packages:
            package_tool = tools.SystemPackageTool(conanfile=self, default_mode='verify')
            for p in packages:
                package_tool.install(update=True, packages=p)
```

So it shouldn't fail with the above message (it could fail not installing anything, of course).

Then, it could be failing because:
```python
    @property
    def with_yum(self):
        return self.is_linux and self.linux_distro in ("pidora", "fedora", "scientific", "centos",
                                                       "redhat", "rhel", "xenserver", "amazon",
                                                       "oracle", "amzn")
```
It should be great to see what ``distro.id()`` is returning for your distro, and also if an update (like suggested in https://github.com/conan-io/conan/issues/9452) could help.
@memsharded Thanks! My distro.id() returns "almalinux". Should I make a PR for adding that?
> @memsharded Thanks! My distro.id() returns "almalinux". Should I make a PR for adding that?

Yes, please, that would be great.

Resolving patch:
diff --git a/conans/client/tools/oss.py b/conans/client/tools/oss.py
--- a/conans/client/tools/oss.py
+++ b/conans/client/tools/oss.py
@@ -208,7 +208,7 @@ def with_apt(self):
     def with_yum(self):
         return self.is_linux and self.linux_distro in ("pidora", "fedora", "scientific", "centos",
                                                        "redhat", "rhel", "xenserver", "amazon",
-                                                       "oracle", "amzn")
+                                                       "oracle", "amzn", "almalinux")
 
     @property
     def with_dnf(self):


Test patch: