aruetten opened a new pull request, #3778: URL: https://github.com/apache/solr/pull/3778
# Description Add Amazon Linux as known distro # Solution Add if condition checking for amazon in the /etc/os_release file and set the distro var to Red Hat # Tests Did run the code without the specific condition leading to Red Hat anyways, see: ``` [root@ip-10-xxx-xx-xx tmp]# bash -x test.sh + for command in "grep -E \"^NAME=\" /etc/os-release" "lsb_release -i" "cat /proc/version" "uname -a" ++ eval grep -E '"^NAME="' /etc/os-release + distro_string='NAME="Amazon Linux"' + unset distro + [[ name="amazon linux" == *\d\e\b\i\a\n* ]] + [[ name="amazon linux" == *\r\e\d\ \h\a\t* ]] + [[ name="amazon linux" == *\c\e\n\t\o\s* ]] + [[ name="amazon linux" == *\r\o\c\k\y* ]] + [[ name="amazon linux" == *\u\b\u\n\t\u* ]] + [[ name="amazon linux" == *\s\u\s\e* ]] + [[ name="amazon linux" == *\d\a\r\w\i\n* ]] + [[ -n '' ]] + for command in "grep -E \"^NAME=\" /etc/os-release" "lsb_release -i" "cat /proc/version" "uname -a" ++ eval lsb_release -i + distro_string= + unset distro + [[ '' == *\d\e\b\i\a\n* ]] + [[ '' == *\r\e\d\ \h\a\t* ]] + [[ '' == *\c\e\n\t\o\s* ]] + [[ '' == *\r\o\c\k\y* ]] + [[ '' == *\u\b\u\n\t\u* ]] + [[ '' == *\s\u\s\e* ]] + [[ '' == *\d\a\r\w\i\n* ]] + [[ -n '' ]] + for command in "grep -E \"^NAME=\" /etc/os-release" "lsb_release -i" "cat /proc/version" "uname -a" ++ eval cat /proc/version + distro_string='Linux version 6.1.150-174.273.amzn2023.x86_64 (mockbuild@ip-10-0-44-125) (gcc (GCC) 11.5.0 20240719 (Red Hat 11.5.0-5), GNU ld version 2.41-50.amzn2023.0.3) #1 SMP PREEMPT_DYNAMIC Tue Sep 9 12:21:26 UTC 2025' + unset distro + [[ linux version 6.1.150-174.273.amzn2023.x86_64 (mockbuild@ip-10-0-44-125) (gcc (gcc) 11.5.0 20240719 (red hat 11.5.0-5), gnu ld version 2.41-50.amzn2023.0.3) #1 smp preempt_dynamic tue sep 9 12:21:26 utc 2025 == *\d\e\b\i\a\n* ]] + [[ linux version 6.1.150-174.273.amzn2023.x86_64 (mockbuild@ip-10-0-44-125) (gcc (gcc) 11.5.0 20240719 (red hat 11.5.0-5), gnu ld version 2.41-50.amzn2023.0.3) #1 smp preempt_dynamic tue sep 9 12:21:26 utc 2025 == *\r\e\d\ \h\a\t* ]] + distro=RedHat + [[ -n RedHat ]] + break + echo RedHat RedHat ``` # Checklist Please review the following and check all that apply: - [x] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) and my code conforms to the standards described there to the best of my ability. - [ ] I have created a Jira issue and added the issue ID to my pull request title. - [ ] I have given Solr maintainers [access](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation) - [x] I have developed this patch against the `main` branch. - [ ] I have run `./gradlew check`. - [x] I have added tests for my changes. - [ ] I have added documentation for the [Reference Guide](https://github.com/apache/solr/tree/main/solr/solr-ref-guide) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
