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

Add support for Oracle Linux. #153

Merged
merged 23 commits into from
Mar 9, 2020
Merged

Add support for Oracle Linux. #153

merged 23 commits into from
Mar 9, 2020

Conversation

zacbrown
Copy link
Contributor

@zacbrown zacbrown commented Mar 7, 2020

This adds support both in the lsb_release and file based checkers for Oracle Linux.

One important note: Oracle Linux has an unfortunate artifact where it contains an /etc/redhat-release file that identifies itself as RHEL. In order to pre-empt this, I've added new parsing that looks for the /etc/os-release file which is on Oracle Linux machines. This file is checked for first in order to pre-empt misidentification of Oracle Linux as RHEL.

I've tested this code on Oracle Linux 8.1 and Oracle Linux 7.5, both with and without lsb_release and it worked as expected.

Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
Copy link
Owner

@stanislav-tkach stanislav-tkach left a comment

Choose a reason for hiding this comment

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

Thank you for the pull request!

src/matcher.rs Outdated Show resolved Hide resolved
@zacbrown
Copy link
Contributor Author

zacbrown commented Mar 9, 2020

@DarkEld3r - Will take a look. Thanks for the feedback!

zacbrown added 2 commits March 9, 2020 08:23
…ue variant to make it not specific to Oracle Linux.

- Use lifetime'ed &str instead of creating a String object unnecessarily for parsing out the version using Matcher::KeyValue.
- Simplify some Option::map calls to pass the fully qualified function to apply to the Option types.

Signed-off-by: Zac Brown <zacbrown@users.noreply.github.com>
@zacbrown zacbrown requested a review from stanislav-tkach March 9, 2020 15:25
@stanislav-tkach stanislav-tkach merged commit 4f341a5 into stanislav-tkach:master Mar 9, 2020
@stanislav-tkach
Copy link
Owner

Thanks for the effort! I will release a new version shortly.

@zacbrown zacbrown deleted the oracle-linux branch May 19, 2020 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants