feature: add support for AlmaLinux #373

Open
romain-dartigues wants to merge 2 commits from romain-dartigues/cdist:rd/almalinux into master
Contributor

Waiting for review and comments.

Questions:

  • should it be alma instead of almalinux for brevity sake (like void or alpine)?
  • should cdist introduce synonyms, such as RHlike or linux to make easier to write types for "any linux" or "any distribution using rpm`?
Waiting for review and comments. Questions: * should it be `alma` instead of `almalinux` for brevity sake (like `void` or `alpine`)? * should cdist introduce synonyms, such as RHlike or `linux` to make easier to write types for "any linux" or "any distribution using rpm`?
romain-dartigues added 2 commits 2024-04-11 19:21:18 +00:00
9819a8d25d introduce AlmaLinux
AlmaLinux is an Open Source fork of Red Hat Enterprise Linux;
it should behave like a CentOS/RHEL.
romain-dartigues force-pushed rd/almalinux from 109801fbe7 to 4b874656a9 2024-04-11 19:21:49 +00:00 Compare
romain-dartigues changed title from WIP: feature: add support for AlmaLinux to feature: add support for AlmaLinux 2024-04-13 10:34:59 +00:00
romain-dartigues requested review from fnux 2024-04-13 10:37:54 +00:00
fnux self-assigned this 2024-04-16 09:08:25 +00:00
Collaborator

Can you also support 'rocky' (for Rocky Linux)? It's currently (as far as I know) the most used RHEL rebuild.

  • should it be alma instead of almalinux for brevity sake (like void or alpine)?

It should be almalinux, not alma - since it is what upstream uses:

$ podman run --rm -it almalinux:latest
[root@d134def9ce4b /]# . /etc/os-release 
[root@d134def9ce4b /]# echo "$ID"
almalinux
  • should cdist introduce synonyms, such as RHlike or linux to make easier to write types for "any linux" or "any distribution using rpm`?

I don't mind the boilerplate right now - you can open a separate issue if it bothers you.

Can you also support 'rocky' (for Rocky Linux)? It's currently (as far as I know) the most used RHEL rebuild. > * should it be `alma` instead of `almalinux` for brevity sake (like `void` or `alpine`)? It should be `almalinux`, not `alma` - since it is what upstream uses: ``` $ podman run --rm -it almalinux:latest [root@d134def9ce4b /]# . /etc/os-release [root@d134def9ce4b /]# echo "$ID" almalinux ``` > * should cdist introduce synonyms, such as RHlike or `linux` to make easier to write types for "any linux" or "any distribution using rpm`? I don't mind the boilerplate right now - you can open a separate issue if it bothers you.
Owner

@romain-dartigues No, cdist should NOT do that.

If you really need to match on an rpm package, write an explorer for that. However there is already a type, __package that does that for you.

Rule of thumb:

  • Introduce logic that makes common, repetitive tasks easy.
  • Do not introduce logic that is rarely used or does not yet have a use case
@romain-dartigues No, cdist should *NOT* do that. If you *really* need to match on an rpm package, write an explorer for that. However there is already a type, __package that does that for you. Rule of thumb: * Introduce logic that makes common, repetitive tasks easy. * Do not introduce logic that is rarely used or does not yet have a use case
fnux reviewed 2024-04-24 07:31:36 +00:00
@ -24,3 +24,3 @@
os="$("$__explorer/os")"
case "$os" in
amazon|scientific|centos|fedora|redhat) echo "yum" ;;
almalinux|amazon|scientific|centos|fedora|redhat) echo "yum" ;;
Collaborator

You'll need dnf instead of yum.

You'll need dnf instead of yum.
This pull request can be merged automatically.
You are not authorized to merge this pull request.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b romain-dartigues-rd/almalinux master
git pull rd/almalinux

Step 2:

Merge the changes and update on Gitea.
git checkout master
git merge --no-ff romain-dartigues-rd/almalinux
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: ungleich-public/cdist#373
No description provided.