Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly recognize Almalinux as an RHEL clone. #12487

Merged
merged 2 commits into from
Mar 31, 2022

Conversation

Ferroin
Copy link
Member

@Ferroin Ferroin commented Mar 22, 2022

Summary

SSIA

Test Plan

This can be tested using an Alma Linux Docker container.

Additional Information

Fixes: #12486

@Ferroin Ferroin marked this pull request as ready for review March 22, 2022 12:20
@github-actions github-actions bot added the area/packaging Packaging and operating systems support label Mar 22, 2022
@thiagoftsm
Copy link
Contributor

I was testing your PR on Vagrant Alma Linux and I observed the following error:

/etc/os-release information:
NAME            : AlmaLinux
VERSION         : 8.5 (Arctic Sphynx)
ID              : almalinux
ID_LIKE         : rhel centos fedora
VERSION_ID      : 8.5

We detected these:
Distribution    : almalinux
Version         : 8.5
Codename        : 8.5 (Arctic Sphynx)
Package Manager : install_yum
Packages Tree   : centos
Detection Method: /etc/os-release
Default Python v: 3 

./packaging/installer/install-required-packages.sh: line 2220: syntax error near unexpected token `<'
./packaging/installer/install-required-packages.sh: line 2220: `mapfile -t PACKAGES_TO_INSTALL < <(packages | sort -u)'

@Ferroin
Copy link
Member Author

Ferroin commented Mar 22, 2022

@thiagoftsm I’m unable to replicate this issue when testing either in Docker, or in an Alma Linux VPS I spun up specifically for testing this code, but I also don’t have access to a system running Vagrant to test there.

I suspect that you will see the same error without these changes in that environment.

@stelfrag
Copy link
Collaborator

I am getting...

[root@2746185dbee9 netdata]# packaging/installer/install-required-packages.sh distribution almalinux
 > CentOS Version:  ...

We detected these:
Distribution    : almalinux
Version         : 
Codename        : 
Package Manager : install_yum
Packages Tree   : centos
Detection Method: 
Default Python v: 3 

earching for distro_sdk ...
Searching for gcc ...
 > Checking if package 'gcc' is installed...
Searching for gxx ...
 > Checking if package 'gcc-c++' is installed...
Searching for make ...
 > Checking if package 'make' is installed...
Searching for autoconf ...
 > Checking if package 'autoconf' is installed...
Searching for autoconf_archive ...
 > Checking if package 'autoconf-archive' is installed...
Searching for autogen ...
 > Checking if package 'autogen' is installed...
Searching for automake ...
 > Checking if package 'automake' is installed...
Searching for libtool ...
 > Checking if package 'libtool' is installed...
Searching for pkg_config ...
 > Checking if package 'pkgconfig' is installed...
Searching for cmake ...
 > Checking if package 'cmake' is installed...
Searching for netcat ...
 > Checking if package 'nmap-ncat' is installed...
Searching for libz_dev ...
 > Checking if package 'zlib-devel' is installed...
Searching for libuuid_dev ...
 > Checking if package 'libuuid-devel' is installed...
Searching for libmnl_dev ...
 > Checking if package 'libmnl-devel' is installed...
Searching for json_c_dev ...
 > Checking if package 'json-c-devel' is installed...
Searching for libuv ...
 > Checking if package 'libuv-devel' is installed...
Searching for lz4 ...
 > Checking if package 'lz4-devel' is installed...
Searching for openssl ...
 > Checking if package 'openssl-devel' is installed...
Searching for judy ...
Searching for libelf ...
 > Checking if package 'elfutils-libelf-devel' is installed...
Searching for python3 ...
 > Checking if package 'python3' is installed...

The following command will be run:

 >> IMPORTANT << 
    Please make sure your system is up to date
    by running:   yum update  

yum install autoconf autoconf-archive autogen automake cmake elfutils-libelf-devel gcc gcc-c++ json-c-devel libmnl-devel libtool libuuid-devel libuv-devel lz4-devel make nmap-ncat openssl-devel pkgconfig python3 zlib-devel 


Press ENTER to run it > 
yum install autoconf autoconf-archive autogen automake cmake elfutils-libelf-devel gcc gcc-c++ json-c-devel libmnl-devel libtool libuuid-devel libuv-devel lz4-devel make nmap-ncat openssl-devel pkgconfig python3 zlib-devel 
Last metadata expiration check: 0:19:00 ago on Wed Mar 23 20:15:42 2022.
No match for argument: autoconf-archive
No match for argument: autogen
No match for argument: libuv-devel
Error: Unable to find a match: autoconf-archive autogen libuv-devel



We are very sorry!

@thiagoftsm
Copy link
Contributor

@Ferroin I tested now on cloud and I have the exact same error than @stelfrag, I only could install netdata after to run:

 dnf --enablerepo=powertools install autoconf-archive autogen libuv-devel

This should make things behave more correctly.
@Ferroin
Copy link
Member Author

Ferroin commented Mar 31, 2022

@thiagoftsm @stelfrag Can you retest with the changes I just pushed?

And, if you still see the same issues, please share the /etc/os-release from the systems you see those issues on.

Copy link
Contributor

@thiagoftsm thiagoftsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After last commit, the script ran without errors on my host:

/etc/os-release information:
NAME            : AlmaLinux
VERSION         : 8.5 (Arctic Sphynx)
ID              : almalinux
ID_LIKE         : rhel centos fedora
VERSION_ID      : 8.5

We detected these:
Distribution    : almalinux
Version         : 8.5
Codename        : 8.5 (Arctic Sphynx)
Package Manager : install_dnf
Packages Tree   : centos
Detection Method: /etc/os-release
Default Python v: 3 

LGTM!

Copy link
Collaborator

@stelfrag stelfrag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No errors now

@Ferroin Ferroin merged commit bd36f3b into netdata:master Mar 31, 2022
@Ferroin Ferroin deleted the almalinux branch March 31, 2022 16:52
maneamarius pushed a commit to maneamarius/netdata that referenced this pull request Apr 4, 2022
* Properly recognize Almalinux as an RHEL clone.

* Prefer DNF over YUM when available.

This should make things behave more correctly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/packaging Packaging and operating systems support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Installer and packaging code should properly recognize AlmaLinux as an RHEL/CentOS clone.
3 participants